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

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

上级 0504fc9b
......@@ -674,6 +674,16 @@ export default {
tip: "导出数据模型",
},
},
calendarviewcalendar_quicktoolbar_toolbar: {
tbitem3: {
caption: "Save",
tip: "Save",
},
tbitem5: {
caption: "Save And Close",
tip: "Save And Close Window",
},
},
calendarviewtoolbar_toolbar: {
deuiaction1: {
caption: "New",
......@@ -1038,6 +1048,10 @@ export default {
ibizbookmonth_calendar: {
nodata:"",
uiactions: {
save: "Save",
saveandexit: "Save And Close",
saveandstart: "Start workflow",
print: "Print",
},
},
};
\ No newline at end of file
......@@ -673,6 +673,16 @@ export default {
tip: "导出数据模型",
},
},
calendarviewcalendar_quicktoolbar_toolbar: {
tbitem3: {
caption: "保存",
tip: "保存",
},
tbitem5: {
caption: "保存并关闭",
tip: "保存并关闭",
},
},
calendarviewtoolbar_toolbar: {
deuiaction1: {
caption: "新建",
......@@ -1037,6 +1047,10 @@ export default {
ibizbookmonth_calendar: {
nodata:"",
uiactions: {
save: "保存",
saveandexit: "保存并关闭",
saveandstart: "开始流程",
print: "打印",
},
},
};
\ No newline at end of file
......@@ -12,6 +12,9 @@
<div class='content-container'>
<div style="margin-bottom:6px;">
<div class="quick-group-container">
<app-quick-group :items="quickGroupModel" @valuechange="quickGroupValueChange"></app-quick-group>
</div>
<div class="quick-search-container">
<view_quicksearchform
:viewState="viewState"
......@@ -629,7 +632,7 @@ export default class IBIZBOOKCalendarViewBase extends Vue {
if (_this.loadModel && _this.loadModel instanceof Function) {
_this.loadModel();
}
_this.loadQuickGroupModel();
}
......@@ -1033,6 +1036,100 @@ export default class IBIZBOOKCalendarViewBase extends Vue {
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof IBIZBOOKCalendarViewBase
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 快速分组数据对象
*
* @memberof IBIZBOOKCalendarViewBase
*/
public quickGroupData:any;
/**
* 快速分组是否有抛值
*
* @memberof IBIZBOOKCalendarViewBase
*/
public isEmitQuickGroupValue:boolean = false;
/**
* 快速分组模型
*
* @memberof IBIZBOOKCalendarViewBase
*/
public quickGroupModel:Array<any> = [];
/**
* 加载快速分组模型
*
* @memberof IBIZBOOKCalendarViewBase
*/
public loadQuickGroupModel(){
let quickGroupCodeList:any = {tag:'Bookgroup',codelistType:'STATIC'};
if(quickGroupCodeList.tag && Object.is(quickGroupCodeList.codelistType,"STATIC")){
const codelist = this.$store.getters.getCodeList(quickGroupCodeList.tag);
if (codelist) {
this.quickGroupModel = [...this.handleDynamicData(JSON.parse(JSON.stringify(codelist.items)))];
} else {
console.log(`----${quickGroupCodeList.tag}----代码表不存在`);
}
}else if(quickGroupCodeList.tag && Object.is(quickGroupCodeList.codelistType,"DYNAMIC")){
this.codeListService.getItems(quickGroupCodeList.tag,{},{}).then((res:any) => {
this.quickGroupModel = res;
}).catch((error:any) => {
console.log(`----${quickGroupCodeList.tag}----代码表不存在`);
});
}
}
/**
* 处理快速分组模型动态数据部分(%xxx%)
*
* @memberof IBIZBOOKCalendarViewBase
*/
public handleDynamicData(inputArray:Array<any>){
if(inputArray.length >0){
inputArray.forEach((item:any) =>{
if(item.data && Object.keys(item.data).length >0){
Object.keys(item.data).forEach((name:any) =>{
let value: any = item.data[name];
if (value && typeof(value)=='string' && value.startsWith('%') && value.endsWith('%')) {
const key = (value.substring(1, value.length - 1)).toLowerCase();
if (this.context[key]) {
value = this.context[key];
} else if(this.viewparams[key]){
value = this.viewparams[key];
}
}
item.data[name] = value;
})
}
})
}
return inputArray;
}
/**
* 快速分组值变化
*
* @memberof IBIZBOOKCalendarViewBase
*/
public quickGroupValueChange($event:any){
if($event){
this.quickGroupData = $event.data;
if(this.isEmitQuickGroupValue){
this.onSearch($event);
}
}
this.isEmitQuickGroupValue = true;
}
/**
* 快速搜索栏数据对象
*
......
<template>
<div :class='calendarClass'>
<span class="quick-toolbar">
<div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="calendarviewcalendar_quicktoolbarModels.tbitem3.visabled" :disabled="calendarviewcalendar_quicktoolbarModels.tbitem3.disabled" class=' deepskyblueToolBar' @click="calendar_quicktoolbar_click({ tag: 'tbitem3' }, $event)">
<i class='fa fa-save'></i>
<span class='caption'>{{$t('entities.ibizbook.calendarviewcalendar_quicktoolbar_toolbar.tbitem3.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizbook.calendarviewcalendar_quicktoolbar_toolbar.tbitem3.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="calendarviewcalendar_quicktoolbarModels.tbitem5.visabled" :disabled="calendarviewcalendar_quicktoolbarModels.tbitem5.disabled" class='' @click="calendar_quicktoolbar_click({ tag: 'tbitem5' }, $event)">
<i class='sx-tb-saveandclose'></i>
<span class='caption'>{{$t('entities.ibizbook.calendarviewcalendar_quicktoolbar_toolbar.tbitem5.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizbook.calendarviewcalendar_quicktoolbar_toolbar.tbitem5.tip')}}</div>
</tooltip>
</div>
</span>
<context-menu-container>
<template v-if="events.length >0">
<div class="event-legends">
......@@ -143,8 +161,251 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface {
* @memberof IBIZBOOKMONTHBase
*/
public appEntityService: IBIZBOOKService = new IBIZBOOKService({ $store: this.$store });
/**
* calendar_quicktoolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZBOOKMONTHBase
*/
public calendar_quicktoolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'tbitem3')) {
this.calendar_quicktoolbar_tbitem3_click(null, 'calendar_quicktoolbar', $event2);
}
if (Object.is($event.tag, 'tbitem5')) {
this.calendar_quicktoolbar_tbitem5_click(null, 'calendar_quicktoolbar', $event2);
}
if (Object.is($event.tag, 'tbitem9')) {
this.calendar_quicktoolbar_tbitem9_click(null, 'calendar_quicktoolbar', $event2);
}
if (Object.is($event.tag, 'tbitem15')) {
this.calendar_quicktoolbar_tbitem15_click(null, 'calendar_quicktoolbar', $event2);
}
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public calendar_quicktoolbar_tbitem3_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this;
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"IBIZBOOK");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public calendar_quicktoolbar_tbitem5_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this;
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"IBIZBOOK");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public calendar_quicktoolbar_tbitem9_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this;
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndStart(datas, contextJO,paramJO, $event, xData,this,"IBIZBOOK");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public calendar_quicktoolbar_tbitem15_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this;
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"IBIZBOOK");
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZBOOKCalendarViewBase
*/
public Save(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
// 界面行为容器对象 _this
const _this: any = this;
if (xData && xData.save instanceof Function) {
xData.save().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
_this.$emit('viewdataschange', [{ ...response.data }]);
});
} else if (_this.save && _this.save instanceof Function) {
_this.save();
}
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZBOOKCalendarViewBase
*/
public SaveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.saveAndExit instanceof Function) {
xData.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.saveAndExit && _this.saveAndExit instanceof Function) {
_this.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
* 开始流程
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZBOOKCalendarViewBase
*/
public SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.wfstart instanceof Function)) {
return;
}
xData.wfstart(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if(window.parent){
window.parent.postMessage({ ..._data },'*');
}
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
}else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
}
});
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZBOOKCalendarViewBase
*/
public Print(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.print instanceof Function) || !$event) {
return ;
}
xData.print();
}
/**
* 转化数据
......@@ -799,6 +1060,19 @@ export default class IBIZBOOKMONTHBase extends Vue implements ControlInterface {
}
}
/**
* 工具栏模型
*
* @type {*}
* @memberof IBIZBOOKCalendarView
*/
public calendarviewcalendar_quicktoolbarModels: any = {
tbitem3: { name: 'tbitem3', actiontarget: 'NONE', caption: '保存', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Save', target: '' } },
tbitem5: { name: 'tbitem5', actiontarget: 'NONE', caption: '保存并关闭', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' } },
};
/**
......
// this is less
.deepskyblueToolBar {color:white !important;background-color:#108cee !important;}
@import '~@fullcalendar/core/main.css';
@import '~@fullcalendar/daygrid/main.css';
@import '~@fullcalendar/timegrid/main.css';
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册