提交 a8976a85 编写于 作者: ibizdev's avatar ibizdev

Mosher 发布系统代码 [后台服务,演示应用]

上级 170a8301
......@@ -559,6 +559,10 @@ export default class AppIndexViewBase extends Vue implements ControlInterface {
* @memberof AppIndexViewBase
*/
public click(item: any) {
this.handleCtrlEvents('onselectionchange', { data: item }).then((res: boolean) => {
if (!res) {
return;
}
if (item) {
let navDataService = NavDataService.getInstance();
if(Object.is(this.navModel,"route")){
......@@ -569,6 +573,7 @@ export default class AppIndexViewBase extends Vue implements ControlInterface {
console.warn('未指定应用功能');
}
}
})
}
......
......@@ -450,6 +450,10 @@ export default class IconMenuBase extends Vue implements ControlInterface {
* @memberof IconMenuBase
*/
public click(item: any) {
this.handleCtrlEvents('onselectionchange', { data: item }).then((res: boolean) => {
if (!res) {
return;
}
if (item) {
let navDataService = NavDataService.getInstance();
if(Object.is(this.navModel,"route")){
......@@ -463,6 +467,7 @@ export default class IconMenuBase extends Vue implements ControlInterface {
console.warn('未指定应用功能');
}
}
})
}
/**
......
......@@ -637,6 +637,10 @@ export default class MainMenuBase extends Vue implements ControlInterface {
* @memberof MainMenuBase
*/
public click(item: any) {
this.handleCtrlEvents('onselectionchange', { data: item }).then((res: boolean) => {
if (!res) {
return;
}
if (item) {
let navDataService = NavDataService.getInstance();
if(Object.is(this.navModel,"route")){
......@@ -1085,6 +1089,7 @@ export default class MainMenuBase extends Vue implements ControlInterface {
console.warn('未指定应用功能');
}
}
})
}
......
......@@ -649,7 +649,7 @@ export default class BookCalendarMajorStateBase extends Vue implements ControlIn
Object.assign(arg, { viewparams: tempViewParams });
// 处理events数据
let _this = this;
let handleEvents = ()=>{
let handleEvents = () => {
if(_this.isSelectFirstDefault){
// 模拟$event数据
let tempEvent = JSON.parse(JSON.stringify(_this.events.length > 0?_this.events[0]:{}));
......@@ -673,29 +673,49 @@ export default class BookCalendarMajorStateBase extends Vue implements ControlIn
api.updateSize();
}
}
if(JSON.stringify(arg) === JSON.stringify(this.searchArgCache)){
if (JSON.stringify(arg) === JSON.stringify(this.searchArgCache)) {
handleEvents();
return;
}else{
} else {
this.searchArgCache = arg;
}
this.handleCtrlEvents('onbeforeload', { viewparams: arg }).then((beforeLoadRes: boolean) => {
if (!beforeLoadRes) {
return;
}
const post: Promise<any> = this.service.search(this.loadAction, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.handleCtrlEvents('onloaderror', { viewparams: arg }).then((loadErrorRes: boolean) => {
if (!loadErrorRes) {
return;
}
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
});
return;
}
this.handleCtrlEvents('onloadsuccess', { data: response.data }).then((loadSuccessRes: boolean) => {
if (!loadSuccessRes) {
return;
}
// 默认选中第一项
this.events = response.data;
handleEvents();
})
}, (response: any) => {
this.handleCtrlEvents('onloaderror', { viewparams: arg }).then((loadErrorRes: boolean) => {
if (!loadErrorRes) {
return;
}
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
});
});
})
}
/**
......@@ -742,6 +762,10 @@ export default class BookCalendarMajorStateBase extends Vue implements ControlIn
* @memberof BookCalendarMajorStateBase
*/
public onEventClick($event: any, isOriginData:boolean = false, $event2?: any) {
this.handleCtrlEvents('onselectionchange', { data: $event }).then((res: boolean) => {
if (!res) {
return;
}
// 处理event数据
let event: any = {};
if(isOriginData){
......@@ -804,6 +828,8 @@ export default class BookCalendarMajorStateBase extends Vue implements ControlIn
_this.refresh();
});
}
})
}
/**
......@@ -841,20 +867,40 @@ export default class BookCalendarMajorStateBase extends Vue implements ControlIn
_context.ibizbook = $event.event._def.extendedProps.ibizbook;
break;
}
Object.assign(arg,{viewparams:this.viewparams});
Object.assign(arg, { viewparams: this.viewparams} );
this.handleCtrlEvents('onbeforedrop', { viewparams: arg }).then((beforeDropRes: boolean) => {
if (!beforeDropRes) {
return;
}
const post: Promise<any> = this.service.update(itemType, JSON.parse(JSON.stringify(_context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.handleCtrlEvents('ondroperror', { data: response && response.data ? response.data : [] }).then((res: boolean) => {
if (!res) {
return;
}
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
})
}
this.handleCtrlEvents('ondropsuccess', { data: response.data }).then((res: boolean) => {
if (!res) {
return;
}
})
}, (response: any) => {
this.handleCtrlEvents('ondroperror', { data: response && response.data ? response.data : [] }).then((res: boolean) => {
if (!res) {
return;
}
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
})
})
});
}
......
......@@ -555,7 +555,7 @@ export default class CustomCalendarBase extends Vue implements ControlInterface
Object.assign(arg, { viewparams: tempViewParams });
// 处理events数据
let _this = this;
let handleEvents = ()=>{
let handleEvents = () => {
if(_this.isSelectFirstDefault){
// 模拟$event数据
let tempEvent = JSON.parse(JSON.stringify(_this.events.length > 0?_this.events[0]:{}));
......@@ -579,29 +579,49 @@ export default class CustomCalendarBase extends Vue implements ControlInterface
api.updateSize();
}
}
if(JSON.stringify(arg) === JSON.stringify(this.searchArgCache)){
if (JSON.stringify(arg) === JSON.stringify(this.searchArgCache)) {
handleEvents();
return;
}else{
} else {
this.searchArgCache = arg;
}
this.handleCtrlEvents('onbeforeload', { viewparams: arg }).then((beforeLoadRes: boolean) => {
if (!beforeLoadRes) {
return;
}
const post: Promise<any> = this.service.search(this.loadAction, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.handleCtrlEvents('onloaderror', { viewparams: arg }).then((loadErrorRes: boolean) => {
if (!loadErrorRes) {
return;
}
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
});
return;
}
this.handleCtrlEvents('onloadsuccess', { data: response.data }).then((loadSuccessRes: boolean) => {
if (!loadSuccessRes) {
return;
}
// 默认选中第一项
this.events = response.data;
handleEvents();
})
}, (response: any) => {
this.handleCtrlEvents('onloaderror', { viewparams: arg }).then((loadErrorRes: boolean) => {
if (!loadErrorRes) {
return;
}
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
});
});
})
}
/**
......@@ -637,6 +657,10 @@ export default class CustomCalendarBase extends Vue implements ControlInterface
* @memberof CustomCalendarBase
*/
public onEventClick($event: any, isOriginData:boolean = false, $event2?: any) {
this.handleCtrlEvents('onselectionchange', { data: $event }).then((res: boolean) => {
if (!res) {
return;
}
// 处理event数据
let event: any = {};
if(isOriginData){
......@@ -699,6 +723,8 @@ export default class CustomCalendarBase extends Vue implements ControlInterface
_this.refresh();
});
}
})
}
/**
......@@ -736,20 +762,40 @@ export default class CustomCalendarBase extends Vue implements ControlInterface
_context.ibizbook = $event.event._def.extendedProps.ibizbook;
break;
}
Object.assign(arg,{viewparams:this.viewparams});
Object.assign(arg, { viewparams: this.viewparams} );
this.handleCtrlEvents('onbeforedrop', { viewparams: arg }).then((beforeDropRes: boolean) => {
if (!beforeDropRes) {
return;
}
const post: Promise<any> = this.service.update(itemType, JSON.parse(JSON.stringify(_context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.handleCtrlEvents('ondroperror', { data: response && response.data ? response.data : [] }).then((res: boolean) => {
if (!res) {
return;
}
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
})
}
this.handleCtrlEvents('ondropsuccess', { data: response.data }).then((res: boolean) => {
if (!res) {
return;
}
})
}, (response: any) => {
this.handleCtrlEvents('ondroperror', { data: response && response.data ? response.data : [] }).then((res: boolean) => {
if (!res) {
return;
}
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
})
})
});
}
......
......@@ -822,7 +822,7 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface {
Object.assign(arg, { viewparams: tempViewParams });
// 处理events数据
let _this = this;
let handleEvents = ()=>{
let handleEvents = () => {
if(_this.isSelectFirstDefault){
// 模拟$event数据
let tempEvent = JSON.parse(JSON.stringify(_this.events.length > 0?_this.events[0]:{}));
......@@ -846,29 +846,49 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface {
api.updateSize();
}
}
if(JSON.stringify(arg) === JSON.stringify(this.searchArgCache)){
if (JSON.stringify(arg) === JSON.stringify(this.searchArgCache)) {
handleEvents();
return;
}else{
} else {
this.searchArgCache = arg;
}
this.handleCtrlEvents('onbeforeload', { viewparams: arg }).then((beforeLoadRes: boolean) => {
if (!beforeLoadRes) {
return;
}
const post: Promise<any> = this.service.search(this.loadAction, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.handleCtrlEvents('onloaderror', { viewparams: arg }).then((loadErrorRes: boolean) => {
if (!loadErrorRes) {
return;
}
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
});
return;
}
this.handleCtrlEvents('onloadsuccess', { data: response.data }).then((loadSuccessRes: boolean) => {
if (!loadSuccessRes) {
return;
}
// 默认选中第一项
this.events = response.data;
handleEvents();
})
}, (response: any) => {
this.handleCtrlEvents('onloaderror', { viewparams: arg }).then((loadErrorRes: boolean) => {
if (!loadErrorRes) {
return;
}
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
});
});
})
}
/**
......@@ -915,6 +935,10 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface {
* @memberof IBIZBOOKMONTHBase
*/
public onEventClick($event: any, isOriginData:boolean = false, $event2?: any) {
this.handleCtrlEvents('onselectionchange', { data: $event }).then((res: boolean) => {
if (!res) {
return;
}
// 处理event数据
let event: any = {};
if(isOriginData){
......@@ -977,6 +1001,8 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface {
_this.refresh();
});
}
})
}
/**
......@@ -1014,20 +1040,40 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface {
_context.ibizbook = $event.event._def.extendedProps.ibizbook;
break;
}
Object.assign(arg,{viewparams:this.viewparams});
Object.assign(arg, { viewparams: this.viewparams} );
this.handleCtrlEvents('onbeforedrop', { viewparams: arg }).then((beforeDropRes: boolean) => {
if (!beforeDropRes) {
return;
}
const post: Promise<any> = this.service.update(itemType, JSON.parse(JSON.stringify(_context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.handleCtrlEvents('ondroperror', { data: response && response.data ? response.data : [] }).then((res: boolean) => {
if (!res) {
return;
}
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
})
}
this.handleCtrlEvents('ondropsuccess', { data: response.data }).then((res: boolean) => {
if (!res) {
return;
}
})
}, (response: any) => {
this.handleCtrlEvents('ondroperror', { data: response && response.data ? response.data : [] }).then((res: boolean) => {
if (!res) {
return;
}
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
})
})
});
}
......
......@@ -732,7 +732,7 @@ export default class IBIZBOOKPANELBase extends Vue implements ControlInterface {
Object.assign(arg, { viewparams: tempViewParams });
// 处理events数据
let _this = this;
let handleEvents = ()=>{
let handleEvents = () => {
if(_this.isSelectFirstDefault){
// 模拟$event数据
let tempEvent = JSON.parse(JSON.stringify(_this.events.length > 0?_this.events[0]:{}));
......@@ -756,29 +756,49 @@ export default class IBIZBOOKPANELBase extends Vue implements ControlInterface {
api.updateSize();
}
}
if(JSON.stringify(arg) === JSON.stringify(this.searchArgCache)){
if (JSON.stringify(arg) === JSON.stringify(this.searchArgCache)) {
handleEvents();
return;
}else{
} else {
this.searchArgCache = arg;
}
this.handleCtrlEvents('onbeforeload', { viewparams: arg }).then((beforeLoadRes: boolean) => {
if (!beforeLoadRes) {
return;
}
const post: Promise<any> = this.service.search(this.loadAction, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.handleCtrlEvents('onloaderror', { viewparams: arg }).then((loadErrorRes: boolean) => {
if (!loadErrorRes) {
return;
}
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
});
return;
}
this.handleCtrlEvents('onloadsuccess', { data: response.data }).then((loadSuccessRes: boolean) => {
if (!loadSuccessRes) {
return;
}
// 默认选中第一项
this.events = response.data;
handleEvents();
})
}, (response: any) => {
this.handleCtrlEvents('onloaderror', { viewparams: arg }).then((loadErrorRes: boolean) => {
if (!loadErrorRes) {
return;
}
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
});
});
})
}
/**
......@@ -814,6 +834,10 @@ export default class IBIZBOOKPANELBase extends Vue implements ControlInterface {
* @memberof IBIZBOOKPANELBase
*/
public onEventClick($event: any, isOriginData:boolean = false, $event2?: any) {
this.handleCtrlEvents('onselectionchange', { data: $event }).then((res: boolean) => {
if (!res) {
return;
}
// 处理event数据
let event: any = {};
if(isOriginData){
......@@ -876,6 +900,8 @@ export default class IBIZBOOKPANELBase extends Vue implements ControlInterface {
_this.refresh();
});
}
})
}
/**
......@@ -913,20 +939,40 @@ export default class IBIZBOOKPANELBase extends Vue implements ControlInterface {
_context.ibizbook = $event.event._def.extendedProps.ibizbook;
break;
}
Object.assign(arg,{viewparams:this.viewparams});
Object.assign(arg, { viewparams: this.viewparams} );
this.handleCtrlEvents('onbeforedrop', { viewparams: arg }).then((beforeDropRes: boolean) => {
if (!beforeDropRes) {
return;
}
const post: Promise<any> = this.service.update(itemType, JSON.parse(JSON.stringify(_context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.handleCtrlEvents('ondroperror', { data: response && response.data ? response.data : [] }).then((res: boolean) => {
if (!res) {
return;
}
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
})
}
this.handleCtrlEvents('ondropsuccess', { data: response.data }).then((res: boolean) => {
if (!res) {
return;
}
})
}, (response: any) => {
this.handleCtrlEvents('ondroperror', { data: response && response.data ? response.data : [] }).then((res: boolean) => {
if (!res) {
return;
}
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
})
})
});
}
......
......@@ -838,7 +838,7 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac
Object.assign(arg, { viewparams: tempViewParams });
// 处理events数据
let _this = this;
let handleEvents = ()=>{
let handleEvents = () => {
if(_this.isSelectFirstDefault){
// 模拟$event数据
let tempEvent = JSON.parse(JSON.stringify(_this.events.length > 0?_this.events[0]:{}));
......@@ -862,29 +862,49 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac
api.updateSize();
}
}
if(JSON.stringify(arg) === JSON.stringify(this.searchArgCache)){
if (JSON.stringify(arg) === JSON.stringify(this.searchArgCache)) {
handleEvents();
return;
}else{
} else {
this.searchArgCache = arg;
}
this.handleCtrlEvents('onbeforeload', { viewparams: arg }).then((beforeLoadRes: boolean) => {
if (!beforeLoadRes) {
return;
}
const post: Promise<any> = this.service.search(this.loadAction, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.handleCtrlEvents('onloaderror', { viewparams: arg }).then((loadErrorRes: boolean) => {
if (!loadErrorRes) {
return;
}
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
});
return;
}
this.handleCtrlEvents('onloadsuccess', { data: response.data }).then((loadSuccessRes: boolean) => {
if (!loadSuccessRes) {
return;
}
// 默认选中第一项
this.events = response.data;
handleEvents();
})
}, (response: any) => {
this.handleCtrlEvents('onloaderror', { viewparams: arg }).then((loadErrorRes: boolean) => {
if (!loadErrorRes) {
return;
}
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
});
});
})
}
/**
......@@ -920,6 +940,10 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac
* @memberof IBIZBOOKTIMELINEBase
*/
public onEventClick($event: any, isOriginData:boolean = false, $event2?: any) {
this.handleCtrlEvents('onselectionchange', { data: $event }).then((res: boolean) => {
if (!res) {
return;
}
// 处理event数据
let event: any = {};
if(isOriginData){
......@@ -982,6 +1006,8 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac
_this.refresh();
});
}
})
}
/**
......@@ -1019,20 +1045,40 @@ export default class IBIZBOOKTIMELINEBase extends Vue implements ControlInterfac
_context.ibizbook = $event.event._def.extendedProps.ibizbook;
break;
}
Object.assign(arg,{viewparams:this.viewparams});
Object.assign(arg, { viewparams: this.viewparams} );
this.handleCtrlEvents('onbeforedrop', { viewparams: arg }).then((beforeDropRes: boolean) => {
if (!beforeDropRes) {
return;
}
const post: Promise<any> = this.service.update(itemType, JSON.parse(JSON.stringify(_context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.handleCtrlEvents('ondroperror', { data: response && response.data ? response.data : [] }).then((res: boolean) => {
if (!res) {
return;
}
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
})
}
this.handleCtrlEvents('ondropsuccess', { data: response.data }).then((res: boolean) => {
if (!res) {
return;
}
})
}, (response: any) => {
this.handleCtrlEvents('ondroperror', { data: response && response.data ? response.data : [] }).then((res: boolean) => {
if (!res) {
return;
}
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
})
})
});
}
......
......@@ -570,7 +570,7 @@ export default class OrderCalendarNavigationBase extends Vue implements ControlI
Object.assign(arg, { viewparams: tempViewParams });
// 处理events数据
let _this = this;
let handleEvents = ()=>{
let handleEvents = () => {
if(_this.isSelectFirstDefault){
// 模拟$event数据
let tempEvent = JSON.parse(JSON.stringify(_this.events.length > 0?_this.events[0]:{}));
......@@ -594,29 +594,49 @@ export default class OrderCalendarNavigationBase extends Vue implements ControlI
api.updateSize();
}
}
if(JSON.stringify(arg) === JSON.stringify(this.searchArgCache)){
if (JSON.stringify(arg) === JSON.stringify(this.searchArgCache)) {
handleEvents();
return;
}else{
} else {
this.searchArgCache = arg;
}
this.handleCtrlEvents('onbeforeload', { viewparams: arg }).then((beforeLoadRes: boolean) => {
if (!beforeLoadRes) {
return;
}
const post: Promise<any> = this.service.search(this.loadAction, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.handleCtrlEvents('onloaderror', { viewparams: arg }).then((loadErrorRes: boolean) => {
if (!loadErrorRes) {
return;
}
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
});
return;
}
this.handleCtrlEvents('onloadsuccess', { data: response.data }).then((loadSuccessRes: boolean) => {
if (!loadSuccessRes) {
return;
}
// 默认选中第一项
this.events = response.data;
handleEvents();
})
}, (response: any) => {
this.handleCtrlEvents('onloaderror', { viewparams: arg }).then((loadErrorRes: boolean) => {
if (!loadErrorRes) {
return;
}
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
});
});
})
}
/**
......@@ -674,6 +694,10 @@ export default class OrderCalendarNavigationBase extends Vue implements ControlI
* @memberof OrderCalendarNavigationBase
*/
public onEventClick($event: any, isOriginData:boolean = false, $event2?: any) {
this.handleCtrlEvents('onselectionchange', { data: $event }).then((res: boolean) => {
if (!res) {
return;
}
// 处理event数据
let event: any = {};
if(isOriginData){
......@@ -736,6 +760,8 @@ export default class OrderCalendarNavigationBase extends Vue implements ControlI
_this.refresh();
});
}
})
}
/**
......@@ -773,20 +799,40 @@ export default class OrderCalendarNavigationBase extends Vue implements ControlI
_context.ibizorder = $event.event._def.extendedProps.ibizorder;
break;
}
Object.assign(arg,{viewparams:this.viewparams});
Object.assign(arg, { viewparams: this.viewparams} );
this.handleCtrlEvents('onbeforedrop', { viewparams: arg }).then((beforeDropRes: boolean) => {
if (!beforeDropRes) {
return;
}
const post: Promise<any> = this.service.update(itemType, JSON.parse(JSON.stringify(_context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.handleCtrlEvents('ondroperror', { data: response && response.data ? response.data : [] }).then((res: boolean) => {
if (!res) {
return;
}
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
})
}
this.handleCtrlEvents('ondropsuccess', { data: response.data }).then((res: boolean) => {
if (!res) {
return;
}
})
}, (response: any) => {
this.handleCtrlEvents('ondroperror', { data: response && response.data ? response.data : [] }).then((res: boolean) => {
if (!res) {
return;
}
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
})
})
});
}
......
......@@ -563,7 +563,7 @@ export default class OrderCalendarTimelineNavigationBase extends Vue implements
Object.assign(arg, { viewparams: tempViewParams });
// 处理events数据
let _this = this;
let handleEvents = ()=>{
let handleEvents = () => {
if(_this.isSelectFirstDefault){
// 模拟$event数据
let tempEvent = JSON.parse(JSON.stringify(_this.events.length > 0?_this.events[0]:{}));
......@@ -587,29 +587,49 @@ export default class OrderCalendarTimelineNavigationBase extends Vue implements
api.updateSize();
}
}
if(JSON.stringify(arg) === JSON.stringify(this.searchArgCache)){
if (JSON.stringify(arg) === JSON.stringify(this.searchArgCache)) {
handleEvents();
return;
}else{
} else {
this.searchArgCache = arg;
}
this.handleCtrlEvents('onbeforeload', { viewparams: arg }).then((beforeLoadRes: boolean) => {
if (!beforeLoadRes) {
return;
}
const post: Promise<any> = this.service.search(this.loadAction, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.handleCtrlEvents('onloaderror', { viewparams: arg }).then((loadErrorRes: boolean) => {
if (!loadErrorRes) {
return;
}
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
});
return;
}
this.handleCtrlEvents('onloadsuccess', { data: response.data }).then((loadSuccessRes: boolean) => {
if (!loadSuccessRes) {
return;
}
// 默认选中第一项
this.events = response.data;
handleEvents();
})
}, (response: any) => {
this.handleCtrlEvents('onloaderror', { viewparams: arg }).then((loadErrorRes: boolean) => {
if (!loadErrorRes) {
return;
}
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
});
});
})
}
/**
......@@ -667,6 +687,10 @@ export default class OrderCalendarTimelineNavigationBase extends Vue implements
* @memberof OrderCalendarTimelineNavigationBase
*/
public onEventClick($event: any, isOriginData:boolean = false, $event2?: any) {
this.handleCtrlEvents('onselectionchange', { data: $event }).then((res: boolean) => {
if (!res) {
return;
}
// 处理event数据
let event: any = {};
if(isOriginData){
......@@ -729,6 +753,8 @@ export default class OrderCalendarTimelineNavigationBase extends Vue implements
_this.refresh();
});
}
})
}
/**
......@@ -766,20 +792,40 @@ export default class OrderCalendarTimelineNavigationBase extends Vue implements
_context.ibizorder = $event.event._def.extendedProps.ibizorder;
break;
}
Object.assign(arg,{viewparams:this.viewparams});
Object.assign(arg, { viewparams: this.viewparams} );
this.handleCtrlEvents('onbeforedrop', { viewparams: arg }).then((beforeDropRes: boolean) => {
if (!beforeDropRes) {
return;
}
const post: Promise<any> = this.service.update(itemType, JSON.parse(JSON.stringify(_context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.handleCtrlEvents('ondroperror', { data: response && response.data ? response.data : [] }).then((res: boolean) => {
if (!res) {
return;
}
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
})
}
this.handleCtrlEvents('ondropsuccess', { data: response.data }).then((res: boolean) => {
if (!res) {
return;
}
})
}, (response: any) => {
this.handleCtrlEvents('ondroperror', { data: response && response.data ? response.data : [] }).then((res: boolean) => {
if (!res) {
return;
}
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
})
})
});
}
......
......@@ -172,7 +172,7 @@
<!--输出实体[IBIZBOOK]数据结构 -->
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizbook-804-7">
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizbook-805-7">
<createTable tableName="T_IBIZBOOK">
<column name="CREATEMAN" remarks="" type="VARCHAR(60)">
</column>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册