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

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

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