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

lab_gzf 部署微服务应用

上级 8fece82b
...@@ -19,6 +19,16 @@ ...@@ -19,6 +19,16 @@
"viewtag": "3d676a12800fca23bec463d5c5217413", "viewtag": "3d676a12800fca23bec463d5c5217413",
"memo": "系统自动添加" "memo": "系统自动添加"
}, },
"eamlocationtypegridview": {
"title": "功能位置类型表格视图",
"caption": "功能位置类型",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationTypeGridView",
"viewfilename": "eamlocation-type-grid-view",
"viewtag": "4c95ec14aa2de5370d9d81f7d85f4bd5",
"memo": ""
},
"eamlocationstatemodeleditview": { "eamlocationstatemodeleditview": {
"title": "功能位置状态模型编辑视图", "title": "功能位置状态模型编辑视图",
"caption": "功能位置状态模型", "caption": "功能位置状态模型",
...@@ -39,6 +49,16 @@ ...@@ -39,6 +49,16 @@
"viewtag": "9e9b3600ba892d31757bacef1dcc9458", "viewtag": "9e9b3600ba892d31757bacef1dcc9458",
"memo": "" "memo": ""
}, },
"eamlocationinfo_mainview": {
"title": "功能位置编辑视图",
"caption": "功能位置",
"viewtype": "DEEDITVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationInfo_MainView",
"viewfilename": "eamlocation-info-main-view",
"viewtag": "a82c591e524f7289432a30a5ccfa8908",
"memo": ""
},
"eamlocationstatepickupview": { "eamlocationstatepickupview": {
"title": "功能位置状态数据选择视图", "title": "功能位置状态数据选择视图",
"caption": "功能位置状态", "caption": "功能位置状态",
...@@ -49,6 +69,16 @@ ...@@ -49,6 +69,16 @@
"viewtag": "a9f7eb2645c6505a232a0a13742c42a7", "viewtag": "a9f7eb2645c6505a232a0a13742c42a7",
"memo": "系统自动添加" "memo": "系统自动添加"
}, },
"eamlocationchildgridview": {
"title": "功能位置表格视图",
"caption": "功能位置",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationChildGridView",
"viewfilename": "eamlocation-child-grid-view",
"viewtag": "b24fce391aeca43222a1017b50ba40e2",
"memo": ""
},
"eamlocationstatemodellineeditview": { "eamlocationstatemodellineeditview": {
"title": "功能位置状态模型明细编辑视图", "title": "功能位置状态模型明细编辑视图",
"caption": "功能位置状态模型明细", "caption": "功能位置状态模型明细",
...@@ -79,6 +109,26 @@ ...@@ -79,6 +109,26 @@
"viewtag": "bb8b4b03a77ed63b8eb4ef3d62b669a6", "viewtag": "bb8b4b03a77ed63b8eb4ef3d62b669a6",
"memo": "系统自动添加" "memo": "系统自动添加"
}, },
"eamlocationsummaryview": {
"title": "功能位置数据看板视图",
"caption": "功能位置",
"viewtype": "DEPORTALVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationSummaryView",
"viewfilename": "eamlocation-summary-view",
"viewtag": "cc29cbcb0398aa069d4b05f3469f0377",
"memo": ""
},
"eamlocationinfoview": {
"title": "功能位置信息",
"caption": "功能位置",
"viewtype": "DETABEXPVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationInfoView",
"viewfilename": "eamlocation-info-view",
"viewtag": "d3466c5c60a573062d543896976bf68c",
"memo": ""
},
"appindexview": { "appindexview": {
"title": "应用首页视图", "title": "应用首页视图",
"caption": "资产管理", "caption": "资产管理",
...@@ -89,6 +139,16 @@ ...@@ -89,6 +139,16 @@
"viewtag": "D44132B9-5261-4008-A146-6287A80D5D31", "viewtag": "D44132B9-5261-4008-A146-6287A80D5D31",
"memo": "" "memo": ""
}, },
"eamlocationtypeeditview": {
"title": "功能位置类型编辑视图",
"caption": "功能位置类型",
"viewtype": "DEEDITVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationTypeEditView",
"viewfilename": "eamlocation-type-edit-view",
"viewtag": "dd09755644dcf1e57c062b4e08e4ce3a",
"memo": "系统自动添加"
},
"eamlocationstatemodellinegridview": { "eamlocationstatemodellinegridview": {
"title": "功能位置状态模型明细表格视图", "title": "功能位置状态模型明细表格视图",
"caption": "功能位置状态模型明细", "caption": "功能位置状态模型明细",
...@@ -99,6 +159,16 @@ ...@@ -99,6 +159,16 @@
"viewtag": "ecd1ec6299b5b24e2004fa15c4eef92d", "viewtag": "ecd1ec6299b5b24e2004fa15c4eef92d",
"memo": "系统自动添加" "memo": "系统自动添加"
}, },
"eamlocationgridview": {
"title": "功能位置表格视图",
"caption": "功能位置",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationGridView",
"viewfilename": "eamlocation-grid-view",
"viewtag": "eee617336f6dc6e5e97835d6309fd452",
"memo": ""
},
"eamlocationstategridview": { "eamlocationstategridview": {
"title": "功能位置状态信息", "title": "功能位置状态信息",
"caption": "功能位置状态", "caption": "功能位置状态",
......
...@@ -54,6 +54,14 @@ export default class AppColumnLink extends Vue { ...@@ -54,6 +54,14 @@ export default class AppColumnLink extends Vue {
*/ */
@Prop({default:{}}) public viewparams?:any; @Prop({default:{}}) public viewparams?:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppColumnLink
*/
@Prop() public localParam!:any;
/** /**
* 应用实体主键属性名称 * 应用实体主键属性名称
* *
...@@ -281,6 +289,11 @@ export default class AppColumnLink extends Vue { ...@@ -281,6 +289,11 @@ export default class AppColumnLink extends Vue {
// 合并表单参数 // 合并表单参数
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {}; arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {}; arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,JSON.parse(JSON.stringify(this.localParam)));
Object.assign(arg.param,_param);
}
return true; return true;
} }
......
<template> <template>
<div :class="editorClass">
<textarea :id="id"></textarea> <textarea :id="id"></textarea>
</div>
</template> </template>
<script lang = 'ts'> <script lang = 'ts'>
import { Vue, Component, Prop, Model, Watch } from 'vue-property-decorator'; import { Vue, Component, Prop, Model, Watch } from 'vue-property-decorator';
...@@ -19,6 +21,7 @@ import 'tinymce/plugins/codesample'; ...@@ -19,6 +21,7 @@ import 'tinymce/plugins/codesample';
import 'tinymce/plugins/code'; import 'tinymce/plugins/code';
import 'tinymce/plugins/fullscreen'; import 'tinymce/plugins/fullscreen';
import 'tinymce/plugins/preview'; import 'tinymce/plugins/preview';
import 'tinymce/plugins/fullscreen';
import 'tinymce/icons/default/icons.min.js'; import 'tinymce/icons/default/icons.min.js';
const tinymceCode:any = tinymce; const tinymceCode:any = tinymce;
...@@ -191,6 +194,20 @@ export default class AppRichTextEditor extends Vue { ...@@ -191,6 +194,20 @@ export default class AppRichTextEditor extends Vue {
*/ */
public isNeedInit:boolean = false; public isNeedInit:boolean = false;
/**
* 上传的图片id与类型集合
* @type {string}
* @memberof AppRichTextEditor
*/
public imgsrc: Array<any> = [];
/**
* 编辑器样式类
* @type {string}
* @memberof AppRichTextEditor
*/
public editorClass: string = 'app-rich-text-editor';
/** /**
* 生命周期 * 生命周期
* *
...@@ -238,6 +255,29 @@ export default class AppRichTextEditor extends Vue { ...@@ -238,6 +255,29 @@ export default class AppRichTextEditor extends Vue {
*/ */
public mounted() { public mounted() {
this.init(); this.init();
const ele: any = this.isDrawer(this.$el);
let index: number = ele.style.transform.indexOf('translateX');
if(index >= 0) {
let num: string = ele.style.transform.substring(index + 12, index + 15);
this.editorClass = this.editorClass + (-parseInt(num));
}
}
/**
* 是否抽屉打开
*
* @memberof AppRichTextEditor
*/
public isDrawer(ele: any): any {
let pele: any = ele.parentNode;
if(!pele) {
return false;
}
if(pele.className.indexOf('studio-drawer-content') >= 0) {
return pele;
}
return this.isDrawer(pele);
} }
/** /**
...@@ -259,6 +299,10 @@ export default class AppRichTextEditor extends Vue { ...@@ -259,6 +299,10 @@ export default class AppRichTextEditor extends Vue {
@Watch('value', { immediate: true, deep: true }) @Watch('value', { immediate: true, deep: true })
oncurrentContent(newval: any, val: any) { oncurrentContent(newval: any, val: any) {
const content: any = this.editor ? this.editor.getContent() : undefined; const content: any = this.editor ? this.editor.getContent() : undefined;
const url = this.downloadUrl.substring(3);
if(newval) {
newval = newval.replace(/\{(\d+)\.(bmp|jpg|jpeg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp)\}/g, `${url}/$1`);
}
if (!Object.is(newval,content)) { if (!Object.is(newval,content)) {
this.init(); this.init();
} }
...@@ -292,8 +336,8 @@ export default class AppRichTextEditor extends Vue { ...@@ -292,8 +336,8 @@ export default class AppRichTextEditor extends Vue {
height: richtexteditor.height, height: richtexteditor.height,
min_height: 400, min_height: 400,
branding: false, branding: false,
plugins: ['link', 'paste', 'table', 'image', 'codesample', 'code', 'fullscreen', 'preview', 'quickbars'], plugins: ['link', 'paste', 'table', 'image', 'codesample', 'code', 'fullscreen', 'preview', 'quickbars', 'fullscreen'],
toolbar: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | outdent indent | link image', toolbar: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | outdent indent | link image | preview code fullscreen',
quickbars_insert_toolbar: false, quickbars_insert_toolbar: false,
quickbars_selection_toolbar: 'forecolor fontsizeselect fontselect', quickbars_selection_toolbar: 'forecolor fontsizeselect fontselect',
codesample_languages: [ codesample_languages: [
...@@ -316,7 +360,16 @@ export default class AppRichTextEditor extends Vue { ...@@ -316,7 +360,16 @@ export default class AppRichTextEditor extends Vue {
setup: (editor: any) => { setup: (editor: any) => {
richtexteditor.editor = editor; richtexteditor.editor = editor;
editor.on('blur', () => { editor.on('blur', () => {
const content = editor.getContent(); let content = editor.getContent();
const url = richtexteditor.downloadUrl.substring(3);
let newContent: string = "";
const imgsrc = richtexteditor.imgsrc;
if(imgsrc && imgsrc.length > 0){
imgsrc.forEach((item: any)=>{
newContent = content.replace(url+"/"+item.id,"{"+item.id+item.type+"}");
content = newContent;
});
}
richtexteditor.$emit('change', content); richtexteditor.$emit('change', content);
}); });
}, },
...@@ -335,6 +388,8 @@ export default class AppRichTextEditor extends Vue { ...@@ -335,6 +388,8 @@ export default class AppRichTextEditor extends Vue {
} }
this.uploadUrl = _url; this.uploadUrl = _url;
richtexteditor.uploadFile(_url, formData).subscribe((file: any) => { richtexteditor.uploadFile(_url, formData).subscribe((file: any) => {
const item: any = { id: file.fileid, type: file.ext };
richtexteditor.imgsrc.push(item);
let downloadUrl = richtexteditor.downloadUrl; let downloadUrl = richtexteditor.downloadUrl;
if (file.filename) { if (file.filename) {
const id: string = file.fileid; const id: string = file.fileid;
...@@ -438,4 +493,22 @@ export default class AppRichTextEditor extends Vue { ...@@ -438,4 +493,22 @@ export default class AppRichTextEditor extends Vue {
.tox-statusbar__text-container{ .tox-statusbar__text-container{
display: none !important; display: none !important;
} }
.app-rich-text-editor-100 {
.tox-fullscreen {
height: 100% !important;
transform: translateX(100%);
}
.tox-blocker {
transform: translateX(100%);
}
}
.app-rich-text-editor-200 {
.tox-fullscreen {
height: 100% !important;
transform: translateX(200%);
}
.tox-blocker {
transform: translateX(200%);
}
}
</style> </style>
\ No newline at end of file
...@@ -61,4 +61,12 @@ export interface EAMLocationType { ...@@ -61,4 +61,12 @@ export interface EAMLocationType {
* @memberof EAMLocationType * @memberof EAMLocationType
*/ */
eamlocationstatemodelid?: any; eamlocationstatemodelid?: any;
/**
* 功能位置状态模型
*
* @returns {*}
* @memberof EAMLocationType
*/
eamlocationstatemodelname?: any;
} }
\ No newline at end of file
...@@ -69,4 +69,36 @@ export interface EAMLocation { ...@@ -69,4 +69,36 @@ export interface EAMLocation {
* @memberof EAMLocation * @memberof EAMLocation
*/ */
peamlocationid?: any; peamlocationid?: any;
/**
* 功能位置状态标识
*
* @returns {*}
* @memberof EAMLocation
*/
eamlocationstateid?: any;
/**
* 上级位置
*
* @returns {*}
* @memberof EAMLocation
*/
peamlocationname?: any;
/**
* 功能位置类型
*
* @returns {*}
* @memberof EAMLocation
*/
eamlocationtypename?: any;
/**
* 功能位置状态
*
* @returns {*}
* @memberof EAMLocation
*/
eamlocationstatename?: any;
} }
\ No newline at end of file
...@@ -129,6 +129,8 @@ export default { ...@@ -129,6 +129,8 @@ export default {
menuitem1: "功能位置", menuitem1: "功能位置",
menuitem6: "功能位置状态管理", menuitem6: "功能位置状态管理",
menuitem7: "功能位置状态模型管理", menuitem7: "功能位置状态模型管理",
menuitem8: "功能位置类型",
menuitem9: "功能位置",
menuitem2: "资产管理", menuitem2: "资产管理",
menuitem3: "维护申请", menuitem3: "维护申请",
menuitem4: "工单管理", menuitem4: "工单管理",
......
...@@ -129,6 +129,8 @@ export default { ...@@ -129,6 +129,8 @@ export default {
menuitem1: "功能位置", menuitem1: "功能位置",
menuitem6: "功能位置状态管理", menuitem6: "功能位置状态管理",
menuitem7: "功能位置状态模型管理", menuitem7: "功能位置状态模型管理",
menuitem8: "功能位置类型",
menuitem9: "功能位置",
menuitem2: "资产管理", menuitem2: "资产管理",
menuitem3: "维护申请", menuitem3: "维护申请",
menuitem4: "工单管理", menuitem4: "工单管理",
......
...@@ -8,5 +8,108 @@ export default { ...@@ -8,5 +8,108 @@ export default {
updateman: "更新人", updateman: "更新人",
updatedate: "更新时间", updatedate: "更新时间",
eamlocationstatemodelid: "功能位置状态模型标识", eamlocationstatemodelid: "功能位置状态模型标识",
eamlocationstatemodelname: "功能位置状态模型",
},
views: {
gridview: {
caption: "功能位置类型",
title: "功能位置类型表格视图",
},
editview: {
caption: "功能位置类型",
title: "功能位置类型编辑视图",
},
},
main_form: {
details: {
group1: "功能位置类型基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "功能位置类型标识",
srfmajortext: "功能位置类型名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
eamlocationtypeid: "功能位置类型标识",
eamlocationtypename: "功能位置类型名称",
eamlocationstatemodelname: "功能位置状态模型",
eamlocationstatemodelid: "功能位置状态模型标识",
},
uiactions: {
},
},
main_grid: {
columns: {
eamlocationtypeid: "功能位置类型标识",
eamlocationtypename: "功能位置类型名称",
eamlocationstatemodelname: "功能位置状态模型",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem5: {
caption: "New",
tip: "New",
},
seperator1: {
caption: "",
tip: "",
},
tbitem2: {
caption: "Edit",
tip: "Edit {0}",
},
seperator2: {
caption: "",
tip: "",
},
tbitem1: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem10: {
caption: "Filter",
tip: "Filter",
},
},
editviewtoolbar_toolbar: {
tbitem2: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem1: {
caption: "关闭",
tip: "关闭",
},
}, },
}; };
\ No newline at end of file
...@@ -7,5 +7,108 @@ export default { ...@@ -7,5 +7,108 @@ export default {
updateman: "更新人", updateman: "更新人",
updatedate: "更新时间", updatedate: "更新时间",
eamlocationstatemodelid: "功能位置状态模型标识", eamlocationstatemodelid: "功能位置状态模型标识",
eamlocationstatemodelname: "功能位置状态模型",
},
views: {
gridview: {
caption: "功能位置类型",
title: "功能位置类型表格视图",
},
editview: {
caption: "功能位置类型",
title: "功能位置类型编辑视图",
},
},
main_form: {
details: {
group1: "功能位置类型基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "功能位置类型标识",
srfmajortext: "功能位置类型名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
eamlocationtypeid: "功能位置类型标识",
eamlocationtypename: "功能位置类型名称",
eamlocationstatemodelname: "功能位置状态模型",
eamlocationstatemodelid: "功能位置状态模型标识",
},
uiactions: {
},
},
main_grid: {
columns: {
eamlocationtypeid: "功能位置类型标识",
eamlocationtypename: "功能位置类型名称",
eamlocationstatemodelname: "功能位置状态模型",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem5: {
caption: "新建",
tip: "新建",
},
seperator1: {
caption: "",
tip: "",
},
tbitem2: {
caption: "编辑",
tip: "编辑",
},
seperator2: {
caption: "",
tip: "",
},
tbitem1: {
caption: "拷贝",
tip: "拷贝",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "导出",
tip: "导出",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem10: {
caption: "过滤",
tip: "过滤",
},
},
editviewtoolbar_toolbar: {
tbitem2: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem1: {
caption: "关闭",
tip: "关闭",
},
}, },
}; };
\ No newline at end of file
...@@ -9,5 +9,200 @@ export default { ...@@ -9,5 +9,200 @@ export default {
updatedate: "更新时间", updatedate: "更新时间",
eamlocationtypeid: "功能位置类型标识", eamlocationtypeid: "功能位置类型标识",
peamlocationid: "上级功能位置标识", peamlocationid: "上级功能位置标识",
eamlocationstateid: "功能位置状态标识",
peamlocationname: "上级位置",
eamlocationtypename: "功能位置类型",
eamlocationstatename: "功能位置状态",
},
views: {
info_mainview: {
caption: "功能位置",
title: "功能位置编辑视图",
},
childgridview: {
caption: "功能位置",
title: "功能位置表格视图",
},
summaryview: {
caption: "功能位置",
title: "功能位置数据看板视图",
},
infoview: {
caption: "功能位置",
title: "功能位置信息",
},
gridview: {
caption: "功能位置",
title: "功能位置表格视图",
},
},
info_main_form: {
details: {
group1: "功能位置基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "功能位置标识",
srfmajortext: "功能位置名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
eamlocationid: "功能位置标识",
eamlocationname: "功能位置名称",
eamlocationtypename: "功能位置类型",
peamlocationname: "上级位置",
},
uiactions: {
},
},
main_form: {
details: {
group1: "功能位置基本信息",
formpage1: "基本信息",
group2: "操作信息",
formpage2: "其它",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "功能位置标识",
srfmajortext: "功能位置名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
eamlocationid: "功能位置标识",
},
uiactions: {
},
},
childgrid_grid: {
columns: {
peamlocationname: "上级位置",
eamlocationid: "功能位置标识",
eamlocationname: "功能位置名称",
eamlocationtypename: "功能位置类型",
},
uiactions: {
},
},
main_grid: {
columns: {
eamlocationid: "功能位置标识",
eamlocationname: "功能位置名称",
eamlocationtypename: "功能位置类型",
peamlocationname: "上级位置",
eamlocationstatename: "功能位置状态",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
childgridviewtoolbar_toolbar: {
tbitem5: {
caption: "New",
tip: "New",
},
seperator1: {
caption: "",
tip: "",
},
tbitem2: {
caption: "Edit",
tip: "Edit {0}",
},
seperator2: {
caption: "",
tip: "",
},
tbitem1: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem10: {
caption: "Filter",
tip: "Filter",
},
},
editviewtoolbar_toolbar: {
tbitem2: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem1: {
caption: "关闭",
tip: "关闭",
},
},
gridviewtoolbar_toolbar: {
tbitem5: {
caption: "New",
tip: "New",
},
seperator1: {
caption: "",
tip: "",
},
tbitem2: {
caption: "Edit",
tip: "Edit {0}",
},
seperator2: {
caption: "",
tip: "",
},
tbitem1: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem10: {
caption: "Filter",
tip: "Filter",
},
}, },
}; };
\ No newline at end of file
...@@ -8,5 +8,200 @@ export default { ...@@ -8,5 +8,200 @@ export default {
updatedate: "更新时间", updatedate: "更新时间",
eamlocationtypeid: "功能位置类型标识", eamlocationtypeid: "功能位置类型标识",
peamlocationid: "上级功能位置标识", peamlocationid: "上级功能位置标识",
eamlocationstateid: "功能位置状态标识",
peamlocationname: "上级位置",
eamlocationtypename: "功能位置类型",
eamlocationstatename: "功能位置状态",
},
views: {
info_mainview: {
caption: "功能位置",
title: "功能位置编辑视图",
},
childgridview: {
caption: "功能位置",
title: "功能位置表格视图",
},
summaryview: {
caption: "功能位置",
title: "功能位置数据看板视图",
},
infoview: {
caption: "功能位置",
title: "功能位置信息",
},
gridview: {
caption: "功能位置",
title: "功能位置表格视图",
},
},
info_main_form: {
details: {
group1: "功能位置基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "功能位置标识",
srfmajortext: "功能位置名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
eamlocationid: "功能位置标识",
eamlocationname: "功能位置名称",
eamlocationtypename: "功能位置类型",
peamlocationname: "上级位置",
},
uiactions: {
},
},
main_form: {
details: {
group1: "功能位置基本信息",
formpage1: "基本信息",
group2: "操作信息",
formpage2: "其它",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "功能位置标识",
srfmajortext: "功能位置名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
eamlocationid: "功能位置标识",
},
uiactions: {
},
},
childgrid_grid: {
columns: {
peamlocationname: "上级位置",
eamlocationid: "功能位置标识",
eamlocationname: "功能位置名称",
eamlocationtypename: "功能位置类型",
},
uiactions: {
},
},
main_grid: {
columns: {
eamlocationid: "功能位置标识",
eamlocationname: "功能位置名称",
eamlocationtypename: "功能位置类型",
peamlocationname: "上级位置",
eamlocationstatename: "功能位置状态",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
childgridviewtoolbar_toolbar: {
tbitem5: {
caption: "新建",
tip: "新建",
},
seperator1: {
caption: "",
tip: "",
},
tbitem2: {
caption: "编辑",
tip: "编辑",
},
seperator2: {
caption: "",
tip: "",
},
tbitem1: {
caption: "拷贝",
tip: "拷贝",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "导出",
tip: "导出",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem10: {
caption: "过滤",
tip: "过滤",
},
},
editviewtoolbar_toolbar: {
tbitem2: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem1: {
caption: "关闭",
tip: "关闭",
},
},
gridviewtoolbar_toolbar: {
tbitem5: {
caption: "新建",
tip: "新建",
},
seperator1: {
caption: "",
tip: "",
},
tbitem2: {
caption: "编辑",
tip: "编辑",
},
seperator2: {
caption: "",
tip: "",
},
tbitem1: {
caption: "拷贝",
tip: "拷贝",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "导出",
tip: "导出",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem10: {
caption: "过滤",
tip: "过滤",
},
}, },
}; };
\ No newline at end of file
...@@ -117,6 +117,42 @@ mock.onGet('v7/app-index-viewappmenu').reply((config: any) => { ...@@ -117,6 +117,42 @@ mock.onGet('v7/app-index-viewappmenu').reply((config: any) => {
textcls: '', textcls: '',
appfunctag: '_2', appfunctag: '_2',
resourcetag: '', resourcetag: '',
},
{
id: '6B6D828E-5B2A-4DF2-B437-0DDD328DAD7D',
name: 'menuitem8',
text: '功能位置类型',
type: 'MENUITEM',
counterid: '',
tooltip: '功能位置类型',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: '_4',
resourcetag: '',
},
{
id: '6E2E7A7B-EDEF-460B-84A7-A2777BDD996E',
name: 'menuitem9',
text: '功能位置',
type: 'MENUITEM',
counterid: '',
tooltip: '功能位置',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: '_5',
resourcetag: '',
}, },
], ],
}, },
......
...@@ -114,16 +114,165 @@ mock.onGet(new RegExp(/^\/eamlocationstatemodellines\/([a-zA-Z0-9\-\;]{1,35})\/s ...@@ -114,16 +114,165 @@ mock.onGet(new RegExp(/^\/eamlocationstatemodellines\/([a-zA-Z0-9\-\;]{1,35})\/s
console.groupEnd(); console.groupEnd();
return [status, _items]; return [status, _items];
}); });
// URI参数传递情况未实现
// URI参数传递情况未实现 // Create
// URI参数传递情况未实现 mock.onPost(new RegExp(/^\/eamlocationstatemodellines\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
// URI参数传递情况未实现 console.groupCollapsed("实体:eamlocationstatemodelline 方法: Create");
// URI参数传递情况未实现 console.table({url:config.url, method: config.method, data:config.data});
// URI参数传递情况未实现 let status = MockAdapter.mockStatus(config);
// URI参数传递情况未实现 if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationstatemodellineid'];
const matchArray:any = new RegExp(/^\/eamlocationstatemodellines\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas[0]);
console.groupEnd();
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/eamlocationstatemodellines\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstatemodelline 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationstatemodellineid'];
const matchArray:any = new RegExp(/^\/eamlocationstatemodellines\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.eamlocationstatemodellineid, tempValue.eamlocationstatemodellineid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eamlocationstatemodellineid'] == tempValue['eamlocationstatemodellineid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/eamlocationstatemodellines\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstatemodelline 方法: GetDraft");
console.table({url:config.url, method: config.method, data:config.data});
// GetDraft
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/eamlocationstatemodellines\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstatemodelline 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationstatemodellineid'];
const matchArray:any = new RegExp(/^\/eamlocationstatemodellines\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.eamlocationstatemodellineid, tempValue.eamlocationstatemodellineid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eamlocationstatemodellineid'] == tempValue['eamlocationstatemodellineid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/eamlocationstatemodellines\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstatemodelline 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationstatemodellineid'];
const matchArray:any = new RegExp(/^\/eamlocationstatemodellines\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.eamlocationstatemodellineid, tempValue.eamlocationstatemodellineid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eamlocationstatemodellineid'] == tempValue['eamlocationstatemodellineid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// FetchDefault // FetchDefault
mock.onGet(new RegExp(/^\/eamlocationstatemodellines\/select$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/eamlocationstatemodellines\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstatemodelline 方法: FetchDefault"); console.groupCollapsed("实体:eamlocationstatemodelline 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
...@@ -138,7 +287,7 @@ mock.onGet(new RegExp(/^\/eamlocationstatemodellines\/select$/)).reply((config: ...@@ -138,7 +287,7 @@ mock.onGet(new RegExp(/^\/eamlocationstatemodellines\/select$/)).reply((config:
}); });
// FetchDefault // FetchDefault
mock.onGet(new RegExp(/^\/eamlocationstatemodellines\/select(\?[\w-./?%&=,]*)*$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/eamlocationstatemodellines\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstatemodelline 方法: FetchDefault"); console.groupCollapsed("实体:eamlocationstatemodelline 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){ if(config.url.includes('page')){
...@@ -173,3 +322,59 @@ mock.onGet(new RegExp(/^\/eamlocationstatemodellines\/select(\?[\w-./?%&=,]*)*$/ ...@@ -173,3 +322,59 @@ mock.onGet(new RegExp(/^\/eamlocationstatemodellines\/select(\?[\w-./?%&=,]*)*$/
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/eamlocationstatemodellines\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstatemodelline 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationstatemodellineid'];
const matchArray:any = new RegExp(/^\/eamlocationstatemodellines\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.eamlocationstatemodellineid, tempValue.eamlocationstatemodellineid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/eamlocationstatemodellines\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstatemodelline 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationstatemodellineid'];
const matchArray:any = new RegExp(/^\/eamlocationstatemodellines\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.eamlocationstatemodellineid, tempValue.eamlocationstatemodellineid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
...@@ -114,16 +114,165 @@ mock.onGet(new RegExp(/^\/eamlocationstatemodels\/([a-zA-Z0-9\-\;]{1,35})\/selec ...@@ -114,16 +114,165 @@ mock.onGet(new RegExp(/^\/eamlocationstatemodels\/([a-zA-Z0-9\-\;]{1,35})\/selec
console.groupEnd(); console.groupEnd();
return [status, _items]; return [status, _items];
}); });
// URI参数传递情况未实现
// URI参数传递情况未实现 // Create
// URI参数传递情况未实现 mock.onPost(new RegExp(/^\/eamlocationstatemodels\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
// URI参数传递情况未实现 console.groupCollapsed("实体:eamlocationstatemodel 方法: Create");
// URI参数传递情况未实现 console.table({url:config.url, method: config.method, data:config.data});
// URI参数传递情况未实现 let status = MockAdapter.mockStatus(config);
// URI参数传递情况未实现 if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationstatemodelid'];
const matchArray:any = new RegExp(/^\/eamlocationstatemodels\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas[0]);
console.groupEnd();
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/eamlocationstatemodels\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstatemodel 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationstatemodelid'];
const matchArray:any = new RegExp(/^\/eamlocationstatemodels\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.eamlocationstatemodelid, tempValue.eamlocationstatemodelid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eamlocationstatemodelid'] == tempValue['eamlocationstatemodelid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/eamlocationstatemodels\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstatemodel 方法: GetDraft");
console.table({url:config.url, method: config.method, data:config.data});
// GetDraft
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/eamlocationstatemodels\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstatemodel 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationstatemodelid'];
const matchArray:any = new RegExp(/^\/eamlocationstatemodels\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.eamlocationstatemodelid, tempValue.eamlocationstatemodelid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eamlocationstatemodelid'] == tempValue['eamlocationstatemodelid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/eamlocationstatemodels\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstatemodel 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationstatemodelid'];
const matchArray:any = new RegExp(/^\/eamlocationstatemodels\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.eamlocationstatemodelid, tempValue.eamlocationstatemodelid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eamlocationstatemodelid'] == tempValue['eamlocationstatemodelid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// FetchDefault // FetchDefault
mock.onGet(new RegExp(/^\/eamlocationstatemodels\/select$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/eamlocationstatemodels\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstatemodel 方法: FetchDefault"); console.groupCollapsed("实体:eamlocationstatemodel 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
...@@ -138,7 +287,7 @@ mock.onGet(new RegExp(/^\/eamlocationstatemodels\/select$/)).reply((config: any) ...@@ -138,7 +287,7 @@ mock.onGet(new RegExp(/^\/eamlocationstatemodels\/select$/)).reply((config: any)
}); });
// FetchDefault // FetchDefault
mock.onGet(new RegExp(/^\/eamlocationstatemodels\/select(\?[\w-./?%&=,]*)*$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/eamlocationstatemodels\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstatemodel 方法: FetchDefault"); console.groupCollapsed("实体:eamlocationstatemodel 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){ if(config.url.includes('page')){
...@@ -173,3 +322,59 @@ mock.onGet(new RegExp(/^\/eamlocationstatemodels\/select(\?[\w-./?%&=,]*)*$/)).r ...@@ -173,3 +322,59 @@ mock.onGet(new RegExp(/^\/eamlocationstatemodels\/select(\?[\w-./?%&=,]*)*$/)).r
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/eamlocationstatemodels\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstatemodel 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationstatemodelid'];
const matchArray:any = new RegExp(/^\/eamlocationstatemodels\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.eamlocationstatemodelid, tempValue.eamlocationstatemodelid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/eamlocationstatemodels\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstatemodel 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationstatemodelid'];
const matchArray:any = new RegExp(/^\/eamlocationstatemodels\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.eamlocationstatemodelid, tempValue.eamlocationstatemodelid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
...@@ -114,16 +114,165 @@ mock.onGet(new RegExp(/^\/eamlocationstates\/([a-zA-Z0-9\-\;]{1,35})\/select$/)) ...@@ -114,16 +114,165 @@ mock.onGet(new RegExp(/^\/eamlocationstates\/([a-zA-Z0-9\-\;]{1,35})\/select$/))
console.groupEnd(); console.groupEnd();
return [status, _items]; return [status, _items];
}); });
// URI参数传递情况未实现
// URI参数传递情况未实现 // Create
// URI参数传递情况未实现 mock.onPost(new RegExp(/^\/eamlocationstates\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
// URI参数传递情况未实现 console.groupCollapsed("实体:eamlocationstate 方法: Create");
// URI参数传递情况未实现 console.table({url:config.url, method: config.method, data:config.data});
// URI参数传递情况未实现 let status = MockAdapter.mockStatus(config);
// URI参数传递情况未实现 if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationstateid'];
const matchArray:any = new RegExp(/^\/eamlocationstates\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas[0]);
console.groupEnd();
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/eamlocationstates\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstate 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationstateid'];
const matchArray:any = new RegExp(/^\/eamlocationstates\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.eamlocationstateid, tempValue.eamlocationstateid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eamlocationstateid'] == tempValue['eamlocationstateid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/eamlocationstates\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstate 方法: GetDraft");
console.table({url:config.url, method: config.method, data:config.data});
// GetDraft
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/eamlocationstates\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstate 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationstateid'];
const matchArray:any = new RegExp(/^\/eamlocationstates\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.eamlocationstateid, tempValue.eamlocationstateid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eamlocationstateid'] == tempValue['eamlocationstateid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/eamlocationstates\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstate 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationstateid'];
const matchArray:any = new RegExp(/^\/eamlocationstates\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.eamlocationstateid, tempValue.eamlocationstateid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eamlocationstateid'] == tempValue['eamlocationstateid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// FetchDefault // FetchDefault
mock.onGet(new RegExp(/^\/eamlocationstates\/select$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/eamlocationstates\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstate 方法: FetchDefault"); console.groupCollapsed("实体:eamlocationstate 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
...@@ -138,7 +287,7 @@ mock.onGet(new RegExp(/^\/eamlocationstates\/select$/)).reply((config: any) => { ...@@ -138,7 +287,7 @@ mock.onGet(new RegExp(/^\/eamlocationstates\/select$/)).reply((config: any) => {
}); });
// FetchDefault // FetchDefault
mock.onGet(new RegExp(/^\/eamlocationstates\/select(\?[\w-./?%&=,]*)*$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/eamlocationstates\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstate 方法: FetchDefault"); console.groupCollapsed("实体:eamlocationstate 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){ if(config.url.includes('page')){
...@@ -173,3 +322,59 @@ mock.onGet(new RegExp(/^\/eamlocationstates\/select(\?[\w-./?%&=,]*)*$/)).reply( ...@@ -173,3 +322,59 @@ mock.onGet(new RegExp(/^\/eamlocationstates\/select(\?[\w-./?%&=,]*)*$/)).reply(
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/eamlocationstates\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstate 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationstateid'];
const matchArray:any = new RegExp(/^\/eamlocationstates\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.eamlocationstateid, tempValue.eamlocationstateid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/eamlocationstates\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationstate 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationstateid'];
const matchArray:any = new RegExp(/^\/eamlocationstates\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.eamlocationstateid, tempValue.eamlocationstateid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
...@@ -114,16 +114,165 @@ mock.onGet(new RegExp(/^\/eamlocationtypes\/([a-zA-Z0-9\-\;]{1,35})\/select$/)). ...@@ -114,16 +114,165 @@ mock.onGet(new RegExp(/^\/eamlocationtypes\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).
console.groupEnd(); console.groupEnd();
return [status, _items]; return [status, _items];
}); });
// URI参数传递情况未实现
// URI参数传递情况未实现 // Create
// URI参数传递情况未实现 mock.onPost(new RegExp(/^\/eamlocationtypes\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
// URI参数传递情况未实现 console.groupCollapsed("实体:eamlocationtype 方法: Create");
// URI参数传递情况未实现 console.table({url:config.url, method: config.method, data:config.data});
// URI参数传递情况未实现 let status = MockAdapter.mockStatus(config);
// URI参数传递情况未实现 if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationtypeid'];
const matchArray:any = new RegExp(/^\/eamlocationtypes\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas[0]);
console.groupEnd();
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/eamlocationtypes\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationtype 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationtypeid'];
const matchArray:any = new RegExp(/^\/eamlocationtypes\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.eamlocationtypeid, tempValue.eamlocationtypeid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eamlocationtypeid'] == tempValue['eamlocationtypeid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/eamlocationtypes\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationtype 方法: GetDraft");
console.table({url:config.url, method: config.method, data:config.data});
// GetDraft
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/eamlocationtypes\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationtype 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationtypeid'];
const matchArray:any = new RegExp(/^\/eamlocationtypes\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.eamlocationtypeid, tempValue.eamlocationtypeid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eamlocationtypeid'] == tempValue['eamlocationtypeid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/eamlocationtypes\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationtype 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationtypeid'];
const matchArray:any = new RegExp(/^\/eamlocationtypes\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.eamlocationtypeid, tempValue.eamlocationtypeid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eamlocationtypeid'] == tempValue['eamlocationtypeid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// FetchDefault // FetchDefault
mock.onGet(new RegExp(/^\/eamlocationtypes\/select$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/eamlocationtypes\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationtype 方法: FetchDefault"); console.groupCollapsed("实体:eamlocationtype 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
...@@ -138,7 +287,7 @@ mock.onGet(new RegExp(/^\/eamlocationtypes\/select$/)).reply((config: any) => { ...@@ -138,7 +287,7 @@ mock.onGet(new RegExp(/^\/eamlocationtypes\/select$/)).reply((config: any) => {
}); });
// FetchDefault // FetchDefault
mock.onGet(new RegExp(/^\/eamlocationtypes\/select(\?[\w-./?%&=,]*)*$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/eamlocationtypes\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationtype 方法: FetchDefault"); console.groupCollapsed("实体:eamlocationtype 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){ if(config.url.includes('page')){
...@@ -173,3 +322,59 @@ mock.onGet(new RegExp(/^\/eamlocationtypes\/select(\?[\w-./?%&=,]*)*$/)).reply(( ...@@ -173,3 +322,59 @@ mock.onGet(new RegExp(/^\/eamlocationtypes\/select(\?[\w-./?%&=,]*)*$/)).reply((
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/eamlocationtypes\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationtype 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationtypeid'];
const matchArray:any = new RegExp(/^\/eamlocationtypes\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.eamlocationtypeid, tempValue.eamlocationtypeid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/eamlocationtypes\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocationtype 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationtypeid'];
const matchArray:any = new RegExp(/^\/eamlocationtypes\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.eamlocationtypeid, tempValue.eamlocationtypeid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
...@@ -114,16 +114,165 @@ mock.onGet(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).repl ...@@ -114,16 +114,165 @@ mock.onGet(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).repl
console.groupEnd(); console.groupEnd();
return [status, _items]; return [status, _items];
}); });
// URI参数传递情况未实现
// URI参数传递情况未实现 // Create
// URI参数传递情况未实现 mock.onPost(new RegExp(/^\/eamlocations\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
// URI参数传递情况未实现 console.groupCollapsed("实体:eamlocation 方法: Create");
// URI参数传递情况未实现 console.table({url:config.url, method: config.method, data:config.data});
// URI参数传递情况未实现 let status = MockAdapter.mockStatus(config);
// URI参数传递情况未实现 if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas[0]);
console.groupEnd();
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/eamlocations\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocation 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.eamlocationid, tempValue.eamlocationid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eamlocationid'] == tempValue['eamlocationid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/eamlocations\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocation 方法: GetDraft");
console.table({url:config.url, method: config.method, data:config.data});
// GetDraft
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/eamlocations\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocation 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.eamlocationid, tempValue.eamlocationid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eamlocationid'] == tempValue['eamlocationid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/eamlocations\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocation 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.eamlocationid, tempValue.eamlocationid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eamlocationid'] == tempValue['eamlocationid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// FetchDefault // FetchDefault
mock.onGet(new RegExp(/^\/eamlocations\/select$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/eamlocations\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocation 方法: FetchDefault"); console.groupCollapsed("实体:eamlocation 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
...@@ -138,7 +287,7 @@ mock.onGet(new RegExp(/^\/eamlocations\/select$/)).reply((config: any) => { ...@@ -138,7 +287,7 @@ mock.onGet(new RegExp(/^\/eamlocations\/select$/)).reply((config: any) => {
}); });
// FetchDefault // FetchDefault
mock.onGet(new RegExp(/^\/eamlocations\/select(\?[\w-./?%&=,]*)*$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/eamlocations\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocation 方法: FetchDefault"); console.groupCollapsed("实体:eamlocation 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){ if(config.url.includes('page')){
...@@ -173,3 +322,59 @@ mock.onGet(new RegExp(/^\/eamlocations\/select(\?[\w-./?%&=,]*)*$/)).reply((conf ...@@ -173,3 +322,59 @@ mock.onGet(new RegExp(/^\/eamlocations\/select(\?[\w-./?%&=,]*)*$/)).reply((conf
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocation 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.eamlocationid, tempValue.eamlocationid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocation 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['eamlocationid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.eamlocationid, tempValue.eamlocationid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
...@@ -23,6 +23,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -23,6 +23,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMLocationStateModelPickupView", "viewname": "EAMLocationStateModelPickupView",
"viewtag": "3d676a12800fca23bec463d5c5217413" "viewtag": "3d676a12800fca23bec463d5c5217413"
}, },
"eamlocationtypegridview": {
"title": "功能位置类型表格视图",
"caption": "功能位置类型",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationTypeGridView",
"viewtag": "4c95ec14aa2de5370d9d81f7d85f4bd5"
},
"eamlocationstatemodeleditview": { "eamlocationstatemodeleditview": {
"title": "功能位置状态模型编辑视图", "title": "功能位置状态模型编辑视图",
"caption": "功能位置状态模型", "caption": "功能位置状态模型",
...@@ -39,6 +47,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -39,6 +47,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMLocationStateModelGridView", "viewname": "EAMLocationStateModelGridView",
"viewtag": "9e9b3600ba892d31757bacef1dcc9458" "viewtag": "9e9b3600ba892d31757bacef1dcc9458"
}, },
"eamlocationinfo_mainview": {
"title": "功能位置编辑视图",
"caption": "功能位置",
"viewtype": "DEEDITVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationInfo_MainView",
"viewtag": "a82c591e524f7289432a30a5ccfa8908"
},
"eamlocationstatepickupview": { "eamlocationstatepickupview": {
"title": "功能位置状态数据选择视图", "title": "功能位置状态数据选择视图",
"caption": "功能位置状态", "caption": "功能位置状态",
...@@ -47,6 +63,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -47,6 +63,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMLocationStatePickupView", "viewname": "EAMLocationStatePickupView",
"viewtag": "a9f7eb2645c6505a232a0a13742c42a7" "viewtag": "a9f7eb2645c6505a232a0a13742c42a7"
}, },
"eamlocationchildgridview": {
"title": "功能位置表格视图",
"caption": "功能位置",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationChildGridView",
"viewtag": "b24fce391aeca43222a1017b50ba40e2"
},
"eamlocationstatemodellineeditview": { "eamlocationstatemodellineeditview": {
"title": "功能位置状态模型明细编辑视图", "title": "功能位置状态模型明细编辑视图",
"caption": "功能位置状态模型明细", "caption": "功能位置状态模型明细",
...@@ -71,6 +95,22 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -71,6 +95,22 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMLocationStateModelPickupGridView", "viewname": "EAMLocationStateModelPickupGridView",
"viewtag": "bb8b4b03a77ed63b8eb4ef3d62b669a6" "viewtag": "bb8b4b03a77ed63b8eb4ef3d62b669a6"
}, },
"eamlocationsummaryview": {
"title": "功能位置数据看板视图",
"caption": "功能位置",
"viewtype": "DEPORTALVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationSummaryView",
"viewtag": "cc29cbcb0398aa069d4b05f3469f0377"
},
"eamlocationinfoview": {
"title": "功能位置信息",
"caption": "功能位置",
"viewtype": "DETABEXPVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationInfoView",
"viewtag": "d3466c5c60a573062d543896976bf68c"
},
"appindexview": { "appindexview": {
"title": "应用首页视图", "title": "应用首页视图",
"caption": "资产管理", "caption": "资产管理",
...@@ -79,6 +119,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -79,6 +119,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "AppIndexView", "viewname": "AppIndexView",
"viewtag": "D44132B9-5261-4008-A146-6287A80D5D31" "viewtag": "D44132B9-5261-4008-A146-6287A80D5D31"
}, },
"eamlocationtypeeditview": {
"title": "功能位置类型编辑视图",
"caption": "功能位置类型",
"viewtype": "DEEDITVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationTypeEditView",
"viewtag": "dd09755644dcf1e57c062b4e08e4ce3a"
},
"eamlocationstatemodellinegridview": { "eamlocationstatemodellinegridview": {
"title": "功能位置状态模型明细表格视图", "title": "功能位置状态模型明细表格视图",
"caption": "功能位置状态模型明细", "caption": "功能位置状态模型明细",
...@@ -87,6 +135,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -87,6 +135,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMLocationStateModelLineGridView", "viewname": "EAMLocationStateModelLineGridView",
"viewtag": "ecd1ec6299b5b24e2004fa15c4eef92d" "viewtag": "ecd1ec6299b5b24e2004fa15c4eef92d"
}, },
"eamlocationgridview": {
"title": "功能位置表格视图",
"caption": "功能位置",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationGridView",
"viewtag": "eee617336f6dc6e5e97835d6309fd452"
},
"eamlocationstategridview": { "eamlocationstategridview": {
"title": "功能位置状态信息", "title": "功能位置状态信息",
"caption": "功能位置状态", "caption": "功能位置状态",
......
...@@ -2,13 +2,21 @@ export const PageComponents = { ...@@ -2,13 +2,21 @@ export const PageComponents = {
install(Vue: any, opt: any) { install(Vue: any, opt: any) {
Vue.component('eamlocation-state-model-pickup-grid-view', () => import('@pages/location/eamlocation-state-model-pickup-grid-view/eamlocation-state-model-pickup-grid-view.vue')); Vue.component('eamlocation-state-model-pickup-grid-view', () => import('@pages/location/eamlocation-state-model-pickup-grid-view/eamlocation-state-model-pickup-grid-view.vue'));
Vue.component('eamlocation-state-model-line-edit-view', () => import('@pages/location/eamlocation-state-model-line-edit-view/eamlocation-state-model-line-edit-view.vue')); Vue.component('eamlocation-state-model-line-edit-view', () => import('@pages/location/eamlocation-state-model-line-edit-view/eamlocation-state-model-line-edit-view.vue'));
Vue.component('eamlocation-state-edit-view', () => import('@pages/location/eamlocation-state-edit-view/eamlocation-state-edit-view.vue')); Vue.component('eamlocation-child-grid-view', () => import('@pages/location/eamlocation-child-grid-view/eamlocation-child-grid-view.vue'));
Vue.component('eamlocation-info-view', () => import('@pages/location/eamlocation-info-view/eamlocation-info-view.vue'));
Vue.component('eamlocation-state-grid-view', () => import('@pages/location/eamlocation-state-grid-view/eamlocation-state-grid-view.vue')); Vue.component('eamlocation-state-grid-view', () => import('@pages/location/eamlocation-state-grid-view/eamlocation-state-grid-view.vue'));
Vue.component('eamlocation-state-model-line-grid-view', () => import('@pages/location/eamlocation-state-model-line-grid-view/eamlocation-state-model-line-grid-view.vue')); Vue.component('eamlocation-state-model-line-grid-view', () => import('@pages/location/eamlocation-state-model-line-grid-view/eamlocation-state-model-line-grid-view.vue'));
Vue.component('eamlocation-type-edit-view', () => import('@pages/location/eamlocation-type-edit-view/eamlocation-type-edit-view.vue'));
Vue.component('eamlocation-state-pickup-view', () => import('@pages/location/eamlocation-state-pickup-view/eamlocation-state-pickup-view.vue'));
Vue.component('eamlocation-state-model-pickup-view', () => import('@pages/location/eamlocation-state-model-pickup-view/eamlocation-state-model-pickup-view.vue'));
Vue.component('eamlocation-info-main-view', () => import('@pages/location/eamlocation-info-main-view/eamlocation-info-main-view.vue'));
Vue.component('eamlocation-summary-view', () => import('@pages/location/eamlocation-summary-view/eamlocation-summary-view.vue'));
Vue.component('eamlocation-grid-view', () => import('@pages/location/eamlocation-grid-view/eamlocation-grid-view.vue'));
Vue.component('eamlocation-edit-view', () => import('@pages/location/eamlocation-edit-view/eamlocation-edit-view.vue'));
Vue.component('eamlocation-type-grid-view', () => import('@pages/location/eamlocation-type-grid-view/eamlocation-type-grid-view.vue'));
Vue.component('eamlocation-state-edit-view', () => import('@pages/location/eamlocation-state-edit-view/eamlocation-state-edit-view.vue'));
Vue.component('eamlocation-state-model-grid-view', () => import('@pages/location/eamlocation-state-model-grid-view/eamlocation-state-model-grid-view.vue')); Vue.component('eamlocation-state-model-grid-view', () => import('@pages/location/eamlocation-state-model-grid-view/eamlocation-state-model-grid-view.vue'));
Vue.component('eamlocation-state-pickup-grid-view', () => import('@pages/location/eamlocation-state-pickup-grid-view/eamlocation-state-pickup-grid-view.vue')); Vue.component('eamlocation-state-pickup-grid-view', () => import('@pages/location/eamlocation-state-pickup-grid-view/eamlocation-state-pickup-grid-view.vue'));
Vue.component('eamlocation-state-model-pickup-view', () => import('@pages/location/eamlocation-state-model-pickup-view/eamlocation-state-model-pickup-view.vue'));
Vue.component('eamlocation-state-pickup-view', () => import('@pages/location/eamlocation-state-pickup-view/eamlocation-state-pickup-view.vue'));
Vue.component('eamlocation-state-model-edit-view', () => import('@pages/location/eamlocation-state-model-edit-view/eamlocation-state-model-edit-view.vue')); Vue.component('eamlocation-state-model-edit-view', () => import('@pages/location/eamlocation-state-model-edit-view/eamlocation-state-model-edit-view.vue'));
} }
}; };
\ No newline at end of file
...@@ -72,18 +72,32 @@ const router = new Router({ ...@@ -72,18 +72,32 @@ const router = new Router({
component: () => import('@pages/location/eamlocation-state-model-line-edit-view/eamlocation-state-model-line-edit-view.vue'), component: () => import('@pages/location/eamlocation-state-model-line-edit-view/eamlocation-state-model-line-edit-view.vue'),
}, },
{ {
path: 'eamlocationstates/:eamlocationstate?/editview/:editview?', path: 'eamlocations/:eamlocation?/childgridview/:childgridview?',
meta: { meta: {
caption: 'entities.eamlocationstate.views.editview.title', caption: 'entities.eamlocation.views.childgridview.title',
info:'', info:'',
parameters: [ parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' }, { pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstates', parameterName: 'eamlocationstate' }, { pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'editview', parameterName: 'editview' }, { pathName: 'childgridview', parameterName: 'childgridview' },
], ],
requireAuth: true, requireAuth: true,
}, },
component: () => import('@pages/location/eamlocation-state-edit-view/eamlocation-state-edit-view.vue'), component: () => import('@pages/location/eamlocation-child-grid-view/eamlocation-child-grid-view.vue'),
},
{
path: 'eamlocations/:eamlocation?/infoview/:infoview?',
meta: {
caption: 'entities.eamlocation.views.infoview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'infoview', parameterName: 'infoview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-info-view/eamlocation-info-view.vue'),
}, },
{ {
path: 'eamlocationstates/:eamlocationstate?/gridview/:gridview?', path: 'eamlocationstates/:eamlocationstate?/gridview/:gridview?',
...@@ -114,32 +128,32 @@ const router = new Router({ ...@@ -114,32 +128,32 @@ const router = new Router({
component: () => import('@pages/location/eamlocation-state-model-line-grid-view/eamlocation-state-model-line-grid-view.vue'), component: () => import('@pages/location/eamlocation-state-model-line-grid-view/eamlocation-state-model-line-grid-view.vue'),
}, },
{ {
path: 'eamlocationstatemodels/:eamlocationstatemodel?/gridview/:gridview?', path: 'eamlocationtypes/:eamlocationtype?/editview/:editview?',
meta: { meta: {
caption: 'entities.eamlocationstatemodel.views.gridview.title', caption: 'entities.eamlocationtype.views.editview.title',
info:'', info:'',
parameters: [ parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' }, { pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstatemodels', parameterName: 'eamlocationstatemodel' }, { pathName: 'eamlocationtypes', parameterName: 'eamlocationtype' },
{ pathName: 'gridview', parameterName: 'gridview' }, { pathName: 'editview', parameterName: 'editview' },
], ],
requireAuth: true, requireAuth: true,
}, },
component: () => import('@pages/location/eamlocation-state-model-grid-view/eamlocation-state-model-grid-view.vue'), component: () => import('@pages/location/eamlocation-type-edit-view/eamlocation-type-edit-view.vue'),
}, },
{ {
path: 'eamlocationstates/:eamlocationstate?/pickupgridview/:pickupgridview?', path: 'eamlocationstates/:eamlocationstate?/pickupview/:pickupview?',
meta: { meta: {
caption: 'entities.eamlocationstate.views.pickupgridview.title', caption: 'entities.eamlocationstate.views.pickupview.title',
info:'', info:'',
parameters: [ parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' }, { pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstates', parameterName: 'eamlocationstate' }, { pathName: 'eamlocationstates', parameterName: 'eamlocationstate' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' }, { pathName: 'pickupview', parameterName: 'pickupview' },
], ],
requireAuth: true, requireAuth: true,
}, },
component: () => import('@pages/location/eamlocation-state-pickup-grid-view/eamlocation-state-pickup-grid-view.vue'), component: () => import('@pages/location/eamlocation-state-pickup-view/eamlocation-state-pickup-view.vue'),
}, },
{ {
path: 'eamlocationstatemodels/:eamlocationstatemodel?/pickupview/:pickupview?', path: 'eamlocationstatemodels/:eamlocationstatemodel?/pickupview/:pickupview?',
...@@ -156,18 +170,116 @@ const router = new Router({ ...@@ -156,18 +170,116 @@ const router = new Router({
component: () => import('@pages/location/eamlocation-state-model-pickup-view/eamlocation-state-model-pickup-view.vue'), component: () => import('@pages/location/eamlocation-state-model-pickup-view/eamlocation-state-model-pickup-view.vue'),
}, },
{ {
path: 'eamlocationstates/:eamlocationstate?/pickupview/:pickupview?', path: 'eamlocations/:eamlocation?/info_mainview/:info_mainview?',
meta: { meta: {
caption: 'entities.eamlocationstate.views.pickupview.title', caption: 'entities.eamlocation.views.info_mainview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'info_mainview', parameterName: 'info_mainview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-info-main-view/eamlocation-info-main-view.vue'),
},
{
path: 'eamlocations/:eamlocation?/summaryview/:summaryview?',
meta: {
caption: 'entities.eamlocation.views.summaryview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'summaryview', parameterName: 'summaryview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-summary-view/eamlocation-summary-view.vue'),
},
{
path: 'eamlocations/:eamlocation?/gridview/:gridview?',
meta: {
caption: 'entities.eamlocation.views.gridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-grid-view/eamlocation-grid-view.vue'),
},
{
path: 'eamlocations/:eamlocation?/editview/:editview?',
meta: {
caption: 'entities.eamlocation.views.editview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-edit-view/eamlocation-edit-view.vue'),
},
{
path: 'eamlocationtypes/:eamlocationtype?/gridview/:gridview?',
meta: {
caption: 'entities.eamlocationtype.views.gridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationtypes', parameterName: 'eamlocationtype' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-type-grid-view/eamlocation-type-grid-view.vue'),
},
{
path: 'eamlocationstates/:eamlocationstate?/editview/:editview?',
meta: {
caption: 'entities.eamlocationstate.views.editview.title',
info:'', info:'',
parameters: [ parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' }, { pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstates', parameterName: 'eamlocationstate' }, { pathName: 'eamlocationstates', parameterName: 'eamlocationstate' },
{ pathName: 'pickupview', parameterName: 'pickupview' }, { pathName: 'editview', parameterName: 'editview' },
], ],
requireAuth: true, requireAuth: true,
}, },
component: () => import('@pages/location/eamlocation-state-pickup-view/eamlocation-state-pickup-view.vue'), component: () => import('@pages/location/eamlocation-state-edit-view/eamlocation-state-edit-view.vue'),
},
{
path: 'eamlocationstatemodels/:eamlocationstatemodel?/gridview/:gridview?',
meta: {
caption: 'entities.eamlocationstatemodel.views.gridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstatemodels', parameterName: 'eamlocationstatemodel' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-state-model-grid-view/eamlocation-state-model-grid-view.vue'),
},
{
path: 'eamlocationstates/:eamlocationstate?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.eamlocationstate.views.pickupgridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstates', parameterName: 'eamlocationstate' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-state-pickup-grid-view/eamlocation-state-pickup-grid-view.vue'),
}, },
{ {
path: 'eamlocationstatemodels/:eamlocationstatemodel?/editview/:editview?', path: 'eamlocationstatemodels/:eamlocationstatemodel?/editview/:editview?',
......
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import EAMLocationAuthService from '@/authservice/eamlocation/eamlocation-auth-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
import CodeListService from "@service/app/codelist-service";
/**
* 功能位置表格视图视图基类
*
* @export
* @class EAMLocationChildGridViewBase
* @extends {GridViewBase}
*/
export class EAMLocationChildGridViewBase extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMLocationChildGridViewBase
*/
protected appDeName: string = 'eamlocation';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMLocationChildGridViewBase
*/
protected appDeKey: string = 'eamlocationid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMLocationChildGridViewBase
*/
protected appDeMajor: string = 'eamlocationname';
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof EAMLocationChildGridViewBase
*/
protected appEntityService: EAMLocationService = new EAMLocationService;
/**
* 实体权限服务对象
*
* @type EAMLocationUIService
* @memberof EAMLocationChildGridViewBase
*/
public appUIService: EAMLocationUIService = new EAMLocationUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMLocationChildGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMLocationChildGridViewBase
*/
protected model: any = {
srfCaption: 'entities.eamlocation.views.childgridview.caption',
srfTitle: 'entities.eamlocation.views.childgridview.title',
srfSubTitle: 'entities.eamlocation.views.childgridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMLocationChildGridViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof EAMLocationChildGridView
*/
public toolBarModels: any = {
tbitem5: { name: 'tbitem5', caption: '新建', 'isShowCaption': true, 'isShowIcon': true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'New', target: '', class: '' } },
seperator1: { name: 'seperator1', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem2: { name: 'tbitem2', caption: '编辑', 'isShowCaption': true, 'isShowIcon': true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY', class: '' } },
seperator2: { name: 'seperator2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem1: { name: 'tbitem1', caption: '拷贝', 'isShowCaption': true, 'isShowIcon': true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY', class: '' } },
tbitem15: { name: 'tbitem15', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem8: { name: 'tbitem8', caption: '删除', 'isShowCaption': true, 'isShowIcon': true, tooltip: '删除', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY', class: '' } },
tbitem16: { name: 'tbitem16', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem3: { name: 'tbitem3', caption: '导出', 'isShowCaption': true, 'isShowIcon': true, tooltip: '导出', iconcls: 'fa fa-file-excel-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ExportExcel', target: '' }, MaxRowCount: 1000, class: '' },
tbitem17: { name: 'tbitem17', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem10: { name: 'tbitem10', caption: '过滤', 'isShowCaption': true, 'isShowIcon': true, tooltip: '过滤', iconcls: 'fa fa-filter', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ToggleFilter', target: '', class: '' } },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'b24fce391aeca43222a1017b50ba40e2';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMLocationChildGridViewBase
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMLocationChildGridViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
opendata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
this.opendata(args,fullargs, params, $event, xData);
},
newdata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
this.newdata(args,fullargs, params, $event, xData);
},
grid: this.$refs.grid,
searchform: this.$refs.searchform,
keyPSDEField: 'eamlocation',
majorPSDEField: 'eamlocationname',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationChildGridViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem2')) {
this.toolbar_tbitem2_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem1')) {
this.toolbar_tbitem1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem7')) {
this.toolbar_tbitem7_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem10')) {
this.toolbar_tbitem10_click(null, '', $event2);
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationChildGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationChildGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationChildGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationChildGridViewBase
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationChildGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationChildGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationChildGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationChildGridViewBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem5_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"EAMLocation");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"EAMLocation");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"EAMLocation");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem8_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Remove(datas, contextJO,paramJO, $event, xData,this,"EAMLocation");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem3_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"EAMLocation");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem7_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.Print(datas, contextJO,paramJO, $event, xData,this,"EAMLocation");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem10_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,"EAMLocation");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMLocationChildGridView
*/
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
const data: any = {};
if(args[0].srfsourcekey){
data.srfsourcekey = args[0].srfsourcekey;
}
let tempContext = JSON.parse(JSON.stringify(this.context));
delete tempContext.eamlocation;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMLocationChildGridView
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
const localContext: any = null;
const localViewParam: any =null;
const data: any = {};
let tempContext = JSON.parse(JSON.stringify(this.context));
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMLocationChildGridViewBase
*/
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 EAMLocationChildGridViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { eamlocation: args[0].eamlocation })
}
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMLocationChildGridViewBase
*/
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 EAMLocationChildGridViewBase
*/
public Remove(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.remove instanceof Function)) {
return ;
}
xData.remove(args);
}
/**
* 导出
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMLocationChildGridViewBase
*/
public ExportExcel(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.exportExcel instanceof Function) || !$event) {
return ;
}
xData.exportExcel($event.exportparms);
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMLocationChildGridViewBase
*/
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 EAMLocationChildGridViewBase
*/
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;
}
}
}
\ No newline at end of file
<studio-view-style2 viewName="eamlocationchildgridview" viewTitle="功能位置表格视图" class='degridview eamlocation-child-grid-view'>
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" placeholder="功能位置名称" search @on-search="onSearch($event)"/>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<template slot="searchForm">
<view_searchform
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
@search="searchform_search($event)"
@load="searchform_load($event)"
@closeview="closeView($event)">
</view_searchform>
</template>
<view_grid
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:isSingleSelect="isGridSingleSelect"
:showBusyIndicator="true"
:isOpenEdit="false"
:gridRowActiveMode="gridRowActiveMode"
@save="onSave.apply(_self, arguments)"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
:newdata="newdata.bind(_self)"
:opendata="opendata.bind(_self)"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@remove="grid_remove($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</studio-view-style2>
\ No newline at end of file
<template src="./eamlocation-child-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMLocationChildGridViewBase } from './eamlocation-child-grid-view-base';
import view_grid from '@widgets/eamlocation/child-grid-grid/child-grid-grid.vue';
import view_searchform from '@widgets/eamlocation/default-searchform/default-searchform.vue';
/**
* 功能位置表格视图视图
*
* @export
* @class EAMLocationChildGridView
* @extends {EAMLocationChildGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class EAMLocationChildGridView extends EAMLocationChildGridViewBase { }
</script>
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import EAMLocationAuthService from '@/authservice/eamlocation/eamlocation-auth-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
import CodeListService from "@service/app/codelist-service";
/**
* 功能位置表格视图视图基类
*
* @export
* @class EAMLocationGridViewBase
* @extends {GridViewBase}
*/
export class EAMLocationGridViewBase extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMLocationGridViewBase
*/
protected appDeName: string = 'eamlocation';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMLocationGridViewBase
*/
protected appDeKey: string = 'eamlocationid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMLocationGridViewBase
*/
protected appDeMajor: string = 'eamlocationname';
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof EAMLocationGridViewBase
*/
protected appEntityService: EAMLocationService = new EAMLocationService;
/**
* 实体权限服务对象
*
* @type EAMLocationUIService
* @memberof EAMLocationGridViewBase
*/
public appUIService: EAMLocationUIService = new EAMLocationUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMLocationGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMLocationGridViewBase
*/
protected model: any = {
srfCaption: 'entities.eamlocation.views.gridview.caption',
srfTitle: 'entities.eamlocation.views.gridview.title',
srfSubTitle: 'entities.eamlocation.views.gridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMLocationGridViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof EAMLocationGridView
*/
public toolBarModels: any = {
tbitem5: { name: 'tbitem5', caption: '新建', 'isShowCaption': true, 'isShowIcon': true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'New', target: '', class: '' } },
seperator1: { name: 'seperator1', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem2: { name: 'tbitem2', caption: '编辑', 'isShowCaption': true, 'isShowIcon': true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY', class: '' } },
seperator2: { name: 'seperator2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem1: { name: 'tbitem1', caption: '拷贝', 'isShowCaption': true, 'isShowIcon': true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY', class: '' } },
tbitem15: { name: 'tbitem15', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem8: { name: 'tbitem8', caption: '删除', 'isShowCaption': true, 'isShowIcon': true, tooltip: '删除', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY', class: '' } },
tbitem16: { name: 'tbitem16', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem3: { name: 'tbitem3', caption: '导出', 'isShowCaption': true, 'isShowIcon': true, tooltip: '导出', iconcls: 'fa fa-file-excel-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ExportExcel', target: '' }, MaxRowCount: 1000, class: '' },
tbitem17: { name: 'tbitem17', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem10: { name: 'tbitem10', caption: '过滤', 'isShowCaption': true, 'isShowIcon': true, tooltip: '过滤', iconcls: 'fa fa-filter', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ToggleFilter', target: '', class: '' } },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'eee617336f6dc6e5e97835d6309fd452';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMLocationGridViewBase
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMLocationGridViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
opendata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
this.opendata(args,fullargs, params, $event, xData);
},
newdata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
this.newdata(args,fullargs, params, $event, xData);
},
grid: this.$refs.grid,
searchform: this.$refs.searchform,
keyPSDEField: 'eamlocation',
majorPSDEField: 'eamlocationname',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationGridViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem2')) {
this.toolbar_tbitem2_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem1')) {
this.toolbar_tbitem1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem7')) {
this.toolbar_tbitem7_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem10')) {
this.toolbar_tbitem10_click(null, '', $event2);
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationGridViewBase
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationGridViewBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem5_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"EAMLocation");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"EAMLocation");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"EAMLocation");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem8_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Remove(datas, contextJO,paramJO, $event, xData,this,"EAMLocation");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem3_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"EAMLocation");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem7_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.Print(datas, contextJO,paramJO, $event, xData,this,"EAMLocation");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem10_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,"EAMLocation");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMLocationGridView
*/
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
const data: any = {};
if(args[0].srfsourcekey){
data.srfsourcekey = args[0].srfsourcekey;
}
let tempContext = JSON.parse(JSON.stringify(this.context));
delete tempContext.eamlocation;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMLocationGridView
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
const localContext: any = null;
const localViewParam: any =null;
const data: any = {};
let tempContext = JSON.parse(JSON.stringify(this.context));
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'infoview', parameterName: 'infoview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMLocationGridViewBase
*/
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 EAMLocationGridViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { eamlocation: args[0].eamlocation })
}
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMLocationGridViewBase
*/
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 EAMLocationGridViewBase
*/
public Remove(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.remove instanceof Function)) {
return ;
}
xData.remove(args);
}
/**
* 导出
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMLocationGridViewBase
*/
public ExportExcel(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.exportExcel instanceof Function) || !$event) {
return ;
}
xData.exportExcel($event.exportparms);
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMLocationGridViewBase
*/
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 EAMLocationGridViewBase
*/
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;
}
}
}
\ No newline at end of file
<studio-view-style2 viewName="eamlocationgridview" viewTitle="功能位置表格视图" class='degridview eamlocation-grid-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" placeholder="功能位置名称" search @on-search="onSearch($event)"/>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<template slot="searchForm">
<view_searchform
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
@search="searchform_search($event)"
@load="searchform_load($event)"
@closeview="closeView($event)">
</view_searchform>
</template>
<view_grid
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:isSingleSelect="isGridSingleSelect"
:showBusyIndicator="true"
:isOpenEdit="false"
:gridRowActiveMode="gridRowActiveMode"
@save="onSave.apply(_self, arguments)"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
:newdata="newdata.bind(_self)"
:opendata="opendata.bind(_self)"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@remove="grid_remove($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</studio-view-style2>
\ No newline at end of file
<template src="./eamlocation-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMLocationGridViewBase } from './eamlocation-grid-view-base';
import view_grid from '@widgets/eamlocation/main-grid/main-grid.vue';
import view_searchform from '@widgets/eamlocation/default-searchform/default-searchform.vue';
/**
* 功能位置表格视图视图
*
* @export
* @class EAMLocationGridView
* @extends {EAMLocationGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class EAMLocationGridView extends EAMLocationGridViewBase { }
</script>
import { Subject } from 'rxjs';
import { EditViewBase } from '@/studio-core';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import EAMLocationAuthService from '@/authservice/eamlocation/eamlocation-auth-service';
import EditViewEngine from '@engine/view/edit-view-engine';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
/**
* 功能位置编辑视图视图基类
*
* @export
* @class EAMLocationInfo_MainViewBase
* @extends {EditViewBase}
*/
export class EAMLocationInfo_MainViewBase extends EditViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMLocationInfo_MainViewBase
*/
protected appDeName: string = 'eamlocation';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMLocationInfo_MainViewBase
*/
protected appDeKey: string = 'eamlocationid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMLocationInfo_MainViewBase
*/
protected appDeMajor: string = 'eamlocationname';
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof EAMLocationInfo_MainViewBase
*/
protected appEntityService: EAMLocationService = new EAMLocationService;
/**
* 实体权限服务对象
*
* @type EAMLocationUIService
* @memberof EAMLocationInfo_MainViewBase
*/
public appUIService: EAMLocationUIService = new EAMLocationUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMLocationInfo_MainViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMLocationInfo_MainViewBase
*/
protected model: any = {
srfCaption: 'entities.eamlocation.views.info_mainview.caption',
srfTitle: 'entities.eamlocation.views.info_mainview.title',
srfSubTitle: 'entities.eamlocation.views.info_mainview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMLocationInfo_MainViewBase
*/
protected containerModel: any = {
view_form: { name: 'form', type: 'FORM' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'a82c591e524f7289432a30a5ccfa8908';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMLocationInfo_MainViewBase
*/
public engine: EditViewEngine = new EditViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMLocationInfo_MainViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'eamlocation',
majorPSDEField: 'eamlocationname',
isLoadDefault: true,
});
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationInfo_MainViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationInfo_MainViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationInfo_MainViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
}
\ No newline at end of file
<studio-view-style2 viewName="eamlocationinfo_mainview" viewTitle="功能位置编辑视图" class='deeditview eamlocation-info-main-view from-dashboard-style'>
<view_form
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="true"
updateAction="Update"
removeAction="Remove"
loaddraftAction="GetDraft"
loadAction="Get"
createAction="Create"
WFSubmitAction=""
WFStartAction=""
style=''
name="form"
ref='form'
@save="form_save($event)"
@remove="form_remove($event)"
@load="form_load($event)"
@closeview="closeView($event)">
</view_form>
</studio-view-style2>
\ No newline at end of file
<template src="./eamlocation-info-main-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMLocationInfo_MainViewBase } from './eamlocation-info-main-view-base';
import view_form from '@widgets/eamlocation/info-main-form/info-main-form.vue';
/**
* 功能位置编辑视图视图
*
* @export
* @class EAMLocationInfo_MainView
* @extends {EAMLocationInfo_MainViewBase}
*/
@Component({
components: {
view_form,
}
})
@VueLifeCycleProcessing()
export default class EAMLocationInfo_MainView extends EAMLocationInfo_MainViewBase { }
</script>
import { Subject } from 'rxjs';
import { TabExpViewBase } from '@/studio-core';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import EAMLocationAuthService from '@/authservice/eamlocation/eamlocation-auth-service';
import TabExpViewEngine from '@engine/view/tab-exp-view-engine';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
/**
* 功能位置信息视图基类
*
* @export
* @class EAMLocationInfoViewBase
* @extends {TabExpViewBase}
*/
export class EAMLocationInfoViewBase extends TabExpViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMLocationInfoViewBase
*/
protected appDeName: string = 'eamlocation';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMLocationInfoViewBase
*/
protected appDeKey: string = 'eamlocationid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMLocationInfoViewBase
*/
protected appDeMajor: string = 'eamlocationname';
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof EAMLocationInfoViewBase
*/
protected appEntityService: EAMLocationService = new EAMLocationService;
/**
* 实体权限服务对象
*
* @type EAMLocationUIService
* @memberof EAMLocationInfoViewBase
*/
public appUIService: EAMLocationUIService = new EAMLocationUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMLocationInfoViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMLocationInfoViewBase
*/
protected model: any = {
srfCaption: 'entities.eamlocation.views.infoview.caption',
srfTitle: 'entities.eamlocation.views.infoview.title',
srfSubTitle: 'entities.eamlocation.views.infoview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMLocationInfoViewBase
*/
protected containerModel: any = {
view_tabexppanel: { name: 'tabexppanel', type: 'TABEXPPANEL' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'd3466c5c60a573062d543896976bf68c';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMLocationInfoViewBase
*/
public engine: TabExpViewEngine = new TabExpViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMLocationInfoViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
keyPSDEField: 'eamlocation',
majorPSDEField: 'eamlocationname',
isLoadDefault: true,
});
}
}
\ No newline at end of file
<studio-view-style2 viewName="eamlocationinfoview" viewTitle="功能位置信息" class='detabexpview eamlocation-info-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<view_tabexppanel
:viewState="viewState"
:viewparams="viewparams"
:context="context"
name="tabexppanel"
ref='tabexppanel'
@closeview="closeView($event)">
</view_tabexppanel>
</studio-view-style2>
\ No newline at end of file
<template src="./eamlocation-info-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMLocationInfoViewBase } from './eamlocation-info-view-base';
import view_tabexppanel from '@widgets/eamlocation/info-viewtabexppanel-tabexppanel/info-viewtabexppanel-tabexppanel.vue';
/**
* 功能位置信息视图
*
* @export
* @class EAMLocationInfoView
* @extends {EAMLocationInfoViewBase}
*/
@Component({
components: {
view_tabexppanel,
}
})
@VueLifeCycleProcessing()
export default class EAMLocationInfoView extends EAMLocationInfoViewBase { }
</script>
import { Subject } from 'rxjs';
import { DashboardViewBase } from '@/studio-core';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import EAMLocationAuthService from '@/authservice/eamlocation/eamlocation-auth-service';
import PortalViewEngine from '@engine/view/portal-view-engine';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
/**
* 功能位置数据看板视图视图基类
*
* @export
* @class EAMLocationSummaryViewBase
* @extends {DashboardViewBase}
*/
export class EAMLocationSummaryViewBase extends DashboardViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMLocationSummaryViewBase
*/
protected appDeName: string = 'eamlocation';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMLocationSummaryViewBase
*/
protected appDeKey: string = 'eamlocationid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMLocationSummaryViewBase
*/
protected appDeMajor: string = 'eamlocationname';
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof EAMLocationSummaryViewBase
*/
protected appEntityService: EAMLocationService = new EAMLocationService;
/**
* 实体权限服务对象
*
* @type EAMLocationUIService
* @memberof EAMLocationSummaryViewBase
*/
public appUIService: EAMLocationUIService = new EAMLocationUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMLocationSummaryViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMLocationSummaryViewBase
*/
protected model: any = {
srfCaption: 'entities.eamlocation.views.summaryview.caption',
srfTitle: 'entities.eamlocation.views.summaryview.title',
srfSubTitle: 'entities.eamlocation.views.summaryview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMLocationSummaryViewBase
*/
protected containerModel: any = {
view_dashboard: { name: 'dashboard', type: 'DASHBOARD' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'cc29cbcb0398aa069d4b05f3469f0377';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMLocationSummaryViewBase
*/
public engine: PortalViewEngine = new PortalViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMLocationSummaryViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
dashboard: this.$refs.dashboard,
keyPSDEField: 'eamlocation',
majorPSDEField: 'eamlocationname',
isLoadDefault: true,
});
}
/**
* dashboard 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationSummaryViewBase
*/
public dashboard_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('dashboard', 'load', $event);
}
}
\ No newline at end of file
<studio-view-style2 viewName="eamlocationsummaryview" viewTitle="功能位置数据看板视图" class='deportalview eamlocation-summary-view'>
<view_dashboard
:viewState="viewState"
:viewparams="viewparams"
:context="JSON.parse(JSON.stringify(context))"
:isEnableCustomized = "false"
name="dashboard"
ref='dashboard'
@load="dashboard_load($event)"
@closeview="closeView($event)">
</view_dashboard>
</studio-view-style2>
\ No newline at end of file
<template src="./eamlocation-summary-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMLocationSummaryViewBase } from './eamlocation-summary-view-base';
import view_dashboard from '@widgets/eamlocation/main-info-dashboard/main-info-dashboard.vue';
/**
* 功能位置数据看板视图视图
*
* @export
* @class EAMLocationSummaryView
* @extends {EAMLocationSummaryViewBase}
*/
@Component({
components: {
view_dashboard,
}
})
@VueLifeCycleProcessing()
export default class EAMLocationSummaryView extends EAMLocationSummaryViewBase { }
</script>
import { Subject } from 'rxjs';
import { EditViewBase } from '@/studio-core';
import EAMLocationTypeService from '@/service/eamlocation-type/eamlocation-type-service';
import EAMLocationTypeAuthService from '@/authservice/eamlocation-type/eamlocation-type-auth-service';
import EditViewEngine from '@engine/view/edit-view-engine';
import EAMLocationTypeUIService from '@/uiservice/eamlocation-type/eamlocation-type-ui-service';
/**
* 功能位置类型编辑视图视图基类
*
* @export
* @class EAMLocationTypeEditViewBase
* @extends {EditViewBase}
*/
export class EAMLocationTypeEditViewBase extends EditViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMLocationTypeEditViewBase
*/
protected appDeName: string = 'eamlocationtype';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMLocationTypeEditViewBase
*/
protected appDeKey: string = 'eamlocationtypeid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMLocationTypeEditViewBase
*/
protected appDeMajor: string = 'eamlocationtypename';
/**
* 实体服务对象
*
* @type {EAMLocationTypeService}
* @memberof EAMLocationTypeEditViewBase
*/
protected appEntityService: EAMLocationTypeService = new EAMLocationTypeService;
/**
* 实体权限服务对象
*
* @type EAMLocationTypeUIService
* @memberof EAMLocationTypeEditViewBase
*/
public appUIService: EAMLocationTypeUIService = new EAMLocationTypeUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMLocationTypeEditViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMLocationTypeEditViewBase
*/
protected model: any = {
srfCaption: 'entities.eamlocationtype.views.editview.caption',
srfTitle: 'entities.eamlocationtype.views.editview.title',
srfSubTitle: 'entities.eamlocationtype.views.editview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMLocationTypeEditViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_form: { name: 'form', type: 'FORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof EAMLocationTypeEditView
*/
public toolBarModels: any = {
tbitem2: { name: 'tbitem2', caption: '保存并关闭', 'isShowCaption': true, 'isShowIcon': true, tooltip: '保存并关闭', iconcls: 'sx-tb-saveandclose', icon: '../sasrfex/images/default/icon_saveandclose.png', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '', class: '' } },
tbitem1: { name: 'tbitem1', caption: '关闭', 'isShowCaption': true, 'isShowIcon': true, tooltip: '关闭', iconcls: 'fa fa-sign-out', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Exit', target: '', class: '' } },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'dd09755644dcf1e57c062b4e08e4ce3a';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMLocationTypeEditViewBase
*/
public engine: EditViewEngine = new EditViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMLocationTypeEditViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'eamlocationtype',
majorPSDEField: 'eamlocationtypename',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTypeEditViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem2')) {
this.toolbar_tbitem2_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem1')) {
this.toolbar_tbitem1_click(null, '', $event2);
}
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTypeEditViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTypeEditViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTypeEditViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
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.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"EAMLocationType");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
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.Exit(datas, contextJO,paramJO, $event, xData,this,"EAMLocationType");
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMLocationTypeEditViewBase
*/
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 EAMLocationTypeEditViewBase
*/
public Exit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.closeView(args);
if(window.parent){
window.parent.postMessage([{ ...args }],'*');
}
}
}
\ No newline at end of file
<studio-view-style2 viewName="eamlocationtypeeditview" viewTitle="功能位置类型编辑视图" class='deeditview eamlocation-type-edit-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<view_form
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="true"
updateAction="Update"
removeAction="Remove"
loaddraftAction="GetDraft"
loadAction="Get"
createAction="Create"
WFSubmitAction=""
WFStartAction=""
style=''
name="form"
ref='form'
@save="form_save($event)"
@remove="form_remove($event)"
@load="form_load($event)"
@closeview="closeView($event)">
</view_form>
</studio-view-style2>
\ No newline at end of file
<template src="./eamlocation-type-edit-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMLocationTypeEditViewBase } from './eamlocation-type-edit-view-base';
import view_form from '@widgets/eamlocation-type/main-form/main-form.vue';
/**
* 功能位置类型编辑视图视图
*
* @export
* @class EAMLocationTypeEditView
* @extends {EAMLocationTypeEditViewBase}
*/
@Component({
components: {
view_form,
}
})
@VueLifeCycleProcessing()
export default class EAMLocationTypeEditView extends EAMLocationTypeEditViewBase { }
</script>
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import EAMLocationTypeService from '@/service/eamlocation-type/eamlocation-type-service';
import EAMLocationTypeAuthService from '@/authservice/eamlocation-type/eamlocation-type-auth-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import EAMLocationTypeUIService from '@/uiservice/eamlocation-type/eamlocation-type-ui-service';
import CodeListService from "@service/app/codelist-service";
/**
* 功能位置类型表格视图视图基类
*
* @export
* @class EAMLocationTypeGridViewBase
* @extends {GridViewBase}
*/
export class EAMLocationTypeGridViewBase extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMLocationTypeGridViewBase
*/
protected appDeName: string = 'eamlocationtype';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMLocationTypeGridViewBase
*/
protected appDeKey: string = 'eamlocationtypeid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMLocationTypeGridViewBase
*/
protected appDeMajor: string = 'eamlocationtypename';
/**
* 实体服务对象
*
* @type {EAMLocationTypeService}
* @memberof EAMLocationTypeGridViewBase
*/
protected appEntityService: EAMLocationTypeService = new EAMLocationTypeService;
/**
* 实体权限服务对象
*
* @type EAMLocationTypeUIService
* @memberof EAMLocationTypeGridViewBase
*/
public appUIService: EAMLocationTypeUIService = new EAMLocationTypeUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMLocationTypeGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMLocationTypeGridViewBase
*/
protected model: any = {
srfCaption: 'entities.eamlocationtype.views.gridview.caption',
srfTitle: 'entities.eamlocationtype.views.gridview.title',
srfSubTitle: 'entities.eamlocationtype.views.gridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMLocationTypeGridViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof EAMLocationTypeGridView
*/
public toolBarModels: any = {
tbitem5: { name: 'tbitem5', caption: '新建', 'isShowCaption': true, 'isShowIcon': true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'New', target: '', class: '' } },
seperator1: { name: 'seperator1', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem2: { name: 'tbitem2', caption: '编辑', 'isShowCaption': true, 'isShowIcon': true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY', class: '' } },
seperator2: { name: 'seperator2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem1: { name: 'tbitem1', caption: '拷贝', 'isShowCaption': true, 'isShowIcon': true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY', class: '' } },
tbitem15: { name: 'tbitem15', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem8: { name: 'tbitem8', caption: '删除', 'isShowCaption': true, 'isShowIcon': true, tooltip: '删除', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY', class: '' } },
tbitem16: { name: 'tbitem16', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem3: { name: 'tbitem3', caption: '导出', 'isShowCaption': true, 'isShowIcon': true, tooltip: '导出', iconcls: 'fa fa-file-excel-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ExportExcel', target: '' }, MaxRowCount: 1000, class: '' },
tbitem17: { name: 'tbitem17', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem10: { name: 'tbitem10', caption: '过滤', 'isShowCaption': true, 'isShowIcon': true, tooltip: '过滤', iconcls: 'fa fa-filter', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ToggleFilter', target: '', class: '' } },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '4c95ec14aa2de5370d9d81f7d85f4bd5';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMLocationTypeGridViewBase
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMLocationTypeGridViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
opendata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
this.opendata(args,fullargs, params, $event, xData);
},
newdata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
this.newdata(args,fullargs, params, $event, xData);
},
grid: this.$refs.grid,
searchform: this.$refs.searchform,
keyPSDEField: 'eamlocationtype',
majorPSDEField: 'eamlocationtypename',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTypeGridViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem2')) {
this.toolbar_tbitem2_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem1')) {
this.toolbar_tbitem1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem7')) {
this.toolbar_tbitem7_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem10')) {
this.toolbar_tbitem10_click(null, '', $event2);
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTypeGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTypeGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTypeGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTypeGridViewBase
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTypeGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTypeGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTypeGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTypeGridViewBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem5_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"EAMLocationType");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"EAMLocationType");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"EAMLocationType");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem8_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Remove(datas, contextJO,paramJO, $event, xData,this,"EAMLocationType");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem3_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"EAMLocationType");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem7_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.Print(datas, contextJO,paramJO, $event, xData,this,"EAMLocationType");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem10_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,"EAMLocationType");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMLocationTypeGridView
*/
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
const data: any = {};
if(args[0].srfsourcekey){
data.srfsourcekey = args[0].srfsourcekey;
}
let tempContext = JSON.parse(JSON.stringify(this.context));
delete tempContext.eamlocationtype;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamlocationtypes', parameterName: 'eamlocationtype' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMLocationTypeGridView
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
const localContext: any = null;
const localViewParam: any =null;
const data: any = {};
let tempContext = JSON.parse(JSON.stringify(this.context));
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamlocationtypes', parameterName: 'eamlocationtype' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMLocationTypeGridViewBase
*/
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 EAMLocationTypeGridViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { eamlocationtype: args[0].eamlocationtype })
}
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMLocationTypeGridViewBase
*/
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 EAMLocationTypeGridViewBase
*/
public Remove(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.remove instanceof Function)) {
return ;
}
xData.remove(args);
}
/**
* 导出
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMLocationTypeGridViewBase
*/
public ExportExcel(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.exportExcel instanceof Function) || !$event) {
return ;
}
xData.exportExcel($event.exportparms);
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMLocationTypeGridViewBase
*/
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 EAMLocationTypeGridViewBase
*/
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;
}
}
}
\ No newline at end of file
<studio-view-style2 viewName="eamlocationtypegridview" viewTitle="功能位置类型表格视图" class='degridview eamlocation-type-grid-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" placeholder="功能位置类型名称" search @on-search="onSearch($event)"/>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<template slot="searchForm">
<view_searchform
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
@search="searchform_search($event)"
@load="searchform_load($event)"
@closeview="closeView($event)">
</view_searchform>
</template>
<view_grid
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:isSingleSelect="isGridSingleSelect"
:showBusyIndicator="true"
:isOpenEdit="false"
:gridRowActiveMode="gridRowActiveMode"
@save="onSave.apply(_self, arguments)"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
:newdata="newdata.bind(_self)"
:opendata="opendata.bind(_self)"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@remove="grid_remove($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</studio-view-style2>
\ No newline at end of file
<template src="./eamlocation-type-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMLocationTypeGridViewBase } from './eamlocation-type-grid-view-base';
import view_grid from '@widgets/eamlocation-type/main-grid/main-grid.vue';
import view_searchform from '@widgets/eamlocation-type/default-searchform/default-searchform.vue';
/**
* 功能位置类型表格视图视图
*
* @export
* @class EAMLocationTypeGridView
* @extends {EAMLocationTypeGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class EAMLocationTypeGridView extends EAMLocationTypeGridViewBase { }
</script>
...@@ -51,6 +51,116 @@ export default class EAMLocationStateModelLineServiceBase extends EntityService ...@@ -51,6 +51,116 @@ export default class EAMLocationStateModelLineServiceBase extends EntityService
return Http.getInstance().get(`/eamlocationstatemodellines/${context.eamlocationstatemodelline}/select`,isloading); return Http.getInstance().get(`/eamlocationstatemodellines/${context.eamlocationstatemodelline}/select`,isloading);
} }
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateModelLineServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamlocationstatemodellines`,data,isloading);
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateModelLineServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamlocationstatemodellines/${context.eamlocationstatemodelline}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateModelLineServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/eamlocationstatemodellines/${context.eamlocationstatemodelline}`,isloading);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateModelLineServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamlocationstatemodellines/${context.eamlocationstatemodelline}`,isloading);
return res;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateModelLineServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamlocationstatemodellines/getdraft`,isloading);
res.data.eamlocationstatemodelline = data.eamlocationstatemodelline;
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateModelLineServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/eamlocationstatemodellines/${context.eamlocationstatemodelline}/checkkey`,data,isloading);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateModelLineServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocationstatemodellines/${context.eamlocationstatemodelline}/save`,data,isloading);
return res;
}
/** /**
* FetchDefault接口方法 * FetchDefault接口方法
* *
...@@ -62,6 +172,6 @@ export default class EAMLocationStateModelLineServiceBase extends EntityService ...@@ -62,6 +172,6 @@ export default class EAMLocationStateModelLineServiceBase extends EntityService
*/ */
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data)); let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamlocationstatemodellines/select`,tempData,isloading); return Http.getInstance().get(`/eamlocationstatemodellines/fetchdefault`,tempData,isloading);
} }
} }
\ No newline at end of file
...@@ -51,6 +51,116 @@ export default class EAMLocationStateModelServiceBase extends EntityService { ...@@ -51,6 +51,116 @@ export default class EAMLocationStateModelServiceBase extends EntityService {
return Http.getInstance().get(`/eamlocationstatemodels/${context.eamlocationstatemodel}/select`,isloading); return Http.getInstance().get(`/eamlocationstatemodels/${context.eamlocationstatemodel}/select`,isloading);
} }
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateModelServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamlocationstatemodels`,data,isloading);
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateModelServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamlocationstatemodels/${context.eamlocationstatemodel}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateModelServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/eamlocationstatemodels/${context.eamlocationstatemodel}`,isloading);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateModelServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamlocationstatemodels/${context.eamlocationstatemodel}`,isloading);
return res;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateModelServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamlocationstatemodels/getdraft`,isloading);
res.data.eamlocationstatemodel = data.eamlocationstatemodel;
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateModelServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/eamlocationstatemodels/${context.eamlocationstatemodel}/checkkey`,data,isloading);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateModelServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocationstatemodels/${context.eamlocationstatemodel}/save`,data,isloading);
return res;
}
/** /**
* FetchDefault接口方法 * FetchDefault接口方法
* *
...@@ -62,6 +172,6 @@ export default class EAMLocationStateModelServiceBase extends EntityService { ...@@ -62,6 +172,6 @@ export default class EAMLocationStateModelServiceBase extends EntityService {
*/ */
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data)); let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamlocationstatemodels/select`,tempData,isloading); return Http.getInstance().get(`/eamlocationstatemodels/fetchdefault`,tempData,isloading);
} }
} }
\ No newline at end of file
...@@ -51,6 +51,116 @@ export default class EAMLocationStateServiceBase extends EntityService { ...@@ -51,6 +51,116 @@ export default class EAMLocationStateServiceBase extends EntityService {
return Http.getInstance().get(`/eamlocationstates/${context.eamlocationstate}/select`,isloading); return Http.getInstance().get(`/eamlocationstates/${context.eamlocationstate}/select`,isloading);
} }
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamlocationstates`,data,isloading);
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamlocationstates/${context.eamlocationstate}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/eamlocationstates/${context.eamlocationstate}`,isloading);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamlocationstates/${context.eamlocationstate}`,isloading);
return res;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamlocationstates/getdraft`,isloading);
res.data.eamlocationstate = data.eamlocationstate;
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/eamlocationstates/${context.eamlocationstate}/checkkey`,data,isloading);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationStateServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocationstates/${context.eamlocationstate}/save`,data,isloading);
return res;
}
/** /**
* FetchDefault接口方法 * FetchDefault接口方法
* *
...@@ -62,6 +172,6 @@ export default class EAMLocationStateServiceBase extends EntityService { ...@@ -62,6 +172,6 @@ export default class EAMLocationStateServiceBase extends EntityService {
*/ */
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data)); let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamlocationstates/select`,tempData,isloading); return Http.getInstance().get(`/eamlocationstates/fetchdefault`,tempData,isloading);
} }
} }
\ No newline at end of file
...@@ -51,6 +51,116 @@ export default class EAMLocationTypeServiceBase extends EntityService { ...@@ -51,6 +51,116 @@ export default class EAMLocationTypeServiceBase extends EntityService {
return Http.getInstance().get(`/eamlocationtypes/${context.eamlocationtype}/select`,isloading); return Http.getInstance().get(`/eamlocationtypes/${context.eamlocationtype}/select`,isloading);
} }
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationTypeServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamlocationtypes`,data,isloading);
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationTypeServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamlocationtypes/${context.eamlocationtype}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationTypeServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/eamlocationtypes/${context.eamlocationtype}`,isloading);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationTypeServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamlocationtypes/${context.eamlocationtype}`,isloading);
return res;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationTypeServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamlocationtypes/getdraft`,isloading);
res.data.eamlocationtype = data.eamlocationtype;
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationTypeServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/eamlocationtypes/${context.eamlocationtype}/checkkey`,data,isloading);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationTypeServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocationtypes/${context.eamlocationtype}/save`,data,isloading);
return res;
}
/** /**
* FetchDefault接口方法 * FetchDefault接口方法
* *
...@@ -62,6 +172,6 @@ export default class EAMLocationTypeServiceBase extends EntityService { ...@@ -62,6 +172,6 @@ export default class EAMLocationTypeServiceBase extends EntityService {
*/ */
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data)); let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamlocationtypes/select`,tempData,isloading); return Http.getInstance().get(`/eamlocationtypes/fetchdefault`,tempData,isloading);
} }
} }
\ No newline at end of file
...@@ -51,6 +51,166 @@ export default class EAMLocationServiceBase extends EntityService { ...@@ -51,6 +51,166 @@ export default class EAMLocationServiceBase extends EntityService {
return Http.getInstance().get(`/eamlocations/${context.eamlocation}/select`,isloading); return Http.getInstance().get(`/eamlocations/${context.eamlocation}/select`,isloading);
} }
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let eamlocationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_eamlocations'),'undefined')){
eamlocationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_eamlocations') as any);
if(eamlocationsData && eamlocationsData.length && eamlocationsData.length > 0){
eamlocationsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.eamlocationid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.eamlocations = eamlocationsData;
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamlocations`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_eamlocations',JSON.stringify(res.data.eamlocations ? res.data.eamlocations : []));
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let eamlocationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_eamlocations'),'undefined')){
eamlocationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_eamlocations') as any);
if(eamlocationsData && eamlocationsData.length && eamlocationsData.length > 0){
eamlocationsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.eamlocationid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.eamlocations = eamlocationsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamlocations/${context.eamlocation}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_eamlocations',JSON.stringify(res.data.eamlocations ? res.data.eamlocations : []));
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/eamlocations/${context.eamlocation}`,isloading);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamlocations/${context.eamlocation}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_eamlocations',JSON.stringify(res.data.eamlocations ? res.data.eamlocations : []));
return res;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamlocations/getdraft`,isloading);
res.data.eamlocation = data.eamlocation;
this.tempStorage.setItem(context.srfsessionkey+'_eamlocations',JSON.stringify(res.data.eamlocations ? res.data.eamlocations : []));
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/eamlocations/${context.eamlocation}/checkkey`,data,isloading);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let eamlocationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_eamlocations'),'undefined')){
eamlocationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_eamlocations') as any);
if(eamlocationsData && eamlocationsData.length && eamlocationsData.length > 0){
eamlocationsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.eamlocationid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.eamlocations = eamlocationsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocations/${context.eamlocation}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_eamlocations',JSON.stringify(res.data.eamlocations ? res.data.eamlocations : []));
return res;
}
/** /**
* FetchDefault接口方法 * FetchDefault接口方法
* *
...@@ -62,6 +222,6 @@ export default class EAMLocationServiceBase extends EntityService { ...@@ -62,6 +222,6 @@ export default class EAMLocationServiceBase extends EntityService {
*/ */
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data)); let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamlocations/select`,tempData,isloading); return Http.getInstance().get(`/eamlocations/fetchdefault`,tempData,isloading);
} }
} }
\ No newline at end of file
...@@ -22,6 +22,16 @@ export const viewstate: any = { ...@@ -22,6 +22,16 @@ export const viewstate: any = {
'bb8b4b03a77ed63b8eb4ef3d62b669a6', 'bb8b4b03a77ed63b8eb4ef3d62b669a6',
], ],
}, },
{
viewtag: '4c95ec14aa2de5370d9d81f7d85f4bd5',
viewmodule: 'Location',
viewname: 'EAMLocationTypeGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'dd09755644dcf1e57c062b4e08e4ce3a',
],
},
{ {
viewtag: '7bf1327f579d782d5cdb98528999a5e0', viewtag: '7bf1327f579d782d5cdb98528999a5e0',
viewmodule: 'Location', viewmodule: 'Location',
...@@ -42,6 +52,15 @@ export const viewstate: any = { ...@@ -42,6 +52,15 @@ export const viewstate: any = {
'7bf1327f579d782d5cdb98528999a5e0', '7bf1327f579d782d5cdb98528999a5e0',
], ],
}, },
{
viewtag: 'a82c591e524f7289432a30a5ccfa8908',
viewmodule: 'Location',
viewname: 'EAMLocationInfo_MainView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{ {
viewtag: 'a9f7eb2645c6505a232a0a13742c42a7', viewtag: 'a9f7eb2645c6505a232a0a13742c42a7',
viewmodule: 'Location', viewmodule: 'Location',
...@@ -52,6 +71,16 @@ export const viewstate: any = { ...@@ -52,6 +71,16 @@ export const viewstate: any = {
'b56347aaab650c59a8338876600c21e4', 'b56347aaab650c59a8338876600c21e4',
], ],
}, },
{
viewtag: 'b24fce391aeca43222a1017b50ba40e2',
viewmodule: 'Location',
viewname: 'EAMLocationChildGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'1769804cd7ab51624ac3c88c2090363b',
],
},
{ {
viewtag: 'b3d85711a6feb998249451ba167895d2', viewtag: 'b3d85711a6feb998249451ba167895d2',
viewmodule: 'Location', viewmodule: 'Location',
...@@ -81,6 +110,27 @@ export const viewstate: any = { ...@@ -81,6 +110,27 @@ export const viewstate: any = {
refviews: [ refviews: [
], ],
}, },
{
viewtag: 'cc29cbcb0398aa069d4b05f3469f0377',
viewmodule: 'Location',
viewname: 'EAMLocationSummaryView',
viewaction: '',
viewdatachange: false,
refviews: [
'a82c591e524f7289432a30a5ccfa8908',
],
},
{
viewtag: 'd3466c5c60a573062d543896976bf68c',
viewmodule: 'Location',
viewname: 'EAMLocationInfoView',
viewaction: '',
viewdatachange: false,
refviews: [
'b24fce391aeca43222a1017b50ba40e2',
'cc29cbcb0398aa069d4b05f3469f0377',
],
},
{ {
viewtag: 'D44132B9-5261-4008-A146-6287A80D5D31', viewtag: 'D44132B9-5261-4008-A146-6287A80D5D31',
viewmodule: 'Base', viewmodule: 'Base',
...@@ -88,10 +138,22 @@ export const viewstate: any = { ...@@ -88,10 +138,22 @@ export const viewstate: any = {
viewaction: '', viewaction: '',
viewdatachange: false, viewdatachange: false,
refviews: [ refviews: [
'eee617336f6dc6e5e97835d6309fd452',
'4c95ec14aa2de5370d9d81f7d85f4bd5',
'f7c04762f2a3e3026c909e6191a0998f', 'f7c04762f2a3e3026c909e6191a0998f',
'9e9b3600ba892d31757bacef1dcc9458', '9e9b3600ba892d31757bacef1dcc9458',
], ],
}, },
{
viewtag: 'dd09755644dcf1e57c062b4e08e4ce3a',
viewmodule: 'Location',
viewname: 'EAMLocationTypeEditView',
viewaction: '',
viewdatachange: false,
refviews: [
'3d676a12800fca23bec463d5c5217413',
],
},
{ {
viewtag: 'ecd1ec6299b5b24e2004fa15c4eef92d', viewtag: 'ecd1ec6299b5b24e2004fa15c4eef92d',
viewmodule: 'Location', viewmodule: 'Location',
...@@ -102,6 +164,17 @@ export const viewstate: any = { ...@@ -102,6 +164,17 @@ export const viewstate: any = {
'b3d85711a6feb998249451ba167895d2', 'b3d85711a6feb998249451ba167895d2',
], ],
}, },
{
viewtag: 'eee617336f6dc6e5e97835d6309fd452',
viewmodule: 'Location',
viewname: 'EAMLocationGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'd3466c5c60a573062d543896976bf68c',
'1769804cd7ab51624ac3c88c2090363b',
],
},
{ {
viewtag: 'f7c04762f2a3e3026c909e6191a0998f', viewtag: 'f7c04762f2a3e3026c909e6191a0998f',
viewmodule: 'Location', viewmodule: 'Location',
......
.exp-control-layout.animation { .exp-control-layout.animation {
.ivu-split-pane, .ivu-split-trigger-con { .ivu-split-pane,
.ivu-split-trigger-con {
transition: all .5s ease-in-out; transition: all .5s ease-in-out;
} }
} }
...@@ -10,11 +11,50 @@ ...@@ -10,11 +11,50 @@
height: 100%; height: 100%;
display: flex; display: flex;
.exp, .view { .exp-control-layout-exp,
.exp-control-layout-view {
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
.exp-control-layout-exp {
display: flex;
flex-direction: column;
.exp-header {
height: 40px;
padding: 3px 8px;
}
.exp-content {
height: calc(100% - 40px);
}
.exp-header-title,
.exp-quick-search {
float: left;
padding-right: 8px;
height: 100%;
}
.exp-header-title {
font-size: 20px;
font-weight: 700;
}
.exp-quick-search {
.ivu-input-wrapper {
vertical-align: -5px;
}
}
.exp-toolbar {
float: right;
height: 100%;
}
}
.grid-exp-bar-content { .grid-exp-bar-content {
height: 100%; height: 100%;
} }
......
...@@ -20,6 +20,14 @@ export class ExpControlLayout extends Vue { ...@@ -20,6 +20,14 @@ export class ExpControlLayout extends Vue {
*/ */
protected showAnimation: boolean = false; protected showAnimation: boolean = false;
/**
* 默认分割比例
*
* @type {number}
* @memberof ExpControlLayout
*/
public defaultSplit: number = 0.6;
/** /**
* 默认分割比例 * 默认分割比例
* *
...@@ -34,7 +42,7 @@ export class ExpControlLayout extends Vue { ...@@ -34,7 +42,7 @@ export class ExpControlLayout extends Vue {
* @type {number} * @type {number}
* @memberof ExpControlLayout * @memberof ExpControlLayout
*/ */
public oldSplit: number = 0.7; public oldSplit: number = this.defaultSplit;
/** /**
* 视图是否显示 * 视图是否显示
...@@ -123,16 +131,15 @@ export class ExpControlLayout extends Vue { ...@@ -123,16 +131,15 @@ export class ExpControlLayout extends Vue {
*/ */
public mounted(): void { public mounted(): void {
const el: any = this.$el; const el: any = this.$el;
let split = 1;
if (this.ctrlWidth > 0 && this.mode === 'horizontal') { if (this.ctrlWidth > 0 && this.mode === 'horizontal') {
split = parseFloat(((el.offsetWidth - this.ctrlWidth) / el.offsetWidth).toFixed(2)); this.defaultSplit = 1 - parseFloat(((el.offsetWidth - this.ctrlWidth) / el.offsetWidth).toFixed(2));
} else if (this.ctrlHeight > 0 && this.mode === 'vertical') { } else if (this.ctrlHeight > 0 && this.mode === 'vertical') {
split = parseFloat(((el.offsetHeight - this.ctrlHeight) / el.offsetHeight).toFixed(2)); this.defaultSplit = 1 - parseFloat(((el.offsetHeight - this.ctrlHeight) / el.offsetHeight).toFixed(2));
} }
if (this.showView) { if (this.showView) {
this.split = split; this.split = this.defaultSplit;
} else { } else {
this.oldSplit = split; this.oldSplit = this.defaultSplit;
} }
} }
...@@ -144,14 +151,31 @@ export class ExpControlLayout extends Vue { ...@@ -144,14 +151,31 @@ export class ExpControlLayout extends Vue {
* @memberof ExpControlLayout * @memberof ExpControlLayout
*/ */
protected renderSplit(): any { protected renderSplit(): any {
return <split class={{ 'exp-control-layout': true, 'animation': this.showAnimation }} v-model={this.split} mode={this.mode}> let showHeader = false;
if (this.$slots.title || this.$slots.toolbar || this.$slots.quickSearch) {
showHeader = true;
}
return <split class={{ 'exp-control-layout': true, 'animation': this.showAnimation }} v-model={this.split} mode={this.mode} min={(this.ctrlHeight > 0 || this.ctrlWidth > 0) ? this.defaultSplit : null}>
<template slot={this.mode === 'horizontal' ? 'left' : 'top'}> <template slot={this.mode === 'horizontal' ? 'left' : 'top'}>
<div class="exp"> <div class="exp-control-layout-exp">
{this.$slots.exp} {showHeader ? <div class="exp-header">
{this.$slots.title ? <div class="exp-header-title">
{this.$slots.title}
</div> : null}
{this.$slots.toolbar ? <div class="exp-toolbar">
{this.$slots.toolbar}
</div> : null}
{this.$slots.quickSearch ? <div class="exp-quick-search">
{this.$slots.quickSearch}
</div> : null}
</div> : null}
<div class={{ 'exp-content': true, 'hidden-header': !showHeader }}>
{this.$slots.expContent}
</div>
</div> </div>
</template> </template>
<template slot={this.mode === 'horizontal' ? 'right' : 'bottom'}> <template slot={this.mode === 'horizontal' ? 'right' : 'bottom'}>
<div class="view"> <div class="exp-control-layout-view">
{this.$slots.default} {this.$slots.default}
</div> </div>
</template> </template>
......
...@@ -270,7 +270,8 @@ export class StudioDrawer extends Vue { ...@@ -270,7 +270,8 @@ export class StudioDrawer extends Vue {
*/ */
protected renderViews(h: CreateElement): any { protected renderViews(h: CreateElement): any {
return this.showViewList.map((view: any, i: number) => { return this.showViewList.map((view: any, i: number) => {
const props: any = { openMode: 'MODAL', viewUsage: 2, viewDefaultUsage: false, viewdata: JSON.stringify(view.viewdata), viewparams: view.viewparams }; try {
const props: any = { openMode: 'MODAL', viewUsage: 2, viewDefaultUsage: false, viewdata: JSON.stringify(view.viewdata), viewparam: JSON.stringify(view.viewparams) };
const style: any = { 'z-index': i + 1 }; const style: any = { 'z-index': i + 1 };
return <div class={{ 'studio-drawer-item': true, 'active': this.activeIndex === i }}> return <div class={{ 'studio-drawer-item': true, 'active': this.activeIndex === i }}>
{h(view.viewname, { {h(view.viewname, {
...@@ -299,6 +300,9 @@ export class StudioDrawer extends Vue { ...@@ -299,6 +300,9 @@ export class StudioDrawer extends Vue {
} }
})} })}
</div>; </div>;
} catch (err) {
console.warn('上飘窗打开视图参数转换异常', err);
}
}); });
} }
......
...@@ -281,7 +281,16 @@ div::-webkit-scrollbar-thumb { ...@@ -281,7 +281,16 @@ div::-webkit-scrollbar-thumb {
>.el-table__row:hover { >.el-table__row:hover {
>td { >td {
background-color: var(--view-background-color-tint); // color: var(--view-font-color-active);
background-color: rgba(var(--view-background-color-active-rgb), 0.5);
}
}
>.el-table__row.current-row {
>td {
color: var(--view-font-color-active);
background-color: var(--view-background-color-active);
} }
} }
} }
......
...@@ -89,6 +89,8 @@ export default class EAMLocationTypeUIServiceBase extends UIService { ...@@ -89,6 +89,8 @@ export default class EAMLocationTypeUIServiceBase extends UIService {
* @memberof EAMLocationTypeUIServiceBase * @memberof EAMLocationTypeUIServiceBase
*/ */
public initViewMap(){ public initViewMap(){
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'eamlocationtypes'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'eamlocationtypes'});
} }
/** /**
......
...@@ -89,6 +89,11 @@ export default class EAMLocationUIServiceBase extends UIService { ...@@ -89,6 +89,11 @@ export default class EAMLocationUIServiceBase extends UIService {
* @memberof EAMLocationUIServiceBase * @memberof EAMLocationUIServiceBase
*/ */
public initViewMap(){ public initViewMap(){
this.allViewMap.set(':',{viewname:'info_mainview',srfappde:'eamlocations'});
this.allViewMap.set(':',{viewname:'childgridview',srfappde:'eamlocations'});
this.allViewMap.set(':',{viewname:'summaryview',srfappde:'eamlocations'});
this.allViewMap.set(':',{viewname:'infoview',srfappde:'eamlocations'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'eamlocations'});
} }
/** /**
......
...@@ -15,10 +15,14 @@ export class AppIndexViewBase extends Vue { ...@@ -15,10 +15,14 @@ export class AppIndexViewBase extends Vue {
if (item) { if (item) {
let judge = true; let judge = true;
switch (item.appfunctag) { switch (item.appfunctag) {
case '_5':
this.click_5(item); break;
case '_2': case '_2':
this.click_2(item); break; this.click_2(item); break;
case '_3': case '_3':
this.click_3(item); break; this.click_3(item); break;
case '_4':
this.click_4(item); break;
default: default:
judge = false; judge = false;
console.warn('未指定应用功能'); console.warn('未指定应用功能');
...@@ -29,6 +33,29 @@ export class AppIndexViewBase extends Vue { ...@@ -29,6 +33,29 @@ export class AppIndexViewBase extends Vue {
} }
} }
/**
* 功能位置
*
* @param {*} [item={}]
* @memberof AppIndexView
*/
public click_5(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'gridview', parameterName: 'gridview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
this.$router.push(path);
})
}
/** /**
* 功能位置状态模型 * 功能位置状态模型
* *
...@@ -75,6 +102,29 @@ export class AppIndexViewBase extends Vue { ...@@ -75,6 +102,29 @@ export class AppIndexViewBase extends Vue {
}) })
} }
/**
* 功能位置类型
*
* @param {*} [item={}]
* @memberof AppIndexView
*/
public click_4(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamlocationtypes', parameterName: 'eamlocationtype' },
{ pathName: 'gridview', parameterName: 'gridview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
this.$router.push(path);
})
}
/** /**
* 绘制内容 * 绘制内容
* *
......
...@@ -131,6 +131,48 @@ export default class AppIndexViewModel { ...@@ -131,6 +131,48 @@ export default class AppIndexViewModel {
viewname: 'eamlocation-state-model-grid-view', viewname: 'eamlocation-state-model-grid-view',
resourcetag: '', resourcetag: '',
} }
,
{
id: '6B6D828E-5B2A-4DF2-B437-0DDD328DAD7D',
name: 'menuitem8',
text: '功能位置类型',
type: 'MENUITEM',
counterid: '',
tooltip: '功能位置类型',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: '_4',
appfuncyype: 'APPVIEW',
viewname: 'eamlocation-type-grid-view',
resourcetag: '',
}
,
{
id: '6E2E7A7B-EDEF-460B-84A7-A2777BDD996E',
name: 'menuitem9',
text: '功能位置',
type: 'MENUITEM',
counterid: '',
tooltip: '功能位置',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: '_5',
appfuncyype: 'APPVIEW',
viewname: 'eamlocation-grid-view',
resourcetag: '',
}
, ,
], ],
} }
...@@ -224,6 +266,18 @@ export default class AppIndexViewModel { ...@@ -224,6 +266,18 @@ export default class AppIndexViewModel {
* @memberof AppIndexViewModel * @memberof AppIndexViewModel
*/ */
private funcs: any[] = [ private funcs: any[] = [
{
appfunctag: '_5',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'eamlocationgridview',
deResParameters: [],
routepath: '/appindexview/:appindexview?/eamlocations/:eamlocation?/gridview/:gridview?',
parameters: [
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
},
{ {
appfunctag: '_2', appfunctag: '_2',
appfuncyype: 'APPVIEW', appfuncyype: 'APPVIEW',
...@@ -248,6 +302,18 @@ export default class AppIndexViewModel { ...@@ -248,6 +302,18 @@ export default class AppIndexViewModel {
{ pathName: 'gridview', parameterName: 'gridview' }, { pathName: 'gridview', parameterName: 'gridview' },
], ],
}, },
{
appfunctag: '_4',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'eamlocationtypegridview',
deResParameters: [],
routepath: '/appindexview/:appindexview?/eamlocationtypes/:eamlocationtype?/gridview/:gridview?',
parameters: [
{ pathName: 'eamlocationtypes', parameterName: 'eamlocationtype' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
},
]; ];
/** /**
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<input style="display:none;" /> <input style="display:none;" />
<row > <row >
<i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }"> <i-col class="form-layout-container" v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :model="detailsModel.group1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.eamlocationstatemodelline.main_form.details.group1')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" > <app-form-group :model="detailsModel.group1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.eamlocationstatemodelline.main_form.details.group1')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.group1" :data="data" :context="context" :viewparams="viewparams"/> <app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.group1" :data="data" :context="context" :viewparams="viewparams"/>
<row> <row>
<i-col v-show="detailsModel.eamlocationstatename.visible" :style="{}" :lg="{ span: 24, offset: 0 }"> <i-col class="form-layout-container" v-show="detailsModel.eamlocationstatename.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='eamlocationstatename' :itemRules="this.rules.eamlocationstatename" class='' :caption="$t('entities.eamlocationstatemodelline.main_form.details.eamlocationstatename')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationstatename.error" :isEmptyCaption="false" labelPos="LEFT"> <app-form-item name='eamlocationstatename' :itemRules="this.rules.eamlocationstatename" class='' :caption="$t('entities.eamlocationstatemodelline.main_form.details.eamlocationstatename')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationstatename.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker <app-picker
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</app-form-item> </app-form-item>
</i-col> </i-col>
<i-col v-show="detailsModel.eamlocationstatemodelname.visible" :style="{}" :lg="{ span: 24, offset: 0 }"> <i-col class="form-layout-container" v-show="detailsModel.eamlocationstatemodelname.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='eamlocationstatemodelname' :itemRules="this.rules.eamlocationstatemodelname" class='' :caption="$t('entities.eamlocationstatemodelline.main_form.details.eamlocationstatemodelname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationstatemodelname.error" :isEmptyCaption="false" labelPos="LEFT"> <app-form-item name='eamlocationstatemodelname' :itemRules="this.rules.eamlocationstatemodelname" class='' :caption="$t('entities.eamlocationstatemodelline.main_form.details.eamlocationstatemodelname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationstatemodelname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker <app-picker
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
<input style="display:none;" /> <input style="display:none;" />
<row > <row >
<i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }"> <i-col class="form-layout-container" v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :model="detailsModel.group1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.eamlocationstatemodel.main_form.details.group1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" > <app-form-group :model="detailsModel.group1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.eamlocationstatemodel.main_form.details.group1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.group1" :data="data" :context="context" :viewparams="viewparams"/> <app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.group1" :data="data" :context="context" :viewparams="viewparams"/>
<row> <row>
<i-col v-show="detailsModel.eamlocationstatemodelid.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }"> <i-col class="form-layout-container" v-show="detailsModel.eamlocationstatemodelid.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamlocationstatemodelid' :itemRules="this.rules.eamlocationstatemodelid" class='' :caption="$t('entities.eamlocationstatemodel.main_form.details.eamlocationstatemodelid')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationstatemodelid.error" :isEmptyCaption="false" labelPos="LEFT"> <app-form-item name='eamlocationstatemodelid' :itemRules="this.rules.eamlocationstatemodelid" class='' :caption="$t('entities.eamlocationstatemodel.main_form.details.eamlocationstatemodelid')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationstatemodelid.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.eamlocationstatemodelid" @enter="onEnter($event)" unit="" :disabled="detailsModel.eamlocationstatemodelid.disabled" type='text' style=""></input-box> <input-box v-model="data.eamlocationstatemodelid" @enter="onEnter($event)" unit="" :disabled="detailsModel.eamlocationstatemodelid.disabled" type='text' style=""></input-box>
</app-form-item> </app-form-item>
</i-col> </i-col>
<i-col v-show="detailsModel.eamlocationstatemodelname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }"> <i-col class="form-layout-container" v-show="detailsModel.eamlocationstatemodelname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamlocationstatemodelname' :itemRules="this.rules.eamlocationstatemodelname" class='' :caption="$t('entities.eamlocationstatemodel.main_form.details.eamlocationstatemodelname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationstatemodelname.error" :isEmptyCaption="false" labelPos="LEFT"> <app-form-item name='eamlocationstatemodelname' :itemRules="this.rules.eamlocationstatemodelname" class='' :caption="$t('entities.eamlocationstatemodel.main_form.details.eamlocationstatemodelname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationstatemodelname.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.eamlocationstatemodelname" @enter="onEnter($event)" unit="" :disabled="detailsModel.eamlocationstatemodelname.disabled" type='text' style=""></input-box> <input-box v-model="data.eamlocationstatemodelname" @enter="onEnter($event)" unit="" :disabled="detailsModel.eamlocationstatemodelname.disabled" type='text' style=""></input-box>
</app-form-item> </app-form-item>
...@@ -23,11 +23,11 @@ ...@@ -23,11 +23,11 @@
</app-form-group> </app-form-group>
</i-col> </i-col>
<i-col v-show="detailsModel.grouppanel1.visible" :style="{}" :lg="{ span: 24, offset: 0 }"> <i-col class="form-layout-container" v-show="detailsModel.grouppanel1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :model="detailsModel.grouppanel1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.eamlocationstatemodel.main_form.details.grouppanel1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" > <app-form-group :model="detailsModel.grouppanel1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.eamlocationstatemodel.main_form.details.grouppanel1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.grouppanel1" :data="data" :context="context" :viewparams="viewparams"/> <app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.grouppanel1" :data="data" :context="context" :viewparams="viewparams"/>
<row> <row>
<i-col v-show="detailsModel.druipart1.visible" :style="{}" :lg="{ span: 24, offset: 0 }"> <i-col class="form-layout-container" v-show="detailsModel.druipart1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-druipart <app-form-druipart
:formState="formState" :formState="formState"
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
<input style="display:none;" /> <input style="display:none;" />
<row > <row >
<i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }"> <i-col class="form-layout-container" v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :model="detailsModel.group1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.eamlocationstate.main_form.details.group1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" > <app-form-group :model="detailsModel.group1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.eamlocationstate.main_form.details.group1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.group1" :data="data" :context="context" :viewparams="viewparams"/> <app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.group1" :data="data" :context="context" :viewparams="viewparams"/>
<row> <row>
<i-col v-show="detailsModel.eamlocationstateid.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }"> <i-col class="form-layout-container" v-show="detailsModel.eamlocationstateid.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamlocationstateid' :itemRules="this.rules.eamlocationstateid" class='' :caption="$t('entities.eamlocationstate.main_form.details.eamlocationstateid')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationstateid.error" :isEmptyCaption="false" labelPos="LEFT"> <app-form-item name='eamlocationstateid' :itemRules="this.rules.eamlocationstateid" class='' :caption="$t('entities.eamlocationstate.main_form.details.eamlocationstateid')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationstateid.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.eamlocationstateid" @enter="onEnter($event)" unit="" :disabled="detailsModel.eamlocationstateid.disabled" type='text' style=""></input-box> <input-box v-model="data.eamlocationstateid" @enter="onEnter($event)" unit="" :disabled="detailsModel.eamlocationstateid.disabled" type='text' style=""></input-box>
</app-form-item> </app-form-item>
</i-col> </i-col>
<i-col v-show="detailsModel.eamlocationstatename.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }"> <i-col class="form-layout-container" v-show="detailsModel.eamlocationstatename.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamlocationstatename' :itemRules="this.rules.eamlocationstatename" class='' :caption="$t('entities.eamlocationstate.main_form.details.eamlocationstatename')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationstatename.error" :isEmptyCaption="false" labelPos="LEFT"> <app-form-item name='eamlocationstatename' :itemRules="this.rules.eamlocationstatename" class='' :caption="$t('entities.eamlocationstate.main_form.details.eamlocationstatename')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationstatename.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.eamlocationstatename" @enter="onEnter($event)" unit="" :disabled="detailsModel.eamlocationstatename.disabled" type='text' style=""></input-box> <input-box v-model="data.eamlocationstatename" @enter="onEnter($event)" unit="" :disabled="detailsModel.eamlocationstatename.disabled" type='text' style=""></input-box>
</app-form-item> </app-form-item>
...@@ -23,11 +23,11 @@ ...@@ -23,11 +23,11 @@
</app-form-group> </app-form-group>
</i-col> </i-col>
<i-col v-show="detailsModel.grouppanel1.visible" :style="{}" :lg="{ span: 24, offset: 0 }"> <i-col class="form-layout-container" v-show="detailsModel.grouppanel1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :model="detailsModel.grouppanel1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.eamlocationstate.main_form.details.grouppanel1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" > <app-form-group :model="detailsModel.grouppanel1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.eamlocationstate.main_form.details.grouppanel1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.grouppanel1" :data="data" :context="context" :viewparams="viewparams"/> <app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.grouppanel1" :data="data" :context="context" :viewparams="viewparams"/>
<row> <row>
<i-col v-show="detailsModel.available.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }"> <i-col class="form-layout-container" v-show="detailsModel.available.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='available' :itemRules="this.rules.available" class='' :caption="$t('entities.eamlocationstate.main_form.details.available')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.available.error" :isEmptyCaption="false" labelPos="LEFT"> <app-form-item name='available' :itemRules="this.rules.available" class='' :caption="$t('entities.eamlocationstate.main_form.details.available')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.available.error" :isEmptyCaption="false" labelPos="LEFT">
<dropdown-list <dropdown-list
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</app-form-item> </app-form-item>
</i-col> </i-col>
<i-col v-show="detailsModel.setup.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }"> <i-col class="form-layout-container" v-show="detailsModel.setup.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='setup' :itemRules="this.rules.setup" class='' :caption="$t('entities.eamlocationstate.main_form.details.setup')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.setup.error" :isEmptyCaption="false" labelPos="LEFT"> <app-form-item name='setup' :itemRules="this.rules.setup" class='' :caption="$t('entities.eamlocationstate.main_form.details.setup')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.setup.error" :isEmptyCaption="false" labelPos="LEFT">
<dropdown-list <dropdown-list
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, SearchFormControlBase } from '@/studio-core';
import EAMLocationTypeService from '@/service/eamlocation-type/eamlocation-type-service';
import DefaultService from './default-searchform-service';
import EAMLocationTypeUIService from '@/uiservice/eamlocation-type/eamlocation-type-ui-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
/**
* searchform部件基类
*
* @export
* @class SearchFormControlBase
* @extends {DefaultSearchFormBase}
*/
export class DefaultSearchFormBase extends SearchFormControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected controlType: string = 'SEARCHFORM';
/**
* 建构部件服务对象
*
* @type {DefaultService}
* @memberof DefaultSearchFormBase
*/
public service: DefaultService = new DefaultService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMLocationTypeService}
* @memberof DefaultSearchFormBase
*/
public appEntityService: EAMLocationTypeService = new EAMLocationTypeService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected appDeName: string = 'eamlocationtype';
/**
* 表单数据对象
*
* @type {*}
* @memberof DefaultSearchFormBase
*/
public data: any = {
};
/**
* 详情模型集合
*
* @type {*}
* @memberof DefaultSearchFormBase
*/
public detailsModel: any = {
formpage1: new FormPageModel({ caption: '常规条件', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this })
,
};
}
\ No newline at end of file
/**
* Default 部件模型
*
* @export
* @class DefaultModel
*/
export default class DefaultModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof DefaultModel
*/
public getDataItems(): any[] {
return [
{
name: 'srfwfmemo',
prop: 'srfwfmemo',
dataType: 'TEXT',
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import EAMLocationTypeService from '@/service/eamlocation-type/eamlocation-type-service';
import DefaultModel from './default-searchform-model';
/**
* Default 部件服务对象
*
* @export
* @class DefaultService
*/
export default class DefaultService extends ControlService {
/**
* 功能位置类型服务对象
*
* @type {EAMLocationTypeService}
* @memberof DefaultService
*/
public appEntityService: EAMLocationTypeService = new EAMLocationTypeService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof DefaultService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of DefaultService.
*
* @param {*} [opts={}]
* @memberof DefaultService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new DefaultModel();
}
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof DefaultService
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof DefaultService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
return Promise.reject([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public frontLogic(action:string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response,true);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof DefaultService
*/
public handleRequestData(action: string,context:any, data: any = {},isMerge:boolean = false){
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return data;
}
let formItemItems: any[] = mode.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
formItemItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.prop){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-search-form' ref='searchform' style="">
<input style="display:none;"/>
<div class="search-button">
<i-button size="small" type="primary" ghost @click="onSearch.apply(_self, arguments)">{{$t('app.searchButton.search')}}</i-button>
<i-button size="small" type="default" ghost @click="onReset.apply(_self, arguments)">{{this.$t('app.searchButton.reset')}}</i-button>
</div>
<div class="form-content">
</div>
</i-form>
\ No newline at end of file
<template src="./default-searchform.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { DefaultSearchFormBase } from './default-searchform-base';
/**
* searchform部件
*
* @export
* @class DefaultSearchForm
* @extends {DefaultSearchFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class DefaultSearchForm extends DefaultSearchFormBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, EditFormControlBase } from '@/studio-core';
import EAMLocationTypeService from '@/service/eamlocation-type/eamlocation-type-service';
import MainService from './main-form-service';
import EAMLocationTypeUIService from '@/uiservice/eamlocation-type/eamlocation-type-ui-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
/**
* form部件基类
*
* @export
* @class EditFormControlBase
* @extends {MainEditFormBase}
*/
export class MainEditFormBase extends EditFormControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof MainEditFormBase
*/
protected controlType: string = 'FORM';
/**
* 建构部件服务对象
*
* @type {MainService}
* @memberof MainEditFormBase
*/
public service: MainService = new MainService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMLocationTypeService}
* @memberof MainEditFormBase
*/
public appEntityService: EAMLocationTypeService = new EAMLocationTypeService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainEditFormBase
*/
protected appDeName: string = 'eamlocationtype';
/**
* 界面UI服务对象
*
* @type {EAMLocationTypeUIService}
* @memberof MainEditFormBase
*/
public appUIService:EAMLocationTypeUIService = new EAMLocationTypeUIService(this.$store);
/**
* 表单数据对象
*
* @type {*}
* @memberof MainEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
eamlocationtypeid: null,
eamlocationtypename: null,
eamlocationstatemodelname: null,
eamlocationstatemodelid: null,
eamlocationtype:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof MainEditFormBase
*/
public rules: any = {
eamlocationtypename: [
{ required: true, type: 'string', message: '功能位置类型名称 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '功能位置类型名称 值不能为空', trigger: 'blur' },
],
eamlocationstatemodelname: [
{ required: true, type: 'string', message: '功能位置状态模型 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '功能位置状态模型 值不能为空', trigger: 'blur' },
],
}
/**
* 详情模型集合
*
* @type {*}
* @memberof MainEditFormBase
*/
public detailsModel: any = {
group1: new FormGroupPanelModel({ caption: '功能位置类型基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: false, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.eamlocationtype.main_form', extractMode: 'ITEM', details: [] } }),
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this, showMoreMode: 0 }),
srfupdatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfkey: new FormItemModel({ caption: '功能位置类型标识', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfmajortext: new FormItemModel({ caption: '功能位置类型名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srftempmode: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfuf: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfuf', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfdeid: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfdeid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamlocationtypeid: new FormItemModel({ caption: '功能位置类型标识', detailType: 'FORMITEM', name: 'eamlocationtypeid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamlocationtypename: new FormItemModel({ caption: '功能位置类型名称', detailType: 'FORMITEM', name: 'eamlocationtypename', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamlocationstatemodelname: new FormItemModel({ caption: '功能位置状态模型', detailType: 'FORMITEM', name: 'eamlocationstatemodelname', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamlocationstatemodelid: new FormItemModel({ caption: '功能位置状态模型标识', detailType: 'FORMITEM', name: 'eamlocationstatemodelid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
};
}
\ No newline at end of file
/**
* Main 部件模型
*
* @export
* @class MainModel
*/
export default class MainModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof MainModel
*/
public getDataItems(): any[] {
return [
{
name: 'srfwfmemo',
prop: 'srfwfmemo',
dataType: 'TEXT',
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
{
name: 'srfupdatedate',
prop: 'updatedate',
dataType: 'DATETIME',
},
{
name: 'srforikey',
},
{
name: 'srfkey',
prop: 'eamlocationtypeid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'eamlocationtypename',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'eamlocationtypeid',
prop: 'eamlocationtypeid',
dataType: 'GUID',
},
{
name: 'eamlocationtypename',
prop: 'eamlocationtypename',
dataType: 'TEXT',
},
{
name: 'eamlocationstatemodelname',
prop: 'eamlocationstatemodelname',
dataType: 'PICKUPTEXT',
},
{
name: 'eamlocationstatemodelid',
prop: 'eamlocationstatemodelid',
dataType: 'PICKUP',
},
{
name: 'eamlocationtype',
prop: 'eamlocationtypeid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import EAMLocationTypeService from '@/service/eamlocation-type/eamlocation-type-service';
import MainModel from './main-form-model';
import EAMLocationStateModelService from '@/service/eamlocation-state-model/eamlocation-state-model-service';
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export default class MainService extends ControlService {
/**
* 功能位置类型服务对象
*
* @type {EAMLocationTypeService}
* @memberof MainService
*/
public appEntityService: EAMLocationTypeService = new EAMLocationTypeService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof MainService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of MainService.
*
* @param {*} [opts={}]
* @memberof MainService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new MainModel();
}
/**
* 功能位置状态模型服务对象
*
* @type {EAMLocationStateModelService}
* @memberof MainService
*/
public eamlocationstatemodelService: EAMLocationStateModelService = new EAMLocationStateModelService();
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof MainService
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof MainService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
if (Object.is(serviceName, 'EAMLocationStateModelService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.eamlocationstatemodelService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'eamlocationstatemodelid', 'eamlocationstatemodel');
}
return Promise.reject([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
Object.assign(Data,{eamlocationtypeid: data.eamlocationtypeid, srffrontuf: '1'});
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.eamlocationtypeid = PrimaryKey;
Data.eamlocationtype = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.eamlocationtypeid = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public frontLogic(action:string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response,true);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof MainService
*/
public handleRequestData(action: string,context:any, data: any = {},isMerge:boolean = false){
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return data;
}
let formItemItems: any[] = mode.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
formItemItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.prop){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-form' ref='form' id='eamlocationtype_main' style="">
<input style="display:none;" />
<row >
<i-col class="form-layout-container" v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :model="detailsModel.group1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.eamlocationtype.main_form.details.group1')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.group1" :data="data" :context="context" :viewparams="viewparams"/>
<row>
<i-col class="form-layout-container" v-show="detailsModel.eamlocationtypeid.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamlocationtypeid' :itemRules="this.rules.eamlocationtypeid" class='' :caption="$t('entities.eamlocationtype.main_form.details.eamlocationtypeid')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationtypeid.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.eamlocationtypeid" @enter="onEnter($event)" unit="" :disabled="detailsModel.eamlocationtypeid.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.eamlocationtypename.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamlocationtypename' :itemRules="this.rules.eamlocationtypename" class='' :caption="$t('entities.eamlocationtype.main_form.details.eamlocationtypename')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationtypename.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.eamlocationtypename" @enter="onEnter($event)" unit="" :disabled="detailsModel.eamlocationtypename.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.eamlocationstatemodelname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamlocationstatemodelname' :itemRules="this.rules.eamlocationstatemodelname" class='' :caption="$t('entities.eamlocationtype.main_form.details.eamlocationstatemodelname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationstatemodelname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.eamlocationstatemodelname.disabled"
name='eamlocationstatemodelname'
deMajorField='eamlocationstatemodelname'
deKeyField='eamlocationstatemodel'
:service="service"
:acParams="{ serviceName: 'EAMLocationStateModelService', interfaceName: 'FetchDefault'}"
valueitem='eamlocationstatemodelid'
:value="data.eamlocationstatemodelname"
:pickupView="{ viewname: 'eamlocation-state-model-pickup-view', title: $t('entities.eamlocationstatemodel.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'eamlocationstatemodels', parameterName: 'eamlocationstatemodel' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</row>
</i-form>
\ No newline at end of file
<template src="./main-form.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { MainEditFormBase } from './main-form-base';
/**
* form部件
*
* @export
* @class MainEditForm
* @extends {MainEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class MainEditForm extends MainEditFormBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, GridControlBase } from '@/studio-core';
import EAMLocationTypeService from '@/service/eamlocation-type/eamlocation-type-service';
import MainService from './main-grid-service';
import EAMLocationTypeUIService from '@/uiservice/eamlocation-type/eamlocation-type-ui-service';
import { FormItemModel } from '@/model/form-detail';
/**
* grid部件基类
*
* @export
* @class GridControlBase
* @extends {MainGridBase}
*/
export class MainGridBase extends GridControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof MainGridBase
*/
protected controlType: string = 'GRID';
/**
* 建构部件服务对象
*
* @type {MainService}
* @memberof MainGridBase
*/
public service: MainService = new MainService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMLocationTypeService}
* @memberof MainGridBase
*/
public appEntityService: EAMLocationTypeService = new EAMLocationTypeService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainGridBase
*/
protected appDeName: string = 'eamlocationtype';
/**
* 界面UI服务对象
*
* @type {EAMLocationTypeUIService}
* @memberof MainBase
*/
public appUIService:EAMLocationTypeUIService = new EAMLocationTypeUIService(this.$store);
/**
* 界面行为模型
*
* @type {*}
* @memberof MainBase
*/
public ActionModel: any = {
};
/**
* 本地缓存标识
*
* @protected
* @type {string}
* @memberof MainBase
*/
protected localStorageTag: string = 'eamlocationtype_main_grid';
/**
* 所有列成员
*
* @type {any[]}
* @memberof MainGridBase
*/
public allColumns: any[] = [
{
name: 'eamlocationtypeid',
label: '功能位置类型标识',
langtag: 'entities.eamlocationtype.main_grid.columns.eamlocationtypeid',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamlocationtypename',
label: '功能位置类型名称',
langtag: 'entities.eamlocationtype.main_grid.columns.eamlocationtypename',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamlocationstatemodelname',
label: '功能位置状态模型',
langtag: 'entities.eamlocationtype.main_grid.columns.eamlocationstatemodelname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
]
/**
* 获取表格行模型
*
* @type {*}
* @memberof MainGridBase
*/
public getGridRowModel(){
return {
srfkey: new FormItemModel(),
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof MainGridBase
*/
public rules: any = {
srfkey: [
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '功能位置类型标识 值不能为空', trigger: 'change' },
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '功能位置类型标识 值不能为空', trigger: 'blur' },
],
}
/**
* 获取对应列class
*
* @type {*}
* @memberof MainBase
*/
public hasRowEdit: any = {
'eamlocationtypeid':false,
'eamlocationtypename':false,
'eamlocationstatemodelname':false,
};
/**
* 获取对应列class
*
* @param {*} $args row 行数据,column 列数据,rowIndex 行索引,列索引
* @returns {void}
* @memberof MainBase
*/
public getCellClassName(args: {row: any, column: any, rowIndex: number, columnIndex: number}): any {
return ( this.hasRowEdit[args.column.property] && this.actualIsOpenEdit ) ? "edit-cell" : "info-cell";
}
/**
* 导出数据格式化
*
* @param {*} filterVal
* @param {*} jsonData
* @param {any[]} [codelistColumns=[]]
* @returns {Promise<any>}
* @memberof MainGridBase
*/
public async formatExcelData(filterVal: any, jsonData: any, codelistColumns?: any[]): Promise<any> {
return super.formatExcelData(filterVal, jsonData, [
]);
}
}
\ No newline at end of file
/**
* Main 部件模型
*
* @export
* @class MainModel
*/
export default class MainModel {
/**
* 是否是实体数据导出
*
* @returns {any[]}
* @memberof MainGridMode
*/
public isDEExport: boolean = false;
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof MainGridMode
*/
public getDataItems(): any[] {
if(this.isDEExport){
return [
]
}else{
return [
{
name: 'eamlocationstatemodelname',
prop: 'eamlocationstatemodelname',
dataType: 'PICKUPTEXT',
},
{
name: 'eamlocationstatemodelid',
prop: 'eamlocationstatemodelid',
dataType: 'PICKUP',
},
{
name: 'eamlocationtypename',
prop: 'eamlocationtypename',
dataType: 'TEXT',
},
{
name: 'srfmajortext',
prop: 'eamlocationtypename',
dataType: 'TEXT',
},
{
name: 'srfdataaccaction',
prop: 'eamlocationtypeid',
dataType: 'GUID',
},
{
name: 'srfkey',
prop: 'eamlocationtypeid',
dataType: 'GUID',
isEditable:true
},
{
name: 'eamlocationtypeid',
prop: 'eamlocationtypeid',
dataType: 'GUID',
},
{
name: 'eamlocationtype',
prop: 'eamlocationtypeid',
},
{
name:'size',
prop:'size'
},
{
name:'query',
prop:'query'
},
{
name:'filter',
prop:'filter'
},
{
name:'page',
prop:'page'
},
{
name:'sort',
prop:'sort'
},
{
name:'srfparentdata',
prop:'srfparentdata'
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
]
}
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import EAMLocationTypeService from '@/service/eamlocation-type/eamlocation-type-service';
import MainModel from './main-grid-model';
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export default class MainService extends ControlService {
/**
* 功能位置类型服务对象
*
* @type {EAMLocationTypeService}
* @memberof MainService
*/
public appEntityService: EAMLocationTypeService = new EAMLocationTypeService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof MainService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of MainService.
*
* @param {*} [opts={}]
* @memberof MainService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new MainModel();
}
/**
* 处理数据
*
* @public
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof MainService
*/
public doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof MainService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
return Promise.reject([])
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestDataWithUpdate(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestDataWithUpdate(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data,isloading);
}else{
result =_appEntityService.Update(Context,Data,isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 获取数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public get(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:0});
}
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public search(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.FetchDefault(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public loadDraft(action: string, context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:'0'});
//仿真主键数据
response.data.eamlocationtypeid = Util.createUUID();
}
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public frontLogic(action:string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据(修改或增加数据)
*
* @param action 行为
* @param data 数据
* @memberof MainService
*/
public handleRequestDataWithUpdate(action: string,context:any ={},data: any = {},isMerge:boolean = false){
let model: any = this.getMode();
if (!model && model.getDataItems instanceof Function) {
return data;
}
let dataItems: any[] = model.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
dataItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop && item.name ){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.isEditable && item.prop && item.name && (data[item.name] || Object.is(data[item.name],0)) ){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
}
\ No newline at end of file
<div :class="{ 'grid': true, 'show-paging-bar': isEnablePagingBar, 'hidden-paging-bar': !isEnablePagingBar }">
<i-form>
<el-table v-if="isDisplay === true"
:default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"
@sort-change="onSortChange($event)"
:border="isDragendCol"
:highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName.bind(_self)"
:cell-class-name="getCellClassName.bind(_self)"
size="mini"
stripe
@row-click="rowClick($event)"
@select-all="selectAll($event)"
@select="select($event)"
@row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
无数据
<span class="quick-toolbar">
</span>
</template>
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template>
<template v-if="getColumnState('eamlocationtypeid')">
<el-table-column show-overflow-tooltip :prop="'eamlocationtypeid'" :label="$t('entities.eamlocationtype.main_grid.columns.eamlocationtypeid')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamlocationtype.main_grid.columns.eamlocationtypeid')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamlocationtypeid}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamlocationtypename')">
<el-table-column show-overflow-tooltip :prop="'eamlocationtypename'" :label="$t('entities.eamlocationtype.main_grid.columns.eamlocationtypename')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamlocationtype.main_grid.columns.eamlocationtypename')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamlocationtypename}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamlocationstatemodelname')">
<el-table-column show-overflow-tooltip :prop="'eamlocationstatemodelname'" :label="$t('entities.eamlocationtype.main_grid.columns.eamlocationstatemodelname')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamlocationtype.main_grid.columns.eamlocationstatemodelname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamlocationstatemodelname}}</span>
</template>
</el-table-column>
</template>
<template v-if="adaptiveState">
<el-table-column></el-table-column>
</template>
</el-table>
<row class='grid-pagination' v-show="items.length > 0">
<page class='pull-right' @on-change="pageOnChange($event)"
@on-page-size-change="onPageSizeChange($event)"
:transfer="true" :total="totalRecord"
show-sizer :current="curPage" :page-size="limit"
:page-size-opts="[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]" show-elevator show-total>
<span>
<span class="page-column">
<poptip transfer placement="top-start">
<i-button icon="md-menu">{{$t('app.gridpage.choicecolumns')}}</i-button>
<div slot="content">
<template v-for="col in allColumns">
<div :key="col.name"><el-checkbox v-model="col.show" @change="onColChange()">{{$t(col.langtag)}}</el-checkbox></div>
</template>
</div>
</poptip>
</span>
<span v-if="selections.length > 0" class="batch-toolbar">
</span>
<span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
<span>
{{$t('app.gridpage.show')}}&nbsp;
<span>
<template v-if="items.length === 1">
1
</template>
<template v-else>
<span>{{(curPage - 1) * limit + 1}}&nbsp;-&nbsp;{{totalRecord > curPage * limit ? curPage * limit : totalRecord}}</span>
</template>
</span>&nbsp;
{{$t('app.gridpage.records')}},{{$t('app.gridpage.totle')}}&nbsp;{{totalRecord}}&nbsp;{{$t('app.gridpage.records')}}
</span>
</span>
</page>
</row>
</i-form>
</div>
\ No newline at end of file
<template src="./main-grid.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { MainGridBase } from './main-grid-base';
/**
* grid部件
*
* @export
* @class MainGrid
* @extends {MainGridBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class MainGrid extends MainGridBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, GridControlBase } from '@/studio-core';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import ChildGridService from './child-grid-grid-service';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
import { FormItemModel } from '@/model/form-detail';
/**
* grid部件基类
*
* @export
* @class GridControlBase
* @extends {ChildGridGridBase}
*/
export class ChildGridGridBase extends GridControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof ChildGridGridBase
*/
protected controlType: string = 'GRID';
/**
* 建构部件服务对象
*
* @type {ChildGridService}
* @memberof ChildGridGridBase
*/
public service: ChildGridService = new ChildGridService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof ChildGridGridBase
*/
public appEntityService: EAMLocationService = new EAMLocationService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof ChildGridGridBase
*/
protected appDeName: string = 'eamlocation';
/**
* 界面UI服务对象
*
* @type {EAMLocationUIService}
* @memberof ChildGridBase
*/
public appUIService:EAMLocationUIService = new EAMLocationUIService(this.$store);
/**
* 界面行为模型
*
* @type {*}
* @memberof ChildGridBase
*/
public ActionModel: any = {
};
/**
* 本地缓存标识
*
* @protected
* @type {string}
* @memberof ChildGridBase
*/
protected localStorageTag: string = 'eamlocation_childgrid_grid';
/**
* 所有列成员
*
* @type {any[]}
* @memberof ChildGridGridBase
*/
public allColumns: any[] = [
{
name: 'peamlocationname',
label: '上级位置',
langtag: 'entities.eamlocation.childgrid_grid.columns.peamlocationname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamlocationid',
label: '功能位置标识',
langtag: 'entities.eamlocation.childgrid_grid.columns.eamlocationid',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamlocationname',
label: '功能位置名称',
langtag: 'entities.eamlocation.childgrid_grid.columns.eamlocationname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamlocationtypename',
label: '功能位置类型',
langtag: 'entities.eamlocation.childgrid_grid.columns.eamlocationtypename',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
]
/**
* 获取表格行模型
*
* @type {*}
* @memberof ChildGridGridBase
*/
public getGridRowModel(){
return {
srfkey: new FormItemModel(),
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof ChildGridGridBase
*/
public rules: any = {
srfkey: [
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '功能位置标识 值不能为空', trigger: 'change' },
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '功能位置标识 值不能为空', trigger: 'blur' },
],
}
/**
* 获取对应列class
*
* @type {*}
* @memberof ChildGridBase
*/
public hasRowEdit: any = {
'peamlocationname':false,
'eamlocationid':false,
'eamlocationname':false,
'eamlocationtypename':false,
};
/**
* 获取对应列class
*
* @param {*} $args row 行数据,column 列数据,rowIndex 行索引,列索引
* @returns {void}
* @memberof ChildGridBase
*/
public getCellClassName(args: {row: any, column: any, rowIndex: number, columnIndex: number}): any {
return ( this.hasRowEdit[args.column.property] && this.actualIsOpenEdit ) ? "edit-cell" : "info-cell";
}
/**
* 导出数据格式化
*
* @param {*} filterVal
* @param {*} jsonData
* @param {any[]} [codelistColumns=[]]
* @returns {Promise<any>}
* @memberof ChildGridGridBase
*/
public async formatExcelData(filterVal: any, jsonData: any, codelistColumns?: any[]): Promise<any> {
return super.formatExcelData(filterVal, jsonData, [
]);
}
}
\ No newline at end of file
/**
* ChildGrid 部件模型
*
* @export
* @class ChildGridModel
*/
export default class ChildGridModel {
/**
* 是否是实体数据导出
*
* @returns {any[]}
* @memberof ChildGridGridMode
*/
public isDEExport: boolean = false;
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ChildGridGridMode
*/
public getDataItems(): any[] {
if(this.isDEExport){
return [
]
}else{
return [
{
name: 'eamlocationname',
prop: 'eamlocationname',
dataType: 'TEXT',
},
{
name: 'eamlocationid',
prop: 'eamlocationid',
dataType: 'GUID',
},
{
name: 'peamlocationname',
prop: 'peamlocationname',
dataType: 'PICKUPTEXT',
},
{
name: 'eamlocationstateid',
prop: 'eamlocationstateid',
dataType: 'PICKUP',
},
{
name: 'peamlocationid',
prop: 'peamlocationid',
dataType: 'PICKUP',
},
{
name: 'eamlocationtypename',
prop: 'eamlocationtypename',
dataType: 'PICKUPTEXT',
},
{
name: 'srfmajortext',
prop: 'eamlocationname',
dataType: 'TEXT',
},
{
name: 'eamlocationtypeid',
prop: 'eamlocationtypeid',
dataType: 'PICKUP',
},
{
name: 'srfdataaccaction',
prop: 'eamlocationid',
dataType: 'GUID',
},
{
name: 'srfkey',
prop: 'eamlocationid',
dataType: 'GUID',
isEditable:true
},
{
name: 'eamlocation',
prop: 'eamlocationid',
},
{
name:'size',
prop:'size'
},
{
name:'query',
prop:'query'
},
{
name:'filter',
prop:'filter'
},
{
name:'page',
prop:'page'
},
{
name:'sort',
prop:'sort'
},
{
name:'srfparentdata',
prop:'srfparentdata'
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
]
}
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import ChildGridModel from './child-grid-grid-model';
/**
* ChildGrid 部件服务对象
*
* @export
* @class ChildGridService
*/
export default class ChildGridService extends ControlService {
/**
* 功能位置服务对象
*
* @type {EAMLocationService}
* @memberof ChildGridService
*/
public appEntityService: EAMLocationService = new EAMLocationService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof ChildGridService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of ChildGridService.
*
* @param {*} [opts={}]
* @memberof ChildGridService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new ChildGridModel();
}
/**
* 处理数据
*
* @public
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof ChildGridService
*/
public doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof ChildGridService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
return Promise.reject([])
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ChildGridService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestDataWithUpdate(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ChildGridService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ChildGridService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestDataWithUpdate(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data,isloading);
}else{
result =_appEntityService.Update(Context,Data,isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 获取数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ChildGridService
*/
@Errorlog
public get(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:0});
}
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ChildGridService
*/
@Errorlog
public search(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.FetchDefault(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ChildGridService
*/
@Errorlog
public loadDraft(action: string, context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:'0'});
//仿真主键数据
response.data.eamlocationid = Util.createUUID();
}
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ChildGridService
*/
@Errorlog
public frontLogic(action:string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据(修改或增加数据)
*
* @param action 行为
* @param data 数据
* @memberof ChildGridService
*/
public handleRequestDataWithUpdate(action: string,context:any ={},data: any = {},isMerge:boolean = false){
let model: any = this.getMode();
if (!model && model.getDataItems instanceof Function) {
return data;
}
let dataItems: any[] = model.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
dataItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop && item.name ){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.isEditable && item.prop && item.name && (data[item.name] || Object.is(data[item.name],0)) ){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
}
\ No newline at end of file
<div :class="{ 'grid': true, 'show-paging-bar': isEnablePagingBar, 'hidden-paging-bar': !isEnablePagingBar }">
<i-form>
<el-table v-if="isDisplay === true"
:default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"
@sort-change="onSortChange($event)"
:border="isDragendCol"
:highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName.bind(_self)"
:cell-class-name="getCellClassName.bind(_self)"
size="mini"
stripe
@row-click="rowClick($event)"
@select-all="selectAll($event)"
@select="select($event)"
@row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
无数据
<span class="quick-toolbar">
</span>
</template>
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template>
<template v-if="getColumnState('peamlocationname')">
<el-table-column show-overflow-tooltip :prop="'peamlocationname'" :label="$t('entities.eamlocation.childgrid_grid.columns.peamlocationname')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamlocation.childgrid_grid.columns.peamlocationname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.peamlocationname}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamlocationid')">
<el-table-column show-overflow-tooltip :prop="'eamlocationid'" :label="$t('entities.eamlocation.childgrid_grid.columns.eamlocationid')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamlocation.childgrid_grid.columns.eamlocationid')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamlocationid}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamlocationname')">
<el-table-column show-overflow-tooltip :prop="'eamlocationname'" :label="$t('entities.eamlocation.childgrid_grid.columns.eamlocationname')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamlocation.childgrid_grid.columns.eamlocationname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamlocationname}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamlocationtypename')">
<el-table-column show-overflow-tooltip :prop="'eamlocationtypename'" :label="$t('entities.eamlocation.childgrid_grid.columns.eamlocationtypename')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamlocation.childgrid_grid.columns.eamlocationtypename')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamlocationtypename}}</span>
</template>
</el-table-column>
</template>
<template v-if="adaptiveState">
<el-table-column></el-table-column>
</template>
</el-table>
<row class='grid-pagination' v-show="items.length > 0">
<page class='pull-right' @on-change="pageOnChange($event)"
@on-page-size-change="onPageSizeChange($event)"
:transfer="true" :total="totalRecord"
show-sizer :current="curPage" :page-size="limit"
:page-size-opts="[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]" show-elevator show-total>
<span>
<span class="page-column">
<poptip transfer placement="top-start">
<i-button icon="md-menu">{{$t('app.gridpage.choicecolumns')}}</i-button>
<div slot="content">
<template v-for="col in allColumns">
<div :key="col.name"><el-checkbox v-model="col.show" @change="onColChange()">{{$t(col.langtag)}}</el-checkbox></div>
</template>
</div>
</poptip>
</span>
<span v-if="selections.length > 0" class="batch-toolbar">
</span>
<span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
<span>
{{$t('app.gridpage.show')}}&nbsp;
<span>
<template v-if="items.length === 1">
1
</template>
<template v-else>
<span>{{(curPage - 1) * limit + 1}}&nbsp;-&nbsp;{{totalRecord > curPage * limit ? curPage * limit : totalRecord}}</span>
</template>
</span>&nbsp;
{{$t('app.gridpage.records')}},{{$t('app.gridpage.totle')}}&nbsp;{{totalRecord}}&nbsp;{{$t('app.gridpage.records')}}
</span>
</span>
</page>
</row>
</i-form>
</div>
\ No newline at end of file
<template src="./child-grid-grid.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { ChildGridGridBase } from './child-grid-grid-base';
/**
* grid部件
*
* @export
* @class ChildGridGrid
* @extends {ChildGridGridBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class ChildGridGrid extends ChildGridGridBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, SearchFormControlBase } from '@/studio-core';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import DefaultService from './default-searchform-service';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
/**
* searchform部件基类
*
* @export
* @class SearchFormControlBase
* @extends {DefaultSearchFormBase}
*/
export class DefaultSearchFormBase extends SearchFormControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected controlType: string = 'SEARCHFORM';
/**
* 建构部件服务对象
*
* @type {DefaultService}
* @memberof DefaultSearchFormBase
*/
public service: DefaultService = new DefaultService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof DefaultSearchFormBase
*/
public appEntityService: EAMLocationService = new EAMLocationService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected appDeName: string = 'eamlocation';
/**
* 表单数据对象
*
* @type {*}
* @memberof DefaultSearchFormBase
*/
public data: any = {
};
/**
* 详情模型集合
*
* @type {*}
* @memberof DefaultSearchFormBase
*/
public detailsModel: any = {
formpage1: new FormPageModel({ caption: '常规条件', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this })
,
};
}
\ No newline at end of file
/**
* Default 部件模型
*
* @export
* @class DefaultModel
*/
export default class DefaultModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof DefaultModel
*/
public getDataItems(): any[] {
return [
{
name: 'srfwfmemo',
prop: 'srfwfmemo',
dataType: 'TEXT',
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import DefaultModel from './default-searchform-model';
/**
* Default 部件服务对象
*
* @export
* @class DefaultService
*/
export default class DefaultService extends ControlService {
/**
* 功能位置服务对象
*
* @type {EAMLocationService}
* @memberof DefaultService
*/
public appEntityService: EAMLocationService = new EAMLocationService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof DefaultService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of DefaultService.
*
* @param {*} [opts={}]
* @memberof DefaultService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new DefaultModel();
}
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof DefaultService
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof DefaultService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
return Promise.reject([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public frontLogic(action:string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response,true);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof DefaultService
*/
public handleRequestData(action: string,context:any, data: any = {},isMerge:boolean = false){
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return data;
}
let formItemItems: any[] = mode.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
formItemItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.prop){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-search-form' ref='searchform' style="">
<input style="display:none;"/>
<div class="search-button">
<i-button size="small" type="primary" ghost @click="onSearch.apply(_self, arguments)">{{$t('app.searchButton.search')}}</i-button>
<i-button size="small" type="default" ghost @click="onReset.apply(_self, arguments)">{{this.$t('app.searchButton.reset')}}</i-button>
</div>
<div class="form-content">
</div>
</i-form>
\ No newline at end of file
<template src="./default-searchform.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { DefaultSearchFormBase } from './default-searchform-base';
/**
* searchform部件
*
* @export
* @class DefaultSearchForm
* @extends {DefaultSearchFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class DefaultSearchForm extends DefaultSearchFormBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, EditFormControlBase } from '@/studio-core';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import Info_MainService from './info-main-form-service';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
/**
* form部件基类
*
* @export
* @class EditFormControlBase
* @extends {Info_MainEditFormBase}
*/
export class Info_MainEditFormBase extends EditFormControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof Info_MainEditFormBase
*/
protected controlType: string = 'FORM';
/**
* 建构部件服务对象
*
* @type {Info_MainService}
* @memberof Info_MainEditFormBase
*/
public service: Info_MainService = new Info_MainService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof Info_MainEditFormBase
*/
public appEntityService: EAMLocationService = new EAMLocationService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof Info_MainEditFormBase
*/
protected appDeName: string = 'eamlocation';
/**
* 界面UI服务对象
*
* @type {EAMLocationUIService}
* @memberof Info_MainEditFormBase
*/
public appUIService:EAMLocationUIService = new EAMLocationUIService(this.$store);
/**
* 表单数据对象
*
* @type {*}
* @memberof Info_MainEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
eamlocationid: null,
eamlocationname: null,
eamlocationtypename: null,
peamlocationname: null,
eamlocation:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof Info_MainEditFormBase
*/
public rules: any = {
}
/**
* 详情模型集合
*
* @type {*}
* @memberof Info_MainEditFormBase
*/
public detailsModel: any = {
group1: new FormGroupPanelModel({ caption: '功能位置基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: true, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.eamlocation.info_main_form', extractMode: 'ITEM', details: [] } }),
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this, showMoreMode: 0 }),
srfupdatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfkey: new FormItemModel({ caption: '功能位置标识', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfmajortext: new FormItemModel({ caption: '功能位置名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srftempmode: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfuf: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfuf', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfdeid: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfdeid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamlocationid: new FormItemModel({ caption: '功能位置标识', detailType: 'FORMITEM', name: 'eamlocationid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamlocationname: new FormItemModel({ caption: '功能位置名称', detailType: 'FORMITEM', name: 'eamlocationname', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamlocationtypename: new FormItemModel({ caption: '功能位置类型', detailType: 'FORMITEM', name: 'eamlocationtypename', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
peamlocationname: new FormItemModel({ caption: '上级位置', detailType: 'FORMITEM', name: 'peamlocationname', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
};
}
\ No newline at end of file
/**
* Info_Main 部件模型
*
* @export
* @class Info_MainModel
*/
export default class Info_MainModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Info_MainModel
*/
public getDataItems(): any[] {
return [
{
name: 'srfwfmemo',
prop: 'srfwfmemo',
dataType: 'TEXT',
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
{
name: 'srfupdatedate',
prop: 'updatedate',
dataType: 'DATETIME',
},
{
name: 'srforikey',
},
{
name: 'srfkey',
prop: 'eamlocationid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'eamlocationname',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'eamlocationid',
prop: 'eamlocationid',
dataType: 'GUID',
},
{
name: 'eamlocationname',
prop: 'eamlocationname',
dataType: 'TEXT',
},
{
name: 'eamlocationtypename',
prop: 'eamlocationtypename',
dataType: 'PICKUPTEXT',
},
{
name: 'peamlocationname',
prop: 'peamlocationname',
dataType: 'PICKUPTEXT',
},
{
name: 'eamlocation',
prop: 'eamlocationid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import Info_MainModel from './info-main-form-model';
/**
* Info_Main 部件服务对象
*
* @export
* @class Info_MainService
*/
export default class Info_MainService extends ControlService {
/**
* 功能位置服务对象
*
* @type {EAMLocationService}
* @memberof Info_MainService
*/
public appEntityService: EAMLocationService = new EAMLocationService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof Info_MainService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of Info_MainService.
*
* @param {*} [opts={}]
* @memberof Info_MainService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new Info_MainModel();
}
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof Info_MainService
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof Info_MainService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
return Promise.reject([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof Info_MainService
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof Info_MainService
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Info_MainService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
Object.assign(Data,{eamlocationid: data.eamlocationid, srffrontuf: '1'});
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Info_MainService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Info_MainService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Info_MainService
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Info_MainService
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.eamlocationid = PrimaryKey;
Data.eamlocation = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.eamlocationid = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Info_MainService
*/
@Errorlog
public frontLogic(action:string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response,true);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof Info_MainService
*/
public handleRequestData(action: string,context:any, data: any = {},isMerge:boolean = false){
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return data;
}
let formItemItems: any[] = mode.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
formItemItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.prop){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-form info-form-mode' ref='form' id='eamlocation_info_main' style="">
<input style="display:none;" />
<row >
<i-col class="form-layout-container" v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :model="detailsModel.group1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.eamlocation.info_main_form.details.group1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="1" :isInfoGroupMode="true" >
<app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.group1" :data="data" :context="context" :viewparams="viewparams"/>
<row>
<i-col class="form-layout-container" v-show="detailsModel.eamlocationid.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamlocationid' :itemRules="this.rules.eamlocationid" class='' :caption="$t('entities.eamlocation.info_main_form.details.eamlocationid')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationid.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.eamlocationid" @enter="onEnter($event)" unit="" :disabled="detailsModel.eamlocationid.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.eamlocationname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamlocationname' :itemRules="this.rules.eamlocationname" class='' :caption="$t('entities.eamlocation.info_main_form.details.eamlocationname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='eamlocationname' :value="data.eamlocationname" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.eamlocationtypename.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamlocationtypename' :itemRules="this.rules.eamlocationtypename" class='' :caption="$t('entities.eamlocation.info_main_form.details.eamlocationtypename')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationtypename.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='eamlocationtypename' :value="data.eamlocationtypename" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.peamlocationname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='peamlocationname' :itemRules="this.rules.peamlocationname" class='' :caption="$t('entities.eamlocation.info_main_form.details.peamlocationname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.peamlocationname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='peamlocationname' :value="data.peamlocationname" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</row>
</i-form>
\ No newline at end of file
<template src="./info-main-form.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { Info_MainEditFormBase } from './info-main-form-base';
/**
* form部件
*
* @export
* @class Info_MainEditForm
* @extends {Info_MainEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class Info_MainEditForm extends Info_MainEditFormBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, TabExpPanelControlBase } from '@/studio-core';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import InfoViewtabexppanelService from './info-viewtabexppanel-tabexppanel-service';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
/**
* tabexppanel部件基类
*
* @export
* @class TabExpPanelControlBase
* @extends {InfoViewtabexppanelTabexppanelBase}
*/
export class InfoViewtabexppanelTabexppanelBase extends TabExpPanelControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof InfoViewtabexppanelTabexppanelBase
*/
protected controlType: string = 'TABEXPPANEL';
/**
* 建构部件服务对象
*
* @type {InfoViewtabexppanelService}
* @memberof InfoViewtabexppanelTabexppanelBase
*/
public service: InfoViewtabexppanelService = new InfoViewtabexppanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof InfoViewtabexppanelTabexppanelBase
*/
public appEntityService: EAMLocationService = new EAMLocationService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof InfoViewtabexppanelTabexppanelBase
*/
protected appDeName: string = 'eamlocation';
/**
* 是否初始化
*
* @protected
* @returns {any}
* @memberof InfoViewtabexppanel
*/
protected isInit: any = {
tabviewpanel: true ,
tabviewpanel2: false ,
}
/**
* 被激活的分页面板
*
* @protected
* @type {string}
* @memberof InfoViewtabexppanel
*/
protected activatedTabViewPanel: string = 'tabviewpanel';
/**
* 组件创建完毕
*
* @protected
* @memberof InfoViewtabexppanel
*/
protected ctrlCreated(): void {
//设置分页导航srfparentdename和srfparentkey
if (this.context.eamlocation) {
Object.assign(this.context, { srfparentdename: 'EAMLocation', srfparentkey: this.context.eamlocation });
}
super.ctrlCreated();
}
}
\ No newline at end of file
/**
* InfoViewtabexppanel 部件模型
*
* @export
* @class InfoViewtabexppanelModel
*/
export default class InfoViewtabexppanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof InfoViewtabexppanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'eamlocation',
prop: 'eamlocationid',
},
{
name: 'createman',
},
{
name: 'createdate',
},
{
name: 'eamlocationname',
},
{
name: 'updateman',
},
{
name: 'updatedate',
},
{
name: 'eamlocationtypeid',
},
{
name: 'peamlocationid',
},
{
name: 'eamlocationstateid',
},
{
name: 'peamlocationname',
},
{
name: 'eamlocationtypename',
},
{
name: 'eamlocationstatename',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import InfoViewtabexppanelModel from './info-viewtabexppanel-tabexppanel-model';
/**
* InfoViewtabexppanel 部件服务对象
*
* @export
* @class InfoViewtabexppanelService
*/
export default class InfoViewtabexppanelService extends ControlService {
/**
* 功能位置服务对象
*
* @type {EAMLocationService}
* @memberof InfoViewtabexppanelService
*/
public appEntityService: EAMLocationService = new EAMLocationService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof InfoViewtabexppanelService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of InfoViewtabexppanelService.
*
* @param {*} [opts={}]
* @memberof InfoViewtabexppanelService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new InfoViewtabexppanelModel();
}
}
\ No newline at end of file
<div class='tabviewpanel'>
<tabs :value="activatedTabViewPanel" :animated="false" class='tabexppanel' name='infoviewtabexppanel' @on-click="tabPanelClick($event)">
<tab-pane :index="0" name='tabviewpanel' tab='infoviewtabexppanel' class=''
:label="(h) =>{
return h('div', [
h('span', '功能位置信息'),
h('Badge', {
props: {
count: undefined,
type: 'primary'
}
})
])
}" >
<view_tabviewpanel
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
v-if="isInit.tabviewpanel"
name="tabviewpanel"
ref='tabviewpanel'
:expActive="activatedTabViewPanel === 'tabviewpanel'"
@viewpanelDatasChange = "tabViewPanelDatasChange"
@closeview="closeView($event)">
</view_tabviewpanel>
</tab-pane>
<tab-pane :index="1" name='tabviewpanel2' tab='infoviewtabexppanel' class=''
:label="(h) =>{
return h('div', [
h('span', '下级功能位置'),
h('Badge', {
props: {
count: undefined,
type: 'primary'
}
})
])
}" >
<view_tabviewpanel2
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
v-if="isInit.tabviewpanel2"
name="tabviewpanel2"
ref='tabviewpanel2'
:expActive="activatedTabViewPanel === 'tabviewpanel2'"
@viewpanelDatasChange = "tabViewPanelDatasChange"
@closeview="closeView($event)">
</view_tabviewpanel2>
</tab-pane>
</tabs>
</div>
\ No newline at end of file
<template src="./info-viewtabexppanel-tabexppanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InfoViewtabexppanelTabexppanelBase } from './info-viewtabexppanel-tabexppanel-base';
import view_tabviewpanel from '@widgets/eamlocation/info-viewtabviewpanel-tabviewpanel/info-viewtabviewpanel-tabviewpanel.vue';
import view_tabviewpanel2 from '@widgets/eamlocation/info-viewtabviewpanel2-tabviewpanel/info-viewtabviewpanel2-tabviewpanel.vue';
/**
* tabexppanel部件
*
* @export
* @class InfoViewtabexppanelTabexppanel
* @extends {InfoViewtabexppanelTabexppanelBase}
*/
@Component({
components: {
view_tabviewpanel,
view_tabviewpanel2,
}
})
@VueLifeCycleProcessing()
export default class InfoViewtabexppanelTabexppanel extends InfoViewtabexppanelTabexppanelBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import InfoViewtabviewpanelService from './info-viewtabviewpanel-tabviewpanel-service';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
/**
* tabviewpanel部件基类
*
* @export
* @class MainControlBase
* @extends {InfoViewtabviewpanelTabviewpanelBase}
*/
export class InfoViewtabviewpanelTabviewpanelBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof InfoViewtabviewpanelTabviewpanelBase
*/
protected controlType: string = 'TABVIEWPANEL';
/**
* 建构部件服务对象
*
* @type {InfoViewtabviewpanelService}
* @memberof InfoViewtabviewpanelTabviewpanelBase
*/
public service: InfoViewtabviewpanelService = new InfoViewtabviewpanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof InfoViewtabviewpanelTabviewpanelBase
*/
public appEntityService: EAMLocationService = new EAMLocationService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof InfoViewtabviewpanelTabviewpanelBase
*/
protected appDeName: string = 'eamlocation';
/**
* 导航模式下项是否激活
*
* @type {*}
* @memberof InfoViewtabviewpanel
*/
@Prop()
public expActive!: any;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof InfoViewtabviewpanel
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof InfoViewtabviewpanel
*/
public getData(): any {
return null;
}
/**
* 是否被激活
*
* @type {boolean}
* @memberof InfoViewtabviewpanel
*/
public isActivied: boolean = true;
/**
* 局部上下文
*
* @type {*}
* @memberof InfoViewtabviewpanel
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof InfoViewtabviewpanel
*/
public localViewParam: any = null;
/**
* 传入上下文
*
* @type {string}
* @memberof TabExpViewtabviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 传入视图参数
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 视图面板过滤项
*
* @type {string}
* @memberof InfoViewtabviewpanel
*/
public navfilter: string = "";
/**
* vue 生命周期
*
* @returns
* @memberof InfoViewtabviewpanel
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof InfoViewtabviewpanel
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.$forceUpdate();
this.initNavParam();
});
}
}
/**
* 初始化导航参数
*
* @memberof InfoViewtabviewpanel
*/
public initNavParam(){
if(!Object.is(this.navfilter,"")){
Object.assign(this.viewparams,{[this.navfilter]:this.context['majorentity']})
}
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata =JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* 视图数据变化
*
* @memberof InfoViewtabviewpanel
*/
public viewDatasChange($event:any){
this.$emit('viewpanelDatasChange',$event);
}
/**
* vue 生命周期
*
* @memberof InfoViewtabviewpanel
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof InfoViewtabviewpanel
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* InfoViewtabviewpanel 部件模型
*
* @export
* @class InfoViewtabviewpanelModel
*/
export default class InfoViewtabviewpanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof InfoViewtabviewpanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'eamlocation',
prop: 'eamlocationid',
},
{
name: 'createman',
},
{
name: 'createdate',
},
{
name: 'eamlocationname',
},
{
name: 'updateman',
},
{
name: 'updatedate',
},
{
name: 'eamlocationtypeid',
},
{
name: 'peamlocationid',
},
{
name: 'eamlocationstateid',
},
{
name: 'peamlocationname',
},
{
name: 'eamlocationtypename',
},
{
name: 'eamlocationstatename',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* InfoViewtabviewpanel 部件服务对象
*
* @export
* @class InfoViewtabviewpanelService
*/
export default class InfoViewtabviewpanelService extends ControlService {
}
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'>
<eamlocation-summary-view
class='viewcontainer2'
:viewdata="viewdata"
:viewparam="viewparam"
@viewload="viewDatasChange($event)"
:viewDefaultUsage="false"
:viewUsage="7"
:expActive="expActive"
/>
</div>
\ No newline at end of file
<template src="./info-viewtabviewpanel-tabviewpanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InfoViewtabviewpanelTabviewpanelBase } from './info-viewtabviewpanel-tabviewpanel-base';
/**
* tabviewpanel部件
*
* @export
* @class InfoViewtabviewpanelTabviewpanel
* @extends {InfoViewtabviewpanelTabviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class InfoViewtabviewpanelTabviewpanel extends InfoViewtabviewpanelTabviewpanelBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import InfoViewtabviewpanel2Service from './info-viewtabviewpanel2-tabviewpanel-service';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
/**
* tabviewpanel2部件基类
*
* @export
* @class MainControlBase
* @extends {InfoViewtabviewpanel2TabviewpanelBase}
*/
export class InfoViewtabviewpanel2TabviewpanelBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof InfoViewtabviewpanel2TabviewpanelBase
*/
protected controlType: string = 'TABVIEWPANEL';
/**
* 建构部件服务对象
*
* @type {InfoViewtabviewpanel2Service}
* @memberof InfoViewtabviewpanel2TabviewpanelBase
*/
public service: InfoViewtabviewpanel2Service = new InfoViewtabviewpanel2Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof InfoViewtabviewpanel2TabviewpanelBase
*/
public appEntityService: EAMLocationService = new EAMLocationService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof InfoViewtabviewpanel2TabviewpanelBase
*/
protected appDeName: string = 'eamlocation';
/**
* 导航模式下项是否激活
*
* @type {*}
* @memberof InfoViewtabviewpanel2
*/
@Prop()
public expActive!: any;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof InfoViewtabviewpanel2
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof InfoViewtabviewpanel2
*/
public getData(): any {
return null;
}
/**
* 是否被激活
*
* @type {boolean}
* @memberof InfoViewtabviewpanel2
*/
public isActivied: boolean = true;
/**
* 局部上下文
*
* @type {*}
* @memberof InfoViewtabviewpanel2
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof InfoViewtabviewpanel2
*/
public localViewParam: any = null;
/**
* 传入上下文
*
* @type {string}
* @memberof TabExpViewtabviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 传入视图参数
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 视图面板过滤项
*
* @type {string}
* @memberof InfoViewtabviewpanel2
*/
public navfilter: string = "";
/**
* vue 生命周期
*
* @returns
* @memberof InfoViewtabviewpanel2
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof InfoViewtabviewpanel2
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.$forceUpdate();
this.initNavParam();
});
}
}
/**
* 初始化导航参数
*
* @memberof InfoViewtabviewpanel2
*/
public initNavParam(){
if(!Object.is(this.navfilter,"")){
Object.assign(this.viewparams,{[this.navfilter]:this.context['majorentity']})
}
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata =JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* 视图数据变化
*
* @memberof InfoViewtabviewpanel2
*/
public viewDatasChange($event:any){
this.$emit('viewpanelDatasChange',$event);
}
/**
* vue 生命周期
*
* @memberof InfoViewtabviewpanel2
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof InfoViewtabviewpanel2
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* InfoViewtabviewpanel2 部件模型
*
* @export
* @class InfoViewtabviewpanel2Model
*/
export default class InfoViewtabviewpanel2Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof InfoViewtabviewpanel2Model
*/
public getDataItems(): any[] {
return [
{
name: 'eamlocation',
prop: 'eamlocationid',
},
{
name: 'createman',
},
{
name: 'createdate',
},
{
name: 'eamlocationname',
},
{
name: 'updateman',
},
{
name: 'updatedate',
},
{
name: 'eamlocationtypeid',
},
{
name: 'peamlocationid',
},
{
name: 'eamlocationstateid',
},
{
name: 'peamlocationname',
},
{
name: 'eamlocationtypename',
},
{
name: 'eamlocationstatename',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* InfoViewtabviewpanel2 部件服务对象
*
* @export
* @class InfoViewtabviewpanel2Service
*/
export default class InfoViewtabviewpanel2Service extends ControlService {
}
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'>
<eamlocation-child-grid-view
class='viewcontainer2'
:viewdata="viewdata"
:viewparam="viewparam"
@viewload="viewDatasChange($event)"
:viewDefaultUsage="false"
:viewUsage="7"
:expActive="expActive"
/>
</div>
\ No newline at end of file
<template src="./info-viewtabviewpanel2-tabviewpanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InfoViewtabviewpanel2TabviewpanelBase } from './info-viewtabviewpanel2-tabviewpanel-base';
/**
* tabviewpanel2部件
*
* @export
* @class InfoViewtabviewpanel2Tabviewpanel
* @extends {InfoViewtabviewpanel2TabviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class InfoViewtabviewpanel2Tabviewpanel extends InfoViewtabviewpanel2TabviewpanelBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, GridControlBase } from '@/studio-core';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import MainService from './main-grid-service';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
import { FormItemModel } from '@/model/form-detail';
/**
* grid部件基类
*
* @export
* @class GridControlBase
* @extends {MainGridBase}
*/
export class MainGridBase extends GridControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof MainGridBase
*/
protected controlType: string = 'GRID';
/**
* 建构部件服务对象
*
* @type {MainService}
* @memberof MainGridBase
*/
public service: MainService = new MainService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof MainGridBase
*/
public appEntityService: EAMLocationService = new EAMLocationService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainGridBase
*/
protected appDeName: string = 'eamlocation';
/**
* 界面UI服务对象
*
* @type {EAMLocationUIService}
* @memberof MainBase
*/
public appUIService:EAMLocationUIService = new EAMLocationUIService(this.$store);
/**
* 界面行为模型
*
* @type {*}
* @memberof MainBase
*/
public ActionModel: any = {
};
/**
* 本地缓存标识
*
* @protected
* @type {string}
* @memberof MainBase
*/
protected localStorageTag: string = 'eamlocation_main_grid';
/**
* 所有列成员
*
* @type {any[]}
* @memberof MainGridBase
*/
public allColumns: any[] = [
{
name: 'eamlocationid',
label: '功能位置标识',
langtag: 'entities.eamlocation.main_grid.columns.eamlocationid',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamlocationname',
label: '功能位置名称',
langtag: 'entities.eamlocation.main_grid.columns.eamlocationname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamlocationtypename',
label: '功能位置类型',
langtag: 'entities.eamlocation.main_grid.columns.eamlocationtypename',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'peamlocationname',
label: '上级位置',
langtag: 'entities.eamlocation.main_grid.columns.peamlocationname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamlocationstatename',
label: '功能位置状态',
langtag: 'entities.eamlocation.main_grid.columns.eamlocationstatename',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
]
/**
* 获取表格行模型
*
* @type {*}
* @memberof MainGridBase
*/
public getGridRowModel(){
return {
srfkey: new FormItemModel(),
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof MainGridBase
*/
public rules: any = {
srfkey: [
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '功能位置标识 值不能为空', trigger: 'change' },
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '功能位置标识 值不能为空', trigger: 'blur' },
],
}
/**
* 获取对应列class
*
* @type {*}
* @memberof MainBase
*/
public hasRowEdit: any = {
'eamlocationid':false,
'eamlocationname':false,
'eamlocationtypename':false,
'peamlocationname':false,
'eamlocationstatename':false,
};
/**
* 获取对应列class
*
* @param {*} $args row 行数据,column 列数据,rowIndex 行索引,列索引
* @returns {void}
* @memberof MainBase
*/
public getCellClassName(args: {row: any, column: any, rowIndex: number, columnIndex: number}): any {
return ( this.hasRowEdit[args.column.property] && this.actualIsOpenEdit ) ? "edit-cell" : "info-cell";
}
/**
* 导出数据格式化
*
* @param {*} filterVal
* @param {*} jsonData
* @param {any[]} [codelistColumns=[]]
* @returns {Promise<any>}
* @memberof MainGridBase
*/
public async formatExcelData(filterVal: any, jsonData: any, codelistColumns?: any[]): Promise<any> {
return super.formatExcelData(filterVal, jsonData, [
]);
}
}
\ No newline at end of file
/**
* Main 部件模型
*
* @export
* @class MainModel
*/
export default class MainModel {
/**
* 是否是实体数据导出
*
* @returns {any[]}
* @memberof MainGridMode
*/
public isDEExport: boolean = false;
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof MainGridMode
*/
public getDataItems(): any[] {
if(this.isDEExport){
return [
]
}else{
return [
{
name: 'eamlocationname',
prop: 'eamlocationname',
dataType: 'TEXT',
},
{
name: 'eamlocationid',
prop: 'eamlocationid',
dataType: 'GUID',
},
{
name: 'peamlocationname',
prop: 'peamlocationname',
dataType: 'PICKUPTEXT',
},
{
name: 'eamlocationstateid',
prop: 'eamlocationstateid',
dataType: 'PICKUP',
},
{
name: 'peamlocationid',
prop: 'peamlocationid',
dataType: 'PICKUP',
},
{
name: 'eamlocationstatename',
prop: 'eamlocationstatename',
dataType: 'PICKUPTEXT',
},
{
name: 'eamlocationtypename',
prop: 'eamlocationtypename',
dataType: 'PICKUPTEXT',
},
{
name: 'srfmajortext',
prop: 'eamlocationname',
dataType: 'TEXT',
},
{
name: 'eamlocationtypeid',
prop: 'eamlocationtypeid',
dataType: 'PICKUP',
},
{
name: 'srfdataaccaction',
prop: 'eamlocationid',
dataType: 'GUID',
},
{
name: 'srfkey',
prop: 'eamlocationid',
dataType: 'GUID',
isEditable:true
},
{
name: 'eamlocation',
prop: 'eamlocationid',
},
{
name:'size',
prop:'size'
},
{
name:'query',
prop:'query'
},
{
name:'filter',
prop:'filter'
},
{
name:'page',
prop:'page'
},
{
name:'sort',
prop:'sort'
},
{
name:'srfparentdata',
prop:'srfparentdata'
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
]
}
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import MainModel from './main-grid-model';
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export default class MainService extends ControlService {
/**
* 功能位置服务对象
*
* @type {EAMLocationService}
* @memberof MainService
*/
public appEntityService: EAMLocationService = new EAMLocationService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof MainService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of MainService.
*
* @param {*} [opts={}]
* @memberof MainService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new MainModel();
}
/**
* 处理数据
*
* @public
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof MainService
*/
public doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof MainService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
return Promise.reject([])
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestDataWithUpdate(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestDataWithUpdate(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data,isloading);
}else{
result =_appEntityService.Update(Context,Data,isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 获取数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public get(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:0});
}
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public search(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.FetchDefault(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public loadDraft(action: string, context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:'0'});
//仿真主键数据
response.data.eamlocationid = Util.createUUID();
}
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public frontLogic(action:string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据(修改或增加数据)
*
* @param action 行为
* @param data 数据
* @memberof MainService
*/
public handleRequestDataWithUpdate(action: string,context:any ={},data: any = {},isMerge:boolean = false){
let model: any = this.getMode();
if (!model && model.getDataItems instanceof Function) {
return data;
}
let dataItems: any[] = model.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
dataItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop && item.name ){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.isEditable && item.prop && item.name && (data[item.name] || Object.is(data[item.name],0)) ){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
}
\ No newline at end of file
<div :class="{ 'grid': true, 'show-paging-bar': isEnablePagingBar, 'hidden-paging-bar': !isEnablePagingBar }">
<i-form>
<el-table v-if="isDisplay === true"
:default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"
@sort-change="onSortChange($event)"
:border="isDragendCol"
:highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName.bind(_self)"
:cell-class-name="getCellClassName.bind(_self)"
size="mini"
stripe
@row-click="rowClick($event)"
@select-all="selectAll($event)"
@select="select($event)"
@row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
无数据
<span class="quick-toolbar">
</span>
</template>
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template>
<template v-if="getColumnState('eamlocationid')">
<el-table-column show-overflow-tooltip :prop="'eamlocationid'" :label="$t('entities.eamlocation.main_grid.columns.eamlocationid')" :width="160" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamlocation.main_grid.columns.eamlocationid')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamlocationid}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamlocationname')">
<el-table-column show-overflow-tooltip :prop="'eamlocationname'" :label="$t('entities.eamlocation.main_grid.columns.eamlocationname')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamlocation.main_grid.columns.eamlocationname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamlocationname}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamlocationtypename')">
<el-table-column show-overflow-tooltip :prop="'eamlocationtypename'" :label="$t('entities.eamlocation.main_grid.columns.eamlocationtypename')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamlocation.main_grid.columns.eamlocationtypename')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamlocationtypename}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('peamlocationname')">
<el-table-column show-overflow-tooltip :prop="'peamlocationname'" :label="$t('entities.eamlocation.main_grid.columns.peamlocationname')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamlocation.main_grid.columns.peamlocationname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.peamlocationname}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamlocationstatename')">
<el-table-column show-overflow-tooltip :prop="'eamlocationstatename'" :label="$t('entities.eamlocation.main_grid.columns.eamlocationstatename')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamlocation.main_grid.columns.eamlocationstatename')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamlocationstatename}}</span>
</template>
</el-table-column>
</template>
<template v-if="adaptiveState">
<el-table-column></el-table-column>
</template>
</el-table>
<row class='grid-pagination' v-show="items.length > 0">
<page class='pull-right' @on-change="pageOnChange($event)"
@on-page-size-change="onPageSizeChange($event)"
:transfer="true" :total="totalRecord"
show-sizer :current="curPage" :page-size="limit"
:page-size-opts="[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]" show-elevator show-total>
<span>
<span class="page-column">
<poptip transfer placement="top-start">
<i-button icon="md-menu">{{$t('app.gridpage.choicecolumns')}}</i-button>
<div slot="content">
<template v-for="col in allColumns">
<div :key="col.name"><el-checkbox v-model="col.show" @change="onColChange()">{{$t(col.langtag)}}</el-checkbox></div>
</template>
</div>
</poptip>
</span>
<span v-if="selections.length > 0" class="batch-toolbar">
</span>
<span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
<span>
{{$t('app.gridpage.show')}}&nbsp;
<span>
<template v-if="items.length === 1">
1
</template>
<template v-else>
<span>{{(curPage - 1) * limit + 1}}&nbsp;-&nbsp;{{totalRecord > curPage * limit ? curPage * limit : totalRecord}}</span>
</template>
</span>&nbsp;
{{$t('app.gridpage.records')}},{{$t('app.gridpage.totle')}}&nbsp;{{totalRecord}}&nbsp;{{$t('app.gridpage.records')}}
</span>
</span>
</page>
</row>
</i-form>
</div>
\ No newline at end of file
<template src="./main-grid.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { MainGridBase } from './main-grid-base';
/**
* grid部件
*
* @export
* @class MainGrid
* @extends {MainGridBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class MainGrid extends MainGridBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import MainInfoService from './main-info-dashboard-service';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
import UtilService from '@/utilservice/util-service';
/**
* dashboard部件基类
*
* @export
* @class MainControlBase
* @extends {MainInfoDashboardBase}
*/
export class MainInfoDashboardBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof MainInfoDashboardBase
*/
protected controlType: string = 'DASHBOARD';
/**
* 建构部件服务对象
*
* @type {MainInfoService}
* @memberof MainInfoDashboardBase
*/
public service: MainInfoService = new MainInfoService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof MainInfoDashboardBase
*/
public appEntityService: EAMLocationService = new EAMLocationService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainInfoDashboardBase
*/
protected appDeName: string = 'eamlocation';
/**
* 是否支持看板定制
*
* @public
* @type {(boolean)}
* @memberof MainInfo
*/
@Prop() public isEnableCustomized!:boolean;
/**
* 是否已有看板定制
*
* @public
* @type {(boolean)}
* @memberof MainInfo
*/
public isHasCustomized:boolean = false;
/**
* 模型数据
*
* @public
* @type {(*)}
* @memberof MainInfo
*/
public modelDta:any;
/**
* modleId
*
* @type {string}
* @memberof MainInfo
*/
public modelId:string = "dashboard_eamlocation_maininfo";
/**
* 建构功能服务对象
*
* @type {UtilService}
* @memberof MainInfo
*/
public utilService:UtilService = new UtilService();
/**
* 功能服务名称
*
* @type {string}
* @memberof MainInfo
*/
public utilServiceName:string = "";
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof MainInfo
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof MainInfo
*/
public getData(): any {
return {};
}
/**
* vue 生命周期
*
* @memberof MainInfo
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof MainInfo
*/
public afterCreated(){
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('load', action)) {
this.loadModel();
}
});
}
}
/**
* 动态设计水平列数
*
* @memberof MainInfo
*/
public layoutColNum:number = 12;
/**
* 动态设计单元格高度,80px
*
* @memberof MainInfo
*/
public layoutRowH:number = 80;
/**
* 通知状态
*
* @memberof MainInfo
*/
public notifyState(){
this.$nextTick(() =>{
if (this.isHasCustomized) {
if (this.modelDta && this.modelDta.length > 0) {
this.modelDta.forEach((item: any) => {
this.viewState.next({
tag: item.portletCodeName,
action: "load",
data: JSON.parse(JSON.stringify(this.viewparams))
});
});
}
} else {
if (this.viewState) {
const refs: any = this.$refs;
Object.keys(refs).forEach((name: string) => {
this.viewState.next({
tag: name,
action: "load",
data: JSON.parse(JSON.stringify(this.viewparams))
});
});
}
}
})
}
/**
* 加载布局与数据模型
*
* @memberof MainInfo
*/
public loadModel(){
if(this.isEnableCustomized){
this.utilService.getService(this.utilServiceName).then((service:any) =>{
service.loadModelData(JSON.parse(JSON.stringify(this.context)),{modelid:this.modelId,utilServiceName:this.utilServiceName}).then((res:any) =>{
if(res && res.status == 200){
const data:any = res.data;
if(data && data.length >0){
this.isHasCustomized = true;
this.modelDta = data;
this.$forceUpdate();
}else{
this.isHasCustomized = false;
}
this.notifyState();
}else{
console.error("加载面板模型异常");
this.isHasCustomized = false;
this.notifyState();
}
}).catch((error:any)=>{
console.error("加载面板模型异常");
console.error(error);
this.isHasCustomized = false;
this.notifyState();
});
})
}else{
this.notifyState();
}
}
/**
* 处理私人定制按钮
*
* @memberof MainInfo
*/
public handleClick(){
const view:any ={
viewname: 'app-portal-design',
title: (this.$t('app.dashBoard.handleClick.title')),
width: 1600,
placement: 'DRAWER_RIGHT'
}
const viewparam:any ={
modelid:this.modelId,
utilServiceName:this.utilServiceName,
appdeName:'EAMLocation'
}
const appdrawer = this.$appdrawer.openDrawer(view, JSON.parse(JSON.stringify(this.context)), viewparam);
appdrawer.subscribe((result: any) => {
if(Object.is(result.ret,'OK')){
this.loadModel();
}
});
}
/**
* vue 生命周期
*
* @memberof MainInfo
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof MainInfo
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* MainInfo 部件模型
*
* @export
* @class MainInfoModel
*/
export default class MainInfoModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof MainInfoModel
*/
public getDataItems(): any[] {
return [
{
name: 'eamlocation',
prop: 'eamlocationid',
},
{
name: 'createman',
},
{
name: 'createdate',
},
{
name: 'eamlocationname',
},
{
name: 'updateman',
},
{
name: 'updatedate',
},
{
name: 'eamlocationtypeid',
},
{
name: 'peamlocationid',
},
{
name: 'eamlocationstateid',
},
{
name: 'peamlocationname',
},
{
name: 'eamlocationtypename',
},
{
name: 'eamlocationstatename',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* MainInfo 部件服务对象
*
* @export
* @class MainInfoService
*/
export default class MainInfoService extends ControlService {
}
\ No newline at end of file
<div class='dashboard'>
<row v-if="isEnableCustomized">
<app-build @handleClick="handleClick.apply(_self, arguments)"></app-build>
</row>
<row v-if="!isHasCustomized">
<i-col :md="{ span: 24, offset: 0 }">
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<span>
<div class='portlet-container summary-viewdashboard-container1 ' :style="{}">
<row>
<i-col :md="{ span: 24, offset: 0 }">
<div class="portlet-without-title">
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<span>
<view_dashboard_sysportlet1
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:height="0"
:width="0"
name="dashboard_sysportlet1"
ref='dashboard_sysportlet1'
@closeview="closeView($event)">
</view_dashboard_sysportlet1>
</span>
</card>
</div>
</i-col>
</row>
</div>
</span>
</card>
</i-col>
</row>
<row v-if="isHasCustomized" style="width: 100%;min-height: calc(100% - 40px);">
<div class="portlet-container" style="position: relative;width:100%;">
<template v-for="(item, index) of modelDta">
<div :key="index" :style="{zIndex: 10, position: 'absolute', height: item.h*layoutRowH + 'px', width: `calc(100% / ${layoutColNum} * ${item.w})`,top: item.y*layoutRowH + 'px', left: `calc(100% / ${layoutColNum} * ${item.x})`}">
<component :key="$util.createUUID()" :is="item.componentName" :name="item.portletCodeName" :context="JSON.parse(JSON.stringify(context))" :viewDefaultUsage="false" :isAdaptiveSize="true" :viewState="viewState"></component>
</div>
</template>
</div>
</row>
</div>
\ No newline at end of file
<template src="./main-info-dashboard.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { MainInfoDashboardBase } from './main-info-dashboard-base';
import view_dashboard_sysportlet1 from '@widgets/eamlocation/view-main-info-portlet/view-main-info-portlet.vue';
/**
* dashboard部件
*
* @export
* @class MainInfoDashboard
* @extends {MainInfoDashboardBase}
*/
@Component({
components: {
view_dashboard_sysportlet1,
}
})
@VueLifeCycleProcessing()
export default class MainInfoDashboard extends MainInfoDashboardBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import View_MainInfoService from './view-main-info-portlet-service';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
import { Environment } from '@/environments/environment';
/**
* dashboard_sysportlet1部件基类
*
* @export
* @class MainControlBase
* @extends {View_MainInfoPortletBase}
*/
export class View_MainInfoPortletBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof View_MainInfoPortletBase
*/
protected controlType: string = 'PORTLET';
/**
* 建构部件服务对象
*
* @type {View_MainInfoService}
* @memberof View_MainInfoPortletBase
*/
public service: View_MainInfoService = new View_MainInfoService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof View_MainInfoPortletBase
*/
public appEntityService: EAMLocationService = new EAMLocationService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof View_MainInfoPortletBase
*/
protected appDeName: string = 'eamlocation';
/**
* 长度
*
* @type {number}
* @memberof View_MainInfo
*/
@Prop() public height?: number;
/**
* 宽度
*
* @type {number}
* @memberof View_MainInfo
*/
@Prop() public width?: number;
/**
* 是否自适应大小
*
* @returns {boolean}
* @memberof View_MainInfoBase
*/
@Prop({default: false})public isAdaptiveSize!: boolean;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof View_MainInfoBase
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof View_MainInfoBase
*/
public getData(): any {
return {};
}
/**
* 获取高度
*
* @returns {any[]}
* @memberof View_MainInfoBase
*/
get getHeight(): any{
if(!this.$util.isEmpty(this.height) && !this.$util.isNumberNaN(this.height)){
if(this.height == 0){
return 'auto';
} else {
return this.height+'px';
}
} else {
return 'auto';
}
}
/**
* vue 生命周期
*
* @memberof View_MainInfoBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof View_MainInfoBase
*/
public afterCreated(){
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
const refs: any = this.$refs;
Object.keys(refs).forEach((_name: string) => {
this.viewState.next({ tag: _name, action: action, data: data });
});
});
}
}
/**
* vue 生命周期
*
* @memberof View_MainInfoBase
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof View_MainInfoBase
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
/**
* View_MainInfo 部件模型
*
* @export
* @class View_MainInfoModel
*/
export default class View_MainInfoModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof View_MainInfoModel
*/
public getDataItems(): any[] {
return [
{
name: 'eamlocation',
prop: 'eamlocationid',
},
{
name: 'createman',
},
{
name: 'createdate',
},
{
name: 'eamlocationname',
},
{
name: 'updateman',
},
{
name: 'updatedate',
},
{
name: 'eamlocationtypeid',
},
{
name: 'peamlocationid',
},
{
name: 'eamlocationstateid',
},
{
name: 'peamlocationname',
},
{
name: 'eamlocationtypename',
},
{
name: 'eamlocationstatename',
},
]
}
}
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* View_MainInfo 部件服务对象
*
* @export
* @class View_MainInfoService
*/
export default class View_MainInfoService extends ControlService {
}
<div class='portlet view-main-info ' :style="{}">
<p class='portlet-title'>
<span>
功能位置信息
</span>
</p>
<div class="portlet-with-title">
<eamlocation-info-main-view :viewUsage="4" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></eamlocation-info-main-view>
</div>
</div>
<template src="./view-main-info-portlet.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { View_MainInfoPortletBase } from './view-main-info-portlet-base';
/**
* dashboard_sysportlet1部件
*
* @export
* @class View_MainInfoPortlet
* @extends {View_MainInfoPortletBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class View_MainInfoPortlet extends View_MainInfoPortletBase { }
</script>
...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \ ...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /assetmanagement-app-assetmanagement.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /assetmanagement-app-assetmanagement.jar
EXPOSE 8080 EXPOSE 10325
ADD assetmanagement-app-assetmanagement.jar /assetmanagement-app-assetmanagement.jar ADD assetmanagement-app-assetmanagement.jar /assetmanagement-app-assetmanagement.jar
...@@ -3,9 +3,24 @@ services: ...@@ -3,9 +3,24 @@ services:
assetmanagement-app-assetmanagement: assetmanagement-app-assetmanagement:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/assetmanagement-app-assetmanagement:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/assetmanagement-app-assetmanagement:latest
ports: ports:
- "8080:8080" - "10325:10325"
networks: networks:
- agent_network - agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10325
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_LAB01_e85d8801c
- SPRING_DATASOURCE_PASSWORD=b1@@@772
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
- CAS=https://passport.ibizlab.cn
- NACOS=172.16.240.110:8848
- SEATA_ENABLED=true
deploy: deploy:
resources: resources:
limits: limits:
......
...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \ ...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /assetmanagement-provider-assetapi.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /assetmanagement-provider-assetapi.jar
EXPOSE 10315 EXPOSE 8081
ADD assetmanagement-provider-assetapi.jar /assetmanagement-provider-assetapi.jar ADD assetmanagement-provider-assetapi.jar /assetmanagement-provider-assetapi.jar
...@@ -3,23 +3,9 @@ services: ...@@ -3,23 +3,9 @@ services:
assetmanagement-provider-assetapi: assetmanagement-provider-assetapi:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/assetmanagement-provider-assetapi:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/assetmanagement-provider-assetapi:latest
ports: ports:
- "10315:10315" - "8081:8081"
networks: networks:
- agent_network - agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10315
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_LAB01_e85d8801c
- SPRING_DATASOURCE_PASSWORD=b1@@@772
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
- CAS=https://passport.ibizlab.cn
- NACOS=172.16.240.110:8848
deploy: deploy:
resources: resources:
limits: limits:
......
...@@ -104,7 +104,7 @@ server: ...@@ -104,7 +104,7 @@ server:
min-response-size: 10240 min-response-size: 10240
seata: seata:
enabled: false #是否开启全局事务 enabled: true #是否开启全局事务
application-id: iBizAssetManagement #服务标识 application-id: iBizAssetManagement #服务标识
tx-service-group: iBizAssetManagementgroup #事务组 tx-service-group: iBizAssetManagementgroup #事务组
service: service:
......
...@@ -37,11 +37,11 @@ ...@@ -37,11 +37,11 @@
git clone -b master $para2 ibizassetmanagement/ git clone -b master $para2 ibizassetmanagement/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd ibizassetmanagement/ cd ibizassetmanagement/
mvn clean package -Passetapi mvn clean package -Passetmanagement
cd assetmanagement-provider/assetmanagement-provider-assetapi cd assetmanagement-app/assetmanagement-app-assetmanagement
mvn -Passetapi docker:build mvn -Passetmanagement docker:build
mvn -Passetapi docker:push mvn -Passetmanagement docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/assetmanagement-provider-assetapi.yaml iBizEE --with-registry-auth docker -H $para1 stack deploy --compose-file=src/main/docker/assetmanagement-app-assetmanagement.yaml iBizEE --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册