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

lab_gzf 部署微服务应用

上级 539ec820
......@@ -59,6 +59,16 @@
"viewtag": "135343573fd869053d84ecc2f48ffd49",
"memo": ""
},
"eamplanassetplangridview": {
"title": "维护计划信息",
"caption": "维护计划",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Plan",
"viewname": "EAMPlanAssetPlanGridView",
"viewfilename": "eamplan-asset-plan-grid-view",
"viewtag": "137ce0ca66c0d59f25a3a7c93496b1e6",
"memo": "系统自动添加"
},
"eamassetstatemodellinegridview": {
"title": "资产状态模型明细表格视图",
"caption": "资产状态模型明细",
......@@ -249,6 +259,16 @@
"viewtag": "4db903dc10459c98d4834775020d8b74",
"memo": ""
},
"eamapplyassetapplygridview": {
"title": "维护申请信息",
"caption": "维护申请",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Apply",
"viewname": "EAMApplyAssetApplyGridView",
"viewfilename": "eamapply-asset-apply-grid-view",
"viewtag": "54b41ee0f64fc8764a9d3cf1559c09db",
"memo": "系统自动添加"
},
"eamapplytypepickupview": {
"title": "维护申请类型数据选择视图",
"caption": "维护申请类型",
......@@ -299,6 +319,16 @@
"viewtag": "67367b30b36597f2b4f455b9738f4dd8",
"memo": ""
},
"eamworkorderassetwogridview": {
"title": "工单信息",
"caption": "工单",
"viewtype": "DEGRIDVIEW",
"viewmodule": "WorkOrder",
"viewname": "EAMWorkOrderAssetWOGridView",
"viewfilename": "eamwork-order-asset-wogrid-view",
"viewtag": "676593404c77c76b49ada7a06d45a25b",
"memo": "系统自动添加"
},
"eamwotypepickupview": {
"title": "工单类型数据选择视图",
"caption": "工单类型",
......
......@@ -25,6 +25,10 @@ export default {
caption: "维护申请",
title: "维护申请主信息",
},
assetapplygridview: {
caption: "维护申请",
title: "维护申请信息",
},
gridview: {
caption: "维护申请",
title: "维护申请信息",
......@@ -42,10 +46,9 @@ export default {
title: "快速新建",
},
},
if_001_form: {
ef_001_form: {
details: {
group1: "基本信息",
grouppanel1: "资产信息",
group1: "维护申请基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
......@@ -58,22 +61,20 @@ export default {
applynumber: "维护申请编号",
eamapplyname: "维护申请名称",
eamapplytypename: "维护申请类型",
eamservicelevelname: "服务等级",
begintime: "希望开始时间",
endtime: "希望结束时间",
description: "描述",
assetname: "资产",
eamlocationname: "功能位置",
eamlocationid: "功能位置标识",
eamapplyid: "维护申请标识",
assetid: "资产标识",
eamapplytypeid: "维护申请类型标识",
},
uiactions: {
},
},
ef_001_form: {
if_001_form: {
details: {
group1: "维护申请基本信息",
group1: "基本信息",
grouppanel1: "资产信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
......@@ -86,12 +87,28 @@ export default {
applynumber: "维护申请编号",
eamapplyname: "维护申请名称",
eamapplytypename: "维护申请类型",
eamservicelevelname: "服务等级",
begintime: "希望开始时间",
endtime: "希望结束时间",
description: "描述",
assetname: "资产",
eamlocationname: "功能位置",
eamlocationid: "功能位置标识",
eamapplyid: "维护申请标识",
assetid: "资产标识",
eamapplytypeid: "维护申请类型标识",
},
uiactions: {
},
},
grid_001_grid: {
columns: {
assetname: "资产",
applynumber: "维护申请编号",
eamapplyname: "维护申请名称",
eamapplytypename: "维护申请类型",
eamlocationname: "功能位置",
begintime: "希望开始时间",
endtime: "希望结束时间",
},
uiactions: {
},
......@@ -116,6 +133,52 @@ export default {
uiactions: {
},
},
assetapplygridviewtoolbar_toolbar: {
tbitem12_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem14: {
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",
},
},
gridviewtoolbar_toolbar: {
tbitem12_openquickcreateview: {
caption: "新建",
......
......@@ -24,6 +24,10 @@ export default {
caption: "维护申请",
title: "维护申请主信息",
},
assetapplygridview: {
caption: "维护申请",
title: "维护申请信息",
},
gridview: {
caption: "维护申请",
title: "维护申请信息",
......@@ -41,10 +45,9 @@ export default {
title: "快速新建",
},
},
if_001_form: {
ef_001_form: {
details: {
group1: "基本信息",
grouppanel1: "资产信息",
group1: "维护申请基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
......@@ -57,22 +60,20 @@ export default {
applynumber: "维护申请编号",
eamapplyname: "维护申请名称",
eamapplytypename: "维护申请类型",
eamservicelevelname: "服务等级",
begintime: "希望开始时间",
endtime: "希望结束时间",
description: "描述",
assetname: "资产",
eamlocationname: "功能位置",
eamlocationid: "功能位置标识",
eamapplyid: "维护申请标识",
assetid: "资产标识",
eamapplytypeid: "维护申请类型标识",
},
uiactions: {
},
},
ef_001_form: {
if_001_form: {
details: {
group1: "维护申请基本信息",
group1: "基本信息",
grouppanel1: "资产信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
......@@ -85,12 +86,28 @@ export default {
applynumber: "维护申请编号",
eamapplyname: "维护申请名称",
eamapplytypename: "维护申请类型",
eamservicelevelname: "服务等级",
begintime: "希望开始时间",
endtime: "希望结束时间",
description: "描述",
assetname: "资产",
eamlocationname: "功能位置",
eamlocationid: "功能位置标识",
eamapplyid: "维护申请标识",
assetid: "资产标识",
eamapplytypeid: "维护申请类型标识",
},
uiactions: {
},
},
grid_001_grid: {
columns: {
assetname: "资产",
applynumber: "维护申请编号",
eamapplyname: "维护申请名称",
eamapplytypename: "维护申请类型",
eamlocationname: "功能位置",
begintime: "希望开始时间",
endtime: "希望结束时间",
},
uiactions: {
},
......@@ -115,6 +132,52 @@ export default {
uiactions: {
},
},
assetapplygridviewtoolbar_toolbar: {
tbitem12_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem14: {
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: "过滤",
},
},
gridviewtoolbar_toolbar: {
tbitem12_openquickcreateview: {
caption: "新建",
......
......@@ -19,6 +19,10 @@ export default {
content: "内容",
},
views: {
assetplangridview: {
caption: "维护计划",
title: "维护计划信息",
},
infoview: {
caption: "维护计划",
title: "维护计划信息",
......@@ -48,10 +52,9 @@ export default {
title: "维护计划数据选择视图",
},
},
if_001_form: {
ef_001_form: {
details: {
group1: "维护计划基本信息",
grouppanel1: "资产信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
......@@ -63,11 +66,8 @@ export default {
srfsourcekey: "",
plannumber: "计划编号",
eamplanname: "维护计划名称",
mdate: "制定日期",
description: "描述",
assetname: "资产",
eamlocationname: "功能位置",
eammonitorpointname: "测点",
eamlocationid: "功能位置标识",
eamplanid: "维护计划标识",
assetid: "资产标识",
......@@ -75,9 +75,10 @@ export default {
uiactions: {
},
},
ef_001_form: {
if_001_form: {
details: {
group1: "维护计划基本信息",
grouppanel1: "资产信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
......@@ -89,8 +90,11 @@ export default {
srfsourcekey: "",
plannumber: "计划编号",
eamplanname: "维护计划名称",
mdate: "制定日期",
content: "内容",
assetname: "资产",
eamlocationname: "功能位置",
eammonitorpointname: "测点",
eamlocationid: "功能位置标识",
eamplanid: "维护计划标识",
assetid: "资产标识",
......@@ -98,6 +102,17 @@ export default {
uiactions: {
},
},
grid_001_grid: {
columns: {
assetname: "资产",
plannumber: "计划编号",
eamplanname: "维护计划名称",
eamlocationname: "功能位置",
mdate: "制定日期",
},
uiactions: {
},
},
main_grid: {
columns: {
plannumber: "计划编号",
......@@ -116,6 +131,52 @@ export default {
uiactions: {
},
},
assetplangridviewtoolbar_toolbar: {
tbitem12_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem14: {
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",
},
},
gridviewtoolbar_toolbar: {
tbitem12_openquickcreateview: {
caption: "新建",
......
......@@ -18,6 +18,10 @@ export default {
content: "内容",
},
views: {
assetplangridview: {
caption: "维护计划",
title: "维护计划信息",
},
infoview: {
caption: "维护计划",
title: "维护计划信息",
......@@ -47,10 +51,9 @@ export default {
title: "维护计划数据选择视图",
},
},
if_001_form: {
ef_001_form: {
details: {
group1: "维护计划基本信息",
grouppanel1: "资产信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
......@@ -62,11 +65,8 @@ export default {
srfsourcekey: "",
plannumber: "计划编号",
eamplanname: "维护计划名称",
mdate: "制定日期",
description: "描述",
assetname: "资产",
eamlocationname: "功能位置",
eammonitorpointname: "测点",
eamlocationid: "功能位置标识",
eamplanid: "维护计划标识",
assetid: "资产标识",
......@@ -74,9 +74,10 @@ export default {
uiactions: {
},
},
ef_001_form: {
if_001_form: {
details: {
group1: "维护计划基本信息",
grouppanel1: "资产信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
......@@ -88,8 +89,11 @@ export default {
srfsourcekey: "",
plannumber: "计划编号",
eamplanname: "维护计划名称",
mdate: "制定日期",
content: "内容",
assetname: "资产",
eamlocationname: "功能位置",
eammonitorpointname: "测点",
eamlocationid: "功能位置标识",
eamplanid: "维护计划标识",
assetid: "资产标识",
......@@ -97,6 +101,17 @@ export default {
uiactions: {
},
},
grid_001_grid: {
columns: {
assetname: "资产",
plannumber: "计划编号",
eamplanname: "维护计划名称",
eamlocationname: "功能位置",
mdate: "制定日期",
},
uiactions: {
},
},
main_grid: {
columns: {
plannumber: "计划编号",
......@@ -115,6 +130,52 @@ export default {
uiactions: {
},
},
assetplangridviewtoolbar_toolbar: {
tbitem12_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem14: {
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: "过滤",
},
},
gridviewtoolbar_toolbar: {
tbitem12_openquickcreateview: {
caption: "新建",
......
......@@ -40,6 +40,10 @@ export default {
caption: "工单",
title: "工单主信息",
},
assetwogridview: {
caption: "工单",
title: "工单信息",
},
gridview: {
caption: "工单",
title: "工单信息",
......@@ -61,11 +65,9 @@ export default {
title: "产生的工单",
},
},
if_001_form: {
ef_001_form: {
details: {
group1: "基本信息",
grouppanel1: "资产信息",
grouppanel2: "执行信息",
group1: "工单基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
......@@ -78,26 +80,21 @@ export default {
wonumber: "工单编号",
workordername: "工单名称",
eamwotypename: "工单类型",
pworkordername: "上级工单",
eamservicelevelname: "服务等级",
mdate: "制定日期",
eamwooriginname: "工单来源",
assetname: "资产",
eamlocationname: "功能位置",
wodate: "执行日期",
begintime: "实际开始时间",
endtime: "实际结束时间",
worklength: "工时",
eamlocationid: "功能位置标识",
workorderid: "工单标识",
eamwotypeid: "工单类型标识",
assetid: "资产标识",
},
uiactions: {
},
},
ef_001_form: {
if_001_form: {
details: {
group1: "工单基本信息",
group1: "基本信息",
grouppanel1: "资产信息",
grouppanel2: "执行信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
......@@ -110,11 +107,18 @@ export default {
wonumber: "工单编号",
workordername: "工单名称",
eamwotypename: "工单类型",
pworkordername: "上级工单",
eamservicelevelname: "服务等级",
mdate: "制定日期",
eamwooriginname: "工单来源",
assetname: "资产",
eamlocationname: "功能位置",
wodate: "执行日期",
begintime: "实际开始时间",
endtime: "实际结束时间",
worklength: "工时",
eamlocationid: "功能位置标识",
workorderid: "工单标识",
eamwotypeid: "工单类型标识",
assetid: "资产标识",
},
uiactions: {
......@@ -139,6 +143,19 @@ export default {
uiactions: {
},
},
grid_003_grid: {
columns: {
assetname: "资产",
wonumber: "工单编号",
workordername: "工单名称",
eamwotypename: "工单类型",
eamwooriginname: "工单来源",
eamlocationname: "功能位置",
wodate: "执行日期",
},
uiactions: {
},
},
grid_002_grid: {
columns: {
pworkordername: "上级工单",
......@@ -232,6 +249,52 @@ export default {
tip: "Filter",
},
},
assetwogridviewtoolbar_toolbar: {
tbitem12_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem14: {
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",
},
},
applywogridviewtoolbar_toolbar: {
tbitem5: {
caption: "New",
......
......@@ -39,6 +39,10 @@ export default {
caption: "工单",
title: "工单主信息",
},
assetwogridview: {
caption: "工单",
title: "工单信息",
},
gridview: {
caption: "工单",
title: "工单信息",
......@@ -60,11 +64,9 @@ export default {
title: "产生的工单",
},
},
if_001_form: {
ef_001_form: {
details: {
group1: "基本信息",
grouppanel1: "资产信息",
grouppanel2: "执行信息",
group1: "工单基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
......@@ -77,26 +79,21 @@ export default {
wonumber: "工单编号",
workordername: "工单名称",
eamwotypename: "工单类型",
pworkordername: "上级工单",
eamservicelevelname: "服务等级",
mdate: "制定日期",
eamwooriginname: "工单来源",
assetname: "资产",
eamlocationname: "功能位置",
wodate: "执行日期",
begintime: "实际开始时间",
endtime: "实际结束时间",
worklength: "工时",
eamlocationid: "功能位置标识",
workorderid: "工单标识",
eamwotypeid: "工单类型标识",
assetid: "资产标识",
},
uiactions: {
},
},
ef_001_form: {
if_001_form: {
details: {
group1: "工单基本信息",
group1: "基本信息",
grouppanel1: "资产信息",
grouppanel2: "执行信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
......@@ -109,11 +106,18 @@ export default {
wonumber: "工单编号",
workordername: "工单名称",
eamwotypename: "工单类型",
pworkordername: "上级工单",
eamservicelevelname: "服务等级",
mdate: "制定日期",
eamwooriginname: "工单来源",
assetname: "资产",
eamlocationname: "功能位置",
wodate: "执行日期",
begintime: "实际开始时间",
endtime: "实际结束时间",
worklength: "工时",
eamlocationid: "功能位置标识",
workorderid: "工单标识",
eamwotypeid: "工单类型标识",
assetid: "资产标识",
},
uiactions: {
......@@ -138,6 +142,19 @@ export default {
uiactions: {
},
},
grid_003_grid: {
columns: {
assetname: "资产",
wonumber: "工单编号",
workordername: "工单名称",
eamwotypename: "工单类型",
eamwooriginname: "工单来源",
eamlocationname: "功能位置",
wodate: "执行日期",
},
uiactions: {
},
},
grid_002_grid: {
columns: {
pworkordername: "上级工单",
......@@ -231,6 +248,52 @@ export default {
tip: "过滤",
},
},
assetwogridviewtoolbar_toolbar: {
tbitem12_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem14: {
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: "过滤",
},
},
applywogridviewtoolbar_toolbar: {
tbitem5: {
caption: "新建",
......
......@@ -87,6 +87,64 @@ mock.onDelete(new RegExp(/^\/eamapplies\/batch$/)).reply((config: any) => {
});
// Select
mock.onGet(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: 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','eamapplyid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([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.eamapplyid, tempValue.eamapplyid));
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})\/eamapplies\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: 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> = ['assetid','eamapplyid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([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.eamapplyid, tempValue.eamapplyid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Select
mock.onGet(new RegExp(/^\/eamapplies\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: Select");
......@@ -114,6 +172,60 @@ mock.onGet(new RegExp(/^\/eamapplies\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply(
console.groupEnd();
return [status, _items];
});
// Create
mock.onPost(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: 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','eamapplyid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([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\-\;]{1,35})\/eamapplies\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: 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> = ['assetid','eamapplyid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([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(/^\/eamapplies\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -140,6 +252,60 @@ mock.onPost(new RegExp(/^\/eamapplies\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((confi
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: 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','eamapplyid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([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\-\;]{1,35})\/eamapplies\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: 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> = ['assetid','eamapplyid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([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(/^\/eamapplies\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -179,6 +345,44 @@ mock.onPut(new RegExp(/^\/eamapplies\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: 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\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: 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(/^\/eamapplies\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: GetDraft");
......@@ -194,6 +398,60 @@ mock.onGet(new RegExp(/^\/eamapplies\/getdraft$/)).reply((config: any) => {
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: 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','eamapplyid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([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\-\;]{1,35})\/eamapplies\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: 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> = ['assetid','eamapplyid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([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(/^\/eamapplies\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
......@@ -232,6 +490,60 @@ mock.onPost(new RegExp(/^\/eamapplies\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).re
console.groupEnd();
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: 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','eamapplyid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([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\-\;]{1,35})\/eamapplies\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: 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> = ['assetid','eamapplyid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([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(/^\/eamapplies\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
......@@ -270,6 +582,96 @@ mock.onPost(new RegExp(/^\/eamapplies\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply(
console.groupEnd();
return [status, data];
});
// FetchDefault
mock.onGet(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: 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','assetid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/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\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: 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> = ['assetid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/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(/^\/eamapplies\/fetchdefault$/)).reply((config: any) => {
......@@ -314,14 +716,98 @@ mock.onGet(new RegExp(/^\/eamapplies\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// 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})\/eamapplies\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: 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','eamapplyid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([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.eamapplyid, tempValue.eamapplyid));
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})\/eamapplies\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: 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> = ['assetid','eamapplyid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([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.eamapplyid, tempValue.eamapplyid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Remove
mock.onDelete(new RegExp(/^\/eamapplies\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
......@@ -351,6 +837,62 @@ mock.onDelete(new RegExp(/^\/eamapplies\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((conf
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: 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','eamapplyid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([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.eamapplyid, tempValue.eamapplyid));
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})\/eamapplies\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: 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> = ['assetid','eamapplyid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamapplies\/([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.eamapplyid, tempValue.eamapplyid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/eamapplies\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamapply 方法: Get");
......
......@@ -88,6 +88,64 @@ mock.onDelete(new RegExp(/^\/eamplanlines\/batch$/)).reply((config: any) => {
// Select
mock.onGet(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: 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','eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([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.eamplanlineid, tempValue.eamplanlineid));
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})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: 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> = ['assetid','eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([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.eamplanlineid, tempValue.eamplanlineid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Select
mock.onGet(new RegExp(/^\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: Select");
......@@ -145,6 +203,60 @@ mock.onGet(new RegExp(/^\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).repl
});
// Create
mock.onPost(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: 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','eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([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\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: 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> = ['assetid','eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([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(/^\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: Create");
......@@ -198,6 +310,60 @@ mock.onPost(new RegExp(/^\/eamplanlines\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((con
});
// Update
mock.onPut(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: 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','eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([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\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: 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> = ['assetid','eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([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(/^\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: Update");
......@@ -265,6 +431,44 @@ mock.onPut(new RegExp(/^\/eamplanlines\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((conf
// GetDraft
mock.onGet(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: 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\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: 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(/^\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: GetDraft");
......@@ -298,6 +502,60 @@ mock.onGet(new RegExp(/^\/eamplanlines\/getdraft$/)).reply((config: any) => {
});
// CheckKey
mock.onPost(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: 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','eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([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\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: 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> = ['assetid','eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([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(/^\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: CheckKey");
......@@ -363,6 +621,60 @@ mock.onPost(new RegExp(/^\/eamplanlines\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).
});
// Save
mock.onPost(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: 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','eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([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\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: 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> = ['assetid','eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([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(/^\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: Save");
......@@ -428,6 +740,96 @@ mock.onPost(new RegExp(/^\/eamplanlines\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).repl
});
// FetchDefault
mock.onGet(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: 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','assetid','eamplanid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/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\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: 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> = ['assetid','eamplanid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/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(/^\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: FetchDefault");
......@@ -516,27 +918,111 @@ mock.onGet(new RegExp(/^\/eamplanlines\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// 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})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: 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','eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([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.eamplanlineid, tempValue.eamplanlineid));
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})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: 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> = ['assetid','eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([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.eamplanlineid, tempValue.eamplanlineid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Remove
mock.onDelete(new RegExp(/^\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
......@@ -594,6 +1080,62 @@ mock.onDelete(new RegExp(/^\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((co
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: 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','eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([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.eamplanlineid, tempValue.eamplanlineid));
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})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: 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> = ['assetid','eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([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.eamplanlineid, tempValue.eamplanlineid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: Get");
......
......@@ -87,6 +87,64 @@ mock.onDelete(new RegExp(/^\/eamplans\/batch$/)).reply((config: any) => {
});
// Select
mock.onGet(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: 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','eamplanid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([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.eamplanid, tempValue.eamplanid));
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})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: 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> = ['assetid','eamplanid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([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.eamplanid, tempValue.eamplanid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Select
mock.onGet(new RegExp(/^\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: Select");
......@@ -114,6 +172,60 @@ mock.onGet(new RegExp(/^\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((c
console.groupEnd();
return [status, _items];
});
// Create
mock.onPost(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: 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','eamplanid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([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\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: 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> = ['assetid','eamplanid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([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(/^\/eamplans\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -140,6 +252,60 @@ mock.onPost(new RegExp(/^\/eamplans\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: 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','eamplanid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([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\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: 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> = ['assetid','eamplanid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([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(/^\/eamplans\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -179,6 +345,44 @@ mock.onPut(new RegExp(/^\/eamplans\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: 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\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: 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(/^\/eamplans\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: GetDraft");
......@@ -194,6 +398,60 @@ mock.onGet(new RegExp(/^\/eamplans\/getdraft$/)).reply((config: any) => {
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: 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','eamplanid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([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\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: 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> = ['assetid','eamplanid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([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(/^\/eamplans\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
......@@ -232,6 +490,60 @@ mock.onPost(new RegExp(/^\/eamplans\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl
console.groupEnd();
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: 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','eamplanid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([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\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: 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> = ['assetid','eamplanid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([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(/^\/eamplans\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
......@@ -270,6 +582,96 @@ mock.onPost(new RegExp(/^\/eamplans\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((c
console.groupEnd();
return [status, data];
});
// FetchDefault
mock.onGet(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: 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','assetid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/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\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: 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> = ['assetid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/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(/^\/eamplans\/fetchdefault$/)).reply((config: any) => {
......@@ -314,14 +716,98 @@ mock.onGet(new RegExp(/^\/eamplans\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((co
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// 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})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: 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','eamplanid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([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.eamplanid, tempValue.eamplanid));
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})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: 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> = ['assetid','eamplanid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([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.eamplanid, tempValue.eamplanid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Remove
mock.onDelete(new RegExp(/^\/eamplans\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
......@@ -351,6 +837,62 @@ mock.onDelete(new RegExp(/^\/eamplans\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: 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','eamplanid'];
const matchArray:any = new RegExp(/^\/eamlocations\/([a-zA-Z0-9\-\;]{1,35})\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([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.eamplanid, tempValue.eamplanid));
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})\/eamplans\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: 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> = ['assetid','eamplanid'];
const matchArray:any = new RegExp(/^\/eamassets\/([a-zA-Z0-9\-\;]{1,35})\/eamplans\/([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.eamplanid, tempValue.eamplanid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/eamplans\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplan 方法: Get");
......
......@@ -55,6 +55,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMLocationTreeExpView",
"viewtag": "135343573fd869053d84ecc2f48ffd49"
},
"eamplanassetplangridview": {
"title": "维护计划信息",
"caption": "维护计划",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Plan",
"viewname": "EAMPlanAssetPlanGridView",
"viewtag": "137ce0ca66c0d59f25a3a7c93496b1e6"
},
"eamassetstatemodellinegridview": {
"title": "资产状态模型明细表格视图",
"caption": "资产状态模型明细",
......@@ -207,6 +215,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMAssetSummaryView",
"viewtag": "4db903dc10459c98d4834775020d8b74"
},
"eamapplyassetapplygridview": {
"title": "维护申请信息",
"caption": "维护申请",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Apply",
"viewname": "EAMApplyAssetApplyGridView",
"viewtag": "54b41ee0f64fc8764a9d3cf1559c09db"
},
"eamapplytypepickupview": {
"title": "维护申请类型数据选择视图",
"caption": "维护申请类型",
......@@ -247,6 +263,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMApplyStateGridView",
"viewtag": "67367b30b36597f2b4f455b9738f4dd8"
},
"eamworkorderassetwogridview": {
"title": "工单信息",
"caption": "工单",
"viewtype": "DEGRIDVIEW",
"viewmodule": "WorkOrder",
"viewname": "EAMWorkOrderAssetWOGridView",
"viewtag": "676593404c77c76b49ada7a06d45a25b"
},
"eamwotypepickupview": {
"title": "工单类型数据选择视图",
"caption": "工单类型",
......
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import EAMApplyService from '@/service/eamapply/eamapply-service';
import EAMApplyAuthService from '@/authservice/eamapply/eamapply-auth-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import EAMApplyUIService from '@/uiservice/eamapply/eamapply-ui-service';
import CodeListService from "@service/app/codelist-service";
/**
* 维护申请信息视图基类
*
* @export
* @class EAMApplyAssetApplyGridViewBase
* @extends {GridViewBase}
*/
export class EAMApplyAssetApplyGridViewBase extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMApplyAssetApplyGridViewBase
*/
protected appDeName: string = 'eamapply';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMApplyAssetApplyGridViewBase
*/
protected appDeKey: string = 'eamapplyid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMApplyAssetApplyGridViewBase
*/
protected appDeMajor: string = 'eamapplyname';
/**
* 实体服务对象
*
* @type {EAMApplyService}
* @memberof EAMApplyAssetApplyGridViewBase
*/
protected appEntityService: EAMApplyService = new EAMApplyService;
/**
* 实体权限服务对象
*
* @type EAMApplyUIService
* @memberof EAMApplyAssetApplyGridViewBase
*/
public appUIService: EAMApplyUIService = new EAMApplyUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMApplyAssetApplyGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMApplyAssetApplyGridViewBase
*/
protected model: any = {
srfCaption: 'entities.eamapply.views.assetapplygridview.caption',
srfTitle: 'entities.eamapply.views.assetapplygridview.title',
srfSubTitle: 'entities.eamapply.views.assetapplygridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMApplyAssetApplyGridViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof EAMApplyAssetApplyGridView
*/
public toolBarModels: any = {
tbitem12_openquickcreateview: { name: 'tbitem12_openquickcreateview', caption: '新建', 'isShowCaption': true, 'isShowIcon': true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'OpenQuickCreateView', target: 'NONE', class: '' } },
tbitem14: { name: 'tbitem14', 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 = '54b41ee0f64fc8764a9d3cf1559c09db';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMApplyAssetApplyGridViewBase
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMApplyAssetApplyGridViewBase
*/
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: 'eamapply',
majorPSDEField: 'eamapplyname',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMApplyAssetApplyGridViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem12_openquickcreateview')) {
this.toolbar_tbitem12_openquickcreateview_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 EAMApplyAssetApplyGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMApplyAssetApplyGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMApplyAssetApplyGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMApplyAssetApplyGridViewBase
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMApplyAssetApplyGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMApplyAssetApplyGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMApplyAssetApplyGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMApplyAssetApplyGridViewBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem12_openquickcreateview_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];
}
// 界面行为
const curUIService:EAMApplyUIService = new EAMApplyUIService();
curUIService.EAMApply_OpenQuickCreateView(datas,contextJO, paramJO, $event, xData,this,"EAMApply");
}
/**
* 逻辑事件
*
* @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,"EAMApply");
}
/**
* 逻辑事件
*
* @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,"EAMApply");
}
/**
* 逻辑事件
*
* @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,"EAMApply");
}
/**
* 逻辑事件
*
* @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,"EAMApply");
}
/**
* 逻辑事件
*
* @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,"EAMApply");
}
/**
* 逻辑事件
*
* @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,"EAMApply");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMApplyAssetApplyGridView
*/
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.eamapply;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
let deResParameters: any[] = [];
if(tempContext.eamasset && true){
deResParameters = [
{ pathName: 'eamassets', parameterName: 'eamasset' },
]
}
const parameters: any[] = [
{ pathName: 'eamapplies', parameterName: 'eamapply' },
];
const _this: any = this;
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
}
const view: any = {
viewname: 'eamapply-quick-create-view',
height: 0,
width: 0,
title: this.$t('entities.eamapply.views.quickcreateview.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMApplyAssetApplyGridView
*/
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]);
}
let deResParameters: any[] = [];
if(tempContext.eamasset && true){
deResParameters = [
{ pathName: 'eamassets', parameterName: 'eamasset' },
]
}
const parameters: any[] = [
{ pathName: 'eamapplies', parameterName: 'eamapply' },
{ 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 EAMApplyAssetApplyGridViewBase
*/
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, { eamapply: args[0].eamapply })
}
_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 EAMApplyAssetApplyGridViewBase
*/
public Copy(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { eamapply: args[0].eamapply });
}
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
Object.assign(this.viewparams,{copymode:true});
}
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMApplyAssetApplyGridViewBase
*/
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 EAMApplyAssetApplyGridViewBase
*/
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 EAMApplyAssetApplyGridViewBase
*/
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 EAMApplyAssetApplyGridViewBase
*/
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="eamapplyassetapplygridview" viewTitle="维护申请信息" class='degridview eamapply-asset-apply-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.apply(_self, arguments)"/> </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="./eamapply-asset-apply-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMApplyAssetApplyGridViewBase } from './eamapply-asset-apply-grid-view-base';
import view_grid from '@widgets/eamapply/grid-001-grid/grid-001-grid.vue';
import view_searchform from '@widgets/eamapply/default-searchform/default-searchform.vue';
/**
* 维护申请信息视图
*
* @export
* @class EAMApplyAssetApplyGridView
* @extends {EAMApplyAssetApplyGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class EAMApplyAssetApplyGridView extends EAMApplyAssetApplyGridViewBase { }
</script>
......@@ -504,7 +504,12 @@ export class EAMApplyGridViewBase extends GridViewBase {
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
let deResParameters: any[] = [];
if(tempContext.eamasset && true){
deResParameters = [
{ pathName: 'eamassets', parameterName: 'eamasset' },
]
}
const parameters: any[] = [
{ pathName: 'eamapplies', parameterName: 'eamapply' },
];
......@@ -550,7 +555,12 @@ export class EAMApplyGridViewBase extends GridViewBase {
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
let deResParameters: any[] = [];
if(tempContext.eamasset && true){
deResParameters = [
{ pathName: 'eamassets', parameterName: 'eamasset' },
]
}
const parameters: any[] = [
{ pathName: 'eamapplies', parameterName: 'eamapply' },
{ pathName: 'infoview', parameterName: 'infoview' },
......
<studio-view-style2 viewName="eamassetpickupgridview" viewTitle="资产选择表格视图" class='depickupgridview eamasset-pickup-grid-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<template slot="searchForm">
<view_searchform
:viewState="viewState"
......
export const PageComponents = {
install(Vue: any, opt: any) {
Vue.component('eamspare-parts-group-grid-view', () => import('@pages/asset/eamspare-parts-group-grid-view/eamspare-parts-group-grid-view.vue'));
Vue.component('eamasset-type-pickup-view', () => import('@pages/asset/eamasset-type-pickup-view/eamasset-type-pickup-view.vue'));
Vue.component('eamapply-info-main-view', () => import('@pages/apply/eamapply-info-main-view/eamapply-info-main-view.vue'));
Vue.component('eamproductpickup-view', () => import('@pages/asset/eamproductpickup-view/eamproductpickup-view.vue'));
Vue.component('eamapply-type-edit-view', () => import('@pages/apply/eamapply-type-edit-view/eamapply-type-edit-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-tree-exp-view', () => import('@pages/asset/eamasset-tree-exp-view/eamasset-tree-exp-view.vue'));
Vue.component('eamasset-child-grid-view', () => import('@pages/asset/eamasset-child-grid-view/eamasset-child-grid-view.vue'));
Vue.component('eamspare-parts-group-dashboard-view', () => import('@pages/asset/eamspare-parts-group-dashboard-view/eamspare-parts-group-dashboard-view.vue'));
Vue.component('eamapply-asset-apply-grid-view', () => import('@pages/apply/eamapply-asset-apply-grid-view/eamapply-asset-apply-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-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('eamplan-info-view', () => import('@pages/plan/eamplan-info-view/eamplan-info-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('eamplan-grid-view', () => import('@pages/plan/eamplan-grid-view/eamplan-grid-view.vue'));
Vue.component('eamplan-pickup-grid-view', () => import('@pages/plan/eamplan-pickup-grid-view/eamplan-pickup-grid-view.vue'));
Vue.component('eamservice-level-grid-view', () => import('@pages/work-order/eamservice-level-grid-view/eamservice-level-grid-view.vue'));
Vue.component('eamasset-grid-view', () => import('@pages/asset/eamasset-grid-view/eamasset-grid-view.vue'));
Vue.component('eamapply-info-view', () => import('@pages/apply/eamapply-info-view/eamapply-info-view.vue'));
Vue.component('eamspare-parts-group-edit-view', () => import('@pages/asset/eamspare-parts-group-edit-view/eamspare-parts-group-edit-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('eamspare-parts-proparts-pro-grid-view', () => import('@pages/asset/eamspare-parts-proparts-pro-grid-view/eamspare-parts-proparts-pro-grid-view.vue'));
Vue.component('eamlocation-state-model-pickup-grid-view', () => import('@pages/location/eamlocation-state-model-pickup-grid-view/eamlocation-state-model-pickup-grid-view.vue'));
Vue.component('eamplan-line-edit-view', () => import('@pages/plan/eamplan-line-edit-view/eamplan-line-edit-view.vue'));
Vue.component('eammonitor-point-pickup-view', () => import('@pages/work-order/eammonitor-point-pickup-view/eammonitor-point-pickup-view.vue'));
Vue.component('eamwork-order-child-wogrid-view', () => import('@pages/work-order/eamwork-order-child-wogrid-view/eamwork-order-child-wogrid-view.vue'));
Vue.component('eamapply-type-pickup-view', () => import('@pages/apply/eamapply-type-pickup-view/eamapply-type-pickup-view.vue'));
Vue.component('eamlocation-pickup-view', () => import('@pages/location/eamlocation-pickup-view/eamlocation-pickup-view.vue'));
Vue.component('eamlocation-state-pickup-view', () => import('@pages/location/eamlocation-state-pickup-view/eamlocation-state-pickup-view.vue'));
Vue.component('eamlocation-state-model-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('eamplan-info-main-view', () => import('@pages/plan/eamplan-info-main-view/eamplan-info-main-view.vue'));
Vue.component('eamwork-order-info-main-view', () => import('@pages/work-order/eamwork-order-info-main-view/eamwork-order-info-main-view.vue'));
Vue.component('eamspare-parts-group-pickup-view', () => import('@pages/asset/eamspare-parts-group-pickup-view/eamspare-parts-group-pickup-view.vue'));
Vue.component('eamapply-grid-view', () => import('@pages/apply/eamapply-grid-view/eamapply-grid-view.vue'));
Vue.component('eamasset-state-pickup-view', () => import('@pages/asset/eamasset-state-pickup-view/eamasset-state-pickup-view.vue'));
Vue.component('eamlocation-type-pickup-view', () => import('@pages/location/eamlocation-type-pickup-view/eamlocation-type-pickup-view.vue'));
Vue.component('eamasset-state-grid-view', () => import('@pages/asset/eamasset-state-grid-view/eamasset-state-grid-view.vue'));
Vue.component('eamasset-info-main-view', () => import('@pages/asset/eamasset-info-main-view/eamasset-info-main-view.vue'));
Vue.component('eamwork-order-grid-view', () => import('@pages/work-order/eamwork-order-grid-view/eamwork-order-grid-view.vue'));
Vue.component('eamplan-quick-create-view', () => import('@pages/plan/eamplan-quick-create-view/eamplan-quick-create-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('eamwotype-grid-view', () => import('@pages/work-order/eamwotype-grid-view/eamwotype-grid-view.vue'));
Vue.component('eamasset-edit-view', () => import('@pages/asset/eamasset-edit-view/eamasset-edit-view.vue'));
Vue.component('eamasset-type-grid-view', () => import('@pages/asset/eamasset-type-grid-view/eamasset-type-grid-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('eamservice-level-edit-view', () => import('@pages/work-order/eamservice-level-edit-view/eamservice-level-edit-view.vue'));
Vue.component('eamasset-parts-group-parts-asset-grid-view', () => import('@pages/asset/eamasset-parts-group-parts-asset-grid-view/eamasset-parts-group-parts-asset-grid-view.vue'));
Vue.component('eamasset-location-asset-grid-view', () => import('@pages/asset/eamasset-location-asset-grid-view/eamasset-location-asset-grid-view.vue'));
Vue.component('eamapply-type-pickup-grid-view', () => import('@pages/apply/eamapply-type-pickup-grid-view/eamapply-type-pickup-grid-view.vue'));
Vue.component('eamspare-parts-group-info-view', () => import('@pages/asset/eamspare-parts-group-info-view/eamspare-parts-group-info-view.vue'));
Vue.component('eamlocation-info-view', () => import('@pages/location/eamlocation-info-view/eamlocation-info-view.vue'));
Vue.component('eamapply-type-pickup-grid-view', () => import('@pages/apply/eamapply-type-pickup-grid-view/eamapply-type-pickup-grid-view.vue'));
Vue.component('eamasset-parts-group-edit-view', () => import('@pages/asset/eamasset-parts-group-edit-view/eamasset-parts-group-edit-view.vue'));
Vue.component('eammonitor-point-pickup-grid-view', () => import('@pages/work-order/eammonitor-point-pickup-grid-view/eammonitor-point-pickup-grid-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-type-edit-view', () => import('@pages/asset/eamasset-type-edit-view/eamasset-type-edit-view.vue'));
Vue.component('eamwork-order-summary-view', () => import('@pages/work-order/eamwork-order-summary-view/eamwork-order-summary-view.vue'));
Vue.component('eamasset-summary-view', () => import('@pages/asset/eamasset-summary-view/eamasset-summary-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-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('eamasset-info-view', () => import('@pages/asset/eamasset-info-view/eamasset-info-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('eamwotype-pickup-view', () => import('@pages/work-order/eamwotype-pickup-view/eamwotype-pickup-view.vue'));
Vue.component('eamwork-order-info-view', () => import('@pages/work-order/eamwork-order-info-view/eamwork-order-info-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('eamwotype-pickup-view', () => import('@pages/work-order/eamwotype-pickup-view/eamwotype-pickup-view.vue'));
Vue.component('eamapply-quick-create-view', () => import('@pages/apply/eamapply-quick-create-view/eamapply-quick-create-view.vue'));
Vue.component('eamspare-parts-group-pickup-grid-view', () => import('@pages/asset/eamspare-parts-group-pickup-grid-view/eamspare-parts-group-pickup-grid-view.vue'));
Vue.component('eamwotype-edit-view', () => import('@pages/work-order/eamwotype-edit-view/eamwotype-edit-view.vue'));
Vue.component('eamspare-parts-group-pickup-grid-view', () => import('@pages/asset/eamspare-parts-group-pickup-grid-view/eamspare-parts-group-pickup-grid-view.vue'));
Vue.component('eamwork-order-apply-wogrid-view', () => import('@pages/work-order/eamwork-order-apply-wogrid-view/eamwork-order-apply-wogrid-view.vue'));
Vue.component('eamasset-pickup-grid-view', () => import('@pages/asset/eamasset-pickup-grid-view/eamasset-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('eamproductpickup-grid-view', () => import('@pages/asset/eamproductpickup-grid-view/eamproductpickup-grid-view.vue'));
Vue.component('eamlocation-state-model-line-grid-view', () => import('@pages/location/eamlocation-state-model-line-grid-view/eamlocation-state-model-line-grid-view.vue'));
Vue.component('eamplan-pickup-view', () => import('@pages/plan/eamplan-pickup-view/eamplan-pickup-view.vue'));
Vue.component('eamlocation-type-edit-view', () => import('@pages/location/eamlocation-type-edit-view/eamlocation-type-edit-view.vue'));
Vue.component('eamwotype-pickup-grid-view', () => import('@pages/work-order/eamwotype-pickup-grid-view/eamwotype-pickup-grid-view.vue'));
Vue.component('eamspare-parts-group-info-main-view', () => import('@pages/asset/eamspare-parts-group-info-main-view/eamspare-parts-group-info-main-view.vue'));
Vue.component('eamlocation-pickup-grid-view', () => import('@pages/location/eamlocation-pickup-grid-view/eamlocation-pickup-grid-view.vue'));
Vue.component('eamplan-line-grid-view', () => import('@pages/plan/eamplan-line-grid-view/eamplan-line-grid-view.vue'));
Vue.component('eamlocation-grid-view', () => import('@pages/location/eamlocation-grid-view/eamlocation-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('eamapply-summary-view', () => import('@pages/apply/eamapply-summary-view/eamapply-summary-view.vue'));
Vue.component('eamasset-type-pickup-grid-view', () => import('@pages/asset/eamasset-type-pickup-grid-view/eamasset-type-pickup-grid-view.vue'));
Vue.component('eamasset-type-pickup-view', () => import('@pages/asset/eamasset-type-pickup-view/eamasset-type-pickup-view.vue'));
Vue.component('eamproductpickup-view', () => import('@pages/asset/eamproductpickup-view/eamproductpickup-view.vue'));
Vue.component('eamapply-type-edit-view', () => import('@pages/apply/eamapply-type-edit-view/eamapply-type-edit-view.vue'));
Vue.component('eamasset-child-grid-view', () => import('@pages/asset/eamasset-child-grid-view/eamasset-child-grid-view.vue'));
Vue.component('eamspare-parts-group-dashboard-view', () => import('@pages/asset/eamspare-parts-group-dashboard-view/eamspare-parts-group-dashboard-view.vue'));
Vue.component('eamlocation-edit-view', () => import('@pages/location/eamlocation-edit-view/eamlocation-edit-view.vue'));
Vue.component('eamplan-info-view', () => import('@pages/plan/eamplan-info-view/eamplan-info-view.vue'));
Vue.component('eamasset-state-edit-view', () => import('@pages/asset/eamasset-state-edit-view/eamasset-state-edit-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('eamplan-grid-view', () => import('@pages/plan/eamplan-grid-view/eamplan-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('eamplan-pickup-grid-view', () => import('@pages/plan/eamplan-pickup-grid-view/eamplan-pickup-grid-view.vue'));
Vue.component('eamapply-info-view', () => import('@pages/apply/eamapply-info-view/eamapply-info-view.vue'));
Vue.component('eamasset-grid-view', () => import('@pages/asset/eamasset-grid-view/eamasset-grid-view.vue'));
Vue.component('eamspare-parts-group-edit-view', () => import('@pages/asset/eamspare-parts-group-edit-view/eamspare-parts-group-edit-view.vue'));
Vue.component('eammonitor-point-pickup-view', () => import('@pages/work-order/eammonitor-point-pickup-view/eammonitor-point-pickup-view.vue'));
Vue.component('eamapply-type-pickup-view', () => import('@pages/apply/eamapply-type-pickup-view/eamapply-type-pickup-view.vue'));
Vue.component('eamwork-order-child-wogrid-view', () => import('@pages/work-order/eamwork-order-child-wogrid-view/eamwork-order-child-wogrid-view.vue'));
Vue.component('eamwork-order-info-main-view', () => import('@pages/work-order/eamwork-order-info-main-view/eamwork-order-info-main-view.vue'));
Vue.component('eamspare-parts-group-pickup-view', () => import('@pages/asset/eamspare-parts-group-pickup-view/eamspare-parts-group-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('eamplan-quick-create-view', () => import('@pages/plan/eamplan-quick-create-view/eamplan-quick-create-view.vue'));
Vue.component('eamwork-order-grid-view', () => import('@pages/work-order/eamwork-order-grid-view/eamwork-order-grid-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('eamwotype-grid-view', () => import('@pages/work-order/eamwotype-grid-view/eamwotype-grid-view.vue'));
Vue.component('eamasset-location-asset-grid-view', () => import('@pages/asset/eamasset-location-asset-grid-view/eamasset-location-asset-grid-view.vue'));
Vue.component('eamasset-parts-group-parts-asset-grid-view', () => import('@pages/asset/eamasset-parts-group-parts-asset-grid-view/eamasset-parts-group-parts-asset-grid-view.vue'));
Vue.component('eamlocation-info-view', () => import('@pages/location/eamlocation-info-view/eamlocation-info-view.vue'));
Vue.component('eamplan-asset-plan-grid-view', () => import('@pages/plan/eamplan-asset-plan-grid-view/eamplan-asset-plan-grid-view.vue'));
Vue.component('eamasset-type-edit-view', () => import('@pages/asset/eamasset-type-edit-view/eamasset-type-edit-view.vue'));
Vue.component('eamlocation-state-edit-view', () => import('@pages/location/eamlocation-state-edit-view/eamlocation-state-edit-view.vue'));
Vue.component('eamlocation-state-model-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-line-edit-view', () => import('@pages/location/eamlocation-state-model-line-edit-view/eamlocation-state-model-line-edit-view.vue'));
Vue.component('eamasset-pickup-grid-view', () => import('@pages/asset/eamasset-pickup-grid-view/eamasset-pickup-grid-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-type-edit-view', () => import('@pages/location/eamlocation-type-edit-view/eamlocation-type-edit-view.vue'));
Vue.component('eamspare-parts-group-info-main-view', () => import('@pages/asset/eamspare-parts-group-info-main-view/eamspare-parts-group-info-main-view.vue'));
Vue.component('eamlocation-summary-view', () => import('@pages/location/eamlocation-summary-view/eamlocation-summary-view.vue'));
Vue.component('eamasset-pickup-view', () => import('@pages/asset/eamasset-pickup-view/eamasset-pickup-view.vue'));
Vue.component('eamasset-quick-create-view', () => import('@pages/asset/eamasset-quick-create-view/eamasset-quick-create-view.vue'));
Vue.component('eamasset-pickup-view', () => import('@pages/asset/eamasset-pickup-view/eamasset-pickup-view.vue'));
Vue.component('eamapply-type-grid-view', () => import('@pages/apply/eamapply-type-grid-view/eamapply-type-grid-view.vue'));
Vue.component('eamplan-line-grid-view', () => import('@pages/plan/eamplan-line-grid-view/eamplan-line-grid-view.vue'));
Vue.component('eamwork-order-asset-wogrid-view', () => import('@pages/work-order/eamwork-order-asset-wogrid-view/eamwork-order-asset-wogrid-view.vue'));
Vue.component('eamwork-order-quick-create-view', () => import('@pages/work-order/eamwork-order-quick-create-view/eamwork-order-quick-create-view.vue'));
Vue.component('eamlocation-grid-view', () => import('@pages/location/eamlocation-grid-view/eamlocation-grid-view.vue'));
Vue.component('eamasset-type-pickup-grid-view', () => import('@pages/asset/eamasset-type-pickup-grid-view/eamasset-type-pickup-grid-view.vue'));
Vue.component('eamplan-summary-view', () => import('@pages/plan/eamplan-summary-view/eamplan-summary-view.vue'));
Vue.component('eamapply-summary-view', () => import('@pages/apply/eamapply-summary-view/eamapply-summary-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('eamspare-parts-proedit-view', () => import('@pages/asset/eamspare-parts-proedit-view/eamspare-parts-proedit-view.vue'));
}
};
\ No newline at end of file
因为 它太大了无法显示 源差异 。您可以改为 查看blob
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import EAMPlanService from '@/service/eamplan/eamplan-service';
import EAMPlanAuthService from '@/authservice/eamplan/eamplan-auth-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import EAMPlanUIService from '@/uiservice/eamplan/eamplan-ui-service';
import CodeListService from "@service/app/codelist-service";
/**
* 维护计划信息视图基类
*
* @export
* @class EAMPlanAssetPlanGridViewBase
* @extends {GridViewBase}
*/
export class EAMPlanAssetPlanGridViewBase extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMPlanAssetPlanGridViewBase
*/
protected appDeName: string = 'eamplan';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMPlanAssetPlanGridViewBase
*/
protected appDeKey: string = 'eamplanid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMPlanAssetPlanGridViewBase
*/
protected appDeMajor: string = 'eamplanname';
/**
* 实体服务对象
*
* @type {EAMPlanService}
* @memberof EAMPlanAssetPlanGridViewBase
*/
protected appEntityService: EAMPlanService = new EAMPlanService;
/**
* 实体权限服务对象
*
* @type EAMPlanUIService
* @memberof EAMPlanAssetPlanGridViewBase
*/
public appUIService: EAMPlanUIService = new EAMPlanUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMPlanAssetPlanGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMPlanAssetPlanGridViewBase
*/
protected model: any = {
srfCaption: 'entities.eamplan.views.assetplangridview.caption',
srfTitle: 'entities.eamplan.views.assetplangridview.title',
srfSubTitle: 'entities.eamplan.views.assetplangridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMPlanAssetPlanGridViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof EAMPlanAssetPlanGridView
*/
public toolBarModels: any = {
tbitem12_openquickcreateview: { name: 'tbitem12_openquickcreateview', caption: '新建', 'isShowCaption': true, 'isShowIcon': true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'OpenQuickCreateView', target: 'NONE', class: '' } },
tbitem14: { name: 'tbitem14', 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 = '137ce0ca66c0d59f25a3a7c93496b1e6';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMPlanAssetPlanGridViewBase
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMPlanAssetPlanGridViewBase
*/
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: 'eamplan',
majorPSDEField: 'eamplanname',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanAssetPlanGridViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem12_openquickcreateview')) {
this.toolbar_tbitem12_openquickcreateview_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 EAMPlanAssetPlanGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanAssetPlanGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanAssetPlanGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanAssetPlanGridViewBase
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanAssetPlanGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanAssetPlanGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanAssetPlanGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanAssetPlanGridViewBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem12_openquickcreateview_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];
}
// 界面行为
const curUIService:EAMPlanUIService = new EAMPlanUIService();
curUIService.EAMPlan_OpenQuickCreateView(datas,contextJO, paramJO, $event, xData,this,"EAMPlan");
}
/**
* 逻辑事件
*
* @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,"EAMPlan");
}
/**
* 逻辑事件
*
* @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,"EAMPlan");
}
/**
* 逻辑事件
*
* @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,"EAMPlan");
}
/**
* 逻辑事件
*
* @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,"EAMPlan");
}
/**
* 逻辑事件
*
* @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,"EAMPlan");
}
/**
* 逻辑事件
*
* @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,"EAMPlan");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMPlanAssetPlanGridView
*/
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.eamplan;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
let deResParameters: any[] = [];
if(tempContext.eamasset && true){
deResParameters = [
{ pathName: 'eamassets', parameterName: 'eamasset' },
]
}
const parameters: any[] = [
{ pathName: 'eamplans', parameterName: 'eamplan' },
];
const _this: any = this;
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
}
const view: any = {
viewname: 'eamplan-quick-create-view',
height: 0,
width: 0,
title: this.$t('entities.eamplan.views.quickcreateview.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMPlanAssetPlanGridView
*/
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]);
}
let deResParameters: any[] = [];
if(tempContext.eamasset && true){
deResParameters = [
{ pathName: 'eamassets', parameterName: 'eamasset' },
]
}
const parameters: any[] = [
{ pathName: 'eamplans', parameterName: 'eamplan' },
{ 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 EAMPlanAssetPlanGridViewBase
*/
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, { eamplan: args[0].eamplan })
}
_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 EAMPlanAssetPlanGridViewBase
*/
public Copy(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { eamplan: args[0].eamplan });
}
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
Object.assign(this.viewparams,{copymode:true});
}
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMPlanAssetPlanGridViewBase
*/
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 EAMPlanAssetPlanGridViewBase
*/
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 EAMPlanAssetPlanGridViewBase
*/
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 EAMPlanAssetPlanGridViewBase
*/
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="eamplanassetplangridview" viewTitle="维护计划信息" class='degridview eamplan-asset-plan-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.apply(_self, arguments)"/> </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="./eamplan-asset-plan-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMPlanAssetPlanGridViewBase } from './eamplan-asset-plan-grid-view-base';
import view_grid from '@widgets/eamplan/grid-001-grid/grid-001-grid.vue';
import view_searchform from '@widgets/eamplan/default-searchform/default-searchform.vue';
/**
* 维护计划信息视图
*
* @export
* @class EAMPlanAssetPlanGridView
* @extends {EAMPlanAssetPlanGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class EAMPlanAssetPlanGridView extends EAMPlanAssetPlanGridViewBase { }
</script>
......@@ -504,7 +504,12 @@ export class EAMPlanGridViewBase extends GridViewBase {
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
let deResParameters: any[] = [];
if(tempContext.eamasset && true){
deResParameters = [
{ pathName: 'eamassets', parameterName: 'eamasset' },
]
}
const parameters: any[] = [
{ pathName: 'eamplans', parameterName: 'eamplan' },
];
......@@ -550,7 +555,12 @@ export class EAMPlanGridViewBase extends GridViewBase {
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
let deResParameters: any[] = [];
if(tempContext.eamasset && true){
deResParameters = [
{ pathName: 'eamassets', parameterName: 'eamasset' },
]
}
const parameters: any[] = [
{ pathName: 'eamplans', parameterName: 'eamplan' },
{ pathName: 'infoview', parameterName: 'infoview' },
......
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import EAMWorkOrderService from '@/service/eamwork-order/eamwork-order-service';
import EAMWorkOrderAuthService from '@/authservice/eamwork-order/eamwork-order-auth-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import EAMWorkOrderUIService from '@/uiservice/eamwork-order/eamwork-order-ui-service';
import CodeListService from "@service/app/codelist-service";
/**
* 工单信息视图基类
*
* @export
* @class EAMWorkOrderAssetWOGridViewBase
* @extends {GridViewBase}
*/
export class EAMWorkOrderAssetWOGridViewBase extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMWorkOrderAssetWOGridViewBase
*/
protected appDeName: string = 'eamworkorder';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMWorkOrderAssetWOGridViewBase
*/
protected appDeKey: string = 'workorderid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMWorkOrderAssetWOGridViewBase
*/
protected appDeMajor: string = 'workordername';
/**
* 实体服务对象
*
* @type {EAMWorkOrderService}
* @memberof EAMWorkOrderAssetWOGridViewBase
*/
protected appEntityService: EAMWorkOrderService = new EAMWorkOrderService;
/**
* 实体权限服务对象
*
* @type EAMWorkOrderUIService
* @memberof EAMWorkOrderAssetWOGridViewBase
*/
public appUIService: EAMWorkOrderUIService = new EAMWorkOrderUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMWorkOrderAssetWOGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMWorkOrderAssetWOGridViewBase
*/
protected model: any = {
srfCaption: 'entities.eamworkorder.views.assetwogridview.caption',
srfTitle: 'entities.eamworkorder.views.assetwogridview.title',
srfSubTitle: 'entities.eamworkorder.views.assetwogridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMWorkOrderAssetWOGridViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof EAMWorkOrderAssetWOGridView
*/
public toolBarModels: any = {
tbitem12_openquickcreateview: { name: 'tbitem12_openquickcreateview', caption: '新建', 'isShowCaption': true, 'isShowIcon': true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'OpenQuickCreateView', target: 'NONE', class: '' } },
tbitem14: { name: 'tbitem14', 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 = '676593404c77c76b49ada7a06d45a25b';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMWorkOrderAssetWOGridViewBase
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMWorkOrderAssetWOGridViewBase
*/
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: 'eamworkorder',
majorPSDEField: 'workordername',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMWorkOrderAssetWOGridViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem12_openquickcreateview')) {
this.toolbar_tbitem12_openquickcreateview_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 EAMWorkOrderAssetWOGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMWorkOrderAssetWOGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMWorkOrderAssetWOGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMWorkOrderAssetWOGridViewBase
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMWorkOrderAssetWOGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMWorkOrderAssetWOGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMWorkOrderAssetWOGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMWorkOrderAssetWOGridViewBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem12_openquickcreateview_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];
}
// 界面行为
const curUIService:EAMWorkOrderUIService = new EAMWorkOrderUIService();
curUIService.EAMWorkOrder_OpenQuickCreateView(datas,contextJO, paramJO, $event, xData,this,"EAMWorkOrder");
}
/**
* 逻辑事件
*
* @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,"EAMWorkOrder");
}
/**
* 逻辑事件
*
* @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,"EAMWorkOrder");
}
/**
* 逻辑事件
*
* @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,"EAMWorkOrder");
}
/**
* 逻辑事件
*
* @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,"EAMWorkOrder");
}
/**
* 逻辑事件
*
* @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,"EAMWorkOrder");
}
/**
* 逻辑事件
*
* @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,"EAMWorkOrder");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMWorkOrderAssetWOGridView
*/
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.eamworkorder;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
let deResParameters: any[] = [];
if(tempContext.eamapply && true){
deResParameters = [
{ pathName: 'eamapplies', parameterName: 'eamapply' },
]
}
const parameters: any[] = [
{ pathName: 'eamworkorders', parameterName: 'eamworkorder' },
];
const _this: any = this;
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
}
const view: any = {
viewname: 'eamwork-order-quick-create-view',
height: 0,
width: 0,
title: this.$t('entities.eamworkorder.views.quickcreateview.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMWorkOrderAssetWOGridView
*/
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]);
}
let deResParameters: any[] = [];
if(tempContext.eamapply && true){
deResParameters = [
{ pathName: 'eamapplies', parameterName: 'eamapply' },
]
}
const parameters: any[] = [
{ pathName: 'eamworkorders', parameterName: 'eamworkorder' },
{ 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 EAMWorkOrderAssetWOGridViewBase
*/
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, { eamworkorder: args[0].eamworkorder })
}
_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 EAMWorkOrderAssetWOGridViewBase
*/
public Copy(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { eamworkorder: args[0].eamworkorder });
}
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
Object.assign(this.viewparams,{copymode:true});
}
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMWorkOrderAssetWOGridViewBase
*/
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 EAMWorkOrderAssetWOGridViewBase
*/
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 EAMWorkOrderAssetWOGridViewBase
*/
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 EAMWorkOrderAssetWOGridViewBase
*/
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="eamworkorderassetwogridview" viewTitle="工单信息" class='degridview eamwork-order-asset-wogrid-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.apply(_self, arguments)"/> </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="./eamwork-order-asset-wogrid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMWorkOrderAssetWOGridViewBase } from './eamwork-order-asset-wogrid-view-base';
import view_grid from '@widgets/eamwork-order/grid-003-grid/grid-003-grid.vue';
import view_searchform from '@widgets/eamwork-order/default-searchform/default-searchform.vue';
/**
* 工单信息视图
*
* @export
* @class EAMWorkOrderAssetWOGridView
* @extends {EAMWorkOrderAssetWOGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class EAMWorkOrderAssetWOGridView extends EAMWorkOrderAssetWOGridViewBase { }
</script>
......@@ -48,6 +48,16 @@ export default class EAMApplyServiceBase extends EntityService {
* @memberof EAMApplyServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamapply){
let res:any = Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/select`,isloading);
return res;
}
if(context.eamasset && context.eamapply){
let res:any = Http.getInstance().get(`/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/select`,isloading);
return res;
}
let res:any = Http.getInstance().get(`/eamapplies/${context.eamapply}/select`,isloading);
return res;
......@@ -63,6 +73,36 @@ export default class EAMApplyServiceBase extends EntityService {
* @memberof EAMApplyServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && 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/${context.eamasset}/eamapplies`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_eamworkorders',JSON.stringify(res.data.eamworkorders?res.data.eamworkorders:[]));
return res;
}
if(context.eamasset && 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(`/eamassets/${context.eamasset}/eamapplies`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_eamworkorders',JSON.stringify(res.data.eamworkorders?res.data.eamworkorders:[]));
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
......@@ -88,6 +128,20 @@ export default class EAMApplyServiceBase extends EntityService {
* @memberof EAMApplyServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamapply){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamapplies/${context.eamapply}`,data,isloading);
return res;
}
if(context.eamasset && context.eamapply){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamassets/${context.eamasset}/eamapplies/${context.eamapply}`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamapplies/${context.eamapply}`,data,isloading);
......@@ -105,6 +159,14 @@ export default class EAMApplyServiceBase extends EntityService {
* @memberof EAMApplyServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamapply){
let res:any = Http.getInstance().delete(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamapplies/${context.eamapply}`,isloading);
return res;
}
if(context.eamasset && context.eamapply){
let res:any = Http.getInstance().delete(`/eamassets/${context.eamasset}/eamapplies/${context.eamapply}`,isloading);
return res;
}
let res:any = Http.getInstance().delete(`/eamapplies/${context.eamapply}`,isloading);
return res;
}
......@@ -119,6 +181,16 @@ export default class EAMApplyServiceBase extends EntityService {
* @memberof EAMApplyServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamapply){
let res:any = await Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamapplies/${context.eamapply}`,isloading);
return res;
}
if(context.eamasset && context.eamapply){
let res:any = await Http.getInstance().get(`/eamassets/${context.eamasset}/eamapplies/${context.eamapply}`,isloading);
return res;
}
let res:any = await Http.getInstance().get(`/eamapplies/${context.eamapply}`,isloading);
return res;
......@@ -134,6 +206,18 @@ export default class EAMApplyServiceBase extends EntityService {
* @memberof EAMApplyServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && true){
let res:any = await Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamapplies/getdraft`,isloading);
res.data.eamapply = data.eamapply;
return res;
}
if(context.eamasset && true){
let res:any = await Http.getInstance().get(`/eamassets/${context.eamasset}/eamapplies/getdraft`,isloading);
res.data.eamapply = data.eamapply;
return res;
}
let res:any = await Http.getInstance().get(`/eamapplies/getdraft`,isloading);
res.data.eamapply = data.eamapply;
......@@ -150,6 +234,20 @@ export default class EAMApplyServiceBase extends EntityService {
* @memberof EAMApplyServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamapply){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/checkkey`,data,isloading);
return res;
}
if(context.eamasset && context.eamapply){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/checkkey`,data,isloading);
return res;
}
let res:any = Http.getInstance().post(`/eamapplies/${context.eamapply}/checkkey`,data,isloading);
return res;
}
......@@ -164,6 +262,20 @@ export default class EAMApplyServiceBase extends EntityService {
* @memberof EAMApplyServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamapply){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/save`,data,isloading);
return res;
}
if(context.eamasset && context.eamapply){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/save`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamapplies/${context.eamapply}/save`,data,isloading);
......@@ -181,6 +293,16 @@ export default class EAMApplyServiceBase extends EntityService {
* @memberof EAMApplyServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamapplies/fetchdefault`,tempData,isloading);
return res;
}
if(context.eamasset && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamassets/${context.eamasset}/eamapplies/fetchdefault`,tempData,isloading);
return res;
}
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamapplies/fetchdefault`,tempData,isloading);
return res;
......
......@@ -79,7 +79,10 @@ export default class EAMAssetServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamlocations/${context.eamlocation}/eamassets`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_eamapplies',JSON.stringify(res.data.eamapplies?res.data.eamapplies:[]));
this.tempStorage.setItem(tempContext.srfsessionkey+'_eamassets',JSON.stringify(res.data.eamassets?res.data.eamassets:[]));
this.tempStorage.setItem(tempContext.srfsessionkey+'_eamplans',JSON.stringify(res.data.eamplans?res.data.eamplans:[]));
this.tempStorage.setItem(tempContext.srfsessionkey+'_eamworkorders',JSON.stringify(res.data.eamworkorders?res.data.eamworkorders:[]));
return res;
}
......@@ -93,7 +96,10 @@ export default class EAMAssetServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eamassets`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_eamapplies',JSON.stringify(res.data.eamapplies?res.data.eamapplies:[]));
this.tempStorage.setItem(tempContext.srfsessionkey+'_eamassets',JSON.stringify(res.data.eamassets?res.data.eamassets:[]));
this.tempStorage.setItem(tempContext.srfsessionkey+'_eamplans',JSON.stringify(res.data.eamplans?res.data.eamplans:[]));
this.tempStorage.setItem(tempContext.srfsessionkey+'_eamworkorders',JSON.stringify(res.data.eamworkorders?res.data.eamworkorders:[]));
return res;
}
......
......@@ -48,6 +48,16 @@ export default class EAMPlanLineServiceBase extends EntityService {
* @memberof EAMPlanLineServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan && context.eamplanline){
let res:any = Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}/select`,isloading);
return res;
}
if(context.eamasset && context.eamplan && context.eamplanline){
let res:any = Http.getInstance().get(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}/select`,isloading);
return res;
}
if(context.eamplan && context.eamplanline){
let res:any = Http.getInstance().get(`/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}/select`,isloading);
......@@ -68,6 +78,34 @@ export default class EAMPlanLineServiceBase extends EntityService {
* @memberof EAMPlanLineServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan && 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/${context.eamasset}/eamplans/${context.eamplan}/eamplanlines`,data,isloading);
return res;
}
if(context.eamasset && context.eamplan && 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(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamplanlines`,data,isloading);
return res;
}
if(context.eamplan && true){
let masterData:any = {};
Object.assign(data,masterData);
......@@ -106,6 +144,20 @@ export default class EAMPlanLineServiceBase extends EntityService {
* @memberof EAMPlanLineServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan && context.eamplanline){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}`,data,isloading);
return res;
}
if(context.eamasset && context.eamplan && context.eamplanline){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}`,data,isloading);
return res;
}
if(context.eamplan && context.eamplanline){
let masterData:any = {};
Object.assign(data,masterData);
......@@ -130,6 +182,14 @@ export default class EAMPlanLineServiceBase extends EntityService {
* @memberof EAMPlanLineServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan && context.eamplanline){
let res:any = Http.getInstance().delete(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}`,isloading);
return res;
}
if(context.eamasset && context.eamplan && context.eamplanline){
let res:any = Http.getInstance().delete(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}`,isloading);
return res;
}
if(context.eamplan && context.eamplanline){
let res:any = Http.getInstance().delete(`/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}`,isloading);
return res;
......@@ -148,6 +208,16 @@ export default class EAMPlanLineServiceBase extends EntityService {
* @memberof EAMPlanLineServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan && context.eamplanline){
let res:any = await Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}`,isloading);
return res;
}
if(context.eamasset && context.eamplan && context.eamplanline){
let res:any = await Http.getInstance().get(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}`,isloading);
return res;
}
if(context.eamplan && context.eamplanline){
let res:any = await Http.getInstance().get(`/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}`,isloading);
......@@ -168,6 +238,18 @@ export default class EAMPlanLineServiceBase extends EntityService {
* @memberof EAMPlanLineServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan && true){
let res:any = await Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamplanlines/getdraft`,isloading);
res.data.eamplanline = data.eamplanline;
return res;
}
if(context.eamasset && context.eamplan && true){
let res:any = await Http.getInstance().get(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamplanlines/getdraft`,isloading);
res.data.eamplanline = data.eamplanline;
return res;
}
if(context.eamplan && true){
let res:any = await Http.getInstance().get(`/eamplans/${context.eamplan}/eamplanlines/getdraft`,isloading);
res.data.eamplanline = data.eamplanline;
......@@ -190,6 +272,20 @@ export default class EAMPlanLineServiceBase extends EntityService {
* @memberof EAMPlanLineServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan && context.eamplanline){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}/checkkey`,data,isloading);
return res;
}
if(context.eamasset && context.eamplan && context.eamplanline){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}/checkkey`,data,isloading);
return res;
}
if(context.eamplan && context.eamplanline){
let masterData:any = {};
Object.assign(data,masterData);
......@@ -211,6 +307,20 @@ export default class EAMPlanLineServiceBase extends EntityService {
* @memberof EAMPlanLineServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan && context.eamplanline){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}/save`,data,isloading);
return res;
}
if(context.eamasset && context.eamplan && context.eamplanline){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}/save`,data,isloading);
return res;
}
if(context.eamplan && context.eamplanline){
let masterData:any = {};
Object.assign(data,masterData);
......@@ -235,6 +345,16 @@ export default class EAMPlanLineServiceBase extends EntityService {
* @memberof EAMPlanLineServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamplanlines/fetchdefault`,tempData,isloading);
return res;
}
if(context.eamasset && context.eamplan && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamplanlines/fetchdefault`,tempData,isloading);
return res;
}
if(context.eamplan && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamplans/${context.eamplan}/eamplanlines/fetchdefault`,tempData,isloading);
......
......@@ -48,6 +48,16 @@ export default class EAMPlanServiceBase extends EntityService {
* @memberof EAMPlanServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan){
let res:any = Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/select`,isloading);
return res;
}
if(context.eamasset && context.eamplan){
let res:any = Http.getInstance().get(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/select`,isloading);
return res;
}
let res:any = Http.getInstance().get(`/eamplans/${context.eamplan}/select`,isloading);
return res;
......@@ -63,6 +73,38 @@ export default class EAMPlanServiceBase extends EntityService {
* @memberof EAMPlanServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && 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/${context.eamasset}/eamplans`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_eamplanlines',JSON.stringify(res.data.eamplanlines?res.data.eamplanlines:[]));
this.tempStorage.setItem(tempContext.srfsessionkey+'_eamworkorders',JSON.stringify(res.data.eamworkorders?res.data.eamworkorders:[]));
return res;
}
if(context.eamasset && 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(`/eamassets/${context.eamasset}/eamplans`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_eamplanlines',JSON.stringify(res.data.eamplanlines?res.data.eamplanlines:[]));
this.tempStorage.setItem(tempContext.srfsessionkey+'_eamworkorders',JSON.stringify(res.data.eamworkorders?res.data.eamworkorders:[]));
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
......@@ -89,6 +131,20 @@ export default class EAMPlanServiceBase extends EntityService {
* @memberof EAMPlanServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}`,data,isloading);
return res;
}
if(context.eamasset && context.eamplan){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamplans/${context.eamplan}`,data,isloading);
......@@ -106,6 +162,14 @@ export default class EAMPlanServiceBase extends EntityService {
* @memberof EAMPlanServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan){
let res:any = Http.getInstance().delete(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}`,isloading);
return res;
}
if(context.eamasset && context.eamplan){
let res:any = Http.getInstance().delete(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}`,isloading);
return res;
}
let res:any = Http.getInstance().delete(`/eamplans/${context.eamplan}`,isloading);
return res;
}
......@@ -120,6 +184,16 @@ export default class EAMPlanServiceBase extends EntityService {
* @memberof EAMPlanServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan){
let res:any = await Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}`,isloading);
return res;
}
if(context.eamasset && context.eamplan){
let res:any = await Http.getInstance().get(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}`,isloading);
return res;
}
let res:any = await Http.getInstance().get(`/eamplans/${context.eamplan}`,isloading);
return res;
......@@ -135,6 +209,18 @@ export default class EAMPlanServiceBase extends EntityService {
* @memberof EAMPlanServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && true){
let res:any = await Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/getdraft`,isloading);
res.data.eamplan = data.eamplan;
return res;
}
if(context.eamasset && true){
let res:any = await Http.getInstance().get(`/eamassets/${context.eamasset}/eamplans/getdraft`,isloading);
res.data.eamplan = data.eamplan;
return res;
}
let res:any = await Http.getInstance().get(`/eamplans/getdraft`,isloading);
res.data.eamplan = data.eamplan;
......@@ -151,6 +237,20 @@ export default class EAMPlanServiceBase extends EntityService {
* @memberof EAMPlanServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/checkkey`,data,isloading);
return res;
}
if(context.eamasset && context.eamplan){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/checkkey`,data,isloading);
return res;
}
let res:any = Http.getInstance().post(`/eamplans/${context.eamplan}/checkkey`,data,isloading);
return res;
}
......@@ -165,6 +265,20 @@ export default class EAMPlanServiceBase extends EntityService {
* @memberof EAMPlanServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/save`,data,isloading);
return res;
}
if(context.eamasset && context.eamplan){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/save`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamplans/${context.eamplan}/save`,data,isloading);
......@@ -182,6 +296,16 @@ export default class EAMPlanServiceBase extends EntityService {
* @memberof EAMPlanServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/fetchdefault`,tempData,isloading);
return res;
}
if(context.eamasset && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamassets/${context.eamasset}/eamplans/fetchdefault`,tempData,isloading);
return res;
}
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamplans/fetchdefault`,tempData,isloading);
return res;
......
......@@ -48,11 +48,41 @@ export default class EAMWorkOrderServiceBase extends EntityService {
* @memberof EAMWorkOrderServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan && context.eamworkorder){
let res:any = Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders/${context.eamworkorder}/select`,isloading);
return res;
}
if(context.eamlocation && context.eamasset && context.eamapply && context.eamworkorder){
let res:any = Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders/${context.eamworkorder}/select`,isloading);
return res;
}
if(context.eamasset && context.eamplan && context.eamworkorder){
let res:any = Http.getInstance().get(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders/${context.eamworkorder}/select`,isloading);
return res;
}
if(context.eamlocation && context.eamasset && context.eamworkorder){
let res:any = Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamworkorders/${context.eamworkorder}/select`,isloading);
return res;
}
if(context.eamasset && context.eamapply && context.eamworkorder){
let res:any = Http.getInstance().get(`/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders/${context.eamworkorder}/select`,isloading);
return res;
}
if(context.eamplan && context.eamworkorder){
let res:any = Http.getInstance().get(`/eamplans/${context.eamplan}/eamworkorders/${context.eamworkorder}/select`,isloading);
return res;
}
if(context.eamasset && context.eamworkorder){
let res:any = Http.getInstance().get(`/eamassets/${context.eamasset}/eamworkorders/${context.eamworkorder}/select`,isloading);
return res;
}
if(context.eamapply && context.eamworkorder){
let res:any = Http.getInstance().get(`/eamapplies/${context.eamapply}/eamworkorders/${context.eamworkorder}/select`,isloading);
......@@ -73,6 +103,76 @@ export default class EAMWorkOrderServiceBase extends EntityService {
* @memberof EAMWorkOrderServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan && 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/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders`,data,isloading);
return res;
}
if(context.eamlocation && context.eamasset && context.eamapply && 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/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders`,data,isloading);
return res;
}
if(context.eamasset && context.eamplan && 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(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders`,data,isloading);
return res;
}
if(context.eamlocation && context.eamasset && 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/${context.eamasset}/eamworkorders`,data,isloading);
return res;
}
if(context.eamasset && context.eamapply && 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(`/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders`,data,isloading);
return res;
}
if(context.eamplan && true){
let masterData:any = {};
Object.assign(data,masterData);
......@@ -87,6 +187,20 @@ export default class EAMWorkOrderServiceBase extends EntityService {
return res;
}
if(context.eamasset && 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(`/eamassets/${context.eamasset}/eamworkorders`,data,isloading);
return res;
}
if(context.eamapply && true){
let masterData:any = {};
Object.assign(data,masterData);
......@@ -125,6 +239,41 @@ export default class EAMWorkOrderServiceBase extends EntityService {
* @memberof EAMWorkOrderServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders/${context.eamworkorder}`,data,isloading);
return res;
}
if(context.eamlocation && context.eamasset && context.eamapply && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders/${context.eamworkorder}`,data,isloading);
return res;
}
if(context.eamasset && context.eamplan && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders/${context.eamworkorder}`,data,isloading);
return res;
}
if(context.eamlocation && context.eamasset && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamworkorders/${context.eamworkorder}`,data,isloading);
return res;
}
if(context.eamasset && context.eamapply && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders/${context.eamworkorder}`,data,isloading);
return res;
}
if(context.eamplan && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
......@@ -132,6 +281,13 @@ export default class EAMWorkOrderServiceBase extends EntityService {
return res;
}
if(context.eamasset && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamassets/${context.eamasset}/eamworkorders/${context.eamworkorder}`,data,isloading);
return res;
}
if(context.eamapply && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
......@@ -156,10 +312,34 @@ export default class EAMWorkOrderServiceBase extends EntityService {
* @memberof EAMWorkOrderServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan && context.eamworkorder){
let res:any = Http.getInstance().delete(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders/${context.eamworkorder}`,isloading);
return res;
}
if(context.eamlocation && context.eamasset && context.eamapply && context.eamworkorder){
let res:any = Http.getInstance().delete(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders/${context.eamworkorder}`,isloading);
return res;
}
if(context.eamasset && context.eamplan && context.eamworkorder){
let res:any = Http.getInstance().delete(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders/${context.eamworkorder}`,isloading);
return res;
}
if(context.eamlocation && context.eamasset && context.eamworkorder){
let res:any = Http.getInstance().delete(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamworkorders/${context.eamworkorder}`,isloading);
return res;
}
if(context.eamasset && context.eamapply && context.eamworkorder){
let res:any = Http.getInstance().delete(`/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders/${context.eamworkorder}`,isloading);
return res;
}
if(context.eamplan && context.eamworkorder){
let res:any = Http.getInstance().delete(`/eamplans/${context.eamplan}/eamworkorders/${context.eamworkorder}`,isloading);
return res;
}
if(context.eamasset && context.eamworkorder){
let res:any = Http.getInstance().delete(`/eamassets/${context.eamasset}/eamworkorders/${context.eamworkorder}`,isloading);
return res;
}
if(context.eamapply && context.eamworkorder){
let res:any = Http.getInstance().delete(`/eamapplies/${context.eamapply}/eamworkorders/${context.eamworkorder}`,isloading);
return res;
......@@ -178,11 +358,41 @@ export default class EAMWorkOrderServiceBase extends EntityService {
* @memberof EAMWorkOrderServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan && context.eamworkorder){
let res:any = await Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders/${context.eamworkorder}`,isloading);
return res;
}
if(context.eamlocation && context.eamasset && context.eamapply && context.eamworkorder){
let res:any = await Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders/${context.eamworkorder}`,isloading);
return res;
}
if(context.eamasset && context.eamplan && context.eamworkorder){
let res:any = await Http.getInstance().get(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders/${context.eamworkorder}`,isloading);
return res;
}
if(context.eamlocation && context.eamasset && context.eamworkorder){
let res:any = await Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamworkorders/${context.eamworkorder}`,isloading);
return res;
}
if(context.eamasset && context.eamapply && context.eamworkorder){
let res:any = await Http.getInstance().get(`/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders/${context.eamworkorder}`,isloading);
return res;
}
if(context.eamplan && context.eamworkorder){
let res:any = await Http.getInstance().get(`/eamplans/${context.eamplan}/eamworkorders/${context.eamworkorder}`,isloading);
return res;
}
if(context.eamasset && context.eamworkorder){
let res:any = await Http.getInstance().get(`/eamassets/${context.eamasset}/eamworkorders/${context.eamworkorder}`,isloading);
return res;
}
if(context.eamapply && context.eamworkorder){
let res:any = await Http.getInstance().get(`/eamapplies/${context.eamapply}/eamworkorders/${context.eamworkorder}`,isloading);
......@@ -203,12 +413,48 @@ export default class EAMWorkOrderServiceBase extends EntityService {
* @memberof EAMWorkOrderServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan && true){
let res:any = await Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders/getdraft`,isloading);
res.data.eamworkorder = data.eamworkorder;
return res;
}
if(context.eamlocation && context.eamasset && context.eamapply && true){
let res:any = await Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders/getdraft`,isloading);
res.data.eamworkorder = data.eamworkorder;
return res;
}
if(context.eamasset && context.eamplan && true){
let res:any = await Http.getInstance().get(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders/getdraft`,isloading);
res.data.eamworkorder = data.eamworkorder;
return res;
}
if(context.eamlocation && context.eamasset && true){
let res:any = await Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamworkorders/getdraft`,isloading);
res.data.eamworkorder = data.eamworkorder;
return res;
}
if(context.eamasset && context.eamapply && true){
let res:any = await Http.getInstance().get(`/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders/getdraft`,isloading);
res.data.eamworkorder = data.eamworkorder;
return res;
}
if(context.eamplan && true){
let res:any = await Http.getInstance().get(`/eamplans/${context.eamplan}/eamworkorders/getdraft`,isloading);
res.data.eamworkorder = data.eamworkorder;
return res;
}
if(context.eamasset && true){
let res:any = await Http.getInstance().get(`/eamassets/${context.eamasset}/eamworkorders/getdraft`,isloading);
res.data.eamworkorder = data.eamworkorder;
return res;
}
if(context.eamapply && true){
let res:any = await Http.getInstance().get(`/eamapplies/${context.eamapply}/eamworkorders/getdraft`,isloading);
res.data.eamworkorder = data.eamworkorder;
......@@ -231,6 +477,41 @@ export default class EAMWorkOrderServiceBase extends EntityService {
* @memberof EAMWorkOrderServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders/${context.eamworkorder}/checkkey`,data,isloading);
return res;
}
if(context.eamlocation && context.eamasset && context.eamapply && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders/${context.eamworkorder}/checkkey`,data,isloading);
return res;
}
if(context.eamasset && context.eamplan && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders/${context.eamworkorder}/checkkey`,data,isloading);
return res;
}
if(context.eamlocation && context.eamasset && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamworkorders/${context.eamworkorder}/checkkey`,data,isloading);
return res;
}
if(context.eamasset && context.eamapply && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders/${context.eamworkorder}/checkkey`,data,isloading);
return res;
}
if(context.eamplan && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
......@@ -238,6 +519,13 @@ export default class EAMWorkOrderServiceBase extends EntityService {
return res;
}
if(context.eamasset && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamassets/${context.eamasset}/eamworkorders/${context.eamworkorder}/checkkey`,data,isloading);
return res;
}
if(context.eamapply && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
......@@ -259,6 +547,41 @@ export default class EAMWorkOrderServiceBase extends EntityService {
* @memberof EAMWorkOrderServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders/${context.eamworkorder}/save`,data,isloading);
return res;
}
if(context.eamlocation && context.eamasset && context.eamapply && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders/${context.eamworkorder}/save`,data,isloading);
return res;
}
if(context.eamasset && context.eamplan && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders/${context.eamworkorder}/save`,data,isloading);
return res;
}
if(context.eamlocation && context.eamasset && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamworkorders/${context.eamworkorder}/save`,data,isloading);
return res;
}
if(context.eamasset && context.eamapply && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders/${context.eamworkorder}/save`,data,isloading);
return res;
}
if(context.eamplan && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
......@@ -266,6 +589,13 @@ export default class EAMWorkOrderServiceBase extends EntityService {
return res;
}
if(context.eamasset && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamassets/${context.eamasset}/eamworkorders/${context.eamworkorder}/save`,data,isloading);
return res;
}
if(context.eamapply && context.eamworkorder){
let masterData:any = {};
Object.assign(data,masterData);
......@@ -290,11 +620,41 @@ export default class EAMWorkOrderServiceBase extends EntityService {
* @memberof EAMWorkOrderServiceBase
*/
public async FetchChildWO(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders/fetchchildwo`,tempData,isloading);
return res;
}
if(context.eamlocation && context.eamasset && context.eamapply && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders/fetchchildwo`,tempData,isloading);
return res;
}
if(context.eamasset && context.eamplan && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders/fetchchildwo`,tempData,isloading);
return res;
}
if(context.eamlocation && context.eamasset && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamworkorders/fetchchildwo`,tempData,isloading);
return res;
}
if(context.eamasset && context.eamapply && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders/fetchchildwo`,tempData,isloading);
return res;
}
if(context.eamplan && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamplans/${context.eamplan}/eamworkorders/fetchchildwo`,tempData,isloading);
return res;
}
if(context.eamasset && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamassets/${context.eamasset}/eamworkorders/fetchchildwo`,tempData,isloading);
return res;
}
if(context.eamapply && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamapplies/${context.eamapply}/eamworkorders/fetchchildwo`,tempData,isloading);
......@@ -315,11 +675,41 @@ export default class EAMWorkOrderServiceBase extends EntityService {
* @memberof EAMWorkOrderServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamlocation && context.eamasset && context.eamplan && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders/fetchdefault`,tempData,isloading);
return res;
}
if(context.eamlocation && context.eamasset && context.eamapply && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders/fetchdefault`,tempData,isloading);
return res;
}
if(context.eamasset && context.eamplan && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamassets/${context.eamasset}/eamplans/${context.eamplan}/eamworkorders/fetchdefault`,tempData,isloading);
return res;
}
if(context.eamlocation && context.eamasset && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamlocations/${context.eamlocation}/eamassets/${context.eamasset}/eamworkorders/fetchdefault`,tempData,isloading);
return res;
}
if(context.eamasset && context.eamapply && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamassets/${context.eamasset}/eamapplies/${context.eamapply}/eamworkorders/fetchdefault`,tempData,isloading);
return res;
}
if(context.eamplan && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamplans/${context.eamplan}/eamworkorders/fetchdefault`,tempData,isloading);
return res;
}
if(context.eamasset && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamassets/${context.eamasset}/eamworkorders/fetchdefault`,tempData,isloading);
return res;
}
if(context.eamapply && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamapplies/${context.eamapply}/eamworkorders/fetchdefault`,tempData,isloading);
......
......@@ -64,6 +64,17 @@ export const viewstate: any = {
'21edc7e27023f06aac51f150f3fb1f10',
],
},
{
viewtag: '137ce0ca66c0d59f25a3a7c93496b1e6',
viewmodule: 'Plan',
viewname: 'EAMPlanAssetPlanGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'c98258106bd8b2d56bbadf7a67179c2e',
'66df4099ca35ed7c25fe15aca40ea3a5',
],
},
{
viewtag: '15caf81deb1f02479030f14d90ce5c3e',
viewmodule: 'Asset',
......@@ -262,6 +273,17 @@ export const viewstate: any = {
'afb13d98ae97ebb876598388432f8c1d',
],
},
{
viewtag: '54b41ee0f64fc8764a9d3cf1559c09db',
viewmodule: 'Apply',
viewname: 'EAMApplyAssetApplyGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'ef9454c4b53cd737f1beca7bf2c5ea25',
'96e58ee9a57415beb8209aae53b14926',
],
},
{
viewtag: '580afbcfa6a1d32b3591d40eaa1b9d5a',
viewmodule: 'Apply',
......@@ -304,6 +326,17 @@ export const viewstate: any = {
'6e69be88d76554770ec8448800b6881d',
],
},
{
viewtag: '676593404c77c76b49ada7a06d45a25b',
viewmodule: 'WorkOrder',
viewname: 'EAMWorkOrderAssetWOGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'326f3b663c055e3f1ec6fa0d2c3f0223',
'2fc820c040c33d878fc98791e3ad6d80',
],
},
{
viewtag: '687ed577b14b3da7a542f17d0a1a6529',
viewmodule: 'WorkOrder',
......@@ -340,7 +373,10 @@ export const viewstate: any = {
viewaction: '',
viewdatachange: false,
refviews: [
'676593404c77c76b49ada7a06d45a25b',
'3bac4846ece1082b8c3799d9a1fc7dde',
'137ce0ca66c0d59f25a3a7c93496b1e6',
'54b41ee0f64fc8764a9d3cf1559c09db',
'4db903dc10459c98d4834775020d8b74',
'c8bf8b682adc459f7f285328199ba4b4',
],
......
......@@ -90,6 +90,7 @@ export default class EAMApplyUIServiceBase extends UIService {
*/
public initViewMap(){
this.allViewMap.set(':',{viewname:'info_mainview',srfappde:'eamapplies'});
this.allViewMap.set(':',{viewname:'assetapplygridview',srfappde:'eamapplies'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'eamapplies'});
this.allViewMap.set(':',{viewname:'summaryview',srfappde:'eamapplies'});
this.allViewMap.set(':',{viewname:'infoview',srfappde:'eamapplies'});
......@@ -145,6 +146,11 @@ export default class EAMApplyUIServiceBase extends UIService {
Object.assign(data,parentObj);
Object.assign(context,parentObj);
let deResParameters: any[] = [];
if(context.eamasset && true){
deResParameters = [
{ pathName: 'eamassets', parameterName: 'eamasset' },
]
}
const parameters: any[] = [
{ pathName: 'eamapplies', parameterName: 'eamapply' },
];
......@@ -211,6 +217,11 @@ export default class EAMApplyUIServiceBase extends UIService {
Object.assign(data,parentObj);
Object.assign(context,parentObj);
let deResParameters: any[] = [];
if(context.eamasset && true){
deResParameters = [
{ pathName: 'eamassets', parameterName: 'eamasset' },
]
}
const parameters: any[] = [
{ pathName: 'eamapplies', parameterName: 'eamapply' },
{ pathName: 'infoview', parameterName: 'infoview' },
......
......@@ -89,6 +89,7 @@ export default class EAMPlanUIServiceBase extends UIService {
* @memberof EAMPlanUIServiceBase
*/
public initViewMap(){
this.allViewMap.set(':',{viewname:'assetplangridview',srfappde:'eamplans'});
this.allViewMap.set(':',{viewname:'infoview',srfappde:'eamplans'});
this.allViewMap.set(':',{viewname:'summaryview',srfappde:'eamplans'});
this.allViewMap.set(':',{viewname:'info_mainview',srfappde:'eamplans'});
......@@ -147,6 +148,11 @@ export default class EAMPlanUIServiceBase extends UIService {
Object.assign(data,parentObj);
Object.assign(context,parentObj);
let deResParameters: any[] = [];
if(context.eamasset && true){
deResParameters = [
{ pathName: 'eamassets', parameterName: 'eamasset' },
]
}
const parameters: any[] = [
{ pathName: 'eamplans', parameterName: 'eamplan' },
];
......@@ -212,6 +218,11 @@ export default class EAMPlanUIServiceBase extends UIService {
Object.assign(data,parentObj);
Object.assign(context,parentObj);
let deResParameters: any[] = [];
if(context.eamasset && true){
deResParameters = [
{ pathName: 'eamassets', parameterName: 'eamasset' },
]
}
const parameters: any[] = [
{ pathName: 'eamplans', parameterName: 'eamplan' },
{ pathName: 'infoview', parameterName: 'infoview' },
......
......@@ -92,6 +92,7 @@ export default class EAMWorkOrderUIServiceBase extends UIService {
this.allViewMap.set(':',{viewname:'infoview',srfappde:'eamworkorders'});
this.allViewMap.set(':',{viewname:'quickcreateview',srfappde:'eamworkorders'});
this.allViewMap.set(':',{viewname:'info_mainview',srfappde:'eamworkorders'});
this.allViewMap.set(':',{viewname:'assetwogridview',srfappde:'eamworkorders'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'eamworkorders'});
this.allViewMap.set(':',{viewname:'childwogridview',srfappde:'eamworkorders'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'eamworkorders'});
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, GridControlBase } from '@/studio-core';
import EAMApplyService from '@/service/eamapply/eamapply-service';
import GRID_001Service from './grid-001-grid-service';
import EAMApplyUIService from '@/uiservice/eamapply/eamapply-ui-service';
import { FormItemModel } from '@/model/form-detail';
/**
* grid部件基类
*
* @export
* @class GridControlBase
* @extends {GRID_001GridBase}
*/
export class GRID_001GridBase extends GridControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof GRID_001GridBase
*/
protected controlType: string = 'GRID';
/**
* 建构部件服务对象
*
* @type {GRID_001Service}
* @memberof GRID_001GridBase
*/
public service: GRID_001Service = new GRID_001Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMApplyService}
* @memberof GRID_001GridBase
*/
public appEntityService: EAMApplyService = new EAMApplyService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof GRID_001GridBase
*/
protected appDeName: string = 'eamapply';
/**
* 应用实体中文名称
*
* @protected
* @type {string}
* @memberof GRID_001GridBase
*/
protected appDeLogicName: string = '维护申请';
/**
* 界面UI服务对象
*
* @type {EAMApplyUIService}
* @memberof GRID_001Base
*/
public appUIService:EAMApplyUIService = new EAMApplyUIService(this.$store);
/**
* 界面行为模型
*
* @type {*}
* @memberof GRID_001Base
*/
public ActionModel: any = {
};
/**
* 本地缓存标识
*
* @protected
* @type {string}
* @memberof GRID_001Base
*/
protected localStorageTag: string = 'eamapply_grid_001_grid';
/**
* 所有列成员
*
* @type {any[]}
* @memberof GRID_001GridBase
*/
public allColumns: any[] = [
{
name: 'assetname',
label: '资产',
langtag: 'entities.eamapply.grid_001_grid.columns.assetname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'applynumber',
label: '维护申请编号',
langtag: 'entities.eamapply.grid_001_grid.columns.applynumber',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamapplyname',
label: '维护申请名称',
langtag: 'entities.eamapply.grid_001_grid.columns.eamapplyname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamapplytypename',
label: '维护申请类型',
langtag: 'entities.eamapply.grid_001_grid.columns.eamapplytypename',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamlocationname',
label: '功能位置',
langtag: 'entities.eamapply.grid_001_grid.columns.eamlocationname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'begintime',
label: '希望开始时间',
langtag: 'entities.eamapply.grid_001_grid.columns.begintime',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'endtime',
label: '希望结束时间',
langtag: 'entities.eamapply.grid_001_grid.columns.endtime',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
]
/**
* 获取表格行模型
*
* @type {*}
* @memberof GRID_001GridBase
*/
public getGridRowModel(){
return {
srfkey: new FormItemModel(),
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof GRID_001GridBase
*/
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 GRID_001Base
*/
public hasRowEdit: any = {
'assetname':false,
'applynumber':false,
'eamapplyname':false,
'eamapplytypename':false,
'eamlocationname':false,
'begintime':false,
'endtime':false,
};
/**
* 获取对应列class
*
* @param {*} $args row 行数据,column 列数据,rowIndex 行索引,列索引
* @returns {void}
* @memberof GRID_001Base
*/
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 GRID_001GridBase
*/
public async formatExcelData(filterVal: any, jsonData: any, codelistColumns?: any[]): Promise<any> {
return super.formatExcelData(filterVal, jsonData, [
]);
}
}
\ No newline at end of file
/**
* GRID_001 部件模型
*
* @export
* @class GRID_001Model
*/
export default class GRID_001Model {
/**
* 是否是实体数据导出
*
* @returns {any[]}
* @memberof GRID_001GridMode
*/
public isDEExport: boolean = false;
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof GRID_001GridMode
*/
public getDataItems(): any[] {
if(this.isDEExport){
return [
]
}else{
return [
{
name: 'endtime',
prop: 'endtime',
dataType: 'DATETIME',
},
{
name: 'begintime',
prop: 'begintime',
dataType: 'DATETIME',
},
{
name: 'eamservicelevelid',
prop: 'eamservicelevelid',
dataType: 'PICKUP',
},
{
name: 'srfmajortext',
prop: 'eamapplyname',
dataType: 'TEXT',
},
{
name: 'srfkey',
prop: 'eamapplyid',
dataType: 'GUID',
isEditable:true
},
{
name: 'srfdataaccaction',
prop: 'eamapplyid',
dataType: 'GUID',
},
{
name: 'eamapplytypeid',
prop: 'eamapplytypeid',
dataType: 'PICKUP',
},
{
name: 'eamlocationname',
prop: 'eamlocationname',
dataType: 'PICKUPTEXT',
},
{
name: 'eamlocationid',
prop: 'eamlocationid',
dataType: 'PICKUP',
},
{
name: 'eamapplyname',
prop: 'eamapplyname',
dataType: 'TEXT',
},
{
name: 'eamapplytypename',
prop: 'eamapplytypename',
dataType: 'PICKUPTEXT',
},
{
name: 'applynumber',
prop: 'applynumber',
dataType: 'TEXT',
},
{
name: 'assetid',
prop: 'assetid',
dataType: 'PICKUP',
},
{
name: 'assetname',
prop: 'assetname',
dataType: 'PICKUPTEXT',
},
{
name: 'eamapply',
prop: 'eamapplyid',
},
{
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 EAMApplyService from '@/service/eamapply/eamapply-service';
import GRID_001Model from './grid-001-grid-model';
/**
* GRID_001 部件服务对象
*
* @export
* @class GRID_001Service
*/
export default class GRID_001Service extends ControlService {
/**
* 维护申请服务对象
*
* @type {EAMApplyService}
* @memberof GRID_001Service
*/
public appEntityService: EAMApplyService = new EAMApplyService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof GRID_001Service
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of GRID_001Service.
*
* @param {*} [opts={}]
* @memberof GRID_001Service
*/
constructor(opts: any = {}) {
super(opts);
this.model = new GRID_001Model();
}
/**
* 处理数据
*
* @public
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof GRID_001Service
*/
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 GRID_001Service
*/
@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 GRID_001Service
*/
@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 GRID_001Service
*/
@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 GRID_001Service
*/
@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 GRID_001Service
*/
@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 GRID_001Service
*/
@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 GRID_001Service
*/
@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.eamapplyid = 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 GRID_001Service
*/
@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 GRID_001Service
*/
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('assetname')">
<el-table-column show-overflow-tooltip :prop="'assetname'" :label="$t('entities.eamapply.grid_001_grid.columns.assetname')" :width="160" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamapply.grid_001_grid.columns.assetname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<app-column-link deKeyField='eamasset' :context="JSON.parse(JSON.stringify(context))" :viewparams="JSON.parse(JSON.stringify(viewparams))" :data="row" :linkview="{viewname: 'eamasset-info-view', height: 0,width: 0,title: $t('entities.eamasset.views.infoview.title'),placement: '', isRedirectView: false,deResParameters: [
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
]
,parameters: [
{ pathName: 'eamassets', parameterName: 'eamasset' },
{ pathName: 'infoview', parameterName: 'infoview' }
]}" valueitem="assetid">
<span>{{row.assetname}}</span>
</app-column-link >
</template>
</el-table-column>
</template>
<template v-if="getColumnState('applynumber')">
<el-table-column show-overflow-tooltip :prop="'applynumber'" :label="$t('entities.eamapply.grid_001_grid.columns.applynumber')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamapply.grid_001_grid.columns.applynumber')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.applynumber}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamapplyname')">
<el-table-column show-overflow-tooltip :prop="'eamapplyname'" :label="$t('entities.eamapply.grid_001_grid.columns.eamapplyname')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamapply.grid_001_grid.columns.eamapplyname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamapplyname}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamapplytypename')">
<el-table-column show-overflow-tooltip :prop="'eamapplytypename'" :label="$t('entities.eamapply.grid_001_grid.columns.eamapplytypename')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamapply.grid_001_grid.columns.eamapplytypename')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamapplytypename}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamlocationname')">
<el-table-column show-overflow-tooltip :prop="'eamlocationname'" :label="$t('entities.eamapply.grid_001_grid.columns.eamlocationname')" :width="160" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamapply.grid_001_grid.columns.eamlocationname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<app-column-link deKeyField='eamlocation' :context="JSON.parse(JSON.stringify(context))" :viewparams="JSON.parse(JSON.stringify(viewparams))" :data="row" :linkview="{viewname: 'eamlocation-info-view', height: 0,width: 0,title: $t('entities.eamlocation.views.infoview.title'),placement: '', isRedirectView: false,deResParameters: [
]
,parameters: [
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'infoview', parameterName: 'infoview' }
]}" valueitem="eamlocationid">
<span>{{row.eamlocationname}}</span>
</app-column-link >
</template>
</el-table-column>
</template>
<template v-if="getColumnState('begintime')">
<el-table-column show-overflow-tooltip :prop="'begintime'" :label="$t('entities.eamapply.grid_001_grid.columns.begintime')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamapply.grid_001_grid.columns.begintime')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<app-format-data format="YYYY-MM-DD HH:mm:ss" :data="row.begintime"></app-format-data>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('endtime')">
<el-table-column show-overflow-tooltip :prop="'endtime'" :label="$t('entities.eamapply.grid_001_grid.columns.endtime')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamapply.grid_001_grid.columns.endtime')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<app-format-data format="YYYY-MM-DD HH:mm:ss" :data="row.endtime"></app-format-data>
</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="./grid-001-grid.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { GRID_001GridBase } from './grid-001-grid-base';
/**
* grid部件
*
* @export
* @class GRID_001Grid
* @extends {GRID_001GridBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class GRID_001Grid extends GRID_001GridBase { }
</script>
......@@ -67,6 +67,9 @@ export class InfoViewtabexppanelTabexppanelBase extends TabExpPanelControlBase {
protected isInit: any = {
tabviewpanel: true ,
tabviewpanel2: false ,
tabviewpanel3: false ,
tabviewpanel4: false ,
tabviewpanel5: false ,
}
/**
......
......@@ -60,5 +60,95 @@
@closeview="closeView($event)">
</view_tabviewpanel2>
</tab-pane>
<tab-pane :index="2" name='tabviewpanel3' tab='infoviewtabexppanel' class=''
:label="(h) =>{
return h('div', [
h('i',{
class:'fa fa-file-word-o',
style:{
'margin-right' : '2px'
}
}),
h('span', '工单'),
h('Badge', {
props: {
count: undefined,
type: 'primary'
}
})
])
}" >
<view_tabviewpanel3
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
v-if="isInit.tabviewpanel3"
name="tabviewpanel3"
ref='tabviewpanel3'
:expActive="activatedTabViewPanel === 'tabviewpanel3'"
@viewpanelDatasChange = "tabViewPanelDatasChange"
@closeview="closeView($event)">
</view_tabviewpanel3>
</tab-pane>
<tab-pane :index="3" name='tabviewpanel4' tab='infoviewtabexppanel' class=''
:label="(h) =>{
return h('div', [
h('i',{
class:'fa fa-calendar',
style:{
'margin-right' : '2px'
}
}),
h('span', '维护计划'),
h('Badge', {
props: {
count: undefined,
type: 'primary'
}
})
])
}" >
<view_tabviewpanel4
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
v-if="isInit.tabviewpanel4"
name="tabviewpanel4"
ref='tabviewpanel4'
:expActive="activatedTabViewPanel === 'tabviewpanel4'"
@viewpanelDatasChange = "tabViewPanelDatasChange"
@closeview="closeView($event)">
</view_tabviewpanel4>
</tab-pane>
<tab-pane :index="4" name='tabviewpanel5' tab='infoviewtabexppanel' class=''
:label="(h) =>{
return h('div', [
h('i',{
class:'fa fa-share-square',
style:{
'margin-right' : '2px'
}
}),
h('span', '维护申请'),
h('Badge', {
props: {
count: undefined,
type: 'primary'
}
})
])
}" >
<view_tabviewpanel5
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
v-if="isInit.tabviewpanel5"
name="tabviewpanel5"
ref='tabviewpanel5'
:expActive="activatedTabViewPanel === 'tabviewpanel5'"
@viewpanelDatasChange = "tabViewPanelDatasChange"
@closeview="closeView($event)">
</view_tabviewpanel5>
</tab-pane>
</tabs>
</div>
\ No newline at end of file
......@@ -5,6 +5,9 @@ import { VueLifeCycleProcessing } from '@/studio-core';
import { InfoViewtabexppanelTabexppanelBase } from './info-viewtabexppanel-tabexppanel-base';
import view_tabviewpanel from '@widgets/eamasset/info-viewtabviewpanel-tabviewpanel/info-viewtabviewpanel-tabviewpanel.vue';
import view_tabviewpanel2 from '@widgets/eamasset/info-viewtabviewpanel2-tabviewpanel/info-viewtabviewpanel2-tabviewpanel.vue';
import view_tabviewpanel3 from '@widgets/eamasset/info-viewtabviewpanel3-tabviewpanel/info-viewtabviewpanel3-tabviewpanel.vue';
import view_tabviewpanel4 from '@widgets/eamasset/info-viewtabviewpanel4-tabviewpanel/info-viewtabviewpanel4-tabviewpanel.vue';
import view_tabviewpanel5 from '@widgets/eamasset/info-viewtabviewpanel5-tabviewpanel/info-viewtabviewpanel5-tabviewpanel.vue';
/**
......@@ -18,6 +21,9 @@ import view_tabviewpanel2 from '@widgets/eamasset/info-viewtabviewpanel2-tabview
components: {
view_tabviewpanel,
view_tabviewpanel2,
view_tabviewpanel3,
view_tabviewpanel4,
view_tabviewpanel5,
}
})
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import EAMAssetService from '@/service/eamasset/eamasset-service';
import InfoViewtabviewpanel3Service from './info-viewtabviewpanel3-tabviewpanel-service';
import EAMAssetUIService from '@/uiservice/eamasset/eamasset-ui-service';
/**
* tabviewpanel3部件基类
*
* @export
* @class MainControlBase
* @extends {InfoViewtabviewpanel3TabviewpanelBase}
*/
export class InfoViewtabviewpanel3TabviewpanelBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof InfoViewtabviewpanel3TabviewpanelBase
*/
protected controlType: string = 'TABVIEWPANEL';
/**
* 建构部件服务对象
*
* @type {InfoViewtabviewpanel3Service}
* @memberof InfoViewtabviewpanel3TabviewpanelBase
*/
public service: InfoViewtabviewpanel3Service = new InfoViewtabviewpanel3Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMAssetService}
* @memberof InfoViewtabviewpanel3TabviewpanelBase
*/
public appEntityService: EAMAssetService = new EAMAssetService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof InfoViewtabviewpanel3TabviewpanelBase
*/
protected appDeName: string = 'eamasset';
/**
* 应用实体中文名称
*
* @protected
* @type {string}
* @memberof InfoViewtabviewpanel3TabviewpanelBase
*/
protected appDeLogicName: string = '资产';
/**
* 导航模式下项是否激活
*
* @type {*}
* @memberof InfoViewtabviewpanel3
*/
@Prop()
public expActive!: any;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof InfoViewtabviewpanel3
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof InfoViewtabviewpanel3
*/
public getData(): any {
return null;
}
/**
* 是否被激活
*
* @type {boolean}
* @memberof InfoViewtabviewpanel3
*/
public isActivied: boolean = true;
/**
* 局部上下文
*
* @type {*}
* @memberof InfoViewtabviewpanel3
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof InfoViewtabviewpanel3
*/
public localViewParam: any = null;
/**
* 传入上下文
*
* @type {string}
* @memberof TabExpViewtabviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 传入视图参数
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 视图面板过滤项
*
* @type {string}
* @memberof InfoViewtabviewpanel3
*/
public navfilter: string = "";
/**
* vue 生命周期
*
* @returns
* @memberof InfoViewtabviewpanel3
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof InfoViewtabviewpanel3
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.$forceUpdate();
this.initNavParam();
});
}
}
/**
* 初始化导航参数
*
* @memberof InfoViewtabviewpanel3
*/
public initNavParam(){
if(!Object.is(this.navfilter,"")){
Object.assign(this.viewparams,{[this.navfilter]:this.context['majorentity']})
}
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata =JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* 视图数据变化
*
* @memberof InfoViewtabviewpanel3
*/
public viewDatasChange($event:any){
this.$emit('viewpanelDatasChange',$event);
}
/**
* vue 生命周期
*
* @memberof InfoViewtabviewpanel3
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof InfoViewtabviewpanel3
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* InfoViewtabviewpanel3 部件模型
*
* @export
* @class InfoViewtabviewpanel3Model
*/
export default class InfoViewtabviewpanel3Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof InfoViewtabviewpanel3Model
*/
public getDataItems(): any[] {
return [
{
name: 'eamasset',
prop: 'assetid',
},
{
name: 'assetname',
},
{
name: 'createdate',
},
{
name: 'createman',
},
{
name: 'updatedate',
},
{
name: 'updateman',
},
{
name: 'eamassettypeid',
},
{
name: 'eamlocationid',
},
{
name: 'passetid',
},
{
name: 'eamassettypename',
},
{
name: 'eamlocationname',
},
{
name: 'eamassetstateid',
},
{
name: 'eamassetstatename',
},
{
name: 'passetname',
},
{
name: 'assetnumber',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* InfoViewtabviewpanel3 部件服务对象
*
* @export
* @class InfoViewtabviewpanel3Service
*/
export default class InfoViewtabviewpanel3Service extends ControlService {
}
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'>
<eamwork-order-asset-wogrid-view
class='viewcontainer2'
:viewdata="viewdata"
:viewparam="viewparam"
@viewload="viewDatasChange($event)"
:viewDefaultUsage="false"
:viewUsage="7"
:expActive="expActive"
@closeview="closeView($event)"
/>
</div>
\ No newline at end of file
<template src="./info-viewtabviewpanel3-tabviewpanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InfoViewtabviewpanel3TabviewpanelBase } from './info-viewtabviewpanel3-tabviewpanel-base';
/**
* tabviewpanel3部件
*
* @export
* @class InfoViewtabviewpanel3Tabviewpanel
* @extends {InfoViewtabviewpanel3TabviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class InfoViewtabviewpanel3Tabviewpanel extends InfoViewtabviewpanel3TabviewpanelBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import EAMAssetService from '@/service/eamasset/eamasset-service';
import InfoViewtabviewpanel4Service from './info-viewtabviewpanel4-tabviewpanel-service';
import EAMAssetUIService from '@/uiservice/eamasset/eamasset-ui-service';
/**
* tabviewpanel4部件基类
*
* @export
* @class MainControlBase
* @extends {InfoViewtabviewpanel4TabviewpanelBase}
*/
export class InfoViewtabviewpanel4TabviewpanelBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof InfoViewtabviewpanel4TabviewpanelBase
*/
protected controlType: string = 'TABVIEWPANEL';
/**
* 建构部件服务对象
*
* @type {InfoViewtabviewpanel4Service}
* @memberof InfoViewtabviewpanel4TabviewpanelBase
*/
public service: InfoViewtabviewpanel4Service = new InfoViewtabviewpanel4Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMAssetService}
* @memberof InfoViewtabviewpanel4TabviewpanelBase
*/
public appEntityService: EAMAssetService = new EAMAssetService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof InfoViewtabviewpanel4TabviewpanelBase
*/
protected appDeName: string = 'eamasset';
/**
* 应用实体中文名称
*
* @protected
* @type {string}
* @memberof InfoViewtabviewpanel4TabviewpanelBase
*/
protected appDeLogicName: string = '资产';
/**
* 导航模式下项是否激活
*
* @type {*}
* @memberof InfoViewtabviewpanel4
*/
@Prop()
public expActive!: any;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof InfoViewtabviewpanel4
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof InfoViewtabviewpanel4
*/
public getData(): any {
return null;
}
/**
* 是否被激活
*
* @type {boolean}
* @memberof InfoViewtabviewpanel4
*/
public isActivied: boolean = true;
/**
* 局部上下文
*
* @type {*}
* @memberof InfoViewtabviewpanel4
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof InfoViewtabviewpanel4
*/
public localViewParam: any = null;
/**
* 传入上下文
*
* @type {string}
* @memberof TabExpViewtabviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 传入视图参数
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 视图面板过滤项
*
* @type {string}
* @memberof InfoViewtabviewpanel4
*/
public navfilter: string = "";
/**
* vue 生命周期
*
* @returns
* @memberof InfoViewtabviewpanel4
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof InfoViewtabviewpanel4
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.$forceUpdate();
this.initNavParam();
});
}
}
/**
* 初始化导航参数
*
* @memberof InfoViewtabviewpanel4
*/
public initNavParam(){
if(!Object.is(this.navfilter,"")){
Object.assign(this.viewparams,{[this.navfilter]:this.context['majorentity']})
}
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata =JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* 视图数据变化
*
* @memberof InfoViewtabviewpanel4
*/
public viewDatasChange($event:any){
this.$emit('viewpanelDatasChange',$event);
}
/**
* vue 生命周期
*
* @memberof InfoViewtabviewpanel4
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof InfoViewtabviewpanel4
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* InfoViewtabviewpanel4 部件模型
*
* @export
* @class InfoViewtabviewpanel4Model
*/
export default class InfoViewtabviewpanel4Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof InfoViewtabviewpanel4Model
*/
public getDataItems(): any[] {
return [
{
name: 'eamasset',
prop: 'assetid',
},
{
name: 'assetname',
},
{
name: 'createdate',
},
{
name: 'createman',
},
{
name: 'updatedate',
},
{
name: 'updateman',
},
{
name: 'eamassettypeid',
},
{
name: 'eamlocationid',
},
{
name: 'passetid',
},
{
name: 'eamassettypename',
},
{
name: 'eamlocationname',
},
{
name: 'eamassetstateid',
},
{
name: 'eamassetstatename',
},
{
name: 'passetname',
},
{
name: 'assetnumber',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* InfoViewtabviewpanel4 部件服务对象
*
* @export
* @class InfoViewtabviewpanel4Service
*/
export default class InfoViewtabviewpanel4Service extends ControlService {
}
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'>
<eamplan-asset-plan-grid-view
class='viewcontainer2'
:viewdata="viewdata"
:viewparam="viewparam"
@viewload="viewDatasChange($event)"
:viewDefaultUsage="false"
:viewUsage="7"
:expActive="expActive"
@closeview="closeView($event)"
/>
</div>
\ No newline at end of file
<template src="./info-viewtabviewpanel4-tabviewpanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InfoViewtabviewpanel4TabviewpanelBase } from './info-viewtabviewpanel4-tabviewpanel-base';
/**
* tabviewpanel4部件
*
* @export
* @class InfoViewtabviewpanel4Tabviewpanel
* @extends {InfoViewtabviewpanel4TabviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class InfoViewtabviewpanel4Tabviewpanel extends InfoViewtabviewpanel4TabviewpanelBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import EAMAssetService from '@/service/eamasset/eamasset-service';
import InfoViewtabviewpanel5Service from './info-viewtabviewpanel5-tabviewpanel-service';
import EAMAssetUIService from '@/uiservice/eamasset/eamasset-ui-service';
/**
* tabviewpanel5部件基类
*
* @export
* @class MainControlBase
* @extends {InfoViewtabviewpanel5TabviewpanelBase}
*/
export class InfoViewtabviewpanel5TabviewpanelBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof InfoViewtabviewpanel5TabviewpanelBase
*/
protected controlType: string = 'TABVIEWPANEL';
/**
* 建构部件服务对象
*
* @type {InfoViewtabviewpanel5Service}
* @memberof InfoViewtabviewpanel5TabviewpanelBase
*/
public service: InfoViewtabviewpanel5Service = new InfoViewtabviewpanel5Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMAssetService}
* @memberof InfoViewtabviewpanel5TabviewpanelBase
*/
public appEntityService: EAMAssetService = new EAMAssetService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof InfoViewtabviewpanel5TabviewpanelBase
*/
protected appDeName: string = 'eamasset';
/**
* 应用实体中文名称
*
* @protected
* @type {string}
* @memberof InfoViewtabviewpanel5TabviewpanelBase
*/
protected appDeLogicName: string = '资产';
/**
* 导航模式下项是否激活
*
* @type {*}
* @memberof InfoViewtabviewpanel5
*/
@Prop()
public expActive!: any;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof InfoViewtabviewpanel5
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof InfoViewtabviewpanel5
*/
public getData(): any {
return null;
}
/**
* 是否被激活
*
* @type {boolean}
* @memberof InfoViewtabviewpanel5
*/
public isActivied: boolean = true;
/**
* 局部上下文
*
* @type {*}
* @memberof InfoViewtabviewpanel5
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof InfoViewtabviewpanel5
*/
public localViewParam: any = null;
/**
* 传入上下文
*
* @type {string}
* @memberof TabExpViewtabviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 传入视图参数
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 视图面板过滤项
*
* @type {string}
* @memberof InfoViewtabviewpanel5
*/
public navfilter: string = "";
/**
* vue 生命周期
*
* @returns
* @memberof InfoViewtabviewpanel5
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof InfoViewtabviewpanel5
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.$forceUpdate();
this.initNavParam();
});
}
}
/**
* 初始化导航参数
*
* @memberof InfoViewtabviewpanel5
*/
public initNavParam(){
if(!Object.is(this.navfilter,"")){
Object.assign(this.viewparams,{[this.navfilter]:this.context['majorentity']})
}
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata =JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* 视图数据变化
*
* @memberof InfoViewtabviewpanel5
*/
public viewDatasChange($event:any){
this.$emit('viewpanelDatasChange',$event);
}
/**
* vue 生命周期
*
* @memberof InfoViewtabviewpanel5
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof InfoViewtabviewpanel5
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* InfoViewtabviewpanel5 部件模型
*
* @export
* @class InfoViewtabviewpanel5Model
*/
export default class InfoViewtabviewpanel5Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof InfoViewtabviewpanel5Model
*/
public getDataItems(): any[] {
return [
{
name: 'eamasset',
prop: 'assetid',
},
{
name: 'assetname',
},
{
name: 'createdate',
},
{
name: 'createman',
},
{
name: 'updatedate',
},
{
name: 'updateman',
},
{
name: 'eamassettypeid',
},
{
name: 'eamlocationid',
},
{
name: 'passetid',
},
{
name: 'eamassettypename',
},
{
name: 'eamlocationname',
},
{
name: 'eamassetstateid',
},
{
name: 'eamassetstatename',
},
{
name: 'passetname',
},
{
name: 'assetnumber',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* InfoViewtabviewpanel5 部件服务对象
*
* @export
* @class InfoViewtabviewpanel5Service
*/
export default class InfoViewtabviewpanel5Service extends ControlService {
}
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'>
<eamapply-asset-apply-grid-view
class='viewcontainer2'
:viewdata="viewdata"
:viewparam="viewparam"
@viewload="viewDatasChange($event)"
:viewDefaultUsage="false"
:viewUsage="7"
:expActive="expActive"
@closeview="closeView($event)"
/>
</div>
\ No newline at end of file
<template src="./info-viewtabviewpanel5-tabviewpanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InfoViewtabviewpanel5TabviewpanelBase } from './info-viewtabviewpanel5-tabviewpanel-base';
/**
* tabviewpanel5部件
*
* @export
* @class InfoViewtabviewpanel5Tabviewpanel
* @extends {InfoViewtabviewpanel5TabviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class InfoViewtabviewpanel5Tabviewpanel extends InfoViewtabviewpanel5TabviewpanelBase { }
</script>
......@@ -52,7 +52,7 @@
:acParams="{ serviceName: 'EAMPlanService', interfaceName: 'FetchDefault'}"
valueitem='eamplanid'
:value="data.eamplanname"
:pickupView="{ viewname: 'eamplan-pickup-view', title: $t('entities.eamplan.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'eamplans', parameterName: 'eamplan' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
:pickupView="{ viewname: 'eamplan-pickup-view', title: $t('entities.eamplan.views.pickupview.title'), deResParameters: [{ pathName: 'eamassets', parameterName: 'eamasset' }, ], parameters: [{ pathName: 'eamplans', parameterName: 'eamplan' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, GridControlBase } from '@/studio-core';
import EAMPlanService from '@/service/eamplan/eamplan-service';
import GRID_001Service from './grid-001-grid-service';
import EAMPlanUIService from '@/uiservice/eamplan/eamplan-ui-service';
import { FormItemModel } from '@/model/form-detail';
/**
* grid部件基类
*
* @export
* @class GridControlBase
* @extends {GRID_001GridBase}
*/
export class GRID_001GridBase extends GridControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof GRID_001GridBase
*/
protected controlType: string = 'GRID';
/**
* 建构部件服务对象
*
* @type {GRID_001Service}
* @memberof GRID_001GridBase
*/
public service: GRID_001Service = new GRID_001Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMPlanService}
* @memberof GRID_001GridBase
*/
public appEntityService: EAMPlanService = new EAMPlanService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof GRID_001GridBase
*/
protected appDeName: string = 'eamplan';
/**
* 应用实体中文名称
*
* @protected
* @type {string}
* @memberof GRID_001GridBase
*/
protected appDeLogicName: string = '维护计划';
/**
* 界面UI服务对象
*
* @type {EAMPlanUIService}
* @memberof GRID_001Base
*/
public appUIService:EAMPlanUIService = new EAMPlanUIService(this.$store);
/**
* 界面行为模型
*
* @type {*}
* @memberof GRID_001Base
*/
public ActionModel: any = {
};
/**
* 本地缓存标识
*
* @protected
* @type {string}
* @memberof GRID_001Base
*/
protected localStorageTag: string = 'eamplan_grid_001_grid';
/**
* 所有列成员
*
* @type {any[]}
* @memberof GRID_001GridBase
*/
public allColumns: any[] = [
{
name: 'assetname',
label: '资产',
langtag: 'entities.eamplan.grid_001_grid.columns.assetname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'plannumber',
label: '计划编号',
langtag: 'entities.eamplan.grid_001_grid.columns.plannumber',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamplanname',
label: '维护计划名称',
langtag: 'entities.eamplan.grid_001_grid.columns.eamplanname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamlocationname',
label: '功能位置',
langtag: 'entities.eamplan.grid_001_grid.columns.eamlocationname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'mdate',
label: '制定日期',
langtag: 'entities.eamplan.grid_001_grid.columns.mdate',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
]
/**
* 获取表格行模型
*
* @type {*}
* @memberof GRID_001GridBase
*/
public getGridRowModel(){
return {
srfkey: new FormItemModel(),
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof GRID_001GridBase
*/
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 GRID_001Base
*/
public hasRowEdit: any = {
'assetname':false,
'plannumber':false,
'eamplanname':false,
'eamlocationname':false,
'mdate':false,
};
/**
* 获取对应列class
*
* @param {*} $args row 行数据,column 列数据,rowIndex 行索引,列索引
* @returns {void}
* @memberof GRID_001Base
*/
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 GRID_001GridBase
*/
public async formatExcelData(filterVal: any, jsonData: any, codelistColumns?: any[]): Promise<any> {
return super.formatExcelData(filterVal, jsonData, [
]);
}
}
\ No newline at end of file
/**
* GRID_001 部件模型
*
* @export
* @class GRID_001Model
*/
export default class GRID_001Model {
/**
* 是否是实体数据导出
*
* @returns {any[]}
* @memberof GRID_001GridMode
*/
public isDEExport: boolean = false;
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof GRID_001GridMode
*/
public getDataItems(): any[] {
if(this.isDEExport){
return [
]
}else{
return [
{
name: 'eamlocationid',
prop: 'eamlocationid',
dataType: 'PICKUP',
},
{
name: 'eamlocationname',
prop: 'eamlocationname',
dataType: 'PICKUPTEXT',
},
{
name: 'mdate',
prop: 'mdate',
dataType: 'DATETIME',
},
{
name: 'eammonitorpointid',
prop: 'eammonitorpointid',
dataType: 'PICKUP',
},
{
name: 'plannumber',
prop: 'plannumber',
dataType: 'TEXT',
},
{
name: 'srfmajortext',
prop: 'eamplanname',
dataType: 'TEXT',
},
{
name: 'assetid',
prop: 'assetid',
dataType: 'PICKUP',
},
{
name: 'srfdataaccaction',
prop: 'eamplanid',
dataType: 'GUID',
},
{
name: 'srfkey',
prop: 'eamplanid',
dataType: 'GUID',
isEditable:true
},
{
name: 'eamplanname',
prop: 'eamplanname',
dataType: 'TEXT',
},
{
name: 'assetname',
prop: 'assetname',
dataType: 'PICKUPTEXT',
},
{
name: 'eamplan',
prop: 'eamplanid',
},
{
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 EAMPlanService from '@/service/eamplan/eamplan-service';
import GRID_001Model from './grid-001-grid-model';
/**
* GRID_001 部件服务对象
*
* @export
* @class GRID_001Service
*/
export default class GRID_001Service extends ControlService {
/**
* 维护计划服务对象
*
* @type {EAMPlanService}
* @memberof GRID_001Service
*/
public appEntityService: EAMPlanService = new EAMPlanService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof GRID_001Service
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of GRID_001Service.
*
* @param {*} [opts={}]
* @memberof GRID_001Service
*/
constructor(opts: any = {}) {
super(opts);
this.model = new GRID_001Model();
}
/**
* 处理数据
*
* @public
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof GRID_001Service
*/
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 GRID_001Service
*/
@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 GRID_001Service
*/
@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 GRID_001Service
*/
@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 GRID_001Service
*/
@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 GRID_001Service
*/
@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 GRID_001Service
*/
@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 GRID_001Service
*/
@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.eamplanid = 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 GRID_001Service
*/
@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 GRID_001Service
*/
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('assetname')">
<el-table-column show-overflow-tooltip :prop="'assetname'" :label="$t('entities.eamplan.grid_001_grid.columns.assetname')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamplan.grid_001_grid.columns.assetname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<app-column-link deKeyField='eamasset' :context="JSON.parse(JSON.stringify(context))" :viewparams="JSON.parse(JSON.stringify(viewparams))" :data="row" :linkview="{viewname: 'eamasset-info-view', height: 0,width: 0,title: $t('entities.eamasset.views.infoview.title'),placement: '', isRedirectView: false,deResParameters: [
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
]
,parameters: [
{ pathName: 'eamassets', parameterName: 'eamasset' },
{ pathName: 'infoview', parameterName: 'infoview' }
]}" valueitem="assetid">
<span>{{row.assetname}}</span>
</app-column-link >
</template>
</el-table-column>
</template>
<template v-if="getColumnState('plannumber')">
<el-table-column show-overflow-tooltip :prop="'plannumber'" :label="$t('entities.eamplan.grid_001_grid.columns.plannumber')" :width="160" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamplan.grid_001_grid.columns.plannumber')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.plannumber}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamplanname')">
<el-table-column show-overflow-tooltip :prop="'eamplanname'" :label="$t('entities.eamplan.grid_001_grid.columns.eamplanname')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamplan.grid_001_grid.columns.eamplanname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamplanname}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamlocationname')">
<el-table-column show-overflow-tooltip :prop="'eamlocationname'" :label="$t('entities.eamplan.grid_001_grid.columns.eamlocationname')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamplan.grid_001_grid.columns.eamlocationname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<app-column-link deKeyField='eamlocation' :context="JSON.parse(JSON.stringify(context))" :viewparams="JSON.parse(JSON.stringify(viewparams))" :data="row" :linkview="{viewname: 'eamlocation-info-view', height: 0,width: 0,title: $t('entities.eamlocation.views.infoview.title'),placement: '', isRedirectView: false,deResParameters: [
]
,parameters: [
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'infoview', parameterName: 'infoview' }
]}" valueitem="eamlocationid">
<span>{{row.eamlocationname}}</span>
</app-column-link >
</template>
</el-table-column>
</template>
<template v-if="getColumnState('mdate')">
<el-table-column show-overflow-tooltip :prop="'mdate'" :label="$t('entities.eamplan.grid_001_grid.columns.mdate')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamplan.grid_001_grid.columns.mdate')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<app-format-data format="YYYY-MM-DD HH:mm:ss" :data="row.mdate"></app-format-data>
</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="./grid-001-grid.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { GRID_001GridBase } from './grid-001-grid-base';
/**
* grid部件
*
* @export
* @class GRID_001Grid
* @extends {GRID_001GridBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class GRID_001Grid extends GRID_001GridBase { }
</script>
......@@ -85,7 +85,7 @@ export class IF_001EditFormBase extends EditFormControlBase {
plannumber: null,
eamplanname: null,
mdate: null,
description: null,
content: null,
assetname: null,
eamlocationname: null,
eammonitorpointname: null,
......@@ -148,7 +148,7 @@ export class IF_001EditFormBase extends EditFormControlBase {
mdate: new FormItemModel({ caption: '制定日期', detailType: 'FORMITEM', name: 'mdate', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
description: new FormItemModel({ caption: '描述', detailType: 'FORMITEM', name: 'description', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
content: new FormItemModel({ caption: '内容', detailType: 'FORMITEM', name: 'content', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
assetname: new FormItemModel({ caption: '资产', detailType: 'FORMITEM', name: 'assetname', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
......
......@@ -71,8 +71,8 @@ export default class IF_001Model {
dataType: 'DATETIME',
},
{
name: 'description',
prop: 'description',
name: 'content',
prop: 'content',
dataType: 'LONGTEXT_1000',
},
{
......
......@@ -36,10 +36,10 @@
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.description.visible" :style="{}" :md="{ span: 24, offset: 0 }" :lg="{ span: 24, offset: 0 }" :xl="{ span: 24, offset: 0 }">
<app-form-item name='description' :itemRules="this.rules.description" class='' :caption="$t('entities.eamplan.if_001_form.details.description')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.description.error" :isEmptyCaption="false" labelPos="LEFT">
<i-col class="form-layout-container" v-show="detailsModel.content.visible" :style="{}" :md="{ span: 24, offset: 0 }" :lg="{ span: 24, offset: 0 }" :xl="{ span: 24, offset: 0 }">
<app-form-item name='content' :itemRules="this.rules.content" class='' :caption="$t('entities.eamplan.if_001_form.details.content')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.content.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='description' :value="data.description" dataType="LONGTEXT_1000" :precision="0"
<app-span name='content' :value="data.content" dataType="LONGTEXT_1000" :precision="0"
:data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style="">
</app-span>
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, GridControlBase } from '@/studio-core';
import EAMWorkOrderService from '@/service/eamwork-order/eamwork-order-service';
import GRID_003Service from './grid-003-grid-service';
import EAMWorkOrderUIService from '@/uiservice/eamwork-order/eamwork-order-ui-service';
import { FormItemModel } from '@/model/form-detail';
/**
* grid部件基类
*
* @export
* @class GridControlBase
* @extends {GRID_003GridBase}
*/
export class GRID_003GridBase extends GridControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof GRID_003GridBase
*/
protected controlType: string = 'GRID';
/**
* 建构部件服务对象
*
* @type {GRID_003Service}
* @memberof GRID_003GridBase
*/
public service: GRID_003Service = new GRID_003Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMWorkOrderService}
* @memberof GRID_003GridBase
*/
public appEntityService: EAMWorkOrderService = new EAMWorkOrderService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof GRID_003GridBase
*/
protected appDeName: string = 'eamworkorder';
/**
* 应用实体中文名称
*
* @protected
* @type {string}
* @memberof GRID_003GridBase
*/
protected appDeLogicName: string = '工单';
/**
* 界面UI服务对象
*
* @type {EAMWorkOrderUIService}
* @memberof GRID_003Base
*/
public appUIService:EAMWorkOrderUIService = new EAMWorkOrderUIService(this.$store);
/**
* 界面行为模型
*
* @type {*}
* @memberof GRID_003Base
*/
public ActionModel: any = {
};
/**
* 本地缓存标识
*
* @protected
* @type {string}
* @memberof GRID_003Base
*/
protected localStorageTag: string = 'eamworkorder_grid_003_grid';
/**
* 所有列成员
*
* @type {any[]}
* @memberof GRID_003GridBase
*/
public allColumns: any[] = [
{
name: 'assetname',
label: '资产',
langtag: 'entities.eamworkorder.grid_003_grid.columns.assetname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'wonumber',
label: '工单编号',
langtag: 'entities.eamworkorder.grid_003_grid.columns.wonumber',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'workordername',
label: '工单名称',
langtag: 'entities.eamworkorder.grid_003_grid.columns.workordername',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamwotypename',
label: '工单类型',
langtag: 'entities.eamworkorder.grid_003_grid.columns.eamwotypename',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamwooriginname',
label: '工单来源',
langtag: 'entities.eamworkorder.grid_003_grid.columns.eamwooriginname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamlocationname',
label: '功能位置',
langtag: 'entities.eamworkorder.grid_003_grid.columns.eamlocationname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'wodate',
label: '执行日期',
langtag: 'entities.eamworkorder.grid_003_grid.columns.wodate',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
]
/**
* 获取表格行模型
*
* @type {*}
* @memberof GRID_003GridBase
*/
public getGridRowModel(){
return {
srfkey: new FormItemModel(),
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof GRID_003GridBase
*/
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 GRID_003Base
*/
public hasRowEdit: any = {
'assetname':false,
'wonumber':false,
'workordername':false,
'eamwotypename':false,
'eamwooriginname':false,
'eamlocationname':false,
'wodate':false,
};
/**
* 获取对应列class
*
* @param {*} $args row 行数据,column 列数据,rowIndex 行索引,列索引
* @returns {void}
* @memberof GRID_003Base
*/
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 GRID_003GridBase
*/
public async formatExcelData(filterVal: any, jsonData: any, codelistColumns?: any[]): Promise<any> {
return super.formatExcelData(filterVal, jsonData, [
]);
}
}
\ No newline at end of file
/**
* GRID_003 部件模型
*
* @export
* @class GRID_003Model
*/
export default class GRID_003Model {
/**
* 是否是实体数据导出
*
* @returns {any[]}
* @memberof GRID_003GridMode
*/
public isDEExport: boolean = false;
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof GRID_003GridMode
*/
public getDataItems(): any[] {
if(this.isDEExport){
return [
]
}else{
return [
{
name: 'workordername',
prop: 'workordername',
dataType: 'TEXT',
},
{
name: 'eamservicelevelid',
prop: 'eamservicelevelid',
dataType: 'PICKUP',
},
{
name: 'pworkorderid',
prop: 'pworkorderid',
dataType: 'PICKUP',
},
{
name: 'eamwotypename',
prop: 'eamwotypename',
dataType: 'PICKUPTEXT',
},
{
name: 'srfmajortext',
prop: 'workordername',
dataType: 'TEXT',
},
{
name: 'srfkey',
prop: 'workorderid',
dataType: 'GUID',
isEditable:true
},
{
name: 'srfdataaccaction',
prop: 'workorderid',
dataType: 'GUID',
},
{
name: 'wonumber',
prop: 'wonumber',
dataType: 'TEXT',
},
{
name: 'eamlocationname',
prop: 'eamlocationname',
dataType: 'PICKUPTEXT',
},
{
name: 'eamlocationid',
prop: 'eamlocationid',
dataType: 'PICKUP',
},
{
name: 'eamwooriginname',
prop: 'wooriginname',
dataType: 'PICKUPTEXT',
},
{
name: 'wodate',
prop: 'wodate',
dataType: 'DATETIME',
},
{
name: 'eamwotypeid',
prop: 'eamwotypeid',
dataType: 'PICKUP',
},
{
name: 'eamwooriginid',
prop: 'wooriginid',
dataType: 'PICKUP',
},
{
name: 'assetid',
prop: 'assetid',
dataType: 'PICKUP',
},
{
name: 'assetname',
prop: 'assetname',
dataType: 'PICKUPTEXT',
},
{
name: 'eamworkorder',
prop: 'workorderid',
},
{
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 EAMWorkOrderService from '@/service/eamwork-order/eamwork-order-service';
import GRID_003Model from './grid-003-grid-model';
/**
* GRID_003 部件服务对象
*
* @export
* @class GRID_003Service
*/
export default class GRID_003Service extends ControlService {
/**
* 工单服务对象
*
* @type {EAMWorkOrderService}
* @memberof GRID_003Service
*/
public appEntityService: EAMWorkOrderService = new EAMWorkOrderService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof GRID_003Service
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of GRID_003Service.
*
* @param {*} [opts={}]
* @memberof GRID_003Service
*/
constructor(opts: any = {}) {
super(opts);
this.model = new GRID_003Model();
}
/**
* 处理数据
*
* @public
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof GRID_003Service
*/
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 GRID_003Service
*/
@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 GRID_003Service
*/
@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 GRID_003Service
*/
@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 GRID_003Service
*/
@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 GRID_003Service
*/
@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 GRID_003Service
*/
@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 GRID_003Service
*/
@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.workorderid = 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 GRID_003Service
*/
@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 GRID_003Service
*/
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('assetname')">
<el-table-column show-overflow-tooltip :prop="'assetname'" :label="$t('entities.eamworkorder.grid_003_grid.columns.assetname')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamworkorder.grid_003_grid.columns.assetname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<app-column-link deKeyField='eamasset' :context="JSON.parse(JSON.stringify(context))" :viewparams="JSON.parse(JSON.stringify(viewparams))" :data="row" :linkview="{viewname: 'eamasset-info-view', height: 0,width: 0,title: $t('entities.eamasset.views.infoview.title'),placement: '', isRedirectView: false,deResParameters: [
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
]
,parameters: [
{ pathName: 'eamassets', parameterName: 'eamasset' },
{ pathName: 'infoview', parameterName: 'infoview' }
]}" valueitem="assetid">
<span>{{row.assetname}}</span>
</app-column-link >
</template>
</el-table-column>
</template>
<template v-if="getColumnState('wonumber')">
<el-table-column show-overflow-tooltip :prop="'wonumber'" :label="$t('entities.eamworkorder.grid_003_grid.columns.wonumber')" :width="160" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamworkorder.grid_003_grid.columns.wonumber')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.wonumber}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('workordername')">
<el-table-column show-overflow-tooltip :prop="'workordername'" :label="$t('entities.eamworkorder.grid_003_grid.columns.workordername')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamworkorder.grid_003_grid.columns.workordername')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.workordername}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamwotypename')">
<el-table-column show-overflow-tooltip :prop="'eamwotypename'" :label="$t('entities.eamworkorder.grid_003_grid.columns.eamwotypename')" :width="160" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamworkorder.grid_003_grid.columns.eamwotypename')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamwotypename}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamwooriginname')">
<el-table-column show-overflow-tooltip :prop="'eamwooriginname'" :label="$t('entities.eamworkorder.grid_003_grid.columns.eamwooriginname')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamworkorder.grid_003_grid.columns.eamwooriginname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamwooriginname}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamlocationname')">
<el-table-column show-overflow-tooltip :prop="'eamlocationname'" :label="$t('entities.eamworkorder.grid_003_grid.columns.eamlocationname')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamworkorder.grid_003_grid.columns.eamlocationname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<app-column-link deKeyField='eamlocation' :context="JSON.parse(JSON.stringify(context))" :viewparams="JSON.parse(JSON.stringify(viewparams))" :data="row" :linkview="{viewname: 'eamlocation-info-view', height: 0,width: 0,title: $t('entities.eamlocation.views.infoview.title'),placement: '', isRedirectView: false,deResParameters: [
]
,parameters: [
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'infoview', parameterName: 'infoview' }
]}" valueitem="eamlocationid">
<span>{{row.eamlocationname}}</span>
</app-column-link >
</template>
</el-table-column>
</template>
<template v-if="getColumnState('wodate')">
<el-table-column show-overflow-tooltip :prop="'wodate'" :label="$t('entities.eamworkorder.grid_003_grid.columns.wodate')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamworkorder.grid_003_grid.columns.wodate')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<app-format-data format="YYYY-MM-DD HH:mm:ss" :data="row.wodate"></app-format-data>
</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="./grid-003-grid.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { GRID_003GridBase } from './grid-003-grid-base';
/**
* grid部件
*
* @export
* @class GRID_003Grid
* @extends {GRID_003GridBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class GRID_003Grid extends GRID_003GridBase { }
</script>
......@@ -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,25 @@ 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&allowMultiQueries=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_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
- SEATA_ENABLED=true
deploy:
resources:
limits:
......
......@@ -4,7 +4,7 @@
<!--输出实体[EAMAPPLY]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-eamapply-51-1">
<changeSet author="a_LAB01_e85d8801c" id="tab-eamapply-57-1">
<createTable tableName="EAMAPPLY">
<column name="UPDATEMAN" remarks="" type="VARCHAR(60)">
</column>
......@@ -128,7 +128,7 @@
<!--输出实体[EAMASSET]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-eamasset-91-6">
<changeSet author="a_LAB01_e85d8801c" id="tab-eamasset-93-6">
<createTable tableName="ASSET">
<column name="ASSETID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_EAMASSET_ASSETID"/>
......@@ -436,7 +436,7 @@
<!--输出实体[EAMPLAN]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-eamplan-54-19">
<changeSet author="a_LAB01_e85d8801c" id="tab-eamplan-56-19">
<createTable tableName="EAMPLAN">
<column name="UPDATEDATE" remarks="" type="DATETIME">
</column>
......@@ -700,7 +700,7 @@
<!--输出实体[EAMWORKORDER]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-eamworkorder-81-30">
<changeSet author="a_LAB01_e85d8801c" id="tab-eamworkorder-86-30">
<createTable tableName="WORKORDER">
<column name="WORKORDERID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_EAMWORKORDER_WORKORDERID"/>
......@@ -767,16 +767,16 @@
</changeSet>
<!--输出实体[EAMAPPLY]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-eamapply-51-32">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamapply-57-32">
<addForeignKeyConstraint baseColumnNames="EAMAPPLYTYPEID" baseTableName="EAMAPPLY" constraintName="DER1N_EAMAPPLY_EAMAPPLYTYPE_EA" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMAPPLYTYPEID" referencedTableName="EAMAPPLYTYPE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamapply-51-33">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamapply-57-33">
<addForeignKeyConstraint baseColumnNames="ASSETID" baseTableName="EAMAPPLY" constraintName="DER1N_EAMAPPLY_EAMASSET_ASSETI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ASSETID" referencedTableName="ASSET" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamapply-51-34">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamapply-57-34">
<addForeignKeyConstraint baseColumnNames="EAMLOCATIONID" baseTableName="EAMAPPLY" constraintName="DER1N_EAMAPPLY_EAMLOCATION_EAM" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMLOCATIONID" referencedTableName="EAMLOCATION" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamapply-51-35">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamapply-57-35">
<addForeignKeyConstraint baseColumnNames="EAMSERVICELEVELID" baseTableName="EAMAPPLY" constraintName="DER1N_EAMAPPLY_EAMSERVICELEVEL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMSERVICELEVELID" referencedTableName="EAMSERVICELEVEL" validate="true"/>
</changeSet>
<!--输出实体[EAMAPPLYSTATE]外键关系 -->
......@@ -790,16 +790,16 @@
<addForeignKeyConstraint baseColumnNames="EAMAPPLYSTATEMODELID" baseTableName="EAMAPPLYTYPE" constraintName="DER1N_EAMAPPLYTYPE_EAMAPPLYSTA" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMAPPLYSTATEMODELID" referencedTableName="EAMAPPLYSTATEMODEL" validate="true"/>
</changeSet>
<!--输出实体[EAMASSET]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-eamasset-91-39">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamasset-93-39">
<addForeignKeyConstraint baseColumnNames="EAMASSETSTATEID" baseTableName="ASSET" constraintName="DER1N_EAMASSET_EAMASSETSTATE_E" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMASSETSTATEID" referencedTableName="EAMASSETSTATE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamasset-91-40">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamasset-93-40">
<addForeignKeyConstraint baseColumnNames="EAMASSETTYPEID" baseTableName="ASSET" constraintName="DER1N_EAMASSET_EAMASSETTYPE_EA" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMASSETTYPEID" referencedTableName="EAMASSETTYPE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamasset-91-41">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamasset-93-41">
<addForeignKeyConstraint baseColumnNames="PASSETID" baseTableName="ASSET" constraintName="DER1N_EAMASSET_EAMASSET_PASSET" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ASSETID" referencedTableName="ASSET" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamasset-91-42">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamasset-93-42">
<addForeignKeyConstraint baseColumnNames="EAMLOCATIONID" baseTableName="ASSET" constraintName="DER1N_EAMASSET_EAMLOCATION_EAM" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMLOCATIONID" referencedTableName="EAMLOCATION" validate="true"/>
</changeSet>
<!--输出实体[EAMASSETPARTSGROUP]外键关系 -->
......@@ -842,13 +842,13 @@
<!--输出实体[EAMMONITORPOINT]外键关系 -->
<!--输出实体[EAMPRODUCT]外键关系 -->
<!--输出实体[EAMPLAN]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplan-54-54">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplan-56-54">
<addForeignKeyConstraint baseColumnNames="ASSETID" baseTableName="EAMPLAN" constraintName="DER1N_EAMPLAN_EAMASSET_ASSETID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ASSETID" referencedTableName="ASSET" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplan-54-55">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplan-56-55">
<addForeignKeyConstraint baseColumnNames="EAMLOCATIONID" baseTableName="EAMPLAN" constraintName="DER1N_EAMPLAN_EAMLOCATION_EAML" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMLOCATIONID" referencedTableName="EAMLOCATION" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplan-54-56">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplan-56-56">
<addForeignKeyConstraint baseColumnNames="EAMMONITORPOINTID" baseTableName="EAMPLAN" constraintName="DER1N_EAMPLAN_EAMMONITORPOINT_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMMONITORPOINTID" referencedTableName="EAMMONITORPOINT" validate="true"/>
</changeSet>
<!--输出实体[EAMPLANCDT]外键关系 -->
......@@ -892,22 +892,22 @@
<addForeignKeyConstraint baseColumnNames="EAMWOSTATEMODELID" baseTableName="EAMWOTYPE" constraintName="DER1N_EAMWOTYPE_EAMWOSTATEMODE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMWOSTATEMODELID" referencedTableName="EAMWOSTATEMODEL" validate="true"/>
</changeSet>
<!--输出实体[EAMWORKORDER]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-81-68">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-86-68">
<addForeignKeyConstraint baseColumnNames="ASSETID" baseTableName="WORKORDER" constraintName="DER1N_EAMWORKORDER_EAMASSET_AS" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ASSETID" referencedTableName="ASSET" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-81-69">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-86-69">
<addForeignKeyConstraint baseColumnNames="EAMLOCATIONID" baseTableName="WORKORDER" constraintName="DER1N_EAMWORKORDER_EAMLOCATION" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMLOCATIONID" referencedTableName="EAMLOCATION" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-81-70">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-86-70">
<addForeignKeyConstraint baseColumnNames="EAMSERVICELEVELID" baseTableName="WORKORDER" constraintName="DER1N_EAMWORKORDER_EAMSERVICEL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMSERVICELEVELID" referencedTableName="EAMSERVICELEVEL" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-81-71">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-86-71">
<addForeignKeyConstraint baseColumnNames="EAMWOORIGINID" baseTableName="WORKORDER" constraintName="DER1N_EAMWORKORDER_EAMWOORIGIN" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMWOORIGINID" referencedTableName="EAMWOORIGIN" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-81-72">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-86-72">
<addForeignKeyConstraint baseColumnNames="PWORKORDERID" baseTableName="WORKORDER" constraintName="DER1N_EAMWORKORDER_EAMWORKORDE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="WORKORDERID" referencedTableName="WORKORDER" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-81-73">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-86-73">
<addForeignKeyConstraint baseColumnNames="EAMWOTYPEID" baseTableName="WORKORDER" constraintName="DER1N_EAMWORKORDER_EAMWOTYPE_E" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMWOTYPEID" referencedTableName="EAMWOTYPE" validate="true"/>
</changeSet>
<!--输出实体[EAMWOORIGIN]外键关系 -->
......
......@@ -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,25 +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&allowMultiQueries=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_REGISTRY_NACOS_SERVER-ADDR=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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册