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

ibiz4j 发布系统代码

上级 5ddb5891
...@@ -127,69 +127,13 @@ export default { ...@@ -127,69 +127,13 @@ export default {
}, },
}, },
editviewtoolbar_toolbar: { editviewtoolbar_toolbar: {
tbitem3: { tbitem1: {
caption: "Save",
tip: "Save",
},
tbitem4: {
caption: "Save And New",
tip: "Save And New",
},
tbitem5: {
caption: "Save And Close", caption: "Save And Close",
tip: "Save And Close Window", tip: "Save And Close Window",
}, },
tbitem6: { tbitem2: {
caption: "-", caption: "关闭",
tip: "", tip: "关闭",
},
tbitem7: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "New",
tip: "New",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem23: {
caption: "第一个记录",
tip: "第一个记录",
},
tbitem24: {
caption: "上一个记录",
tip: "上一个记录",
},
tbitem25: {
caption: "下一个记录",
tip: "下一个记录",
},
tbitem26: {
caption: "最后一个记录",
tip: "最后一个记录",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem22: {
caption: "Help",
tip: "Help",
}, },
}, },
}; };
\ No newline at end of file
...@@ -126,69 +126,13 @@ export default { ...@@ -126,69 +126,13 @@ export default {
}, },
}, },
editviewtoolbar_toolbar: { editviewtoolbar_toolbar: {
tbitem3: { tbitem1: {
caption: "保存",
tip: "保存",
},
tbitem4: {
caption: "保存并新建",
tip: "保存并新建",
},
tbitem5: {
caption: "保存并关闭", caption: "保存并关闭",
tip: "保存并关闭", tip: "保存并关闭",
}, },
tbitem6: { tbitem2: {
caption: "-", caption: "关闭",
tip: "", tip: "关闭",
},
tbitem7: {
caption: "删除并关闭",
tip: "删除并关闭",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "新建",
tip: "新建",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "拷贝",
tip: "拷贝",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem23: {
caption: "第一个记录",
tip: "第一个记录",
},
tbitem24: {
caption: "上一个记录",
tip: "上一个记录",
},
tbitem25: {
caption: "下一个记录",
tip: "下一个记录",
},
tbitem26: {
caption: "最后一个记录",
tip: "最后一个记录",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem22: {
caption: "帮助",
tip: "帮助",
}, },
}, },
}; };
\ No newline at end of file
...@@ -101,6 +101,22 @@ export default { ...@@ -101,6 +101,22 @@ export default {
caption: "-", caption: "-",
tip: "", tip: "",
}, },
tbitem24: {
caption: "行编辑",
tip: "行编辑",
},
tbitem25: {
caption: "新建行",
tip: "新建行",
},
deuiaction1: {
caption: "保存行",
tip: "保存行",
},
tbitem26: {
caption: "-",
tip: "",
},
tbitem8: { tbitem8: {
caption: "Remove", caption: "Remove",
tip: "Remove {0}", tip: "Remove {0}",
...@@ -117,95 +133,19 @@ export default { ...@@ -117,95 +133,19 @@ export default {
caption: "-", caption: "-",
tip: "", tip: "",
}, },
tbitem16: {
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: "Export Data Model",
tip: "导出数据模型",
},
tbitem23: {
caption: "数据导入",
tip: "数据导入",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
tbitem18: { tbitem18: {
caption: "Help", caption: "Help",
tip: "Help", tip: "Help",
}, },
}, },
editviewtoolbar_toolbar: { editviewtoolbar_toolbar: {
tbitem3: { tbitem1: {
caption: "Save",
tip: "Save",
},
tbitem4: {
caption: "Save And New",
tip: "Save And New",
},
tbitem5: {
caption: "Save And Close", caption: "Save And Close",
tip: "Save And Close Window", tip: "Save And Close Window",
}, },
tbitem6: { tbitem2: {
caption: "-", caption: "关闭",
tip: "", tip: "关闭",
},
tbitem7: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "New",
tip: "New",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem23: {
caption: "第一个记录",
tip: "第一个记录",
},
tbitem24: {
caption: "上一个记录",
tip: "上一个记录",
},
tbitem25: {
caption: "下一个记录",
tip: "下一个记录",
},
tbitem26: {
caption: "最后一个记录",
tip: "最后一个记录",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem22: {
caption: "Help",
tip: "Help",
}, },
}, },
}; };
\ No newline at end of file
...@@ -100,6 +100,22 @@ export default { ...@@ -100,6 +100,22 @@ export default {
caption: "-", caption: "-",
tip: "", tip: "",
}, },
tbitem24: {
caption: "行编辑",
tip: "行编辑",
},
tbitem25: {
caption: "新建行",
tip: "新建行",
},
deuiaction1: {
caption: "保存行",
tip: "保存行",
},
tbitem26: {
caption: "-",
tip: "",
},
tbitem8: { tbitem8: {
caption: "删除", caption: "删除",
tip: "删除", tip: "删除",
...@@ -116,95 +132,19 @@ export default { ...@@ -116,95 +132,19 @@ export default {
caption: "-", caption: "-",
tip: "", tip: "",
}, },
tbitem16: {
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: "导出数据模型",
tip: "导出数据模型",
},
tbitem23: {
caption: "数据导入",
tip: "数据导入",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
tbitem18: { tbitem18: {
caption: "帮助", caption: "帮助",
tip: "帮助", tip: "帮助",
}, },
}, },
editviewtoolbar_toolbar: { editviewtoolbar_toolbar: {
tbitem3: { tbitem1: {
caption: "保存",
tip: "保存",
},
tbitem4: {
caption: "保存并新建",
tip: "保存并新建",
},
tbitem5: {
caption: "保存并关闭", caption: "保存并关闭",
tip: "保存并关闭", tip: "保存并关闭",
}, },
tbitem6: { tbitem2: {
caption: "-", caption: "关闭",
tip: "", tip: "关闭",
},
tbitem7: {
caption: "删除并关闭",
tip: "删除并关闭",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "新建",
tip: "新建",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "拷贝",
tip: "拷贝",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem23: {
caption: "第一个记录",
tip: "第一个记录",
},
tbitem24: {
caption: "上一个记录",
tip: "上一个记录",
},
tbitem25: {
caption: "下一个记录",
tip: "下一个记录",
},
tbitem26: {
caption: "最后一个记录",
tip: "最后一个记录",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem22: {
caption: "帮助",
tip: "帮助",
}, },
}, },
}; };
\ No newline at end of file
...@@ -7,81 +7,18 @@ ...@@ -7,81 +7,18 @@
<span class='caption-info'>{{$t(model.srfTitle)}}</span> <span class='caption-info'>{{$t(model.srfTitle)}}</span>
<div class='toolbar-container'> <div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600"> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem3.visabled" :disabled="toolBarModels.tbitem3.disabled" class='' @click="toolbar_click({ tag: 'tbitem3' }, $event)"> <i-button v-show="toolBarModels.tbitem1.visabled" :disabled="toolBarModels.tbitem1.disabled" class='' @click="toolbar_click({ tag: 'tbitem1' }, $event)">
<i class='fa fa-save'></i>
<span class='caption'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem3.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem3.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem4.visabled" :disabled="toolBarModels.tbitem4.disabled" class='' @click="toolbar_click({ tag: 'tbitem4' }, $event)">
<i class='sx-tb-saveandnew'></i>
<span class='caption'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem4.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem4.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem5.visabled" :disabled="toolBarModels.tbitem5.disabled" class='' @click="toolbar_click({ tag: 'tbitem5' }, $event)">
<i class='sx-tb-saveandclose'></i> <i class='sx-tb-saveandclose'></i>
<span class='caption'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem5.caption')}}</span> <span class='caption'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem1.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem5.tip')}}</div>
</tooltip>
<span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem7.visabled" :disabled="toolBarModels.tbitem7.disabled" class='' @click="toolbar_click({ tag: 'tbitem7' }, $event)">
<i class='fa fa-remove'></i>
<span class='caption'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem7.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem7.tip')}}</div>
</tooltip>
<span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem12.visabled" :disabled="toolBarModels.tbitem12.disabled" class='' @click="toolbar_click({ tag: 'tbitem12' }, $event)">
<i class='fa fa-file-text-o'></i>
<span class='caption'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem12.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem12.tip')}}</div>
</tooltip>
<span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem14.visabled" :disabled="toolBarModels.tbitem14.disabled" class='' @click="toolbar_click({ tag: 'tbitem14' }, $event)">
<i class='fa fa-copy'></i>
<span class='caption'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem14.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem14.tip')}}</div>
</tooltip>
<span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem23.visabled" :disabled="toolBarModels.tbitem23.disabled" class='' @click="toolbar_click({ tag: 'tbitem23' }, $event)">
<i class='fa fa-fast-backward'></i>
</i-button>
<div slot='content'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem23.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem24.visabled" :disabled="toolBarModels.tbitem24.disabled" class='' @click="toolbar_click({ tag: 'tbitem24' }, $event)">
<i class='fa fa-step-backward'></i>
</i-button>
<div slot='content'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem24.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem25.visabled" :disabled="toolBarModels.tbitem25.disabled" class='' @click="toolbar_click({ tag: 'tbitem25' }, $event)">
<i class='fa fa-step-forward'></i>
</i-button> </i-button>
<div slot='content'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem25.tip')}}</div> <div slot='content'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem1.tip')}}</div>
</tooltip> </tooltip>
<tooltip :transfer="true" :max-width="600"> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem26.visabled" :disabled="toolBarModels.tbitem26.disabled" class='' @click="toolbar_click({ tag: 'tbitem26' }, $event)"> <i-button v-show="toolBarModels.tbitem2.visabled" :disabled="toolBarModels.tbitem2.disabled" class='' @click="toolbar_click({ tag: 'tbitem2' }, $event)">
<i class='fa fa-fast-forward'></i> <i class='fa fa-sign-out'></i>
<span class='caption'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem2.caption')}}</span>
</i-button> </i-button>
<div slot='content'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem26.tip')}}</div> <div slot='content'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem2.tip')}}</div>
</tooltip>
<span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem22.visabled" :disabled="toolBarModels.tbitem22.disabled" class='' @click="toolbar_click({ tag: 'tbitem22' }, $event)">
<i class='fa fa-question'></i>
<span class='caption'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem22.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.dictcatalog.editviewtoolbar_toolbar.tbitem22.tip')}}</div>
</tooltip> </tooltip>
</div> </div>
</div> </div>
...@@ -315,32 +252,9 @@ export default class DictCatalogEditViewBase extends Vue { ...@@ -315,32 +252,9 @@ export default class DictCatalogEditViewBase extends Vue {
* @memberof DictCatalogEditView * @memberof DictCatalogEditView
*/ */
public toolBarModels: any = { public toolBarModels: any = {
tbitem3: { name: 'tbitem3', caption: '保存', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Save', target: '' } }, tbitem1: { name: 'tbitem1', caption: '保存并关闭', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' } },
tbitem4: { name: 'tbitem4', caption: '保存并新建', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndNew', target: '' } },
tbitem5: { name: 'tbitem5', caption: '保存并关闭', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' } },
tbitem6: { name: 'tbitem6', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem7: { name: 'tbitem7', caption: '删除并关闭', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' } },
tbitem8: { name: 'tbitem8', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem12: { name: 'tbitem12', caption: '新建', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'New', target: '' } },
tbitem13: { name: 'tbitem13', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem14: { name: 'tbitem14', caption: '拷贝', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' } },
tbitem16: { name: 'tbitem16', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem23: { name: 'tbitem23', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'FirstRecord', target: 'SINGLEKEY' } },
tbitem24: { name: 'tbitem24', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'PrevRecord', target: 'SINGLEKEY' } }, tbitem2: { name: 'tbitem2', caption: '关闭', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Exit', target: '' } },
tbitem25: { name: 'tbitem25', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'NextRecord', target: 'SINGLEKEY' } },
tbitem26: { name: 'tbitem26', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'LastRecord', target: 'SINGLEKEY' } },
tbitem21: { name: 'tbitem21', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem22: { name: 'tbitem22', caption: '帮助', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Help', target: '' } },
}; };
...@@ -639,47 +553,11 @@ export default class DictCatalogEditViewBase extends Vue { ...@@ -639,47 +553,11 @@ export default class DictCatalogEditViewBase extends Vue {
* @memberof DictCatalogEditViewBase * @memberof DictCatalogEditViewBase
*/ */
public toolbar_click($event: any, $event2?: any) { public toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'tbitem3')) { if (Object.is($event.tag, 'tbitem1')) {
this.toolbar_tbitem3_click(null, '', $event2); this.toolbar_tbitem1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem7')) {
this.toolbar_tbitem7_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem9')) {
this.toolbar_tbitem9_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem10')) {
this.toolbar_tbitem10_click(null, '', $event2);
} }
if (Object.is($event.tag, 'tbitem12')) { if (Object.is($event.tag, 'tbitem2')) {
this.toolbar_tbitem12_click(null, '', $event2); this.toolbar_tbitem2_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem14')) {
this.toolbar_tbitem14_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem15')) {
this.toolbar_tbitem15_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem23')) {
this.toolbar_tbitem23_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, 'tbitem26')) {
this.toolbar_tbitem26_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem22')) {
this.toolbar_tbitem22_click(null, '', $event2);
} }
} }
...@@ -729,63 +607,7 @@ export default class DictCatalogEditViewBase extends Vue { ...@@ -729,63 +607,7 @@ export default class DictCatalogEditViewBase extends Vue {
* @param {*} [$event] * @param {*} [$event]
* @memberof * @memberof
*/ */
public toolbar_tbitem3_click(params: any = {}, tag?: any, $event?: any) { public toolbar_tbitem1_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"DictCatalog");
}
/**
* 逻辑事件
*
* @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 = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndNew(datas, contextJO,paramJO, $event, xData,this,"DictCatalog");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem5_click(params: any = {}, tag?: any, $event?: any) {
// 参数 // 参数
// 取数 // 取数
let datas: any[] = []; let datas: any[] = [];
...@@ -813,63 +635,7 @@ export default class DictCatalogEditViewBase extends Vue { ...@@ -813,63 +635,7 @@ export default class DictCatalogEditViewBase extends Vue {
* @param {*} [$event] * @param {*} [$event]
* @memberof * @memberof
*/ */
public toolbar_tbitem7_click(params: any = {}, tag?: any, $event?: any) { public toolbar_tbitem2_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"DictCatalog");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_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.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndStart(datas, contextJO,paramJO, $event, xData,this,"DictCatalog");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem10_click(params: any = {}, tag?: any, $event?: any) {
// 参数 // 参数
// 取数 // 取数
let datas: any[] = []; let datas: any[] = [];
...@@ -886,624 +652,60 @@ export default class DictCatalogEditViewBase extends Vue { ...@@ -886,624 +652,60 @@ export default class DictCatalogEditViewBase extends Vue {
datas = [params]; datas = [params];
} }
// 界面行为 // 界面行为
this.ViewWFStep(datas, contextJO,paramJO, $event, xData,this,"DictCatalog"); this.Exit(datas, contextJO,paramJO, $event, xData,this,"DictCatalog");
} }
/** /**
* 逻辑事件 * 保存并关闭
* *
* @param {*} [params={}] * @param {any[]} args 当前数据
* @param {*} [tag] * @param {any} contextJO 行为附加上下文
* @param {*} [$event] * @param {*} [params] 附加参数
* @memberof * @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictCatalogEditViewBase
*/ */
public toolbar_tbitem12_click(params: any = {}, tag?: any, $event?: any) { public SaveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this; const _this: any = this;
let paramJO:any = {}; if (xData && xData.saveAndExit instanceof Function) {
let contextJO:any = {}; xData.saveAndExit().then((response: any) => {
xData = this.$refs.form; if (!response || response.status !== 200) {
if (xData.getDatas && xData.getDatas instanceof Function) { return;
datas = [...xData.getDatas()];
} }
if(params){ if(window.parent){
datas = [params]; window.parent.postMessage([{ ...response.data }],'*');
} }
// 界面行为 });
this.New(datas, contextJO,paramJO, $event, xData,this,"DictCatalog"); } 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 {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem14_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
} }
if(params){ });
datas = [params];
} }
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"DictCatalog");
} }
/** /**
* 逻辑事件 * 关闭
* *
* @param {*} [params={}] * @param {any[]} args 当前数据
* @param {*} [tag] * @param {any} contextJO 行为附加上下文
* @param {*} [$event] * @param {*} [params] 附加参数
* @memberof * @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictCatalogEditViewBase
*/ */
public toolbar_tbitem15_click(params: any = {}, tag?: any, $event?: any) { public Exit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
// 参数 this.closeView(args);
// 取数 if(window.parent){
let datas: any[] = []; window.parent.postMessage([{ ...args }],'*');
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
} }
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"DictCatalog");
} }
/**
* 逻辑事件
*
* @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 = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.FirstRecord(datas, contextJO,paramJO, $event, xData,this,"DictCatalog");
}
/**
* 逻辑事件
*
* @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 = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.PrevRecord(datas, contextJO,paramJO, $event, xData,this,"DictCatalog");
}
/**
* 逻辑事件
*
* @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 = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.NextRecord(datas, contextJO,paramJO, $event, xData,this,"DictCatalog");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem26_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.LastRecord(datas, contextJO,paramJO, $event, xData,this,"DictCatalog");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem22_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Help(datas, contextJO,paramJO, $event, xData,this,"DictCatalog");
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictCatalogEditViewBase
*/
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 DictCatalogEditViewBase
*/
public SaveAndNew(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.saveAndNew instanceof Function)) {
return;
}
xData.saveAndNew().then((response: any) => {
if (!response || response.status !== 200) {
_this.$emit('viewdataschange', JSON.stringify({status:'error',action:'saveAndNew'}));
return;
}
_this.$emit('viewdataschange', JSON.stringify({status:'success',action:'saveAndNew',data:response.data}));
if (xData.autoLoad instanceof Function) {
xData.autoLoad();
}
});
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictCatalogEditViewBase
*/
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 DictCatalogEditViewBase
*/
public RemoveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.removeAndExit instanceof Function) {
xData.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.removeAndExit && _this.removeAndExit instanceof Function) {
_this.removeAndExit().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 DictCatalogEditViewBase
*/
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 DictCatalogEditViewBase
*/
public ViewWFStep(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.wfsubmit instanceof Function)) {
return;
}
xData.wfsubmit(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
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 DictCatalogEditViewBase
*/
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 DictCatalogEditViewBase
*/
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.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
xData.copy(args[0].srfkey);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictCatalogEditViewBase
*/
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 DictCatalogEditViewBase
*/
public FirstRecord(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
let navDataService:any = new NavDataService(this.$store);
let allNavData:any = Object.is(this.navModel,"route")?navDataService.getPreNavDataById('dict-catalog-edit-view'):navDataService.getPreNavDataByTag(_this.viewtag);
if(allNavData && allNavData.data && allNavData.data.length >0){
if(_this.parseViewParam && _this.engine){
_this.parseViewParam(allNavData.data[0].srfkey);
_this.engine.load();
}
}else{
this.$Notice.warning({ title: '警告', desc: '请确认操作路径是否正确' });
}
}
/**
* 上一个记录
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictCatalogEditViewBase
*/
public PrevRecord(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if(args.length === 0 || !args[0].srfkey){
return;
}
let _this:any = this;
let navDataService:any = new NavDataService(this.$store);
let allNavData:any = Object.is(this.navModel,"route")?navDataService.getPreNavDataById('dict-catalog-edit-view'):navDataService.getPreNavDataByTag(_this.viewtag);
if(allNavData && allNavData.data && allNavData.data.length >0){
let computedIndex:any;
for(let i=0;i<allNavData.data.length;i++){
if(allNavData.data[i].srfkey === args[0].srfkey){
computedIndex = i-1;
break;
}
}
if(computedIndex >= 0){
if(_this.parseViewParam && _this.engine){
_this.parseViewParam(allNavData.data[computedIndex].srfkey);
_this.engine.load();
}
}else{
this.$Notice.warning({ title: '警告', desc: '当前数据已经是第一条数据' });
}
}else{
this.$Notice.warning({ title: '警告', desc: '请确认操作路径是否正确' });
}
}
/**
* 下一个记录
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictCatalogEditViewBase
*/
public NextRecord(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if(args.length === 0 || !args[0].srfkey){
return;
}
let _this:any = this;
let navDataService:any = new NavDataService(this.$store);
let allNavData:any = Object.is(this.navModel,"route")?navDataService.getPreNavDataById('dict-catalog-edit-view'):navDataService.getPreNavDataByTag(_this.viewtag);
if(allNavData && allNavData.data && allNavData.data.length >0){
let computedIndex:any;
for(let i=0;i<allNavData.data.length;i++){
if(allNavData.data[i].srfkey === args[0].srfkey){
computedIndex = i+1;
break;
}
}
if(computedIndex < allNavData.data.length){
if(_this.parseViewParam && _this.engine){
_this.parseViewParam(allNavData.data[computedIndex].srfkey);
_this.engine.load();
}
}else{
this.$Notice.warning({ title: '警告', desc: '当前数据已经是最后一条数据' });
}
}else{
this.$Notice.warning({ title: '警告', desc: '请确认操作路径是否正确' });
}
}
/**
* 最后一个记录
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictCatalogEditViewBase
*/
public LastRecord(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
let navDataService:any = new NavDataService(this.$store);
let allNavData:any = Object.is(this.navModel,"route")?navDataService.getPreNavDataById('dict-catalog-edit-view'):navDataService.getPreNavDataByTag(_this.viewtag);
if(allNavData && allNavData.data && allNavData.data.length >0){
if(_this.parseViewParam && _this.engine){
_this.parseViewParam(allNavData.data[allNavData.data.length - 1].srfkey);
_this.engine.load();
}
}else{
this.$Notice.warning({ title: '警告', desc: '请确认操作路径是否正确' });
}
}
/**
* 帮助
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictCatalogEditViewBase
*/
public Help(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.$Notice.error({ title: '错误', desc: '帮助未支持' });
}
/** /**
* 关闭视图 * 关闭视图
......
...@@ -7,81 +7,18 @@ ...@@ -7,81 +7,18 @@
<span class='caption-info'>{{$t(model.srfTitle)}}</span> <span class='caption-info'>{{$t(model.srfTitle)}}</span>
<div class='toolbar-container'> <div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600"> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem3.visabled" :disabled="toolBarModels.tbitem3.disabled" class='' @click="toolbar_click({ tag: 'tbitem3' }, $event)"> <i-button v-show="toolBarModels.tbitem1.visabled" :disabled="toolBarModels.tbitem1.disabled" class='' @click="toolbar_click({ tag: 'tbitem1' }, $event)">
<i class='fa fa-save'></i>
<span class='caption'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem3.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem3.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem4.visabled" :disabled="toolBarModels.tbitem4.disabled" class='' @click="toolbar_click({ tag: 'tbitem4' }, $event)">
<i class='sx-tb-saveandnew'></i>
<span class='caption'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem4.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem4.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem5.visabled" :disabled="toolBarModels.tbitem5.disabled" class='' @click="toolbar_click({ tag: 'tbitem5' }, $event)">
<i class='sx-tb-saveandclose'></i> <i class='sx-tb-saveandclose'></i>
<span class='caption'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem5.caption')}}</span> <span class='caption'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem1.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem5.tip')}}</div>
</tooltip>
<span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem7.visabled" :disabled="toolBarModels.tbitem7.disabled" class='' @click="toolbar_click({ tag: 'tbitem7' }, $event)">
<i class='fa fa-remove'></i>
<span class='caption'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem7.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem7.tip')}}</div>
</tooltip>
<span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem12.visabled" :disabled="toolBarModels.tbitem12.disabled" class='' @click="toolbar_click({ tag: 'tbitem12' }, $event)">
<i class='fa fa-file-text-o'></i>
<span class='caption'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem12.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem12.tip')}}</div>
</tooltip>
<span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem14.visabled" :disabled="toolBarModels.tbitem14.disabled" class='' @click="toolbar_click({ tag: 'tbitem14' }, $event)">
<i class='fa fa-copy'></i>
<span class='caption'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem14.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem14.tip')}}</div>
</tooltip>
<span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem23.visabled" :disabled="toolBarModels.tbitem23.disabled" class='' @click="toolbar_click({ tag: 'tbitem23' }, $event)">
<i class='fa fa-fast-backward'></i>
</i-button>
<div slot='content'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem23.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem24.visabled" :disabled="toolBarModels.tbitem24.disabled" class='' @click="toolbar_click({ tag: 'tbitem24' }, $event)">
<i class='fa fa-step-backward'></i>
</i-button>
<div slot='content'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem24.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem25.visabled" :disabled="toolBarModels.tbitem25.disabled" class='' @click="toolbar_click({ tag: 'tbitem25' }, $event)">
<i class='fa fa-step-forward'></i>
</i-button> </i-button>
<div slot='content'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem25.tip')}}</div> <div slot='content'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem1.tip')}}</div>
</tooltip> </tooltip>
<tooltip :transfer="true" :max-width="600"> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem26.visabled" :disabled="toolBarModels.tbitem26.disabled" class='' @click="toolbar_click({ tag: 'tbitem26' }, $event)"> <i-button v-show="toolBarModels.tbitem2.visabled" :disabled="toolBarModels.tbitem2.disabled" class='' @click="toolbar_click({ tag: 'tbitem2' }, $event)">
<i class='fa fa-fast-forward'></i> <i class='fa fa-sign-out'></i>
<span class='caption'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem2.caption')}}</span>
</i-button> </i-button>
<div slot='content'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem26.tip')}}</div> <div slot='content'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem2.tip')}}</div>
</tooltip>
<span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem22.visabled" :disabled="toolBarModels.tbitem22.disabled" class='' @click="toolbar_click({ tag: 'tbitem22' }, $event)">
<i class='fa fa-question'></i>
<span class='caption'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem22.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.dictoption.editviewtoolbar_toolbar.tbitem22.tip')}}</div>
</tooltip> </tooltip>
</div> </div>
</div> </div>
...@@ -315,32 +252,9 @@ export default class DictOptionEditViewBase extends Vue { ...@@ -315,32 +252,9 @@ export default class DictOptionEditViewBase extends Vue {
* @memberof DictOptionEditView * @memberof DictOptionEditView
*/ */
public toolBarModels: any = { public toolBarModels: any = {
tbitem3: { name: 'tbitem3', caption: '保存', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Save', target: '' } }, tbitem1: { name: 'tbitem1', caption: '保存并关闭', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' } },
tbitem4: { name: 'tbitem4', caption: '保存并新建', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndNew', target: '' } },
tbitem5: { name: 'tbitem5', caption: '保存并关闭', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' } },
tbitem6: { name: 'tbitem6', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem7: { name: 'tbitem7', caption: '删除并关闭', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' } },
tbitem8: { name: 'tbitem8', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem12: { name: 'tbitem12', caption: '新建', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'New', target: '' } },
tbitem13: { name: 'tbitem13', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem14: { name: 'tbitem14', caption: '拷贝', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' } },
tbitem16: { name: 'tbitem16', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem23: { name: 'tbitem23', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'FirstRecord', target: 'SINGLEKEY' } },
tbitem24: { name: 'tbitem24', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'PrevRecord', target: 'SINGLEKEY' } }, tbitem2: { name: 'tbitem2', caption: '关闭', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Exit', target: '' } },
tbitem25: { name: 'tbitem25', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'NextRecord', target: 'SINGLEKEY' } },
tbitem26: { name: 'tbitem26', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'LastRecord', target: 'SINGLEKEY' } },
tbitem21: { name: 'tbitem21', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem22: { name: 'tbitem22', caption: '帮助', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Help', target: '' } },
}; };
...@@ -639,47 +553,11 @@ export default class DictOptionEditViewBase extends Vue { ...@@ -639,47 +553,11 @@ export default class DictOptionEditViewBase extends Vue {
* @memberof DictOptionEditViewBase * @memberof DictOptionEditViewBase
*/ */
public toolbar_click($event: any, $event2?: any) { public toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'tbitem3')) { if (Object.is($event.tag, 'tbitem1')) {
this.toolbar_tbitem3_click(null, '', $event2); this.toolbar_tbitem1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem7')) {
this.toolbar_tbitem7_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem9')) {
this.toolbar_tbitem9_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem10')) {
this.toolbar_tbitem10_click(null, '', $event2);
} }
if (Object.is($event.tag, 'tbitem12')) { if (Object.is($event.tag, 'tbitem2')) {
this.toolbar_tbitem12_click(null, '', $event2); this.toolbar_tbitem2_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem14')) {
this.toolbar_tbitem14_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem15')) {
this.toolbar_tbitem15_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem23')) {
this.toolbar_tbitem23_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, 'tbitem26')) {
this.toolbar_tbitem26_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem22')) {
this.toolbar_tbitem22_click(null, '', $event2);
} }
} }
...@@ -729,63 +607,7 @@ export default class DictOptionEditViewBase extends Vue { ...@@ -729,63 +607,7 @@ export default class DictOptionEditViewBase extends Vue {
* @param {*} [$event] * @param {*} [$event]
* @memberof * @memberof
*/ */
public toolbar_tbitem3_click(params: any = {}, tag?: any, $event?: any) { public toolbar_tbitem1_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"DictOption");
}
/**
* 逻辑事件
*
* @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 = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndNew(datas, contextJO,paramJO, $event, xData,this,"DictOption");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem5_click(params: any = {}, tag?: any, $event?: any) {
// 参数 // 参数
// 取数 // 取数
let datas: any[] = []; let datas: any[] = [];
...@@ -813,63 +635,7 @@ export default class DictOptionEditViewBase extends Vue { ...@@ -813,63 +635,7 @@ export default class DictOptionEditViewBase extends Vue {
* @param {*} [$event] * @param {*} [$event]
* @memberof * @memberof
*/ */
public toolbar_tbitem7_click(params: any = {}, tag?: any, $event?: any) { public toolbar_tbitem2_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"DictOption");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_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.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndStart(datas, contextJO,paramJO, $event, xData,this,"DictOption");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem10_click(params: any = {}, tag?: any, $event?: any) {
// 参数 // 参数
// 取数 // 取数
let datas: any[] = []; let datas: any[] = [];
...@@ -886,624 +652,60 @@ export default class DictOptionEditViewBase extends Vue { ...@@ -886,624 +652,60 @@ export default class DictOptionEditViewBase extends Vue {
datas = [params]; datas = [params];
} }
// 界面行为 // 界面行为
this.ViewWFStep(datas, contextJO,paramJO, $event, xData,this,"DictOption"); this.Exit(datas, contextJO,paramJO, $event, xData,this,"DictOption");
} }
/** /**
* 逻辑事件 * 保存并关闭
* *
* @param {*} [params={}] * @param {any[]} args 当前数据
* @param {*} [tag] * @param {any} contextJO 行为附加上下文
* @param {*} [$event] * @param {*} [params] 附加参数
* @memberof * @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictOptionEditViewBase
*/ */
public toolbar_tbitem12_click(params: any = {}, tag?: any, $event?: any) { public SaveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this; const _this: any = this;
let paramJO:any = {}; if (xData && xData.saveAndExit instanceof Function) {
let contextJO:any = {}; xData.saveAndExit().then((response: any) => {
xData = this.$refs.form; if (!response || response.status !== 200) {
if (xData.getDatas && xData.getDatas instanceof Function) { return;
datas = [...xData.getDatas()];
} }
if(params){ if(window.parent){
datas = [params]; window.parent.postMessage([{ ...response.data }],'*');
} }
// 界面行为 });
this.New(datas, contextJO,paramJO, $event, xData,this,"DictOption"); } 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 {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem14_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
} }
if(params){ });
datas = [params];
} }
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"DictOption");
} }
/** /**
* 逻辑事件 * 关闭
* *
* @param {*} [params={}] * @param {any[]} args 当前数据
* @param {*} [tag] * @param {any} contextJO 行为附加上下文
* @param {*} [$event] * @param {*} [params] 附加参数
* @memberof * @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictOptionEditViewBase
*/ */
public toolbar_tbitem15_click(params: any = {}, tag?: any, $event?: any) { public Exit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
// 参数 this.closeView(args);
// 取数 if(window.parent){
let datas: any[] = []; window.parent.postMessage([{ ...args }],'*');
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
} }
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"DictOption");
} }
/**
* 逻辑事件
*
* @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 = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.FirstRecord(datas, contextJO,paramJO, $event, xData,this,"DictOption");
}
/**
* 逻辑事件
*
* @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 = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.PrevRecord(datas, contextJO,paramJO, $event, xData,this,"DictOption");
}
/**
* 逻辑事件
*
* @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 = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.NextRecord(datas, contextJO,paramJO, $event, xData,this,"DictOption");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem26_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.LastRecord(datas, contextJO,paramJO, $event, xData,this,"DictOption");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem22_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Help(datas, contextJO,paramJO, $event, xData,this,"DictOption");
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictOptionEditViewBase
*/
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 DictOptionEditViewBase
*/
public SaveAndNew(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.saveAndNew instanceof Function)) {
return;
}
xData.saveAndNew().then((response: any) => {
if (!response || response.status !== 200) {
_this.$emit('viewdataschange', JSON.stringify({status:'error',action:'saveAndNew'}));
return;
}
_this.$emit('viewdataschange', JSON.stringify({status:'success',action:'saveAndNew',data:response.data}));
if (xData.autoLoad instanceof Function) {
xData.autoLoad();
}
});
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictOptionEditViewBase
*/
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 DictOptionEditViewBase
*/
public RemoveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.removeAndExit instanceof Function) {
xData.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.removeAndExit && _this.removeAndExit instanceof Function) {
_this.removeAndExit().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 DictOptionEditViewBase
*/
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 DictOptionEditViewBase
*/
public ViewWFStep(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.wfsubmit instanceof Function)) {
return;
}
xData.wfsubmit(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
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 DictOptionEditViewBase
*/
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 DictOptionEditViewBase
*/
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.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
xData.copy(args[0].srfkey);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictOptionEditViewBase
*/
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 DictOptionEditViewBase
*/
public FirstRecord(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
let navDataService:any = new NavDataService(this.$store);
let allNavData:any = Object.is(this.navModel,"route")?navDataService.getPreNavDataById('dict-option-edit-view'):navDataService.getPreNavDataByTag(_this.viewtag);
if(allNavData && allNavData.data && allNavData.data.length >0){
if(_this.parseViewParam && _this.engine){
_this.parseViewParam(allNavData.data[0].srfkey);
_this.engine.load();
}
}else{
this.$Notice.warning({ title: '警告', desc: '请确认操作路径是否正确' });
}
}
/**
* 上一个记录
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictOptionEditViewBase
*/
public PrevRecord(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if(args.length === 0 || !args[0].srfkey){
return;
}
let _this:any = this;
let navDataService:any = new NavDataService(this.$store);
let allNavData:any = Object.is(this.navModel,"route")?navDataService.getPreNavDataById('dict-option-edit-view'):navDataService.getPreNavDataByTag(_this.viewtag);
if(allNavData && allNavData.data && allNavData.data.length >0){
let computedIndex:any;
for(let i=0;i<allNavData.data.length;i++){
if(allNavData.data[i].srfkey === args[0].srfkey){
computedIndex = i-1;
break;
}
}
if(computedIndex >= 0){
if(_this.parseViewParam && _this.engine){
_this.parseViewParam(allNavData.data[computedIndex].srfkey);
_this.engine.load();
}
}else{
this.$Notice.warning({ title: '警告', desc: '当前数据已经是第一条数据' });
}
}else{
this.$Notice.warning({ title: '警告', desc: '请确认操作路径是否正确' });
}
}
/**
* 下一个记录
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictOptionEditViewBase
*/
public NextRecord(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if(args.length === 0 || !args[0].srfkey){
return;
}
let _this:any = this;
let navDataService:any = new NavDataService(this.$store);
let allNavData:any = Object.is(this.navModel,"route")?navDataService.getPreNavDataById('dict-option-edit-view'):navDataService.getPreNavDataByTag(_this.viewtag);
if(allNavData && allNavData.data && allNavData.data.length >0){
let computedIndex:any;
for(let i=0;i<allNavData.data.length;i++){
if(allNavData.data[i].srfkey === args[0].srfkey){
computedIndex = i+1;
break;
}
}
if(computedIndex < allNavData.data.length){
if(_this.parseViewParam && _this.engine){
_this.parseViewParam(allNavData.data[computedIndex].srfkey);
_this.engine.load();
}
}else{
this.$Notice.warning({ title: '警告', desc: '当前数据已经是最后一条数据' });
}
}else{
this.$Notice.warning({ title: '警告', desc: '请确认操作路径是否正确' });
}
}
/**
* 最后一个记录
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictOptionEditViewBase
*/
public LastRecord(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
let navDataService:any = new NavDataService(this.$store);
let allNavData:any = Object.is(this.navModel,"route")?navDataService.getPreNavDataById('dict-option-edit-view'):navDataService.getPreNavDataByTag(_this.viewtag);
if(allNavData && allNavData.data && allNavData.data.length >0){
if(_this.parseViewParam && _this.engine){
_this.parseViewParam(allNavData.data[allNavData.data.length - 1].srfkey);
_this.engine.load();
}
}else{
this.$Notice.warning({ title: '警告', desc: '请确认操作路径是否正确' });
}
}
/**
* 帮助
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictOptionEditViewBase
*/
public Help(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.$Notice.error({ title: '错误', desc: '帮助未支持' });
}
/** /**
* 关闭视图 * 关闭视图
......
...@@ -34,58 +34,38 @@ ...@@ -34,58 +34,38 @@
<div slot='content'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem6.tip')}}</div> <div slot='content'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem6.tip')}}</div>
</tooltip> </tooltip>
<span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600"> <span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem8.visabled" :disabled="toolBarModels.tbitem8.disabled" class='' @click="toolbar_click({ tag: 'tbitem8' }, $event)"> <i-button v-show="toolBarModels.tbitem24.visabled" :disabled="toolBarModels.tbitem24.disabled" class='' @click="toolbar_click({ tag: 'tbitem24' }, $event)">
<i class='fa fa-remove'></i> <i class='fa fa-table'></i>
<span class='caption'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem8.caption')}}</span> <span class='caption'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem24.caption')}}</span>
</i-button> </i-button>
<div slot='content'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem8.tip')}}</div> <div slot='content'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem24.tip')}}</div>
</tooltip>
<span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600">
<app-export-excel :item="toolBarModels.tbitem13" :caption="$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem13.caption')" @exportexcel="toolbar_click({ tag: 'tbitem13' }, $event)"></app-export-excel>
<div slot='content'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem13.tip')}}</div>
</tooltip> </tooltip>
<span class='seperator'>|</span> <dropdown v-show="toolBarModels.tbitem16.visabled" trigger='click'>
<tooltip :transfer="true" :max-width="600"> <tooltip :transfer="true" :max-width="600">
<i-button class=''> <i-button v-show="toolBarModels.tbitem25.visabled" :disabled="toolBarModels.tbitem25.disabled" class='' @click="toolbar_click({ tag: 'tbitem25' }, $event)">
<i class=''></i> <i class='fa fa-plus'></i>
<span class='caption'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem16.caption')}}</span>
<icon type="ios-arrow-down"></icon>
</i-button> </i-button>
<div slot='content'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem16.tip')}}</div> <div slot='content'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem25.tip')}}</div>
</tooltip> </tooltip>
<dropdown-menu slot='list'>
<dropdown-item>
<tooltip :transfer="true" :max-width="600"> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem21.visabled" :disabled="toolBarModels.tbitem21.disabled" class='' @click="toolbar_click({ tag: 'tbitem21' }, $event)"> <i-button v-show="toolBarModels.deuiaction1.visabled" :disabled="toolBarModels.deuiaction1.disabled" class='' @click="toolbar_click({ tag: 'deuiaction1' }, $event)">
<i class='fa fa-download'></i> <i class='fa fa-save'></i>
<span class='caption'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem21.caption')}}</span> <span class='caption'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.deuiaction1.caption')}}</span>
</i-button> </i-button>
<div slot='content'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem21.tip')}}</div> <div slot='content'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.deuiaction1.tip')}}</div>
</tooltip> </tooltip>
<span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem8.visabled" :disabled="toolBarModels.tbitem8.disabled" class='' @click="toolbar_click({ tag: 'tbitem8' }, $event)">
</dropdown-item> <i class='fa fa-remove'></i>
<dropdown-item> <span class='caption'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem8.caption')}}</span>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem23.visabled" :disabled="toolBarModels.tbitem23.disabled" class='' @click="toolbar_click({ tag: 'tbitem23' }, $event)">
<i class='fa fa-upload'></i>
<span class='caption'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem23.caption')}}</span>
</i-button> </i-button>
<div slot='content'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem23.tip')}}</div> <div slot='content'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem8.tip')}}</div>
</tooltip> </tooltip>
</dropdown-item>
</dropdown-menu>
</dropdown>
<span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600"> <span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem19.visabled" :disabled="toolBarModels.tbitem19.disabled" class='' @click="toolbar_click({ tag: 'tbitem19' }, $event)"> <app-export-excel :item="toolBarModels.tbitem13" :caption="$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem13.caption')" @exportexcel="toolbar_click({ tag: 'tbitem13' }, $event)"></app-export-excel>
<i class='fa fa-filter'></i> <div slot='content'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem13.tip')}}</div>
<span class='caption'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem19.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem19.tip')}}</div>
</tooltip> </tooltip>
<tooltip :transfer="true" :max-width="600"> <span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem18.visabled" :disabled="toolBarModels.tbitem18.disabled" class='' @click="toolbar_click({ tag: 'tbitem18' }, $event)"> <i-button v-show="toolBarModels.tbitem18.visabled" :disabled="toolBarModels.tbitem18.disabled" class='' @click="toolbar_click({ tag: 'tbitem18' }, $event)">
<i class='fa fa-question'></i> <i class='fa fa-question'></i>
<span class='caption'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem18.caption')}}</span> <span class='caption'>{{$t('entities.dictoption.gridviewtoolbar_toolbar.tbitem18.caption')}}</span>
...@@ -120,11 +100,11 @@ ...@@ -120,11 +100,11 @@
:isOpenEdit="true" :isOpenEdit="true"
:gridRowActiveMode="gridRowActiveMode" :gridRowActiveMode="gridRowActiveMode"
@save="onSave" @save="onSave"
updateAction="" updateAction="Update"
removeAction="Remove" removeAction="Remove"
loaddraftAction="" loaddraftAction="GetDraft"
loadAction="" loadAction="Get"
createAction="" createAction="Create"
fetchAction="FetchDefault" fetchAction="FetchDefault"
:newdata="newdata" :newdata="newdata"
:opendata="opendata" :opendata="opendata"
...@@ -352,21 +332,19 @@ export default class DictOptionGridViewBase extends Vue { ...@@ -352,21 +332,19 @@ export default class DictOptionGridViewBase extends Vue {
tbitem6: { name: 'tbitem6', caption: '拷贝', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' } }, tbitem6: { name: 'tbitem6', caption: '拷贝', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' } },
tbitem7: { name: 'tbitem7', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } }, tbitem7: { name: 'tbitem7', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem24: { name: 'tbitem24', caption: '行编辑', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'ToggleRowEdit', target: '' } },
tbitem25: { name: 'tbitem25', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'NewRow', target: '' } },
deuiaction1: { name: 'deuiaction1', caption: '保存行', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveRow', target: '' } },
tbitem26: { name: 'tbitem26', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem8: { name: 'tbitem8', caption: '删除', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY' } }, tbitem8: { name: 'tbitem8', caption: '删除', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY' } },
tbitem9: { name: 'tbitem9', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } }, tbitem9: { name: 'tbitem9', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem13: { name: 'tbitem13', caption: '导出', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'ExportExcel', target: '' }, MaxRowCount: 1000 }, tbitem13: { name: 'tbitem13', caption: '导出', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'ExportExcel', target: '' }, MaxRowCount: 1000 },
tbitem10: { name: 'tbitem10', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } }, tbitem10: { name: 'tbitem10', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem16: { name: 'tbitem16', caption: '其它', disabled: false, type: 'ITEMS', visabled: true, dataaccaction: '', uiaction: { } },
tbitem21: { name: 'tbitem21', caption: '导出数据模型', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'ExportModel', target: '' } },
tbitem23: { name: 'tbitem23', caption: '数据导入', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Import', target: '' } },
tbitem17: { name: 'tbitem17', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem19: { name: 'tbitem19', caption: '过滤', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'ToggleFilter', target: '' } },
tbitem18: { name: 'tbitem18', caption: '帮助', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Help', target: '' } }, tbitem18: { name: 'tbitem18', caption: '帮助', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Help', target: '' } },
}; };
...@@ -715,15 +693,6 @@ export default class DictOptionGridViewBase extends Vue { ...@@ -715,15 +693,6 @@ export default class DictOptionGridViewBase extends Vue {
if (Object.is($event.tag, 'tbitem11')) { if (Object.is($event.tag, 'tbitem11')) {
this.toolbar_tbitem11_click(null, '', $event2); 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);
}
if (Object.is($event.tag, 'tbitem19')) {
this.toolbar_tbitem19_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem18')) { if (Object.is($event.tag, 'tbitem18')) {
this.toolbar_tbitem18_click(null, '', $event2); this.toolbar_tbitem18_click(null, '', $event2);
} }
...@@ -1107,90 +1076,6 @@ export default class DictOptionGridViewBase extends Vue { ...@@ -1107,90 +1076,6 @@ export default class DictOptionGridViewBase extends Vue {
this.Print(datas, contextJO,paramJO, $event, xData,this,"DictOption"); this.Print(datas, contextJO,paramJO, $event, xData,this,"DictOption");
} }
/**
* 逻辑事件
*
* @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 = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportModel(datas, contextJO,paramJO, $event, xData,this,"DictOption");
}
/**
* 逻辑事件
*
* @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 = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Import(datas, contextJO,paramJO, $event, xData,this,"DictOption");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem19_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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleFilter(datas, contextJO,paramJO, $event, xData,this,"DictOption");
}
/** /**
* 逻辑事件 * 逻辑事件
* *
...@@ -1540,55 +1425,6 @@ export default class DictOptionGridViewBase extends Vue { ...@@ -1540,55 +1425,6 @@ export default class DictOptionGridViewBase extends Vue {
} }
xData.print(); xData.print();
} }
/**
* 导出数据模型
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictOptionGridViewBase
*/
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 DictOptionGridViewBase
*/
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);
}
/**
* 过滤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof DictOptionGridViewBase
*/
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;
}
}
/** /**
* 帮助 * 帮助
* *
......
...@@ -11,6 +11,7 @@ export const viewstate: any = { ...@@ -11,6 +11,7 @@ export const viewstate: any = {
viewdatachange: false, viewdatachange: false,
refviews: [ refviews: [
'8ad70084b5f98a26370b74da612d3f49', '8ad70084b5f98a26370b74da612d3f49',
'eb4772f75066d6c9eb26d8b01d4e16b7',
], ],
}, },
{ {
......
...@@ -29,7 +29,20 @@ ...@@ -29,7 +29,20 @@
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<template > <template v-if="actualIsOpenEdit">
<app-form-item :error="gridItemsModel[$index][column.property].error">
<input-box
:disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1"
v-model="row[column.property]"
style=""
type="text"
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</input-box>
</app-form-item>
</template>
<template v-if="!actualIsOpenEdit">
<app-span name='cid' editorType="HIDDEN" :value="row.cid"></app-span> <app-span name='cid' editorType="HIDDEN" :value="row.cid"></app-span>
</template> </template>
</template> </template>
...@@ -43,7 +56,33 @@ ...@@ -43,7 +56,33 @@
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<template > <template v-if="actualIsOpenEdit">
<app-form-item :error="gridItemsModel[$index][column.property].error">
<app-picker
:formState="viewState"
:data="row"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1"
name='cname'
deMajorField='name'
deKeyField='dictcatalog'
:service="service"
:acParams="{ serviceName: 'DictCatalogService', interfaceName: 'FetchDefault'}"
valueitem='cid'
:value="row[column.property]"
editortype=""
:pickupView="{ viewname: 'dict-catalog-pickup-view', title: $t('entities.dictcatalog.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'dictcatalogs', parameterName: 'dictcatalog' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
</app-picker>
</app-form-item>
</template>
<template v-if="!actualIsOpenEdit">
<app-span name='cname' editorType="PICKER" :value="row.cname"></app-span> <app-span name='cname' editorType="PICKER" :value="row.cname"></app-span>
</template> </template>
</template> </template>
...@@ -57,7 +96,20 @@ ...@@ -57,7 +96,20 @@
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<template > <template v-if="actualIsOpenEdit">
<app-form-item :error="gridItemsModel[$index][column.property].error">
<input-box
:disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1"
v-model="row[column.property]"
style=""
type="text"
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</input-box>
</app-form-item>
</template>
<template v-if="!actualIsOpenEdit">
<app-span name='val' editorType="TEXTBOX" :value="row.val"></app-span> <app-span name='val' editorType="TEXTBOX" :value="row.val"></app-span>
</template> </template>
</template> </template>
...@@ -71,7 +123,20 @@ ...@@ -71,7 +123,20 @@
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<template > <template v-if="actualIsOpenEdit">
<app-form-item :error="gridItemsModel[$index][column.property].error">
<input-box
:disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1"
v-model="row[column.property]"
style=""
type="text"
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</input-box>
</app-form-item>
</template>
<template v-if="!actualIsOpenEdit">
<app-span name='label' editorType="TEXTBOX" :value="row.label"></app-span> <app-span name='label' editorType="TEXTBOX" :value="row.label"></app-span>
</template> </template>
</template> </template>
...@@ -85,7 +150,20 @@ ...@@ -85,7 +150,20 @@
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<template > <template v-if="actualIsOpenEdit">
<app-form-item :error="gridItemsModel[$index][column.property].error">
<input-box
:disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1"
v-model="row[column.property]"
style=""
type="text"
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</input-box>
</app-form-item>
</template>
<template v-if="!actualIsOpenEdit">
<app-span name='pval' editorType="TEXTBOX" :value="row.pval"></app-span> <app-span name='pval' editorType="TEXTBOX" :value="row.pval"></app-span>
</template> </template>
</template> </template>
...@@ -99,7 +177,20 @@ ...@@ -99,7 +177,20 @@
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<template > <template v-if="actualIsOpenEdit">
<app-form-item :error="gridItemsModel[$index][column.property].error">
<input-box
:disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1"
v-model="row[column.property]"
style=""
type="text"
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</input-box>
</app-form-item>
</template>
<template v-if="!actualIsOpenEdit">
<app-span name='cls' editorType="TEXTBOX" :value="row.cls"></app-span> <app-span name='cls' editorType="TEXTBOX" :value="row.cls"></app-span>
</template> </template>
</template> </template>
...@@ -113,7 +204,20 @@ ...@@ -113,7 +204,20 @@
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<template > <template v-if="actualIsOpenEdit">
<app-form-item :error="gridItemsModel[$index][column.property].error">
<input-box
:disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1"
v-model="row[column.property]"
style=""
type="text"
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</input-box>
</app-form-item>
</template>
<template v-if="!actualIsOpenEdit">
<app-span name='iconcls' editorType="TEXTBOX" :value="row.iconcls"></app-span> <app-span name='iconcls' editorType="TEXTBOX" :value="row.iconcls"></app-span>
</template> </template>
</template> </template>
...@@ -127,7 +231,20 @@ ...@@ -127,7 +231,20 @@
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<template > <template v-if="actualIsOpenEdit">
<app-form-item :error="gridItemsModel[$index][column.property].error">
<input-box
:disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1"
v-model="row[column.property]"
style=""
type="text"
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</input-box>
</app-form-item>
</template>
<template v-if="!actualIsOpenEdit">
<app-span name='vfilter' editorType="TEXTBOX" :value="row.vfilter"></app-span> <app-span name='vfilter' editorType="TEXTBOX" :value="row.vfilter"></app-span>
</template> </template>
</template> </template>
...@@ -141,7 +258,27 @@ ...@@ -141,7 +258,27 @@
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<template > <template v-if="actualIsOpenEdit">
<app-form-item :error="gridItemsModel[$index][column.property].error">
<dropdown-list
v-model="row[column.property]"
:disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1"
style="width: 100px;"
:data="row"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
tag='YesNo'
codelistType='STATIC'
placeholder='请选择...'
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</dropdown-list>
</app-form-item>
</template>
<template v-if="!actualIsOpenEdit">
<codelist :value="row.disabled" tag='YesNo' codelistType='STATIC' ></codelist> <codelist :value="row.disabled" tag='YesNo' codelistType='STATIC' ></codelist>
</template> </template>
</template> </template>
...@@ -155,7 +292,27 @@ ...@@ -155,7 +292,27 @@
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<template > <template v-if="actualIsOpenEdit">
<app-form-item :error="gridItemsModel[$index][column.property].error">
<dropdown-list
v-model="row[column.property]"
:disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1"
style="width: 100px;"
:data="row"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
tag='YesNo'
codelistType='STATIC'
placeholder='请选择...'
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</dropdown-list>
</app-form-item>
</template>
<template v-if="!actualIsOpenEdit">
<codelist :value="row.expired" tag='YesNo' codelistType='STATIC' ></codelist> <codelist :value="row.expired" tag='YesNo' codelistType='STATIC' ></codelist>
</template> </template>
</template> </template>
...@@ -169,7 +326,20 @@ ...@@ -169,7 +326,20 @@
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<template > <template v-if="actualIsOpenEdit">
<app-form-item :error="gridItemsModel[$index][column.property].error">
<input-box
:disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1"
v-model="row[column.property]"
style=""
type="text"
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</input-box>
</app-form-item>
</template>
<template v-if="!actualIsOpenEdit">
<app-span name='showorder' editorType="TEXTBOX" :value="row.showorder"></app-span> <app-span name='showorder' editorType="TEXTBOX" :value="row.showorder"></app-span>
</template> </template>
</template> </template>
...@@ -183,7 +353,14 @@ ...@@ -183,7 +353,14 @@
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<template > <template v-if="actualIsOpenEdit">
<app-form-item :error="gridItemsModel[$index][column.property].error">
<div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type">
<textarea class="ivu-input" rows="10" :disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1" v-model="row[column.property]" style="" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></textarea>
</div>
</app-form-item>
</template>
<template v-if="!actualIsOpenEdit">
<app-span name='extension' editorType="TEXTAREA" :value="row.extension"></app-span> <app-span name='extension' editorType="TEXTAREA" :value="row.extension"></app-span>
</template> </template>
</template> </template>
...@@ -1825,18 +2002,18 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1825,18 +2002,18 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public getCellClassName(args:{row: any, column: any, rowIndex: number, columnIndex:number}){ public getCellClassName(args:{row: any, column: any, rowIndex: number, columnIndex:number}){
let hasRowEdit:any = { let hasRowEdit:any = {
'cid':false, 'cid':true,
'cname':false, 'cname':true,
'val':false, 'val':true,
'label':false, 'label':true,
'pval':false, 'pval':true,
'cls':false, 'cls':true,
'iconcls':false, 'iconcls':true,
'vfilter':false, 'vfilter':true,
'disabled':false, 'disabled':true,
'expired':false, 'expired':true,
'showorder':false, 'showorder':true,
'extension':false, 'extension':true,
'updatedate':false, 'updatedate':false,
} }
return ( hasRowEdit[args.column.property] && this.actualIsOpenEdit ) ? "edit-cell" : "info-cell"; return ( hasRowEdit[args.column.property] && this.actualIsOpenEdit ) ? "edit-cell" : "info-cell";
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<!--输出实体[DICT_OPTION]数据结构 --> <!--输出实体[DICT_OPTION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dict_option-81-1"> <changeSet author="a_A_5d9d78509" id="tab-dict_option-83-1">
<createTable tableName="IBZDICTOPTION"> <createTable tableName="IBZDICTOPTION">
<column name="VKEY" remarks="" type="VARCHAR(100)"> <column name="VKEY" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DICT_OPTION_VKEY"/> <constraints primaryKey="true" primaryKeyName="PK_DICT_OPTION_VKEY"/>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<!--输出实体[DICT_CATALOG]数据结构 --> <!--输出实体[DICT_CATALOG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dict_catalog-50-2"> <changeSet author="a_A_5d9d78509" id="tab-dict_catalog-51-2">
<createTable tableName="IBZDICTCATALOG"> <createTable tableName="IBZDICTCATALOG">
<column name="CID" remarks="" type="VARCHAR(100)"> <column name="CID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DICT_CATALOG_CID"/> <constraints primaryKey="true" primaryKeyName="PK_DICT_CATALOG_CID"/>
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</changeSet> </changeSet>
<!--输出实体[DICT_OPTION]外键关系 --> <!--输出实体[DICT_OPTION]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-dict_option-81-3"> <changeSet author="a_A_5d9d78509" id="fk-dict_option-83-3">
<addForeignKeyConstraint baseColumnNames="CID" baseTableName="IBZDICTOPTION" constraintName="DER1N_DICT_OPTION_DICT_CATALOG" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CID" referencedTableName="IBZDICTCATALOG" validate="true"/> <addForeignKeyConstraint baseColumnNames="CID" baseTableName="IBZDICTOPTION" constraintName="DER1N_DICT_OPTION_DICT_CATALOG" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CID" referencedTableName="IBZDICTCATALOG" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[DICT_CATALOG]外键关系 --> <!--输出实体[DICT_CATALOG]外键关系 -->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册