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

lab_gzf 部署微服务应用

上级 63f81a83
......@@ -179,6 +179,16 @@
"viewtag": "36033e61af0b1c58739674b69f745704",
"memo": "系统自动添加"
},
"eammonitorpointpickupview": {
"title": "测点数据选择视图",
"caption": "测点",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "WorkOrder",
"viewname": "EAMMonitorPointPickupView",
"viewfilename": "eammonitor-point-pickup-view",
"viewtag": "3b351d19dc35d9e1f2bc5e4baf98e9b8",
"memo": "系统自动添加"
},
"eamasseteditview": {
"title": "资产信息编辑",
"caption": "资产",
......@@ -419,6 +429,16 @@
"viewtag": "7d805e7ef99d4689b7b68c2c6247dceb",
"memo": "系统自动添加"
},
"eamplanlinegridview": {
"title": "计划步骤表格视图",
"caption": "计划步骤",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Plan",
"viewname": "EAMPlanLineGridView",
"viewfilename": "eamplan-line-grid-view",
"viewtag": "7ecd11c1c5ee3add05dd5915be17cdb7",
"memo": "系统自动添加"
},
"eamsparepartsgrouppickupview": {
"title": "备件包数据选择视图",
"caption": "备件包",
......@@ -429,6 +449,16 @@
"viewtag": "81139a9fb0fce24a58db188651ba7155",
"memo": "系统自动添加"
},
"eamplanlineeditview": {
"title": "计划步骤编辑",
"caption": "计划步骤",
"viewtype": "DEEDITVIEW",
"viewmodule": "Plan",
"viewname": "EAMPlanLineEditView",
"viewfilename": "eamplan-line-edit-view",
"viewtag": "82e6b21fb5252ac02580ad072b168cef",
"memo": "系统自动添加"
},
"eamworkorderchildwogridview": {
"title": "子工单表格",
"caption": "工单",
......@@ -459,6 +489,16 @@
"viewtag": "906130a9861c2b0cff3173c9e171c1d1",
"memo": "系统自动添加"
},
"eammonitorpointpickupgridview": {
"title": "测点选择表格视图",
"caption": "测点",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "WorkOrder",
"viewname": "EAMMonitorPointPickupGridView",
"viewfilename": "eammonitor-point-pickup-grid-view",
"viewtag": "91dd54198b1e7777908d564a86bc548d",
"memo": "系统自动添加"
},
"eamapplyinfoview": {
"title": "维护申请信息",
"caption": "维护申请",
......@@ -599,6 +639,16 @@
"viewtag": "b24fce391aeca43222a1017b50ba40e2",
"memo": ""
},
"eamplanpickupgridview": {
"title": "维护计划选择表格视图",
"caption": "维护计划",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "Plan",
"viewname": "EAMPlanPickupGridView",
"viewfilename": "eamplan-pickup-grid-view",
"viewtag": "b3cc4865b65edc16f8ad37d87bda4bae",
"memo": "系统自动添加"
},
"eamlocationstatemodellineeditview": {
"title": "功能位置状态模型明细编辑视图",
"caption": "功能位置状态模型明细",
......@@ -879,6 +929,16 @@
"viewtag": "ef9454c4b53cd737f1beca7bf2c5ea25",
"memo": ""
},
"eamplanpickupview": {
"title": "维护计划数据选择视图",
"caption": "维护计划",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "Plan",
"viewname": "EAMPlanPickupView",
"viewfilename": "eamplan-pickup-view",
"viewtag": "f38b93e7294aee1966d727940e0852f4",
"memo": "系统自动添加"
},
"eamworkorderapplywogridview": {
"title": "产生的工单",
"caption": "工单",
......
......@@ -43,6 +43,7 @@ export class AuthServiceRegister {
this.allAuthService.set('eamlocationtype', () => import('@/authservice/eamlocation-type/eamlocation-type-auth-service'));
this.allAuthService.set('eamworkorder', () => import('@/authservice/eamwork-order/eamwork-order-auth-service'));
this.allAuthService.set('eamlocation', () => import('@/authservice/eamlocation/eamlocation-auth-service'));
this.allAuthService.set('eammonitorpoint', () => import('@/authservice/eammonitor-point/eammonitor-point-auth-service'));
this.allAuthService.set('eamassetstate', () => import('@/authservice/eamasset-state/eamasset-state-auth-service'));
this.allAuthService.set('eamlocationstate', () => import('@/authservice/eamlocation-state/eamlocation-state-auth-service'));
this.allAuthService.set('eamassettype', () => import('@/authservice/eamasset-type/eamasset-type-auth-service'));
......
import AuthService from '../auth-service';
/**
* 测点权限服务对象基类
*
* @export
* @class EAMMonitorPointAuthServiceBase
* @extends {AuthService}
*/
export default class EAMMonitorPointAuthServiceBase extends AuthService {
/**
* Creates an instance of EAMMonitorPointAuthServiceBase.
*
* @param {*} [opts={}]
* @memberof EAMMonitorPointAuthServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 根据当前数据获取实体操作标识
*
* @param {*} mainSateOPPrivs 传入数据操作标识
* @returns {any}
* @memberof EAMMonitorPointAuthServiceBase
*/
public getOPPrivs(mainSateOPPrivs:any):any{
let curDefaultOPPrivs:any = JSON.parse(JSON.stringify(this.defaultOPPrivs));
if(mainSateOPPrivs){
Object.assign(curDefaultOPPrivs,mainSateOPPrivs);
}
return curDefaultOPPrivs;
}
}
\ No newline at end of file
import EAMMonitorPointAuthServiceBase from './eammonitor-point-auth-service-base';
/**
* 测点权限服务对象
*
* @export
* @class EAMMonitorPointAuthService
* @extends {EAMMonitorPointAuthServiceBase}
*/
export default class EAMMonitorPointAuthService extends EAMMonitorPointAuthServiceBase {
/**
* Creates an instance of EAMMonitorPointAuthService.
*
* @param {*} [opts={}]
* @memberof EAMMonitorPointAuthService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
/**
* 测点
*
* @export
* @interface EAMMonitorPoint
*/
export interface EAMMonitorPoint {
/**
* 测点标识
*
* @returns {*}
* @memberof EAMMonitorPoint
*/
eammonitorpointid?: any;
/**
* 测点名称
*
* @returns {*}
* @memberof EAMMonitorPoint
*/
eammonitorpointname?: any;
/**
* 更新人
*
* @returns {*}
* @memberof EAMMonitorPoint
*/
updateman?: any;
/**
* 更新时间
*
* @returns {*}
* @memberof EAMMonitorPoint
*/
updatedate?: any;
/**
* 建立时间
*
* @returns {*}
* @memberof EAMMonitorPoint
*/
createdate?: any;
/**
* 建立人
*
* @returns {*}
* @memberof EAMMonitorPoint
*/
createman?: any;
}
\ No newline at end of file
......@@ -77,4 +77,60 @@ export interface EAMPlanLine {
* @memberof EAMPlanLine
*/
assetid?: any;
/**
* 序号
*
* @returns {*}
* @memberof EAMPlanLine
*/
sortnumber?: any;
/**
* 内容
*
* @returns {*}
* @memberof EAMPlanLine
*/
content?: any;
/**
* 维护计划
*
* @returns {*}
* @memberof EAMPlanLine
*/
eamplanname?: any;
/**
* 资产
*
* @returns {*}
* @memberof EAMPlanLine
*/
assetname?: any;
/**
* 功能位置
*
* @returns {*}
* @memberof EAMPlanLine
*/
eamlocationname?: any;
/**
* 测点标识
*
* @returns {*}
* @memberof EAMPlanLine
*/
eammonitorpointid?: any;
/**
* 测点
*
* @returns {*}
* @memberof EAMPlanLine
*/
eammonitorpointname?: any;
}
\ No newline at end of file
......@@ -125,4 +125,12 @@ export interface EAMPlan {
* @memberof EAMPlan
*/
mdate?: any;
/**
* 内容
*
* @returns {*}
* @memberof EAMPlan
*/
content?: any;
}
\ No newline at end of file
......@@ -2,6 +2,7 @@ import eamlocationstatemodel_en_US from '@locale/lanres/entities/eamlocation-sta
import eamlocationtype_en_US from '@locale/lanres/entities/eamlocation-type/eamlocation-type_en_US';
import eamworkorder_en_US from '@locale/lanres/entities/eamwork-order/eamwork-order_en_US';
import eamlocation_en_US from '@locale/lanres/entities/eamlocation/eamlocation_en_US';
import eammonitorpoint_en_US from '@locale/lanres/entities/eammonitor-point/eammonitor-point_en_US';
import eamassetstate_en_US from '@locale/lanres/entities/eamasset-state/eamasset-state_en_US';
import eamlocationstate_en_US from '@locale/lanres/entities/eamlocation-state/eamlocation-state_en_US';
import eamassettype_en_US from '@locale/lanres/entities/eamasset-type/eamasset-type_en_US';
......@@ -271,6 +272,7 @@ export default {
eamlocationtype: eamlocationtype_en_US,
eamworkorder: eamworkorder_en_US,
eamlocation: eamlocation_en_US,
eammonitorpoint: eammonitorpoint_en_US,
eamassetstate: eamassetstate_en_US,
eamlocationstate: eamlocationstate_en_US,
eamassettype: eamassettype_en_US,
......
......@@ -2,6 +2,7 @@ import eamlocationstatemodel_zh_CN from '@locale/lanres/entities/eamlocation-sta
import eamlocationtype_zh_CN from '@locale/lanres/entities/eamlocation-type/eamlocation-type_zh_CN';
import eamworkorder_zh_CN from '@locale/lanres/entities/eamwork-order/eamwork-order_zh_CN';
import eamlocation_zh_CN from '@locale/lanres/entities/eamlocation/eamlocation_zh_CN';
import eammonitorpoint_zh_CN from '@locale/lanres/entities/eammonitor-point/eammonitor-point_zh_CN';
import eamassetstate_zh_CN from '@locale/lanres/entities/eamasset-state/eamasset-state_zh_CN';
import eamlocationstate_zh_CN from '@locale/lanres/entities/eamlocation-state/eamlocation-state_zh_CN';
import eamassettype_zh_CN from '@locale/lanres/entities/eamasset-type/eamasset-type_zh_CN';
......@@ -270,6 +271,7 @@ export default {
eamlocationtype: eamlocationtype_zh_CN,
eamworkorder: eamworkorder_zh_CN,
eamlocation: eamlocation_zh_CN,
eammonitorpoint: eammonitorpoint_zh_CN,
eamassetstate: eamassetstate_zh_CN,
eamlocationstate: eamlocationstate_zh_CN,
eamassettype: eamassettype_zh_CN,
......
export default {
fields: {
eammonitorpointid: "测点标识",
eammonitorpointname: "测点名称",
updateman: "更新人",
updatedate: "更新时间",
createdate: "建立时间",
createman: "建立人",
},
views: {
pickupview: {
caption: "测点",
title: "测点数据选择视图",
},
pickupgridview: {
caption: "测点",
title: "测点选择表格视图",
},
},
main_grid: {
columns: {
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
};
\ No newline at end of file
export default {
fields: {
eammonitorpointid: "测点标识",
eammonitorpointname: "测点名称",
updateman: "更新人",
updatedate: "更新时间",
createdate: "建立时间",
createman: "建立人",
},
views: {
pickupview: {
caption: "测点",
title: "测点数据选择视图",
},
pickupgridview: {
caption: "测点",
title: "测点选择表格视图",
},
},
main_grid: {
columns: {
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
};
\ No newline at end of file
......@@ -10,5 +10,126 @@ export default {
eamplanid: "维护计划标识",
eamlocationid: "功能位置标识",
assetid: "资产标识",
sortnumber: "序号",
content: "内容",
eamplanname: "维护计划",
assetname: "资产",
eamlocationname: "功能位置",
eammonitorpointid: "测点标识",
eammonitorpointname: "测点",
},
views: {
gridview: {
caption: "计划步骤",
title: "计划步骤表格视图",
},
editview: {
caption: "计划步骤",
title: "计划步骤编辑",
},
},
main_form: {
details: {
group1: "基本信息",
grouppanel1: "资产信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "计划步骤标识",
srfmajortext: "计划步骤名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
sortnumber: "序号",
eamplanlinename: "计划步骤名称",
eamplanname: "维护计划",
content: "内容",
assetname: "资产",
eamlocationname: "功能位置",
eammonitorpointname: "测点",
eamlocationid: "功能位置标识",
eammonitorpointid: "测点标识",
eamplanid: "维护计划标识",
eamplanlineid: "计划步骤标识",
assetid: "资产标识",
},
uiactions: {
},
},
main_grid: {
columns: {
sortnumber: "序号",
eamplanlinename: "计划步骤名称",
eamplanname: "维护计划",
assetname: "资产",
eamlocationname: "功能位置",
content: "内容",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem5: {
caption: "New",
tip: "New",
},
seperator1: {
caption: "",
tip: "",
},
tbitem2: {
caption: "Edit",
tip: "Edit {0}",
},
seperator2: {
caption: "",
tip: "",
},
tbitem1: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem10: {
caption: "Filter",
tip: "Filter",
},
},
editviewtoolbar_toolbar: {
tbitem2: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem1: {
caption: "关闭",
tip: "关闭",
},
},
};
\ No newline at end of file
......@@ -9,5 +9,126 @@ export default {
eamplanid: "维护计划标识",
eamlocationid: "功能位置标识",
assetid: "资产标识",
sortnumber: "序号",
content: "内容",
eamplanname: "维护计划",
assetname: "资产",
eamlocationname: "功能位置",
eammonitorpointid: "测点标识",
eammonitorpointname: "测点",
},
views: {
gridview: {
caption: "计划步骤",
title: "计划步骤表格视图",
},
editview: {
caption: "计划步骤",
title: "计划步骤编辑",
},
},
main_form: {
details: {
group1: "基本信息",
grouppanel1: "资产信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "计划步骤标识",
srfmajortext: "计划步骤名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
sortnumber: "序号",
eamplanlinename: "计划步骤名称",
eamplanname: "维护计划",
content: "内容",
assetname: "资产",
eamlocationname: "功能位置",
eammonitorpointname: "测点",
eamlocationid: "功能位置标识",
eammonitorpointid: "测点标识",
eamplanid: "维护计划标识",
eamplanlineid: "计划步骤标识",
assetid: "资产标识",
},
uiactions: {
},
},
main_grid: {
columns: {
sortnumber: "序号",
eamplanlinename: "计划步骤名称",
eamplanname: "维护计划",
assetname: "资产",
eamlocationname: "功能位置",
content: "内容",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem5: {
caption: "新建",
tip: "新建",
},
seperator1: {
caption: "",
tip: "",
},
tbitem2: {
caption: "编辑",
tip: "编辑",
},
seperator2: {
caption: "",
tip: "",
},
tbitem1: {
caption: "拷贝",
tip: "拷贝",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "导出",
tip: "导出",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem10: {
caption: "过滤",
tip: "过滤",
},
},
editviewtoolbar_toolbar: {
tbitem2: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem1: {
caption: "关闭",
tip: "关闭",
},
},
};
\ No newline at end of file
......@@ -16,6 +16,7 @@ export default {
eammonitorpointname: "测点",
description: "描述",
mdate: "制定日期",
content: "内容",
},
views: {
infoview: {
......@@ -30,6 +31,10 @@ export default {
caption: "维护计划",
title: "维护计划主信息",
},
pickupgridview: {
caption: "维护计划",
title: "维护计划选择表格视图",
},
quickcreateview: {
caption: "维护计划",
title: "快速新建",
......@@ -38,6 +43,10 @@ export default {
caption: "维护计划",
title: "维护计划信息",
},
pickupview: {
caption: "维护计划",
title: "维护计划数据选择视图",
},
},
if_001_form: {
details: {
......
......@@ -15,6 +15,7 @@ export default {
eammonitorpointname: "测点",
description: "描述",
mdate: "制定日期",
content: "内容",
},
views: {
infoview: {
......@@ -29,6 +30,10 @@ export default {
caption: "维护计划",
title: "维护计划主信息",
},
pickupgridview: {
caption: "维护计划",
title: "维护计划选择表格视图",
},
quickcreateview: {
caption: "维护计划",
title: "快速新建",
......@@ -37,6 +42,10 @@ export default {
caption: "维护计划",
title: "维护计划信息",
},
pickupview: {
caption: "维护计划",
title: "维护计划数据选择视图",
},
},
if_001_form: {
details: {
......
import qs from 'qs';
import { MockAdapter } from '@/mock/mock-adapter';
const mock = MockAdapter.getInstance();
// 模拟数据
const mockDatas: Array<any> = [
];
//getwflink
mock.onGet(new RegExp(/^\/wfcore\/ibizassetmanagement-app-assetmanagement\/eammonitorpoints\/[a-zA-Z0-9\-\;]+\/usertasks\/[a-zA-Z0-9\-\;]+\/ways$/)).reply((config: any) => {
console.groupCollapsed("实体:eammonitorpoint 方法: getwflink");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status,[
{"sequenceFlowId":"dfdsfdsfdsfdsfds","sequenceFlowName":"同意",
"taskId":"aaaaddddccccddddd","processDefinitionKey":"support-workorders-approve-v1",
"processInstanceId":"ddlfldldfldsfds","refViewKey":""},
{"sequenceFlowId":"ddssdfdfdfdfsfdf","sequenceFlowName":"不同意",
"taskId":"aaaaddddccccddddd","processDefinitionKey":"support-workorders-approve-v1",
"processInstanceId":"ddfdsldlfdlldsf","refViewKey":"workorder_ltform_editview"}
]];
});
// getwfstep
mock.onGet(new RegExp(/^\/wfcore\/ibizassetmanagement-app-assetmanagement\/eammonitorpoints\/process-definitions-nodes$/)).reply((config: any) => {
console.groupCollapsed("实体:eammonitorpoint 方法: getwfstep");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, [
{"userTaskId":"sddfddfd-dfdf-fdfd-fdf-dfdfd",
"userTaskName":"待审",
"cnt":0,
"processDefinitionKey":"support-workorders-approve-v1",
"processDefinitionName":"工单审批流程v1"
},
{"userTaskId":"sddfddfd-dfdf-fdfd-fdf-87927",
"userTaskName":"待分配",
"cnt":3,
"processDefinitionKey":"support-workorders-approve-v1",
"processDefinitionName":"工单审批流程v1"}
]];
});
// createBatch
mock.onPost(new RegExp(/^\/eammonitorpoints\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:eammonitorpoint 方法: createBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, {}];
});
// updateBatch
mock.onPut(new RegExp(/^\/eammonitorpoints\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:eammonitorpoint 方法: updateBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, {}];
});
// removeBatch
mock.onDelete(new RegExp(/^\/eammonitorpoints\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:eammonitorpoint 方法: removeBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, {}];
});
// Select
mock.onGet(new RegExp(/^\/eammonitorpoints\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:eammonitorpoint 方法: 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> = ['eammonitorpointid'];
const matchArray:any = new RegExp(/^\/eammonitorpoints\/([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.eammonitorpointid, tempValue.eammonitorpointid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Create
mock.onPost(new RegExp(/^\/eammonitorpoints\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eammonitorpoint 方法: 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> = ['eammonitorpointid'];
const matchArray:any = new RegExp(/^\/eammonitorpoints\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas[0]);
console.groupEnd();
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/eammonitorpoints\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eammonitorpoint 方法: 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> = ['eammonitorpointid'];
const matchArray:any = new RegExp(/^\/eammonitorpoints\/([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.eammonitorpointid, tempValue.eammonitorpointid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eammonitorpointid'] == tempValue['eammonitorpointid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/eammonitorpoints\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:eammonitorpoint 方法: GetDraft");
console.table({url:config.url, method: config.method, data:config.data});
// GetDraft
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/eammonitorpoints\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:eammonitorpoint 方法: 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> = ['eammonitorpointid'];
const matchArray:any = new RegExp(/^\/eammonitorpoints\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.eammonitorpointid, tempValue.eammonitorpointid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eammonitorpointid'] == tempValue['eammonitorpointid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/eammonitorpoints\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:eammonitorpoint 方法: 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> = ['eammonitorpointid'];
const matchArray:any = new RegExp(/^\/eammonitorpoints\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.eammonitorpointid, tempValue.eammonitorpointid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eammonitorpointid'] == tempValue['eammonitorpointid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// FetchDefault
mock.onGet(new RegExp(/^\/eammonitorpoints\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:eammonitorpoint 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas);
console.groupEnd();
console.groupEnd();
return [status, mockDatas ? mockDatas : []];
});
// FetchDefault
mock.onGet(new RegExp(/^\/eammonitorpoints\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:eammonitorpoint 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
let params = qs.parse(url);
Object.assign(config, params);
}
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
let total = mockDatas.length;
let records: Array<any> = [];
if(!config.page || !config.size){
records = mockDatas;
}else{
if((config.page-1)*config.size < total){
records = mockDatas.slice(config.page,config.size);
}
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(records ? records : []);
console.groupEnd();
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/eammonitorpoints\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eammonitorpoint 方法: 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> = ['eammonitorpointid'];
const matchArray:any = new RegExp(/^\/eammonitorpoints\/([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.eammonitorpointid, tempValue.eammonitorpointid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/eammonitorpoints\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eammonitorpoint 方法: 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> = ['eammonitorpointid'];
const matchArray:any = new RegExp(/^\/eammonitorpoints\/([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.eammonitorpointid, tempValue.eammonitorpointid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
......@@ -87,6 +87,35 @@ mock.onDelete(new RegExp(/^\/eamplanlines\/batch$/)).reply((config: any) => {
});
// 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");
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> = ['eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/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(/^\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: Select");
......@@ -114,6 +143,33 @@ mock.onGet(new RegExp(/^\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).repl
console.groupEnd();
return [status, _items];
});
// 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");
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> = ['eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/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(/^\/eamplanlines\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -140,6 +196,33 @@ mock.onPost(new RegExp(/^\/eamplanlines\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((con
console.groupEnd();
return [status, mockDatas[0]];
});
// 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");
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> = ['eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/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(/^\/eamplanlines\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -179,6 +262,25 @@ mock.onPut(new RegExp(/^\/eamplanlines\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((conf
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/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(/^\/eamplanlines\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: GetDraft");
......@@ -194,6 +296,33 @@ mock.onGet(new RegExp(/^\/eamplanlines\/getdraft$/)).reply((config: any) => {
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");
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> = ['eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/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(/^\/eamplanlines\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
......@@ -232,6 +361,33 @@ mock.onPost(new RegExp(/^\/eamplanlines\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).
console.groupEnd();
return [status, data];
});
// 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");
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> = ['eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/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(/^\/eamplanlines\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
......@@ -270,6 +426,51 @@ mock.onPost(new RegExp(/^\/eamplanlines\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).repl
console.groupEnd();
return [status, data];
});
// FetchDefault
mock.onGet(new RegExp(/^\/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> = ['eamplanid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/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(/^\/eamplanlines\/fetchdefault$/)).reply((config: any) => {
......@@ -314,15 +515,57 @@ mock.onGet(new RegExp(/^\/eamplanlines\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/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> = ['eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/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(/^\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: Remove");
......@@ -351,6 +594,34 @@ mock.onDelete(new RegExp(/^\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((co
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");
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> = ['eamplanid','eamplanlineid'];
const matchArray:any = new RegExp(/^\/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(/^\/eamplanlines\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamplanline 方法: Get");
......
......@@ -11,6 +11,7 @@ import './entity/eamlocation-state-models/eamlocation-state-models';
import './entity/eamlocation-types/eamlocation-types';
import './entity/eamwork-orders/eamwork-orders';
import './entity/eamlocations/eamlocations';
import './entity/eammonitor-points/eammonitor-points';
import './entity/eamasset-states/eamasset-states';
import './entity/eamlocation-states/eamlocation-states';
import './entity/eamasset-types/eamasset-types';
......
......@@ -151,6 +151,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMApplyTypePickupGridView",
"viewtag": "36033e61af0b1c58739674b69f745704"
},
"eammonitorpointpickupview": {
"title": "测点数据选择视图",
"caption": "测点",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "WorkOrder",
"viewname": "EAMMonitorPointPickupView",
"viewtag": "3b351d19dc35d9e1f2bc5e4baf98e9b8"
},
"eamasseteditview": {
"title": "资产信息编辑",
"caption": "资产",
......@@ -343,6 +351,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMAssetPartsGroupEditView",
"viewtag": "7d805e7ef99d4689b7b68c2c6247dceb"
},
"eamplanlinegridview": {
"title": "计划步骤表格视图",
"caption": "计划步骤",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Plan",
"viewname": "EAMPlanLineGridView",
"viewtag": "7ecd11c1c5ee3add05dd5915be17cdb7"
},
"eamsparepartsgrouppickupview": {
"title": "备件包数据选择视图",
"caption": "备件包",
......@@ -351,6 +367,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMSparePartsGroupPickupView",
"viewtag": "81139a9fb0fce24a58db188651ba7155"
},
"eamplanlineeditview": {
"title": "计划步骤编辑",
"caption": "计划步骤",
"viewtype": "DEEDITVIEW",
"viewmodule": "Plan",
"viewname": "EAMPlanLineEditView",
"viewtag": "82e6b21fb5252ac02580ad072b168cef"
},
"eamworkorderchildwogridview": {
"title": "子工单表格",
"caption": "工单",
......@@ -375,6 +399,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMAssetPickupView",
"viewtag": "906130a9861c2b0cff3173c9e171c1d1"
},
"eammonitorpointpickupgridview": {
"title": "测点选择表格视图",
"caption": "测点",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "WorkOrder",
"viewname": "EAMMonitorPointPickupGridView",
"viewtag": "91dd54198b1e7777908d564a86bc548d"
},
"eamapplyinfoview": {
"title": "维护申请信息",
"caption": "维护申请",
......@@ -487,6 +519,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMLocationChildGridView",
"viewtag": "b24fce391aeca43222a1017b50ba40e2"
},
"eamplanpickupgridview": {
"title": "维护计划选择表格视图",
"caption": "维护计划",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "Plan",
"viewname": "EAMPlanPickupGridView",
"viewtag": "b3cc4865b65edc16f8ad37d87bda4bae"
},
"eamlocationstatemodellineeditview": {
"title": "功能位置状态模型明细编辑视图",
"caption": "功能位置状态模型明细",
......@@ -711,6 +751,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMApplyQuickCreateView",
"viewtag": "ef9454c4b53cd737f1beca7bf2c5ea25"
},
"eamplanpickupview": {
"title": "维护计划数据选择视图",
"caption": "维护计划",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "Plan",
"viewname": "EAMPlanPickupView",
"viewtag": "f38b93e7294aee1966d727940e0852f4"
},
"eamworkorderapplywogridview": {
"title": "产生的工单",
"caption": "工单",
......
......@@ -16,12 +16,15 @@ export const PageComponents = {
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('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'));
......@@ -50,6 +53,7 @@ export const PageComponents = {
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('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'));
......@@ -74,6 +78,7 @@ export const PageComponents = {
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'));
......@@ -82,6 +87,7 @@ export const PageComponents = {
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('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-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'));
......
......@@ -297,6 +297,20 @@ const router = new Router({
},
component: () => import('@pages/plan/eamplan-grid-view/eamplan-grid-view.vue'),
},
{
path: 'eamplans/:eamplan?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.eamplan.views.pickupgridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamplans', parameterName: 'eamplan' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/plan/eamplan-pickup-grid-view/eamplan-pickup-grid-view.vue'),
},
{
path: 'eamservicelevels/:eamservicelevel?/gridview/:gridview?',
meta: {
......@@ -411,6 +425,49 @@ const router = new Router({
},
component: () => import('@pages/asset/eamspare-parts-proparts-pro-grid-view/eamspare-parts-proparts-pro-grid-view.vue'),
},
{
path: 'eamplans/:eamplan?/eamplanlines/:eamplanline?/editview/:editview?',
meta: {
caption: 'entities.eamplanline.views.editview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamplans', parameterName: 'eamplan' },
{ pathName: 'eamplanlines', parameterName: 'eamplanline' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/plan/eamplan-line-edit-view/eamplan-line-edit-view.vue'),
},
{
path: 'eamplanlines/:eamplanline?/editview/:editview?',
meta: {
caption: 'entities.eamplanline.views.editview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamplanlines', parameterName: 'eamplanline' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/plan/eamplan-line-edit-view/eamplan-line-edit-view.vue'),
},
{
path: 'eammonitorpoints/:eammonitorpoint?/pickupview/:pickupview?',
meta: {
caption: 'entities.eammonitorpoint.views.pickupview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eammonitorpoints', parameterName: 'eammonitorpoint' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/work-order/eammonitor-point-pickup-view/eammonitor-point-pickup-view.vue'),
},
{
path: 'eamplans/:eamplan?/eamworkorders/:eamworkorder?/childwogridview/:childwogridview?',
meta: {
......@@ -968,6 +1025,20 @@ const router = new Router({
},
component: () => import('@pages/asset/eamasset-parts-group-edit-view/eamasset-parts-group-edit-view.vue'),
},
{
path: 'eammonitorpoints/:eammonitorpoint?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.eammonitorpoint.views.pickupgridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eammonitorpoints', parameterName: 'eammonitorpoint' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/work-order/eammonitor-point-pickup-grid-view/eammonitor-point-pickup-grid-view.vue'),
},
{
path: 'eamlocationtypes/:eamlocationtype?/pickupgridview/:pickupgridview?',
meta: {
......@@ -1439,6 +1510,20 @@ const router = new Router({
},
component: () => import('@pages/location/eamlocation-state-model-line-grid-view/eamlocation-state-model-line-grid-view.vue'),
},
{
path: 'eamplans/:eamplan?/pickupview/:pickupview?',
meta: {
caption: 'entities.eamplan.views.pickupview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamplans', parameterName: 'eamplan' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/plan/eamplan-pickup-view/eamplan-pickup-view.vue'),
},
{
path: 'eamlocationtypes/:eamlocationtype?/editview/:editview?',
meta: {
......@@ -1581,6 +1666,35 @@ const router = new Router({
},
component: () => import('@pages/apply/eamapply-type-grid-view/eamapply-type-grid-view.vue'),
},
{
path: 'eamplans/:eamplan?/eamplanlines/:eamplanline?/gridview/:gridview?',
meta: {
caption: 'entities.eamplanline.views.gridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamplans', parameterName: 'eamplan' },
{ pathName: 'eamplanlines', parameterName: 'eamplanline' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/plan/eamplan-line-grid-view/eamplan-line-grid-view.vue'),
},
{
path: 'eamplanlines/:eamplanline?/gridview/:gridview?',
meta: {
caption: 'entities.eamplanline.views.gridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamplanlines', parameterName: 'eamplanline' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/plan/eamplan-line-grid-view/eamplan-line-grid-view.vue'),
},
{
path: 'eamplans/:eamplan?/eamworkorders/:eamworkorder?/quickcreateview/:quickcreateview?',
meta: {
......
import { Subject } from 'rxjs';
import { EditViewBase } from '@/studio-core';
import EAMPlanLineService from '@/service/eamplan-line/eamplan-line-service';
import EAMPlanLineAuthService from '@/authservice/eamplan-line/eamplan-line-auth-service';
import EditViewEngine from '@engine/view/edit-view-engine';
import EAMPlanLineUIService from '@/uiservice/eamplan-line/eamplan-line-ui-service';
/**
* 计划步骤编辑视图基类
*
* @export
* @class EAMPlanLineEditViewBase
* @extends {EditViewBase}
*/
export class EAMPlanLineEditViewBase extends EditViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMPlanLineEditViewBase
*/
protected appDeName: string = 'eamplanline';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMPlanLineEditViewBase
*/
protected appDeKey: string = 'eamplanlineid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMPlanLineEditViewBase
*/
protected appDeMajor: string = 'eamplanlinename';
/**
* 实体服务对象
*
* @type {EAMPlanLineService}
* @memberof EAMPlanLineEditViewBase
*/
protected appEntityService: EAMPlanLineService = new EAMPlanLineService;
/**
* 实体权限服务对象
*
* @type EAMPlanLineUIService
* @memberof EAMPlanLineEditViewBase
*/
public appUIService: EAMPlanLineUIService = new EAMPlanLineUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMPlanLineEditViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMPlanLineEditViewBase
*/
protected model: any = {
srfCaption: 'entities.eamplanline.views.editview.caption',
srfTitle: 'entities.eamplanline.views.editview.title',
srfSubTitle: 'entities.eamplanline.views.editview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMPlanLineEditViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_form: { name: 'form', type: 'FORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof EAMPlanLineEditView
*/
public toolBarModels: any = {
tbitem2: { name: 'tbitem2', caption: '保存并关闭', 'isShowCaption': true, 'isShowIcon': true, tooltip: '保存并关闭', iconcls: 'sx-tb-saveandclose', icon: '../sasrfex/images/default/icon_saveandclose.png', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '', class: '' } },
tbitem1: { name: 'tbitem1', caption: '关闭', 'isShowCaption': true, 'isShowIcon': true, tooltip: '关闭', iconcls: 'fa fa-sign-out', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Exit', target: '', class: '' } },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '82e6b21fb5252ac02580ad072b168cef';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMPlanLineEditViewBase
*/
public engine: EditViewEngine = new EditViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMPlanLineEditViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'eamplanline',
majorPSDEField: 'eamplanlinename',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanLineEditViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem2')) {
this.toolbar_tbitem2_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem1')) {
this.toolbar_tbitem1_click(null, '', $event2);
}
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanLineEditViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanLineEditViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanLineEditViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem2_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"EAMPlanLine");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem1_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Exit(datas, contextJO,paramJO, $event, xData,this,"EAMPlanLine");
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMPlanLineEditViewBase
*/
public SaveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.saveAndExit instanceof Function) {
xData.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.saveAndExit && _this.saveAndExit instanceof Function) {
_this.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
* 关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMPlanLineEditViewBase
*/
public Exit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.closeView(args);
if(window.parent){
window.parent.postMessage([{ ...args }],'*');
}
}
}
\ No newline at end of file
<studio-view-style2 viewName="eamplanlineeditview" viewTitle="计划步骤编辑" class='deeditview eamplan-line-edit-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click.apply(_self, arguments)"/> </template>
<view_form
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="true"
updateAction="Update"
removeAction="Remove"
loaddraftAction="GetDraft"
loadAction="Get"
createAction="Create"
WFSubmitAction=""
WFStartAction=""
style=''
name="form"
ref='form'
@save="form_save($event)"
@remove="form_remove($event)"
@load="form_load($event)"
@closeview="closeView($event)">
</view_form>
</studio-view-style2>
\ No newline at end of file
<template src="./eamplan-line-edit-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMPlanLineEditViewBase } from './eamplan-line-edit-view-base';
import view_form from '@widgets/eamplan-line/main-form/main-form.vue';
/**
* 计划步骤编辑视图
*
* @export
* @class EAMPlanLineEditView
* @extends {EAMPlanLineEditViewBase}
*/
@Component({
components: {
view_form,
}
})
@VueLifeCycleProcessing()
export default class EAMPlanLineEditView extends EAMPlanLineEditViewBase { }
</script>
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import EAMPlanLineService from '@/service/eamplan-line/eamplan-line-service';
import EAMPlanLineAuthService from '@/authservice/eamplan-line/eamplan-line-auth-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import EAMPlanLineUIService from '@/uiservice/eamplan-line/eamplan-line-ui-service';
import CodeListService from "@service/app/codelist-service";
/**
* 计划步骤表格视图视图基类
*
* @export
* @class EAMPlanLineGridViewBase
* @extends {GridViewBase}
*/
export class EAMPlanLineGridViewBase extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMPlanLineGridViewBase
*/
protected appDeName: string = 'eamplanline';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMPlanLineGridViewBase
*/
protected appDeKey: string = 'eamplanlineid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMPlanLineGridViewBase
*/
protected appDeMajor: string = 'eamplanlinename';
/**
* 实体服务对象
*
* @type {EAMPlanLineService}
* @memberof EAMPlanLineGridViewBase
*/
protected appEntityService: EAMPlanLineService = new EAMPlanLineService;
/**
* 实体权限服务对象
*
* @type EAMPlanLineUIService
* @memberof EAMPlanLineGridViewBase
*/
public appUIService: EAMPlanLineUIService = new EAMPlanLineUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMPlanLineGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMPlanLineGridViewBase
*/
protected model: any = {
srfCaption: 'entities.eamplanline.views.gridview.caption',
srfTitle: 'entities.eamplanline.views.gridview.title',
srfSubTitle: 'entities.eamplanline.views.gridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMPlanLineGridViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof EAMPlanLineGridView
*/
public toolBarModels: any = {
tbitem5: { name: 'tbitem5', caption: '新建', 'isShowCaption': true, 'isShowIcon': true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'New', target: '', class: '' } },
seperator1: { name: 'seperator1', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem2: { name: 'tbitem2', caption: '编辑', 'isShowCaption': true, 'isShowIcon': true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY', class: '' } },
seperator2: { name: 'seperator2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem1: { name: 'tbitem1', caption: '拷贝', 'isShowCaption': true, 'isShowIcon': true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY', class: '' } },
tbitem15: { name: 'tbitem15', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem8: { name: 'tbitem8', caption: '删除', 'isShowCaption': true, 'isShowIcon': true, tooltip: '删除', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY', class: '' } },
tbitem16: { name: 'tbitem16', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem3: { name: 'tbitem3', caption: '导出', 'isShowCaption': true, 'isShowIcon': true, tooltip: '导出', iconcls: 'fa fa-file-excel-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ExportExcel', target: '' }, MaxRowCount: 1000, class: '' },
tbitem17: { name: 'tbitem17', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem10: { name: 'tbitem10', caption: '过滤', 'isShowCaption': true, 'isShowIcon': true, tooltip: '过滤', iconcls: 'fa fa-filter', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ToggleFilter', target: '', class: '' } },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '7ecd11c1c5ee3add05dd5915be17cdb7';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMPlanLineGridViewBase
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMPlanLineGridViewBase
*/
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: 'eamplanline',
majorPSDEField: 'eamplanlinename',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanLineGridViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem2')) {
this.toolbar_tbitem2_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem1')) {
this.toolbar_tbitem1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem7')) {
this.toolbar_tbitem7_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem10')) {
this.toolbar_tbitem10_click(null, '', $event2);
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanLineGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanLineGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanLineGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanLineGridViewBase
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanLineGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanLineGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanLineGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanLineGridViewBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem5_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"EAMPlanLine");
}
/**
* 逻辑事件
*
* @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,"EAMPlanLine");
}
/**
* 逻辑事件
*
* @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,"EAMPlanLine");
}
/**
* 逻辑事件
*
* @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,"EAMPlanLine");
}
/**
* 逻辑事件
*
* @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,"EAMPlanLine");
}
/**
* 逻辑事件
*
* @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,"EAMPlanLine");
}
/**
* 逻辑事件
*
* @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,"EAMPlanLine");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMPlanLineGridView
*/
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.eamplanline;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
let deResParameters: any[] = [];
if(tempContext.eamplan && true){
deResParameters = [
{ pathName: 'eamplans', parameterName: 'eamplan' },
]
}
const parameters: any[] = [
{ pathName: 'eamplanlines', parameterName: 'eamplanline' },
];
const _this: any = this;
const openPopupModal = (view: any, data: any) => {
let container: Subject<any> = this.$appmodal.openModal(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-line-edit-view',
height: 0,
width: 0,
title: this.$t('entities.eamplanline.views.editview.title'),
};
openPopupModal(view, data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMPlanLineGridView
*/
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.eamplan && true){
deResParameters = [
{ pathName: 'eamplans', parameterName: 'eamplan' },
]
}
const parameters: any[] = [
{ pathName: 'eamplanlines', parameterName: 'eamplanline' },
];
const _this: any = this;
const openPopupModal = (view: any, data: any) => {
let container: Subject<any> = this.$appmodal.openModal(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-line-edit-view',
height: 0,
width: 0,
title: this.$t('entities.eamplanline.views.editview.title'),
};
openPopupModal(view, data);
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMPlanLineGridViewBase
*/
public New(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
_this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMPlanLineGridViewBase
*/
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, { eamplanline: args[0].eamplanline })
}
_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 EAMPlanLineGridViewBase
*/
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, { eamplanline: args[0].eamplanline });
}
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 EAMPlanLineGridViewBase
*/
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 EAMPlanLineGridViewBase
*/
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 EAMPlanLineGridViewBase
*/
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 EAMPlanLineGridViewBase
*/
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="eamplanlinegridview" viewTitle="计划步骤表格视图" class='degridview eamplan-line-grid-view'>
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" placeholder="计划步骤名称" search @on-search="onSearch($event)"/>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click.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-line-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMPlanLineGridViewBase } from './eamplan-line-grid-view-base';
import view_grid from '@widgets/eamplan-line/main-grid/main-grid.vue';
import view_searchform from '@widgets/eamplan-line/default-searchform/default-searchform.vue';
/**
* 计划步骤表格视图视图
*
* @export
* @class EAMPlanLineGridView
* @extends {EAMPlanLineGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class EAMPlanLineGridView extends EAMPlanLineGridViewBase { }
</script>
import { Subject } from 'rxjs';
import { PickupGridViewBase } from '@/studio-core';
import EAMPlanService from '@/service/eamplan/eamplan-service';
import EAMPlanAuthService from '@/authservice/eamplan/eamplan-auth-service';
import PickupGridViewEngine from '@engine/view/pickup-grid-view-engine';
import EAMPlanUIService from '@/uiservice/eamplan/eamplan-ui-service';
/**
* 维护计划选择表格视图视图基类
*
* @export
* @class EAMPlanPickupGridViewBase
* @extends {PickupGridViewBase}
*/
export class EAMPlanPickupGridViewBase extends PickupGridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMPlanPickupGridViewBase
*/
protected appDeName: string = 'eamplan';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMPlanPickupGridViewBase
*/
protected appDeKey: string = 'eamplanid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMPlanPickupGridViewBase
*/
protected appDeMajor: string = 'eamplanname';
/**
* 实体服务对象
*
* @type {EAMPlanService}
* @memberof EAMPlanPickupGridViewBase
*/
protected appEntityService: EAMPlanService = new EAMPlanService;
/**
* 实体权限服务对象
*
* @type EAMPlanUIService
* @memberof EAMPlanPickupGridViewBase
*/
public appUIService: EAMPlanUIService = new EAMPlanUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMPlanPickupGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMPlanPickupGridViewBase
*/
protected model: any = {
srfCaption: 'entities.eamplan.views.pickupgridview.caption',
srfTitle: 'entities.eamplan.views.pickupgridview.title',
srfSubTitle: 'entities.eamplan.views.pickupgridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMPlanPickupGridViewBase
*/
protected containerModel: any = {
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'b3cc4865b65edc16f8ad37d87bda4bae';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMPlanPickupGridViewBase
*/
public engine: PickupGridViewEngine = new PickupGridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMPlanPickupGridViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
grid: this.$refs.grid,
searchform: this.$refs.searchform,
keyPSDEField: 'eamplan',
majorPSDEField: 'eamplanname',
isLoadDefault: true,
});
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanPickupGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanPickupGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanPickupGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanPickupGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanPickupGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanPickupGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanPickupGridViewBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 是否展开搜索表单
*
* @protected
* @type {boolean}
* @memberof EAMPlanPickupGridViewBase
*/
protected isExpandSearchForm: boolean = true;
}
\ No newline at end of file
<studio-view-style2 viewName="eamplanpickupgridview" viewTitle="维护计划选择表格视图" class='depickupgridview eamplan-pickup-grid-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<template slot="searchForm">
<view_searchform
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
@search="searchform_search($event)"
@load="searchform_load($event)"
@closeview="closeView($event)">
</view_searchform>
</template>
<view_grid
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:isSingleSelect="isGridSingleSelect"
:selectedData="selectedData"
:showBusyIndicator="true"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</studio-view-style2>
\ No newline at end of file
<template src="./eamplan-pickup-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMPlanPickupGridViewBase } from './eamplan-pickup-grid-view-base';
import view_grid from '@widgets/eamplan/main-grid/main-grid.vue';
import view_searchform from '@widgets/eamplan/default-searchform/default-searchform.vue';
/**
* 维护计划选择表格视图视图
*
* @export
* @class EAMPlanPickupGridView
* @extends {EAMPlanPickupGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class EAMPlanPickupGridView extends EAMPlanPickupGridViewBase { }
</script>
import { Subject } from 'rxjs';
import { PickupViewBase } from '@/studio-core';
import EAMPlanService from '@/service/eamplan/eamplan-service';
import EAMPlanAuthService from '@/authservice/eamplan/eamplan-auth-service';
import PickupViewEngine from '@engine/view/pickup-view-engine';
import EAMPlanUIService from '@/uiservice/eamplan/eamplan-ui-service';
/**
* 维护计划数据选择视图视图基类
*
* @export
* @class EAMPlanPickupViewBase
* @extends {PickupViewBase}
*/
export class EAMPlanPickupViewBase extends PickupViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMPlanPickupViewBase
*/
protected appDeName: string = 'eamplan';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMPlanPickupViewBase
*/
protected appDeKey: string = 'eamplanid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMPlanPickupViewBase
*/
protected appDeMajor: string = 'eamplanname';
/**
* 实体服务对象
*
* @type {EAMPlanService}
* @memberof EAMPlanPickupViewBase
*/
protected appEntityService: EAMPlanService = new EAMPlanService;
/**
* 实体权限服务对象
*
* @type EAMPlanUIService
* @memberof EAMPlanPickupViewBase
*/
public appUIService: EAMPlanUIService = new EAMPlanUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMPlanPickupViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMPlanPickupViewBase
*/
protected model: any = {
srfCaption: 'entities.eamplan.views.pickupview.caption',
srfTitle: 'entities.eamplan.views.pickupview.title',
srfSubTitle: 'entities.eamplan.views.pickupview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMPlanPickupViewBase
*/
protected containerModel: any = {
view_pickupviewpanel: { name: 'pickupviewpanel', type: 'PICKUPVIEWPANEL' },
view_okbtn: { name: 'okbtn', type: 'button', text: '确定', disabled: true },
view_cancelbtn: { name: 'cancelbtn', type: 'button', text: '取消', disabled: false },
view_leftbtn: { name: 'leftbtn', type: 'button', text: '左移', disabled: true },
view_rightbtn: { name: 'rightbtn', type: 'button', text: '右移', disabled: true },
view_allleftbtn: { name: 'allleftbtn', type: 'button', text: '全部左移', disabled: true },
view_allrightbtn: { name: 'allrightbtn', type: 'button', text: '全部右移', disabled: true },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'f38b93e7294aee1966d727940e0852f4';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMPlanPickupViewBase
*/
public engine: PickupViewEngine = new PickupViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMPlanPickupViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
pickupviewpanel: this.$refs.pickupviewpanel,
keyPSDEField: 'eamplan',
majorPSDEField: 'eamplanname',
isLoadDefault: true,
});
}
/**
* pickupviewpanel 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanPickupViewBase
*/
public pickupviewpanel_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'selectionchange', $event);
}
/**
* pickupviewpanel 部件 activated 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanPickupViewBase
*/
public pickupviewpanel_activated($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'activated', $event);
}
/**
* pickupviewpanel 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMPlanPickupViewBase
*/
public pickupviewpanel_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'load', $event);
}
}
\ No newline at end of file
<studio-view-style2 viewName="eamplanpickupview" viewTitle="维护计划数据选择视图" class='depickupview eamplan-pickup-view'>
<div class="content-container pickup-view">
<view_pickupviewpanel
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
:isSingleSelect="isSingleSelect"
:selectedData="selectedData"
:isShowButton="isShowButton"
name="pickupviewpanel"
ref='pickupviewpanel'
@selectionchange="pickupviewpanel_selectionchange($event)"
@activated="pickupviewpanel_activated($event)"
@load="pickupviewpanel_load($event)"
@closeview="closeView($event)">
</view_pickupviewpanel>
</div>
<template slot="footer">
<div v-if="isShowButton" :style="{ textAlign: 'right' }">
<i-button type="primary" :disabled="this.viewSelections.length > 0 ? false : true" @click="onClickOk.apply(_self, arguments)">{{this.containerModel.view_okbtn.text}}</i-button>
&nbsp;&nbsp;
<i-button @click="onClickCancel.apply(_self, arguments)">{{this.containerModel.view_cancelbtn.text}}</i-button>
</div>
</template>
</studio-view-style2>
\ No newline at end of file
<template src="./eamplan-pickup-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMPlanPickupViewBase } from './eamplan-pickup-view-base';
import view_pickupviewpanel from '@widgets/eamplan/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel.vue';
/**
* 维护计划数据选择视图视图
*
* @export
* @class EAMPlanPickupView
* @extends {EAMPlanPickupViewBase}
*/
@Component({
components: {
view_pickupviewpanel,
}
})
@VueLifeCycleProcessing()
export default class EAMPlanPickupView extends EAMPlanPickupViewBase { }
</script>
import { Subject } from 'rxjs';
import { PickupGridViewBase } from '@/studio-core';
import EAMMonitorPointService from '@/service/eammonitor-point/eammonitor-point-service';
import EAMMonitorPointAuthService from '@/authservice/eammonitor-point/eammonitor-point-auth-service';
import PickupGridViewEngine from '@engine/view/pickup-grid-view-engine';
import EAMMonitorPointUIService from '@/uiservice/eammonitor-point/eammonitor-point-ui-service';
/**
* 测点选择表格视图视图基类
*
* @export
* @class EAMMonitorPointPickupGridViewBase
* @extends {PickupGridViewBase}
*/
export class EAMMonitorPointPickupGridViewBase extends PickupGridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMMonitorPointPickupGridViewBase
*/
protected appDeName: string = 'eammonitorpoint';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMMonitorPointPickupGridViewBase
*/
protected appDeKey: string = 'eammonitorpointid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMMonitorPointPickupGridViewBase
*/
protected appDeMajor: string = 'eammonitorpointname';
/**
* 实体服务对象
*
* @type {EAMMonitorPointService}
* @memberof EAMMonitorPointPickupGridViewBase
*/
protected appEntityService: EAMMonitorPointService = new EAMMonitorPointService;
/**
* 实体权限服务对象
*
* @type EAMMonitorPointUIService
* @memberof EAMMonitorPointPickupGridViewBase
*/
public appUIService: EAMMonitorPointUIService = new EAMMonitorPointUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMMonitorPointPickupGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMMonitorPointPickupGridViewBase
*/
protected model: any = {
srfCaption: 'entities.eammonitorpoint.views.pickupgridview.caption',
srfTitle: 'entities.eammonitorpoint.views.pickupgridview.title',
srfSubTitle: 'entities.eammonitorpoint.views.pickupgridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMMonitorPointPickupGridViewBase
*/
protected containerModel: any = {
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '91dd54198b1e7777908d564a86bc548d';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMMonitorPointPickupGridViewBase
*/
public engine: PickupGridViewEngine = new PickupGridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMMonitorPointPickupGridViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
grid: this.$refs.grid,
searchform: this.$refs.searchform,
keyPSDEField: 'eammonitorpoint',
majorPSDEField: 'eammonitorpointname',
isLoadDefault: true,
});
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMMonitorPointPickupGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMMonitorPointPickupGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMMonitorPointPickupGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMMonitorPointPickupGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMMonitorPointPickupGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMMonitorPointPickupGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMMonitorPointPickupGridViewBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 是否展开搜索表单
*
* @protected
* @type {boolean}
* @memberof EAMMonitorPointPickupGridViewBase
*/
protected isExpandSearchForm: boolean = true;
}
\ No newline at end of file
<studio-view-style2 viewName="eammonitorpointpickupgridview" viewTitle="测点选择表格视图" class='depickupgridview eammonitor-point-pickup-grid-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<template slot="searchForm">
<view_searchform
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
@search="searchform_search($event)"
@load="searchform_load($event)"
@closeview="closeView($event)">
</view_searchform>
</template>
<view_grid
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:isSingleSelect="isGridSingleSelect"
:selectedData="selectedData"
:showBusyIndicator="true"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</studio-view-style2>
\ No newline at end of file
<template src="./eammonitor-point-pickup-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMMonitorPointPickupGridViewBase } from './eammonitor-point-pickup-grid-view-base';
import view_grid from '@widgets/eammonitor-point/main-grid/main-grid.vue';
import view_searchform from '@widgets/eammonitor-point/default-searchform/default-searchform.vue';
/**
* 测点选择表格视图视图
*
* @export
* @class EAMMonitorPointPickupGridView
* @extends {EAMMonitorPointPickupGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class EAMMonitorPointPickupGridView extends EAMMonitorPointPickupGridViewBase { }
</script>
import { Subject } from 'rxjs';
import { PickupViewBase } from '@/studio-core';
import EAMMonitorPointService from '@/service/eammonitor-point/eammonitor-point-service';
import EAMMonitorPointAuthService from '@/authservice/eammonitor-point/eammonitor-point-auth-service';
import PickupViewEngine from '@engine/view/pickup-view-engine';
import EAMMonitorPointUIService from '@/uiservice/eammonitor-point/eammonitor-point-ui-service';
/**
* 测点数据选择视图视图基类
*
* @export
* @class EAMMonitorPointPickupViewBase
* @extends {PickupViewBase}
*/
export class EAMMonitorPointPickupViewBase extends PickupViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMMonitorPointPickupViewBase
*/
protected appDeName: string = 'eammonitorpoint';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMMonitorPointPickupViewBase
*/
protected appDeKey: string = 'eammonitorpointid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMMonitorPointPickupViewBase
*/
protected appDeMajor: string = 'eammonitorpointname';
/**
* 实体服务对象
*
* @type {EAMMonitorPointService}
* @memberof EAMMonitorPointPickupViewBase
*/
protected appEntityService: EAMMonitorPointService = new EAMMonitorPointService;
/**
* 实体权限服务对象
*
* @type EAMMonitorPointUIService
* @memberof EAMMonitorPointPickupViewBase
*/
public appUIService: EAMMonitorPointUIService = new EAMMonitorPointUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMMonitorPointPickupViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMMonitorPointPickupViewBase
*/
protected model: any = {
srfCaption: 'entities.eammonitorpoint.views.pickupview.caption',
srfTitle: 'entities.eammonitorpoint.views.pickupview.title',
srfSubTitle: 'entities.eammonitorpoint.views.pickupview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMMonitorPointPickupViewBase
*/
protected containerModel: any = {
view_pickupviewpanel: { name: 'pickupviewpanel', type: 'PICKUPVIEWPANEL' },
view_okbtn: { name: 'okbtn', type: 'button', text: '确定', disabled: true },
view_cancelbtn: { name: 'cancelbtn', type: 'button', text: '取消', disabled: false },
view_leftbtn: { name: 'leftbtn', type: 'button', text: '左移', disabled: true },
view_rightbtn: { name: 'rightbtn', type: 'button', text: '右移', disabled: true },
view_allleftbtn: { name: 'allleftbtn', type: 'button', text: '全部左移', disabled: true },
view_allrightbtn: { name: 'allrightbtn', type: 'button', text: '全部右移', disabled: true },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '3b351d19dc35d9e1f2bc5e4baf98e9b8';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMMonitorPointPickupViewBase
*/
public engine: PickupViewEngine = new PickupViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMMonitorPointPickupViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
pickupviewpanel: this.$refs.pickupviewpanel,
keyPSDEField: 'eammonitorpoint',
majorPSDEField: 'eammonitorpointname',
isLoadDefault: true,
});
}
/**
* pickupviewpanel 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMMonitorPointPickupViewBase
*/
public pickupviewpanel_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'selectionchange', $event);
}
/**
* pickupviewpanel 部件 activated 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMMonitorPointPickupViewBase
*/
public pickupviewpanel_activated($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'activated', $event);
}
/**
* pickupviewpanel 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMMonitorPointPickupViewBase
*/
public pickupviewpanel_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'load', $event);
}
}
\ No newline at end of file
<studio-view-style2 viewName="eammonitorpointpickupview" viewTitle="测点数据选择视图" class='depickupview eammonitor-point-pickup-view'>
<div class="content-container pickup-view">
<view_pickupviewpanel
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
:isSingleSelect="isSingleSelect"
:selectedData="selectedData"
:isShowButton="isShowButton"
name="pickupviewpanel"
ref='pickupviewpanel'
@selectionchange="pickupviewpanel_selectionchange($event)"
@activated="pickupviewpanel_activated($event)"
@load="pickupviewpanel_load($event)"
@closeview="closeView($event)">
</view_pickupviewpanel>
</div>
<template slot="footer">
<div v-if="isShowButton" :style="{ textAlign: 'right' }">
<i-button type="primary" :disabled="this.viewSelections.length > 0 ? false : true" @click="onClickOk.apply(_self, arguments)">{{this.containerModel.view_okbtn.text}}</i-button>
&nbsp;&nbsp;
<i-button @click="onClickCancel.apply(_self, arguments)">{{this.containerModel.view_cancelbtn.text}}</i-button>
</div>
</template>
</studio-view-style2>
\ No newline at end of file
<template src="./eammonitor-point-pickup-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMMonitorPointPickupViewBase } from './eammonitor-point-pickup-view-base';
import view_pickupviewpanel from '@widgets/eammonitor-point/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel.vue';
/**
* 测点数据选择视图视图
*
* @export
* @class EAMMonitorPointPickupView
* @extends {EAMMonitorPointPickupViewBase}
*/
@Component({
components: {
view_pickupviewpanel,
}
})
@VueLifeCycleProcessing()
export default class EAMMonitorPointPickupView extends EAMMonitorPointPickupViewBase { }
</script>
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
/**
* 测点服务对象基类
*
* @export
* @class EAMMonitorPointServiceBase
* @extends {EntityServie}
*/
export default class EAMMonitorPointServiceBase extends EntityService {
/**
* Creates an instance of EAMMonitorPointServiceBase.
*
* @param {*} [opts={}]
* @memberof EAMMonitorPointServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础数据
*
* @memberof EAMMonitorPointServiceBase
*/
public initBasicData(){
this.APPLYDEKEY ='eammonitorpoint';
this.APPDEKEY = 'eammonitorpointid';
this.APPDENAME = 'eammonitorpoints';
this.APPDETEXT = 'eammonitorpointname';
this.APPNAME = 'assetmanagement';
this.SYSTEMNAME = 'ibizassetmanagement';
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMMonitorPointServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/eammonitorpoints/${context.eammonitorpoint}/select`,isloading);
return res;
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMMonitorPointServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/eammonitorpoints`,data,isloading);
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMMonitorPointServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eammonitorpoints/${context.eammonitorpoint}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMMonitorPointServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/eammonitorpoints/${context.eammonitorpoint}`,isloading);
return res;
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMMonitorPointServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eammonitorpoints/${context.eammonitorpoint}`,isloading);
return res;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMMonitorPointServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eammonitorpoints/getdraft`,isloading);
res.data.eammonitorpoint = data.eammonitorpoint;
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMMonitorPointServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/eammonitorpoints/${context.eammonitorpoint}/checkkey`,data,isloading);
return res;
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMMonitorPointServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eammonitorpoints/${context.eammonitorpoint}/save`,data,isloading);
return res;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMMonitorPointServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eammonitorpoints/fetchdefault`,tempData,isloading);
return res;
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import EAMMonitorPointServiceBase from './eammonitor-point-service-base';
/**
* 测点服务对象
*
* @export
* @class EAMMonitorPointService
* @extends {EAMMonitorPointServiceBase}
*/
export default class EAMMonitorPointService extends EAMMonitorPointServiceBase {
/**
* Creates an instance of EAMMonitorPointService.
*
* @param {*} [opts={}]
* @memberof EAMMonitorPointService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -48,6 +48,11 @@ export default class EAMPlanLineServiceBase extends EntityService {
* @memberof EAMPlanLineServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamplan && context.eamplanline){
let res:any = Http.getInstance().get(`/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}/select`,isloading);
return res;
}
let res:any = Http.getInstance().get(`/eamplanlines/${context.eamplanline}/select`,isloading);
return res;
......@@ -63,6 +68,20 @@ export default class EAMPlanLineServiceBase extends EntityService {
* @memberof EAMPlanLineServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(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(`/eamplans/${context.eamplan}/eamplanlines`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
......@@ -87,6 +106,13 @@ export default class EAMPlanLineServiceBase extends EntityService {
* @memberof EAMPlanLineServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamplan && context.eamplanline){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/eamplanlines/${context.eamplanline}`,data,isloading);
......@@ -104,6 +130,10 @@ export default class EAMPlanLineServiceBase extends EntityService {
* @memberof EAMPlanLineServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamplan && context.eamplanline){
let res:any = Http.getInstance().delete(`/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}`,isloading);
return res;
}
let res:any = Http.getInstance().delete(`/eamplanlines/${context.eamplanline}`,isloading);
return res;
}
......@@ -118,6 +148,11 @@ export default class EAMPlanLineServiceBase extends EntityService {
* @memberof EAMPlanLineServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamplan && context.eamplanline){
let res:any = await Http.getInstance().get(`/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}`,isloading);
return res;
}
let res:any = await Http.getInstance().get(`/eamplanlines/${context.eamplanline}`,isloading);
return res;
......@@ -133,6 +168,12 @@ export default class EAMPlanLineServiceBase extends EntityService {
* @memberof EAMPlanLineServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamplan && true){
let res:any = await Http.getInstance().get(`/eamplans/${context.eamplan}/eamplanlines/getdraft`,isloading);
res.data.eamplanline = data.eamplanline;
return res;
}
let res:any = await Http.getInstance().get(`/eamplanlines/getdraft`,isloading);
res.data.eamplanline = data.eamplanline;
......@@ -149,6 +190,13 @@ export default class EAMPlanLineServiceBase extends EntityService {
* @memberof EAMPlanLineServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamplan && context.eamplanline){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}/checkkey`,data,isloading);
return res;
}
let res:any = Http.getInstance().post(`/eamplanlines/${context.eamplanline}/checkkey`,data,isloading);
return res;
}
......@@ -163,6 +211,13 @@ export default class EAMPlanLineServiceBase extends EntityService {
* @memberof EAMPlanLineServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.eamplan && context.eamplanline){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamplans/${context.eamplan}/eamplanlines/${context.eamplanline}/save`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/eamplanlines/${context.eamplanline}/save`,data,isloading);
......@@ -180,6 +235,11 @@ export default class EAMPlanLineServiceBase extends EntityService {
* @memberof EAMPlanLineServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
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);
return res;
}
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/eamplanlines/fetchdefault`,tempData,isloading);
return res;
......
......@@ -73,6 +73,7 @@ export default class EAMPlanServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/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;
......
......@@ -43,6 +43,7 @@ export class EntityServiceRegister {
this.allEntityService.set('eamlocationtype', () => import('@/service/eamlocation-type/eamlocation-type-service'));
this.allEntityService.set('eamworkorder', () => import('@/service/eamwork-order/eamwork-order-service'));
this.allEntityService.set('eamlocation', () => import('@/service/eamlocation/eamlocation-service'));
this.allEntityService.set('eammonitorpoint', () => import('@/service/eammonitor-point/eammonitor-point-service'));
this.allEntityService.set('eamassetstate', () => import('@/service/eamasset-state/eamasset-state-service'));
this.allEntityService.set('eamlocationstate', () => import('@/service/eamlocation-state/eamlocation-state-service'));
this.allEntityService.set('eamassettype', () => import('@/service/eamasset-type/eamasset-type-service'));
......
......@@ -189,6 +189,16 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '3b351d19dc35d9e1f2bc5e4baf98e9b8',
viewmodule: 'WorkOrder',
viewname: 'EAMMonitorPointPickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'91dd54198b1e7777908d564a86bc548d',
],
},
{
viewtag: '3bac4846ece1082b8c3799d9a1fc7dde',
viewmodule: 'Asset',
......@@ -289,6 +299,7 @@ export const viewstate: any = {
viewaction: '',
viewdatachange: false,
refviews: [
'7ecd11c1c5ee3add05dd5915be17cdb7',
'f51a84e7a2149cb66cb5db8370abb115',
'6e69be88d76554770ec8448800b6881d',
],
......@@ -428,6 +439,16 @@ export const viewstate: any = {
'81139a9fb0fce24a58db188651ba7155',
],
},
{
viewtag: '7ecd11c1c5ee3add05dd5915be17cdb7',
viewmodule: 'Plan',
viewname: 'EAMPlanLineGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'82e6b21fb5252ac02580ad072b168cef',
],
},
{
viewtag: '81139a9fb0fce24a58db188651ba7155',
viewmodule: 'Asset',
......@@ -438,6 +459,19 @@ export const viewstate: any = {
'ebf6c093d1d6c599cc011b2c54ab6bc2',
],
},
{
viewtag: '82e6b21fb5252ac02580ad072b168cef',
viewmodule: 'Plan',
viewname: 'EAMPlanLineEditView',
viewaction: '',
viewdatachange: false,
refviews: [
'906130a9861c2b0cff3173c9e171c1d1',
'3b351d19dc35d9e1f2bc5e4baf98e9b8',
'2b28313d0f3925fa44b8683eb5ea54d6',
'f38b93e7294aee1966d727940e0852f4',
],
},
{
viewtag: '8a03ef5ec2679c20c8072339004dcaaf',
viewmodule: 'WorkOrder',
......@@ -459,6 +493,15 @@ export const viewstate: any = {
'fc2bbe178f6e4ee12ebeb45875b7f87c',
],
},
{
viewtag: '91dd54198b1e7777908d564a86bc548d',
viewmodule: 'WorkOrder',
viewname: 'EAMMonitorPointPickupGridView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '96e58ee9a57415beb8209aae53b14926',
viewmodule: 'Apply',
......@@ -600,6 +643,15 @@ export const viewstate: any = {
'1769804cd7ab51624ac3c88c2090363b',
],
},
{
viewtag: 'b3cc4865b65edc16f8ad37d87bda4bae',
viewmodule: 'Plan',
viewname: 'EAMPlanPickupGridView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: 'b3d85711a6feb998249451ba167895d2',
viewmodule: 'Location',
......@@ -897,6 +949,16 @@ export const viewstate: any = {
'2b28313d0f3925fa44b8683eb5ea54d6',
],
},
{
viewtag: 'f38b93e7294aee1966d727940e0852f4',
viewmodule: 'Plan',
viewname: 'EAMPlanPickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'b3cc4865b65edc16f8ad37d87bda4bae',
],
},
{
viewtag: 'f51a84e7a2149cb66cb5db8370abb115',
viewmodule: 'WorkOrder',
......
import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import EAMMonitorPointService from '@/service/eammonitor-point/eammonitor-point-service';
import EAMMonitorPointAuthService from '@/authservice/eammonitor-point/eammonitor-point-auth-service';
/**
* 测点UI服务对象基类
*
* @export
* @class EAMMonitorPointUIServiceBase
*/
export default class EAMMonitorPointUIServiceBase extends UIService {
/**
* 是否支持工作流
*
* @memberof EAMMonitorPointUIServiceBase
*/
public isEnableWorkflow:boolean = false;
/**
* 当前UI服务对应的数据服务对象
*
* @memberof EAMMonitorPointUIServiceBase
*/
public dataService:EAMMonitorPointService = new EAMMonitorPointService();
/**
* 所有关联视图
*
* @memberof EAMMonitorPointUIServiceBase
*/
public allViewMap: Map<string, Object> = new Map();
/**
* 状态值
*
* @memberof EAMMonitorPointUIServiceBase
*/
public stateValue: number = 0;
/**
* 状态属性
*
* @memberof EAMMonitorPointUIServiceBase
*/
public stateField: string = "";
/**
* 主状态属性集合
*
* @memberof EAMMonitorPointUIServiceBase
*/
public mainStateFields:Array<any> = [];
/**
* 主状态集合Map
*
* @memberof EAMMonitorPointUIServiceBase
*/
public allDeMainStateMap:Map<string,string> = new Map();
/**
* 主状态操作标识Map
*
* @memberof EAMMonitorPointUIServiceBase
*/
public allDeMainStateOPPrivsMap:Map<string,any> = new Map();
/**
* Creates an instance of EAMMonitorPointUIServiceBase.
*
* @param {*} [opts={}]
* @memberof EAMMonitorPointUIServiceBase
*/
constructor(opts: any = {}) {
super(opts);
this.authService = new EAMMonitorPointAuthService(opts);
this.initViewMap();
this.initDeMainStateMap();
this.initDeMainStateOPPrivsMap();
}
/**
* 初始化视图Map
*
* @memberof EAMMonitorPointUIServiceBase
*/
public initViewMap(){
this.allViewMap.set('PICKUPVIEW:',{viewname:'pickupview',srfappde:'eammonitorpoints'});
this.allViewMap.set(':',{viewname:'pickupgridview',srfappde:'eammonitorpoints'});
}
/**
* 初始化主状态集合
*
* @memberof EAMMonitorPointUIServiceBase
*/
public initDeMainStateMap(){
}
/**
* 初始化主状态操作标识
*
* @memberof EAMMonitorPointUIServiceBase
*/
public initDeMainStateOPPrivsMap(){
}
/**
* 获取指定数据的重定向页面
*
* @param srfkey 数据主键
* @param isEnableWorkflow 重定向视图是否需要处理流程中的数据
* @memberof EAMMonitorPointUIServiceBase
*/
public async getRDAppView(srfkey:string,isEnableWorkflow:boolean){
this.isEnableWorkflow = isEnableWorkflow;
// 进行数据查询
let result:any = await this.dataService.Get({eammonitorpoint:srfkey});
const curData:any = result.data;
//判断当前数据模式,默认为true,todo
const iRealDEModel:boolean = true;
let bDataInWF:boolean = false;
let bWFMode:any = false;
// 计算数据模式
if (this.isEnableWorkflow) {
bDataInWF = await this.dataService.testDataInWF({stateValue:this.stateValue,stateField:this.stateField},curData);
if (bDataInWF) {
bDataInWF = true;
bWFMode = await this.dataService.testUserExistWorklist(null,curData);
}
}
let strPDTViewParam:string = await this.getDESDDEViewPDTParam(curData, bDataInWF, bWFMode);
//若不是当前数据模式,处理strPDTViewParam,todo
//查找视图
//返回视图
return this.allViewMap.get(strPDTViewParam);
}
/**
* 获取实际的数据类型
*
* @memberof EAMMonitorPointUIServiceBase
*/
public getRealDEType(entity:any){
}
/**
* 获取实体单数据实体视图预定义参数
*
* @param curData 当前数据
* @param bDataInWF 是否有数据在工作流中
* @param bWFMode 是否工作流模式
* @memberof EAMMonitorPointUIServiceBase
*/
public async getDESDDEViewPDTParam(curData:any, bDataInWF:boolean, bWFMode:boolean){
let strPDTParam:string = '';
if (bDataInWF) {
// 判断数据是否在流程中
}
//多表单,todo
const isEnableMultiForm:boolean = false;
const multiFormDEField:string|null =null;
if (isEnableMultiForm && multiFormDEField) {
const objFormValue:string = curData[multiFormDEField];
if(!Environment.isAppMode){
return 'MOBEDITVIEW'+objFormValue;
}
return 'EDITVIEW'+objFormValue;
}
if(!Environment.isAppMode){
if(this.getDEMainStateTag(curData)){
return `MOBEDITVIEW:MSTAG:${ this.getDEMainStateTag(curData)}`;
}
return 'MOBEDITVIEW:';
}
if(this.getDEMainStateTag(curData)){
return `EDITVIEW:MSTAG:${ this.getDEMainStateTag(curData)}`;
}
return 'EDITVIEW:';
}
/**
* 获取数据对象的主状态标识
*
* @param curData 当前数据
* @memberof EAMMonitorPointUIServiceBase
*/
public getDEMainStateTag(curData:any){
if(this.mainStateFields.length === 0) return null;
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.warn(`当前数据对象不包含属性${singleMainField},可能会发生错误`);
}
})
for (let i = 0; i <= 1; i++) {
let strTag:string = (curData[this.mainStateFields[0]])?(i == 0) ? curData[this.mainStateFields[0]] : "":"";
if (this.mainStateFields.length >= 2) {
for (let j = 0; j <= 1; j++) {
let strTag2:string = (curData[this.mainStateFields[1]])?`${strTag}__${(j == 0) ? curData[this.mainStateFields[1]] : ""}`:strTag;
if (this.mainStateFields.length >= 3) {
for (let k = 0; k <= 1; k++) {
let strTag3:string = (curData[this.mainStateFields[2]])?`${strTag2}__${(k == 0) ? curData[this.mainStateFields[2]] : ""}`:strTag2;
// 判断是否存在
return this.allDeMainStateMap.get(strTag3);
}
}else{
return this.allDeMainStateMap.get(strTag2);
}
}
}else{
return this.allDeMainStateMap.get(strTag);
}
}
return null;
}
/**
* 获取数据对象当前操作标识
*
* @param data 当前数据
* @memberof EAMMonitorPointUIServiceBase
*/
public getDEMainStateOPPrivs(data:any){
if(this.getDEMainStateTag(data)){
return this.allDeMainStateOPPrivsMap.get((this.getDEMainStateTag(data) as string));
}else{
return null;
}
}
/**
* 获取数据对象所有的操作标识
*
* @param data 当前数据
* @memberof EAMMonitorPointUIServiceBase
*/
public getAllOPPrivs(data:any){
return this.authService.getOPPrivs(this.getDEMainStateOPPrivs(data));
}
}
\ No newline at end of file
import EAMMonitorPointUIServiceBase from './eammonitor-point-ui-service-base';
/**
* 测点UI服务对象
*
* @export
* @class EAMMonitorPointUIService
*/
export default class EAMMonitorPointUIService extends EAMMonitorPointUIServiceBase {
/**
* Creates an instance of EAMMonitorPointUIService.
*
* @param {*} [opts={}]
* @memberof EAMMonitorPointUIService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -89,6 +89,8 @@ export default class EAMPlanLineUIServiceBase extends UIService {
* @memberof EAMPlanLineUIServiceBase
*/
public initViewMap(){
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'eamplanlines'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'eamplanlines'});
}
/**
......
......@@ -92,8 +92,10 @@ export default class EAMPlanUIServiceBase extends UIService {
this.allViewMap.set(':',{viewname:'infoview',srfappde:'eamplans'});
this.allViewMap.set(':',{viewname:'summaryview',srfappde:'eamplans'});
this.allViewMap.set(':',{viewname:'info_mainview',srfappde:'eamplans'});
this.allViewMap.set(':',{viewname:'pickupgridview',srfappde:'eamplans'});
this.allViewMap.set(':',{viewname:'quickcreateview',srfappde:'eamplans'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'eamplans'});
this.allViewMap.set('PICKUPVIEW:',{viewname:'pickupview',srfappde:'eamplans'});
}
/**
......
......@@ -43,6 +43,7 @@ export class UIServiceRegister {
this.allUIService.set('eamlocationtype', () => import('@/uiservice/eamlocation-type/eamlocation-type-ui-service'));
this.allUIService.set('eamworkorder', () => import('@/uiservice/eamwork-order/eamwork-order-ui-service'));
this.allUIService.set('eamlocation', () => import('@/uiservice/eamlocation/eamlocation-ui-service'));
this.allUIService.set('eammonitorpoint', () => import('@/uiservice/eammonitor-point/eammonitor-point-ui-service'));
this.allUIService.set('eamassetstate', () => import('@/uiservice/eamasset-state/eamasset-state-ui-service'));
this.allUIService.set('eamlocationstate', () => import('@/uiservice/eamlocation-state/eamlocation-state-ui-service'));
this.allUIService.set('eamassettype', () => import('@/uiservice/eamasset-type/eamasset-type-ui-service'));
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, SearchFormControlBase } from '@/studio-core';
import EAMMonitorPointService from '@/service/eammonitor-point/eammonitor-point-service';
import DefaultService from './default-searchform-service';
import EAMMonitorPointUIService from '@/uiservice/eammonitor-point/eammonitor-point-ui-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
/**
* searchform部件基类
*
* @export
* @class SearchFormControlBase
* @extends {DefaultSearchFormBase}
*/
export class DefaultSearchFormBase extends SearchFormControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected controlType: string = 'SEARCHFORM';
/**
* 建构部件服务对象
*
* @type {DefaultService}
* @memberof DefaultSearchFormBase
*/
public service: DefaultService = new DefaultService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMMonitorPointService}
* @memberof DefaultSearchFormBase
*/
public appEntityService: EAMMonitorPointService = new EAMMonitorPointService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected appDeName: string = 'eammonitorpoint';
/**
* 应用实体中文名称
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected appDeLogicName: string = '测点';
/**
* 表单数据对象
*
* @type {*}
* @memberof DefaultSearchFormBase
*/
public data: any = {
};
/**
* 详情模型集合
*
* @type {*}
* @memberof DefaultSearchFormBase
*/
public detailsModel: any = {
formpage1: new FormPageModel({ caption: '常规条件', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this })
,
};
}
\ No newline at end of file
/**
* Default 部件模型
*
* @export
* @class DefaultModel
*/
export default class DefaultModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof DefaultModel
*/
public getDataItems(): any[] {
return [
{
name: 'srfwfmemo',
prop: 'srfwfmemo',
dataType: 'TEXT',
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import EAMMonitorPointService from '@/service/eammonitor-point/eammonitor-point-service';
import DefaultModel from './default-searchform-model';
/**
* Default 部件服务对象
*
* @export
* @class DefaultService
*/
export default class DefaultService extends ControlService {
/**
* 测点服务对象
*
* @type {EAMMonitorPointService}
* @memberof DefaultService
*/
public appEntityService: EAMMonitorPointService = new EAMMonitorPointService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof DefaultService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of DefaultService.
*
* @param {*} [opts={}]
* @memberof DefaultService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new DefaultModel();
}
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof DefaultService
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof DefaultService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
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]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public frontLogic(action:string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response,true);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof DefaultService
*/
public handleRequestData(action: string,context:any, data: any = {},isMerge:boolean = false){
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return data;
}
let formItemItems: any[] = mode.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
formItemItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.prop){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof DefaultService
*/
public getItemNameByDeName(name:string) :string{
let itemName = name;
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return name;
}
let formItemItems: any[] = mode.getDataItems();
formItemItems.forEach((item:any)=>{
if(item.prop === name){
itemName = item.name;
}
});
return itemName.trim();
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-search-form' ref='searchform' style="">
<input style="display:none;"/>
<div class="search-button">
<i-button size="small" type="primary" ghost @click="onSearch.apply(_self, arguments)">{{$t('app.searchButton.search')}}</i-button>
<i-button size="small" type="default" ghost @click="onReset.apply(_self, arguments)">{{this.$t('app.searchButton.reset')}}</i-button>
</div>
<div class="form-content">
</div>
</i-form>
\ No newline at end of file
<template src="./default-searchform.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { DefaultSearchFormBase } from './default-searchform-base';
/**
* searchform部件
*
* @export
* @class DefaultSearchForm
* @extends {DefaultSearchFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class DefaultSearchForm extends DefaultSearchFormBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, GridControlBase } from '@/studio-core';
import EAMMonitorPointService from '@/service/eammonitor-point/eammonitor-point-service';
import MainService from './main-grid-service';
import EAMMonitorPointUIService from '@/uiservice/eammonitor-point/eammonitor-point-ui-service';
import { FormItemModel } from '@/model/form-detail';
/**
* grid部件基类
*
* @export
* @class GridControlBase
* @extends {MainGridBase}
*/
export class MainGridBase extends GridControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof MainGridBase
*/
protected controlType: string = 'GRID';
/**
* 建构部件服务对象
*
* @type {MainService}
* @memberof MainGridBase
*/
public service: MainService = new MainService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMMonitorPointService}
* @memberof MainGridBase
*/
public appEntityService: EAMMonitorPointService = new EAMMonitorPointService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainGridBase
*/
protected appDeName: string = 'eammonitorpoint';
/**
* 应用实体中文名称
*
* @protected
* @type {string}
* @memberof MainGridBase
*/
protected appDeLogicName: string = '测点';
/**
* 界面UI服务对象
*
* @type {EAMMonitorPointUIService}
* @memberof MainBase
*/
public appUIService:EAMMonitorPointUIService = new EAMMonitorPointUIService(this.$store);
/**
* 界面行为模型
*
* @type {*}
* @memberof MainBase
*/
public ActionModel: any = {
};
/**
* 本地缓存标识
*
* @protected
* @type {string}
* @memberof MainBase
*/
protected localStorageTag: string = 'eammonitorpoint_main_grid';
/**
* 所有列成员
*
* @type {any[]}
* @memberof MainGridBase
*/
public allColumns: any[] = [
]
/**
* 获取表格行模型
*
* @type {*}
* @memberof MainGridBase
*/
public getGridRowModel(){
return {
srfkey: new FormItemModel(),
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof MainGridBase
*/
public rules: any = {
srfkey: [
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '测点标识 值不能为空', trigger: 'change' },
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '测点标识 值不能为空', trigger: 'blur' },
],
}
/**
* 获取对应列class
*
* @type {*}
* @memberof MainBase
*/
public hasRowEdit: any = {
};
/**
* 获取对应列class
*
* @param {*} $args row 行数据,column 列数据,rowIndex 行索引,列索引
* @returns {void}
* @memberof MainBase
*/
public getCellClassName(args: {row: any, column: any, rowIndex: number, columnIndex: number}): any {
return ( this.hasRowEdit[args.column.property] && this.actualIsOpenEdit ) ? "edit-cell" : "info-cell";
}
}
\ No newline at end of file
/**
* Main 部件模型
*
* @export
* @class MainModel
*/
export default class MainModel {
/**
* 是否是实体数据导出
*
* @returns {any[]}
* @memberof MainGridMode
*/
public isDEExport: boolean = false;
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof MainGridMode
*/
public getDataItems(): any[] {
if(this.isDEExport){
return [
]
}else{
return [
{
name: 'srfmajortext',
prop: 'eammonitorpointname',
dataType: 'TEXT',
},
{
name: 'srfdataaccaction',
prop: 'eammonitorpointid',
dataType: 'GUID',
},
{
name: 'srfkey',
prop: 'eammonitorpointid',
dataType: 'GUID',
isEditable:true
},
{
name: 'eammonitorpoint',
prop: 'eammonitorpointid',
},
{
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 EAMMonitorPointService from '@/service/eammonitor-point/eammonitor-point-service';
import MainModel from './main-grid-model';
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export default class MainService extends ControlService {
/**
* 测点服务对象
*
* @type {EAMMonitorPointService}
* @memberof MainService
*/
public appEntityService: EAMMonitorPointService = new EAMMonitorPointService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof MainService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of MainService.
*
* @param {*} [opts={}]
* @memberof MainService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new MainModel();
}
/**
* 处理数据
*
* @public
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof MainService
*/
public doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof MainService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
return Promise.reject([])
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestDataWithUpdate(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestDataWithUpdate(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data,isloading);
}else{
result =_appEntityService.Update(Context,Data,isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 获取数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public get(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:0});
}
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public search(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.FetchDefault(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public loadDraft(action: string, context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:'0'});
//仿真主键数据
response.data.eammonitorpointid = Util.createUUID();
}
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public frontLogic(action:string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据(修改或增加数据)
*
* @param action 行为
* @param data 数据
* @memberof MainService
*/
public handleRequestDataWithUpdate(action: string,context:any ={},data: any = {},isMerge:boolean = false){
let model: any = this.getMode();
if (!model && model.getDataItems instanceof Function) {
return data;
}
let dataItems: any[] = model.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
dataItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop && item.name ){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.isEditable && item.prop && item.name && (data[item.name] || Object.is(data[item.name],0)) ){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
}
\ No newline at end of file
<div :class="{ 'grid': true, 'show-paging-bar': isEnablePagingBar, 'hidden-paging-bar': !isEnablePagingBar }">
<i-form>
<el-table v-if="isDisplay === true"
:default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"
@sort-change="onSortChange($event)"
:border="isDragendCol"
:highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName.bind(_self)"
:cell-class-name="getCellClassName.bind(_self)"
size="mini"
stripe
@row-click="rowClick($event)"
@select-all="selectAll($event)"
@select="select($event)"
@row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
无数据
<span class="quick-toolbar">
</span>
</template>
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template>
<template v-if="adaptiveState">
<el-table-column></el-table-column>
</template>
</el-table>
<row class='grid-pagination' v-show="items.length > 0">
<page class='pull-right' @on-change="pageOnChange($event)"
@on-page-size-change="onPageSizeChange($event)"
:transfer="true" :total="totalRecord"
show-sizer :current="curPage" :page-size="limit"
:page-size-opts="[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]" show-elevator show-total>
<span>
<span class="page-column">
<poptip transfer placement="top-start">
<i-button icon="md-menu">{{$t('app.gridpage.choicecolumns')}}</i-button>
<div slot="content">
<template v-for="col in allColumns">
<div :key="col.name"><el-checkbox v-model="col.show" @change="onColChange()">{{$t(col.langtag)}}</el-checkbox></div>
</template>
</div>
</poptip>
</span>
<span v-if="selections.length > 0" class="batch-toolbar">
</span>
<span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
<span>
{{$t('app.gridpage.show')}}&nbsp;
<span>
<template v-if="items.length === 1">
1
</template>
<template v-else>
<span>{{(curPage - 1) * limit + 1}}&nbsp;-&nbsp;{{totalRecord > curPage * limit ? curPage * limit : totalRecord}}</span>
</template>
</span>&nbsp;
{{$t('app.gridpage.records')}},{{$t('app.gridpage.totle')}}&nbsp;{{totalRecord}}&nbsp;{{$t('app.gridpage.records')}}
</span>
</span>
</page>
</row>
</i-form>
</div>
\ No newline at end of file
<template src="./main-grid.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { MainGridBase } from './main-grid-base';
/**
* grid部件
*
* @export
* @class MainGrid
* @extends {MainGridBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class MainGrid extends MainGridBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import EAMMonitorPointService from '@/service/eammonitor-point/eammonitor-point-service';
import PickupViewpickupviewpanelService from './pickup-viewpickupviewpanel-pickupviewpanel-service';
import EAMMonitorPointUIService from '@/uiservice/eammonitor-point/eammonitor-point-ui-service';
import PickupViewpickupviewpanelModel from './pickup-viewpickupviewpanel-pickupviewpanel-model';
/**
* pickupviewpanel部件基类
*
* @export
* @class MainControlBase
* @extends {PickupViewpickupviewpanelPickupviewpanelBase}
*/
export class PickupViewpickupviewpanelPickupviewpanelBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
protected controlType: string = 'PICKUPVIEWPANEL';
/**
* 建构部件服务对象
*
* @type {PickupViewpickupviewpanelService}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
public service: PickupViewpickupviewpanelService = new PickupViewpickupviewpanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMMonitorPointService}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
public appEntityService: EAMMonitorPointService = new EAMMonitorPointService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
protected appDeName: string = 'eammonitorpoint';
/**
* 应用实体中文名称
*
* @protected
* @type {string}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
protected appDeLogicName: string = '测点';
/**
* 选中数据字符串
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
@Prop() public selectedData?: string;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof PickupViewpickupviewpanel
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof PickupViewpickupviewpanel
*/
public getData(): any {
return {};
}
/**
* 视图名称
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public view: any = {
viewname: 'eammonitor-point-pickup-grid-view',
data: {},
}
/**
* 局部上下文
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public localViewParam: any = null;
/**
* 视图数据
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
@Prop({default: true}) public isShowButton!: boolean;
/**
* 是否单选
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
@Prop() public isSingleSelect?: boolean;
/**
* 初始化完成
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
public inited: boolean = false;
/**
* 视图数据变化
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public onViewDatasChange($event: any): void {
if($event.length>0){
$event.forEach((item:any,index:any) => {
let srfmajortext = item['eammonitorpointname'];
if(srfmajortext){
Object.assign($event[index],{srfmajortext: srfmajortext});
}
});
}
this.$emit('selectionchange', $event);
}
/**
* 视图数据被激活
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public viewDatasActivated($event: any): void {
this.$emit('activated', $event);
}
/**
* 视图加载完成
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public onViewLoad($event: any): void {
this.$emit('load', $event);
}
/**
* vue 生命周期
*
* @memberof PickupViewpickupviewpanel
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof PickupViewpickupviewpanel
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('load', action)) {
this.viewdata = JSON.stringify(this.context);
this.viewparam = JSON.stringify(Object.assign(data, this.viewparams));
this.inited = true;
}
});
}
}
/**
* 初始化导航参数
*
* @memberof PickupViewpickupviewpanel
*/
public initNavParam(){
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata = JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* vue 生命周期
*
* @memberof PickupViewpickupviewpanel
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof PickupViewpickupviewpanel
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* PickupViewpickupviewpanel 部件模型
*
* @export
* @class PickupViewpickupviewpanelModel
*/
export default class PickupViewpickupviewpanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof PickupViewpickupviewpanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'eammonitorpoint',
prop: 'eammonitorpointid',
},
{
name: 'eammonitorpointname',
},
{
name: 'updateman',
},
{
name: 'updatedate',
},
{
name: 'createdate',
},
{
name: 'createman',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* PickupViewpickupviewpanel 部件服务对象
*
* @export
* @class PickupViewpickupviewpanelService
*/
export default class PickupViewpickupviewpanelService extends ControlService {
}
\ No newline at end of file
<div class='pickupviewpanel'>
<component
v-if="inited && view.viewname && !Object.is(view.viewname, '')"
:is="view.viewname"
class="viewcontainer3"
:viewdata="viewdata"
:viewparam="viewparam"
:viewDefaultUsage="false"
:isSingleSelect="isSingleSelect"
:selectedData="selectedData"
:isShowButton="isShowButton"
@viewdataschange="onViewDatasChange.apply(_self, arguments)"
@viewdatasactivated="viewDatasActivated.apply(_self, arguments)"
@viewload="onViewLoad.apply(_self, arguments)">
</component>
</div>
\ No newline at end of file
<template src="./pickup-viewpickupviewpanel-pickupviewpanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { PickupViewpickupviewpanelPickupviewpanelBase } from './pickup-viewpickupviewpanel-pickupviewpanel-base';
/**
* pickupviewpanel部件
*
* @export
* @class PickupViewpickupviewpanelPickupviewpanel
* @extends {PickupViewpickupviewpanelPickupviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class PickupViewpickupviewpanelPickupviewpanel extends PickupViewpickupviewpanelPickupviewpanelBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, SearchFormControlBase } from '@/studio-core';
import EAMPlanLineService from '@/service/eamplan-line/eamplan-line-service';
import DefaultService from './default-searchform-service';
import EAMPlanLineUIService from '@/uiservice/eamplan-line/eamplan-line-ui-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
/**
* searchform部件基类
*
* @export
* @class SearchFormControlBase
* @extends {DefaultSearchFormBase}
*/
export class DefaultSearchFormBase extends SearchFormControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected controlType: string = 'SEARCHFORM';
/**
* 建构部件服务对象
*
* @type {DefaultService}
* @memberof DefaultSearchFormBase
*/
public service: DefaultService = new DefaultService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMPlanLineService}
* @memberof DefaultSearchFormBase
*/
public appEntityService: EAMPlanLineService = new EAMPlanLineService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected appDeName: string = 'eamplanline';
/**
* 应用实体中文名称
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected appDeLogicName: string = '计划步骤';
/**
* 表单数据对象
*
* @type {*}
* @memberof DefaultSearchFormBase
*/
public data: any = {
};
/**
* 详情模型集合
*
* @type {*}
* @memberof DefaultSearchFormBase
*/
public detailsModel: any = {
formpage1: new FormPageModel({ caption: '常规条件', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this })
,
};
}
\ No newline at end of file
/**
* Default 部件模型
*
* @export
* @class DefaultModel
*/
export default class DefaultModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof DefaultModel
*/
public getDataItems(): any[] {
return [
{
name: 'srfwfmemo',
prop: 'srfwfmemo',
dataType: 'TEXT',
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import EAMPlanLineService from '@/service/eamplan-line/eamplan-line-service';
import DefaultModel from './default-searchform-model';
/**
* Default 部件服务对象
*
* @export
* @class DefaultService
*/
export default class DefaultService extends ControlService {
/**
* 计划步骤服务对象
*
* @type {EAMPlanLineService}
* @memberof DefaultService
*/
public appEntityService: EAMPlanLineService = new EAMPlanLineService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof DefaultService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of DefaultService.
*
* @param {*} [opts={}]
* @memberof DefaultService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new DefaultModel();
}
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof DefaultService
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof DefaultService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
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]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public frontLogic(action:string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response,true);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof DefaultService
*/
public handleRequestData(action: string,context:any, data: any = {},isMerge:boolean = false){
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return data;
}
let formItemItems: any[] = mode.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
formItemItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.prop){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof DefaultService
*/
public getItemNameByDeName(name:string) :string{
let itemName = name;
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return name;
}
let formItemItems: any[] = mode.getDataItems();
formItemItems.forEach((item:any)=>{
if(item.prop === name){
itemName = item.name;
}
});
return itemName.trim();
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-search-form' ref='searchform' style="">
<input style="display:none;"/>
<div class="search-button">
<i-button size="small" type="primary" ghost @click="onSearch.apply(_self, arguments)">{{$t('app.searchButton.search')}}</i-button>
<i-button size="small" type="default" ghost @click="onReset.apply(_self, arguments)">{{this.$t('app.searchButton.reset')}}</i-button>
</div>
<div class="form-content">
</div>
</i-form>
\ No newline at end of file
<template src="./default-searchform.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { DefaultSearchFormBase } from './default-searchform-base';
/**
* searchform部件
*
* @export
* @class DefaultSearchForm
* @extends {DefaultSearchFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class DefaultSearchForm extends DefaultSearchFormBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, EditFormControlBase } from '@/studio-core';
import EAMPlanLineService from '@/service/eamplan-line/eamplan-line-service';
import MainService from './main-form-service';
import EAMPlanLineUIService from '@/uiservice/eamplan-line/eamplan-line-ui-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
/**
* form部件基类
*
* @export
* @class EditFormControlBase
* @extends {MainEditFormBase}
*/
export class MainEditFormBase extends EditFormControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof MainEditFormBase
*/
protected controlType: string = 'FORM';
/**
* 建构部件服务对象
*
* @type {MainService}
* @memberof MainEditFormBase
*/
public service: MainService = new MainService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMPlanLineService}
* @memberof MainEditFormBase
*/
public appEntityService: EAMPlanLineService = new EAMPlanLineService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainEditFormBase
*/
protected appDeName: string = 'eamplanline';
/**
* 应用实体中文名称
*
* @protected
* @type {string}
* @memberof MainEditFormBase
*/
protected appDeLogicName: string = '计划步骤';
/**
* 界面UI服务对象
*
* @type {EAMPlanLineUIService}
* @memberof MainEditFormBase
*/
public appUIService:EAMPlanLineUIService = new EAMPlanLineUIService(this.$store);
/**
* 表单数据对象
*
* @type {*}
* @memberof MainEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
sortnumber: null,
eamplanlinename: null,
eamplanname: null,
content: null,
assetname: null,
eamlocationname: null,
eammonitorpointname: null,
eamlocationid: null,
eammonitorpointid: null,
eamplanid: null,
eamplanlineid: null,
assetid: null,
eamplanline:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof MainEditFormBase
*/
public rules: any = {
sortnumber: [
{ required: true, type: 'number', message: '序号 值不能为空', trigger: 'change' },
{ required: true, type: 'number', message: '序号 值不能为空', trigger: 'blur' },
],
eamplanlinename: [
{ required: true, type: 'string', message: '计划步骤名称 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '计划步骤名称 值不能为空', trigger: 'blur' },
],
eamplanname: [
{ required: true, type: 'string', message: '维护计划 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '维护计划 值不能为空', trigger: 'blur' },
],
assetname: [
{ required: true, type: 'string', message: '资产 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '资产 值不能为空', trigger: 'blur' },
],
}
/**
* 属性值规则
*
* @type {*}
* @memberof MainBase
*/
public deRules:any = {
};
/**
* 详情模型集合
*
* @type {*}
* @memberof MainEditFormBase
*/
public detailsModel: any = {
group1: new FormGroupPanelModel({ caption: '基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: true, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.eamplanline.main_form', extractMode: 'ITEM', details: [] } }),
grouppanel1: new FormGroupPanelModel({ caption: '资产信息', detailType: 'GROUPPANEL', name: 'grouppanel1', visible: true, isShowCaption: true, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.eamplanline.main_form', extractMode: 'ITEM', details: [] } }),
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this, showMoreMode: 0 }),
srfupdatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfkey: new FormItemModel({ caption: '计划步骤标识', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfmajortext: new FormItemModel({ caption: '计划步骤名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srftempmode: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfuf: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfuf', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfdeid: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfdeid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
sortnumber: new FormItemModel({ caption: '序号', detailType: 'FORMITEM', name: 'sortnumber', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamplanlinename: new FormItemModel({ caption: '计划步骤名称', detailType: 'FORMITEM', name: 'eamplanlinename', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamplanname: new FormItemModel({ caption: '维护计划', detailType: 'FORMITEM', name: 'eamplanname', 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 }),
eamlocationname: new FormItemModel({ caption: '功能位置', detailType: 'FORMITEM', name: 'eamlocationname', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eammonitorpointname: new FormItemModel({ caption: '测点', detailType: 'FORMITEM', name: 'eammonitorpointname', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamlocationid: new FormItemModel({ caption: '功能位置标识', detailType: 'FORMITEM', name: 'eamlocationid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eammonitorpointid: new FormItemModel({ caption: '测点标识', detailType: 'FORMITEM', name: 'eammonitorpointid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamplanid: new FormItemModel({ caption: '维护计划标识', detailType: 'FORMITEM', name: 'eamplanid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamplanlineid: new FormItemModel({ caption: '计划步骤标识', detailType: 'FORMITEM', name: 'eamplanlineid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
assetid: new FormItemModel({ caption: '资产标识', detailType: 'FORMITEM', name: 'assetid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
};
}
\ No newline at end of file
/**
* Main 部件模型
*
* @export
* @class MainModel
*/
export default class MainModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof MainModel
*/
public getDataItems(): any[] {
return [
{
name: 'srfwfmemo',
prop: 'srfwfmemo',
dataType: 'TEXT',
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
{
name: 'srfupdatedate',
prop: 'updatedate',
dataType: 'DATETIME',
},
{
name: 'srforikey',
},
{
name: 'srfkey',
prop: 'eamplanlineid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'eamplanlinename',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'sortnumber',
prop: 'sortnumber',
dataType: 'INT',
},
{
name: 'eamplanlinename',
prop: 'eamplanlinename',
dataType: 'TEXT',
},
{
name: 'eamplanname',
prop: 'eamplanname',
dataType: 'PICKUPTEXT',
},
{
name: 'content',
prop: 'content',
dataType: 'LONGTEXT_1000',
},
{
name: 'assetname',
prop: 'assetname',
dataType: 'PICKUPTEXT',
},
{
name: 'eamlocationname',
prop: 'eamlocationname',
dataType: 'PICKUPTEXT',
},
{
name: 'eammonitorpointname',
prop: 'eammonitorpointname',
dataType: 'PICKUPTEXT',
},
{
name: 'eamlocationid',
prop: 'eamlocationid',
dataType: 'PICKUP',
},
{
name: 'eammonitorpointid',
prop: 'eammonitorpointid',
dataType: 'PICKUP',
},
{
name: 'eamplanid',
prop: 'eamplanid',
dataType: 'PICKUP',
},
{
name: 'eamplanlineid',
prop: 'eamplanlineid',
dataType: 'GUID',
},
{
name: 'assetid',
prop: 'assetid',
dataType: 'PICKUP',
},
{
name: 'eamplanline',
prop: 'eamplanlineid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import EAMPlanLineService from '@/service/eamplan-line/eamplan-line-service';
import MainModel from './main-form-model';
import EAMPlanService from '@/service/eamplan/eamplan-service';
import EAMAssetService from '@/service/eamasset/eamasset-service';
import EAMLocationService from '@/service/eamlocation/eamlocation-service';
import EAMMonitorPointService from '@/service/eammonitor-point/eammonitor-point-service';
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export default class MainService extends ControlService {
/**
* 计划步骤服务对象
*
* @type {EAMPlanLineService}
* @memberof MainService
*/
public appEntityService: EAMPlanLineService = new EAMPlanLineService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof MainService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of MainService.
*
* @param {*} [opts={}]
* @memberof MainService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new MainModel();
}
/**
* 维护计划服务对象
*
* @type {EAMPlanService}
* @memberof MainService
*/
public eamplanService: EAMPlanService = new EAMPlanService();
/**
* 资产服务对象
*
* @type {EAMAssetService}
* @memberof MainService
*/
public eamassetService: EAMAssetService = new EAMAssetService();
/**
* 功能位置服务对象
*
* @type {EAMLocationService}
* @memberof MainService
*/
public eamlocationService: EAMLocationService = new EAMLocationService();
/**
* 测点服务对象
*
* @type {EAMMonitorPointService}
* @memberof MainService
*/
public eammonitorpointService: EAMMonitorPointService = new EAMMonitorPointService();
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof MainService
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof MainService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
if (Object.is(serviceName, 'EAMPlanService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.eamplanService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'eamplanid', 'eamplan');
}
if (Object.is(serviceName, 'EAMAssetService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.eamassetService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'assetid', 'eamasset');
}
if (Object.is(serviceName, 'EAMLocationService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.eamlocationService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'eamlocationid', 'eamlocation');
}
if (Object.is(serviceName, 'EAMMonitorPointService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.eammonitorpointService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'eammonitorpointid', 'eammonitorpoint');
}
return Promise.reject([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.eamplanlineid = PrimaryKey;
Data.eamplanline = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.eamplanlineid = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public frontLogic(action:string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response,true);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof MainService
*/
public handleRequestData(action: string,context:any, data: any = {},isMerge:boolean = false){
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return data;
}
let formItemItems: any[] = mode.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
formItemItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.prop){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof MainService
*/
public getItemNameByDeName(name:string) :string{
let itemName = name;
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return name;
}
let formItemItems: any[] = mode.getDataItems();
formItemItems.forEach((item:any)=>{
if(item.prop === name){
itemName = item.name;
}
});
return itemName.trim();
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-form' ref='form' id='eamplanline_main' style="">
<input style="display:none;" />
<row >
<i-col class="form-layout-container" v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :model="detailsModel.group1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.eamplanline.main_form.details.group1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.group1" :data="data" :context="context" :viewparams="viewparams"/>
<row>
<i-col class="form-layout-container" v-show="detailsModel.sortnumber.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='sortnumber' :itemRules="this.rules.sortnumber" class='' :caption="$t('entities.eamplanline.main_form.details.sortnumber')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.sortnumber.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.sortnumber"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.sortnumber.disabled"
type='number'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.eamplanlinename.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamplanlinename' :itemRules="this.rules.eamplanlinename" class='' :caption="$t('entities.eamplanline.main_form.details.eamplanlinename')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamplanlinename.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.eamplanlinename"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.eamplanlinename.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.eamplanname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamplanname' :itemRules="this.rules.eamplanname" class='' :caption="$t('entities.eamplanline.main_form.details.eamplanname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamplanname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.eamplanname.disabled"
name='eamplanname'
deMajorField='eamplanname'
deKeyField='eamplan'
:service="service"
: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:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
<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.eamplanline.main_form.details.content')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.content.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.content" :textareaId="this.$util.createUUID()" :disabled="detailsModel.content.disabled" type='textarea' textareaStyle="height:200px;" ></input-box>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.grouppanel1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :model="detailsModel.grouppanel1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.eamplanline.main_form.details.grouppanel1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.grouppanel1" :data="data" :context="context" :viewparams="viewparams"/>
<row>
<i-col class="form-layout-container" v-show="detailsModel.assetname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='assetname' :itemRules="this.rules.assetname" class='' :caption="$t('entities.eamplanline.main_form.details.assetname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.assetname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.assetname.disabled"
name='assetname'
deMajorField='assetname'
deKeyField='eamasset'
:service="service"
:acParams="{ serviceName: 'EAMAssetService', interfaceName: 'FetchDefault'}"
valueitem='assetid'
:value="data.assetname"
:pickupView="{ viewname: 'eamasset-pickup-view', title: $t('entities.eamasset.views.pickupview.title'), deResParameters: [{ pathName: 'eamlocations', parameterName: 'eamlocation' }, ], parameters: [{ pathName: 'eamassets', parameterName: 'eamasset' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.eamlocationname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamlocationname' :itemRules="this.rules.eamlocationname" class='' :caption="$t('entities.eamplanline.main_form.details.eamlocationname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamlocationname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.eamlocationname.disabled"
name='eamlocationname'
deMajorField='eamlocationname'
deKeyField='eamlocation'
:service="service"
:acParams="{ serviceName: 'EAMLocationService', interfaceName: 'FetchDefault'}"
valueitem='eamlocationid'
:value="data.eamlocationname"
:pickupView="{ viewname: 'eamlocation-pickup-view', title: $t('entities.eamlocation.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'eamlocations', parameterName: 'eamlocation' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.eammonitorpointname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eammonitorpointname' :itemRules="this.rules.eammonitorpointname" class='' :caption="$t('entities.eamplanline.main_form.details.eammonitorpointname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eammonitorpointname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.eammonitorpointname.disabled"
name='eammonitorpointname'
deMajorField='eammonitorpointname'
deKeyField='eammonitorpoint'
:service="service"
:acParams="{ serviceName: 'EAMMonitorPointService', interfaceName: 'FetchDefault'}"
valueitem='eammonitorpointid'
:value="data.eammonitorpointname"
:pickupView="{ viewname: 'eammonitor-point-pickup-view', title: $t('entities.eammonitorpoint.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'eammonitorpoints', parameterName: 'eammonitorpoint' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</row>
</i-form>
\ No newline at end of file
<template src="./main-form.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { MainEditFormBase } from './main-form-base';
/**
* form部件
*
* @export
* @class MainEditForm
* @extends {MainEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class MainEditForm extends MainEditFormBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, GridControlBase } from '@/studio-core';
import EAMPlanLineService from '@/service/eamplan-line/eamplan-line-service';
import MainService from './main-grid-service';
import EAMPlanLineUIService from '@/uiservice/eamplan-line/eamplan-line-ui-service';
import { FormItemModel } from '@/model/form-detail';
/**
* grid部件基类
*
* @export
* @class GridControlBase
* @extends {MainGridBase}
*/
export class MainGridBase extends GridControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof MainGridBase
*/
protected controlType: string = 'GRID';
/**
* 建构部件服务对象
*
* @type {MainService}
* @memberof MainGridBase
*/
public service: MainService = new MainService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMPlanLineService}
* @memberof MainGridBase
*/
public appEntityService: EAMPlanLineService = new EAMPlanLineService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainGridBase
*/
protected appDeName: string = 'eamplanline';
/**
* 应用实体中文名称
*
* @protected
* @type {string}
* @memberof MainGridBase
*/
protected appDeLogicName: string = '计划步骤';
/**
* 界面UI服务对象
*
* @type {EAMPlanLineUIService}
* @memberof MainBase
*/
public appUIService:EAMPlanLineUIService = new EAMPlanLineUIService(this.$store);
/**
* 界面行为模型
*
* @type {*}
* @memberof MainBase
*/
public ActionModel: any = {
};
/**
* 本地缓存标识
*
* @protected
* @type {string}
* @memberof MainBase
*/
protected localStorageTag: string = 'eamplanline_main_grid';
/**
* 所有列成员
*
* @type {any[]}
* @memberof MainGridBase
*/
public allColumns: any[] = [
{
name: 'sortnumber',
label: '序号',
langtag: 'entities.eamplanline.main_grid.columns.sortnumber',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamplanlinename',
label: '计划步骤名称',
langtag: 'entities.eamplanline.main_grid.columns.eamplanlinename',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamplanname',
label: '维护计划',
langtag: 'entities.eamplanline.main_grid.columns.eamplanname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'assetname',
label: '资产',
langtag: 'entities.eamplanline.main_grid.columns.assetname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamlocationname',
label: '功能位置',
langtag: 'entities.eamplanline.main_grid.columns.eamlocationname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'content',
label: '内容',
langtag: 'entities.eamplanline.main_grid.columns.content',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
]
/**
* 获取表格行模型
*
* @type {*}
* @memberof MainGridBase
*/
public getGridRowModel(){
return {
srfkey: new FormItemModel(),
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof MainGridBase
*/
public rules: any = {
srfkey: [
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '计划步骤标识 值不能为空', trigger: 'change' },
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '计划步骤标识 值不能为空', trigger: 'blur' },
],
}
/**
* 获取对应列class
*
* @type {*}
* @memberof MainBase
*/
public hasRowEdit: any = {
'sortnumber':false,
'eamplanlinename':false,
'eamplanname':false,
'assetname':false,
'eamlocationname':false,
'content':false,
};
/**
* 获取对应列class
*
* @param {*} $args row 行数据,column 列数据,rowIndex 行索引,列索引
* @returns {void}
* @memberof MainBase
*/
public getCellClassName(args: {row: any, column: any, rowIndex: number, columnIndex: number}): any {
return ( this.hasRowEdit[args.column.property] && this.actualIsOpenEdit ) ? "edit-cell" : "info-cell";
}
/**
* 导出数据格式化
*
* @param {*} filterVal
* @param {*} jsonData
* @param {any[]} [codelistColumns=[]]
* @returns {Promise<any>}
* @memberof MainGridBase
*/
public async formatExcelData(filterVal: any, jsonData: any, codelistColumns?: any[]): Promise<any> {
return super.formatExcelData(filterVal, jsonData, [
]);
}
}
\ No newline at end of file
/**
* Main 部件模型
*
* @export
* @class MainModel
*/
export default class MainModel {
/**
* 是否是实体数据导出
*
* @returns {any[]}
* @memberof MainGridMode
*/
public isDEExport: boolean = false;
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof MainGridMode
*/
public getDataItems(): any[] {
if(this.isDEExport){
return [
]
}else{
return [
{
name: 'sortnumber',
prop: 'sortnumber',
dataType: 'INT',
},
{
name: 'srfmajortext',
prop: 'eamplanlinename',
dataType: 'TEXT',
},
{
name: 'srfkey',
prop: 'eamplanlineid',
dataType: 'GUID',
isEditable:true
},
{
name: 'srfdataaccaction',
prop: 'eamplanlineid',
dataType: 'GUID',
},
{
name: 'eamlocationname',
prop: 'eamlocationname',
dataType: 'PICKUPTEXT',
},
{
name: 'content',
prop: 'content',
dataType: 'LONGTEXT_1000',
},
{
name: 'eamlocationid',
prop: 'eamlocationid',
dataType: 'PICKUP',
},
{
name: 'eammonitorpointid',
prop: 'eammonitorpointid',
dataType: 'PICKUP',
},
{
name: 'eamplanid',
prop: 'eamplanid',
dataType: 'PICKUP',
},
{
name: 'eamplanlinename',
prop: 'eamplanlinename',
dataType: 'TEXT',
},
{
name: 'eamplanname',
prop: 'eamplanname',
dataType: 'PICKUPTEXT',
},
{
name: 'assetid',
prop: 'assetid',
dataType: 'PICKUP',
},
{
name: 'assetname',
prop: 'assetname',
dataType: 'PICKUPTEXT',
},
{
name: 'eamplanline',
prop: 'eamplanlineid',
},
{
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 EAMPlanLineService from '@/service/eamplan-line/eamplan-line-service';
import MainModel from './main-grid-model';
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export default class MainService extends ControlService {
/**
* 计划步骤服务对象
*
* @type {EAMPlanLineService}
* @memberof MainService
*/
public appEntityService: EAMPlanLineService = new EAMPlanLineService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof MainService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of MainService.
*
* @param {*} [opts={}]
* @memberof MainService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new MainModel();
}
/**
* 处理数据
*
* @public
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof MainService
*/
public doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof MainService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
return Promise.reject([])
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestDataWithUpdate(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestDataWithUpdate(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data,isloading);
}else{
result =_appEntityService.Update(Context,Data,isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 获取数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public get(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:0});
}
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public search(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.FetchDefault(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public loadDraft(action: string, context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:'0'});
//仿真主键数据
response.data.eamplanlineid = Util.createUUID();
}
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public frontLogic(action:string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据(修改或增加数据)
*
* @param action 行为
* @param data 数据
* @memberof MainService
*/
public handleRequestDataWithUpdate(action: string,context:any ={},data: any = {},isMerge:boolean = false){
let model: any = this.getMode();
if (!model && model.getDataItems instanceof Function) {
return data;
}
let dataItems: any[] = model.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
dataItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop && item.name ){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.isEditable && item.prop && item.name && (data[item.name] || Object.is(data[item.name],0)) ){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
}
\ No newline at end of file
<div :class="{ 'grid': true, 'show-paging-bar': isEnablePagingBar, 'hidden-paging-bar': !isEnablePagingBar }">
<i-form>
<el-table v-if="isDisplay === true"
:default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"
@sort-change="onSortChange($event)"
:border="isDragendCol"
:highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName.bind(_self)"
:cell-class-name="getCellClassName.bind(_self)"
size="mini"
stripe
@row-click="rowClick($event)"
@select-all="selectAll($event)"
@select="select($event)"
@row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
无数据
<span class="quick-toolbar">
</span>
</template>
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template>
<template v-if="getColumnState('sortnumber')">
<el-table-column show-overflow-tooltip :prop="'sortnumber'" :label="$t('entities.eamplanline.main_grid.columns.sortnumber')" :width="160" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamplanline.main_grid.columns.sortnumber')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.sortnumber}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamplanlinename')">
<el-table-column show-overflow-tooltip :prop="'eamplanlinename'" :label="$t('entities.eamplanline.main_grid.columns.eamplanlinename')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamplanline.main_grid.columns.eamplanlinename')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamplanlinename}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamplanname')">
<el-table-column show-overflow-tooltip :prop="'eamplanname'" :label="$t('entities.eamplanline.main_grid.columns.eamplanname')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamplanline.main_grid.columns.eamplanname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamplanname}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('assetname')">
<el-table-column show-overflow-tooltip :prop="'assetname'" :label="$t('entities.eamplanline.main_grid.columns.assetname')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamplanline.main_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('eamlocationname')">
<el-table-column show-overflow-tooltip :prop="'eamlocationname'" :label="$t('entities.eamplanline.main_grid.columns.eamlocationname')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamplanline.main_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('content')">
<el-table-column show-overflow-tooltip :prop="'content'" :label="$t('entities.eamplanline.main_grid.columns.content')" :width="300" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamplanline.main_grid.columns.content')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.content}}</span>
</template>
</el-table-column>
</template>
<template v-if="adaptiveState">
<el-table-column></el-table-column>
</template>
</el-table>
<row class='grid-pagination' v-show="items.length > 0">
<page class='pull-right' @on-change="pageOnChange($event)"
@on-page-size-change="onPageSizeChange($event)"
:transfer="true" :total="totalRecord"
show-sizer :current="curPage" :page-size="limit"
:page-size-opts="[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]" show-elevator show-total>
<span>
<span class="page-column">
<poptip transfer placement="top-start">
<i-button icon="md-menu">{{$t('app.gridpage.choicecolumns')}}</i-button>
<div slot="content">
<template v-for="col in allColumns">
<div :key="col.name"><el-checkbox v-model="col.show" @change="onColChange()">{{$t(col.langtag)}}</el-checkbox></div>
</template>
</div>
</poptip>
</span>
<span v-if="selections.length > 0" class="batch-toolbar">
</span>
<span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
<span>
{{$t('app.gridpage.show')}}&nbsp;
<span>
<template v-if="items.length === 1">
1
</template>
<template v-else>
<span>{{(curPage - 1) * limit + 1}}&nbsp;-&nbsp;{{totalRecord > curPage * limit ? curPage * limit : totalRecord}}</span>
</template>
</span>&nbsp;
{{$t('app.gridpage.records')}},{{$t('app.gridpage.totle')}}&nbsp;{{totalRecord}}&nbsp;{{$t('app.gridpage.records')}}
</span>
</span>
</page>
</row>
</i-form>
</div>
\ No newline at end of file
<template src="./main-grid.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { MainGridBase } from './main-grid-base';
/**
* grid部件
*
* @export
* @class MainGrid
* @extends {MainGridBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class MainGrid extends MainGridBase { }
</script>
......@@ -60,6 +60,9 @@ export default class BOARD_001Model {
{
name: 'mdate',
},
{
name: 'content',
},
]
}
......
......@@ -66,6 +66,7 @@ export class InfoViewtabexppanelTabexppanelBase extends TabExpPanelControlBase {
*/
protected isInit: any = {
tabviewpanel: true ,
tabviewpanel3: false ,
tabviewpanel2: false ,
}
......
......@@ -60,6 +60,9 @@ export default class InfoViewtabexppanelModel {
{
name: 'mdate',
},
{
name: 'content',
},
]
}
......
......@@ -30,7 +30,37 @@
@closeview="closeView($event)">
</view_tabviewpanel>
</tab-pane>
<tab-pane :index="1" name='tabviewpanel2' tab='infoviewtabexppanel' class=''
<tab-pane :index="1" name='tabviewpanel3' tab='infoviewtabexppanel' class=''
:label="(h) =>{
return h('div', [
h('i',{
class:'fa fa-sort-amount-desc',
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="2" name='tabviewpanel2' tab='infoviewtabexppanel' class=''
:label="(h) =>{
return h('div', [
h('i',{
......
......@@ -4,6 +4,7 @@ import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InfoViewtabexppanelTabexppanelBase } from './info-viewtabexppanel-tabexppanel-base';
import view_tabviewpanel from '@widgets/eamplan/info-viewtabviewpanel-tabviewpanel/info-viewtabviewpanel-tabviewpanel.vue';
import view_tabviewpanel3 from '@widgets/eamplan/info-viewtabviewpanel3-tabviewpanel/info-viewtabviewpanel3-tabviewpanel.vue';
import view_tabviewpanel2 from '@widgets/eamplan/info-viewtabviewpanel2-tabviewpanel/info-viewtabviewpanel2-tabviewpanel.vue';
......@@ -17,6 +18,7 @@ import view_tabviewpanel2 from '@widgets/eamplan/info-viewtabviewpanel2-tabviewp
@Component({
components: {
view_tabviewpanel,
view_tabviewpanel3,
view_tabviewpanel2,
}
......
......@@ -60,6 +60,9 @@ export default class InfoViewtabviewpanelModel {
{
name: 'mdate',
},
{
name: 'content',
},
]
}
......
......@@ -60,6 +60,9 @@ export default class InfoViewtabviewpanel2Model {
{
name: 'mdate',
},
{
name: 'content',
},
]
}
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import EAMPlanService from '@/service/eamplan/eamplan-service';
import InfoViewtabviewpanel3Service from './info-viewtabviewpanel3-tabviewpanel-service';
import EAMPlanUIService from '@/uiservice/eamplan/eamplan-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 {EAMPlanService}
* @memberof InfoViewtabviewpanel3TabviewpanelBase
*/
public appEntityService: EAMPlanService = new EAMPlanService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof InfoViewtabviewpanel3TabviewpanelBase
*/
protected appDeName: string = 'eamplan';
/**
* 应用实体中文名称
*
* @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: 'updatedate',
},
{
name: 'eamplanname',
},
{
name: 'createdate',
},
{
name: 'createman',
},
{
name: 'updateman',
},
{
name: 'eamplan',
prop: 'eamplanid',
},
{
name: 'eamlocationid',
},
{
name: 'assetid',
},
{
name: 'assetname',
},
{
name: 'eamlocationname',
},
{
name: 'plannumber',
},
{
name: 'eammonitorpointid',
},
{
name: 'eammonitorpointname',
},
{
name: 'description',
},
{
name: 'mdate',
},
{
name: 'content',
},
]
}
}
\ 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'>
<eamplan-line-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-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>
......@@ -60,6 +60,9 @@ export default class PART_V_001Model {
{
name: 'mdate',
},
{
name: 'content',
},
]
}
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import EAMPlanService from '@/service/eamplan/eamplan-service';
import PickupViewpickupviewpanelService from './pickup-viewpickupviewpanel-pickupviewpanel-service';
import EAMPlanUIService from '@/uiservice/eamplan/eamplan-ui-service';
import PickupViewpickupviewpanelModel from './pickup-viewpickupviewpanel-pickupviewpanel-model';
/**
* pickupviewpanel部件基类
*
* @export
* @class MainControlBase
* @extends {PickupViewpickupviewpanelPickupviewpanelBase}
*/
export class PickupViewpickupviewpanelPickupviewpanelBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
protected controlType: string = 'PICKUPVIEWPANEL';
/**
* 建构部件服务对象
*
* @type {PickupViewpickupviewpanelService}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
public service: PickupViewpickupviewpanelService = new PickupViewpickupviewpanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMPlanService}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
public appEntityService: EAMPlanService = new EAMPlanService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
protected appDeName: string = 'eamplan';
/**
* 应用实体中文名称
*
* @protected
* @type {string}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
protected appDeLogicName: string = '维护计划';
/**
* 选中数据字符串
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
@Prop() public selectedData?: string;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof PickupViewpickupviewpanel
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof PickupViewpickupviewpanel
*/
public getData(): any {
return {};
}
/**
* 视图名称
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public view: any = {
viewname: 'eamplan-pickup-grid-view',
data: {},
}
/**
* 局部上下文
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public localViewParam: any = null;
/**
* 视图数据
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
@Prop({default: true}) public isShowButton!: boolean;
/**
* 是否单选
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
@Prop() public isSingleSelect?: boolean;
/**
* 初始化完成
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
public inited: boolean = false;
/**
* 视图数据变化
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public onViewDatasChange($event: any): void {
if($event.length>0){
$event.forEach((item:any,index:any) => {
let srfmajortext = item['eamplanname'];
if(srfmajortext){
Object.assign($event[index],{srfmajortext: srfmajortext});
}
});
}
this.$emit('selectionchange', $event);
}
/**
* 视图数据被激活
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public viewDatasActivated($event: any): void {
this.$emit('activated', $event);
}
/**
* 视图加载完成
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public onViewLoad($event: any): void {
this.$emit('load', $event);
}
/**
* vue 生命周期
*
* @memberof PickupViewpickupviewpanel
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof PickupViewpickupviewpanel
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('load', action)) {
this.viewdata = JSON.stringify(this.context);
this.viewparam = JSON.stringify(Object.assign(data, this.viewparams));
this.inited = true;
}
});
}
}
/**
* 初始化导航参数
*
* @memberof PickupViewpickupviewpanel
*/
public initNavParam(){
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata = JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* vue 生命周期
*
* @memberof PickupViewpickupviewpanel
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof PickupViewpickupviewpanel
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* PickupViewpickupviewpanel 部件模型
*
* @export
* @class PickupViewpickupviewpanelModel
*/
export default class PickupViewpickupviewpanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof PickupViewpickupviewpanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'updatedate',
},
{
name: 'eamplanname',
},
{
name: 'createdate',
},
{
name: 'createman',
},
{
name: 'updateman',
},
{
name: 'eamplan',
prop: 'eamplanid',
},
{
name: 'eamlocationid',
},
{
name: 'assetid',
},
{
name: 'assetname',
},
{
name: 'eamlocationname',
},
{
name: 'plannumber',
},
{
name: 'eammonitorpointid',
},
{
name: 'eammonitorpointname',
},
{
name: 'description',
},
{
name: 'mdate',
},
{
name: 'content',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* PickupViewpickupviewpanel 部件服务对象
*
* @export
* @class PickupViewpickupviewpanelService
*/
export default class PickupViewpickupviewpanelService extends ControlService {
}
\ No newline at end of file
<div class='pickupviewpanel'>
<component
v-if="inited && view.viewname && !Object.is(view.viewname, '')"
:is="view.viewname"
class="viewcontainer3"
:viewdata="viewdata"
:viewparam="viewparam"
:viewDefaultUsage="false"
:isSingleSelect="isSingleSelect"
:selectedData="selectedData"
:isShowButton="isShowButton"
@viewdataschange="onViewDatasChange.apply(_self, arguments)"
@viewdatasactivated="viewDatasActivated.apply(_self, arguments)"
@viewload="onViewLoad.apply(_self, arguments)">
</component>
</div>
\ No newline at end of file
<template src="./pickup-viewpickupviewpanel-pickupviewpanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { PickupViewpickupviewpanelPickupviewpanelBase } from './pickup-viewpickupviewpanel-pickupviewpanel-base';
/**
* pickupviewpanel部件
*
* @export
* @class PickupViewpickupviewpanelPickupviewpanel
* @extends {PickupViewpickupviewpanelPickupviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class PickupViewpickupviewpanelPickupviewpanel extends PickupViewpickupviewpanelPickupviewpanelBase { }
</script>
......@@ -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:
......
......@@ -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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册