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

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

上级 170d5581
...@@ -1176,6 +1176,20 @@ export default { ...@@ -1176,6 +1176,20 @@ export default {
tip: "Print", tip: "Print",
}, },
}, },
dataviewexpviewdataviewexpbar_toolbar_toolbar: {
deuiaction1: {
caption: "刷新",
tip: "刷新",
},
deuiaction2: {
caption: "New",
tip: "New",
},
deuiaction3: {
caption: "Edit",
tip: "Edit {0}",
},
},
sf15gridviewtoolbar_toolbar: { sf15gridviewtoolbar_toolbar: {
tbitem3: { tbitem3: {
caption: "New", caption: "New",
...@@ -1536,6 +1550,20 @@ export default { ...@@ -1536,6 +1550,20 @@ export default {
tip: "数据导入", tip: "数据导入",
}, },
}, },
listexpviewlistexpbar_toolbar_toolbar: {
deuiaction1: {
caption: "刷新",
tip: "刷新",
},
deuiaction2: {
caption: "New",
tip: "New",
},
deuiaction3: {
caption: "Edit",
tip: "Edit {0}",
},
},
gridexpviewgridexpbar_toolbar_toolbar: { gridexpviewgridexpbar_toolbar_toolbar: {
deuiaction1: { deuiaction1: {
caption: "刷新", caption: "刷新",
...@@ -1680,58 +1708,32 @@ export default { ...@@ -1680,58 +1708,32 @@ export default {
tip: "Print", tip: "Print",
}, },
}, },
treeexpviewtoolbar_toolbar: { usr2calendarexpviewcalendarexpbar_toolbar_toolbar: {
tbitem3: { deuiaction1: {
caption: "New", caption: "刷新",
tip: "New", tip: "刷新",
}, },
deuiaction2: { deuiaction2: {
caption: "Save", caption: "New",
tip: "Save", tip: "New",
}, },
tbitem4: { deuiaction3: {
caption: "Edit", caption: "Edit",
tip: "Edit {0}", tip: "Edit {0}",
}, },
tbitem6: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
}, },
treeexpviewtreeexpbar_toolbar_toolbar: {
deuiaction1: { deuiaction1: {
caption: "导入", caption: "刷新",
tip: "导入", tip: "刷新",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem11: {
caption: "Print",
tip: "Print",
},
tbitem12: {
caption: "-",
tip: "",
}, },
tbitem16: { deuiaction2: {
caption: "其它", caption: "New",
tip: "其它", tip: "New",
}, },
tbitem21: { deuiaction3: {
caption: "Export Data Model", caption: "Edit",
tip: "导出数据模型", tip: "Edit {0}",
}, },
}, },
odsp_d20_wfgridviewtoolbar_toolbar: { odsp_d20_wfgridviewtoolbar_toolbar: {
......
...@@ -1175,6 +1175,20 @@ export default { ...@@ -1175,6 +1175,20 @@ export default {
tip: "打印", tip: "打印",
}, },
}, },
dataviewexpviewdataviewexpbar_toolbar_toolbar: {
deuiaction1: {
caption: "刷新",
tip: "刷新",
},
deuiaction2: {
caption: "新建",
tip: "新建",
},
deuiaction3: {
caption: "编辑",
tip: "编辑",
},
},
sf15gridviewtoolbar_toolbar: { sf15gridviewtoolbar_toolbar: {
tbitem3: { tbitem3: {
caption: "新建", caption: "新建",
...@@ -1535,6 +1549,20 @@ export default { ...@@ -1535,6 +1549,20 @@ export default {
tip: "数据导入", tip: "数据导入",
}, },
}, },
listexpviewlistexpbar_toolbar_toolbar: {
deuiaction1: {
caption: "刷新",
tip: "刷新",
},
deuiaction2: {
caption: "新建",
tip: "新建",
},
deuiaction3: {
caption: "编辑",
tip: "编辑",
},
},
gridexpviewgridexpbar_toolbar_toolbar: { gridexpviewgridexpbar_toolbar_toolbar: {
deuiaction1: { deuiaction1: {
caption: "刷新", caption: "刷新",
...@@ -1679,58 +1707,32 @@ export default { ...@@ -1679,58 +1707,32 @@ export default {
tip: "打印", tip: "打印",
}, },
}, },
treeexpviewtoolbar_toolbar: { usr2calendarexpviewcalendarexpbar_toolbar_toolbar: {
tbitem3: { deuiaction1: {
caption: "新建", caption: "刷新",
tip: "新建", tip: "刷新",
}, },
deuiaction2: { deuiaction2: {
caption: "保存", caption: "新建",
tip: "保存", tip: "新建",
}, },
tbitem4: { deuiaction3: {
caption: "编辑", caption: "编辑",
tip: "编辑", tip: "编辑",
}, },
tbitem6: {
caption: "拷贝",
tip: "拷贝",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
}, },
treeexpviewtreeexpbar_toolbar_toolbar: {
deuiaction1: { deuiaction1: {
caption: "导入", caption: "刷新",
tip: "导入", tip: "刷新",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem11: {
caption: "打印",
tip: "打印",
},
tbitem12: {
caption: "-",
tip: "",
}, },
tbitem16: { deuiaction2: {
caption: "其它", caption: "新建",
tip: "其它", tip: "新建",
}, },
tbitem21: { deuiaction3: {
caption: "导出数据模型", caption: "编辑",
tip: "导出数据模型", tip: "编辑",
}, },
}, },
odsp_d20_wfgridviewtoolbar_toolbar: { odsp_d20_wfgridviewtoolbar_toolbar: {
......
...@@ -550,7 +550,7 @@ export default class IBIZOrderDataViewExpViewBase extends Vue { ...@@ -550,7 +550,7 @@ export default class IBIZOrderDataViewExpViewBase extends Vue {
if (_this.loadModel && _this.loadModel instanceof Function) { if (_this.loadModel && _this.loadModel instanceof Function) {
_this.loadModel(); _this.loadModel();
} }
_this.loadQuickGroupModel();
} }
...@@ -734,6 +734,100 @@ export default class IBIZOrderDataViewExpViewBase extends Vue { ...@@ -734,6 +734,100 @@ export default class IBIZOrderDataViewExpViewBase extends Vue {
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof IBIZOrderDataViewExpViewBase
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 快速分组数据对象
*
* @memberof IBIZOrderDataViewExpViewBase
*/
public quickGroupData:any;
/**
* 快速分组是否有抛值
*
* @memberof IBIZOrderDataViewExpViewBase
*/
public isEmitQuickGroupValue:boolean = false;
/**
* 快速分组模型
*
* @memberof IBIZOrderDataViewExpViewBase
*/
public quickGroupModel:Array<any> = [];
/**
* 加载快速分组模型
*
* @memberof IBIZOrderDataViewExpViewBase
*/
public loadQuickGroupModel(){
let quickGroupCodeList:any = {tag:'ORDERSTATE',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 IBIZOrderDataViewExpViewBase
*/
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 IBIZOrderDataViewExpViewBase
*/
public quickGroupValueChange($event:any){
if($event){
this.quickGroupData = $event.data;
if(this.isEmitQuickGroupValue){
this.onSearch($event);
}
}
this.isEmitQuickGroupValue = true;
}
} }
</script> </script>
......
<template> <template>
<div class='view-container detreeexpview ibizorder-tree-exp-view'> <div class='view-container detreeexpview ibizorder-tree-exp-view'>
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizordertreeexpview"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizordertreeexpview"></app-studioaction>
<card class='view-card ' :dis-hover="true" :bordered="false"> <card class='view-card view-no-toolbar' :dis-hover="true" :bordered="false">
<div slot='title' class="header-container"> <div slot='title' class="header-container">
<span class='caption-info'>{{$t(model.srfCaption)}}</span> <span class='caption-info'>{{$t(model.srfCaption)}}</span>
<div class='toolbar-container'> <tooltip :transfer="true" :max-width="600"> <i-button v-show="toolBarModels.tbitem3.visabled" :disabled="toolBarModels.tbitem3.disabled" class=' deepskyblueToolBar' v-loading:i-button @click="toolbar_click({ tag: 'tbitem3' }, $event)"> <i class='fa fa-file-text-o'></i> <span class='caption'>{{$t('entities.ibizorder.treeexpviewtoolbar_toolbar.tbitem3.caption')}}</span> </i-button> <div slot='content'>{{$t('entities.ibizorder.treeexpviewtoolbar_toolbar.tbitem3.tip')}}</div> </tooltip> <tooltip :transfer="true" :max-width="600"> <i-button v-show="toolBarModels.deuiaction2.visabled" :disabled="toolBarModels.deuiaction2.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'deuiaction2' }, $event)"> <i class='fa fa-save'></i> <span class='caption'>{{$t('entities.ibizorder.treeexpviewtoolbar_toolbar.deuiaction2.caption')}}</span> </i-button> <div slot='content'>{{$t('entities.ibizorder.treeexpviewtoolbar_toolbar.deuiaction2.tip')}}</div> </tooltip> <tooltip :transfer="true" :max-width="600"> <i-button v-show="toolBarModels.tbitem4.visabled" :disabled="toolBarModels.tbitem4.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem4' }, $event)"> <span class='caption'>{{$t('entities.ibizorder.treeexpviewtoolbar_toolbar.tbitem4.caption')}}</span> </i-button> <div slot='content'>{{$t('entities.ibizorder.treeexpviewtoolbar_toolbar.tbitem4.tip')}}</div> </tooltip> <tooltip :transfer="true" :max-width="600"> <i-button v-show="toolBarModels.tbitem6.visabled" :disabled="toolBarModels.tbitem6.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem6' }, $event)"> <span class='caption'>{{$t('entities.ibizorder.treeexpviewtoolbar_toolbar.tbitem6.caption')}}</span> </i-button> <div slot='content'>{{$t('entities.ibizorder.treeexpviewtoolbar_toolbar.tbitem6.tip')}}</div> </tooltip> <span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600"> <i-button v-show="toolBarModels.tbitem8.visabled" :disabled="toolBarModels.tbitem8.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem8' }, $event)"> <span class='caption'>{{$t('entities.ibizorder.treeexpviewtoolbar_toolbar.tbitem8.caption')}}</span> </i-button> <div slot='content'>{{$t('entities.ibizorder.treeexpviewtoolbar_toolbar.tbitem8.tip')}}</div> </tooltip> <span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600"> <i-button v-show="toolBarModels.deuiaction1.visabled" :disabled="toolBarModels.deuiaction1.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'deuiaction1' }, $event)"> <i class='fa fa-upload'></i> <span class='caption'>{{$t('entities.ibizorder.treeexpviewtoolbar_toolbar.deuiaction1.caption')}}</span> </i-button> <div slot='content'>{{$t('entities.ibizorder.treeexpviewtoolbar_toolbar.deuiaction1.tip')}}</div> </tooltip> <span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600"> <i-button v-show="toolBarModels.tbitem11.visabled" :disabled="toolBarModels.tbitem11.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem11' }, $event)"> <i class='fa fa-print'></i> <span class='caption'>{{$t('entities.ibizorder.treeexpviewtoolbar_toolbar.tbitem11.caption')}}</span> </i-button> <div slot='content'>{{$t('entities.ibizorder.treeexpviewtoolbar_toolbar.tbitem11.tip')}}</div> </tooltip> <span class='seperator'>|</span> <dropdown v-show="toolBarModels.tbitem16.visabled" trigger='click'> <tooltip :transfer="true" :max-width="600"> <i-button class=''> <i class=''></i> <span class='caption'>{{$t('entities.ibizorder.treeexpviewtoolbar_toolbar.tbitem16.caption')}}</span> <icon type="ios-arrow-down"></icon> </i-button> <div slot='content'>{{$t('entities.ibizorder.treeexpviewtoolbar_toolbar.tbitem16.tip')}}</div> </tooltip> <dropdown-menu slot='list'> <dropdown-item> <tooltip :transfer="true" :max-width="600"> <i-button v-show="toolBarModels.tbitem21.visabled" :disabled="toolBarModels.tbitem21.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem21' }, $event)"> <i class='fa fa-download'></i> <span class='caption'>{{$t('entities.ibizorder.treeexpviewtoolbar_toolbar.tbitem21.caption')}}</span> </i-button> <div slot='content'>{{$t('entities.ibizorder.treeexpviewtoolbar_toolbar.tbitem21.tip')}}</div> </tooltip> </dropdown-item> </dropdown-menu> </dropdown> </div> </div> </div>
<div class='view-top-messages'> <div class='view-top-messages'>
</div> </div>
...@@ -199,7 +199,6 @@ export default class IBIZOrderTreeExpViewBase extends Vue { ...@@ -199,7 +199,6 @@ export default class IBIZOrderTreeExpViewBase extends Vue {
* @memberof IBIZOrderTreeExpViewBase * @memberof IBIZOrderTreeExpViewBase
*/ */
public containerModel: any = { public containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_treeexpbar: { name: 'treeexpbar', type: 'TREEEXPBAR' }, view_treeexpbar: { name: 'treeexpbar', type: 'TREEEXPBAR' },
wflinks: [], wflinks: [],
}; };
...@@ -228,37 +227,6 @@ export default class IBIZOrderTreeExpViewBase extends Vue { ...@@ -228,37 +227,6 @@ export default class IBIZOrderTreeExpViewBase extends Vue {
* @memberof IBIZOrderTreeExpViewBase * @memberof IBIZOrderTreeExpViewBase
*/ */
public viewState: Subject<ViewState> = new Subject(); public viewState: Subject<ViewState> = new Subject();
/**
* 工具栏模型
*
* @type {*}
* @memberof IBIZOrderTreeExpView
*/
public toolBarModels: any = {
tbitem3: { name: 'tbitem3', actiontarget: 'NONE', caption: '新建', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'New', target: '' } },
deuiaction2: { name: 'deuiaction2', actiontarget: 'NONE', caption: '保存', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Save', target: '' } },
tbitem4: { name: 'tbitem4', actiontarget: 'NONE', caption: '编辑', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' } },
tbitem6: { name: 'tbitem6', actiontarget: 'NONE', caption: '拷贝', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' } },
tbitem7: { name: 'tbitem7', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem8: { name: 'tbitem8', actiontarget: 'NONE', caption: '删除', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY' } },
tbitem9: { name: 'tbitem9', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction1: { name: 'deuiaction1', actiontarget: 'NONE', caption: '导入', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ImportExcel', target: 'NONE' } },
tbitem10: { name: 'tbitem10', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem11: { name: 'tbitem11', actiontarget: 'NONE', caption: '打印', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Print', target: 'MULTIKEY' } },
tbitem12: { name: 'tbitem12', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem16: { name: 'tbitem16', caption: '其它', disabled: false, type: 'ITEMS', visabled: true, dataaccaction: '', uiaction: { } },
tbitem21: { name: 'tbitem21', actiontarget: 'NONE', caption: '导出数据模型', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ExportModel', target: '' } },
};
/** /**
...@@ -579,56 +547,6 @@ export default class IBIZOrderTreeExpViewBase extends Vue { ...@@ -579,56 +547,6 @@ export default class IBIZOrderTreeExpViewBase extends Vue {
} }
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZOrderTreeExpViewBase
*/
public toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction2')) {
this.toolbar_deuiaction2_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem6')) {
this.toolbar_tbitem6_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction3')) {
this.toolbar_deuiaction3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem24')) {
this.toolbar_tbitem24_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem25')) {
this.toolbar_tbitem25_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem13')) {
this.toolbar_tbitem13_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem11')) {
this.toolbar_tbitem11_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem21')) {
this.toolbar_tbitem21_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem23')) {
this.toolbar_tbitem23_click(null, '', $event2);
}
}
/** /**
* treeexpbar 部件 selectionchange 事件 * treeexpbar 部件 selectionchange 事件
* *
...@@ -666,357 +584,6 @@ export default class IBIZOrderTreeExpViewBase extends Vue { ...@@ -666,357 +584,6 @@ export default class IBIZOrderTreeExpViewBase extends Vue {
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction2_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem4_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem6_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction3_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleFilter(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem24_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem25_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem8_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Remove(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem13_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ImportExcel(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem11_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem21_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportModel(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem23_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Import(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/** /**
* 打开新建数据视图 * 打开新建数据视图
* *
...@@ -1058,286 +625,6 @@ export default class IBIZOrderTreeExpViewBase extends Vue { ...@@ -1058,286 +625,6 @@ export default class IBIZOrderTreeExpViewBase extends Vue {
} }
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderTreeExpViewBase
*/
public New(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
_this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderTreeExpViewBase
*/
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 IBIZOrderTreeExpViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { ibizorder: args[0].ibizorder })
}
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderTreeExpViewBase
*/
public Copy(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { ibizorder: args[0].ibizorder });
}
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
Object.assign(this.viewparams,{copymode:true});
}
}
/**
* 过滤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderTreeExpViewBase
*/
public ToggleFilter(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.hasOwnProperty('isExpandSearchForm')) {
_this.isExpandSearchForm = !_this.isExpandSearchForm;
}
}
/**
* 行编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderTreeExpViewBase
*/
public ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData.actualIsOpenEdit = !xData.actualIsOpenEdit;
}
/**
* 新建行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderTreeExpViewBase
*/
public NewRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
const data: any = {};
if (_this.hasOwnProperty('newRow') && _this.newRow instanceof Function) {
_this.newRow([{ ...data }], params, $event, xData);
} else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData);
}else{
_this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' });
}
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderTreeExpViewBase
*/
public Remove(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.remove instanceof Function)) {
return ;
}
xData.remove(args);
}
/**
* 导出
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderTreeExpViewBase
*/
public ExportExcel(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.exportExcel instanceof Function) || !$event) {
return ;
}
xData.exportExcel($event.exportparms);
}
/**
* 导入
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async ImportExcel(args: any[], context:any = {} ,params: any={}, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let data: any = {};
let parentContext:any = {};
let parentViewParam:any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'NONE';
if(_this.context){
parentContext = _this.context;
}
if(_this.viewparams){
parentViewParam = _this.viewparams;
}
context = UIActionTool.handleContextParam(actionTarget,_args,parentContext,parentViewParam,context);
data = UIActionTool.handleActionParam(actionTarget,_args,parentContext,parentViewParam,params);
context = Object.assign({},actionContext.context,context);
let parentObj:any = {srfparentdename:srfParentDeName?srfParentDeName:null,srfparentkey:srfParentDeName?context[srfParentDeName.toLowerCase()]:null};
Object.assign(data,parentObj);
Object.assign(context,parentObj);
const openPopupApp = (url: string) => {
window.open(url, '_blank');
return null;
}
const url = `../../ibizutil/uploaddedataview.jsp?srfdeid=`;
openPopupApp(url);
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderTreeExpViewBase
*/
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();
}
/**
* 导出数据模型
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderTreeExpViewBase
*/
public ExportModel(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.$Notice.error({ title: '错误', desc: '导出数据模型未支持' });
}
/**
* 数据导入
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderTreeExpViewBase
*/
public Import(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.importExcel instanceof Function) || !$event) {
return ;
}
xData.importExcel(params);
}
/** /**
* 关闭视图 * 关闭视图
......
...@@ -7,20 +7,5 @@ ...@@ -7,20 +7,5 @@
.ibizorder-tree-exp-view{ .ibizorder-tree-exp-view{
position: relative; position: relative;
} }
.toolbar-container {
button {
margin: 6px 0px 4px 4px;
.caption {
margin-left: 4px;
}
}
.seperator {
color: #dcdee2;
margin: 0 0px 0 4px;
}
}
// this is less
.deepskyblueToolBar {color:white !important;background-color:#108cee !important;}
...@@ -5,6 +5,39 @@ ...@@ -5,6 +5,39 @@
<div><icon type='ios-home-outline'/>{{ $t('app.dataViewExpBar.title') }}</div> <div><icon type='ios-home-outline'/>{{ $t('app.dataViewExpBar.title') }}</div>
</div> </div>
<div class="container-header"> <div class="container-header">
<div class="quick-group-container">
<app-quick-group :items="quickGroupModel" @valuechange="quickGroupValueChange"></app-quick-group>
</div>
<div class='search-container'>
<i-input :search="true"
@on-change="($event) => { this.searchText = $event.target.value; }"
:placeholder="placeholder"
@on-search="onSearch">
</i-input>
</div>
<div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="dataviewexpviewdataviewexpbar_toolbarModels.deuiaction1.visabled" :disabled="dataviewexpviewdataviewexpbar_toolbarModels.deuiaction1.disabled" class='' v-loading:i-button @click="dataviewexpbar_toolbar_click({ tag: 'deuiaction1' }, $event)">
<i class='fa fa-refresh'></i>
<span class='caption'>{{$t('entities.ibizorder.dataviewexpviewdataviewexpbar_toolbar_toolbar.deuiaction1.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizorder.dataviewexpviewdataviewexpbar_toolbar_toolbar.deuiaction1.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="dataviewexpviewdataviewexpbar_toolbarModels.deuiaction2.visabled" :disabled="dataviewexpviewdataviewexpbar_toolbarModels.deuiaction2.disabled" class='' v-loading:i-button @click="dataviewexpbar_toolbar_click({ tag: 'deuiaction2' }, $event)">
<i class='fa fa-file-text-o'></i>
<span class='caption'>{{$t('entities.ibizorder.dataviewexpviewdataviewexpbar_toolbar_toolbar.deuiaction2.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizorder.dataviewexpviewdataviewexpbar_toolbar_toolbar.deuiaction2.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="dataviewexpviewdataviewexpbar_toolbarModels.deuiaction3.visabled" :disabled="dataviewexpviewdataviewexpbar_toolbarModels.deuiaction3.disabled" class='' v-loading:i-button @click="dataviewexpbar_toolbar_click({ tag: 'deuiaction3' }, $event)">
<i class='fa fa-edit'></i>
<span class='caption'>{{$t('entities.ibizorder.dataviewexpviewdataviewexpbar_toolbar_toolbar.deuiaction3.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizorder.dataviewexpviewdataviewexpbar_toolbar_toolbar.deuiaction3.tip')}}</div>
</tooltip>
</div>
</div> </div>
<div class='dataview-exp-bar-content'> <div class='dataview-exp-bar-content'>
<view_dataviewexpbar_dataview <view_dataviewexpbar_dataview
...@@ -141,6 +174,25 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co ...@@ -141,6 +174,25 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co
*/ */
public appEntityService: IBIZOrderService = new IBIZOrderService({ $store: this.$store }); public appEntityService: IBIZOrderService = new IBIZOrderService({ $store: this.$store });
/**
* dataviewexpbar_toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof DataViewExpViewdataviewexpbarBase
*/
public dataviewexpbar_toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'deuiaction1')) {
this.dataviewexpbar_toolbar_deuiaction1_click(null, 'dataviewexpbar_toolbar', $event2);
}
if (Object.is($event.tag, 'deuiaction2')) {
this.dataviewexpbar_toolbar_deuiaction2_click(null, 'dataviewexpbar_toolbar', $event2);
}
if (Object.is($event.tag, 'deuiaction3')) {
this.dataviewexpbar_toolbar_deuiaction3_click(null, 'dataviewexpbar_toolbar', $event2);
}
}
/** /**
* dataviewexpbar_dataview 部件 selectionchange 事件 * dataviewexpbar_dataview 部件 selectionchange 事件
* *
...@@ -164,6 +216,155 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co ...@@ -164,6 +216,155 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co
} }
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public dataviewexpbar_toolbar_deuiaction1_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.$refs.dataviewexpbar_dataview;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Refresh(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public dataviewexpbar_toolbar_deuiaction2_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.$refs.dataviewexpbar_dataview;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public dataviewexpbar_toolbar_deuiaction3_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.$refs.dataviewexpbar_dataview;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 刷新
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderDataViewExpViewBase
*/
public Refresh(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
} else if (_this.refresh && _this.refresh instanceof Function) {
_this.refresh(args);
}
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderDataViewExpViewBase
*/
public New(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
_this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderDataViewExpViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { ibizorder: args[0].ibizorder })
}
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/** /**
* 转化数据 * 转化数据
...@@ -340,6 +541,111 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co ...@@ -340,6 +541,111 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co
* @memberof DataViewExpViewdataviewexpbarBase * @memberof DataViewExpViewdataviewexpbarBase
*/ */
public navigateParams:any = null; public navigateParams:any = null;
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof IBIZOrderDataViewExpViewBase
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 快速分组数据对象
*
* @memberof IBIZOrderDataViewExpViewBase
*/
public quickGroupData:any;
/**
* 快速分组是否有抛值
*
* @memberof IBIZOrderDataViewExpViewBase
*/
public isEmitQuickGroupValue:boolean = false;
/**
* 快速分组模型
*
* @memberof IBIZOrderDataViewExpViewBase
*/
public quickGroupModel:Array<any> = [];
/**
* 加载快速分组模型
*
* @memberof IBIZOrderDataViewExpViewBase
*/
public loadQuickGroupModel(){
let quickGroupCodeList:any = {tag:'ORDERSTATE',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 IBIZOrderDataViewExpViewBase
*/
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 IBIZOrderDataViewExpViewBase
*/
public quickGroupValueChange($event:any){
if($event && $event.data){
if(this.quickGroupData) {
for(let key in this.quickGroupData) {
delete this.viewparams[key];
}
}
this.quickGroupData = $event.data;
Object.assign(this.viewparams, $event.data);
}else{
if(this.quickGroupData) {
for(let key in this.quickGroupData) {
delete this.viewparams[key];
}
}
}
if(this.isEmitQuickGroupValue){
this.onSearch();
}
this.isEmitQuickGroupValue = true;
}
/** /**
* 显示处理提示 * 显示处理提示
...@@ -350,6 +656,22 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co ...@@ -350,6 +656,22 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co
@Prop({ default: true }) public showBusyIndicator!: boolean; @Prop({ default: true }) public showBusyIndicator!: boolean;
/**
* 工具栏模型
*
* @type {*}
* @memberof IBIZOrderDataViewExpView
*/
public dataviewexpviewdataviewexpbar_toolbarModels: any = {
deuiaction1: { name: 'deuiaction1', actiontarget: 'NONE', caption: '刷新', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Refresh', target: '' } },
deuiaction2: { name: 'deuiaction2', actiontarget: 'NONE', caption: '新建', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'New', target: '' } },
deuiaction3: { name: 'deuiaction3', actiontarget: 'NONE', caption: '编辑', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' } },
};
/** /**
* 获取多项数据 * 获取多项数据
* *
...@@ -404,6 +726,7 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co ...@@ -404,6 +726,7 @@ export default class DataViewExpViewdataviewexpbarBase extends Vue implements Co
* @memberof DataViewExpViewdataviewexpbarBase * @memberof DataViewExpViewdataviewexpbarBase
*/ */
public afterCreated(){ public afterCreated(){
this.loadQuickGroupModel();
if (this.viewState) { if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => { this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) { if (!Object.is(tag, this.name)) {
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
} }
} }
.dataview-exp-bar-content { .dataview-exp-bar-content {
height: calc(100% - 40px); height: calc(100% - 88px);
overflow: auto; overflow: auto;
padding: 16px 0; padding: 16px 0;
margin-bottom: 10px; margin-bottom: 10px;
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
} }
} }
.dataview-exp-bar-content { .dataview-exp-bar-content {
height: calc(100% - 40px); height: calc(100% - 88px);
overflow: auto; overflow: auto;
margin-bottom: 10px; margin-bottom: 10px;
} }
......
...@@ -5,6 +5,36 @@ ...@@ -5,6 +5,36 @@
{{$t('app.listExpBar.title')}} {{$t('app.listExpBar.title')}}
</div> </div>
<div class="container-header"> <div class="container-header">
<div class='search-container'>
<i-input :search="true"
@on-change="($event) => { this.searchText = $event.target.value; }"
:placeholder="placeholder"
@on-search="onSearch">
</i-input>
</div>
<div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="listexpviewlistexpbar_toolbarModels.deuiaction1.visabled" :disabled="listexpviewlistexpbar_toolbarModels.deuiaction1.disabled" class='' v-loading:i-button @click="listexpbar_toolbar_click({ tag: 'deuiaction1' }, $event)">
<i class='fa fa-refresh'></i>
<span class='caption'>{{$t('entities.ibizorder.listexpviewlistexpbar_toolbar_toolbar.deuiaction1.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizorder.listexpviewlistexpbar_toolbar_toolbar.deuiaction1.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="listexpviewlistexpbar_toolbarModels.deuiaction2.visabled" :disabled="listexpviewlistexpbar_toolbarModels.deuiaction2.disabled" class='' v-loading:i-button @click="listexpbar_toolbar_click({ tag: 'deuiaction2' }, $event)">
<i class='fa fa-file-text-o'></i>
<span class='caption'>{{$t('entities.ibizorder.listexpviewlistexpbar_toolbar_toolbar.deuiaction2.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizorder.listexpviewlistexpbar_toolbar_toolbar.deuiaction2.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="listexpviewlistexpbar_toolbarModels.deuiaction3.visabled" :disabled="listexpviewlistexpbar_toolbarModels.deuiaction3.disabled" class='' v-loading:i-button @click="listexpbar_toolbar_click({ tag: 'deuiaction3' }, $event)">
<i class='fa fa-edit'></i>
<span class='caption'>{{$t('entities.ibizorder.listexpviewlistexpbar_toolbar_toolbar.deuiaction3.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizorder.listexpviewlistexpbar_toolbar_toolbar.deuiaction3.tip')}}</div>
</tooltip>
</div>
</div> </div>
<div class='list-exp-bar-content'> <div class='list-exp-bar-content'>
<view_listexpbar_list <view_listexpbar_list
...@@ -161,8 +191,176 @@ export default class ListExpViewlistexpbarBase extends Vue implements ControlInt ...@@ -161,8 +191,176 @@ export default class ListExpViewlistexpbarBase extends Vue implements ControlInt
this.listexpbar_load($event, 'listexpbar_list', $event2); this.listexpbar_load($event, 'listexpbar_list', $event2);
} }
/**
* listexpbar_toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof ListExpViewlistexpbarBase
*/
public listexpbar_toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'deuiaction1')) {
this.listexpbar_toolbar_deuiaction1_click(null, 'listexpbar_toolbar', $event2);
}
if (Object.is($event.tag, 'deuiaction2')) {
this.listexpbar_toolbar_deuiaction2_click(null, 'listexpbar_toolbar', $event2);
}
if (Object.is($event.tag, 'deuiaction3')) {
this.listexpbar_toolbar_deuiaction3_click(null, 'listexpbar_toolbar', $event2);
}
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public listexpbar_toolbar_deuiaction1_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.$refs.listexpbar_list;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Refresh(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public listexpbar_toolbar_deuiaction2_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.$refs.listexpbar_list;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public listexpbar_toolbar_deuiaction3_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.$refs.listexpbar_list;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 刷新
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderListExpViewBase
*/
public Refresh(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
} else if (_this.refresh && _this.refresh instanceof Function) {
_this.refresh(args);
}
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderListExpViewBase
*/
public New(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
_this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderListExpViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { ibizorder: args[0].ibizorder })
}
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/** /**
* 转化数据 * 转化数据
* *
...@@ -348,6 +546,22 @@ export default class ListExpViewlistexpbarBase extends Vue implements ControlInt ...@@ -348,6 +546,22 @@ export default class ListExpViewlistexpbarBase extends Vue implements ControlInt
@Prop({ default: true }) public showBusyIndicator!: boolean; @Prop({ default: true }) public showBusyIndicator!: boolean;
/**
* 工具栏模型
*
* @type {*}
* @memberof IBIZOrderListExpView
*/
public listexpviewlistexpbar_toolbarModels: any = {
deuiaction1: { name: 'deuiaction1', actiontarget: 'NONE', caption: '刷新', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Refresh', target: '' } },
deuiaction2: { name: 'deuiaction2', actiontarget: 'NONE', caption: '新建', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'New', target: '' } },
deuiaction3: { name: 'deuiaction3', actiontarget: 'NONE', caption: '编辑', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' } },
};
/** /**
* 获取多项数据 * 获取多项数据
* *
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
} }
} }
.list-exp-bar-content { .list-exp-bar-content {
height: calc(100% - 40px); height: calc(100% - 88px);
overflow: auto; overflow: auto;
padding: 16px 0; padding: 16px 0;
margin-bottom: 10px; margin-bottom: 10px;
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
} }
} }
.list-exp-bar-content { .list-exp-bar-content {
height: calc(100% - 40px); height: calc(100% - 88px);
overflow: auto; overflow: auto;
margin-bottom: 10px; margin-bottom: 10px;
} }
......
...@@ -3,6 +3,36 @@ ...@@ -3,6 +3,36 @@
<div slot='left'> <div slot='left'>
<div class='tree-exp-bar-header'> <div class='tree-exp-bar-header'>
<div class="tree-exp-bar-title">{{ $t('app.treeExpBar.title') }}</div> <div class="tree-exp-bar-title">{{ $t('app.treeExpBar.title') }}</div>
<div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="treeexpviewtreeexpbar_toolbarModels.deuiaction1.visabled" :disabled="treeexpviewtreeexpbar_toolbarModels.deuiaction1.disabled" class='' v-loading:i-button @click="treeexpbar_toolbar_click({ tag: 'deuiaction1' }, $event)">
<i class='fa fa-refresh'></i>
<span class='caption'>{{$t('entities.ibizorder.treeexpviewtreeexpbar_toolbar_toolbar.deuiaction1.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizorder.treeexpviewtreeexpbar_toolbar_toolbar.deuiaction1.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="treeexpviewtreeexpbar_toolbarModels.deuiaction2.visabled" :disabled="treeexpviewtreeexpbar_toolbarModels.deuiaction2.disabled" class='' v-loading:i-button @click="treeexpbar_toolbar_click({ tag: 'deuiaction2' }, $event)">
<i class='fa fa-file-text-o'></i>
<span class='caption'>{{$t('entities.ibizorder.treeexpviewtreeexpbar_toolbar_toolbar.deuiaction2.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizorder.treeexpviewtreeexpbar_toolbar_toolbar.deuiaction2.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="treeexpviewtreeexpbar_toolbarModels.deuiaction3.visabled" :disabled="treeexpviewtreeexpbar_toolbarModels.deuiaction3.disabled" class='' v-loading:i-button @click="treeexpbar_toolbar_click({ tag: 'deuiaction3' }, $event)">
<i class='fa fa-edit'></i>
<span class='caption'>{{$t('entities.ibizorder.treeexpviewtreeexpbar_toolbar_toolbar.deuiaction3.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizorder.treeexpviewtreeexpbar_toolbar_toolbar.deuiaction3.tip')}}</div>
</tooltip>
</div>
</div>
<div class='search-content'>
<i-input :search="true"
@on-change="($event) => { this.srfnodefilter = $event.target.value; }"
:placeholder="placeholder"
@on-search="onSearch">
</i-input>
</div> </div>
<div class='tree-exp-content'> <div class='tree-exp-content'>
<view_treeexpbar_tree <view_treeexpbar_tree
...@@ -138,6 +168,25 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt ...@@ -138,6 +168,25 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt
*/ */
public appEntityService: IBIZOrderService = new IBIZOrderService({ $store: this.$store }); public appEntityService: IBIZOrderService = new IBIZOrderService({ $store: this.$store });
/**
* treeexpbar_toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof TreeExpViewtreeexpbarBase
*/
public treeexpbar_toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'deuiaction1')) {
this.treeexpbar_toolbar_deuiaction1_click(null, 'treeexpbar_toolbar', $event2);
}
if (Object.is($event.tag, 'deuiaction2')) {
this.treeexpbar_toolbar_deuiaction2_click(null, 'treeexpbar_toolbar', $event2);
}
if (Object.is($event.tag, 'deuiaction3')) {
this.treeexpbar_toolbar_deuiaction3_click(null, 'treeexpbar_toolbar', $event2);
}
}
/** /**
* treeexpbar_tree 部件 selectionchange 事件 * treeexpbar_tree 部件 selectionchange 事件
* *
...@@ -161,6 +210,155 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt ...@@ -161,6 +210,155 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt
} }
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public treeexpbar_toolbar_deuiaction1_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.$refs.treeexpbar_tree;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Refresh(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public treeexpbar_toolbar_deuiaction2_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.$refs.treeexpbar_tree;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public treeexpbar_toolbar_deuiaction3_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.$refs.treeexpbar_tree;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 刷新
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderTreeExpViewBase
*/
public Refresh(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
} else if (_this.refresh && _this.refresh instanceof Function) {
_this.refresh(args);
}
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderTreeExpViewBase
*/
public New(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
_this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderTreeExpViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { ibizorder: args[0].ibizorder })
}
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/** /**
* 转化数据 * 转化数据
...@@ -606,6 +804,22 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt ...@@ -606,6 +804,22 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt
} }
} }
/**
* 工具栏模型
*
* @type {*}
* @memberof IBIZOrderTreeExpView
*/
public treeexpviewtreeexpbar_toolbarModels: any = {
deuiaction1: { name: 'deuiaction1', actiontarget: 'NONE', caption: '刷新', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Refresh', target: '' } },
deuiaction2: { name: 'deuiaction2', actiontarget: 'NONE', caption: '新建', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'New', target: '' } },
deuiaction3: { name: 'deuiaction3', actiontarget: 'NONE', caption: '编辑', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' } },
};
} }
</script> </script>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
padding: 10px 5px 10px 5px; padding: 10px 5px 10px 5px;
} }
.tree-exp-content { .tree-exp-content {
height: calc(100% - 40px); height: calc(100% - 88px);
overflow: auto; overflow: auto;
padding: 16px 0; padding: 16px 0;
margin-bottom: 10px; margin-bottom: 10px;
......
...@@ -5,6 +5,36 @@ ...@@ -5,6 +5,36 @@
<div><icon type='ios-home-outline'/>{{ $t('app.calendarExpBar.title') }}</div> <div><icon type='ios-home-outline'/>{{ $t('app.calendarExpBar.title') }}</div>
</div> </div>
<div class="container-header"> <div class="container-header">
<div class='search-container'>
<i-input :search="true"
@on-change="($event) => { this.searchText = $event.target.value; }"
:placeholder="placeholder"
@on-search="onSearch">
</i-input>
</div>
<div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="usr2calendarexpviewcalendarexpbar_toolbarModels.deuiaction1.visabled" :disabled="usr2calendarexpviewcalendarexpbar_toolbarModels.deuiaction1.disabled" class='' v-loading:i-button @click="calendarexpbar_toolbar_click({ tag: 'deuiaction1' }, $event)">
<i class='fa fa-refresh'></i>
<span class='caption'>{{$t('entities.ibizorder.usr2calendarexpviewcalendarexpbar_toolbar_toolbar.deuiaction1.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizorder.usr2calendarexpviewcalendarexpbar_toolbar_toolbar.deuiaction1.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="usr2calendarexpviewcalendarexpbar_toolbarModels.deuiaction2.visabled" :disabled="usr2calendarexpviewcalendarexpbar_toolbarModels.deuiaction2.disabled" class='' v-loading:i-button @click="calendarexpbar_toolbar_click({ tag: 'deuiaction2' }, $event)">
<i class='fa fa-file-text-o'></i>
<span class='caption'>{{$t('entities.ibizorder.usr2calendarexpviewcalendarexpbar_toolbar_toolbar.deuiaction2.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizorder.usr2calendarexpviewcalendarexpbar_toolbar_toolbar.deuiaction2.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="usr2calendarexpviewcalendarexpbar_toolbarModels.deuiaction3.visabled" :disabled="usr2calendarexpviewcalendarexpbar_toolbarModels.deuiaction3.disabled" class='' v-loading:i-button @click="calendarexpbar_toolbar_click({ tag: 'deuiaction3' }, $event)">
<i class='fa fa-edit'></i>
<span class='caption'>{{$t('entities.ibizorder.usr2calendarexpviewcalendarexpbar_toolbar_toolbar.deuiaction3.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizorder.usr2calendarexpviewcalendarexpbar_toolbar_toolbar.deuiaction3.tip')}}</div>
</tooltip>
</div>
</div> </div>
<div class='calendar-exp-bar-content'> <div class='calendar-exp-bar-content'>
<view_calendarexpbar_calendar <view_calendarexpbar_calendar
...@@ -134,6 +164,25 @@ export default class Usr2CalendarExpViewcalendarexpbarBase extends Vue implement ...@@ -134,6 +164,25 @@ export default class Usr2CalendarExpViewcalendarexpbarBase extends Vue implement
*/ */
public appEntityService: IBIZOrderService = new IBIZOrderService({ $store: this.$store }); public appEntityService: IBIZOrderService = new IBIZOrderService({ $store: this.$store });
/**
* calendarexpbar_toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof Usr2CalendarExpViewcalendarexpbarBase
*/
public calendarexpbar_toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'deuiaction1')) {
this.calendarexpbar_toolbar_deuiaction1_click(null, 'calendarexpbar_toolbar', $event2);
}
if (Object.is($event.tag, 'deuiaction2')) {
this.calendarexpbar_toolbar_deuiaction2_click(null, 'calendarexpbar_toolbar', $event2);
}
if (Object.is($event.tag, 'deuiaction3')) {
this.calendarexpbar_toolbar_deuiaction3_click(null, 'calendarexpbar_toolbar', $event2);
}
}
/** /**
* calendarexpbar_calendar 部件 selectionchange 事件 * calendarexpbar_calendar 部件 selectionchange 事件
* *
...@@ -157,6 +206,155 @@ export default class Usr2CalendarExpViewcalendarexpbarBase extends Vue implement ...@@ -157,6 +206,155 @@ export default class Usr2CalendarExpViewcalendarexpbarBase extends Vue implement
} }
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public calendarexpbar_toolbar_deuiaction1_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.$refs.calendarexpbar_calendar;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Refresh(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public calendarexpbar_toolbar_deuiaction2_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.$refs.calendarexpbar_calendar;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public calendarexpbar_toolbar_deuiaction3_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.$refs.calendarexpbar_calendar;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 刷新
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderUsr2CalendarExpViewBase
*/
public Refresh(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
} else if (_this.refresh && _this.refresh instanceof Function) {
_this.refresh(args);
}
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderUsr2CalendarExpViewBase
*/
public New(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
_this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderUsr2CalendarExpViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { ibizorder: args[0].ibizorder })
}
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/** /**
* 转化数据 * 转化数据
...@@ -337,6 +535,22 @@ export default class Usr2CalendarExpViewcalendarexpbarBase extends Vue implement ...@@ -337,6 +535,22 @@ export default class Usr2CalendarExpViewcalendarexpbarBase extends Vue implement
@Prop({ default: true }) public showBusyIndicator!: boolean; @Prop({ default: true }) public showBusyIndicator!: boolean;
/**
* 工具栏模型
*
* @type {*}
* @memberof IBIZOrderUsr2CalendarExpView
*/
public usr2calendarexpviewcalendarexpbar_toolbarModels: any = {
deuiaction1: { name: 'deuiaction1', actiontarget: 'NONE', caption: '刷新', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Refresh', target: '' } },
deuiaction2: { name: 'deuiaction2', actiontarget: 'NONE', caption: '新建', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'New', target: '' } },
deuiaction3: { name: 'deuiaction3', actiontarget: 'NONE', caption: '编辑', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' } },
};
/** /**
* 获取多项数据 * 获取多项数据
* *
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
} }
} }
.calendar-exp-bar-content { .calendar-exp-bar-content {
height: calc(100% - 40px); height: calc(100% - 88px);
overflow: auto; overflow: auto;
padding: 16px 0; padding: 16px 0;
margin-bottom: 10px; margin-bottom: 10px;
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
} }
} }
.calendar-exp-bar-content { .calendar-exp-bar-content {
height: calc(100% - 40px); height: calc(100% - 88px);
overflow: auto; overflow: auto;
margin-bottom: 10px; margin-bottom: 10px;
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册