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

lab_gzf 部署微服务应用

上级 1c01f7f3
......@@ -19,6 +19,26 @@
"viewtag": "0b6fa9e6ebc1f6d1afaf3c19585840b0",
"memo": "系统自动添加"
},
"eamlocationtreeexpview": {
"title": "功能位置信息",
"caption": "功能位置",
"viewtype": "DETREEEXPVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationTreeExpView",
"viewfilename": "eamlocation-tree-exp-view",
"viewtag": "135343573fd869053d84ecc2f48ffd49",
"memo": ""
},
"eamassetstatemodellinegridview": {
"title": "资产状态模型明细表格视图",
"caption": "资产状态模型明细",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Asset",
"viewname": "EAMAssetStateModelLineGridView",
"viewfilename": "eamasset-state-model-line-grid-view",
"viewtag": "15caf81deb1f02479030f14d90ce5c3e",
"memo": "系统自动添加"
},
"eamlocationeditview": {
"title": "功能位置信息",
"caption": "功能位置",
......@@ -29,6 +49,16 @@
"viewtag": "1769804cd7ab51624ac3c88c2090363b",
"memo": "系统自动添加"
},
"eamlocationtreechildgridview": {
"title": "功能位置信息",
"caption": "功能位置",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationTreeChildGridView",
"viewfilename": "eamlocation-tree-child-grid-view",
"viewtag": "21edc7e27023f06aac51f150f3fb1f10",
"memo": "系统自动添加"
},
"eamassetstateeditview": {
"title": "资产状态信息",
"caption": "资产状态",
......@@ -49,6 +79,16 @@
"viewtag": "2b28313d0f3925fa44b8683eb5ea54d6",
"memo": "系统自动添加"
},
"eamassetstatemodelgridview": {
"title": "资产状态模型表格视图",
"caption": "资产状态模型",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Asset",
"viewname": "EAMAssetStateModelGridView",
"viewfilename": "eamasset-state-model-grid-view",
"viewtag": "30027967566375f388f110149cf48b49",
"memo": ""
},
"eamlocationstatemodelpickupview": {
"title": "功能位置状态模型数据选择视图",
"caption": "功能位置状态模型",
......@@ -99,6 +139,16 @@
"viewtag": "6a395ea52232233416d9c7120518863d",
"memo": "系统自动添加"
},
"eamassetstatemodeleditview": {
"title": "资产状态模型编辑视图",
"caption": "资产状态模型",
"viewtype": "DEEDITVIEW",
"viewmodule": "Asset",
"viewname": "EAMAssetStateModelEditView",
"viewfilename": "eamasset-state-model-edit-view",
"viewtag": "6c2c69027dbbe13ab8d2732923487f59",
"memo": "系统自动添加"
},
"eamlocationstatemodeleditview": {
"title": "功能位置状态模型信息",
"caption": "功能位置状态模型",
......@@ -149,6 +199,36 @@
"viewtag": "a9f7eb2645c6505a232a0a13742c42a7",
"memo": "系统自动添加"
},
"eamassetstatemodelpickupgridview": {
"title": "资产状态模型选择表格视图",
"caption": "资产状态模型",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "Asset",
"viewname": "EAMAssetStateModelPickupGridView",
"viewfilename": "eamasset-state-model-pickup-grid-view",
"viewtag": "a9f86b6e01c06082f119369de0ee8f01",
"memo": "系统自动添加"
},
"eamassetstatemodellineeditview": {
"title": "资产状态模型明细编辑视图",
"caption": "资产状态模型明细",
"viewtype": "DEEDITVIEW",
"viewmodule": "Asset",
"viewname": "EAMAssetStateModelLineEditView",
"viewfilename": "eamasset-state-model-line-edit-view",
"viewtag": "ad2a01fb2fd055e63d60260a18136d61",
"memo": "系统自动添加"
},
"eamassetstatepickupgridview": {
"title": "资产状态选择表格视图",
"caption": "资产状态",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "Asset",
"viewname": "EAMAssetStatePickupGridView",
"viewfilename": "eamasset-state-pickup-grid-view",
"viewtag": "aec3c3b9b959ac67bf41fe45cca7808b",
"memo": "系统自动添加"
},
"eamlocationchildgridview": {
"title": "功能位置表格视图",
"caption": "功能位置",
......@@ -219,6 +299,16 @@
"viewtag": "D44132B9-5261-4008-A146-6287A80D5D31",
"memo": ""
},
"eamassetstatemodelpickupview": {
"title": "资产状态模型数据选择视图",
"caption": "资产状态模型",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "Asset",
"viewname": "EAMAssetStateModelPickupView",
"viewfilename": "eamasset-state-model-pickup-view",
"viewtag": "d69c20799b79d71f84ed52f036b3490c",
"memo": "系统自动添加"
},
"eamlocationtypeeditview": {
"title": "功能位置类型信息",
"caption": "功能位置类型",
......@@ -229,6 +319,16 @@
"viewtag": "dd09755644dcf1e57c062b4e08e4ce3a",
"memo": "系统自动添加"
},
"eamassetstatepickupview": {
"title": "资产状态数据选择视图",
"caption": "资产状态",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "Asset",
"viewname": "EAMAssetStatePickupView",
"viewfilename": "eamasset-state-pickup-view",
"viewtag": "ddfe97780b64a25b28b14a283fa27a61",
"memo": "系统自动添加"
},
"eamapplystateeditview": {
"title": "维护申请状态编辑视图",
"caption": "维护申请状态",
......
......@@ -61,4 +61,20 @@ export interface EAMAssetType {
* @memberof EAMAssetType
*/
eamassetstatemodelid?: any;
/**
* 资产状态模型
*
* @returns {*}
* @memberof EAMAssetType
*/
eamassetstatemodelname?: any;
/**
* 资产类型编号
*
* @returns {*}
* @memberof EAMAssetType
*/
assettypenumber?: any;
}
\ No newline at end of file
......@@ -101,4 +101,12 @@ export interface EAMLocation {
* @memberof EAMLocation
*/
eamlocationstatename?: any;
/**
* 功能位置编号
*
* @returns {*}
* @memberof EAMLocation
*/
locationnumber?: any;
}
\ No newline at end of file
......@@ -141,6 +141,7 @@ export default {
menuitem9: "功能位置",
menuitem2: "资产管理",
menuitem10: "资产状态",
menuitem11: "资产状态模型",
menuitem3: "维护申请",
menuitem4: "工单管理",
menuitem5: "维护计划",
......
......@@ -141,6 +141,7 @@ export default {
menuitem9: "功能位置",
menuitem2: "资产管理",
menuitem10: "资产状态",
menuitem11: "资产状态模型",
menuitem3: "维护申请",
menuitem4: "工单管理",
menuitem5: "维护计划",
......
......@@ -12,4 +12,150 @@ export default {
eamassetstatename: "资产状态",
eamassetstatemodelname: "资产状态模型",
},
views: {
gridview: {
caption: "资产状态模型明细",
title: "资产状态模型明细表格视图",
},
editview: {
caption: "资产状态模型明细",
title: "资产状态模型明细编辑视图",
},
},
main_form: {
details: {
group1: "资产状态模型明细基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "资产状态模型明细标识",
srfmajortext: "资产状态模型明细名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
eamassetstatemodelname: "资产状态模型",
eamassetstatename: "资产状态",
eamassetstatemodelid: "资产状态模型标识",
eamassetstateid: "资产状态标识",
eamassetstatemodellineid: "资产状态模型明细标识",
},
uiactions: {
},
},
main_grid: {
columns: {
eamassetstatemodelname: "资产状态模型",
eamassetstatename: "资产状态",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem1: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem9: {
caption: "行编辑",
tip: "行编辑",
},
tbitem6: {
caption: "新建行",
tip: "新建行",
},
tbitem23: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
},
editviewtoolbar_toolbar: {
tbitem10: {
caption: "Save",
tip: "Save",
},
tbitem12: {
caption: "Save And New",
tip: "Save And New",
},
tbitem11: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem18: {
caption: "-",
tip: "",
},
tbitem9: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
tbitem19: {
caption: "-",
tip: "",
},
tbitem5: {
caption: "New",
tip: "New",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem1: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem22: {
caption: "-",
tip: "",
},
tbitem2: {
caption: "第一个记录",
tip: "第一个记录",
},
tbitem7: {
caption: "上一个记录",
tip: "上一个记录",
},
tbitem6: {
caption: "下一个记录",
tip: "下一个记录",
},
tbitem4: {
caption: "最后一个记录",
tip: "最后一个记录",
},
tbitem25: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "Help",
tip: "Help",
},
},
};
\ No newline at end of file
......@@ -11,4 +11,150 @@ export default {
eamassetstatename: "资产状态",
eamassetstatemodelname: "资产状态模型",
},
views: {
gridview: {
caption: "资产状态模型明细",
title: "资产状态模型明细表格视图",
},
editview: {
caption: "资产状态模型明细",
title: "资产状态模型明细编辑视图",
},
},
main_form: {
details: {
group1: "资产状态模型明细基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "资产状态模型明细标识",
srfmajortext: "资产状态模型明细名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
eamassetstatemodelname: "资产状态模型",
eamassetstatename: "资产状态",
eamassetstatemodelid: "资产状态模型标识",
eamassetstateid: "资产状态标识",
eamassetstatemodellineid: "资产状态模型明细标识",
},
uiactions: {
},
},
main_grid: {
columns: {
eamassetstatemodelname: "资产状态模型",
eamassetstatename: "资产状态",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem1: {
caption: "拷贝",
tip: "拷贝",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem9: {
caption: "行编辑",
tip: "行编辑",
},
tbitem6: {
caption: "新建行",
tip: "新建行",
},
tbitem23: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "导出",
tip: "导出",
},
},
editviewtoolbar_toolbar: {
tbitem10: {
caption: "保存",
tip: "保存",
},
tbitem12: {
caption: "保存并新建",
tip: "保存并新建",
},
tbitem11: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem18: {
caption: "-",
tip: "",
},
tbitem9: {
caption: "删除并关闭",
tip: "删除并关闭",
},
tbitem19: {
caption: "-",
tip: "",
},
tbitem5: {
caption: "新建",
tip: "新建",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem1: {
caption: "拷贝",
tip: "拷贝",
},
tbitem22: {
caption: "-",
tip: "",
},
tbitem2: {
caption: "第一个记录",
tip: "第一个记录",
},
tbitem7: {
caption: "上一个记录",
tip: "上一个记录",
},
tbitem6: {
caption: "下一个记录",
tip: "下一个记录",
},
tbitem4: {
caption: "最后一个记录",
tip: "最后一个记录",
},
tbitem25: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "帮助",
tip: "帮助",
},
},
};
\ No newline at end of file
......@@ -8,4 +8,137 @@ export default {
updatedate: "更新时间",
updateman: "更新人",
},
views: {
gridview: {
caption: "资产状态模型",
title: "资产状态模型表格视图",
},
editview: {
caption: "资产状态模型",
title: "资产状态模型编辑视图",
},
pickupgridview: {
caption: "资产状态模型",
title: "资产状态模型选择表格视图",
},
pickupview: {
caption: "资产状态模型",
title: "资产状态模型数据选择视图",
},
},
main_form: {
details: {
group1: "基本信息",
druipart1: "",
grouppanel1: "选中的资产状态",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "资产状态模型标识",
srfmajortext: "资产状态模型名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
eamassetstatemodelid: "资产状态模型标识",
eamassetstatemodelname: "资产状态模型名称",
},
uiactions: {
},
},
main_grid: {
columns: {
eamassetstatemodelid: "资产状态模型标识",
eamassetstatemodelname: "资产状态模型名称",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem5: {
caption: "New",
tip: "New",
},
tbitem2: {
caption: "Edit",
tip: "Edit {0}",
},
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: "",
},
tbitem20: {
caption: "其它",
tip: "其它",
},
tbitem24: {
caption: "Export Data Model",
tip: "导出数据模型",
},
tbitem25: {
caption: "数据导入",
tip: "数据导入",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem10: {
caption: "Filter",
tip: "Filter",
},
tbitem4: {
caption: "Help",
tip: "Help",
},
},
editviewtoolbar_toolbar: {
tbitem10: {
caption: "Save",
tip: "Save",
},
tbitem18: {
caption: "-",
tip: "",
},
tbitem11: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem19: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "关闭",
tip: "关闭",
},
},
};
\ No newline at end of file
......@@ -7,4 +7,137 @@ export default {
updatedate: "更新时间",
updateman: "更新人",
},
views: {
gridview: {
caption: "资产状态模型",
title: "资产状态模型表格视图",
},
editview: {
caption: "资产状态模型",
title: "资产状态模型编辑视图",
},
pickupgridview: {
caption: "资产状态模型",
title: "资产状态模型选择表格视图",
},
pickupview: {
caption: "资产状态模型",
title: "资产状态模型数据选择视图",
},
},
main_form: {
details: {
group1: "基本信息",
druipart1: "",
grouppanel1: "选中的资产状态",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "资产状态模型标识",
srfmajortext: "资产状态模型名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
eamassetstatemodelid: "资产状态模型标识",
eamassetstatemodelname: "资产状态模型名称",
},
uiactions: {
},
},
main_grid: {
columns: {
eamassetstatemodelid: "资产状态模型标识",
eamassetstatemodelname: "资产状态模型名称",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem5: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "编辑",
tip: "编辑",
},
tbitem1: {
caption: "拷贝",
tip: "拷贝",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "导出",
tip: "导出",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem20: {
caption: "其它",
tip: "其它",
},
tbitem24: {
caption: "导出数据模型",
tip: "导出数据模型",
},
tbitem25: {
caption: "数据导入",
tip: "数据导入",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem10: {
caption: "过滤",
tip: "过滤",
},
tbitem4: {
caption: "帮助",
tip: "帮助",
},
},
editviewtoolbar_toolbar: {
tbitem10: {
caption: "保存",
tip: "保存",
},
tbitem18: {
caption: "-",
tip: "",
},
tbitem11: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem19: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "关闭",
tip: "关闭",
},
},
};
\ No newline at end of file
......@@ -18,6 +18,14 @@ export default {
caption: "资产状态",
title: "资产状态信息",
},
pickupgridview: {
caption: "资产状态",
title: "资产状态选择表格视图",
},
pickupview: {
caption: "资产状态",
title: "资产状态数据选择视图",
},
},
main_form: {
details: {
......
......@@ -17,6 +17,14 @@ export default {
caption: "资产状态",
title: "资产状态信息",
},
pickupgridview: {
caption: "资产状态",
title: "资产状态选择表格视图",
},
pickupview: {
caption: "资产状态",
title: "资产状态数据选择视图",
},
},
main_form: {
details: {
......
......@@ -8,5 +8,7 @@ export default {
updateman: "更新人",
createdate: "建立时间",
eamassetstatemodelid: "资产状态模型标识",
eamassetstatemodelname: "资产状态模型",
assettypenumber: "资产类型编号",
},
};
\ No newline at end of file
......@@ -7,5 +7,7 @@ export default {
updateman: "更新人",
createdate: "建立时间",
eamassetstatemodelid: "资产状态模型标识",
eamassetstatemodelname: "资产状态模型",
assettypenumber: "资产类型编号",
},
};
\ No newline at end of file
......@@ -70,16 +70,6 @@ export default {
uiactions: {
},
},
editviewtoolbar_toolbar: {
tbitem2: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem1: {
caption: "关闭",
tip: "关闭",
},
},
gridviewtoolbar_toolbar: {
tbitem5: {
caption: "New",
......
......@@ -69,16 +69,6 @@ export default {
uiactions: {
},
},
editviewtoolbar_toolbar: {
tbitem2: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem1: {
caption: "关闭",
tip: "关闭",
},
},
gridviewtoolbar_toolbar: {
tbitem5: {
caption: "新建",
......
......@@ -13,12 +13,21 @@ export default {
peamlocationname: "上级位置",
eamlocationtypename: "功能位置类型",
eamlocationstatename: "功能位置状态",
locationnumber: "功能位置编号",
},
views: {
treeexpview: {
caption: "功能位置",
title: "功能位置信息",
},
editview: {
caption: "功能位置",
title: "功能位置信息",
},
treechildgridview: {
caption: "功能位置",
title: "功能位置信息",
},
pickupview: {
caption: "功能位置",
title: "功能位置数据选择视图",
......@@ -82,17 +91,18 @@ export default {
srfuf: "",
srfdeid: "",
srfsourcekey: "",
eamlocationid: "功能位置标识",
locationnumber: "功能位置编号",
eamlocationname: "功能位置名称",
eamlocationtypename: "功能位置类型",
peamlocationname: "上级位置",
eamlocationid: "功能位置标识",
},
uiactions: {
},
},
main_grid: {
columns: {
eamlocationid: "功能位置标识",
locationnumber: "功能位置编号",
eamlocationname: "功能位置名称",
eamlocationtypename: "功能位置类型",
peamlocationname: "上级位置",
......@@ -118,6 +128,52 @@ export default {
uiactions: {
},
},
treechildgridviewtoolbar_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",
......@@ -220,4 +276,12 @@ export default {
tip: "Filter",
},
},
locationtree_treeview: {
nodes: {
root: "默认根节点",
all: "全部功能位置",
},
uiactions: {
},
},
};
\ No newline at end of file
......@@ -12,12 +12,21 @@ export default {
peamlocationname: "上级位置",
eamlocationtypename: "功能位置类型",
eamlocationstatename: "功能位置状态",
locationnumber: "功能位置编号",
},
views: {
treeexpview: {
caption: "功能位置",
title: "功能位置信息",
},
editview: {
caption: "功能位置",
title: "功能位置信息",
},
treechildgridview: {
caption: "功能位置",
title: "功能位置信息",
},
pickupview: {
caption: "功能位置",
title: "功能位置数据选择视图",
......@@ -81,17 +90,18 @@ export default {
srfuf: "",
srfdeid: "",
srfsourcekey: "",
eamlocationid: "功能位置标识",
locationnumber: "功能位置编号",
eamlocationname: "功能位置名称",
eamlocationtypename: "功能位置类型",
peamlocationname: "上级位置",
eamlocationid: "功能位置标识",
},
uiactions: {
},
},
main_grid: {
columns: {
eamlocationid: "功能位置标识",
locationnumber: "功能位置编号",
eamlocationname: "功能位置名称",
eamlocationtypename: "功能位置类型",
peamlocationname: "上级位置",
......@@ -117,6 +127,52 @@ export default {
uiactions: {
},
},
treechildgridviewtoolbar_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: "保存并关闭",
......@@ -219,4 +275,12 @@ export default {
tip: "过滤",
},
},
locationtree_treeview: {
nodes: {
root: "默认根节点",
all: "全部功能位置",
},
uiactions: {
},
},
};
\ No newline at end of file
......@@ -97,7 +97,7 @@ mock.onGet('v7/app-index-viewappmenu').reply((config: any) => {
iconcls: 'fa fa-life-ring',
icon: '',
textcls: '',
appfunctag: '_4',
appfunctag: '_5',
resourcetag: '',
},
{
......@@ -115,7 +115,7 @@ mock.onGet('v7/app-index-viewappmenu').reply((config: any) => {
iconcls: 'fa fa-cube',
icon: '',
textcls: '',
appfunctag: '_3',
appfunctag: '_4',
resourcetag: '',
},
{
......@@ -133,7 +133,7 @@ mock.onGet('v7/app-index-viewappmenu').reply((config: any) => {
iconcls: 'fa fa-legal',
icon: '',
textcls: '',
appfunctag: '_5',
appfunctag: '_6',
resourcetag: '',
},
{
......@@ -151,7 +151,7 @@ mock.onGet('v7/app-index-viewappmenu').reply((config: any) => {
iconcls: 'fa fa-navicon',
icon: '',
textcls: '',
appfunctag: '_6',
appfunctag: '_7',
resourcetag: '',
},
],
......@@ -191,6 +191,24 @@ mock.onGet('v7/app-index-viewappmenu').reply((config: any) => {
textcls: '',
appfunctag: '_2',
resourcetag: '',
},
{
id: '209538AE-367C-4976-A2A7-5C40C622BF7F',
name: 'menuitem11',
text: '资产状态模型',
type: 'MENUITEM',
counterid: '',
tooltip: '资产状态模型',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: 'fa fa-cube',
icon: '',
textcls: '',
appfunctag: '_3',
resourcetag: '',
},
],
},
......
......@@ -87,6 +87,35 @@ mock.onDelete(new RegExp(/^\/eamassets\/batch$/)).reply((config: any) => {
});
// Select
mock.onGet(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:eamasset 方法: Select");
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','assetid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/select$/).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.assetid, tempValue.assetid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Select
mock.onGet(new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:eamasset 方法: Select");
......@@ -115,6 +144,33 @@ mock.onGet(new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((
return [status, _items];
});
// Create
mock.onPost(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamasset 方法: Create");
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','assetid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([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({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Create
mock.onPost(new RegExp(/^\/eamassets\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamasset 方法: Create");
......@@ -141,6 +197,33 @@ mock.onPost(new RegExp(/^\/eamassets\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamasset 方法: 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','assetid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([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({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Update
mock.onPut(new RegExp(/^\/eamassets\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamasset 方法: Update");
......@@ -179,6 +262,25 @@ mock.onPut(new RegExp(/^\/eamassets\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:eamasset 方法: 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, {}];
});
// GetDraft
mock.onGet(new RegExp(/^\/eamassets\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:eamasset 方法: GetDraft");
......@@ -195,6 +297,33 @@ mock.onGet(new RegExp(/^\/eamassets\/getdraft$/)).reply((config: any) => {
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:eamasset 方法: 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','assetid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/eamassets\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:eamasset 方法: CheckKey");
......@@ -233,6 +362,33 @@ mock.onPost(new RegExp(/^\/eamassets\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).rep
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:eamasset 方法: 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','assetid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Save
mock.onPost(new RegExp(/^\/eamassets\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:eamasset 方法: Save");
......@@ -271,6 +427,51 @@ mock.onPost(new RegExp(/^\/eamassets\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((
return [status, data];
});
// FetchDefault
mock.onGet(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:eamasset 方法: FetchDefault");
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'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/fetchdefault$/).exec(config.url);
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 : [];
if (items.length > 0 && paramArray.length > 0) {
paramArray.forEach((paramkey: any) => {
if (tempValue[paramkey] && tempValue[paramkey].indexOf(";") > 0) {
let keysGrounp: Array<any> = tempValue[paramkey].split(new RegExp(/[\;]/));
let tempArray: Array<any> = [];
keysGrounp.forEach((singlekey: any) => {
let _items = items.filter((item: any) => { return item[paramkey] == singlekey });
if(_items.length >0){
tempArray.push(..._items);
}
})
items = tempArray;
} else {
items = items.filter((item: any) => { return item[paramkey] == tempValue[paramkey] });
}
})
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(items);
console.groupEnd();
console.groupEnd();
return [status, items];
});
// FetchDefault
mock.onGet(new RegExp(/^\/eamassets\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:eamasset 方法: FetchDefault");
......@@ -314,15 +515,57 @@ mock.onGet(new RegExp(/^\/eamassets\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((c
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamasset 方法: 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','assetid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([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.assetid, tempValue.assetid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Remove
mock.onDelete(new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamasset 方法: Remove");
......@@ -351,6 +594,34 @@ mock.onDelete(new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((confi
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamasset 方法: 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','assetid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([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.assetid, tempValue.assetid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamasset 方法: Get");
......
......@@ -271,6 +271,50 @@ mock.onPost(new RegExp(/^\/eamlocations\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).repl
return [status, data];
});
// FetchChild
mock.onGet(new RegExp(/^\/eamlocations\/fetchchild$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocation 方法: FetchChild");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas);
console.groupEnd();
console.groupEnd();
return [status, mockDatas ? mockDatas : []];
});
// FetchChild
mock.onGet(new RegExp(/^\/eamlocations\/fetchchild(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocation 方法: FetchChild");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
let params = qs.parse(url);
Object.assign(config, params);
}
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
let total = mockDatas.length;
let records: Array<any> = [];
if(!config.page || !config.size){
records = mockDatas;
}else{
if((config.page-1)*config.size < total){
records = mockDatas.slice(config.page,config.size);
}
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(records ? records : []);
console.groupEnd();
console.groupEnd();
return [status, records ? records : []];
});
// FetchChildLocation
mock.onGet(new RegExp(/^\/eamlocations\/fetchchildlocation$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocation 方法: FetchChildLocation");
......@@ -358,6 +402,50 @@ mock.onGet(new RegExp(/^\/eamlocations\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply
console.groupEnd();
return [status, records ? records : []];
});
// FetchTop
mock.onGet(new RegExp(/^\/eamlocations\/fetchtop$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocation 方法: FetchTop");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas);
console.groupEnd();
console.groupEnd();
return [status, mockDatas ? mockDatas : []];
});
// FetchTop
mock.onGet(new RegExp(/^\/eamlocations\/fetchtop(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:eamlocation 方法: FetchTop");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
let params = qs.parse(url);
Object.assign(config, params);
}
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
let total = mockDatas.length;
let records: Array<any> = [];
if(!config.page || !config.size){
records = mockDatas;
}else{
if((config.page-1)*config.size < total){
records = mockDatas.slice(config.page,config.size);
}
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(records ? records : []);
console.groupEnd();
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
......
......@@ -23,6 +23,22 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMLocationStateEditView",
"viewtag": "0b6fa9e6ebc1f6d1afaf3c19585840b0"
},
"eamlocationtreeexpview": {
"title": "功能位置信息",
"caption": "功能位置",
"viewtype": "DETREEEXPVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationTreeExpView",
"viewtag": "135343573fd869053d84ecc2f48ffd49"
},
"eamassetstatemodellinegridview": {
"title": "资产状态模型明细表格视图",
"caption": "资产状态模型明细",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Asset",
"viewname": "EAMAssetStateModelLineGridView",
"viewtag": "15caf81deb1f02479030f14d90ce5c3e"
},
"eamlocationeditview": {
"title": "功能位置信息",
"caption": "功能位置",
......@@ -31,6 +47,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMLocationEditView",
"viewtag": "1769804cd7ab51624ac3c88c2090363b"
},
"eamlocationtreechildgridview": {
"title": "功能位置信息",
"caption": "功能位置",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Location",
"viewname": "EAMLocationTreeChildGridView",
"viewtag": "21edc7e27023f06aac51f150f3fb1f10"
},
"eamassetstateeditview": {
"title": "资产状态信息",
"caption": "资产状态",
......@@ -47,6 +71,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMLocationPickupView",
"viewtag": "2b28313d0f3925fa44b8683eb5ea54d6"
},
"eamassetstatemodelgridview": {
"title": "资产状态模型表格视图",
"caption": "资产状态模型",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Asset",
"viewname": "EAMAssetStateModelGridView",
"viewtag": "30027967566375f388f110149cf48b49"
},
"eamlocationstatemodelpickupview": {
"title": "功能位置状态模型数据选择视图",
"caption": "功能位置状态模型",
......@@ -87,6 +119,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMLocationTypePickupGridView",
"viewtag": "6a395ea52232233416d9c7120518863d"
},
"eamassetstatemodeleditview": {
"title": "资产状态模型编辑视图",
"caption": "资产状态模型",
"viewtype": "DEEDITVIEW",
"viewmodule": "Asset",
"viewname": "EAMAssetStateModelEditView",
"viewtag": "6c2c69027dbbe13ab8d2732923487f59"
},
"eamlocationstatemodeleditview": {
"title": "功能位置状态模型信息",
"caption": "功能位置状态模型",
......@@ -127,6 +167,30 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMLocationStatePickupView",
"viewtag": "a9f7eb2645c6505a232a0a13742c42a7"
},
"eamassetstatemodelpickupgridview": {
"title": "资产状态模型选择表格视图",
"caption": "资产状态模型",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "Asset",
"viewname": "EAMAssetStateModelPickupGridView",
"viewtag": "a9f86b6e01c06082f119369de0ee8f01"
},
"eamassetstatemodellineeditview": {
"title": "资产状态模型明细编辑视图",
"caption": "资产状态模型明细",
"viewtype": "DEEDITVIEW",
"viewmodule": "Asset",
"viewname": "EAMAssetStateModelLineEditView",
"viewtag": "ad2a01fb2fd055e63d60260a18136d61"
},
"eamassetstatepickupgridview": {
"title": "资产状态选择表格视图",
"caption": "资产状态",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "Asset",
"viewname": "EAMAssetStatePickupGridView",
"viewtag": "aec3c3b9b959ac67bf41fe45cca7808b"
},
"eamlocationchildgridview": {
"title": "功能位置表格视图",
"caption": "功能位置",
......@@ -183,6 +247,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "AppIndexView",
"viewtag": "D44132B9-5261-4008-A146-6287A80D5D31"
},
"eamassetstatemodelpickupview": {
"title": "资产状态模型数据选择视图",
"caption": "资产状态模型",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "Asset",
"viewname": "EAMAssetStateModelPickupView",
"viewtag": "d69c20799b79d71f84ed52f036b3490c"
},
"eamlocationtypeeditview": {
"title": "功能位置类型信息",
"caption": "功能位置类型",
......@@ -191,6 +263,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMLocationTypeEditView",
"viewtag": "dd09755644dcf1e57c062b4e08e4ce3a"
},
"eamassetstatepickupview": {
"title": "资产状态数据选择视图",
"caption": "资产状态",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "Asset",
"viewname": "EAMAssetStatePickupView",
"viewtag": "ddfe97780b64a25b28b14a283fa27a61"
},
"eamapplystateeditview": {
"title": "维护申请状态编辑视图",
"caption": "维护申请状态",
......
import { Subject } from 'rxjs';
import { EditViewBase } from '@/studio-core';
import EAMAssetStateModelService from '@/service/eamasset-state-model/eamasset-state-model-service';
import EAMAssetStateModelAuthService from '@/authservice/eamasset-state-model/eamasset-state-model-auth-service';
import EditViewEngine from '@engine/view/edit-view-engine';
import EAMAssetStateModelUIService from '@/uiservice/eamasset-state-model/eamasset-state-model-ui-service';
/**
* 资产状态模型编辑视图视图基类
*
* @export
* @class EAMAssetStateModelEditViewBase
* @extends {EditViewBase}
*/
export class EAMAssetStateModelEditViewBase extends EditViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMAssetStateModelEditViewBase
*/
protected appDeName: string = 'eamassetstatemodel';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMAssetStateModelEditViewBase
*/
protected appDeKey: string = 'eamassetstatemodelid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMAssetStateModelEditViewBase
*/
protected appDeMajor: string = 'eamassetstatemodelname';
/**
* 实体服务对象
*
* @type {EAMAssetStateModelService}
* @memberof EAMAssetStateModelEditViewBase
*/
protected appEntityService: EAMAssetStateModelService = new EAMAssetStateModelService;
/**
* 实体权限服务对象
*
* @type EAMAssetStateModelUIService
* @memberof EAMAssetStateModelEditViewBase
*/
public appUIService: EAMAssetStateModelUIService = new EAMAssetStateModelUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMAssetStateModelEditViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMAssetStateModelEditViewBase
*/
protected model: any = {
srfCaption: 'entities.eamassetstatemodel.views.editview.caption',
srfTitle: 'entities.eamassetstatemodel.views.editview.title',
srfSubTitle: 'entities.eamassetstatemodel.views.editview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMAssetStateModelEditViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_form: { name: 'form', type: 'FORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof EAMAssetStateModelEditView
*/
public toolBarModels: any = {
tbitem10: { name: 'tbitem10', caption: '保存', 'isShowCaption': true, 'isShowIcon': true, tooltip: '保存', iconcls: 'fa fa-save', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Save', target: '', class: '' } },
tbitem18: { name: 'tbitem18', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem11: { name: 'tbitem11', 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: '' } },
tbitem19: { name: 'tbitem19', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem8: { name: 'tbitem8', 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 = '6c2c69027dbbe13ab8d2732923487f59';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMAssetStateModelEditViewBase
*/
public engine: EditViewEngine = new EditViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMAssetStateModelEditViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'eamassetstatemodel',
majorPSDEField: 'eamassetstatemodelname',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelEditViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem10')) {
this.toolbar_tbitem10_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem11')) {
this.toolbar_tbitem11_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelEditViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelEditViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelEditViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
/**
* 逻辑事件
*
* @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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem11_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
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,"EAMAssetStateModel");
}
/**
* 逻辑事件
*
* @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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Exit(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModel");
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMAssetStateModelEditViewBase
*/
public Save(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
// 界面行为容器对象 _this
const _this: any = this;
if (xData && xData.save instanceof Function) {
xData.save().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
_this.$emit('viewdataschange', [{ ...response.data }]);
});
} else if (_this.save && _this.save instanceof Function) {
_this.save();
}
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMAssetStateModelEditViewBase
*/
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 EAMAssetStateModelEditViewBase
*/
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="eamassetstatemodeleditview" viewTitle="资产状态模型编辑视图" class='deeditview eamasset-state-model-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="./eamasset-state-model-edit-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMAssetStateModelEditViewBase } from './eamasset-state-model-edit-view-base';
import view_form from '@widgets/eamasset-state-model/main-form/main-form.vue';
/**
* 资产状态模型编辑视图视图
*
* @export
* @class EAMAssetStateModelEditView
* @extends {EAMAssetStateModelEditViewBase}
*/
@Component({
components: {
view_form,
}
})
@VueLifeCycleProcessing()
export default class EAMAssetStateModelEditView extends EAMAssetStateModelEditViewBase { }
</script>
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import EAMAssetStateModelService from '@/service/eamasset-state-model/eamasset-state-model-service';
import EAMAssetStateModelAuthService from '@/authservice/eamasset-state-model/eamasset-state-model-auth-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import EAMAssetStateModelUIService from '@/uiservice/eamasset-state-model/eamasset-state-model-ui-service';
import CodeListService from "@service/app/codelist-service";
/**
* 资产状态模型表格视图视图基类
*
* @export
* @class EAMAssetStateModelGridViewBase
* @extends {GridViewBase}
*/
export class EAMAssetStateModelGridViewBase extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMAssetStateModelGridViewBase
*/
protected appDeName: string = 'eamassetstatemodel';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMAssetStateModelGridViewBase
*/
protected appDeKey: string = 'eamassetstatemodelid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMAssetStateModelGridViewBase
*/
protected appDeMajor: string = 'eamassetstatemodelname';
/**
* 实体服务对象
*
* @type {EAMAssetStateModelService}
* @memberof EAMAssetStateModelGridViewBase
*/
protected appEntityService: EAMAssetStateModelService = new EAMAssetStateModelService;
/**
* 实体权限服务对象
*
* @type EAMAssetStateModelUIService
* @memberof EAMAssetStateModelGridViewBase
*/
public appUIService: EAMAssetStateModelUIService = new EAMAssetStateModelUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMAssetStateModelGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMAssetStateModelGridViewBase
*/
protected model: any = {
srfCaption: 'entities.eamassetstatemodel.views.gridview.caption',
srfTitle: 'entities.eamassetstatemodel.views.gridview.title',
srfSubTitle: 'entities.eamassetstatemodel.views.gridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMAssetStateModelGridViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof EAMAssetStateModelGridView
*/
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: '' } },
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: '' } },
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: { } },
tbitem20: { name: 'tbitem20', caption: '其它', disabled: false, type: 'ITEMS', visabled: true, dataaccaction: '',
model: {
tbitem24: { name: 'tbitem24', caption: '导出数据模型', 'isShowCaption': true, 'isShowIcon': true, tooltip: '导出数据模型', iconcls: 'fa fa-download', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ExportModel', target: '', class: '' } },
tbitem25: { name: 'tbitem25', caption: '数据导入', 'isShowCaption': true, 'isShowIcon': true, tooltip: '数据导入', iconcls: 'fa fa-upload', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Import', target: '', class: '' } },
}
},
tbitem21: { name: 'tbitem21', 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: '' } },
tbitem4: { name: 'tbitem4', caption: '帮助', 'isShowCaption': true, 'isShowIcon': true, tooltip: '帮助', iconcls: 'fa fa-question', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Help', target: '', class: '' } },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '30027967566375f388f110149cf48b49';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMAssetStateModelGridViewBase
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMAssetStateModelGridViewBase
*/
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: 'eamassetstatemodel',
majorPSDEField: 'eamassetstatemodelname',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelGridViewBase
*/
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, 'tbitem11')) {
this.toolbar_tbitem11_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem1')) {
this.toolbar_tbitem1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem9')) {
this.toolbar_tbitem9_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem6')) {
this.toolbar_tbitem6_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, 'tbitem24')) {
this.toolbar_tbitem24_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem25')) {
this.toolbar_tbitem25_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem10')) {
this.toolbar_tbitem10_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelGridViewBase
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelGridViewBase
*/
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,"EAMAssetStateModel");
}
/**
* 逻辑事件
*
* @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,"EAMAssetStateModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem11_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.View(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModel");
}
/**
* 逻辑事件
*
* @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,"EAMAssetStateModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem9_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem6_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModel");
}
/**
* 逻辑事件
*
* @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,"EAMAssetStateModel");
}
/**
* 逻辑事件
*
* @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,"EAMAssetStateModel");
}
/**
* 逻辑事件
*
* @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,"EAMAssetStateModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem24_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportModel(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem25_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Import(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModel");
}
/**
* 逻辑事件
*
* @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,"EAMAssetStateModel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem4_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Help(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModel");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMAssetStateModelGridView
*/
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.eamassetstatemodel;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamassetstatemodels', parameterName: 'eamassetstatemodel' },
{ 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 EAMAssetStateModelGridView
*/
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: 'eamassetstatemodels', parameterName: 'eamassetstatemodel' },
{ 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 EAMAssetStateModelGridViewBase
*/
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 EAMAssetStateModelGridViewBase
*/
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, { eamassetstatemodel: args[0].eamassetstatemodel })
}
_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 EAMAssetStateModelGridViewBase
*/
public View(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, { eamassetstatemodel: args[0].eamassetstatemodel })
}
_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 EAMAssetStateModelGridViewBase
*/
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 EAMAssetStateModelGridViewBase
*/
public ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData.actualIsOpenEdit = !xData.actualIsOpenEdit;
}
/**
* 新建行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMAssetStateModelGridViewBase
*/
public NewRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
const data: any = {};
if (_this.hasOwnProperty('newRow') && _this.newRow instanceof Function) {
_this.newRow([{ ...data }], params, $event, xData);
} else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData);
}else{
_this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' });
}
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMAssetStateModelGridViewBase
*/
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 EAMAssetStateModelGridViewBase
*/
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 EAMAssetStateModelGridViewBase
*/
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 EAMAssetStateModelGridViewBase
*/
public ExportModel(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.$Notice.error({ title: '错误', desc: '导出数据模型未支持' });
}
/**
* 数据导入
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMAssetStateModelGridViewBase
*/
public Import(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.importExcel instanceof Function) || !$event) {
return ;
}
xData.importExcel(params);
}
/**
* 过滤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMAssetStateModelGridViewBase
*/
public ToggleFilter(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.hasOwnProperty('isExpandSearchForm')) {
_this.isExpandSearchForm = !_this.isExpandSearchForm;
}
}
/**
* 帮助
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMAssetStateModelGridViewBase
*/
public Help(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.$Notice.error({ title: '错误', desc: '帮助未支持' });
}
}
\ No newline at end of file
<studio-view-style2 viewName="eamassetstatemodelgridview" viewTitle="资产状态模型表格视图" class='degridview eamasset-state-model-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="./eamasset-state-model-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMAssetStateModelGridViewBase } from './eamasset-state-model-grid-view-base';
import view_grid from '@widgets/eamasset-state-model/main-grid/main-grid.vue';
import view_searchform from '@widgets/eamasset-state-model/default-searchform/default-searchform.vue';
/**
* 资产状态模型表格视图视图
*
* @export
* @class EAMAssetStateModelGridView
* @extends {EAMAssetStateModelGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class EAMAssetStateModelGridView extends EAMAssetStateModelGridViewBase { }
</script>
import { Subject } from 'rxjs';
import { EditViewBase } from '@/studio-core';
import EAMAssetStateModelLineService from '@/service/eamasset-state-model-line/eamasset-state-model-line-service';
import EAMAssetStateModelLineAuthService from '@/authservice/eamasset-state-model-line/eamasset-state-model-line-auth-service';
import EditViewEngine from '@engine/view/edit-view-engine';
import EAMAssetStateModelLineUIService from '@/uiservice/eamasset-state-model-line/eamasset-state-model-line-ui-service';
/**
* 资产状态模型明细编辑视图视图基类
*
* @export
* @class EAMAssetStateModelLineEditViewBase
* @extends {EditViewBase}
*/
export class EAMAssetStateModelLineEditViewBase extends EditViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMAssetStateModelLineEditViewBase
*/
protected appDeName: string = 'eamassetstatemodelline';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMAssetStateModelLineEditViewBase
*/
protected appDeKey: string = 'eamassetstatemodellineid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMAssetStateModelLineEditViewBase
*/
protected appDeMajor: string = 'eamassetstatemodellinename';
/**
* 实体服务对象
*
* @type {EAMAssetStateModelLineService}
* @memberof EAMAssetStateModelLineEditViewBase
*/
protected appEntityService: EAMAssetStateModelLineService = new EAMAssetStateModelLineService;
/**
* 实体权限服务对象
*
* @type EAMAssetStateModelLineUIService
* @memberof EAMAssetStateModelLineEditViewBase
*/
public appUIService: EAMAssetStateModelLineUIService = new EAMAssetStateModelLineUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMAssetStateModelLineEditViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMAssetStateModelLineEditViewBase
*/
protected model: any = {
srfCaption: 'entities.eamassetstatemodelline.views.editview.caption',
srfTitle: 'entities.eamassetstatemodelline.views.editview.title',
srfSubTitle: 'entities.eamassetstatemodelline.views.editview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMAssetStateModelLineEditViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_form: { name: 'form', type: 'FORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof EAMAssetStateModelLineEditView
*/
public toolBarModels: any = {
tbitem10: { name: 'tbitem10', caption: '保存', 'isShowCaption': true, 'isShowIcon': true, tooltip: '保存', iconcls: 'fa fa-save', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Save', target: '', class: '' } },
tbitem12: { name: 'tbitem12', caption: '保存并新建', 'isShowCaption': true, 'isShowIcon': true, tooltip: '保存并新建', iconcls: 'sx-tb-saveandnew', icon: '../sasrfex/images/default/icon_saveandnew.png', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'SaveAndNew', target: '', class: '' } },
tbitem11: { name: 'tbitem11', 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: '' } },
tbitem18: { name: 'tbitem18', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem9: { name: 'tbitem9', caption: '删除并关闭', 'isShowCaption': true, 'isShowIcon': true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY', class: '' } },
tbitem19: { name: 'tbitem19', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
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: '' } },
tbitem21: { name: 'tbitem21', 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: '' } },
tbitem22: { name: 'tbitem22', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem2: { name: 'tbitem2', caption: '第一个记录', 'isShowCaption': false, 'isShowIcon': true, tooltip: '第一个记录', iconcls: 'fa fa-fast-backward', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'FirstRecord', target: 'SINGLEKEY', class: '' } },
tbitem7: { name: 'tbitem7', caption: '上一个记录', 'isShowCaption': false, 'isShowIcon': true, tooltip: '上一个记录', iconcls: 'fa fa-step-backward', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'PrevRecord', target: 'SINGLEKEY', class: '' } },
tbitem6: { name: 'tbitem6', caption: '下一个记录', 'isShowCaption': false, 'isShowIcon': true, tooltip: '下一个记录', iconcls: 'fa fa-step-forward', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'NextRecord', target: 'SINGLEKEY', class: '' } },
tbitem4: { name: 'tbitem4', caption: '最后一个记录', 'isShowCaption': false, 'isShowIcon': true, tooltip: '最后一个记录', iconcls: 'fa fa-fast-forward', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'LastRecord', target: 'SINGLEKEY', class: '' } },
tbitem25: { name: 'tbitem25', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem3: { name: 'tbitem3', caption: '帮助', 'isShowCaption': true, 'isShowIcon': true, tooltip: '帮助', iconcls: 'fa fa-question', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Help', target: '', class: '' } },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'ad2a01fb2fd055e63d60260a18136d61';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMAssetStateModelLineEditViewBase
*/
public engine: EditViewEngine = new EditViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMAssetStateModelLineEditViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'eamassetstatemodelline',
majorPSDEField: 'eamassetstatemodellinename',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelLineEditViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem10')) {
this.toolbar_tbitem10_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem12')) {
this.toolbar_tbitem12_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem11')) {
this.toolbar_tbitem11_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem9')) {
this.toolbar_tbitem9_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem13')) {
this.toolbar_tbitem13_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem14')) {
this.toolbar_tbitem14_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_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, 'tbitem2')) {
this.toolbar_tbitem2_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem7')) {
this.toolbar_tbitem7_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem6')) {
this.toolbar_tbitem6_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelLineEditViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelLineEditViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelLineEditViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
/**
* 逻辑事件
*
* @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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModelLine");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem12_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndNew(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModelLine");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem11_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
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,"EAMAssetStateModelLine");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem9_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModelLine");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem13_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndStart(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModelLine");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem14_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ViewWFStep(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModelLine");
}
/**
* 逻辑事件
*
* @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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModelLine");
}
/**
* 逻辑事件
*
* @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.Copy(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModelLine");
}
/**
* 逻辑事件
*
* @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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModelLine");
}
/**
* 逻辑事件
*
* @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.FirstRecord(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModelLine");
}
/**
* 逻辑事件
*
* @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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.PrevRecord(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModelLine");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem6_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.NextRecord(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModelLine");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem4_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.LastRecord(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModelLine");
}
/**
* 逻辑事件
*
* @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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Help(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModelLine");
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMAssetStateModelLineEditViewBase
*/
public Save(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
// 界面行为容器对象 _this
const _this: any = this;
if (xData && xData.save instanceof Function) {
xData.save().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
_this.$emit('viewdataschange', [{ ...response.data }]);
});
} else if (_this.save && _this.save instanceof Function) {
_this.save();
}
}
/**
* 保存并新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMAssetStateModelLineEditViewBase
*/
public SaveAndNew(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.saveAndNew instanceof Function)) {
return;
}
xData.saveAndNew().then((response: any) => {
if (!response || response.status !== 200) {
_this.$emit('viewdataschange', JSON.stringify({status:'error',action:'saveAndNew'}));
return;
}
_this.$emit('viewdataschange', JSON.stringify({status:'success',action:'saveAndNew',data:response.data}));
if (xData.autoLoad instanceof Function) {
xData.autoLoad();
}
});
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMAssetStateModelLineEditViewBase
*/
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 EAMAssetStateModelLineEditViewBase
*/
public RemoveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.removeAndExit instanceof Function) {
xData.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.removeAndExit && _this.removeAndExit instanceof Function) {
_this.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
* 开始流程
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMAssetStateModelLineEditViewBase
*/
public SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.wfstart instanceof Function)) {
return;
}
xData.wfstart(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if(window.parent){
window.parent.postMessage({ ..._data },'*');
}
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
}else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
}
});
}
/**
* 当前流程步骤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMAssetStateModelLineEditViewBase
*/
public ViewWFStep(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.wfsubmit instanceof Function)) {
return;
}
xData.wfsubmit(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
} else if (_this.$tabPageExp) {
_this.$tabPageExp.onClose(_this.$route.fullPath);
}
});
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMAssetStateModelLineEditViewBase
*/
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 EAMAssetStateModelLineEditViewBase
*/
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 EAMAssetStateModelLineEditViewBase
*/
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 EAMAssetStateModelLineEditViewBase
*/
public Help(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.$Notice.error({ title: '错误', desc: '帮助未支持' });
}
}
\ No newline at end of file
<studio-view-style2 viewName="eamassetstatemodellineeditview" viewTitle="资产状态模型明细编辑视图" class='deeditview eamasset-state-model-line-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="./eamasset-state-model-line-edit-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMAssetStateModelLineEditViewBase } from './eamasset-state-model-line-edit-view-base';
import view_form from '@widgets/eamasset-state-model-line/main-form/main-form.vue';
/**
* 资产状态模型明细编辑视图视图
*
* @export
* @class EAMAssetStateModelLineEditView
* @extends {EAMAssetStateModelLineEditViewBase}
*/
@Component({
components: {
view_form,
}
})
@VueLifeCycleProcessing()
export default class EAMAssetStateModelLineEditView extends EAMAssetStateModelLineEditViewBase { }
</script>
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import EAMAssetStateModelLineService from '@/service/eamasset-state-model-line/eamasset-state-model-line-service';
import EAMAssetStateModelLineAuthService from '@/authservice/eamasset-state-model-line/eamasset-state-model-line-auth-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import EAMAssetStateModelLineUIService from '@/uiservice/eamasset-state-model-line/eamasset-state-model-line-ui-service';
import CodeListService from "@service/app/codelist-service";
/**
* 资产状态模型明细表格视图视图基类
*
* @export
* @class EAMAssetStateModelLineGridViewBase
* @extends {GridViewBase}
*/
export class EAMAssetStateModelLineGridViewBase extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMAssetStateModelLineGridViewBase
*/
protected appDeName: string = 'eamassetstatemodelline';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMAssetStateModelLineGridViewBase
*/
protected appDeKey: string = 'eamassetstatemodellineid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMAssetStateModelLineGridViewBase
*/
protected appDeMajor: string = 'eamassetstatemodellinename';
/**
* 实体服务对象
*
* @type {EAMAssetStateModelLineService}
* @memberof EAMAssetStateModelLineGridViewBase
*/
protected appEntityService: EAMAssetStateModelLineService = new EAMAssetStateModelLineService;
/**
* 实体权限服务对象
*
* @type EAMAssetStateModelLineUIService
* @memberof EAMAssetStateModelLineGridViewBase
*/
public appUIService: EAMAssetStateModelLineUIService = new EAMAssetStateModelLineUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMAssetStateModelLineGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMAssetStateModelLineGridViewBase
*/
protected model: any = {
srfCaption: 'entities.eamassetstatemodelline.views.gridview.caption',
srfTitle: 'entities.eamassetstatemodelline.views.gridview.title',
srfSubTitle: 'entities.eamassetstatemodelline.views.gridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMAssetStateModelLineGridViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof EAMAssetStateModelLineGridView
*/
public toolBarModels: any = {
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: { } },
tbitem9: { name: 'tbitem9', caption: '行编辑', 'isShowCaption': true, 'isShowIcon': true, tooltip: '行编辑', iconcls: 'fa fa-table', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ToggleRowEdit', target: '', class: '' } },
tbitem6: { name: 'tbitem6', caption: '新建行', 'isShowCaption': false, 'isShowIcon': true, tooltip: '新建行', iconcls: 'fa fa-plus', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'NewRow', target: '', class: '' } },
tbitem23: { name: 'tbitem23', 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: '' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '15caf81deb1f02479030f14d90ce5c3e';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMAssetStateModelLineGridViewBase
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMAssetStateModelLineGridViewBase
*/
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: 'eamassetstatemodelline',
majorPSDEField: 'eamassetstatemodellinename',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelLineGridViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem1')) {
this.toolbar_tbitem1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem9')) {
this.toolbar_tbitem9_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem6')) {
this.toolbar_tbitem6_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);
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelLineGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelLineGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelLineGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelLineGridViewBase
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelLineGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelLineGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelLineGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelLineGridViewBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @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,"EAMAssetStateModelLine");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem9_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModelLine");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem6_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"EAMAssetStateModelLine");
}
/**
* 逻辑事件
*
* @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,"EAMAssetStateModelLine");
}
/**
* 逻辑事件
*
* @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,"EAMAssetStateModelLine");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMAssetStateModelLineGridView
*/
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.eamassetstatemodelline;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamassetstatemodellines', parameterName: 'eamassetstatemodelline' },
{ 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 EAMAssetStateModelLineGridView
*/
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: 'eamassetstatemodellines', parameterName: 'eamassetstatemodelline' },
{ 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 EAMAssetStateModelLineGridViewBase
*/
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 EAMAssetStateModelLineGridViewBase
*/
public ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData.actualIsOpenEdit = !xData.actualIsOpenEdit;
}
/**
* 新建行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMAssetStateModelLineGridViewBase
*/
public NewRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
const data: any = {};
if (_this.hasOwnProperty('newRow') && _this.newRow instanceof Function) {
_this.newRow([{ ...data }], params, $event, xData);
} else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData);
}else{
_this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' });
}
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMAssetStateModelLineGridViewBase
*/
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 EAMAssetStateModelLineGridViewBase
*/
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);
}
}
\ No newline at end of file
<studio-view-style2 viewName="eamassetstatemodellinegridview" viewTitle="资产状态模型明细表格视图" class='degridview eamasset-state-model-line-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="true"
:gridRowActiveMode="gridRowActiveMode"
@save="onSave.apply(_self, arguments)"
updateAction="Update"
removeAction="Remove"
loaddraftAction="GetDraft"
loadAction="Get"
createAction="Create"
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="./eamasset-state-model-line-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMAssetStateModelLineGridViewBase } from './eamasset-state-model-line-grid-view-base';
import view_grid from '@widgets/eamasset-state-model-line/main-grid/main-grid.vue';
import view_searchform from '@widgets/eamasset-state-model-line/default-searchform/default-searchform.vue';
/**
* 资产状态模型明细表格视图视图
*
* @export
* @class EAMAssetStateModelLineGridView
* @extends {EAMAssetStateModelLineGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class EAMAssetStateModelLineGridView extends EAMAssetStateModelLineGridViewBase { }
</script>
import { Subject } from 'rxjs';
import { PickupGridViewBase } from '@/studio-core';
import EAMAssetStateModelService from '@/service/eamasset-state-model/eamasset-state-model-service';
import EAMAssetStateModelAuthService from '@/authservice/eamasset-state-model/eamasset-state-model-auth-service';
import PickupGridViewEngine from '@engine/view/pickup-grid-view-engine';
import EAMAssetStateModelUIService from '@/uiservice/eamasset-state-model/eamasset-state-model-ui-service';
/**
* 资产状态模型选择表格视图视图基类
*
* @export
* @class EAMAssetStateModelPickupGridViewBase
* @extends {PickupGridViewBase}
*/
export class EAMAssetStateModelPickupGridViewBase extends PickupGridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMAssetStateModelPickupGridViewBase
*/
protected appDeName: string = 'eamassetstatemodel';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMAssetStateModelPickupGridViewBase
*/
protected appDeKey: string = 'eamassetstatemodelid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMAssetStateModelPickupGridViewBase
*/
protected appDeMajor: string = 'eamassetstatemodelname';
/**
* 实体服务对象
*
* @type {EAMAssetStateModelService}
* @memberof EAMAssetStateModelPickupGridViewBase
*/
protected appEntityService: EAMAssetStateModelService = new EAMAssetStateModelService;
/**
* 实体权限服务对象
*
* @type EAMAssetStateModelUIService
* @memberof EAMAssetStateModelPickupGridViewBase
*/
public appUIService: EAMAssetStateModelUIService = new EAMAssetStateModelUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMAssetStateModelPickupGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMAssetStateModelPickupGridViewBase
*/
protected model: any = {
srfCaption: 'entities.eamassetstatemodel.views.pickupgridview.caption',
srfTitle: 'entities.eamassetstatemodel.views.pickupgridview.title',
srfSubTitle: 'entities.eamassetstatemodel.views.pickupgridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMAssetStateModelPickupGridViewBase
*/
protected containerModel: any = {
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'a9f86b6e01c06082f119369de0ee8f01';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMAssetStateModelPickupGridViewBase
*/
public engine: PickupGridViewEngine = new PickupGridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMAssetStateModelPickupGridViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
grid: this.$refs.grid,
searchform: this.$refs.searchform,
keyPSDEField: 'eamassetstatemodel',
majorPSDEField: 'eamassetstatemodelname',
isLoadDefault: true,
});
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelPickupGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelPickupGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelPickupGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelPickupGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelPickupGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelPickupGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelPickupGridViewBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 是否展开搜索表单
*
* @protected
* @type {boolean}
* @memberof EAMAssetStateModelPickupGridViewBase
*/
protected isExpandSearchForm: boolean = true;
}
\ No newline at end of file
<studio-view-style2 viewName="eamassetstatemodelpickupgridview" viewTitle="资产状态模型选择表格视图" class='depickupgridview eamasset-state-model-pickup-grid-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</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"
:selectedData="selectedData"
:showBusyIndicator="true"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</studio-view-style2>
\ No newline at end of file
<template src="./eamasset-state-model-pickup-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMAssetStateModelPickupGridViewBase } from './eamasset-state-model-pickup-grid-view-base';
import view_grid from '@widgets/eamasset-state-model/main-grid/main-grid.vue';
import view_searchform from '@widgets/eamasset-state-model/default-searchform/default-searchform.vue';
/**
* 资产状态模型选择表格视图视图
*
* @export
* @class EAMAssetStateModelPickupGridView
* @extends {EAMAssetStateModelPickupGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class EAMAssetStateModelPickupGridView extends EAMAssetStateModelPickupGridViewBase { }
</script>
import { Subject } from 'rxjs';
import { PickupViewBase } from '@/studio-core';
import EAMAssetStateModelService from '@/service/eamasset-state-model/eamasset-state-model-service';
import EAMAssetStateModelAuthService from '@/authservice/eamasset-state-model/eamasset-state-model-auth-service';
import PickupViewEngine from '@engine/view/pickup-view-engine';
import EAMAssetStateModelUIService from '@/uiservice/eamasset-state-model/eamasset-state-model-ui-service';
/**
* 资产状态模型数据选择视图视图基类
*
* @export
* @class EAMAssetStateModelPickupViewBase
* @extends {PickupViewBase}
*/
export class EAMAssetStateModelPickupViewBase extends PickupViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMAssetStateModelPickupViewBase
*/
protected appDeName: string = 'eamassetstatemodel';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMAssetStateModelPickupViewBase
*/
protected appDeKey: string = 'eamassetstatemodelid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMAssetStateModelPickupViewBase
*/
protected appDeMajor: string = 'eamassetstatemodelname';
/**
* 实体服务对象
*
* @type {EAMAssetStateModelService}
* @memberof EAMAssetStateModelPickupViewBase
*/
protected appEntityService: EAMAssetStateModelService = new EAMAssetStateModelService;
/**
* 实体权限服务对象
*
* @type EAMAssetStateModelUIService
* @memberof EAMAssetStateModelPickupViewBase
*/
public appUIService: EAMAssetStateModelUIService = new EAMAssetStateModelUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMAssetStateModelPickupViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMAssetStateModelPickupViewBase
*/
protected model: any = {
srfCaption: 'entities.eamassetstatemodel.views.pickupview.caption',
srfTitle: 'entities.eamassetstatemodel.views.pickupview.title',
srfSubTitle: 'entities.eamassetstatemodel.views.pickupview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMAssetStateModelPickupViewBase
*/
protected containerModel: any = {
view_pickupviewpanel: { name: 'pickupviewpanel', type: 'PICKUPVIEWPANEL' },
view_okbtn: { name: 'okbtn', type: 'button', text: '确定', disabled: true },
view_cancelbtn: { name: 'cancelbtn', type: 'button', text: '取消', disabled: false },
view_leftbtn: { name: 'leftbtn', type: 'button', text: '左移', disabled: true },
view_rightbtn: { name: 'rightbtn', type: 'button', text: '右移', disabled: true },
view_allleftbtn: { name: 'allleftbtn', type: 'button', text: '全部左移', disabled: true },
view_allrightbtn: { name: 'allrightbtn', type: 'button', text: '全部右移', disabled: true },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'd69c20799b79d71f84ed52f036b3490c';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMAssetStateModelPickupViewBase
*/
public engine: PickupViewEngine = new PickupViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMAssetStateModelPickupViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
pickupviewpanel: this.$refs.pickupviewpanel,
keyPSDEField: 'eamassetstatemodel',
majorPSDEField: 'eamassetstatemodelname',
isLoadDefault: true,
});
}
/**
* pickupviewpanel 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelPickupViewBase
*/
public pickupviewpanel_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'selectionchange', $event);
}
/**
* pickupviewpanel 部件 activated 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelPickupViewBase
*/
public pickupviewpanel_activated($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'activated', $event);
}
/**
* pickupviewpanel 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStateModelPickupViewBase
*/
public pickupviewpanel_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'load', $event);
}
}
\ No newline at end of file
<studio-view-style2 viewName="eamassetstatemodelpickupview" viewTitle="资产状态模型数据选择视图" class='depickupview eamasset-state-model-pickup-view'>
<div class="content-container pickup-view">
<view_pickupviewpanel
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
:isSingleSelect="isSingleSelect"
:selectedData="selectedData"
:isShowButton="isShowButton"
name="pickupviewpanel"
ref='pickupviewpanel'
@selectionchange="pickupviewpanel_selectionchange($event)"
@activated="pickupviewpanel_activated($event)"
@load="pickupviewpanel_load($event)"
@closeview="closeView($event)">
</view_pickupviewpanel>
</div>
<template slot="footer">
<div v-if="isShowButton" :style="{ textAlign: 'right' }">
<i-button type="primary" :disabled="this.viewSelections.length > 0 ? false : true" @click="onClickOk.apply(_self, arguments)">{{this.containerModel.view_okbtn.text}}</i-button>
&nbsp;&nbsp;
<i-button @click="onClickCancel.apply(_self, arguments)">{{this.containerModel.view_cancelbtn.text}}</i-button>
</div>
</template>
</studio-view-style2>
\ No newline at end of file
<template src="./eamasset-state-model-pickup-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMAssetStateModelPickupViewBase } from './eamasset-state-model-pickup-view-base';
import view_pickupviewpanel from '@widgets/eamasset-state-model/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel.vue';
/**
* 资产状态模型数据选择视图视图
*
* @export
* @class EAMAssetStateModelPickupView
* @extends {EAMAssetStateModelPickupViewBase}
*/
@Component({
components: {
view_pickupviewpanel,
}
})
@VueLifeCycleProcessing()
export default class EAMAssetStateModelPickupView extends EAMAssetStateModelPickupViewBase { }
</script>
import { Subject } from 'rxjs';
import { PickupGridViewBase } from '@/studio-core';
import EAMAssetStateService from '@/service/eamasset-state/eamasset-state-service';
import EAMAssetStateAuthService from '@/authservice/eamasset-state/eamasset-state-auth-service';
import PickupGridViewEngine from '@engine/view/pickup-grid-view-engine';
import EAMAssetStateUIService from '@/uiservice/eamasset-state/eamasset-state-ui-service';
/**
* 资产状态选择表格视图视图基类
*
* @export
* @class EAMAssetStatePickupGridViewBase
* @extends {PickupGridViewBase}
*/
export class EAMAssetStatePickupGridViewBase extends PickupGridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMAssetStatePickupGridViewBase
*/
protected appDeName: string = 'eamassetstate';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMAssetStatePickupGridViewBase
*/
protected appDeKey: string = 'eamassetstateid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMAssetStatePickupGridViewBase
*/
protected appDeMajor: string = 'eamassetstatename';
/**
* 实体服务对象
*
* @type {EAMAssetStateService}
* @memberof EAMAssetStatePickupGridViewBase
*/
protected appEntityService: EAMAssetStateService = new EAMAssetStateService;
/**
* 实体权限服务对象
*
* @type EAMAssetStateUIService
* @memberof EAMAssetStatePickupGridViewBase
*/
public appUIService: EAMAssetStateUIService = new EAMAssetStateUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMAssetStatePickupGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMAssetStatePickupGridViewBase
*/
protected model: any = {
srfCaption: 'entities.eamassetstate.views.pickupgridview.caption',
srfTitle: 'entities.eamassetstate.views.pickupgridview.title',
srfSubTitle: 'entities.eamassetstate.views.pickupgridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMAssetStatePickupGridViewBase
*/
protected containerModel: any = {
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'aec3c3b9b959ac67bf41fe45cca7808b';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMAssetStatePickupGridViewBase
*/
public engine: PickupGridViewEngine = new PickupGridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMAssetStatePickupGridViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
grid: this.$refs.grid,
searchform: this.$refs.searchform,
keyPSDEField: 'eamassetstate',
majorPSDEField: 'eamassetstatename',
isLoadDefault: true,
});
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStatePickupGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStatePickupGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStatePickupGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStatePickupGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStatePickupGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStatePickupGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStatePickupGridViewBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 是否展开搜索表单
*
* @protected
* @type {boolean}
* @memberof EAMAssetStatePickupGridViewBase
*/
protected isExpandSearchForm: boolean = true;
}
\ No newline at end of file
<studio-view-style2 viewName="eamassetstatepickupgridview" viewTitle="资产状态选择表格视图" class='depickupgridview eamasset-state-pickup-grid-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</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"
:selectedData="selectedData"
:showBusyIndicator="true"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</studio-view-style2>
\ No newline at end of file
<template src="./eamasset-state-pickup-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMAssetStatePickupGridViewBase } from './eamasset-state-pickup-grid-view-base';
import view_grid from '@widgets/eamasset-state/main-grid/main-grid.vue';
import view_searchform from '@widgets/eamasset-state/default-searchform/default-searchform.vue';
/**
* 资产状态选择表格视图视图
*
* @export
* @class EAMAssetStatePickupGridView
* @extends {EAMAssetStatePickupGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class EAMAssetStatePickupGridView extends EAMAssetStatePickupGridViewBase { }
</script>
import { Subject } from 'rxjs';
import { PickupViewBase } from '@/studio-core';
import EAMAssetStateService from '@/service/eamasset-state/eamasset-state-service';
import EAMAssetStateAuthService from '@/authservice/eamasset-state/eamasset-state-auth-service';
import PickupViewEngine from '@engine/view/pickup-view-engine';
import EAMAssetStateUIService from '@/uiservice/eamasset-state/eamasset-state-ui-service';
/**
* 资产状态数据选择视图视图基类
*
* @export
* @class EAMAssetStatePickupViewBase
* @extends {PickupViewBase}
*/
export class EAMAssetStatePickupViewBase extends PickupViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMAssetStatePickupViewBase
*/
protected appDeName: string = 'eamassetstate';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMAssetStatePickupViewBase
*/
protected appDeKey: string = 'eamassetstateid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMAssetStatePickupViewBase
*/
protected appDeMajor: string = 'eamassetstatename';
/**
* 实体服务对象
*
* @type {EAMAssetStateService}
* @memberof EAMAssetStatePickupViewBase
*/
protected appEntityService: EAMAssetStateService = new EAMAssetStateService;
/**
* 实体权限服务对象
*
* @type EAMAssetStateUIService
* @memberof EAMAssetStatePickupViewBase
*/
public appUIService: EAMAssetStateUIService = new EAMAssetStateUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMAssetStatePickupViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMAssetStatePickupViewBase
*/
protected model: any = {
srfCaption: 'entities.eamassetstate.views.pickupview.caption',
srfTitle: 'entities.eamassetstate.views.pickupview.title',
srfSubTitle: 'entities.eamassetstate.views.pickupview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMAssetStatePickupViewBase
*/
protected containerModel: any = {
view_pickupviewpanel: { name: 'pickupviewpanel', type: 'PICKUPVIEWPANEL' },
view_okbtn: { name: 'okbtn', type: 'button', text: '确定', disabled: true },
view_cancelbtn: { name: 'cancelbtn', type: 'button', text: '取消', disabled: false },
view_leftbtn: { name: 'leftbtn', type: 'button', text: '左移', disabled: true },
view_rightbtn: { name: 'rightbtn', type: 'button', text: '右移', disabled: true },
view_allleftbtn: { name: 'allleftbtn', type: 'button', text: '全部左移', disabled: true },
view_allrightbtn: { name: 'allrightbtn', type: 'button', text: '全部右移', disabled: true },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'ddfe97780b64a25b28b14a283fa27a61';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMAssetStatePickupViewBase
*/
public engine: PickupViewEngine = new PickupViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMAssetStatePickupViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
pickupviewpanel: this.$refs.pickupviewpanel,
keyPSDEField: 'eamassetstate',
majorPSDEField: 'eamassetstatename',
isLoadDefault: true,
});
}
/**
* pickupviewpanel 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStatePickupViewBase
*/
public pickupviewpanel_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'selectionchange', $event);
}
/**
* pickupviewpanel 部件 activated 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStatePickupViewBase
*/
public pickupviewpanel_activated($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'activated', $event);
}
/**
* pickupviewpanel 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMAssetStatePickupViewBase
*/
public pickupviewpanel_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'load', $event);
}
}
\ No newline at end of file
<studio-view-style2 viewName="eamassetstatepickupview" viewTitle="资产状态数据选择视图" class='depickupview eamasset-state-pickup-view'>
<div class="content-container pickup-view">
<view_pickupviewpanel
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
:isSingleSelect="isSingleSelect"
:selectedData="selectedData"
:isShowButton="isShowButton"
name="pickupviewpanel"
ref='pickupviewpanel'
@selectionchange="pickupviewpanel_selectionchange($event)"
@activated="pickupviewpanel_activated($event)"
@load="pickupviewpanel_load($event)"
@closeview="closeView($event)">
</view_pickupviewpanel>
</div>
<template slot="footer">
<div v-if="isShowButton" :style="{ textAlign: 'right' }">
<i-button type="primary" :disabled="this.viewSelections.length > 0 ? false : true" @click="onClickOk.apply(_self, arguments)">{{this.containerModel.view_okbtn.text}}</i-button>
&nbsp;&nbsp;
<i-button @click="onClickCancel.apply(_self, arguments)">{{this.containerModel.view_cancelbtn.text}}</i-button>
</div>
</template>
</studio-view-style2>
\ No newline at end of file
<template src="./eamasset-state-pickup-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMAssetStatePickupViewBase } from './eamasset-state-pickup-view-base';
import view_pickupviewpanel from '@widgets/eamasset-state/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel.vue';
/**
* 资产状态数据选择视图视图
*
* @export
* @class EAMAssetStatePickupView
* @extends {EAMAssetStatePickupViewBase}
*/
@Component({
components: {
view_pickupviewpanel,
}
})
@VueLifeCycleProcessing()
export default class EAMAssetStatePickupView extends EAMAssetStatePickupViewBase { }
</script>
export const PageComponents = {
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-line-edit-view', () => import('@pages/location/eamlocation-state-model-line-edit-view/eamlocation-state-model-line-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-type-pickup-grid-view', () => import('@pages/location/eamlocation-type-pickup-grid-view/eamlocation-type-pickup-grid-view.vue'));
Vue.component('eamasset-state-model-line-edit-view', () => import('@pages/asset/eamasset-state-model-line-edit-view/eamasset-state-model-line-edit-view.vue'));
Vue.component('eamasset-state-model-line-grid-view', () => import('@pages/asset/eamasset-state-model-line-grid-view/eamasset-state-model-line-grid-view.vue'));
Vue.component('eamlocation-tree-exp-view', () => import('@pages/location/eamlocation-tree-exp-view/eamlocation-tree-exp-view.vue'));
Vue.component('eamlocation-edit-view', () => import('@pages/location/eamlocation-edit-view/eamlocation-edit-view.vue'));
Vue.component('eamlocation-state-edit-view', () => import('@pages/location/eamlocation-state-edit-view/eamlocation-state-edit-view.vue'));
Vue.component('eamlocation-type-grid-view', () => import('@pages/location/eamlocation-type-grid-view/eamlocation-type-grid-view.vue'));
Vue.component('eamlocation-tree-child-grid-view', () => import('@pages/location/eamlocation-tree-child-grid-view/eamlocation-tree-child-grid-view.vue'));
Vue.component('eamasset-state-edit-view', () => import('@pages/asset/eamasset-state-edit-view/eamasset-state-edit-view.vue'));
Vue.component('eamasset-state-model-edit-view', () => import('@pages/asset/eamasset-state-model-edit-view/eamasset-state-model-edit-view.vue'));
Vue.component('eamasset-state-pickup-grid-view', () => import('@pages/asset/eamasset-state-pickup-grid-view/eamasset-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-edit-view', () => import('@pages/location/eamlocation-state-model-edit-view/eamlocation-state-model-edit-view.vue'));
Vue.component('eamasset-state-model-pickup-view', () => import('@pages/asset/eamasset-state-model-pickup-view/eamasset-state-model-pickup-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-child-grid-view', () => import('@pages/location/eamlocation-child-grid-view/eamlocation-child-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-list-exp-view', () => import('@pages/location/eamlocation-state-list-exp-view/eamlocation-state-list-exp-view.vue'));
Vue.component('eamlocation-pickup-view', () => import('@pages/location/eamlocation-pickup-view/eamlocation-pickup-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-pickup-view', () => import('@pages/location/eamlocation-pickup-view/eamlocation-pickup-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-state-pickup-view', () => import('@pages/location/eamlocation-state-pickup-view/eamlocation-state-pickup-view.vue'));
Vue.component('eamlocation-info-main-view', () => import('@pages/location/eamlocation-info-main-view/eamlocation-info-main-view.vue'));
Vue.component('eamlocation-pickup-grid-view', () => import('@pages/location/eamlocation-pickup-grid-view/eamlocation-pickup-grid-view.vue'));
Vue.component('eamlocation-summary-view', () => import('@pages/location/eamlocation-summary-view/eamlocation-summary-view.vue'));
Vue.component('eamlocation-type-pickup-view', () => import('@pages/location/eamlocation-type-pickup-view/eamlocation-type-pickup-view.vue'));
Vue.component('eamasset-state-pickup-view', () => import('@pages/asset/eamasset-state-pickup-view/eamasset-state-pickup-view.vue'));
Vue.component('eamasset-state-grid-view', () => import('@pages/asset/eamasset-state-grid-view/eamasset-state-grid-view.vue'));
Vue.component('eamlocation-type-pickup-view', () => import('@pages/location/eamlocation-type-pickup-view/eamlocation-type-pickup-view.vue'));
Vue.component('eamasset-state-model-grid-view', () => import('@pages/asset/eamasset-state-model-grid-view/eamasset-state-model-grid-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('eamasset-state-model-pickup-grid-view', () => import('@pages/asset/eamasset-state-model-pickup-grid-view/eamasset-state-model-pickup-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('eamasset-state-edit-view', () => import('@pages/asset/eamasset-state-edit-view/eamasset-state-edit-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-edit-view', () => import('@pages/location/eamlocation-state-model-edit-view/eamlocation-state-model-edit-view.vue'));
}
};
\ No newline at end of file
......@@ -44,102 +44,270 @@ const router = new Router({
component: () => import('@pages/base/app-index-view/app-index-view.vue'),
children: [
{
path: 'eamlocationstatemodels/:eamlocationstatemodel?/pickupgridview/:pickupgridview?',
path: 'eamlocations/:eamlocation?/infoview/:infoview?',
meta: {
caption: 'entities.eamlocationstatemodel.views.pickupgridview.title',
caption: 'entities.eamlocation.views.infoview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstatemodels', parameterName: 'eamlocationstatemodel' },
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'infoview', parameterName: 'infoview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-info-view/eamlocation-info-view.vue'),
},
{
path: 'eamlocationtypes/:eamlocationtype?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.eamlocationtype.views.pickupgridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationtypes', parameterName: 'eamlocationtype' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-state-model-pickup-grid-view/eamlocation-state-model-pickup-grid-view.vue'),
component: () => import('@pages/location/eamlocation-type-pickup-grid-view/eamlocation-type-pickup-grid-view.vue'),
},
{
path: 'eamlocationstatemodellines/:eamlocationstatemodelline?/editview/:editview?',
path: 'eamassetstatemodellines/:eamassetstatemodelline?/editview/:editview?',
meta: {
caption: 'entities.eamlocationstatemodelline.views.editview.title',
caption: 'entities.eamassetstatemodelline.views.editview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstatemodellines', parameterName: 'eamlocationstatemodelline' },
{ pathName: 'eamassetstatemodellines', parameterName: 'eamassetstatemodelline' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-state-model-line-edit-view/eamlocation-state-model-line-edit-view.vue'),
component: () => import('@pages/asset/eamasset-state-model-line-edit-view/eamasset-state-model-line-edit-view.vue'),
},
{
path: 'eamlocations/:eamlocation?/childgridview/:childgridview?',
path: 'eamassetstatemodellines/:eamassetstatemodelline?/gridview/:gridview?',
meta: {
caption: 'entities.eamlocation.views.childgridview.title',
caption: 'entities.eamassetstatemodelline.views.gridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamassetstatemodellines', parameterName: 'eamassetstatemodelline' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/asset/eamasset-state-model-line-grid-view/eamasset-state-model-line-grid-view.vue'),
},
{
path: 'eamlocations/:eamlocation?/treeexpview/:treeexpview?',
meta: {
caption: 'entities.eamlocation.views.treeexpview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'childgridview', parameterName: 'childgridview' },
{ pathName: 'treeexpview', parameterName: 'treeexpview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-child-grid-view/eamlocation-child-grid-view.vue'),
component: () => import('@pages/location/eamlocation-tree-exp-view/eamlocation-tree-exp-view.vue'),
},
{
path: 'eamlocations/:eamlocation?/infoview/:infoview?',
path: 'eamlocations/:eamlocation?/editview/:editview?',
meta: {
caption: 'entities.eamlocation.views.infoview.title',
caption: 'entities.eamlocation.views.editview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'infoview', parameterName: 'infoview' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-info-view/eamlocation-info-view.vue'),
component: () => import('@pages/location/eamlocation-edit-view/eamlocation-edit-view.vue'),
},
{
path: 'eamlocationtypes/:eamlocationtype?/pickupgridview/:pickupgridview?',
path: 'eamlocationstates/:eamlocationstate?/editview/:editview?',
meta: {
caption: 'entities.eamlocationtype.views.pickupgridview.title',
caption: 'entities.eamlocationstate.views.editview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstates', parameterName: 'eamlocationstate' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-state-edit-view/eamlocation-state-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: 'eamlocations/:eamlocation?/treechildgridview/:treechildgridview?',
meta: {
caption: 'entities.eamlocation.views.treechildgridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'treechildgridview', parameterName: 'treechildgridview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-tree-child-grid-view/eamlocation-tree-child-grid-view.vue'),
},
{
path: 'eamassetstates/:eamassetstate?/editview/:editview?',
meta: {
caption: 'entities.eamassetstate.views.editview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamassetstates', parameterName: 'eamassetstate' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/asset/eamasset-state-edit-view/eamasset-state-edit-view.vue'),
},
{
path: 'eamassetstatemodels/:eamassetstatemodel?/editview/:editview?',
meta: {
caption: 'entities.eamassetstatemodel.views.editview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamassetstatemodels', parameterName: 'eamassetstatemodel' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/asset/eamasset-state-model-edit-view/eamasset-state-model-edit-view.vue'),
},
{
path: 'eamassetstates/:eamassetstate?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.eamassetstate.views.pickupgridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamassetstates', parameterName: 'eamassetstate' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-type-pickup-grid-view/eamlocation-type-pickup-grid-view.vue'),
component: () => import('@pages/asset/eamasset-state-pickup-grid-view/eamasset-state-pickup-grid-view.vue'),
},
{
path: 'eamlocationstates/:eamlocationstate?/listexpview/:listexpview?',
path: 'eamlocationstates/:eamlocationstate?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.eamlocationstate.views.listexpview.title',
caption: 'entities.eamlocationstate.views.pickupgridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstates', parameterName: 'eamlocationstate' },
{ pathName: 'listexpview', parameterName: 'listexpview' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-state-list-exp-view/eamlocation-state-list-exp-view.vue'),
component: () => import('@pages/location/eamlocation-state-pickup-grid-view/eamlocation-state-pickup-grid-view.vue'),
},
{
path: 'eamlocations/:eamlocation?/pickupview/:pickupview?',
path: 'eamlocationstatemodels/:eamlocationstatemodel?/editview/:editview?',
meta: {
caption: 'entities.eamlocation.views.pickupview.title',
caption: 'entities.eamlocationstatemodel.views.editview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'eamlocationstatemodels', parameterName: 'eamlocationstatemodel' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-state-model-edit-view/eamlocation-state-model-edit-view.vue'),
},
{
path: 'eamassetstatemodels/:eamassetstatemodel?/pickupview/:pickupview?',
meta: {
caption: 'entities.eamassetstatemodel.views.pickupview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamassetstatemodels', parameterName: 'eamassetstatemodel' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-pickup-view/eamlocation-pickup-view.vue'),
component: () => import('@pages/asset/eamasset-state-model-pickup-view/eamasset-state-model-pickup-view.vue'),
},
{
path: 'eamlocationstatemodels/:eamlocationstatemodel?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.eamlocationstatemodel.views.pickupgridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstatemodels', parameterName: 'eamlocationstatemodel' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-state-model-pickup-grid-view/eamlocation-state-model-pickup-grid-view.vue'),
},
{
path: 'eamlocations/:eamlocation?/childgridview/:childgridview?',
meta: {
caption: 'entities.eamlocation.views.childgridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'childgridview', parameterName: 'childgridview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-child-grid-view/eamlocation-child-grid-view.vue'),
},
{
path: 'eamlocationstatemodellines/:eamlocationstatemodelline?/editview/:editview?',
meta: {
caption: 'entities.eamlocationstatemodelline.views.editview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstatemodellines', parameterName: 'eamlocationstatemodelline' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-state-model-line-edit-view/eamlocation-state-model-line-edit-view.vue'),
},
{
path: 'eamlocationstates/:eamlocationstate?/listexpview/:listexpview?',
meta: {
caption: 'entities.eamlocationstate.views.listexpview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstates', parameterName: 'eamlocationstate' },
{ pathName: 'listexpview', parameterName: 'listexpview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-state-list-exp-view/eamlocation-state-list-exp-view.vue'),
},
{
path: 'eamlocationstatemodellines/:eamlocationstatemodelline?/gridview/:gridview?',
......@@ -155,6 +323,20 @@ const router = new Router({
},
component: () => import('@pages/location/eamlocation-state-model-line-grid-view/eamlocation-state-model-line-grid-view.vue'),
},
{
path: 'eamlocations/:eamlocation?/pickupview/:pickupview?',
meta: {
caption: 'entities.eamlocation.views.pickupview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-pickup-view/eamlocation-pickup-view.vue'),
},
{
path: 'eamlocationtypes/:eamlocationtype?/editview/:editview?',
meta: {
......@@ -170,32 +352,32 @@ const router = new Router({
component: () => import('@pages/location/eamlocation-type-edit-view/eamlocation-type-edit-view.vue'),
},
{
path: 'eamlocationstates/:eamlocationstate?/pickupview/:pickupview?',
path: 'eamlocationstatemodels/:eamlocationstatemodel?/pickupview/:pickupview?',
meta: {
caption: 'entities.eamlocationstate.views.pickupview.title',
caption: 'entities.eamlocationstatemodel.views.pickupview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstates', parameterName: 'eamlocationstate' },
{ pathName: 'eamlocationstatemodels', parameterName: 'eamlocationstatemodel' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-state-pickup-view/eamlocation-state-pickup-view.vue'),
component: () => import('@pages/location/eamlocation-state-model-pickup-view/eamlocation-state-model-pickup-view.vue'),
},
{
path: 'eamlocationstatemodels/:eamlocationstatemodel?/pickupview/:pickupview?',
path: 'eamlocationstates/:eamlocationstate?/pickupview/:pickupview?',
meta: {
caption: 'entities.eamlocationstatemodel.views.pickupview.title',
caption: 'entities.eamlocationstate.views.pickupview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstatemodels', parameterName: 'eamlocationstatemodel' },
{ pathName: 'eamlocationstates', parameterName: 'eamlocationstate' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-state-model-pickup-view/eamlocation-state-model-pickup-view.vue'),
component: () => import('@pages/location/eamlocation-state-pickup-view/eamlocation-state-pickup-view.vue'),
},
{
path: 'eamlocations/:eamlocation?/info_mainview/:info_mainview?',
......@@ -240,18 +422,18 @@ const router = new Router({
component: () => import('@pages/location/eamlocation-summary-view/eamlocation-summary-view.vue'),
},
{
path: 'eamlocationtypes/:eamlocationtype?/pickupview/:pickupview?',
path: 'eamassetstates/:eamassetstate?/pickupview/:pickupview?',
meta: {
caption: 'entities.eamlocationtype.views.pickupview.title',
caption: 'entities.eamassetstate.views.pickupview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationtypes', parameterName: 'eamlocationtype' },
{ pathName: 'eamassetstates', parameterName: 'eamassetstate' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-type-pickup-view/eamlocation-type-pickup-view.vue'),
component: () => import('@pages/asset/eamasset-state-pickup-view/eamasset-state-pickup-view.vue'),
},
{
path: 'eamassetstates/:eamassetstate?/gridview/:gridview?',
......@@ -268,60 +450,60 @@ const router = new Router({
component: () => import('@pages/asset/eamasset-state-grid-view/eamasset-state-grid-view.vue'),
},
{
path: 'eamlocations/:eamlocation?/gridview/:gridview?',
path: 'eamlocationtypes/:eamlocationtype?/pickupview/:pickupview?',
meta: {
caption: 'entities.eamlocation.views.gridview.title',
caption: 'entities.eamlocationtype.views.pickupview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'gridview', parameterName: 'gridview' },
{ pathName: 'eamlocationtypes', parameterName: 'eamlocationtype' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-grid-view/eamlocation-grid-view.vue'),
component: () => import('@pages/location/eamlocation-type-pickup-view/eamlocation-type-pickup-view.vue'),
},
{
path: 'eamlocations/:eamlocation?/editview/:editview?',
path: 'eamassetstatemodels/:eamassetstatemodel?/gridview/:gridview?',
meta: {
caption: 'entities.eamlocation.views.editview.title',
caption: 'entities.eamassetstatemodel.views.gridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'editview', parameterName: 'editview' },
{ pathName: 'eamassetstatemodels', parameterName: 'eamassetstatemodel' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-edit-view/eamlocation-edit-view.vue'),
component: () => import('@pages/asset/eamasset-state-model-grid-view/eamasset-state-model-grid-view.vue'),
},
{
path: 'eamlocationtypes/:eamlocationtype?/gridview/:gridview?',
path: 'eamlocations/:eamlocation?/gridview/:gridview?',
meta: {
caption: 'entities.eamlocationtype.views.gridview.title',
caption: 'entities.eamlocation.views.gridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationtypes', parameterName: 'eamlocationtype' },
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-type-grid-view/eamlocation-type-grid-view.vue'),
component: () => import('@pages/location/eamlocation-grid-view/eamlocation-grid-view.vue'),
},
{
path: 'eamlocationstates/:eamlocationstate?/editview/:editview?',
path: 'eamassetstatemodels/:eamassetstatemodel?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.eamlocationstate.views.editview.title',
caption: 'entities.eamassetstatemodel.views.pickupgridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstates', parameterName: 'eamlocationstate' },
{ pathName: 'editview', parameterName: 'editview' },
{ pathName: 'eamassetstatemodels', parameterName: 'eamassetstatemodel' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-state-edit-view/eamlocation-state-edit-view.vue'),
component: () => import('@pages/asset/eamasset-state-model-pickup-grid-view/eamasset-state-model-pickup-grid-view.vue'),
},
{
path: 'eamlocationstatemodels/:eamlocationstatemodel?/gridview/:gridview?',
......@@ -337,48 +519,6 @@ const router = new Router({
},
component: () => import('@pages/location/eamlocation-state-model-grid-view/eamlocation-state-model-grid-view.vue'),
},
{
path: 'eamassetstates/:eamassetstate?/editview/:editview?',
meta: {
caption: 'entities.eamassetstate.views.editview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamassetstates', parameterName: 'eamassetstate' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/asset/eamasset-state-edit-view/eamasset-state-edit-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?',
meta: {
caption: 'entities.eamlocationstatemodel.views.editview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstatemodels', parameterName: 'eamlocationstatemodel' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-state-model-edit-view/eamlocation-state-model-edit-view.vue'),
},
...indexRoutes,
],
},
......
......@@ -88,24 +88,9 @@ export class EAMLocationStateEditViewBase extends EditViewBase {
* @memberof EAMLocationStateEditViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_form: { name: 'form', type: 'FORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof EAMLocationStateEditView
*/
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: '' } },
};
/**
* 视图唯一标识
......@@ -143,22 +128,6 @@ export class EAMLocationStateEditViewBase extends EditViewBase {
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationStateEditViewBase
*/
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 事件
*
......@@ -192,112 +161,5 @@ export class EAMLocationStateEditViewBase extends EditViewBase {
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,"EAMLocationState");
}
/**
* 逻辑事件
*
* @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,"EAMLocationState");
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMLocationStateEditViewBase
*/
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 EAMLocationStateEditViewBase
*/
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
......@@ -2,8 +2,6 @@
<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"
......
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 EAMLocationTreeChildGridViewBase
* @extends {GridViewBase}
*/
export class EAMLocationTreeChildGridViewBase extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMLocationTreeChildGridViewBase
*/
protected appDeName: string = 'eamlocation';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMLocationTreeChildGridViewBase
*/
protected appDeKey: string = 'eamlocationid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMLocationTreeChildGridViewBase
*/
protected appDeMajor: string = 'eamlocationname';
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof EAMLocationTreeChildGridViewBase
*/
protected appEntityService: EAMLocationService = new EAMLocationService;
/**
* 实体权限服务对象
*
* @type EAMLocationUIService
* @memberof EAMLocationTreeChildGridViewBase
*/
public appUIService: EAMLocationUIService = new EAMLocationUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMLocationTreeChildGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMLocationTreeChildGridViewBase
*/
protected model: any = {
srfCaption: 'entities.eamlocation.views.treechildgridview.caption',
srfTitle: 'entities.eamlocation.views.treechildgridview.title',
srfSubTitle: 'entities.eamlocation.views.treechildgridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMLocationTreeChildGridViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof EAMLocationTreeChildGridView
*/
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 = '21edc7e27023f06aac51f150f3fb1f10';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMLocationTreeChildGridViewBase
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMLocationTreeChildGridViewBase
*/
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 EAMLocationTreeChildGridViewBase
*/
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 EAMLocationTreeChildGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTreeChildGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTreeChildGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTreeChildGridViewBase
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTreeChildGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTreeChildGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTreeChildGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTreeChildGridViewBase
*/
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 EAMLocationTreeChildGridView
*/
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 EAMLocationTreeChildGridView
*/
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 EAMLocationTreeChildGridViewBase
*/
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 EAMLocationTreeChildGridViewBase
*/
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 EAMLocationTreeChildGridViewBase
*/
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 EAMLocationTreeChildGridViewBase
*/
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 EAMLocationTreeChildGridViewBase
*/
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 EAMLocationTreeChildGridViewBase
*/
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 EAMLocationTreeChildGridViewBase
*/
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="eamlocationtreechildgridview" viewTitle="功能位置信息" class='degridview eamlocation-tree-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="FetchChild"
: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-tree-child-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMLocationTreeChildGridViewBase } from './eamlocation-tree-child-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 EAMLocationTreeChildGridView
* @extends {EAMLocationTreeChildGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class EAMLocationTreeChildGridView extends EAMLocationTreeChildGridViewBase { }
</script>
import { Subject } from 'rxjs';
import { TreeExpViewBase } from '@/studio-core';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import EAMLocationAuthService from '@/authservice/eamlocation/eamlocation-auth-service';
import TreeExpViewEngine from '@engine/view/tree-exp-view-engine';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
/**
* 功能位置信息视图基类
*
* @export
* @class EAMLocationTreeExpViewBase
* @extends {TreeExpViewBase}
*/
export class EAMLocationTreeExpViewBase extends TreeExpViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMLocationTreeExpViewBase
*/
protected appDeName: string = 'eamlocation';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMLocationTreeExpViewBase
*/
protected appDeKey: string = 'eamlocationid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMLocationTreeExpViewBase
*/
protected appDeMajor: string = 'eamlocationname';
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof EAMLocationTreeExpViewBase
*/
protected appEntityService: EAMLocationService = new EAMLocationService;
/**
* 实体权限服务对象
*
* @type EAMLocationUIService
* @memberof EAMLocationTreeExpViewBase
*/
public appUIService: EAMLocationUIService = new EAMLocationUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMLocationTreeExpViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMLocationTreeExpViewBase
*/
protected model: any = {
srfCaption: 'entities.eamlocation.views.treeexpview.caption',
srfTitle: 'entities.eamlocation.views.treeexpview.title',
srfSubTitle: 'entities.eamlocation.views.treeexpview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMLocationTreeExpViewBase
*/
protected containerModel: any = {
view_treeexpbar: { name: 'treeexpbar', type: 'TREEEXPBAR' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '135343573fd869053d84ecc2f48ffd49';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMLocationTreeExpViewBase
*/
public engine: TreeExpViewEngine = new TreeExpViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMLocationTreeExpViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
treeexpbar: this.$refs.treeexpbar,
keyPSDEField: 'eamlocation',
majorPSDEField: 'eamlocationname',
isLoadDefault: true,
});
}
/**
* treeexpbar 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTreeExpViewBase
*/
public treeexpbar_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('treeexpbar', 'selectionchange', $event);
}
/**
* treeexpbar 部件 activated 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTreeExpViewBase
*/
public treeexpbar_activated($event: any, $event2?: any): void {
this.engine.onCtrlEvent('treeexpbar', 'activated', $event);
}
/**
* treeexpbar 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMLocationTreeExpViewBase
*/
public treeexpbar_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('treeexpbar', 'load', $event);
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMLocationTreeExpView
*/
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
this.$Notice.warning({ title: '错误', desc: '未指定关系视图' });
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMLocationTreeExpView
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
this.$Notice.warning({ title: '错误', desc: '未指定关系视图' });
}
/**
* 视图唯一标识
*
* @type {string}
* @memberof EAMLocationTreeExpView
*/
public viewUID: string = 'location-eamlocation-tree-exp-view';
}
\ No newline at end of file
<studio-view-style2 viewName="eamlocationtreeexpview" viewTitle="功能位置信息" class='detreeexpview eamlocation-tree-exp-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<view_treeexpbar
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:viewUID="viewUID"
:newdata="newdata"
:opendata="opendata"
name="treeexpbar"
ref='treeexpbar'
@selectionchange="treeexpbar_selectionchange($event)"
@activated="treeexpbar_activated($event)"
@load="treeexpbar_load($event)"
@closeview="closeView($event)">
</view_treeexpbar>
</studio-view-style2>
\ No newline at end of file
<template src="./eamlocation-tree-exp-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMLocationTreeExpViewBase } from './eamlocation-tree-exp-view-base';
import view_treeexpbar from '@widgets/eamlocation/tree-exp-viewtreeexpbar-treeexpbar/tree-exp-viewtreeexpbar-treeexpbar.vue';
/**
* 功能位置信息视图
*
* @export
* @class EAMLocationTreeExpView
* @extends {EAMLocationTreeExpViewBase}
*/
@Component({
components: {
view_treeexpbar,
}
})
@VueLifeCycleProcessing()
export default class EAMLocationTreeExpView extends EAMLocationTreeExpViewBase { }
</script>
......@@ -48,6 +48,9 @@ export default class EAMAssetServiceBase extends EntityService {
* @memberof EAMAssetServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset){
return Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/select`,isloading);
}
return Http.getInstance().get(`/eamassets/${context.eamasset}/select`,isloading);
}
......@@ -61,6 +64,19 @@ export default class EAMAssetServiceBase extends EntityService {
* @memberof EAMAssetServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && true){
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(`/eamlocations/${context.eamlocation}/eamassets`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
......@@ -84,6 +100,12 @@ export default class EAMAssetServiceBase extends EntityService {
* @memberof EAMAssetServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamassets/${context.eamasset}`,data,isloading);
......@@ -100,6 +122,9 @@ export default class EAMAssetServiceBase extends EntityService {
* @memberof EAMAssetServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset){
return Http.getInstance().delete(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}`,isloading);
}
return Http.getInstance().delete(`/eamassets/${context.eamasset}`,isloading);
}
......@@ -113,6 +138,10 @@ export default class EAMAssetServiceBase extends EntityService {
* @memberof EAMAssetServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset){
let res:any = await Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}`,isloading);
return res;
}
let res:any = await Http.getInstance().get(`/eamassets/${context.eamasset}`,isloading);
return res;
}
......@@ -127,6 +156,11 @@ export default class EAMAssetServiceBase extends EntityService {
* @memberof EAMAssetServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && true){
let res:any = await Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/getdraft`,isloading);
res.data.eamasset = data.eamasset;
return res;
}
let res:any = await Http.getInstance().get(`/eamassets/getdraft`,isloading);
res.data.eamasset = data.eamasset;
return res;
......@@ -142,6 +176,12 @@ export default class EAMAssetServiceBase extends EntityService {
* @memberof EAMAssetServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/checkkey`,data,isloading);
return res;
}
return Http.getInstance().post(`/eamassets/${context.eamasset}/checkkey`,data,isloading);
}
......@@ -155,6 +195,12 @@ export default class EAMAssetServiceBase extends EntityService {
* @memberof EAMAssetServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/save`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamassets/${context.eamasset}/save`,data,isloading);
......@@ -171,6 +217,10 @@ export default class EAMAssetServiceBase extends EntityService {
* @memberof EAMAssetServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/fetchdefault`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamassets/fetchdefault`,tempData,isloading);
}
......
......@@ -62,6 +62,21 @@ export default class EAMLocationServiceBase extends EntityService {
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let eamassetsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_eamassets'),'undefined')){
eamassetsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_eamassets') as any);
if(eamassetsData && eamassetsData.length && eamassetsData.length > 0){
eamassetsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.assetid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.eamassets = eamassetsData;
let eamlocationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_eamlocations'),'undefined')){
eamlocationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_eamlocations') as any);
......@@ -86,6 +101,7 @@ export default class EAMLocationServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamlocations`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_eamassets',JSON.stringify(res.data.eamassets ? res.data.eamassets : []));
this.tempStorage.setItem(tempContext.srfsessionkey+'_eamlocations',JSON.stringify(res.data.eamlocations ? res.data.eamlocations : []));
return res;
}
......@@ -101,6 +117,21 @@ export default class EAMLocationServiceBase extends EntityService {
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let eamassetsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_eamassets'),'undefined')){
eamassetsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_eamassets') as any);
if(eamassetsData && eamassetsData.length && eamassetsData.length > 0){
eamassetsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.assetid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.eamassets = eamassetsData;
let eamlocationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_eamlocations'),'undefined')){
eamlocationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_eamlocations') as any);
......@@ -118,6 +149,7 @@ export default class EAMLocationServiceBase extends EntityService {
masterData.eamlocations = eamlocationsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamlocations/${context.eamlocation}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_eamassets',JSON.stringify(res.data.eamassets ? res.data.eamassets : []));
this.tempStorage.setItem(context.srfsessionkey+'_eamlocations',JSON.stringify(res.data.eamlocations ? res.data.eamlocations : []));
return res;
}
......@@ -146,6 +178,7 @@ export default class EAMLocationServiceBase extends EntityService {
*/
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+'_eamassets',JSON.stringify(res.data.eamassets ? res.data.eamassets : []));
this.tempStorage.setItem(context.srfsessionkey+'_eamlocations',JSON.stringify(res.data.eamlocations ? res.data.eamlocations : []));
return res;
}
......@@ -162,6 +195,7 @@ export default class EAMLocationServiceBase extends EntityService {
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+'_eamassets',JSON.stringify(res.data.eamassets ? res.data.eamassets : []));
this.tempStorage.setItem(context.srfsessionkey+'_eamlocations',JSON.stringify(res.data.eamlocations ? res.data.eamlocations : []));
return res;
}
......@@ -190,6 +224,21 @@ export default class EAMLocationServiceBase extends EntityService {
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let eamassetsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_eamassets'),'undefined')){
eamassetsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_eamassets') as any);
if(eamassetsData && eamassetsData.length && eamassetsData.length > 0){
eamassetsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.assetid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.eamassets = eamassetsData;
let eamlocationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_eamlocations'),'undefined')){
eamlocationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_eamlocations') as any);
......@@ -207,10 +256,25 @@ export default class EAMLocationServiceBase extends EntityService {
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+'_eamassets',JSON.stringify(res.data.eamassets ? res.data.eamassets : []));
this.tempStorage.setItem(context.srfsessionkey+'_eamlocations',JSON.stringify(res.data.eamlocations ? res.data.eamlocations : []));
return res;
}
/**
* FetchChild接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationServiceBase
*/
public async FetchChild(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamlocations/fetchchild`,tempData,isloading);
}
/**
* FetchChildLocation接口方法
*
......@@ -238,4 +302,18 @@ export default class EAMLocationServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamlocations/fetchdefault`,tempData,isloading);
}
/**
* FetchTop接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMLocationServiceBase
*/
public async FetchTop(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/eamlocations/fetchtop`,tempData,isloading);
}
}
\ No newline at end of file
......@@ -22,6 +22,29 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '135343573fd869053d84ecc2f48ffd49',
viewmodule: 'Location',
viewname: 'EAMLocationTreeExpView',
viewaction: '',
viewdatachange: false,
refviews: [
'eee617336f6dc6e5e97835d6309fd452',
'21edc7e27023f06aac51f150f3fb1f10',
],
},
{
viewtag: '15caf81deb1f02479030f14d90ce5c3e',
viewmodule: 'Asset',
viewname: 'EAMAssetStateModelLineGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'ddfe97780b64a25b28b14a283fa27a61',
'ad2a01fb2fd055e63d60260a18136d61',
'd69c20799b79d71f84ed52f036b3490c',
],
},
{
viewtag: '1769804cd7ab51624ac3c88c2090363b',
viewmodule: 'Location',
......@@ -33,6 +56,17 @@ export const viewstate: any = {
'2b28313d0f3925fa44b8683eb5ea54d6',
],
},
{
viewtag: '21edc7e27023f06aac51f150f3fb1f10',
viewmodule: 'Location',
viewname: 'EAMLocationTreeChildGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'd3466c5c60a573062d543896976bf68c',
'1769804cd7ab51624ac3c88c2090363b',
],
},
{
viewtag: '251816f09cb8f040c9309992cf957370',
viewmodule: 'Asset',
......@@ -52,6 +86,16 @@ export const viewstate: any = {
'f572d337efac74735bf54b199e054081',
],
},
{
viewtag: '30027967566375f388f110149cf48b49',
viewmodule: 'Asset',
viewname: 'EAMAssetStateModelGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'6c2c69027dbbe13ab8d2732923487f59',
],
},
{
viewtag: '3d676a12800fca23bec463d5c5217413',
viewmodule: 'Location',
......@@ -91,6 +135,16 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '6c2c69027dbbe13ab8d2732923487f59',
viewmodule: 'Asset',
viewname: 'EAMAssetStateModelEditView',
viewaction: '',
viewdatachange: false,
refviews: [
'15caf81deb1f02479030f14d90ce5c3e',
],
},
{
viewtag: '7bf1327f579d782d5cdb98528999a5e0',
viewmodule: 'Location',
......@@ -140,6 +194,35 @@ export const viewstate: any = {
'b56347aaab650c59a8338876600c21e4',
],
},
{
viewtag: 'a9f86b6e01c06082f119369de0ee8f01',
viewmodule: 'Asset',
viewname: 'EAMAssetStateModelPickupGridView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: 'ad2a01fb2fd055e63d60260a18136d61',
viewmodule: 'Asset',
viewname: 'EAMAssetStateModelLineEditView',
viewaction: '',
viewdatachange: false,
refviews: [
'ddfe97780b64a25b28b14a283fa27a61',
'd69c20799b79d71f84ed52f036b3490c',
],
},
{
viewtag: 'aec3c3b9b959ac67bf41fe45cca7808b',
viewmodule: 'Asset',
viewname: 'EAMAssetStatePickupGridView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: 'b24fce391aeca43222a1017b50ba40e2',
viewmodule: 'Location',
......@@ -208,12 +291,23 @@ export const viewstate: any = {
viewdatachange: false,
refviews: [
'00fcbd6336b5d40a31a2c3d5c346d16c',
'eee617336f6dc6e5e97835d6309fd452',
'30027967566375f388f110149cf48b49',
'135343573fd869053d84ecc2f48ffd49',
'4c95ec14aa2de5370d9d81f7d85f4bd5',
'a3d6a9a21765dd59afa2d3d20a99096c',
'9e9b3600ba892d31757bacef1dcc9458',
],
},
{
viewtag: 'd69c20799b79d71f84ed52f036b3490c',
viewmodule: 'Asset',
viewname: 'EAMAssetStateModelPickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'a9f86b6e01c06082f119369de0ee8f01',
],
},
{
viewtag: 'dd09755644dcf1e57c062b4e08e4ce3a',
viewmodule: 'Location',
......@@ -224,6 +318,16 @@ export const viewstate: any = {
'3d676a12800fca23bec463d5c5217413',
],
},
{
viewtag: 'ddfe97780b64a25b28b14a283fa27a61',
viewmodule: 'Asset',
viewname: 'EAMAssetStatePickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'aec3c3b9b959ac67bf41fe45cca7808b',
],
},
{
viewtag: 'ecd1ec6299b5b24e2004fa15c4eef92d',
viewmodule: 'Location',
......
......@@ -58,6 +58,7 @@ export { MDControlBase } from './widgets/MDControlBase';
export { PanelControlBase } from './widgets/PanelControlBase';
export { SearchFormControlBase } from './widgets/SearchFormControlBase';
export { TabExpPanelControlBase } from './widgets/TabExpPanelControlBase';
export { DataViewExpBarControlBase } from './widgets/DataViewExpBarControlBase';
// 组件 Start
import { AppLayout } from './components/layout/app-layout/app-layout';
import { AppHeader } from './components/layout/app-header/app-header';
......
import { ExpControlBase } from './ExpControlBase';
/**
* 数据卡片导航视图
*
* @export
* @class DataViewExpBarControlBase
* @extends {ExpControlBase}
*/
export class DataViewExpBarControlBase extends ExpControlBase {
/**
* 数据视图是否单选
*
* @type {boolean}
* @memberof DataViewExpBarControlBase
*/
public isDataViewSingleSelect: boolean = true;
/**
* 部件创建完毕
*
* @memberof GridExpBarControlBase
*/
public ctrlCreated(): void {
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.viewState.next({ tag: 'dataviewexpbar_dataview', action: action, data: data });
});
}
}
/**
* 执行搜索
*
* @memberof DataViewExpBarControlBase
*/
public onSearch(): void {
this.viewState.next({ tag: 'dataviewexpbar_dataview', action: 'filter', data: { query: this.searchText } });
}
/**
* 卡片视图加载完成
*
* @param {any[]} args
* @param {string} [tag]
* @param {*} [$event2]
* @returns {void}
* @memberof DataViewExpBarControlBase
*/
public dataviewexpbar_load(args: any[], tag?: string, $event2?: any): void {
this.$emit('load', args);
}
}
\ No newline at end of file
......@@ -10,6 +10,24 @@ import { ControlBase } from './ControlBase';
*/
export class ExpControlBase extends ControlBase {
/**
* 打开新建数据视图
*
* @type {any}
* @memberof ExpControlBase
*/
@Prop()
public newdata: any;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof ExpControlBase
*/
@Prop()
public opendata: any;
/**
* 视图唯一标识
*
......
......@@ -9,23 +9,6 @@ import { ExpControlBase } from './ExpControlBase';
* @extends {ExpControlBase}
*/
export class GridExpBarControlBase extends ExpControlBase {
/**
* 打开新建数据视图
*
* @type {any}
* @memberof GridExpBarControlBase
*/
@Prop()
public newdata: any;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof GridExpBarControlBase
*/
@Prop()
public opendata: any;
/**
* 是否单选
......
......@@ -1153,6 +1153,30 @@ div::-webkit-scrollbar-thumb {
// 数据视图部件
.app-data-view {
height: 100%;
overflow-y: auto;
overflow-x: hidden;
padding: 5px;
.data-view-container {
.ivu-col {
margin-bottom: 10px;
}
.single-card-data {
height: 100%;
width: 100%;
cursor: pointer;
.single-card-img {
img {
width: 100%;
height: 100%;
}
}
}
}
.app-data-empty {
height: 100%;
......
......@@ -89,6 +89,8 @@ export default class EAMAssetStateModelLineUIServiceBase extends UIService {
* @memberof EAMAssetStateModelLineUIServiceBase
*/
public initViewMap(){
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'eamassetstatemodellines'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'eamassetstatemodellines'});
}
/**
......
......@@ -89,6 +89,10 @@ export default class EAMAssetStateModelUIServiceBase extends UIService {
* @memberof EAMAssetStateModelUIServiceBase
*/
public initViewMap(){
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'eamassetstatemodels'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'eamassetstatemodels'});
this.allViewMap.set(':',{viewname:'pickupgridview',srfappde:'eamassetstatemodels'});
this.allViewMap.set('PICKUPVIEW:',{viewname:'pickupview',srfappde:'eamassetstatemodels'});
}
/**
......
......@@ -91,6 +91,8 @@ export default class EAMAssetStateUIServiceBase extends UIService {
public initViewMap(){
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'eamassetstates'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'eamassetstates'});
this.allViewMap.set(':',{viewname:'pickupgridview',srfappde:'eamassetstates'});
this.allViewMap.set('PICKUPVIEW:',{viewname:'pickupview',srfappde:'eamassetstates'});
}
/**
......
......@@ -89,7 +89,9 @@ export default class EAMLocationUIServiceBase extends UIService {
* @memberof EAMLocationUIServiceBase
*/
public initViewMap(){
this.allViewMap.set(':',{viewname:'treeexpview',srfappde:'eamlocations'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'eamlocations'});
this.allViewMap.set(':',{viewname:'treechildgridview',srfappde:'eamlocations'});
this.allViewMap.set('PICKUPVIEW:',{viewname:'pickupview',srfappde:'eamlocations'});
this.allViewMap.set(':',{viewname:'info_mainview',srfappde:'eamlocations'});
this.allViewMap.set(':',{viewname:'childgridview',srfappde:'eamlocations'});
......
......@@ -15,16 +15,18 @@ export class AppIndexViewBase extends Vue {
if (item) {
let judge = true;
switch (item.appfunctag) {
case '_6':
this.click_6(item); break;
case '_3':
this.click_3(item); break;
case '_2':
this.click_2(item); break;
case '_7':
this.click_7(item); break;
case '_4':
this.click_4(item); break;
case '_2':
this.click_2(item); break;
case '_5':
this.click_5(item); break;
case '_6':
this.click_6(item); break;
case '_3':
this.click_3(item); break;
default:
judge = false;
console.warn('未指定应用功能');
......@@ -41,13 +43,13 @@ export class AppIndexViewBase extends Vue {
* @param {*} [item={}]
* @memberof AppIndexView
*/
public click_6(item: any = {}) {
public click_7(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'gridview', parameterName: 'gridview' },
{ pathName: 'treeexpview', parameterName: 'treeexpview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.fullPath,path)){
......@@ -64,7 +66,7 @@ export class AppIndexViewBase extends Vue {
* @param {*} [item={}]
* @memberof AppIndexView
*/
public click_3(item: any = {}) {
public click_4(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
......@@ -110,7 +112,7 @@ export class AppIndexViewBase extends Vue {
* @param {*} [item={}]
* @memberof AppIndexView
*/
public click_4(item: any = {}) {
public click_5(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
......@@ -133,7 +135,7 @@ export class AppIndexViewBase extends Vue {
* @param {*} [item={}]
* @memberof AppIndexView
*/
public click_5(item: any = {}) {
public click_6(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
......@@ -150,6 +152,29 @@ export class AppIndexViewBase extends Vue {
})
}
/**
* 资产状态模型
*
* @param {*} [item={}]
* @memberof AppIndexView
*/
public click_3(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamassetstatemodels', parameterName: 'eamassetstatemodel' },
{ 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);
})
}
/**
* 绘制内容
*
......
......@@ -105,7 +105,7 @@ export default class AppIndexViewModel {
iconcls: 'fa fa-life-ring',
icon: '',
textcls: '',
appfunctag: '_4',
appfunctag: '_5',
appfuncyype: 'APPVIEW',
viewname: 'eamlocation-state-list-exp-view',
resourcetag: '',
......@@ -126,7 +126,7 @@ export default class AppIndexViewModel {
iconcls: 'fa fa-cube',
icon: '',
textcls: '',
appfunctag: '_3',
appfunctag: '_4',
appfuncyype: 'APPVIEW',
viewname: 'eamlocation-state-model-grid-view',
resourcetag: '',
......@@ -147,7 +147,7 @@ export default class AppIndexViewModel {
iconcls: 'fa fa-legal',
icon: '',
textcls: '',
appfunctag: '_5',
appfunctag: '_6',
appfuncyype: 'APPVIEW',
viewname: 'eamlocation-type-grid-view',
resourcetag: '',
......@@ -168,9 +168,9 @@ export default class AppIndexViewModel {
iconcls: 'fa fa-navicon',
icon: '',
textcls: '',
appfunctag: '_6',
appfunctag: '_7',
appfuncyype: 'APPVIEW',
viewname: 'eamlocation-grid-view',
viewname: 'eamlocation-tree-exp-view',
resourcetag: '',
}
,
......@@ -215,6 +215,27 @@ export default class AppIndexViewModel {
viewname: 'eamasset-state-grid-view',
resourcetag: '',
}
,
{
id: '209538AE-367C-4976-A2A7-5C40C622BF7F',
name: 'menuitem11',
text: '资产状态模型',
type: 'MENUITEM',
counterid: '',
tooltip: '资产状态模型',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: 'fa fa-cube',
icon: '',
textcls: '',
appfunctag: '_3',
appfuncyype: 'APPVIEW',
viewname: 'eamasset-state-model-grid-view',
resourcetag: '',
}
,
],
}
......@@ -290,19 +311,19 @@ export default class AppIndexViewModel {
*/
private funcs: any[] = [
{
appfunctag: '_6',
appfunctag: '_7',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'eamlocationgridview',
codename: 'eamlocationtreeexpview',
deResParameters: [],
routepath: '/appindexview/:appindexview?/eamlocations/:eamlocation?/gridview/:gridview?',
routepath: '/appindexview/:appindexview?/eamlocations/:eamlocation?/treeexpview/:treeexpview?',
parameters: [
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'gridview', parameterName: 'gridview' },
{ pathName: 'treeexpview', parameterName: 'treeexpview' },
],
},
{
appfunctag: '_3',
appfunctag: '_4',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'eamlocationstatemodelgridview',
......@@ -326,7 +347,7 @@ export default class AppIndexViewModel {
],
},
{
appfunctag: '_4',
appfunctag: '_5',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'eamlocationstatelistexpview',
......@@ -338,7 +359,7 @@ export default class AppIndexViewModel {
],
},
{
appfunctag: '_5',
appfunctag: '_6',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'eamlocationtypegridview',
......@@ -349,6 +370,18 @@ export default class AppIndexViewModel {
{ pathName: 'gridview', parameterName: 'gridview' },
],
},
{
appfunctag: '_3',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'eamassetstatemodelgridview',
deResParameters: [],
routepath: '/appindexview/:appindexview?/eamassetstatemodels/:eamassetstatemodel?/gridview/:gridview?',
parameters: [
{ pathName: 'eamassetstatemodels', parameterName: 'eamassetstatemodel' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
},
];
/**
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, SearchFormControlBase } from '@/studio-core';
import EAMAssetStateModelLineService from '@/service/eamasset-state-model-line/eamasset-state-model-line-service';
import DefaultService from './default-searchform-service';
import EAMAssetStateModelLineUIService from '@/uiservice/eamasset-state-model-line/eamasset-state-model-line-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 {EAMAssetStateModelLineService}
* @memberof DefaultSearchFormBase
*/
public appEntityService: EAMAssetStateModelLineService = new EAMAssetStateModelLineService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected appDeName: string = 'eamassetstatemodelline';
/**
* 表单数据对象
*
* @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 EAMAssetStateModelLineService from '@/service/eamasset-state-model-line/eamasset-state-model-line-service';
import DefaultModel from './default-searchform-model';
/**
* Default 部件服务对象
*
* @export
* @class DefaultService
*/
export default class DefaultService extends ControlService {
/**
* 资产状态模型明细服务对象
*
* @type {EAMAssetStateModelLineService}
* @memberof DefaultService
*/
public appEntityService: EAMAssetStateModelLineService = new EAMAssetStateModelLineService({ $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 EAMAssetStateModelLineService from '@/service/eamasset-state-model-line/eamasset-state-model-line-service';
import MainService from './main-form-service';
import EAMAssetStateModelLineUIService from '@/uiservice/eamasset-state-model-line/eamasset-state-model-line-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 {EAMAssetStateModelLineService}
* @memberof MainEditFormBase
*/
public appEntityService: EAMAssetStateModelLineService = new EAMAssetStateModelLineService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainEditFormBase
*/
protected appDeName: string = 'eamassetstatemodelline';
/**
* 界面UI服务对象
*
* @type {EAMAssetStateModelLineUIService}
* @memberof MainEditFormBase
*/
public appUIService:EAMAssetStateModelLineUIService = new EAMAssetStateModelLineUIService(this.$store);
/**
* 表单数据对象
*
* @type {*}
* @memberof MainEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
eamassetstatemodelname: null,
eamassetstatename: null,
eamassetstatemodelid: null,
eamassetstateid: null,
eamassetstatemodellineid: null,
eamassetstatemodelline:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof MainEditFormBase
*/
public rules: any = {
}
/**
* 详情模型集合
*
* @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.eamassetstatemodelline.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 }),
eamassetstatemodelname: new FormItemModel({ caption: '资产状态模型', detailType: 'FORMITEM', name: 'eamassetstatemodelname', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamassetstatename: new FormItemModel({ caption: '资产状态', detailType: 'FORMITEM', name: 'eamassetstatename', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamassetstatemodelid: new FormItemModel({ caption: '资产状态模型标识', detailType: 'FORMITEM', name: 'eamassetstatemodelid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamassetstateid: new FormItemModel({ caption: '资产状态标识', detailType: 'FORMITEM', name: 'eamassetstateid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamassetstatemodellineid: new FormItemModel({ caption: '资产状态模型明细标识', detailType: 'FORMITEM', name: 'eamassetstatemodellineid', 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: 'eamassetstatemodellineid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'eamassetstatemodellinename',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'eamassetstatemodelname',
prop: 'eamassetstatemodelname',
dataType: 'PICKUPTEXT',
},
{
name: 'eamassetstatename',
prop: 'eamassetstatename',
dataType: 'PICKUPTEXT',
},
{
name: 'eamassetstatemodelid',
prop: 'eamassetstatemodelid',
dataType: 'PICKUP',
},
{
name: 'eamassetstateid',
prop: 'eamassetstateid',
dataType: 'PICKUP',
},
{
name: 'eamassetstatemodellineid',
prop: 'eamassetstatemodellineid',
dataType: 'GUID',
},
{
name: 'eamassetstatemodelline',
prop: 'eamassetstatemodellineid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import EAMAssetStateModelLineService from '@/service/eamasset-state-model-line/eamasset-state-model-line-service';
import MainModel from './main-form-model';
import EAMAssetStateModelService from '@/service/eamasset-state-model/eamasset-state-model-service';
import EAMAssetStateService from '@/service/eamasset-state/eamasset-state-service';
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export default class MainService extends ControlService {
/**
* 资产状态模型明细服务对象
*
* @type {EAMAssetStateModelLineService}
* @memberof MainService
*/
public appEntityService: EAMAssetStateModelLineService = new EAMAssetStateModelLineService({ $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 {EAMAssetStateModelService}
* @memberof MainService
*/
public eamassetstatemodelService: EAMAssetStateModelService = new EAMAssetStateModelService();
/**
* 资产状态服务对象
*
* @type {EAMAssetStateService}
* @memberof MainService
*/
public eamassetstateService: EAMAssetStateService = new EAMAssetStateService();
/**
* 处理数据
*
* @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, 'EAMAssetStateModelService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.eamassetstatemodelService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'eamassetstatemodelid', 'eamassetstatemodel');
}
if (Object.is(serviceName, 'EAMAssetStateService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.eamassetstateService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'eamassetstateid', 'eamassetstate');
}
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);
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.eamassetstatemodellineid = PrimaryKey;
Data.eamassetstatemodelline = 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.eamassetstatemodellineid = 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='eamassetstatemodelline_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.eamassetstatemodelline.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.eamassetstatemodelname.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='eamassetstatemodelname' :itemRules="this.rules.eamassetstatemodelname" class='' :caption="$t('entities.eamassetstatemodelline.main_form.details.eamassetstatemodelname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamassetstatemodelname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.eamassetstatemodelname.disabled"
name='eamassetstatemodelname'
deMajorField='eamassetstatemodelname'
deKeyField='eamassetstatemodel'
:service="service"
:acParams="{ serviceName: 'EAMAssetStateModelService', interfaceName: 'FetchDefault'}"
valueitem='eamassetstatemodelid'
:value="data.eamassetstatemodelname"
:pickupView="{ viewname: 'eamasset-state-model-pickup-view', title: $t('entities.eamassetstatemodel.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'eamassetstatemodels', parameterName: 'eamassetstatemodel' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.eamassetstatename.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='eamassetstatename' :itemRules="this.rules.eamassetstatename" class='' :caption="$t('entities.eamassetstatemodelline.main_form.details.eamassetstatename')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamassetstatename.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.eamassetstatename.disabled"
name='eamassetstatename'
deMajorField='eamassetstatename'
deKeyField='eamassetstate'
:service="service"
:acParams="{ serviceName: 'EAMAssetStateService', interfaceName: 'FetchDefault'}"
valueitem='eamassetstateid'
:value="data.eamassetstatename"
:pickupView="{ viewname: 'eamasset-state-pickup-view', title: $t('entities.eamassetstate.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'eamassetstates', parameterName: 'eamassetstate' }, { 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 EAMAssetStateModelLineService from '@/service/eamasset-state-model-line/eamasset-state-model-line-service';
import MainService from './main-grid-service';
import EAMAssetStateModelLineUIService from '@/uiservice/eamasset-state-model-line/eamasset-state-model-line-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 {EAMAssetStateModelLineService}
* @memberof MainGridBase
*/
public appEntityService: EAMAssetStateModelLineService = new EAMAssetStateModelLineService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainGridBase
*/
protected appDeName: string = 'eamassetstatemodelline';
/**
* 界面UI服务对象
*
* @type {EAMAssetStateModelLineUIService}
* @memberof MainBase
*/
public appUIService:EAMAssetStateModelLineUIService = new EAMAssetStateModelLineUIService(this.$store);
/**
* 界面行为模型
*
* @type {*}
* @memberof MainBase
*/
public ActionModel: any = {
};
/**
* 本地缓存标识
*
* @protected
* @type {string}
* @memberof MainBase
*/
protected localStorageTag: string = 'eamassetstatemodelline_main_grid';
/**
* 所有列成员
*
* @type {any[]}
* @memberof MainGridBase
*/
public allColumns: any[] = [
{
name: 'eamassetstatemodelname',
label: '资产状态模型',
langtag: 'entities.eamassetstatemodelline.main_grid.columns.eamassetstatemodelname',
show: true,
util: 'PX',
isEnableRowEdit: true,
},
{
name: 'eamassetstatename',
label: '资产状态',
langtag: 'entities.eamassetstatemodelline.main_grid.columns.eamassetstatename',
show: true,
util: 'PX',
isEnableRowEdit: true,
},
]
/**
* 获取表格行模型
*
* @type {*}
* @memberof MainGridBase
*/
public getGridRowModel(){
return {
eamassetstatemodelid: new FormItemModel(),
eamassetstatemodelname: new FormItemModel(),
eamassetstateid: new FormItemModel(),
eamassetstatename: new FormItemModel(),
srfkey: new FormItemModel(),
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof MainGridBase
*/
public rules: any = {
eamassetstatemodelid: [
{ 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' },
],
eamassetstatemodelname: [
{ 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' },
],
eamassetstateid: [
{ 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' },
],
eamassetstatename: [
{ 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' },
],
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 = {
'eamassetstatemodelname':true,
'eamassetstatename':true,
};
/**
* 获取对应列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: 'eamassetstatemodelid',
prop: 'eamassetstatemodelid',
dataType: 'PICKUP',
isEditable:true
},
{
name: 'eamassetstatemodelname',
prop: 'eamassetstatemodelname',
dataType: 'PICKUPTEXT',
isEditable:true
},
{
name: 'eamassetstateid',
prop: 'eamassetstateid',
dataType: 'PICKUP',
isEditable:true
},
{
name: 'eamassetstatename',
prop: 'eamassetstatename',
dataType: 'PICKUPTEXT',
isEditable:true
},
{
name: 'srfmajortext',
prop: 'eamassetstatemodellinename',
dataType: 'TEXT',
},
{
name: 'srfdataaccaction',
prop: 'eamassetstatemodellineid',
dataType: 'GUID',
},
{
name: 'srfkey',
prop: 'eamassetstatemodellineid',
dataType: 'GUID',
isEditable:true
},
{
name: 'eamassetstatemodelline',
prop: 'eamassetstatemodellineid',
},
{
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 EAMAssetStateModelLineService from '@/service/eamasset-state-model-line/eamasset-state-model-line-service';
import MainModel from './main-grid-model';
import EAMAssetStateModelService from '@/service/eamasset-state-model/eamasset-state-model-service';
import EAMAssetStateService from '@/service/eamasset-state/eamasset-state-service';
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export default class MainService extends ControlService {
/**
* 资产状态模型明细服务对象
*
* @type {EAMAssetStateModelLineService}
* @memberof MainService
*/
public appEntityService: EAMAssetStateModelLineService = new EAMAssetStateModelLineService({ $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 {EAMAssetStateModelService}
* @memberof MainService
*/
public eamassetstatemodelService: EAMAssetStateModelService = new EAMAssetStateModelService();
/**
* 资产状态服务对象
*
* @type {EAMAssetStateService}
* @memberof MainService
*/
public eamassetstateService: EAMAssetStateService = new EAMAssetStateService();
/**
* 处理数据
*
* @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;
if (Object.is(serviceName, 'EAMAssetStateModelService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.eamassetstatemodelService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'eamassetstatemodelid', 'eamassetstatemodel');
}
if (Object.is(serviceName, 'EAMAssetStateService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.eamassetstateService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'eamassetstateid', 'eamassetstate');
}
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.eamassetstatemodellineid = 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('eamassetstatemodelname')">
<el-table-column show-overflow-tooltip :prop="'eamassetstatemodelname'" :label="$t('entities.eamassetstatemodelline.main_grid.columns.eamassetstatemodelname')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamassetstatemodelline.main_grid.columns.eamassetstatemodelname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<template v-if="actualIsOpenEdit">
<app-form-item :error="gridItemsModel[$index][column.property].error">
<app-picker
:formState="viewState"
:data="row"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1"
name='eamassetstatemodelname'
deMajorField='eamassetstatemodelname'
deKeyField='eamassetstatemodel'
:service="service"
:acParams="{ serviceName: 'EAMAssetStateModelService', interfaceName: 'FetchDefault'}"
valueitem='eamassetstatemodelid'
:value="row[column.property]"
editortype=""
:pickupView="{ viewname: 'eamasset-state-model-pickup-view', title: $t('entities.eamassetstatemodel.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'eamassetstatemodels', parameterName: 'eamassetstatemodel' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
</app-picker>
</app-form-item>
</template>
<template v-if="!actualIsOpenEdit">
<app-span name='eamassetstatemodelname' editorType="PICKER" :value="row.eamassetstatemodelname" dataType="PICKUPTEXT" precision="0" ></app-span>
</template>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamassetstatename')">
<el-table-column show-overflow-tooltip :prop="'eamassetstatename'" :label="$t('entities.eamassetstatemodelline.main_grid.columns.eamassetstatename')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamassetstatemodelline.main_grid.columns.eamassetstatename')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<template v-if="actualIsOpenEdit">
<app-form-item :error="gridItemsModel[$index][column.property].error">
<app-picker
:formState="viewState"
:data="row"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="row.srfuf === 1 ? (3 & 2) !== 2 : (3 & 1) !== 1"
name='eamassetstatename'
deMajorField='eamassetstatename'
deKeyField='eamassetstate'
:service="service"
:acParams="{ serviceName: 'EAMAssetStateService', interfaceName: 'FetchDefault'}"
valueitem='eamassetstateid'
:value="row[column.property]"
editortype=""
:pickupView="{ viewname: 'eamasset-state-pickup-view', title: $t('entities.eamassetstate.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'eamassetstates', parameterName: 'eamassetstate' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
</app-picker>
</app-form-item>
</template>
<template v-if="!actualIsOpenEdit">
<app-span name='eamassetstatename' editorType="PICKER" :value="row.eamassetstatename" dataType="PICKUPTEXT" precision="0" ></app-span>
</template>
</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, SearchFormControlBase } from '@/studio-core';
import EAMAssetStateModelService from '@/service/eamasset-state-model/eamasset-state-model-service';
import DefaultService from './default-searchform-service';
import EAMAssetStateModelUIService from '@/uiservice/eamasset-state-model/eamasset-state-model-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 {EAMAssetStateModelService}
* @memberof DefaultSearchFormBase
*/
public appEntityService: EAMAssetStateModelService = new EAMAssetStateModelService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected appDeName: string = 'eamassetstatemodel';
/**
* 表单数据对象
*
* @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 EAMAssetStateModelService from '@/service/eamasset-state-model/eamasset-state-model-service';
import DefaultModel from './default-searchform-model';
/**
* Default 部件服务对象
*
* @export
* @class DefaultService
*/
export default class DefaultService extends ControlService {
/**
* 资产状态模型服务对象
*
* @type {EAMAssetStateModelService}
* @memberof DefaultService
*/
public appEntityService: EAMAssetStateModelService = new EAMAssetStateModelService({ $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 EAMAssetStateModelService from '@/service/eamasset-state-model/eamasset-state-model-service';
import MainService from './main-form-service';
import EAMAssetStateModelUIService from '@/uiservice/eamasset-state-model/eamasset-state-model-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 {EAMAssetStateModelService}
* @memberof MainEditFormBase
*/
public appEntityService: EAMAssetStateModelService = new EAMAssetStateModelService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainEditFormBase
*/
protected appDeName: string = 'eamassetstatemodel';
/**
* 界面UI服务对象
*
* @type {EAMAssetStateModelUIService}
* @memberof MainEditFormBase
*/
public appUIService:EAMAssetStateModelUIService = new EAMAssetStateModelUIService(this.$store);
/**
* 关系界面数量
*
* @protected
* @type {number}
* @memberof MainEditFormBase
*/
protected drCount: number = 1;
/**
* 表单数据对象
*
* @type {*}
* @memberof MainEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
eamassetstatemodelid: null,
eamassetstatemodelname: null,
eamassetstatemodel:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof MainEditFormBase
*/
public rules: any = {
eamassetstatemodelname: [
{ 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: true, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.eamassetstatemodel.main_form', extractMode: 'ITEM', details: [] } }),
druipart1: new FormDRUIPartModel({ caption: '', detailType: 'DRUIPART', name: 'druipart1', visible: true, isShowCaption: true, form: this, showMoreMode: 0 }),
grouppanel1: new FormGroupPanelModel({ caption: '选中的资产状态', detailType: 'GROUPPANEL', name: 'grouppanel1', visible: true, isShowCaption: true, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.eamassetstatemodel.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 }),
eamassetstatemodelid: new FormItemModel({ caption: '资产状态模型标识', detailType: 'FORMITEM', name: 'eamassetstatemodelid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamassetstatemodelname: new FormItemModel({ caption: '资产状态模型名称', detailType: 'FORMITEM', name: 'eamassetstatemodelname', 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: 'eamassetstatemodelid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'eamassetstatemodelname',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'eamassetstatemodelid',
prop: 'eamassetstatemodelid',
dataType: 'GUID',
},
{
name: 'eamassetstatemodelname',
prop: 'eamassetstatemodelname',
dataType: 'TEXT',
},
{
name: 'eamassetstatemodel',
prop: 'eamassetstatemodelid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import EAMAssetStateModelService from '@/service/eamasset-state-model/eamasset-state-model-service';
import MainModel from './main-form-model';
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export default class MainService extends ControlService {
/**
* 资产状态模型服务对象
*
* @type {EAMAssetStateModelService}
* @memberof MainService
*/
public appEntityService: EAMAssetStateModelService = new EAMAssetStateModelService({ $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();
}
/**
* 处理数据
*
* @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[]> {
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,{eamassetstatemodelid: data.eamassetstatemodelid, 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.eamassetstatemodelid = PrimaryKey;
Data.eamassetstatemodel = 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.eamassetstatemodelid = 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='eamassetstatemodel_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.eamassetstatemodel.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"/>
<row>
<i-col class="form-layout-container" v-show="detailsModel.eamassetstatemodelid.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamassetstatemodelid' :itemRules="this.rules.eamassetstatemodelid" class='' :caption="$t('entities.eamassetstatemodel.main_form.details.eamassetstatemodelid')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamassetstatemodelid.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.eamassetstatemodelid" @enter="onEnter($event)" unit="" :disabled="detailsModel.eamassetstatemodelid.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.eamassetstatemodelname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamassetstatemodelname' :itemRules="this.rules.eamassetstatemodelname" class='' :caption="$t('entities.eamassetstatemodel.main_form.details.eamassetstatemodelname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamassetstatemodelname.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.eamassetstatemodelname" @enter="onEnter($event)" unit="" :disabled="detailsModel.eamassetstatemodelname.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
<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.eamassetstatemodel.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"/>
<row>
<i-col class="form-layout-container" v-show="detailsModel.druipart1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-druipart
:formState="formState"
:isForbidLoad="this.data.srfuf === '0'"
paramItem='eamassetstatemodel'
:parentdata='{"srfparentdefname":"EAMASSETSTATEMODELID","srfparentdename":"EAMASSETSTATEMODEL","SRFPARENTTYPE":"DER1N","srfparentmode":"DER1N_EAMASSETSTATEMODELLINE_EAMASSETSTATEMODEL_EAMASSETSTATEMODELID","SRFDER1NID":"DER1N_EAMASSETSTATEMODELLINE_EAMASSETSTATEMODEL_EAMASSETSTATEMODELID"}'
:parameters="[
]"
:context="context"
:viewparams="viewparams"
:localContext ='{}'
:localParam ='{}'
parameterName='eamassetstatemodel'
parentName="EAMAssetStateModel"
refviewtype='DEGRIDVIEW'
refreshitems=''
:ignorefieldvaluechange="ignorefieldvaluechange"
viewname='eamasset-state-model-line-grid-view'
:data="JSON.stringify(this.data)"
@drdatasaved="drdatasaved($event)"
style="overflow: auto;">
</app-form-druipart>
</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 EAMAssetStateModelService from '@/service/eamasset-state-model/eamasset-state-model-service';
import MainService from './main-grid-service';
import EAMAssetStateModelUIService from '@/uiservice/eamasset-state-model/eamasset-state-model-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 {EAMAssetStateModelService}
* @memberof MainGridBase
*/
public appEntityService: EAMAssetStateModelService = new EAMAssetStateModelService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainGridBase
*/
protected appDeName: string = 'eamassetstatemodel';
/**
* 界面UI服务对象
*
* @type {EAMAssetStateModelUIService}
* @memberof MainBase
*/
public appUIService:EAMAssetStateModelUIService = new EAMAssetStateModelUIService(this.$store);
/**
* 界面行为模型
*
* @type {*}
* @memberof MainBase
*/
public ActionModel: any = {
};
/**
* 本地缓存标识
*
* @protected
* @type {string}
* @memberof MainBase
*/
protected localStorageTag: string = 'eamassetstatemodel_main_grid';
/**
* 所有列成员
*
* @type {any[]}
* @memberof MainGridBase
*/
public allColumns: any[] = [
{
name: 'eamassetstatemodelid',
label: '资产状态模型标识',
langtag: 'entities.eamassetstatemodel.main_grid.columns.eamassetstatemodelid',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamassetstatemodelname',
label: '资产状态模型名称',
langtag: 'entities.eamassetstatemodel.main_grid.columns.eamassetstatemodelname',
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 = {
'eamassetstatemodelid':false,
'eamassetstatemodelname':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: 'eamassetstatemodelid',
prop: 'eamassetstatemodelid',
dataType: 'GUID',
},
{
name: 'eamassetstatemodelname',
prop: 'eamassetstatemodelname',
dataType: 'TEXT',
},
{
name: 'srfmajortext',
prop: 'eamassetstatemodelname',
dataType: 'TEXT',
},
{
name: 'srfdataaccaction',
prop: 'eamassetstatemodelid',
dataType: 'GUID',
},
{
name: 'srfkey',
prop: 'eamassetstatemodelid',
dataType: 'GUID',
isEditable:true
},
{
name: 'eamassetstatemodel',
prop: 'eamassetstatemodelid',
},
{
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 EAMAssetStateModelService from '@/service/eamasset-state-model/eamasset-state-model-service';
import MainModel from './main-grid-model';
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export default class MainService extends ControlService {
/**
* 资产状态模型服务对象
*
* @type {EAMAssetStateModelService}
* @memberof MainService
*/
public appEntityService: EAMAssetStateModelService = new EAMAssetStateModelService({ $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.eamassetstatemodelid = 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('eamassetstatemodelid')">
<el-table-column show-overflow-tooltip :prop="'eamassetstatemodelid'" :label="$t('entities.eamassetstatemodel.main_grid.columns.eamassetstatemodelid')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamassetstatemodel.main_grid.columns.eamassetstatemodelid')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamassetstatemodelid}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamassetstatemodelname')">
<el-table-column show-overflow-tooltip :prop="'eamassetstatemodelname'" :label="$t('entities.eamassetstatemodel.main_grid.columns.eamassetstatemodelname')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamassetstatemodel.main_grid.columns.eamassetstatemodelname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamassetstatemodelname}}</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 EAMAssetStateModelService from '@/service/eamasset-state-model/eamasset-state-model-service';
import PickupViewpickupviewpanelService from './pickup-viewpickupviewpanel-pickupviewpanel-service';
import EAMAssetStateModelUIService from '@/uiservice/eamasset-state-model/eamasset-state-model-ui-service';
import PickupViewpickupviewpanelModel from './pickup-viewpickupviewpanel-pickupviewpanel-model';
/**
* pickupviewpanel部件基类
*
* @export
* @class MainControlBase
* @extends {PickupViewpickupviewpanelPickupviewpanelBase}
*/
export class PickupViewpickupviewpanelPickupviewpanelBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
protected controlType: string = 'PICKUPVIEWPANEL';
/**
* 建构部件服务对象
*
* @type {PickupViewpickupviewpanelService}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
public service: PickupViewpickupviewpanelService = new PickupViewpickupviewpanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMAssetStateModelService}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
public appEntityService: EAMAssetStateModelService = new EAMAssetStateModelService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
protected appDeName: string = 'eamassetstatemodel';
/**
* 选中数据字符串
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
@Prop() public selectedData?: string;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof PickupViewpickupviewpanel
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof PickupViewpickupviewpanel
*/
public getData(): any {
return {};
}
/**
* 视图名称
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public view: any = {
viewname: 'eamasset-state-model-pickup-grid-view',
data: {},
}
/**
* 局部上下文
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public localViewParam: any = null;
/**
* 视图数据
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
@Prop({default: true}) public isShowButton!: boolean;
/**
* 是否单选
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
@Prop() public isSingleSelect?: boolean;
/**
* 初始化完成
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
public inited: boolean = false;
/**
* 视图数据变化
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public onViewDatasChange($event: any): void {
if($event.length>0){
$event.forEach((item:any,index:any) => {
let srfmajortext = item['eamassetstatemodelname'];
if(srfmajortext){
Object.assign($event[index],{srfmajortext: srfmajortext});
}
});
}
this.$emit('selectionchange', $event);
}
/**
* 视图数据被激活
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public viewDatasActivated($event: any): void {
this.$emit('activated', $event);
}
/**
* 视图加载完成
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public onViewLoad($event: any): void {
this.$emit('load', $event);
}
/**
* vue 生命周期
*
* @memberof PickupViewpickupviewpanel
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof PickupViewpickupviewpanel
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('load', action)) {
this.viewdata = JSON.stringify(this.context);
this.viewparam = JSON.stringify(Object.assign(data, this.viewparams));
this.inited = true;
}
});
}
}
/**
* 初始化导航参数
*
* @memberof PickupViewpickupviewpanel
*/
public initNavParam(){
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);
}
/**
* vue 生命周期
*
* @memberof PickupViewpickupviewpanel
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof PickupViewpickupviewpanel
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* PickupViewpickupviewpanel 部件模型
*
* @export
* @class PickupViewpickupviewpanelModel
*/
export default class PickupViewpickupviewpanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof PickupViewpickupviewpanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'eamassetstatemodel',
prop: 'eamassetstatemodelid',
},
{
name: 'createman',
},
{
name: 'createdate',
},
{
name: 'eamassetstatemodelname',
},
{
name: 'updatedate',
},
{
name: 'updateman',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* PickupViewpickupviewpanel 部件服务对象
*
* @export
* @class PickupViewpickupviewpanelService
*/
export default class PickupViewpickupviewpanelService extends ControlService {
}
\ No newline at end of file
<div class='pickupviewpanel'>
<component
v-if="inited && view.viewname && !Object.is(view.viewname, '')"
:is="view.viewname"
class="viewcontainer3"
:viewdata="viewdata"
:viewparam="viewparam"
:viewDefaultUsage="false"
:isSingleSelect="isSingleSelect"
:selectedData="selectedData"
:isShowButton="isShowButton"
@viewdataschange="onViewDatasChange.apply(_self, arguments)"
@viewdatasactivated="viewDatasActivated.apply(_self, arguments)"
@viewload="onViewLoad.apply(_self, arguments)">
</component>
</div>
\ No newline at end of file
<template src="./pickup-viewpickupviewpanel-pickupviewpanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { PickupViewpickupviewpanelPickupviewpanelBase } from './pickup-viewpickupviewpanel-pickupviewpanel-base';
/**
* pickupviewpanel部件
*
* @export
* @class PickupViewpickupviewpanelPickupviewpanel
* @extends {PickupViewpickupviewpanelPickupviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class PickupViewpickupviewpanelPickupviewpanel extends PickupViewpickupviewpanelPickupviewpanelBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import EAMAssetStateService from '@/service/eamasset-state/eamasset-state-service';
import PickupViewpickupviewpanelService from './pickup-viewpickupviewpanel-pickupviewpanel-service';
import EAMAssetStateUIService from '@/uiservice/eamasset-state/eamasset-state-ui-service';
import PickupViewpickupviewpanelModel from './pickup-viewpickupviewpanel-pickupviewpanel-model';
/**
* pickupviewpanel部件基类
*
* @export
* @class MainControlBase
* @extends {PickupViewpickupviewpanelPickupviewpanelBase}
*/
export class PickupViewpickupviewpanelPickupviewpanelBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
protected controlType: string = 'PICKUPVIEWPANEL';
/**
* 建构部件服务对象
*
* @type {PickupViewpickupviewpanelService}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
public service: PickupViewpickupviewpanelService = new PickupViewpickupviewpanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMAssetStateService}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
public appEntityService: EAMAssetStateService = new EAMAssetStateService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
protected appDeName: string = 'eamassetstate';
/**
* 选中数据字符串
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
@Prop() public selectedData?: string;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof PickupViewpickupviewpanel
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof PickupViewpickupviewpanel
*/
public getData(): any {
return {};
}
/**
* 视图名称
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public view: any = {
viewname: 'eamasset-state-pickup-grid-view',
data: {},
}
/**
* 局部上下文
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public localViewParam: any = null;
/**
* 视图数据
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
@Prop({default: true}) public isShowButton!: boolean;
/**
* 是否单选
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
@Prop() public isSingleSelect?: boolean;
/**
* 初始化完成
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
public inited: boolean = false;
/**
* 视图数据变化
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public onViewDatasChange($event: any): void {
if($event.length>0){
$event.forEach((item:any,index:any) => {
let srfmajortext = item['eamassetstatename'];
if(srfmajortext){
Object.assign($event[index],{srfmajortext: srfmajortext});
}
});
}
this.$emit('selectionchange', $event);
}
/**
* 视图数据被激活
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public viewDatasActivated($event: any): void {
this.$emit('activated', $event);
}
/**
* 视图加载完成
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public onViewLoad($event: any): void {
this.$emit('load', $event);
}
/**
* vue 生命周期
*
* @memberof PickupViewpickupviewpanel
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof PickupViewpickupviewpanel
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('load', action)) {
this.viewdata = JSON.stringify(this.context);
this.viewparam = JSON.stringify(Object.assign(data, this.viewparams));
this.inited = true;
}
});
}
}
/**
* 初始化导航参数
*
* @memberof PickupViewpickupviewpanel
*/
public initNavParam(){
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);
}
/**
* vue 生命周期
*
* @memberof PickupViewpickupviewpanel
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof PickupViewpickupviewpanel
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* PickupViewpickupviewpanel 部件模型
*
* @export
* @class PickupViewpickupviewpanelModel
*/
export default class PickupViewpickupviewpanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof PickupViewpickupviewpanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'createdate',
},
{
name: 'updateman',
},
{
name: 'createman',
},
{
name: 'eamassetstate',
prop: 'eamassetstateid',
},
{
name: 'updatedate',
},
{
name: 'eamassetstatename',
},
{
name: 'available',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* PickupViewpickupviewpanel 部件服务对象
*
* @export
* @class PickupViewpickupviewpanelService
*/
export default class PickupViewpickupviewpanelService extends ControlService {
}
\ No newline at end of file
<div class='pickupviewpanel'>
<component
v-if="inited && view.viewname && !Object.is(view.viewname, '')"
:is="view.viewname"
class="viewcontainer3"
:viewdata="viewdata"
:viewparam="viewparam"
:viewDefaultUsage="false"
:isSingleSelect="isSingleSelect"
:selectedData="selectedData"
:isShowButton="isShowButton"
@viewdataschange="onViewDatasChange.apply(_self, arguments)"
@viewdatasactivated="viewDatasActivated.apply(_self, arguments)"
@viewload="onViewLoad.apply(_self, arguments)">
</component>
</div>
\ No newline at end of file
<template src="./pickup-viewpickupviewpanel-pickupviewpanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { PickupViewpickupviewpanelPickupviewpanelBase } from './pickup-viewpickupviewpanel-pickupviewpanel-base';
/**
* pickupviewpanel部件
*
* @export
* @class PickupViewpickupviewpanelPickupviewpanel
* @extends {PickupViewpickupviewpanelPickupviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class PickupViewpickupviewpanelPickupviewpanel extends PickupViewpickupviewpanelPickupviewpanelBase { }
</script>
......@@ -74,10 +74,11 @@ export class Info_MainEditFormBase extends EditFormControlBase {
srfuf: null,
srfdeid: null,
srfsourcekey: null,
eamlocationid: null,
locationnumber: null,
eamlocationname: null,
eamlocationtypename: null,
peamlocationname: null,
eamlocationid: null,
eamlocation:null,
};
......@@ -117,7 +118,7 @@ export class Info_MainEditFormBase extends EditFormControlBase {
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 }),
locationnumber: new FormItemModel({ caption: '功能位置编号', detailType: 'FORMITEM', name: 'locationnumber', 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 }),
......@@ -125,5 +126,7 @@ export class Info_MainEditFormBase extends EditFormControlBase {
peamlocationname: new FormItemModel({ caption: '上级位置', detailType: 'FORMITEM', name: 'peamlocationname', 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 }),
};
}
\ No newline at end of file
......@@ -56,9 +56,9 @@ export default class Info_MainModel {
name: 'srfsourcekey',
},
{
name: 'eamlocationid',
prop: 'eamlocationid',
dataType: 'GUID',
name: 'locationnumber',
prop: 'locationnumber',
dataType: 'TEXT',
},
{
name: 'eamlocationname',
......@@ -75,6 +75,11 @@ export default class Info_MainModel {
prop: 'peamlocationname',
dataType: 'PICKUPTEXT',
},
{
name: 'eamlocationid',
prop: 'eamlocationid',
dataType: 'GUID',
},
{
name: 'eamlocation',
prop: 'eamlocationid',
......
......@@ -162,7 +162,6 @@ export default class Info_MainService extends ControlService {
@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;
......
......@@ -6,10 +6,10 @@
<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">
<i-col class="form-layout-container" v-show="detailsModel.locationnumber.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='locationnumber' :itemRules="this.rules.locationnumber" class='' :caption="$t('entities.eamlocation.info_main_form.details.locationnumber')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.locationnumber.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='eamlocationid' :value="data.eamlocationid" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
<app-span name='locationnumber' :value="data.locationnumber" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
......
......@@ -51,6 +51,9 @@ export default class InfoViewtabexppanelModel {
{
name: 'eamlocationstatename',
},
{
name: 'locationnumber',
},
]
}
......
......@@ -51,6 +51,9 @@ export default class InfoViewtabviewpanelModel {
{
name: 'eamlocationstatename',
},
{
name: 'locationnumber',
},
]
}
......
......@@ -51,6 +51,9 @@ export default class InfoViewtabviewpanel2Model {
{
name: 'eamlocationstatename',
},
{
name: 'locationnumber',
},
]
}
......
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 LocationTreeService from './location-tree-treeview-service';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
/**
* treeexpbar_tree部件基类
*
* @export
* @class MainControlBase
* @extends {LocationTreeTreeBase}
*/
export class LocationTreeTreeBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof LocationTreeTreeBase
*/
protected controlType: string = 'TREEVIEW';
/**
* 建构部件服务对象
*
* @type {LocationTreeService}
* @memberof LocationTreeTreeBase
*/
public service: LocationTreeService = new LocationTreeService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof LocationTreeTreeBase
*/
public appEntityService: EAMLocationService = new EAMLocationService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof LocationTreeTreeBase
*/
protected appDeName: string = 'eamlocation';
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof LocationTreeBase
*/
public getDatas(): any[] {
return [this.currentselectedNode];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof LocationTreeBase
*/
public getData(): any {
return this.currentselectedNode;
}
/**
* 是否单选
*
* @type {boolean}
* @memberof LocationTreeBase
*/
@Prop({ default: true }) public isSingleSelect!: boolean;
/**
* 是否默认选中第一条数据
*
* @type {boolean}
* @memberof LocationTreeBase
*/
@Prop({ default: false }) public isSelectFirstDefault!: boolean;
/**
* 枝干节点是否可用(具有数据能力,可抛出)
*
* @type {string}
* @memberof LocationTreeBase
*/
@Prop({default:true}) public isBranchAvailable!: boolean;
/**
* 显示处理提示
*
* @type {boolean}
* @memberof LocationTreeBase
*/
@Prop({ default: true }) public showBusyIndicator?: boolean;
/**
* 初始化完成
*
* @type {boolean}
* @memberof LocationTreeBase
*/
public inited: boolean = false;
/**
* 已选中数据集合
*
* @type {*}
* @memberof LocationTreeBase
*/
public selectedNodes: any = [];
/**
* 当前选中数据项
*
* @type {*}
* @memberof LocationTreeBase
*/
public currentselectedNode: any = {};
/**
* 选中数据字符串
*
* @type {string}
* @memberof LocationTreeBase
*/
@Prop() public selectedData?: string;
/**
* 选中值变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof LocationTreeBase
*/
@Watch('selectedData')
public onValueChange(newVal: any, oldVal: any) {
this.echoselectedNodes = newVal ? this.isSingleSelect ? JSON.parse(newVal)[0] : JSON.parse(newVal) : [];
this.selectedNodes = [];
if(this.echoselectedNodes.length > 0){
let AllnodesObj = (this.$refs.treeexpbar_tree as any).store.nodesMap;
let AllnodesArray : any[] = [];
for (const key in AllnodesObj) {
if (AllnodesObj.hasOwnProperty(key)) {
AllnodesArray.push(AllnodesObj[key].data);
}
}
this.setDefaultSelection(AllnodesArray);
}
}
/**
* 回显选中数据集合
*
* @type {*}
* @memberof LocationTreeBase
*/
public echoselectedNodes:any[] = this.selectedData ? ( this.isSingleSelect ? [JSON.parse(this.selectedData)[0]] : JSON.parse(this.selectedData)) : [];
/**
* 部件行为--update
*
* @type {string}
* @memberof LocationTreeBase
*/
@Prop() public updateAction!: string;
/**
* 部件行为--fetch
*
* @type {string}
* @memberof LocationTreeBase
*/
@Prop() public fetchAction!: string;
/**
* 部件行为--remove
*
* @type {string}
* @memberof LocationTreeBase
*/
@Prop() public removeAction!: string;
/**
* 部件行为--load
*
* @type {string}
* @memberof LocationTreeBase
*/
@Prop() public loadAction!: string;
/**
* 部件行为--create
*
* @type {string}
* @memberof LocationTreeBase
*/
@Prop() public createAction!: string;
/**
* 过滤属性
*
* @type {string}
* @memberof LocationTreeBase
*/
public srfnodefilter: string = '';
/**
* 默认输出图标
*
* @type {boolean}
* @memberof LocationTreeBase
*/
public isOutputIconDefault: boolean = false;
/**
* 数据展开主键
*
* @type {string[]}
* @memberof LocationTreeBase
*/
@Provide()
public expandedKeys: string[] = [];
/**
* 选中数据变更事件
*
* @public
* @param {*} data
* @param {*} data 当前节点对应传入对象
* @param {*} checkedState 树目前选中状态对象
* @memberof LocationTreeBase
*/
public onCheck(data: any, checkedState: any) {
// 处理多选数据
if(!this.isSingleSelect){
let leafNodes = checkedState.checkedNodes.filter((item:any) => item.leaf);
this.selectedNodes = JSON.parse(JSON.stringify(leafNodes));
this.$emit('selectionchange', this.selectedNodes);
}
}
/**
* 选中数据变更事件
*
* @public
* @param {*} data 节点对应传入对象
* @param {*} node 节点对应node对象
* @memberof LocationTreeBase
*/
public selectionChange(data: any, node: any) {
// 禁用项处理
if (data.disabled){
node.isCurrent = false;
return;
}
// 只处理最底层子节点
if(this.isBranchAvailable || data.leaf){
this.currentselectedNode = JSON.parse(JSON.stringify(data));
// 单选直接替换
if(this.isSingleSelect){
this.selectedNodes = [this.currentselectedNode];
this.$emit('selectionchange', this.selectedNodes);
}
// 多选用check方法
}
}
/**
* Vue声明周期(处理组件的输入属性)
*
* @memberof LocationTreeBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof LocationTreeBase
*/
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.inited = false;
this.$nextTick(() => {
this.inited = true;
});
}
if (Object.is('filter', action)) {
this.srfnodefilter = data.srfnodefilter;
this.refresh_all();
}
if (Object.is('refresh_parent', action)) {
this.refresh_parent();
}
});
}
}
/**
* 对树节点进行筛选操作
* @memberof OrderTree
*/
public filterNode(value:any, data:any) {
if (!value) return true;
return data.text.indexOf(value) !== -1;
}
/**
* vue 生命周期
*
* @memberof LocationTreeBase
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof LocationTreeBase
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
/**
* 刷新数据
*
* @memberof LocationTreeBase
*/
public refresh_all(): void {
this.inited = false;
this.$nextTick(() => {
this.inited = true;
});
}
/**
* 刷新父节点
*
* @memberof LocationTreeBase
*/
public refresh_parent(): void {
if (Object.keys(this.currentselectedNode).length === 0) {
return;
}
const tree: any = this.$refs.treeexpbar_tree;
const node: any = tree.getNode(this.currentselectedNode.id);
if (!node || !node.parent) {
return;
}
let curNode:any = {};
const { parent: _parent } = node;
curNode = this.$util.deepObjectMerge(curNode,_parent);
let tempContext:any = {};
if(curNode.data && curNode.data.srfappctx){
Object.assign(tempContext,curNode.data.srfappctx);
}else{
Object.assign(tempContext,this.context);
}
const id: string = _parent.key ? _parent.key : '#';
const param: any = { srfnodeid: id };
this.refresh_node(tempContext,param, true);
}
/**
* 数据加载
*
* @param {*} node
* @memberof LocationTreeBase
*/
public load(node: any = {}, resolve?: any) {
if (node.data && node.data.children) {
resolve(node.data.children);
return;
}
const params: any = {
srfnodeid: node.data && node.data.id ? node.data.id : "#",
srfnodefilter: this.srfnodefilter
};
let tempViewParams:any = JSON.parse(JSON.stringify(this.viewparams));
let curNode:any = {};
curNode = this.$util.deepObjectMerge(curNode,node);
let tempContext:any = this.computecurNodeContext(curNode);
if(curNode.data && curNode.data.srfparentdename){
Object.assign(tempContext,{srfparentdename:curNode.data.srfparentdename});
Object.assign(tempViewParams,{srfparentdename:curNode.data.srfparentdename});
}
if(curNode.data && curNode.data.srfparentkey){
Object.assign(tempContext,{srfparentkey:curNode.data.srfparentkey});
Object.assign(tempViewParams,{srfparentkey:curNode.data.srfparentkey});
}
Object.assign(params,{viewparams:tempViewParams});
this.service.getNodes(tempContext,params).then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
resolve([]);
return;
}
const _items = response.data;
this.formatExpanded(_items);
resolve([..._items]);
let isRoot = Object.is(node.level,0);
let isSelectedAll = node.checked;
this.setDefaultSelection(_items, isRoot, isSelectedAll);
this.$emit("load", _items);
}).catch((response: any) => {
resolve([]);
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
});
}
/**
* 计算当前节点的上下文
*
* @param {*} curNode 当前节点
* @memberof LocationTreeBase
*/
public computecurNodeContext(curNode:any){
let tempContext:any = {};
if(curNode && curNode.data && curNode.data.srfappctx){
tempContext = JSON.parse(JSON.stringify(curNode.data.srfappctx));
}else{
tempContext = JSON.parse(JSON.stringify(this.context));
}
return tempContext;
}
/**
* 刷新功能
*
* @param {any[]} args
* @memberof LocationTreeBase
*/
public refresh(args: any[]): void {
this.refresh_all();
}
/**
* 刷新节点
*
* @public
* @param {*} [curContext] 当前节点上下文
* @param {*} [arg={}] 当前节点附加参数
* @param {boolean} parentnode 是否是刷新父节点
* @memberof LocationTreeBase
*/
public refresh_node(curContext:any,arg: any = {}, parentnode: boolean): void {
const { srfnodeid: id } = arg;
Object.assign(arg,{viewparams:this.viewparams});
const get: Promise<any> = this.service.getNodes(JSON.parse(JSON.stringify(this.context)),arg);
get.then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
return;
}
const _items = [...response.data];
this.formatExpanded(_items);
const tree: any = this.$refs.treeexpbar_tree;
tree.updateKeyChildren(id, _items);
if (parentnode) {
this.currentselectedNode = {};
}
this.setDefaultSelection(_items);
}).catch((response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
});
}
/**
* 默认展开节点
*
* @public
* @param {any[]} items
* @returns {any[]}
* @memberof LocationTreeBase
*/
public formatExpanded(items: any[]): any[] {
const data: any[] = [];
items.forEach((item) => {
if (item.expanded || (item.children && item.children.length > 0)) {
this.expandedKeys.push(item.id);
}
});
return data;
}
/**
* 设置默认选中,回显数项,选中所有子节点
*
* @param {any[]} items 当前节点所有子节点集合
* @param {boolean} isRoot 是否是加载根节点
* @param {boolean} isSelectedAll 是否选中所有子节点
* @memberof LocationTreeBase
*/
public setDefaultSelection(items: any[], isRoot: boolean = false, isSelectedAll: boolean = false): void {
if(items.length == 0){
return;
}
let defaultData: any;
// 导航中选中第一条配置的默认选中,没有选中第一条
if(this.isSelectFirstDefault){
if(this.isSingleSelect){
let index = items.findIndex((item: any) => item.selected);
if(index === -1) {
if(isRoot){
index = 0;
}else{
return;
}
}
defaultData = items[index];
this.setTreeNodeHighLight(defaultData);
this.currentselectedNode = JSON.parse(JSON.stringify(defaultData));
if(this.isBranchAvailable || defaultData.leaf){
this.selectedNodes = [this.currentselectedNode];
this.$emit('selectionchange', this.selectedNodes);
}
}
}
// 已选数据的回显
if(this.echoselectedNodes && this.echoselectedNodes.length > 0){
let checkedNodes = items.filter((item:any)=>{
return this.echoselectedNodes.some((val:any)=> {
if(Object.is(item.srfkey,val.srfkey) && Object.is(item.srfmajortext,val.srfmajortext)){
val.used = true;
return true;
}
});
});
if(checkedNodes.length > 0){
this.echoselectedNodes = this.echoselectedNodes.filter((item:any)=> !item.used);
// 父节点选中时,不需要执行这段,会选中所有子节点
if(!isSelectedAll){
if(this.isSingleSelect){
this.setTreeNodeHighLight(checkedNodes[0]);
this.currentselectedNode = JSON.parse(JSON.stringify(checkedNodes[0]));
this.selectedNodes = [this.currentselectedNode];
}else{
this.selectedNodes = this.selectedNodes.concat(checkedNodes);
const tree: any = this.$refs.treeexpbar_tree;
tree.setCheckedNodes(this.selectedNodes);
}
}
}
}
// 父节点选中时,选中所有子节点
if(isSelectedAll){
let leafNodes = items.filter((item:any) => item.leaf);
this.selectedNodes = this.selectedNodes.concat(leafNodes);
this.$emit('selectionchange', this.selectedNodes);
}
}
/**
* 绘制右击菜单
*
* @param {*} node
* @returns
* @memberof LocationTreeBase
*/
public renderContextMenu(node: any) {
let content;
if (node && node.data) {
const data: any = JSON.parse(JSON.stringify(node.data));
this.currentselectedNode = { ...data };
const tags: string[] = data.id.split(';');
}
return content;
}
/**
* 设置选中高亮
*
* @param {*} data
* @memberof LocationTreeBase
*/
public setTreeNodeHighLight(data: any): void {
const tree: any = this.$refs.treeexpbar_tree;
tree.setCurrentKey(data.id);
}
/**
* 执行默认界面行为
*
* @param {*} node
* @memberof LocationTreeBase
*/
public doDefaultAction(node: any) {
if (node && node.data) {
const data: any = node.data;
const tags: string[] = data.id.split(';');
}
this.$emit('nodedblclick', this.selectedNodes);
}
}
\ No newline at end of file
/**
* LocationTree 部件模型
*
* @export
* @class LocationTreeModel
*/
export default class LocationTreeModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof LocationTreeModel
*/
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',
},
{
name: 'locationnumber',
},
]
}
}
\ 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 LocationTreeModel from './location-tree-treeview-model';
import CodeListService from '@service/app/codelist-service';
import i18n from '@/locale';
/**
* LocationTree 部件服务对象
*
* @export
* @class LocationTreeService
*/
export default class LocationTreeService extends ControlService {
/**
* 功能位置服务对象
*
* @type {EAMLocationService}
* @memberof LocationTreeService
*/
public appEntityService: EAMLocationService = new EAMLocationService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof LocationTreeService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of LocationTreeService.
*
* @param {*} [opts={}]
* @memberof LocationTreeService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new LocationTreeModel();
}
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof LocationTreeService
*/
public codeListService:CodeListService = new CodeListService({ $store: this.getStore() });
/**
* 节点分隔符号
*
* @public
* @type {string}
* @memberof LocationTreeService
*/
public TREENODE_SEPARATOR: string = ';';
/**
* 顶级位置节点分隔符号
*
* @public
* @type {string}
* @memberof LocationTreeService
*/
public TREENODE_TOP: string = 'Top';
/**
* 默认根节点节点分隔符号
*
* @public
* @type {string}
* @memberof LocationTreeService
*/
public TREENODE_ROOT: string = 'ROOT';
/**
* 全部位置节点分隔符号
*
* @public
* @type {string}
* @memberof LocationTreeService
*/
public TREENODE_ALL: string = 'All';
/**
* 子位置节点分隔符号
*
* @public
* @type {string}
* @memberof LocationTreeService
*/
public TREENODE_CHILD: string = 'Child';
/**
* 获取节点数据
*
* @param {string} action
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof LocationTreeService
*/
@Errorlog
public async getNodes(context:any = {},data: any = {}, isloading?: boolean): Promise<any> {
let { srfparentkey, srfcat, srfnodeid, srfnodefilter, query }: { srfparentkey: string, srfcat: string, srfnodeid: string, srfnodefilter: string, query:string } = data;
srfnodefilter = query ? query : srfnodefilter;
let list: any[] = [];
let filter: any = {};
if (!srfnodeid || Object.is(srfnodeid, '#')) {
srfnodeid = this.TREENODE_ROOT;
}
let strTreeNodeId: string = srfnodeid;
let strRealNodeId: string = '';
let bRootSelect: boolean = false;
let strNodeType: string | null = null;
let strRootSelectNode: string = '';
if (Object.is(strTreeNodeId, this.TREENODE_ROOT)) {
strNodeType = this.TREENODE_ROOT;
if (srfparentkey) {
strRealNodeId = srfparentkey;
}
} else {
let nPos = strTreeNodeId.indexOf(this.TREENODE_SEPARATOR);
if (nPos === -1) {
return Promise.reject({ status: 500, data: { title: '失败', message: `树节点${strTreeNodeId}标识无效` } });
}
strNodeType = strTreeNodeId.substring(0, nPos);
strRealNodeId = strTreeNodeId.substring(nPos + 1);
}
Object.assign(filter,
{
srfparentkey: srfparentkey,
srfcat: srfcat,
srfnodefilter: srfnodefilter,
strRealNodeId: strRealNodeId,
srfnodeid: srfnodeid,
strNodeType: strNodeType,
viewparams: JSON.parse(JSON.stringify(data)).viewparams
}
);
// 分解节点标识
let nodeid: string[] = strRealNodeId.split(this.TREENODE_SEPARATOR);
for (let i = 0; i < nodeid.length; i++) {
switch (i) {
case 0:
Object.assign(filter, { nodeid: nodeid[0] });
break;
case 1:
Object.assign(filter, { nodeid2: nodeid[1] });
break;
case 2:
Object.assign(filter, { nodeid3: nodeid[2] });
break;
case 3:
Object.assign(filter, { nodeid4: nodeid[3] });
break;
default:
break;
}
}
if (Object.is(strNodeType, this.TREENODE_TOP)) {
await this.fillTopNodeChilds(context,filter, list);
return Promise.resolve({ status: 200, data: list });
}
if (Object.is(strNodeType, this.TREENODE_ROOT)) {
await this.fillRootNodeChilds(context,filter, list);
return Promise.resolve({ status: 200, data: list });
}
if (Object.is(strNodeType, this.TREENODE_ALL)) {
await this.fillAllNodeChilds(context,filter, list);
return Promise.resolve({ status: 200, data: list });
}
if (Object.is(strNodeType, this.TREENODE_CHILD)) {
await this.fillChildNodeChilds(context,filter, list);
return Promise.resolve({ status: 200, data: list });
}
return Promise.resolve({ status: 500, data: { title: '失败', message: `树节点${strTreeNodeId}标识无效` } });
}
/**
* 填充 树视图节点[顶级位置]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof LocationTreeService
*/
@Errorlog
public fillTopNodes(context:any={},filter: any, list: any[],rsNavContext?:any,rsNavParams?:any,rsParams?:any): Promise<any> {
context = this.handleResNavContext(context,filter,rsNavContext);
filter = this.handleResNavParams(context,filter,rsNavParams,rsParams);
return new Promise((resolve:any,reject:any) =>{
let searchFilter: any = {};
Object.assign(searchFilter, { total: false });
let bFirst: boolean = true;
let records: any[] = [];
try {
this.searchTop(context, searchFilter, filter).then((records:any) =>{
if(records && records.length >0){
records.forEach((entity: any) => {
let treeNode: any = {};
// 整理context
let strId: string = entity.eamlocationid;
let strText: string = entity.eamlocationname;
Object.assign(treeNode,{srfparentdename:'EAMLocation',srfparentkey:entity.eamlocationid});
let tempContext:any = JSON.parse(JSON.stringify(context));
Object.assign(tempContext,{srfparentdename:'EAMLocation',srfparentkey:entity.eamlocationid,eamlocation:strId})
Object.assign(treeNode,{srfappctx:tempContext});
Object.assign(treeNode,{'eamlocation':strId});
Object.assign(treeNode, { srfkey: strId });
Object.assign(treeNode, { text: strText, srfmajortext: strText });
let strNodeId: string = 'Top';
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += strId;
Object.assign(treeNode, { id: strNodeId });
Object.assign(treeNode, { expanded: true });
Object.assign(treeNode, { leaf: false });
Object.assign(treeNode, { navfilter: "eamlocationid" });
Object.assign(treeNode, { curData: entity });
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
list.push(treeNode);
resolve(list);
bFirst = false;
});
}else{
resolve(list);
}
});
} catch (error) {
console.error(error);
}
});
}
/**
* 获取查询集合
*
* @public
* @param {any{}} context
* @param {*} searchFilter
* @param {*} filter
* @returns {any[]}
* @memberof TestEnetityDatasService
*/
@Errorlog
public searchTop(context:any={}, searchFilter: any, filter: any): Promise<any> {
return new Promise((resolve:any,reject:any) =>{
if(filter.viewparams){
Object.assign(searchFilter,filter.viewparams);
}
if(!searchFilter.page){
Object.assign(searchFilter,{page:0});
}
if(!searchFilter.size){
Object.assign(searchFilter,{size:1000});
}
if(context && context.srfparentdename){
Object.assign(searchFilter,{srfparentdename:JSON.parse(JSON.stringify(context)).srfparentdename});
}
if(context && context.srfparentkey){
Object.assign(searchFilter,{srfparentkey:JSON.parse(JSON.stringify(context)).srfparentkey});
}
Object.assign(searchFilter,{sort: 'locationnumber,asc'})
const _appEntityService: any = this.appEntityService;
let list: any[] = [];
if (_appEntityService['FetchTop'] && _appEntityService['FetchTop'] instanceof Function) {
const response: Promise<any> = _appEntityService['FetchTop'](context, searchFilter, false);
response.then((response: any) => {
if (!response.status || response.status !== 200) {
resolve([]);
console.log(JSON.stringify(context));
console.error('查询FetchTop数据集异常!');
}
const data: any = response.data;
if (Object.keys(data).length > 0) {
list = JSON.parse(JSON.stringify(data));
resolve(list);
} else {
resolve([]);
}
}).catch((response: any) => {
resolve([]);
console.log(JSON.stringify(context));
console.error('查询FetchTop数据集异常!');
});
}
})
}
/**
* 填充 树视图节点[顶级位置]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof LocationTreeService
*/
@Errorlog
public async fillTopNodeChilds(context:any={}, filter: any, list: any[]): Promise<any> {
if (filter.srfnodefilter && !Object.is(filter.srfnodefilter,"")) {
// 填充子位置
let ChildRsNavContext:any = {};
let ChildRsNavParams:any = {};
let ChildRsParams:any = {};
await this.fillChildNodes(context, filter, list ,ChildRsNavContext,ChildRsNavParams,ChildRsParams);
} else {
// 填充子位置
let ChildRsNavContext:any = {};
let ChildRsNavParams:any = {};
let ChildRsParams:any = {};
await this.fillChildNodes(context, filter, list ,ChildRsNavContext,ChildRsNavParams,ChildRsParams);
}
}
/**
* 填充 树视图节点[默认根节点]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof LocationTreeService
*/
@Errorlog
public fillRootNodes(context:any={},filter: any, list: any[],rsNavContext?:any,rsNavParams?:any,rsParams?:any): Promise<any> {
context = this.handleResNavContext(context,filter,rsNavContext);
filter = this.handleResNavParams(context,filter,rsNavParams,rsParams);
return new Promise((resolve:any,reject:any) =>{
let treeNode: any = {};
Object.assign(treeNode, { text: 'entities.eamlocation.locationtree_treeview.nodes.root' });
Object.assign(treeNode, { isUseLangRes: true });
Object.assign(treeNode,{srfappctx:context});
Object.assign(treeNode, { srfmajortext: treeNode.text });
let strNodeId: string = 'ROOT';
Object.assign(treeNode, { srfkey: 'root' });
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += 'root';
Object.assign(treeNode, { id: strNodeId });
Object.assign(treeNode, { expanded: filter.isAutoexpand });
Object.assign(treeNode, { leaf: false });
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
list.push(treeNode);
resolve(list);
});
}
/**
* 填充 树视图节点[默认根节点]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof LocationTreeService
*/
@Errorlog
public async fillRootNodeChilds(context:any={}, filter: any, list: any[]): Promise<any> {
if (filter.srfnodefilter && !Object.is(filter.srfnodefilter,"")) {
// 填充全部位置
let AllRsNavContext:any = {};
let AllRsNavParams:any = {};
let AllRsParams:any = {};
await this.fillAllNodes(context, filter, list ,AllRsNavContext,AllRsNavParams,AllRsParams);
} else {
// 填充全部位置
let AllRsNavContext:any = {};
let AllRsNavParams:any = {};
let AllRsParams:any = {};
await this.fillAllNodes(context, filter, list ,AllRsNavContext,AllRsNavParams,AllRsParams);
}
}
/**
* 填充 树视图节点[全部位置]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof LocationTreeService
*/
@Errorlog
public fillAllNodes(context:any={},filter: any, list: any[],rsNavContext?:any,rsNavParams?:any,rsParams?:any): Promise<any> {
context = this.handleResNavContext(context,filter,rsNavContext);
filter = this.handleResNavParams(context,filter,rsNavParams,rsParams);
return new Promise((resolve:any,reject:any) =>{
let treeNode: any = {};
Object.assign(treeNode, { text: 'entities.eamlocation.locationtree_treeview.nodes.all' });
Object.assign(treeNode, { isUseLangRes: true });
Object.assign(treeNode,{srfappctx:context});
Object.assign(treeNode, { srfmajortext: treeNode.text });
let strNodeId: string = 'All';
// 没有指定节点值,直接使用父节点值
Object.assign(treeNode, { srfkey: filter.strRealNodeId });
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += filter.strRealNodeId;
Object.assign(treeNode, { id: strNodeId });
Object.assign(treeNode, { expanded: true });
Object.assign(treeNode, { leaf: false });
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
list.push(treeNode);
resolve(list);
});
}
/**
* 填充 树视图节点[全部位置]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof LocationTreeService
*/
@Errorlog
public async fillAllNodeChilds(context:any={}, filter: any, list: any[]): Promise<any> {
if (filter.srfnodefilter && !Object.is(filter.srfnodefilter,"")) {
// 填充顶级位置
let TopRsNavContext:any = {};
let TopRsNavParams:any = {};
let TopRsParams:any = {};
await this.fillTopNodes(context, filter, list ,TopRsNavContext,TopRsNavParams,TopRsParams);
} else {
// 填充顶级位置
let TopRsNavContext:any = {};
let TopRsNavParams:any = {};
let TopRsParams:any = {};
await this.fillTopNodes(context, filter, list ,TopRsNavContext,TopRsNavParams,TopRsParams);
}
}
/**
* 填充 树视图节点[子位置]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof LocationTreeService
*/
@Errorlog
public fillChildNodes(context:any={},filter: any, list: any[],rsNavContext?:any,rsNavParams?:any,rsParams?:any): Promise<any> {
context = this.handleResNavContext(context,filter,rsNavContext);
filter = this.handleResNavParams(context,filter,rsNavParams,rsParams);
return new Promise((resolve:any,reject:any) =>{
let searchFilter: any = {};
if (Object.is(filter.strNodeType, this.TREENODE_CHILD)) {
Object.assign(searchFilter, { n_peamlocationid_eq: filter.nodeid });
}
if (Object.is(filter.strNodeType, this.TREENODE_TOP)) {
Object.assign(searchFilter, { n_peamlocationid_eq: filter.nodeid });
}
Object.assign(searchFilter, { total: false });
let bFirst: boolean = true;
let records: any[] = [];
try {
this.searchChild(context, searchFilter, filter).then((records:any) =>{
if(records && records.length >0){
records.forEach((entity: any) => {
let treeNode: any = {};
// 整理context
let strId: string = entity.eamlocationid;
let strText: string = entity.eamlocationname;
Object.assign(treeNode,{srfparentdename:'EAMLocation',srfparentkey:entity.eamlocationid});
let tempContext:any = JSON.parse(JSON.stringify(context));
Object.assign(tempContext,{srfparentdename:'EAMLocation',srfparentkey:entity.eamlocationid,eamlocation:strId})
Object.assign(treeNode,{srfappctx:tempContext});
Object.assign(treeNode,{'eamlocation':strId});
Object.assign(treeNode, { srfkey: strId });
Object.assign(treeNode, { text: strText, srfmajortext: strText });
let strNodeId: string = 'Child';
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += strId;
Object.assign(treeNode, { id: strNodeId });
Object.assign(treeNode, { expanded: true });
Object.assign(treeNode, { leaf: false });
Object.assign(treeNode, { navfilter: "eamlocationid" });
Object.assign(treeNode, { curData: entity });
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
list.push(treeNode);
resolve(list);
bFirst = false;
});
}else{
resolve(list);
}
});
} catch (error) {
console.error(error);
}
});
}
/**
* 获取查询集合
*
* @public
* @param {any{}} context
* @param {*} searchFilter
* @param {*} filter
* @returns {any[]}
* @memberof TestEnetityDatasService
*/
@Errorlog
public searchChild(context:any={}, searchFilter: any, filter: any): Promise<any> {
return new Promise((resolve:any,reject:any) =>{
if(filter.viewparams){
Object.assign(searchFilter,filter.viewparams);
}
if(!searchFilter.page){
Object.assign(searchFilter,{page:0});
}
if(!searchFilter.size){
Object.assign(searchFilter,{size:1000});
}
if(context && context.srfparentdename){
Object.assign(searchFilter,{srfparentdename:JSON.parse(JSON.stringify(context)).srfparentdename});
}
if(context && context.srfparentkey){
Object.assign(searchFilter,{srfparentkey:JSON.parse(JSON.stringify(context)).srfparentkey});
}
const _appEntityService: any = this.appEntityService;
let list: any[] = [];
if (_appEntityService['FetchDefault'] && _appEntityService['FetchDefault'] instanceof Function) {
const response: Promise<any> = _appEntityService['FetchDefault'](context, searchFilter, false);
response.then((response: any) => {
if (!response.status || response.status !== 200) {
resolve([]);
console.log(JSON.stringify(context));
console.error('查询FetchDefault数据集异常!');
}
const data: any = response.data;
if (Object.keys(data).length > 0) {
list = JSON.parse(JSON.stringify(data));
resolve(list);
} else {
resolve([]);
}
}).catch((response: any) => {
resolve([]);
console.log(JSON.stringify(context));
console.error('查询FetchDefault数据集异常!');
});
}
})
}
/**
* 填充 树视图节点[子位置]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof LocationTreeService
*/
@Errorlog
public async fillChildNodeChilds(context:any={}, filter: any, list: any[]): Promise<any> {
if (filter.srfnodefilter && !Object.is(filter.srfnodefilter,"")) {
// 填充子位置
let ChildRsNavContext:any = {};
let ChildRsNavParams:any = {};
let ChildRsParams:any = {};
await this.fillChildNodes(context, filter, list ,ChildRsNavContext,ChildRsNavParams,ChildRsParams);
} else {
// 填充子位置
let ChildRsNavContext:any = {};
let ChildRsNavParams:any = {};
let ChildRsParams:any = {};
await this.fillChildNodes(context, filter, list ,ChildRsNavContext,ChildRsNavParams,ChildRsParams);
}
}
/**
* 处理代码表返回数据(树状结构)
*
* @param result 返回数组
* @param context 应用上下文
* @param callBack 回调
* @memberof LocationTreeService
*/
public handleDataSet(result:Array<any>,context:any,callBack:any){
let list:Array<any> = [];
if(result.length === 0){
return list;
}
result.forEach((codeItem:any) =>{
if(!codeItem.pvalue){
let valueField:string = codeItem.value;
this.setChildCodeItems(valueField,result,codeItem);
list.push(codeItem);
}
})
this.setNodeData(list,context,callBack);
return list;
}
/**
* 处理非根节点数据
*
* @param result 返回数组
* @param context 应用上下文
* @param callBack 回调
* @memberof LocationTreeService
*/
public setChildCodeItems(pValue:string,result:Array<any>,codeItem:any){
result.forEach((item:any) =>{
if(item.pvalue == pValue){
let valueField:string = item.value;
this.setChildCodeItems(valueField,result,item);
if(!codeItem.children){
codeItem.children = [];
}
codeItem.children.push(item);
}
})
}
/**
* 设置节点UI数据
*
* @param result 返回数组
* @param context 应用上下文
* @param callBack 回调
* @memberof LocationTreeService
*/
public setNodeData(result:Array<any>,context:any,callBack:any){
result.forEach((item:any) =>{
if(item.children){
item.leaf = false;
this.setNodeData(item.children,context,callBack);
}else{
item.leaf = true;
}
callBack(context,item);
})
}
/**
* 处理节点关系导航上下文
*
* @param context 应用上下文
* @param filter 参数
* @param resNavContext 节点关系导航上下文
*
* @memberof LocationTreeService
*/
public handleResNavContext(context:any,filter:any,resNavContext:any){
if(resNavContext && Object.keys(resNavContext).length > 0){
let tempContextData:any = JSON.parse(JSON.stringify(context));
let tempViewParams:any = {};
if(filter && filter.viewparams){
tempViewParams = filter.viewparams;
}
Object.keys(resNavContext).forEach((item:any) =>{
let curDataObj:any = resNavContext[item];
this.handleCustomDataLogic(context,tempViewParams,curDataObj,tempContextData,item);
})
return tempContextData;
}else{
return context;
}
}
/**
* 处理关系导航参数
*
* @param context 应用上下文
* @param filter 参数
* @param resNavParams 节点关系导航参数
* @param resParams 节点关系参数
*
* @memberof LocationTreeService
*/
public handleResNavParams(context:any,filter:any,resNavParams:any,resParams:any){
if((resNavParams && Object.keys(resNavParams).length >0) || (resParams && Object.keys(resParams).length >0)){
let tempViewParamData:any = {};
let tempViewParams:any = {};
if(filter && filter.viewparams){
tempViewParams = filter.viewparams;
tempViewParamData = JSON.parse(JSON.stringify(filter.viewparams));
}
if( Object.keys(resNavParams).length > 0){
Object.keys(resNavParams).forEach((item:any) =>{
let curDataObj:any = resNavParams[item];
this.handleCustomDataLogic(context,tempViewParams,curDataObj,tempViewParamData,item);
})
}
if( Object.keys(resParams).length > 0){
Object.keys(resParams).forEach((item:any) =>{
let curDataObj:any = resParams[item];
tempViewParamData[item.toLowerCase()] = curDataObj.value;
})
}
Object.assign(filter,{viewparams:tempViewParamData});
return filter;
}else{
return filter;
}
}
/**
* 处理自定义节点关系导航数据
*
* @param context 应用上下文
* @param viewparams 参数
* @param curNavData 节点关系导航参数对象
* @param tempData 返回数据
* @param item 节点关系导航参数键值
*
* @memberof LocationTreeService
*/
public handleCustomDataLogic(context:any,viewparams:any,curNavData:any,tempData:any,item:string){
// 直接值直接赋值
if(curNavData.isRawValue){
if(Object.is(curNavData.value,"null") || Object.is(curNavData.value,"")){
Object.defineProperty(tempData, item.toLowerCase(), {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item.toLowerCase(), {
value: curNavData.value,
writable : true,
enumerable : true,
configurable : true
});
}
}else{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if(context[(curNavData.value).toLowerCase()]){
Object.defineProperty(tempData, item.toLowerCase(), {
value: context[(curNavData.value).toLowerCase()],
writable : true,
enumerable : true,
configurable : true
});
}else{
if(viewparams[(curNavData.value).toLowerCase()]){
Object.defineProperty(tempData, item.toLowerCase(), {
value: viewparams[(curNavData.value).toLowerCase()],
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item.toLowerCase(), {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}
}
}
}
}
\ No newline at end of file
<div class="design-tree-container">
<context-menu-container>
<el-tree
v-if="inited"
ref="treeexpbar_tree"
class="design-tree"
node-key="id"
lazy
:show-checkbox="!isSingleSelect"
:check-on-click-node="!isSingleSelect"
:default-expanded-keys="expandedKeys"
:props="{
label: 'text',
isLeaf: 'leaf',
children: 'children'
}"
:load="load.bind(_self)"
:highlight-current="true"
:expand-on-click-node="false"
@check="onCheck.apply(_self, arguments)"
@current-change="selectionChange.apply(_self, arguments)"
:filter-node-method="filterNode"
>
<template slot-scope="{ node, data }">
<context-menu :contextMenuStyle="{width: '100%'}" :data="node" :renderContent="renderContextMenu.bind(_self)">
<tooltip transfer style="width: 100%;" max-width="2000" placement="right">
<div class="tree-node" @dblclick="doDefaultAction(node)">
<span class="icon">
<i v-if=" data.iconcls && !Object.is(data.iconcls, '')" :class="data.iconcls"></i>
<img v-else-if="data.icon && !Object.is(data.icon, '')" :src="data.icon" />
<icon v-else-if="isOutputIconDefault" type="ios-paper-outline"></icon>&nbsp;
</span>
<span class="text">
<span v-if="data.html" v-html="data.html"></span>
<span v-else>{{ data.isUseLangRes ? $t(data.text) : data.text }}</span>
</span>
</div>
<template slot="content">
<span v-if="data.html" v-html="data.html"></span>
<span v-else>{{ data.isUseLangRes ? $t(data.text) : data.text }}</span>
</template>
</tooltip>
</context-menu>
</template>
</el-tree>
</context-menu-container>
</div>
\ No newline at end of file
<template src="./location-tree-treeview.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { LocationTreeTreeBase } from './location-tree-treeview-base';
/**
* treeexpbar_tree部件
*
* @export
* @class LocationTreeTree
* @extends {LocationTreeTreeBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class LocationTreeTree extends LocationTreeTreeBase { }
</script>
......@@ -84,9 +84,9 @@ export class MainGridBase extends GridControlBase {
*/
public allColumns: any[] = [
{
name: 'eamlocationid',
label: '功能位置标识',
langtag: 'entities.eamlocation.main_grid.columns.eamlocationid',
name: 'locationnumber',
label: '功能位置编号',
langtag: 'entities.eamlocation.main_grid.columns.locationnumber',
show: true,
util: 'PX',
isEnableRowEdit: false,
......@@ -157,7 +157,7 @@ export class MainGridBase extends GridControlBase {
* @memberof MainBase
*/
public hasRowEdit: any = {
'eamlocationid':false,
'locationnumber':false,
'eamlocationname':false,
'eamlocationtypename':false,
'peamlocationname':false,
......
......@@ -31,11 +31,6 @@ export default class MainModel {
prop: 'eamlocationname',
dataType: 'TEXT',
},
{
name: 'eamlocationid',
prop: 'eamlocationid',
dataType: 'GUID',
},
{
name: 'peamlocationname',
prop: 'peamlocationname',
......@@ -56,6 +51,11 @@ export default class MainModel {
prop: 'eamlocationstatename',
dataType: 'PICKUPTEXT',
},
{
name: 'locationnumber',
prop: 'locationnumber',
dataType: 'TEXT',
},
{
name: 'eamlocationtypename',
prop: 'eamlocationtypename',
......
......@@ -23,15 +23,15 @@
<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-if="getColumnState('locationnumber')">
<el-table-column show-overflow-tooltip :prop="'locationnumber'" :label="$t('entities.eamlocation.main_grid.columns.locationnumber')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamlocation.main_grid.columns.eamlocationid')}}
{{$t('entities.eamlocation.main_grid.columns.locationnumber')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamlocationid}}</span>
<span>{{row.locationnumber}}</span>
</template>
</el-table-column>
</template>
......
......@@ -51,6 +51,9 @@ export default class MainInfoModel {
{
name: 'eamlocationstatename',
},
{
name: 'locationnumber',
},
]
}
......
......@@ -51,6 +51,9 @@ export default class PickupViewpickupviewpanelModel {
{
name: 'eamlocationstatename',
},
{
name: 'locationnumber',
},
]
}
......
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 TreeExpViewtreeexpbarService from './tree-exp-viewtreeexpbar-treeexpbar-service';
import EAMLocationUIService from '@/uiservice/eamlocation/eamlocation-ui-service';
/**
* treeexpbar部件基类
*
* @export
* @class MainControlBase
* @extends {TreeExpViewtreeexpbarTreeExpBarBase}
*/
export class TreeExpViewtreeexpbarTreeExpBarBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof TreeExpViewtreeexpbarTreeExpBarBase
*/
protected controlType: string = 'TREEEXPBAR';
/**
* 建构部件服务对象
*
* @type {TreeExpViewtreeexpbarService}
* @memberof TreeExpViewtreeexpbarTreeExpBarBase
*/
public service: TreeExpViewtreeexpbarService = new TreeExpViewtreeexpbarService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMLocationService}
* @memberof TreeExpViewtreeexpbarTreeExpBarBase
*/
public appEntityService: EAMLocationService = new EAMLocationService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof TreeExpViewtreeexpbarTreeExpBarBase
*/
protected appDeName: string = 'eamlocation';
/**
* treeexpbar_tree 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof TreeExpViewtreeexpbarTreeExpBarBase
*/
public treeexpbar_tree_selectionchange($event: any, $event2?: any) {
this.treeexpbar_selectionchange($event, 'treeexpbar_tree', $event2);
}
/**
* treeexpbar_tree 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof TreeExpViewtreeexpbarTreeExpBarBase
*/
public treeexpbar_tree_load($event: any, $event2?: any) {
this.treeexpbar_load($event, 'treeexpbar_tree', $event2);
}
/**
* 打开新建数据视图
*
* @type {any}
* @memberof TreeExpViewtreeexpbarBase
*/
@Prop() public newdata: any;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof TreeExpViewtreeexpbarBase
*/
@Prop() public opendata: any;
/**
* 视图唯一标识
*
* @type {boolean}
* @memberof TreeExpViewtreeexpbarBase
*/
@Prop() public viewUID!:string;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof TreeExpViewtreeexpbarBase
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof TreeExpViewtreeexpbarBase
*/
public getData(): any {
return {};
}
/**
* 选中数据
*
* @type {*}
* @memberof TreeExpViewtreeexpbarBase
*/
public selection: any = {};
/**
* 控件宽度
*
* @type {number}
* @memberof TreeExpViewtreeexpbarBase
*/
public ctrlWidth:number = 0;
/**
* 过滤值
*
* @type {string}
* @memberof TreeExpViewtreeexpbarBase
*/
public srfnodefilter: string = '';
/**
* 刷新标识
*
* @public
* @type {number}
* @memberof TreeExpViewtreeexpbarBase
*/
public counter:number = 0;
/**
* 是否加载默认关联视图
*
* @public
* @type {boolean}
* @memberof TreeExpViewtreeexpbarBase
*/
public istLoadDefaultRefView: boolean = false;
/**
* 分割宽度
*
* @type {number}
* @memberof TreeExpViewtreeexpbarBase
*/
public split: number = 0.15;
/**
* split值变化事件
*
* @memberof TreeExpViewtreeexpbarBase
*/
public onSplitChange() {
if(this.split){
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/**
* 获取关系项视图
*
* @param {*} [arg={}]
* @returns {*}
* @memberof TreeExpViewtreeexpbarBase
*/
public getExpItemView(arg: any = {}): any {
let expmode = arg.nodetype.toUpperCase();
if (!expmode) {
expmode = '';
}
if (Object.is(expmode, 'TOP')) {
return {
viewname: 'eamlocation-tree-child-grid-view',
parentdata: {"srfparentdefname":"eamlocationid"},
deKeyField:'eamlocation'
};
}
if (Object.is(expmode, 'CHILD')) {
return {
viewname: 'eamlocation-tree-child-grid-view',
parentdata: {"srfparentdefname":"eamlocationid"},
deKeyField:'eamlocation'
};
}
if (Object.is(expmode, 'ALL')) {
return {
viewname: 'eamlocation-grid-view',
parentdata: {},
deKeyField:'eamlocation'
};
}
return null;
}
/**
* 树导航选中
*
* @param {any []} args
* @param {string} [tag]
* @param {*} [$event2]
* @returns {void}
* @memberof TreeExpViewtreeexpbarBase
*/
public treeexpbar_selectionchange(args: any [], tag?: string, $event2?: any): void {
if (args.length === 0) {
return ;
}
const arg:any = args[0];
if (!arg.id) {
return;
}
const nodetype = arg.id.split(';')[0];
const refview = this.getExpItemView({ nodetype: nodetype });
if (!refview) {
return;
}
let tempViewparam:any = {};
let tempContext:any ={};
if(arg && arg.navfilter){
this.counter += 1;
Object.defineProperty(tempViewparam, arg.navfilter, {
value : arg.srfkey,
writable : true,
enumerable : true,
configurable : true
})
Object.assign(tempContext,{srfcounter:this.counter});
}
Object.assign(tempContext,JSON.parse(JSON.stringify(this.context)));
if(arg.srfappctx){
Object.assign(tempContext,JSON.parse(JSON.stringify(arg.srfappctx)));
}
// 计算导航上下文
if(arg && arg.navigateContext && Object.keys(arg.navigateContext).length >0){
let tempData:any = arg.curData?JSON.parse(JSON.stringify(arg.curData)):{};
Object.assign(tempData,arg);
let _context = this.$util.computedNavData(tempData,tempContext,tempViewparam,arg.navigateContext);
Object.assign(tempContext,_context);
}
if(arg.srfparentdename){
Object.assign(tempContext,{srfparentdename:arg.srfparentdename});
}
if(arg.srfparentkey){
Object.assign(tempContext,{srfparentkey:arg.srfparentkey});
}
// 计算导航参数
if(arg && arg.navigateParams && Object.keys(arg.navigateParams).length >0){
let tempData:any = arg.curData?JSON.parse(JSON.stringify(arg.curData)):{};
Object.assign(tempData,arg);
let _params = this.$util.computedNavData(tempData,tempContext,tempViewparam,arg.navigateParams);
Object.assign(tempViewparam,_params);
this.counter += 1;
Object.assign(tempContext,{srfcounter:this.counter});
}
this.selection = {};
Object.assign(this.selection, { view: { viewname: refview.viewname } });
Object.assign(this.selection,{'viewparam':tempViewparam,'context':tempContext});
this.$forceUpdate();
}
/**
* 树加载完成
*
* @param {any[]} args
* @param {string} [tag]
* @param {*} [$event2]
* @returns {void}
* @memberof TreeExpViewtreeexpbarBase
*/
public treeexpbar_load(args: any[], tag?: string, $event2?: any): void {
this.$emit('load',args);
}
/**
* 执行搜索
*
* @memberof TreeExpViewtreeexpbarBase
*/
public onSearch(): void {
if (!this.viewState) {
return;
}
this.istLoadDefaultRefView = false;
this.viewState.next({ tag: 'treeexpbar_tree', action: 'filter', data: { srfnodefilter: this.srfnodefilter } });
}
/**
* vue 声明周期
*
* @memberof @memberof TreeExpViewtreeexpbarBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof TreeExpViewtreeexpbarBase
*/
public afterCreated(){
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.istLoadDefaultRefView = false;
this.viewState.next({ tag: 'treeexpbar_tree', action: action, data: data });
});
}
}
/**
* Vue声明周期(组件渲染完毕)
*
* @memberof TreeExpViewtreeexpbarBase
*/
public mounted() {
this.afterMounted();
}
/**
* 执行mounted后的逻辑
*
* @memberof TreeExpViewtreeexpbarBase
*/
public afterMounted(){
if(this.$store.getters.getViewSplit(this.viewUID)){
this.split = this.$store.getters.getViewSplit(this.viewUID);
}else{
let containerWidth:number = (document.getElementById("treeexpviewtreeexpbar") as any).offsetWidth;
if(this.ctrlWidth){
this.split = this.ctrlWidth/containerWidth;
}
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
}
}
/**
* vue 生命周期
*
* @memberof TreeExpViewtreeexpbarBase
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof TreeExpViewtreeexpbarBase
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
/**
* 视图数据变化
*
* @param {*} $event
* @memberof TreeExpViewtreeexpbarBase
*/
public onViewDatasChange($event: any): void {
this.$emit('selectionchange', $event);
}
/**
* 视图数据被激活
*
* @param {*} $event
* @memberof TreeExpViewtreeexpbarBase
*/
public viewDatasActivated($event: any): void {
this.$emit('activated', $event);
}
/**
* 视图数据加载完成
*
* @param {*} $event
* @memberof TreeExpViewtreeexpbarBase
*/
public onViewLoad($event: any): void {
this.$emit('load', $event);
}
}
\ No newline at end of file
/**
* TreeExpViewtreeexpbar 部件模型
*
* @export
* @class TreeExpViewtreeexpbarModel
*/
export default class TreeExpViewtreeexpbarModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof TreeExpViewtreeexpbarModel
*/
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',
},
{
name: 'locationnumber',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* TreeExpViewtreeexpbar 部件服务对象
*
* @export
* @class TreeExpViewtreeexpbarService
*/
export default class TreeExpViewtreeexpbarService extends ControlService {
}
\ No newline at end of file
<split id="treeexpviewtreeexpbar" class='app-tree-exp-bar' v-model="split" mode="horizontal" @on-move-end="onSplitChange.apply(_self, arguments)">
<div class="app-tree-exp-bar-left" slot='left'>
<div class='tree-exp-content'>
<view_treeexpbar_tree
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
updateAction='Update'
removeAction='Remove'
loadAction='Get'
createAction='Create'
:isSelectFirstDefault="true"
:isBranchAvailable="true"
name="treeexpbar_tree"
ref='treeexpbar_tree'
@selectionchange="treeexpbar_tree_selectionchange($event)"
@load="treeexpbar_tree_load($event)"
@closeview="closeView($event)">
</view_treeexpbar_tree>
</div>
</div>
<div class="app-tree-exp-bar-right" slot='right'>
<component
v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)"
@viewdataschange="onViewDatasChange.apply(_self, arguments)"
@viewdatasactivated="viewDatasActivated.apply(_self, arguments)"
@viewload="onViewLoad.apply(_self, arguments)">
</component>
</div>
</split>
<template src="./tree-exp-viewtreeexpbar-treeexpbar.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { TreeExpViewtreeexpbarTreeExpBarBase } from './tree-exp-viewtreeexpbar-treeexpbar-base';
import view_treeexpbar_tree from '@widgets/eamlocation/location-tree-treeview/location-tree-treeview.vue';
/**
* treeexpbar部件
*
* @export
* @class TreeExpViewtreeexpbarTreeExpBar
* @extends {TreeExpViewtreeexpbarTreeExpBarBase}
*/
@Component({
components: {
view_treeexpbar_tree,
}
})
@VueLifeCycleProcessing()
export default class TreeExpViewtreeexpbarTreeExpBar extends TreeExpViewtreeexpbarTreeExpBarBase { }
</script>
......@@ -51,6 +51,9 @@ export default class View_MainInfoModel {
{
name: 'eamlocationstatename',
},
{
name: 'locationnumber',
},
]
}
......
......@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
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
......@@ -3,9 +3,24 @@ services:
assetmanagement-app-assetmanagement:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/assetmanagement-app-assetmanagement:latest
ports:
- "8080:8080"
- "10325:10325"
networks:
- 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:
resources:
limits:
......
......@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
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
......@@ -3,24 +3,9 @@ services:
assetmanagement-provider-assetapi:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/assetmanagement-provider-assetapi:latest
ports:
- "10315:10315"
- "8081:8081"
networks:
- 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
- SEATA_ENABLED=true
deploy:
resources:
limits:
......
......@@ -37,11 +37,11 @@
git clone -b master $para2 ibizassetmanagement/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibizassetmanagement/
mvn clean package -Passetapi
cd assetmanagement-provider/assetmanagement-provider-assetapi
mvn -Passetapi docker:build
mvn -Passetapi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/assetmanagement-provider-assetapi.yaml iBizEE --with-registry-auth
mvn clean package -Passetmanagement
cd assetmanagement-app/assetmanagement-app-assetmanagement
mvn -Passetmanagement docker:build
mvn -Passetmanagement docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/assetmanagement-app-assetmanagement.yaml iBizEE --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册