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

lab_gzf 部署微服务应用

上级 6d4933d2
......@@ -69,6 +69,16 @@
"viewtag": "1769804cd7ab51624ac3c88c2090363b",
"memo": "系统自动添加"
},
"eamapplytypeeditview": {
"title": "维护申请类型编辑",
"caption": "维护申请类型",
"viewtype": "DEEDITVIEW",
"viewmodule": "Apply",
"viewname": "EAMApplyTypeEditView",
"viewfilename": "eamapply-type-edit-view",
"viewtag": "1d768bbdaf3091c5d7131992a8ec7412",
"memo": "系统自动添加"
},
"eamlocationtreechildgridview": {
"title": "功能位置信息",
"caption": "功能位置",
......@@ -489,6 +499,26 @@
"viewtag": "c8bf8b682adc459f7f285328199ba4b4",
"memo": "系统自动添加"
},
"eamserviceleveleditview": {
"title": "服务等级编辑",
"caption": "服务等级",
"viewtype": "DEEDITVIEW",
"viewmodule": "WorkOrder",
"viewname": "EAMServiceLevelEditView",
"viewfilename": "eamservice-level-edit-view",
"viewtag": "ca41431df21901bec3c62db4097e36d4",
"memo": "系统自动添加"
},
"eamapplytypegridview": {
"title": "维护申请类型信息",
"caption": "维护申请类型",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Apply",
"viewname": "EAMApplyTypeGridView",
"viewfilename": "eamapply-type-grid-view",
"viewtag": "ca66d81a69c0f084e3f7cf1e99ae9d28",
"memo": ""
},
"eamlocationsummaryview": {
"title": "功能位置数据看板视图",
"caption": "功能位置",
......@@ -609,6 +639,16 @@
"viewtag": "ecd1ec6299b5b24e2004fa15c4eef92d",
"memo": "系统自动添加"
},
"eamservicelevelgridview": {
"title": "服务等级信息",
"caption": "服务等级",
"viewtype": "DEGRIDVIEW",
"viewmodule": "WorkOrder",
"viewname": "EAMServiceLevelGridView",
"viewfilename": "eamservice-level-grid-view",
"viewtag": "edea4ef4e4810cea28340d5636e6e28d",
"memo": ""
},
"eamlocationgridview": {
"title": "功能位置信息",
"caption": "功能位置",
......
......@@ -48,6 +48,7 @@ export class AuthServiceRegister {
this.allAuthService.set('eamassetstatemodelline', () => import('@/authservice/eamasset-state-model-line/eamasset-state-model-line-auth-service'));
this.allAuthService.set('eamapplytype', () => import('@/authservice/eamapply-type/eamapply-type-auth-service'));
this.allAuthService.set('eamproduct', () => import('@/authservice/eamproduct/eamproduct-auth-service'));
this.allAuthService.set('eamservicelevel', () => import('@/authservice/eamservice-level/eamservice-level-auth-service'));
this.allAuthService.set('eamsparepartspro', () => import('@/authservice/eamspare-parts-pro/eamspare-parts-pro-auth-service'));
this.allAuthService.set('eamapplystatemodelline', () => import('@/authservice/eamapply-state-model-line/eamapply-state-model-line-auth-service'));
this.allAuthService.set('eamsparepartsgroup', () => import('@/authservice/eamspare-parts-group/eamspare-parts-group-auth-service'));
......
import AuthService from '../auth-service';
/**
* 服务等级权限服务对象基类
*
* @export
* @class EAMServiceLevelAuthServiceBase
* @extends {AuthService}
*/
export default class EAMServiceLevelAuthServiceBase extends AuthService {
/**
* Creates an instance of EAMServiceLevelAuthServiceBase.
*
* @param {*} [opts={}]
* @memberof EAMServiceLevelAuthServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 根据当前数据获取实体操作标识
*
* @param {*} mainSateOPPrivs 传入数据操作标识
* @returns {any}
* @memberof EAMServiceLevelAuthServiceBase
*/
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 EAMServiceLevelAuthServiceBase from './eamservice-level-auth-service-base';
/**
* 服务等级权限服务对象
*
* @export
* @class EAMServiceLevelAuthService
* @extends {EAMServiceLevelAuthServiceBase}
*/
export default class EAMServiceLevelAuthService extends EAMServiceLevelAuthServiceBase {
/**
* Creates an instance of EAMServiceLevelAuthService.
*
* @param {*} [opts={}]
* @memberof EAMServiceLevelAuthService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -61,4 +61,12 @@ export interface EAMApplyType {
* @memberof EAMApplyType
*/
eamapplystatemodelid?: any;
/**
* 描述
*
* @returns {*}
* @memberof EAMApplyType
*/
description?: any;
}
\ No newline at end of file
......@@ -101,4 +101,52 @@ export interface EAMApply {
* @memberof EAMApply
*/
endtime?: any;
/**
* 资产
*
* @returns {*}
* @memberof EAMApply
*/
assetname?: any;
/**
* 功能位置
*
* @returns {*}
* @memberof EAMApply
*/
eamlocationname?: any;
/**
* 维护申请类型
*
* @returns {*}
* @memberof EAMApply
*/
eamapplytypename?: any;
/**
* 维护申请编号
*
* @returns {*}
* @memberof EAMApply
*/
applynumber?: any;
/**
* 服务等级标识
*
* @returns {*}
* @memberof EAMApply
*/
eamservicelevelid?: any;
/**
* 服务等级
*
* @returns {*}
* @memberof EAMApply
*/
eamservicelevelname?: any;
}
\ No newline at end of file
......@@ -69,4 +69,12 @@ export interface EAMLocationType {
* @memberof EAMLocationType
*/
eamlocationstatemodelname?: any;
/**
* 描述
*
* @returns {*}
* @memberof EAMLocationType
*/
description?: any;
}
\ No newline at end of file
......@@ -109,4 +109,12 @@ export interface EAMLocation {
* @memberof EAMLocation
*/
locationnumber?: any;
/**
* 描述
*
* @returns {*}
* @memberof EAMLocation
*/
description?: any;
}
\ No newline at end of file
/**
* 服务等级
*
* @export
* @interface EAMServiceLevel
*/
export interface EAMServiceLevel {
/**
* 建立人
*
* @returns {*}
* @memberof EAMServiceLevel
*/
createman?: any;
/**
* 建立时间
*
* @returns {*}
* @memberof EAMServiceLevel
*/
createdate?: any;
/**
* 服务等级标识
*
* @returns {*}
* @memberof EAMServiceLevel
*/
eamservicelevelid?: any;
/**
* 更新人
*
* @returns {*}
* @memberof EAMServiceLevel
*/
updateman?: any;
/**
* 服务等级名称
*
* @returns {*}
* @memberof EAMServiceLevel
*/
eamservicelevelname?: any;
/**
* 更新时间
*
* @returns {*}
* @memberof EAMServiceLevel
*/
updatedate?: any;
/**
* 描述
*
* @returns {*}
* @memberof EAMServiceLevel
*/
description?: any;
}
\ No newline at end of file
......@@ -7,6 +7,7 @@ import eamassettype_en_US from '@locale/lanres/entities/eamasset-type/eamasset-t
import eamassetstatemodelline_en_US from '@locale/lanres/entities/eamasset-state-model-line/eamasset-state-model-line_en_US';
import eamapplytype_en_US from '@locale/lanres/entities/eamapply-type/eamapply-type_en_US';
import eamproduct_en_US from '@locale/lanres/entities/eamproduct/eamproduct_en_US';
import eamservicelevel_en_US from '@locale/lanres/entities/eamservice-level/eamservice-level_en_US';
import eamsparepartspro_en_US from '@locale/lanres/entities/eamspare-parts-pro/eamspare-parts-pro_en_US';
import eamapplystatemodelline_en_US from '@locale/lanres/entities/eamapply-state-model-line/eamapply-state-model-line_en_US';
import eamsparepartsgroup_en_US from '@locale/lanres/entities/eamspare-parts-group/eamspare-parts-group_en_US';
......@@ -139,6 +140,9 @@ export default {
appindexview: {
user_menus: "用户菜单",
top_menus: "顶部菜单",
menuitem15: "系统设置",
menuitem16: "服务等级",
menuitem17: "维护申请类型",
left_exp: "左侧菜单",
menuitem1: "功能位置",
menuitem6: "功能位置状态",
......@@ -261,6 +265,7 @@ export default {
eamassetstatemodelline: eamassetstatemodelline_en_US,
eamapplytype: eamapplytype_en_US,
eamproduct: eamproduct_en_US,
eamservicelevel: eamservicelevel_en_US,
eamsparepartspro: eamsparepartspro_en_US,
eamapplystatemodelline: eamapplystatemodelline_en_US,
eamsparepartsgroup: eamsparepartsgroup_en_US,
......
......@@ -7,6 +7,7 @@ import eamassettype_zh_CN from '@locale/lanres/entities/eamasset-type/eamasset-t
import eamassetstatemodelline_zh_CN from '@locale/lanres/entities/eamasset-state-model-line/eamasset-state-model-line_zh_CN';
import eamapplytype_zh_CN from '@locale/lanres/entities/eamapply-type/eamapply-type_zh_CN';
import eamproduct_zh_CN from '@locale/lanres/entities/eamproduct/eamproduct_zh_CN';
import eamservicelevel_zh_CN from '@locale/lanres/entities/eamservice-level/eamservice-level_zh_CN';
import eamsparepartspro_zh_CN from '@locale/lanres/entities/eamspare-parts-pro/eamspare-parts-pro_zh_CN';
import eamapplystatemodelline_zh_CN from '@locale/lanres/entities/eamapply-state-model-line/eamapply-state-model-line_zh_CN';
import eamsparepartsgroup_zh_CN from '@locale/lanres/entities/eamspare-parts-group/eamspare-parts-group_zh_CN';
......@@ -139,6 +140,9 @@ export default {
appindexview: {
user_menus: "用户菜单",
top_menus: "顶部菜单",
menuitem15: "系统设置",
menuitem16: "服务等级",
menuitem17: "维护申请类型",
left_exp: "左侧菜单",
menuitem1: "功能位置",
menuitem6: "功能位置状态",
......@@ -260,6 +264,7 @@ export default {
eamassetstatemodelline: eamassetstatemodelline_zh_CN,
eamapplytype: eamapplytype_zh_CN,
eamproduct: eamproduct_zh_CN,
eamservicelevel: eamservicelevel_zh_CN,
eamsparepartspro: eamsparepartspro_zh_CN,
eamapplystatemodelline: eamapplystatemodelline_zh_CN,
eamsparepartsgroup: eamsparepartsgroup_zh_CN,
......
......@@ -8,5 +8,107 @@ export default {
createdate: "建立时间",
createman: "建立人",
eamapplystatemodelid: "维护申请状态模型标识",
description: "描述",
},
views: {
editview: {
caption: "维护申请类型",
title: "维护申请类型编辑",
},
gridview: {
caption: "维护申请类型",
title: "维护申请类型信息",
},
},
main_form: {
details: {
group1: "维护申请类型基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "维护申请类型标识",
srfmajortext: "维护申请类型名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
eamapplytypeid: "维护申请类型标识",
eamapplytypename: "维护申请类型名称",
description: "描述",
},
uiactions: {
},
},
main_grid: {
columns: {
eamapplytypeid: "维护申请类型标识",
eamapplytypename: "维护申请类型名称",
description: "描述",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
editviewtoolbar_toolbar: {
tbitem2: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem1: {
caption: "关闭",
tip: "关闭",
},
},
gridviewtoolbar_toolbar: {
tbitem5: {
caption: "New",
tip: "New",
},
seperator1: {
caption: "",
tip: "",
},
tbitem2: {
caption: "Edit",
tip: "Edit {0}",
},
seperator2: {
caption: "",
tip: "",
},
tbitem1: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem10: {
caption: "Filter",
tip: "Filter",
},
},
};
\ No newline at end of file
......@@ -7,5 +7,107 @@ export default {
createdate: "建立时间",
createman: "建立人",
eamapplystatemodelid: "维护申请状态模型标识",
description: "描述",
},
views: {
editview: {
caption: "维护申请类型",
title: "维护申请类型编辑",
},
gridview: {
caption: "维护申请类型",
title: "维护申请类型信息",
},
},
main_form: {
details: {
group1: "维护申请类型基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "维护申请类型标识",
srfmajortext: "维护申请类型名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
eamapplytypeid: "维护申请类型标识",
eamapplytypename: "维护申请类型名称",
description: "描述",
},
uiactions: {
},
},
main_grid: {
columns: {
eamapplytypeid: "维护申请类型标识",
eamapplytypename: "维护申请类型名称",
description: "描述",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
editviewtoolbar_toolbar: {
tbitem2: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem1: {
caption: "关闭",
tip: "关闭",
},
},
gridviewtoolbar_toolbar: {
tbitem5: {
caption: "新建",
tip: "新建",
},
seperator1: {
caption: "",
tip: "",
},
tbitem2: {
caption: "编辑",
tip: "编辑",
},
seperator2: {
caption: "",
tip: "",
},
tbitem1: {
caption: "拷贝",
tip: "拷贝",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "导出",
tip: "导出",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem10: {
caption: "过滤",
tip: "过滤",
},
},
};
\ No newline at end of file
......@@ -13,5 +13,11 @@ export default {
description: "描述",
begintime: "希望开始时间",
endtime: "希望结束时间",
assetname: "资产",
eamlocationname: "功能位置",
eamapplytypename: "维护申请类型",
applynumber: "维护申请编号",
eamservicelevelid: "服务等级标识",
eamservicelevelname: "服务等级",
},
};
\ No newline at end of file
......@@ -12,5 +12,11 @@ export default {
description: "描述",
begintime: "希望开始时间",
endtime: "希望结束时间",
assetname: "资产",
eamlocationname: "功能位置",
eamapplytypename: "维护申请类型",
applynumber: "维护申请编号",
eamservicelevelid: "服务等级标识",
eamservicelevelname: "服务等级",
},
};
\ No newline at end of file
......@@ -9,6 +9,7 @@ export default {
updatedate: "更新时间",
eamlocationstatemodelid: "功能位置状态模型标识",
eamlocationstatemodelname: "功能位置状态模型",
description: "描述",
},
views: {
pickupview: {
......
......@@ -8,6 +8,7 @@ export default {
updatedate: "更新时间",
eamlocationstatemodelid: "功能位置状态模型标识",
eamlocationstatemodelname: "功能位置状态模型",
description: "描述",
},
views: {
pickupview: {
......
......@@ -14,6 +14,7 @@ export default {
eamlocationtypename: "功能位置类型",
eamlocationstatename: "功能位置状态",
locationnumber: "功能位置编号",
description: "描述",
},
views: {
treeexpview: {
......
......@@ -13,6 +13,7 @@ export default {
eamlocationtypename: "功能位置类型",
eamlocationstatename: "功能位置状态",
locationnumber: "功能位置编号",
description: "描述",
},
views: {
treeexpview: {
......
export default {
fields: {
createman: "建立人",
createdate: "建立时间",
eamservicelevelid: "服务等级标识",
updateman: "更新人",
eamservicelevelname: "服务等级名称",
updatedate: "更新时间",
description: "描述",
},
views: {
editview: {
caption: "服务等级",
title: "服务等级编辑",
},
gridview: {
caption: "服务等级",
title: "服务等级信息",
},
},
main_form: {
details: {
group1: "服务等级基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "服务等级标识",
srfmajortext: "服务等级名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
eamservicelevelid: "服务等级标识",
eamservicelevelname: "服务等级名称",
description: "描述",
},
uiactions: {
},
},
main_grid: {
columns: {
eamservicelevelid: "服务等级标识",
eamservicelevelname: "服务等级名称",
description: "描述",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
editviewtoolbar_toolbar: {
tbitem10: {
caption: "Save",
tip: "Save",
},
tbitem12: {
caption: "Save And New",
tip: "Save And New",
},
tbitem11: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem18: {
caption: "-",
tip: "",
},
tbitem9: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
tbitem19: {
caption: "-",
tip: "",
},
tbitem5: {
caption: "New",
tip: "New",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem1: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem22: {
caption: "-",
tip: "",
},
tbitem2: {
caption: "第一个记录",
tip: "第一个记录",
},
tbitem7: {
caption: "上一个记录",
tip: "上一个记录",
},
tbitem6: {
caption: "下一个记录",
tip: "下一个记录",
},
tbitem4: {
caption: "最后一个记录",
tip: "最后一个记录",
},
tbitem25: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "Help",
tip: "Help",
},
},
gridviewtoolbar_toolbar: {
tbitem5: {
caption: "New",
tip: "New",
},
tbitem2: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem1: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem20: {
caption: "其它",
tip: "其它",
},
tbitem24: {
caption: "Export Data Model",
tip: "导出数据模型",
},
tbitem25: {
caption: "数据导入",
tip: "数据导入",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem10: {
caption: "Filter",
tip: "Filter",
},
tbitem4: {
caption: "Help",
tip: "Help",
},
},
};
\ No newline at end of file
export default {
fields: {
createman: "建立人",
createdate: "建立时间",
eamservicelevelid: "服务等级标识",
updateman: "更新人",
eamservicelevelname: "服务等级名称",
updatedate: "更新时间",
description: "描述",
},
views: {
editview: {
caption: "服务等级",
title: "服务等级编辑",
},
gridview: {
caption: "服务等级",
title: "服务等级信息",
},
},
main_form: {
details: {
group1: "服务等级基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "服务等级标识",
srfmajortext: "服务等级名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
eamservicelevelid: "服务等级标识",
eamservicelevelname: "服务等级名称",
description: "描述",
},
uiactions: {
},
},
main_grid: {
columns: {
eamservicelevelid: "服务等级标识",
eamservicelevelname: "服务等级名称",
description: "描述",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
editviewtoolbar_toolbar: {
tbitem10: {
caption: "保存",
tip: "保存",
},
tbitem12: {
caption: "保存并新建",
tip: "保存并新建",
},
tbitem11: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem18: {
caption: "-",
tip: "",
},
tbitem9: {
caption: "删除并关闭",
tip: "删除并关闭",
},
tbitem19: {
caption: "-",
tip: "",
},
tbitem5: {
caption: "新建",
tip: "新建",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem1: {
caption: "拷贝",
tip: "拷贝",
},
tbitem22: {
caption: "-",
tip: "",
},
tbitem2: {
caption: "第一个记录",
tip: "第一个记录",
},
tbitem7: {
caption: "上一个记录",
tip: "上一个记录",
},
tbitem6: {
caption: "下一个记录",
tip: "下一个记录",
},
tbitem4: {
caption: "最后一个记录",
tip: "最后一个记录",
},
tbitem25: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "帮助",
tip: "帮助",
},
},
gridviewtoolbar_toolbar: {
tbitem5: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "编辑",
tip: "编辑",
},
tbitem1: {
caption: "拷贝",
tip: "拷贝",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem3: {
caption: "导出",
tip: "导出",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem20: {
caption: "其它",
tip: "其它",
},
tbitem24: {
caption: "导出数据模型",
tip: "导出数据模型",
},
tbitem25: {
caption: "数据导入",
tip: "数据导入",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem10: {
caption: "过滤",
tip: "过滤",
},
tbitem4: {
caption: "帮助",
tip: "帮助",
},
},
};
\ No newline at end of file
......@@ -45,6 +45,64 @@ mock.onGet('v7/app-index-viewappmenu').reply((config: any) => {
textcls: '',
appfunctag: '',
resourcetag: '',
items: [
{
id: '72EF9A96-DED9-4262-8219-3212E7A332B6',
name: 'menuitem15',
text: '系统设置',
type: 'MENUITEM',
counterid: '',
tooltip: '系统设置',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: 'fa fa-cog',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
items: [
{
id: '0F6F0CEA-5965-4D70-AD5E-F149819CAA76',
name: 'menuitem16',
text: '服务等级',
type: 'MENUITEM',
counterid: '',
tooltip: '服务等级',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: 'fa fa-server',
icon: '',
textcls: '',
appfunctag: '_12',
resourcetag: '',
},
{
id: '7C4D180A-5AC9-451E-A7BE-969707F6E5E9',
name: 'menuitem17',
text: '维护申请类型',
type: 'MENUITEM',
counterid: '',
tooltip: '维护申请类型',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: 'fa fa-legal',
icon: '',
textcls: '',
appfunctag: '_4',
resourcetag: '',
},
],
},
],
},
{
id: '7428CF1E-09D0-477F-838B-3CB98A776FBA',
......@@ -97,7 +155,7 @@ mock.onGet('v7/app-index-viewappmenu').reply((config: any) => {
iconcls: 'fa fa-life-ring',
icon: '',
textcls: '',
appfunctag: '_6',
appfunctag: '_7',
resourcetag: '',
},
{
......@@ -115,7 +173,7 @@ mock.onGet('v7/app-index-viewappmenu').reply((config: any) => {
iconcls: 'fa fa-cube',
icon: '',
textcls: '',
appfunctag: '_5',
appfunctag: '_6',
resourcetag: '',
},
{
......@@ -133,7 +191,7 @@ mock.onGet('v7/app-index-viewappmenu').reply((config: any) => {
iconcls: 'fa fa-legal',
icon: '',
textcls: '',
appfunctag: '_7',
appfunctag: '_8',
resourcetag: '',
},
{
......@@ -151,7 +209,7 @@ mock.onGet('v7/app-index-viewappmenu').reply((config: any) => {
iconcls: 'fa fa-navicon',
icon: '',
textcls: '',
appfunctag: '_10',
appfunctag: '_11',
resourcetag: '',
},
],
......@@ -225,7 +283,7 @@ mock.onGet('v7/app-index-viewappmenu').reply((config: any) => {
iconcls: 'fa fa-legal',
icon: '',
textcls: '',
appfunctag: '_9',
appfunctag: '_10',
resourcetag: '',
},
{
......@@ -243,7 +301,7 @@ mock.onGet('v7/app-index-viewappmenu').reply((config: any) => {
iconcls: 'fa fa-rocket',
icon: '',
textcls: '',
appfunctag: '_8',
appfunctag: '_9',
resourcetag: '',
},
{
......@@ -261,7 +319,7 @@ mock.onGet('v7/app-index-viewappmenu').reply((config: any) => {
iconcls: 'fa fa-instagram',
icon: '',
textcls: '',
appfunctag: '_4',
appfunctag: '_5',
resourcetag: '',
},
],
......
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\/eamservicelevels\/[a-zA-Z0-9\-\;]+\/usertasks\/[a-zA-Z0-9\-\;]+\/ways$/)).reply((config: any) => {
console.groupCollapsed("实体:eamservicelevel 方法: 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\/eamservicelevels\/process-definitions-nodes$/)).reply((config: any) => {
console.groupCollapsed("实体:eamservicelevel 方法: 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(/^\/eamservicelevels\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:eamservicelevel 方法: 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(/^\/eamservicelevels\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:eamservicelevel 方法: 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(/^\/eamservicelevels\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:eamservicelevel 方法: 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(/^\/eamservicelevels\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:eamservicelevel 方法: 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> = ['eamservicelevelid'];
const matchArray:any = new RegExp(/^\/eamservicelevels\/([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.eamservicelevelid, tempValue.eamservicelevelid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Create
mock.onPost(new RegExp(/^\/eamservicelevels\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamservicelevel 方法: 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> = ['eamservicelevelid'];
const matchArray:any = new RegExp(/^\/eamservicelevels\/([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(/^\/eamservicelevels\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamservicelevel 方法: 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> = ['eamservicelevelid'];
const matchArray:any = new RegExp(/^\/eamservicelevels\/([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.eamservicelevelid, tempValue.eamservicelevelid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eamservicelevelid'] == tempValue['eamservicelevelid'] ){
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(/^\/eamservicelevels\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:eamservicelevel 方法: 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(/^\/eamservicelevels\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:eamservicelevel 方法: 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> = ['eamservicelevelid'];
const matchArray:any = new RegExp(/^\/eamservicelevels\/([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.eamservicelevelid, tempValue.eamservicelevelid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eamservicelevelid'] == tempValue['eamservicelevelid'] ){
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(/^\/eamservicelevels\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:eamservicelevel 方法: 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> = ['eamservicelevelid'];
const matchArray:any = new RegExp(/^\/eamservicelevels\/([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.eamservicelevelid, tempValue.eamservicelevelid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['eamservicelevelid'] == tempValue['eamservicelevelid'] ){
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(/^\/eamservicelevels\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:eamservicelevel 方法: 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(/^\/eamservicelevels\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:eamservicelevel 方法: 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(/^\/eamservicelevels\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamservicelevel 方法: 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> = ['eamservicelevelid'];
const matchArray:any = new RegExp(/^\/eamservicelevels\/([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.eamservicelevelid, tempValue.eamservicelevelid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/eamservicelevels\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:eamservicelevel 方法: 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> = ['eamservicelevelid'];
const matchArray:any = new RegExp(/^\/eamservicelevels\/([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.eamservicelevelid, tempValue.eamservicelevelid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
......@@ -16,6 +16,7 @@ import './entity/eamasset-types/eamasset-types';
import './entity/eamasset-state-model-lines/eamasset-state-model-lines';
import './entity/eamapply-types/eamapply-types';
import './entity/eamproducts/eamproducts';
import './entity/eamservice-levels/eamservice-levels';
import './entity/eamspare-parts-pros/eamspare-parts-pros';
import './entity/eamapply-state-model-lines/eamapply-state-model-lines';
import './entity/eamspare-parts-groups/eamspare-parts-groups';
......
......@@ -63,6 +63,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMLocationEditView",
"viewtag": "1769804cd7ab51624ac3c88c2090363b"
},
"eamapplytypeeditview": {
"title": "维护申请类型编辑",
"caption": "维护申请类型",
"viewtype": "DEEDITVIEW",
"viewmodule": "Apply",
"viewname": "EAMApplyTypeEditView",
"viewtag": "1d768bbdaf3091c5d7131992a8ec7412"
},
"eamlocationtreechildgridview": {
"title": "功能位置信息",
"caption": "功能位置",
......@@ -399,6 +407,22 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMAssetChildGridView",
"viewtag": "c8bf8b682adc459f7f285328199ba4b4"
},
"eamserviceleveleditview": {
"title": "服务等级编辑",
"caption": "服务等级",
"viewtype": "DEEDITVIEW",
"viewmodule": "WorkOrder",
"viewname": "EAMServiceLevelEditView",
"viewtag": "ca41431df21901bec3c62db4097e36d4"
},
"eamapplytypegridview": {
"title": "维护申请类型信息",
"caption": "维护申请类型",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Apply",
"viewname": "EAMApplyTypeGridView",
"viewtag": "ca66d81a69c0f084e3f7cf1e99ae9d28"
},
"eamlocationsummaryview": {
"title": "功能位置数据看板视图",
"caption": "功能位置",
......@@ -495,6 +519,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EAMLocationStateModelLineGridView",
"viewtag": "ecd1ec6299b5b24e2004fa15c4eef92d"
},
"eamservicelevelgridview": {
"title": "服务等级信息",
"caption": "服务等级",
"viewtype": "DEGRIDVIEW",
"viewmodule": "WorkOrder",
"viewname": "EAMServiceLevelGridView",
"viewtag": "edea4ef4e4810cea28340d5636e6e28d"
},
"eamlocationgridview": {
"title": "功能位置信息",
"caption": "功能位置",
......
import { Subject } from 'rxjs';
import { EditViewBase } from '@/studio-core';
import EAMApplyTypeService from '@/service/eamapply-type/eamapply-type-service';
import EAMApplyTypeAuthService from '@/authservice/eamapply-type/eamapply-type-auth-service';
import EditViewEngine from '@engine/view/edit-view-engine';
import EAMApplyTypeUIService from '@/uiservice/eamapply-type/eamapply-type-ui-service';
/**
* 维护申请类型编辑视图基类
*
* @export
* @class EAMApplyTypeEditViewBase
* @extends {EditViewBase}
*/
export class EAMApplyTypeEditViewBase extends EditViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMApplyTypeEditViewBase
*/
protected appDeName: string = 'eamapplytype';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMApplyTypeEditViewBase
*/
protected appDeKey: string = 'eamapplytypeid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMApplyTypeEditViewBase
*/
protected appDeMajor: string = 'eamapplytypename';
/**
* 实体服务对象
*
* @type {EAMApplyTypeService}
* @memberof EAMApplyTypeEditViewBase
*/
protected appEntityService: EAMApplyTypeService = new EAMApplyTypeService;
/**
* 实体权限服务对象
*
* @type EAMApplyTypeUIService
* @memberof EAMApplyTypeEditViewBase
*/
public appUIService: EAMApplyTypeUIService = new EAMApplyTypeUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMApplyTypeEditViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMApplyTypeEditViewBase
*/
protected model: any = {
srfCaption: 'entities.eamapplytype.views.editview.caption',
srfTitle: 'entities.eamapplytype.views.editview.title',
srfSubTitle: 'entities.eamapplytype.views.editview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMApplyTypeEditViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_form: { name: 'form', type: 'FORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof EAMApplyTypeEditView
*/
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 = '1d768bbdaf3091c5d7131992a8ec7412';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMApplyTypeEditViewBase
*/
public engine: EditViewEngine = new EditViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMApplyTypeEditViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'eamapplytype',
majorPSDEField: 'eamapplytypename',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMApplyTypeEditViewBase
*/
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 EAMApplyTypeEditViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMApplyTypeEditViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMApplyTypeEditViewBase
*/
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,"EAMApplyType");
}
/**
* 逻辑事件
*
* @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,"EAMApplyType");
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMApplyTypeEditViewBase
*/
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 EAMApplyTypeEditViewBase
*/
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="eamapplytypeeditview" viewTitle="维护申请类型编辑" class='deeditview eamapply-type-edit-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<view_form
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="true"
updateAction="Update"
removeAction="Remove"
loaddraftAction="GetDraft"
loadAction="Get"
createAction="Create"
WFSubmitAction=""
WFStartAction=""
style=''
name="form"
ref='form'
@save="form_save($event)"
@remove="form_remove($event)"
@load="form_load($event)"
@closeview="closeView($event)">
</view_form>
</studio-view-style2>
\ No newline at end of file
<template src="./eamapply-type-edit-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMApplyTypeEditViewBase } from './eamapply-type-edit-view-base';
import view_form from '@widgets/eamapply-type/main-form/main-form.vue';
/**
* 维护申请类型编辑视图
*
* @export
* @class EAMApplyTypeEditView
* @extends {EAMApplyTypeEditViewBase}
*/
@Component({
components: {
view_form,
}
})
@VueLifeCycleProcessing()
export default class EAMApplyTypeEditView extends EAMApplyTypeEditViewBase { }
</script>
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import EAMApplyTypeService from '@/service/eamapply-type/eamapply-type-service';
import EAMApplyTypeAuthService from '@/authservice/eamapply-type/eamapply-type-auth-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import EAMApplyTypeUIService from '@/uiservice/eamapply-type/eamapply-type-ui-service';
import CodeListService from "@service/app/codelist-service";
/**
* 维护申请类型信息视图基类
*
* @export
* @class EAMApplyTypeGridViewBase
* @extends {GridViewBase}
*/
export class EAMApplyTypeGridViewBase extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMApplyTypeGridViewBase
*/
protected appDeName: string = 'eamapplytype';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMApplyTypeGridViewBase
*/
protected appDeKey: string = 'eamapplytypeid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMApplyTypeGridViewBase
*/
protected appDeMajor: string = 'eamapplytypename';
/**
* 实体服务对象
*
* @type {EAMApplyTypeService}
* @memberof EAMApplyTypeGridViewBase
*/
protected appEntityService: EAMApplyTypeService = new EAMApplyTypeService;
/**
* 实体权限服务对象
*
* @type EAMApplyTypeUIService
* @memberof EAMApplyTypeGridViewBase
*/
public appUIService: EAMApplyTypeUIService = new EAMApplyTypeUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMApplyTypeGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMApplyTypeGridViewBase
*/
protected model: any = {
srfCaption: 'entities.eamapplytype.views.gridview.caption',
srfTitle: 'entities.eamapplytype.views.gridview.title',
srfSubTitle: 'entities.eamapplytype.views.gridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMApplyTypeGridViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof EAMApplyTypeGridView
*/
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 = 'ca66d81a69c0f084e3f7cf1e99ae9d28';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMApplyTypeGridViewBase
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMApplyTypeGridViewBase
*/
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: 'eamapplytype',
majorPSDEField: 'eamapplytypename',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMApplyTypeGridViewBase
*/
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 EAMApplyTypeGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMApplyTypeGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMApplyTypeGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMApplyTypeGridViewBase
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMApplyTypeGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMApplyTypeGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMApplyTypeGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMApplyTypeGridViewBase
*/
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,"EAMApplyType");
}
/**
* 逻辑事件
*
* @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,"EAMApplyType");
}
/**
* 逻辑事件
*
* @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,"EAMApplyType");
}
/**
* 逻辑事件
*
* @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,"EAMApplyType");
}
/**
* 逻辑事件
*
* @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,"EAMApplyType");
}
/**
* 逻辑事件
*
* @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,"EAMApplyType");
}
/**
* 逻辑事件
*
* @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,"EAMApplyType");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMApplyTypeGridView
*/
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.eamapplytype;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamapplytypes', parameterName: 'eamapplytype' },
];
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: 'eamapply-type-edit-view',
height: 0,
width: 0,
title: this.$t('entities.eamapplytype.views.editview.title'),
};
openPopupModal(view, data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMApplyTypeGridView
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
const localContext: any = null;
const localViewParam: any =null;
const data: any = {};
let tempContext = JSON.parse(JSON.stringify(this.context));
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamapplytypes', parameterName: 'eamapplytype' },
];
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: 'eamapply-type-edit-view',
height: 0,
width: 0,
title: this.$t('entities.eamapplytype.views.editview.title'),
};
openPopupModal(view, data);
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMApplyTypeGridViewBase
*/
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 EAMApplyTypeGridViewBase
*/
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, { eamapplytype: args[0].eamapplytype })
}
_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 EAMApplyTypeGridViewBase
*/
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, { eamapplytype: args[0].eamapplytype });
}
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 EAMApplyTypeGridViewBase
*/
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 EAMApplyTypeGridViewBase
*/
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 EAMApplyTypeGridViewBase
*/
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 EAMApplyTypeGridViewBase
*/
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="eamapplytypegridview" viewTitle="维护申请类型信息" class='degridview eamapply-type-grid-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" placeholder="维护申请类型名称" search @on-search="onSearch($event)"/>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<template slot="searchForm">
<view_searchform
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
@search="searchform_search($event)"
@load="searchform_load($event)"
@closeview="closeView($event)">
</view_searchform>
</template>
<view_grid
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:isSingleSelect="isGridSingleSelect"
:showBusyIndicator="true"
:isOpenEdit="false"
:gridRowActiveMode="gridRowActiveMode"
@save="onSave.apply(_self, arguments)"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
:newdata="newdata.bind(_self)"
:opendata="opendata.bind(_self)"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@remove="grid_remove($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</studio-view-style2>
\ No newline at end of file
<template src="./eamapply-type-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMApplyTypeGridViewBase } from './eamapply-type-grid-view-base';
import view_grid from '@widgets/eamapply-type/main-grid/main-grid.vue';
import view_searchform from '@widgets/eamapply-type/default-searchform/default-searchform.vue';
/**
* 维护申请类型信息视图
*
* @export
* @class EAMApplyTypeGridView
* @extends {EAMApplyTypeGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class EAMApplyTypeGridView extends EAMApplyTypeGridViewBase { }
</script>
......@@ -3,6 +3,7 @@ export const PageComponents = {
Vue.component('eamspare-parts-group-grid-view', () => import('@pages/asset/eamspare-parts-group-grid-view/eamspare-parts-group-grid-view.vue'));
Vue.component('eamasset-type-pickup-view', () => import('@pages/asset/eamasset-type-pickup-view/eamasset-type-pickup-view.vue'));
Vue.component('eamproductpickup-view', () => import('@pages/asset/eamproductpickup-view/eamproductpickup-view.vue'));
Vue.component('eamapply-type-edit-view', () => import('@pages/apply/eamapply-type-edit-view/eamapply-type-edit-view.vue'));
Vue.component('eamasset-state-model-line-edit-view', () => import('@pages/asset/eamasset-state-model-line-edit-view/eamasset-state-model-line-edit-view.vue'));
Vue.component('eamasset-tree-exp-view', () => import('@pages/asset/eamasset-tree-exp-view/eamasset-tree-exp-view.vue'));
Vue.component('eamasset-child-grid-view', () => import('@pages/asset/eamasset-child-grid-view/eamasset-child-grid-view.vue'));
......@@ -12,6 +13,7 @@ export const PageComponents = {
Vue.component('eamasset-state-edit-view', () => import('@pages/asset/eamasset-state-edit-view/eamasset-state-edit-view.vue'));
Vue.component('eamlocation-tree-child-grid-view', () => import('@pages/location/eamlocation-tree-child-grid-view/eamlocation-tree-child-grid-view.vue'));
Vue.component('eamlocation-state-pickup-grid-view', () => import('@pages/location/eamlocation-state-pickup-grid-view/eamlocation-state-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('eamspare-parts-group-edit-view', () => import('@pages/asset/eamspare-parts-group-edit-view/eamspare-parts-group-edit-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'));
......@@ -29,6 +31,7 @@ export const PageComponents = {
Vue.component('eamasset-edit-view', () => import('@pages/asset/eamasset-edit-view/eamasset-edit-view.vue'));
Vue.component('eamasset-type-grid-view', () => import('@pages/asset/eamasset-type-grid-view/eamasset-type-grid-view.vue'));
Vue.component('eamasset-state-model-pickup-grid-view', () => import('@pages/asset/eamasset-state-model-pickup-grid-view/eamasset-state-model-pickup-grid-view.vue'));
Vue.component('eamservice-level-edit-view', () => import('@pages/work-order/eamservice-level-edit-view/eamservice-level-edit-view.vue'));
Vue.component('eamasset-location-asset-grid-view', () => import('@pages/asset/eamasset-location-asset-grid-view/eamasset-location-asset-grid-view.vue'));
Vue.component('eamasset-parts-group-parts-asset-grid-view', () => import('@pages/asset/eamasset-parts-group-parts-asset-grid-view/eamasset-parts-group-parts-asset-grid-view.vue'));
Vue.component('eamspare-parts-group-info-view', () => import('@pages/asset/eamspare-parts-group-info-view/eamspare-parts-group-info-view.vue'));
......@@ -38,8 +41,8 @@ export const PageComponents = {
Vue.component('eamasset-type-edit-view', () => import('@pages/asset/eamasset-type-edit-view/eamasset-type-edit-view.vue'));
Vue.component('eamasset-summary-view', () => import('@pages/asset/eamasset-summary-view/eamasset-summary-view.vue'));
Vue.component('eamasset-state-model-line-grid-view', () => import('@pages/asset/eamasset-state-model-line-grid-view/eamasset-state-model-line-grid-view.vue'));
Vue.component('eamlocation-type-grid-view', () => import('@pages/location/eamlocation-type-grid-view/eamlocation-type-grid-view.vue'));
Vue.component('eamlocation-state-edit-view', () => import('@pages/location/eamlocation-state-edit-view/eamlocation-state-edit-view.vue'));
Vue.component('eamlocation-type-grid-view', () => import('@pages/location/eamlocation-type-grid-view/eamlocation-type-grid-view.vue'));
Vue.component('eamasset-info-view', () => import('@pages/asset/eamasset-info-view/eamasset-info-view.vue'));
Vue.component('eamasset-state-model-edit-view', () => import('@pages/asset/eamasset-state-model-edit-view/eamasset-state-model-edit-view.vue'));
Vue.component('eamasset-state-pickup-grid-view', () => import('@pages/asset/eamasset-state-pickup-grid-view/eamasset-state-pickup-grid-view.vue'));
......@@ -58,9 +61,10 @@ export const PageComponents = {
Vue.component('eamlocation-summary-view', () => import('@pages/location/eamlocation-summary-view/eamlocation-summary-view.vue'));
Vue.component('eamasset-pickup-view', () => import('@pages/asset/eamasset-pickup-view/eamasset-pickup-view.vue'));
Vue.component('eamasset-quick-create-view', () => import('@pages/asset/eamasset-quick-create-view/eamasset-quick-create-view.vue'));
Vue.component('eamapply-type-grid-view', () => import('@pages/apply/eamapply-type-grid-view/eamapply-type-grid-view.vue'));
Vue.component('eamlocation-grid-view', () => import('@pages/location/eamlocation-grid-view/eamlocation-grid-view.vue'));
Vue.component('eamlocation-state-model-grid-view', () => import('@pages/location/eamlocation-state-model-grid-view/eamlocation-state-model-grid-view.vue'));
Vue.component('eamasset-type-pickup-grid-view', () => import('@pages/asset/eamasset-type-pickup-grid-view/eamasset-type-pickup-grid-view.vue'));
Vue.component('eamlocation-state-model-grid-view', () => import('@pages/location/eamlocation-state-model-grid-view/eamlocation-state-model-grid-view.vue'));
Vue.component('eamspare-parts-proedit-view', () => import('@pages/asset/eamspare-parts-proedit-view/eamspare-parts-proedit-view.vue'));
}
};
\ No newline at end of file
......@@ -85,6 +85,20 @@ const router = new Router({
},
component: () => import('@pages/asset/eamproductpickup-view/eamproductpickup-view.vue'),
},
{
path: 'eamapplytypes/:eamapplytype?/editview/:editview?',
meta: {
caption: 'entities.eamapplytype.views.editview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamapplytypes', parameterName: 'eamapplytype' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/apply/eamapply-type-edit-view/eamapply-type-edit-view.vue'),
},
{
path: 'eamassetstatemodellines/:eamassetstatemodelline?/editview/:editview?',
meta: {
......@@ -241,6 +255,20 @@ const router = new Router({
},
component: () => import('@pages/location/eamlocation-state-pickup-grid-view/eamlocation-state-pickup-grid-view.vue'),
},
{
path: 'eamservicelevels/:eamservicelevel?/gridview/:gridview?',
meta: {
caption: 'entities.eamservicelevel.views.gridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamservicelevels', parameterName: 'eamservicelevel' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/work-order/eamservice-level-grid-view/eamservice-level-grid-view.vue'),
},
{
path: 'eamlocations/:eamlocation?/eamassets/:eamasset?/gridview/:gridview?',
meta: {
......@@ -539,6 +567,20 @@ const router = new Router({
},
component: () => import('@pages/asset/eamasset-state-model-pickup-grid-view/eamasset-state-model-pickup-grid-view.vue'),
},
{
path: 'eamservicelevels/:eamservicelevel?/editview/:editview?',
meta: {
caption: 'entities.eamservicelevel.views.editview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamservicelevels', parameterName: 'eamservicelevel' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/work-order/eamservice-level-edit-view/eamservice-level-edit-view.vue'),
},
{
path: 'eamlocations/:eamlocation?/eamassets/:eamasset?/locationassetgridview/:locationassetgridview?',
meta: {
......@@ -726,32 +768,32 @@ const router = new Router({
component: () => import('@pages/asset/eamasset-state-model-line-grid-view/eamasset-state-model-line-grid-view.vue'),
},
{
path: 'eamlocationtypes/:eamlocationtype?/gridview/:gridview?',
path: 'eamlocationstates/:eamlocationstate?/editview/:editview?',
meta: {
caption: 'entities.eamlocationtype.views.gridview.title',
caption: 'entities.eamlocationstate.views.editview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationtypes', parameterName: 'eamlocationtype' },
{ pathName: 'gridview', parameterName: 'gridview' },
{ pathName: 'eamlocationstates', parameterName: 'eamlocationstate' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-type-grid-view/eamlocation-type-grid-view.vue'),
component: () => import('@pages/location/eamlocation-state-edit-view/eamlocation-state-edit-view.vue'),
},
{
path: 'eamlocationstates/:eamlocationstate?/editview/:editview?',
path: 'eamlocationtypes/:eamlocationtype?/gridview/:gridview?',
meta: {
caption: 'entities.eamlocationstate.views.editview.title',
caption: 'entities.eamlocationtype.views.gridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstates', parameterName: 'eamlocationstate' },
{ pathName: 'editview', parameterName: 'editview' },
{ pathName: 'eamlocationtypes', parameterName: 'eamlocationtype' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-state-edit-view/eamlocation-state-edit-view.vue'),
component: () => import('@pages/location/eamlocation-type-grid-view/eamlocation-type-grid-view.vue'),
},
{
path: 'eamlocations/:eamlocation?/eamassets/:eamasset?/infoview/:infoview?',
......@@ -1066,32 +1108,32 @@ const router = new Router({
component: () => import('@pages/asset/eamasset-quick-create-view/eamasset-quick-create-view.vue'),
},
{
path: 'eamlocations/:eamlocation?/gridview/:gridview?',
path: 'eamapplytypes/:eamapplytype?/gridview/:gridview?',
meta: {
caption: 'entities.eamlocation.views.gridview.title',
caption: 'entities.eamapplytype.views.gridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'eamapplytypes', parameterName: 'eamapplytype' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-grid-view/eamlocation-grid-view.vue'),
component: () => import('@pages/apply/eamapply-type-grid-view/eamapply-type-grid-view.vue'),
},
{
path: 'eamlocationstatemodels/:eamlocationstatemodel?/gridview/:gridview?',
path: 'eamlocations/:eamlocation?/gridview/:gridview?',
meta: {
caption: 'entities.eamlocationstatemodel.views.gridview.title',
caption: 'entities.eamlocation.views.gridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstatemodels', parameterName: 'eamlocationstatemodel' },
{ pathName: 'eamlocations', parameterName: 'eamlocation' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-state-model-grid-view/eamlocation-state-model-grid-view.vue'),
component: () => import('@pages/location/eamlocation-grid-view/eamlocation-grid-view.vue'),
},
{
path: 'eamassettypes/:eamassettype?/pickupgridview/:pickupgridview?',
......@@ -1107,6 +1149,20 @@ const router = new Router({
},
component: () => import('@pages/asset/eamasset-type-pickup-grid-view/eamasset-type-pickup-grid-view.vue'),
},
{
path: 'eamlocationstatemodels/:eamlocationstatemodel?/gridview/:gridview?',
meta: {
caption: 'entities.eamlocationstatemodel.views.gridview.title',
info:'',
parameters: [
{ pathName: 'appindexview', parameterName: 'appindexview' },
{ pathName: 'eamlocationstatemodels', parameterName: 'eamlocationstatemodel' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/location/eamlocation-state-model-grid-view/eamlocation-state-model-grid-view.vue'),
},
{
path: 'eamsparepartsgroups/:eamsparepartsgroup?/eamsparepartspros/:eamsparepartspro?/editview/:editview?',
meta: {
......
import { Subject } from 'rxjs';
import { EditViewBase } from '@/studio-core';
import EAMServiceLevelService from '@/service/eamservice-level/eamservice-level-service';
import EAMServiceLevelAuthService from '@/authservice/eamservice-level/eamservice-level-auth-service';
import EditViewEngine from '@engine/view/edit-view-engine';
import EAMServiceLevelUIService from '@/uiservice/eamservice-level/eamservice-level-ui-service';
/**
* 服务等级编辑视图基类
*
* @export
* @class EAMServiceLevelEditViewBase
* @extends {EditViewBase}
*/
export class EAMServiceLevelEditViewBase extends EditViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMServiceLevelEditViewBase
*/
protected appDeName: string = 'eamservicelevel';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMServiceLevelEditViewBase
*/
protected appDeKey: string = 'eamservicelevelid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMServiceLevelEditViewBase
*/
protected appDeMajor: string = 'eamservicelevelname';
/**
* 实体服务对象
*
* @type {EAMServiceLevelService}
* @memberof EAMServiceLevelEditViewBase
*/
protected appEntityService: EAMServiceLevelService = new EAMServiceLevelService;
/**
* 实体权限服务对象
*
* @type EAMServiceLevelUIService
* @memberof EAMServiceLevelEditViewBase
*/
public appUIService: EAMServiceLevelUIService = new EAMServiceLevelUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMServiceLevelEditViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMServiceLevelEditViewBase
*/
protected model: any = {
srfCaption: 'entities.eamservicelevel.views.editview.caption',
srfTitle: 'entities.eamservicelevel.views.editview.title',
srfSubTitle: 'entities.eamservicelevel.views.editview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMServiceLevelEditViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_form: { name: 'form', type: 'FORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof EAMServiceLevelEditView
*/
public toolBarModels: any = {
tbitem10: { name: 'tbitem10', caption: '保存', 'isShowCaption': true, 'isShowIcon': true, tooltip: '保存', iconcls: 'fa fa-save', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Save', target: '', class: '' } },
tbitem12: { name: 'tbitem12', caption: '保存并新建', 'isShowCaption': true, 'isShowIcon': true, tooltip: '保存并新建', iconcls: 'sx-tb-saveandnew', icon: '../sasrfex/images/default/icon_saveandnew.png', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'SaveAndNew', target: '', class: '' } },
tbitem11: { name: 'tbitem11', caption: '保存并关闭', 'isShowCaption': true, 'isShowIcon': true, tooltip: '保存并关闭', iconcls: 'sx-tb-saveandclose', icon: '../sasrfex/images/default/icon_saveandclose.png', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '', class: '' } },
tbitem18: { name: 'tbitem18', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem9: { name: 'tbitem9', caption: '删除并关闭', 'isShowCaption': true, 'isShowIcon': true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY', class: '' } },
tbitem19: { name: 'tbitem19', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem5: { name: 'tbitem5', caption: '新建', 'isShowCaption': true, 'isShowIcon': true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'New', target: '', class: '' } },
tbitem21: { name: 'tbitem21', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem1: { name: 'tbitem1', caption: '拷贝', 'isShowCaption': true, 'isShowIcon': true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY', class: '' } },
tbitem22: { name: 'tbitem22', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem2: { name: 'tbitem2', caption: '第一个记录', 'isShowCaption': false, 'isShowIcon': true, tooltip: '第一个记录', iconcls: 'fa fa-fast-backward', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'FirstRecord', target: 'SINGLEKEY', class: '' } },
tbitem7: { name: 'tbitem7', caption: '上一个记录', 'isShowCaption': false, 'isShowIcon': true, tooltip: '上一个记录', iconcls: 'fa fa-step-backward', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'PrevRecord', target: 'SINGLEKEY', class: '' } },
tbitem6: { name: 'tbitem6', caption: '下一个记录', 'isShowCaption': false, 'isShowIcon': true, tooltip: '下一个记录', iconcls: 'fa fa-step-forward', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'NextRecord', target: 'SINGLEKEY', class: '' } },
tbitem4: { name: 'tbitem4', caption: '最后一个记录', 'isShowCaption': false, 'isShowIcon': true, tooltip: '最后一个记录', iconcls: 'fa fa-fast-forward', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'LastRecord', target: 'SINGLEKEY', class: '' } },
tbitem25: { name: 'tbitem25', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem3: { name: 'tbitem3', caption: '帮助', 'isShowCaption': true, 'isShowIcon': true, tooltip: '帮助', iconcls: 'fa fa-question', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Help', target: '', class: '' } },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'ca41431df21901bec3c62db4097e36d4';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMServiceLevelEditViewBase
*/
public engine: EditViewEngine = new EditViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMServiceLevelEditViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'eamservicelevel',
majorPSDEField: 'eamservicelevelname',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMServiceLevelEditViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem10')) {
this.toolbar_tbitem10_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem12')) {
this.toolbar_tbitem12_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem11')) {
this.toolbar_tbitem11_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem9')) {
this.toolbar_tbitem9_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem13')) {
this.toolbar_tbitem13_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem14')) {
this.toolbar_tbitem14_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem1')) {
this.toolbar_tbitem1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem2')) {
this.toolbar_tbitem2_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem7')) {
this.toolbar_tbitem7_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem6')) {
this.toolbar_tbitem6_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMServiceLevelEditViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMServiceLevelEditViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMServiceLevelEditViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem10_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem12_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndNew(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem11_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem9_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem13_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndStart(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem14_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ViewWFStep(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem5_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem1_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem8_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem2_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.FirstRecord(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem7_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.PrevRecord(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem6_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.NextRecord(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem4_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.LastRecord(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem3_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Help(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMServiceLevelEditViewBase
*/
public Save(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
// 界面行为容器对象 _this
const _this: any = this;
if (xData && xData.save instanceof Function) {
xData.save().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
_this.$emit('viewdataschange', [{ ...response.data }]);
});
} else if (_this.save && _this.save instanceof Function) {
_this.save();
}
}
/**
* 保存并新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMServiceLevelEditViewBase
*/
public SaveAndNew(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.saveAndNew instanceof Function)) {
return;
}
xData.saveAndNew().then((response: any) => {
if (!response || response.status !== 200) {
_this.$emit('viewdataschange', JSON.stringify({status:'error',action:'saveAndNew'}));
return;
}
_this.$emit('viewdataschange', JSON.stringify({status:'success',action:'saveAndNew',data:response.data}));
if (xData.autoLoad instanceof Function) {
xData.autoLoad();
}
});
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMServiceLevelEditViewBase
*/
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 EAMServiceLevelEditViewBase
*/
public RemoveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.removeAndExit instanceof Function) {
xData.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.removeAndExit && _this.removeAndExit instanceof Function) {
_this.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
* 开始流程
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMServiceLevelEditViewBase
*/
public SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.wfstart instanceof Function)) {
return;
}
xData.wfstart(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if(window.parent){
window.parent.postMessage({ ..._data },'*');
}
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
}else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
}
});
}
/**
* 当前流程步骤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMServiceLevelEditViewBase
*/
public ViewWFStep(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.wfsubmit instanceof Function)) {
return;
}
xData.wfsubmit(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
} else if (_this.$tabPageExp) {
_this.$tabPageExp.onClose(_this.$route.fullPath);
}
});
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMServiceLevelEditViewBase
*/
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 EAMServiceLevelEditViewBase
*/
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, { eamservicelevel: args[0].eamservicelevel });
}
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 EAMServiceLevelEditViewBase
*/
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 EAMServiceLevelEditViewBase
*/
public Help(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.$Notice.error({ title: '错误', desc: '帮助未支持' });
}
}
\ No newline at end of file
<studio-view-style2 viewName="eamserviceleveleditview" viewTitle="服务等级编辑" class='deeditview eamservice-level-edit-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<view_form
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="true"
updateAction="Update"
removeAction="Remove"
loaddraftAction="GetDraft"
loadAction="Get"
createAction="Create"
WFSubmitAction=""
WFStartAction=""
style=''
name="form"
ref='form'
@save="form_save($event)"
@remove="form_remove($event)"
@load="form_load($event)"
@closeview="closeView($event)">
</view_form>
</studio-view-style2>
\ No newline at end of file
<template src="./eamservice-level-edit-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMServiceLevelEditViewBase } from './eamservice-level-edit-view-base';
import view_form from '@widgets/eamservice-level/main-form/main-form.vue';
/**
* 服务等级编辑视图
*
* @export
* @class EAMServiceLevelEditView
* @extends {EAMServiceLevelEditViewBase}
*/
@Component({
components: {
view_form,
}
})
@VueLifeCycleProcessing()
export default class EAMServiceLevelEditView extends EAMServiceLevelEditViewBase { }
</script>
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import EAMServiceLevelService from '@/service/eamservice-level/eamservice-level-service';
import EAMServiceLevelAuthService from '@/authservice/eamservice-level/eamservice-level-auth-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import EAMServiceLevelUIService from '@/uiservice/eamservice-level/eamservice-level-ui-service';
import CodeListService from "@service/app/codelist-service";
/**
* 服务等级信息视图基类
*
* @export
* @class EAMServiceLevelGridViewBase
* @extends {GridViewBase}
*/
export class EAMServiceLevelGridViewBase extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof EAMServiceLevelGridViewBase
*/
protected appDeName: string = 'eamservicelevel';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof EAMServiceLevelGridViewBase
*/
protected appDeKey: string = 'eamservicelevelid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof EAMServiceLevelGridViewBase
*/
protected appDeMajor: string = 'eamservicelevelname';
/**
* 实体服务对象
*
* @type {EAMServiceLevelService}
* @memberof EAMServiceLevelGridViewBase
*/
protected appEntityService: EAMServiceLevelService = new EAMServiceLevelService;
/**
* 实体权限服务对象
*
* @type EAMServiceLevelUIService
* @memberof EAMServiceLevelGridViewBase
*/
public appUIService: EAMServiceLevelUIService = new EAMServiceLevelUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof EAMServiceLevelGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof EAMServiceLevelGridViewBase
*/
protected model: any = {
srfCaption: 'entities.eamservicelevel.views.gridview.caption',
srfTitle: 'entities.eamservicelevel.views.gridview.title',
srfSubTitle: 'entities.eamservicelevel.views.gridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof EAMServiceLevelGridViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof EAMServiceLevelGridView
*/
public toolBarModels: any = {
tbitem5: { name: 'tbitem5', caption: '新建', 'isShowCaption': true, 'isShowIcon': true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'New', target: '', class: '' } },
tbitem2: { name: 'tbitem2', caption: '编辑', 'isShowCaption': true, 'isShowIcon': true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY', class: '' } },
tbitem1: { name: 'tbitem1', caption: '拷贝', 'isShowCaption': true, 'isShowIcon': true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY', class: '' } },
tbitem15: { name: 'tbitem15', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem8: { name: 'tbitem8', caption: '删除', 'isShowCaption': true, 'isShowIcon': true, tooltip: '删除', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY', class: '' } },
tbitem16: { name: 'tbitem16', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem3: { name: 'tbitem3', caption: '导出', 'isShowCaption': true, 'isShowIcon': true, tooltip: '导出', iconcls: 'fa fa-file-excel-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ExportExcel', target: '' }, MaxRowCount: 1000, class: '' },
tbitem17: { name: 'tbitem17', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem20: { name: 'tbitem20', caption: '其它', disabled: false, type: 'ITEMS', visabled: true, dataaccaction: '',
model: {
tbitem24: { name: 'tbitem24', caption: '导出数据模型', 'isShowCaption': true, 'isShowIcon': true, tooltip: '导出数据模型', iconcls: 'fa fa-download', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ExportModel', target: '', class: '' } },
tbitem25: { name: 'tbitem25', caption: '数据导入', 'isShowCaption': true, 'isShowIcon': true, tooltip: '数据导入', iconcls: 'fa fa-upload', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Import', target: '', class: '' } },
}
},
tbitem21: { name: 'tbitem21', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem10: { name: 'tbitem10', caption: '过滤', 'isShowCaption': true, 'isShowIcon': true, tooltip: '过滤', iconcls: 'fa fa-filter', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ToggleFilter', target: '', class: '' } },
tbitem4: { name: 'tbitem4', caption: '帮助', 'isShowCaption': true, 'isShowIcon': true, tooltip: '帮助', iconcls: 'fa fa-question', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Help', target: '', class: '' } },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'edea4ef4e4810cea28340d5636e6e28d';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof EAMServiceLevelGridViewBase
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof EAMServiceLevelGridViewBase
*/
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: 'eamservicelevel',
majorPSDEField: 'eamservicelevelname',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMServiceLevelGridViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem2')) {
this.toolbar_tbitem2_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem11')) {
this.toolbar_tbitem11_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem1')) {
this.toolbar_tbitem1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem9')) {
this.toolbar_tbitem9_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem6')) {
this.toolbar_tbitem6_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem7')) {
this.toolbar_tbitem7_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem24')) {
this.toolbar_tbitem24_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem25')) {
this.toolbar_tbitem25_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem10')) {
this.toolbar_tbitem10_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMServiceLevelGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMServiceLevelGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMServiceLevelGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMServiceLevelGridViewBase
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMServiceLevelGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMServiceLevelGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMServiceLevelGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof EAMServiceLevelGridViewBase
*/
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,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @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,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem11_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.View(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @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,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem9_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem6_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @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,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @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,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @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,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem24_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportModel(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem25_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Import(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @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,"EAMServiceLevel");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem4_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Help(datas, contextJO,paramJO, $event, xData,this,"EAMServiceLevel");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMServiceLevelGridView
*/
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.eamservicelevel;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamservicelevels', parameterName: 'eamservicelevel' },
];
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: 'eamservice-level-edit-view',
height: 0,
width: 0,
title: this.$t('entities.eamservicelevel.views.editview.title'),
};
openPopupModal(view, data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof EAMServiceLevelGridView
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
const localContext: any = null;
const localViewParam: any =null;
const data: any = {};
let tempContext = JSON.parse(JSON.stringify(this.context));
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamservicelevels', parameterName: 'eamservicelevel' },
];
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: 'eamservice-level-edit-view',
height: 0,
width: 0,
title: this.$t('entities.eamservicelevel.views.editview.title'),
};
openPopupModal(view, data);
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMServiceLevelGridViewBase
*/
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 EAMServiceLevelGridViewBase
*/
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, { eamservicelevel: args[0].eamservicelevel })
}
_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 EAMServiceLevelGridViewBase
*/
public View(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { eamservicelevel: args[0].eamservicelevel })
}
_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 EAMServiceLevelGridViewBase
*/
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, { eamservicelevel: args[0].eamservicelevel });
}
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 EAMServiceLevelGridViewBase
*/
public ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData.actualIsOpenEdit = !xData.actualIsOpenEdit;
}
/**
* 新建行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMServiceLevelGridViewBase
*/
public NewRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
const data: any = {};
if (_this.hasOwnProperty('newRow') && _this.newRow instanceof Function) {
_this.newRow([{ ...data }], params, $event, xData);
} else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData);
}else{
_this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' });
}
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMServiceLevelGridViewBase
*/
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 EAMServiceLevelGridViewBase
*/
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 EAMServiceLevelGridViewBase
*/
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 EAMServiceLevelGridViewBase
*/
public ExportModel(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.$Notice.error({ title: '错误', desc: '导出数据模型未支持' });
}
/**
* 数据导入
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMServiceLevelGridViewBase
*/
public Import(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.importExcel instanceof Function) || !$event) {
return ;
}
xData.importExcel(params);
}
/**
* 过滤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMServiceLevelGridViewBase
*/
public ToggleFilter(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.hasOwnProperty('isExpandSearchForm')) {
_this.isExpandSearchForm = !_this.isExpandSearchForm;
}
}
/**
* 帮助
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof EAMServiceLevelGridViewBase
*/
public Help(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.$Notice.error({ title: '错误', desc: '帮助未支持' });
}
}
\ No newline at end of file
<studio-view-style2 viewName="eamservicelevelgridview" viewTitle="服务等级信息" class='degridview eamservice-level-grid-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" placeholder="服务等级名称" search @on-search="onSearch($event)"/>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<template slot="searchForm">
<view_searchform
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
@search="searchform_search($event)"
@load="searchform_load($event)"
@closeview="closeView($event)">
</view_searchform>
</template>
<view_grid
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:isSingleSelect="isGridSingleSelect"
:showBusyIndicator="true"
:isOpenEdit="false"
:gridRowActiveMode="gridRowActiveMode"
@save="onSave.apply(_self, arguments)"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
:newdata="newdata.bind(_self)"
:opendata="opendata.bind(_self)"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@remove="grid_remove($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</studio-view-style2>
\ No newline at end of file
<template src="./eamservice-level-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { EAMServiceLevelGridViewBase } from './eamservice-level-grid-view-base';
import view_grid from '@widgets/eamservice-level/main-grid/main-grid.vue';
import view_searchform from '@widgets/eamservice-level/default-searchform/default-searchform.vue';
/**
* 服务等级信息视图
*
* @export
* @class EAMServiceLevelGridView
* @extends {EAMServiceLevelGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class EAMServiceLevelGridView extends EAMServiceLevelGridViewBase { }
</script>
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
/**
* 服务等级服务对象基类
*
* @export
* @class EAMServiceLevelServiceBase
* @extends {EntityServie}
*/
export default class EAMServiceLevelServiceBase extends EntityService {
/**
* Creates an instance of EAMServiceLevelServiceBase.
*
* @param {*} [opts={}]
* @memberof EAMServiceLevelServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础数据
*
* @memberof EAMServiceLevelServiceBase
*/
public initBasicData(){
this.APPLYDEKEY ='eamservicelevel';
this.APPDEKEY = 'eamservicelevelid';
this.APPDENAME = 'eamservicelevels';
this.APPDETEXT = 'eamservicelevelname';
this.APPNAME = 'assetmanagement';
this.SYSTEMNAME = 'ibizassetmanagement';
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMServiceLevelServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/eamservicelevels/${context.eamservicelevel}/select`,isloading);
return res;
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMServiceLevelServiceBase
*/
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(`/eamservicelevels`,data,isloading);
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMServiceLevelServiceBase
*/
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(`/eamservicelevels/${context.eamservicelevel}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMServiceLevelServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/eamservicelevels/${context.eamservicelevel}`,isloading);
return res;
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMServiceLevelServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamservicelevels/${context.eamservicelevel}`,isloading);
return res;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMServiceLevelServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/eamservicelevels/getdraft`,isloading);
res.data.eamservicelevel = data.eamservicelevel;
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMServiceLevelServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/eamservicelevels/${context.eamservicelevel}/checkkey`,data,isloading);
return res;
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMServiceLevelServiceBase
*/
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(`/eamservicelevels/${context.eamservicelevel}/save`,data,isloading);
return res;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EAMServiceLevelServiceBase
*/
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(`/eamservicelevels/fetchdefault`,tempData,isloading);
return res;
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import EAMServiceLevelServiceBase from './eamservice-level-service-base';
/**
* 服务等级服务对象
*
* @export
* @class EAMServiceLevelService
* @extends {EAMServiceLevelServiceBase}
*/
export default class EAMServiceLevelService extends EAMServiceLevelServiceBase {
/**
* Creates an instance of EAMServiceLevelService.
*
* @param {*} [opts={}]
* @memberof EAMServiceLevelService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -48,6 +48,7 @@ export class EntityServiceRegister {
this.allEntityService.set('eamassetstatemodelline', () => import('@/service/eamasset-state-model-line/eamasset-state-model-line-service'));
this.allEntityService.set('eamapplytype', () => import('@/service/eamapply-type/eamapply-type-service'));
this.allEntityService.set('eamproduct', () => import('@/service/eamproduct/eamproduct-service'));
this.allEntityService.set('eamservicelevel', () => import('@/service/eamservice-level/eamservice-level-service'));
this.allEntityService.set('eamsparepartspro', () => import('@/service/eamspare-parts-pro/eamspare-parts-pro-service'));
this.allEntityService.set('eamapplystatemodelline', () => import('@/service/eamapply-state-model-line/eamapply-state-model-line-service'));
this.allEntityService.set('eamsparepartsgroup', () => import('@/service/eamspare-parts-group/eamspare-parts-group-service'));
......
......@@ -76,6 +76,15 @@ export const viewstate: any = {
'2b28313d0f3925fa44b8683eb5ea54d6',
],
},
{
viewtag: '1d768bbdaf3091c5d7131992a8ec7412',
viewmodule: 'Apply',
viewname: 'EAMApplyTypeEditView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '21edc7e27023f06aac51f150f3fb1f10',
viewmodule: 'Location',
......@@ -498,6 +507,25 @@ export const viewstate: any = {
'2b28313d0f3925fa44b8683eb5ea54d6',
],
},
{
viewtag: 'ca41431df21901bec3c62db4097e36d4',
viewmodule: 'WorkOrder',
viewname: 'EAMServiceLevelEditView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: 'ca66d81a69c0f084e3f7cf1e99ae9d28',
viewmodule: 'Apply',
viewname: 'EAMApplyTypeGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'1d768bbdaf3091c5d7131992a8ec7412',
],
},
{
viewtag: 'cc29cbcb0398aa069d4b05f3469f0377',
viewmodule: 'Location',
......@@ -548,6 +576,7 @@ export const viewstate: any = {
viewdatachange: false,
refviews: [
'b97ed65fd88f536ebb13419938b19e2d',
'ca66d81a69c0f084e3f7cf1e99ae9d28',
'00fcbd6336b5d40a31a2c3d5c346d16c',
'30027967566375f388f110149cf48b49',
'135343573fd869053d84ecc2f48ffd49',
......@@ -556,6 +585,7 @@ export const viewstate: any = {
'a3d6a9a21765dd59afa2d3d20a99096c',
'9e9b3600ba892d31757bacef1dcc9458',
'075e8b706da4cd2328cf2239fd6f4d06',
'edea4ef4e4810cea28340d5636e6e28d',
],
},
{
......@@ -619,6 +649,16 @@ export const viewstate: any = {
'3d676a12800fca23bec463d5c5217413',
],
},
{
viewtag: 'edea4ef4e4810cea28340d5636e6e28d',
viewmodule: 'WorkOrder',
viewname: 'EAMServiceLevelGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'ca41431df21901bec3c62db4097e36d4',
],
},
{
viewtag: 'eee617336f6dc6e5e97835d6309fd452',
viewmodule: 'Location',
......
......@@ -89,6 +89,8 @@ export default class EAMApplyTypeUIServiceBase extends UIService {
* @memberof EAMApplyTypeUIServiceBase
*/
public initViewMap(){
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'eamapplytypes'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'eamapplytypes'});
}
/**
......
import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import EAMServiceLevelService from '@/service/eamservice-level/eamservice-level-service';
import EAMServiceLevelAuthService from '@/authservice/eamservice-level/eamservice-level-auth-service';
/**
* 服务等级UI服务对象基类
*
* @export
* @class EAMServiceLevelUIServiceBase
*/
export default class EAMServiceLevelUIServiceBase extends UIService {
/**
* 是否支持工作流
*
* @memberof EAMServiceLevelUIServiceBase
*/
public isEnableWorkflow:boolean = false;
/**
* 当前UI服务对应的数据服务对象
*
* @memberof EAMServiceLevelUIServiceBase
*/
public dataService:EAMServiceLevelService = new EAMServiceLevelService();
/**
* 所有关联视图
*
* @memberof EAMServiceLevelUIServiceBase
*/
public allViewMap: Map<string, Object> = new Map();
/**
* 状态值
*
* @memberof EAMServiceLevelUIServiceBase
*/
public stateValue: number = 0;
/**
* 状态属性
*
* @memberof EAMServiceLevelUIServiceBase
*/
public stateField: string = "";
/**
* 主状态属性集合
*
* @memberof EAMServiceLevelUIServiceBase
*/
public mainStateFields:Array<any> = [];
/**
* 主状态集合Map
*
* @memberof EAMServiceLevelUIServiceBase
*/
public allDeMainStateMap:Map<string,string> = new Map();
/**
* 主状态操作标识Map
*
* @memberof EAMServiceLevelUIServiceBase
*/
public allDeMainStateOPPrivsMap:Map<string,any> = new Map();
/**
* Creates an instance of EAMServiceLevelUIServiceBase.
*
* @param {*} [opts={}]
* @memberof EAMServiceLevelUIServiceBase
*/
constructor(opts: any = {}) {
super(opts);
this.authService = new EAMServiceLevelAuthService(opts);
this.initViewMap();
this.initDeMainStateMap();
this.initDeMainStateOPPrivsMap();
}
/**
* 初始化视图Map
*
* @memberof EAMServiceLevelUIServiceBase
*/
public initViewMap(){
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'eamservicelevels'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'eamservicelevels'});
}
/**
* 初始化主状态集合
*
* @memberof EAMServiceLevelUIServiceBase
*/
public initDeMainStateMap(){
}
/**
* 初始化主状态操作标识
*
* @memberof EAMServiceLevelUIServiceBase
*/
public initDeMainStateOPPrivsMap(){
}
/**
* 获取指定数据的重定向页面
*
* @param srfkey 数据主键
* @param isEnableWorkflow 重定向视图是否需要处理流程中的数据
* @memberof EAMServiceLevelUIServiceBase
*/
public async getRDAppView(srfkey:string,isEnableWorkflow:boolean){
this.isEnableWorkflow = isEnableWorkflow;
// 进行数据查询
let result:any = await this.dataService.Get({eamservicelevel: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 EAMServiceLevelUIServiceBase
*/
public getRealDEType(entity:any){
}
/**
* 获取实体单数据实体视图预定义参数
*
* @param curData 当前数据
* @param bDataInWF 是否有数据在工作流中
* @param bWFMode 是否工作流模式
* @memberof EAMServiceLevelUIServiceBase
*/
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 EAMServiceLevelUIServiceBase
*/
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 EAMServiceLevelUIServiceBase
*/
public getDEMainStateOPPrivs(data:any){
if(this.getDEMainStateTag(data)){
return this.allDeMainStateOPPrivsMap.get((this.getDEMainStateTag(data) as string));
}else{
return null;
}
}
/**
* 获取数据对象所有的操作标识
*
* @param data 当前数据
* @memberof EAMServiceLevelUIServiceBase
*/
public getAllOPPrivs(data:any){
return this.authService.getOPPrivs(this.getDEMainStateOPPrivs(data));
}
}
\ No newline at end of file
import EAMServiceLevelUIServiceBase from './eamservice-level-ui-service-base';
/**
* 服务等级UI服务对象
*
* @export
* @class EAMServiceLevelUIService
*/
export default class EAMServiceLevelUIService extends EAMServiceLevelUIServiceBase {
/**
* Creates an instance of EAMServiceLevelUIService.
*
* @param {*} [opts={}]
* @memberof EAMServiceLevelUIService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -48,6 +48,7 @@ export class UIServiceRegister {
this.allUIService.set('eamassetstatemodelline', () => import('@/uiservice/eamasset-state-model-line/eamasset-state-model-line-ui-service'));
this.allUIService.set('eamapplytype', () => import('@/uiservice/eamapply-type/eamapply-type-ui-service'));
this.allUIService.set('eamproduct', () => import('@/uiservice/eamproduct/eamproduct-ui-service'));
this.allUIService.set('eamservicelevel', () => import('@/uiservice/eamservice-level/eamservice-level-ui-service'));
this.allUIService.set('eamsparepartspro', () => import('@/uiservice/eamspare-parts-pro/eamspare-parts-pro-ui-service'));
this.allUIService.set('eamapplystatemodelline', () => import('@/uiservice/eamapply-state-model-line/eamapply-state-model-line-ui-service'));
this.allUIService.set('eamsparepartsgroup', () => import('@/uiservice/eamspare-parts-group/eamspare-parts-group-ui-service'));
......
......@@ -15,24 +15,28 @@ export class AppIndexViewBase extends Vue {
if (item) {
let judge = true;
switch (item.appfunctag) {
case '_9':
this.click_9(item); break;
case '_8':
this.click_8(item); break;
case '_10':
this.click_10(item); break;
case '_5':
this.click_5(item); break;
case '_2':
this.click_2(item); break;
case '_9':
this.click_9(item); break;
case '_11':
this.click_11(item); break;
case '_6':
this.click_6(item); break;
case '_2':
this.click_2(item); break;
case '_7':
this.click_7(item); break;
case '_8':
this.click_8(item); break;
case '_3':
this.click_3(item); break;
case '_5':
this.click_5(item); break;
case '_4':
this.click_4(item); break;
case '_12':
this.click_12(item); break;
default:
judge = false;
console.warn('未指定应用功能');
......@@ -49,7 +53,7 @@ export class AppIndexViewBase extends Vue {
* @param {*} [item={}]
* @memberof AppIndexView
*/
public click_9(item: any = {}) {
public click_10(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
......@@ -72,7 +76,7 @@ export class AppIndexViewBase extends Vue {
* @param {*} [item={}]
* @memberof AppIndexView
*/
public click_8(item: any = {}) {
public click_9(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
......@@ -95,7 +99,7 @@ export class AppIndexViewBase extends Vue {
* @param {*} [item={}]
* @memberof AppIndexView
*/
public click_10(item: any = {}) {
public click_11(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
......@@ -118,7 +122,7 @@ export class AppIndexViewBase extends Vue {
* @param {*} [item={}]
* @memberof AppIndexView
*/
public click_5(item: any = {}) {
public click_6(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
......@@ -164,7 +168,7 @@ export class AppIndexViewBase extends Vue {
* @param {*} [item={}]
* @memberof AppIndexView
*/
public click_6(item: any = {}) {
public click_7(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
......@@ -187,7 +191,7 @@ export class AppIndexViewBase extends Vue {
* @param {*} [item={}]
* @memberof AppIndexView
*/
public click_7(item: any = {}) {
public click_8(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
......@@ -233,7 +237,7 @@ export class AppIndexViewBase extends Vue {
* @param {*} [item={}]
* @memberof AppIndexView
*/
public click_4(item: any = {}) {
public click_5(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
......@@ -249,6 +253,52 @@ export class AppIndexViewBase extends Vue {
this.$router.push(path);
})
}
/**
* 维护申请类型
*
* @param {*} [item={}]
* @memberof AppIndexView
*/
public click_4(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamapplytypes', parameterName: 'eamapplytype' },
{ pathName: 'gridview', parameterName: 'gridview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
this.$router.push(path);
})
}
/**
* 服务等级
*
* @param {*} [item={}]
* @memberof AppIndexView
*/
public click_12(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'eamservicelevels', parameterName: 'eamservicelevel' },
{ pathName: 'gridview', parameterName: 'gridview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
this.$router.push(path);
})
}
/**
* 绘制内容
......
......@@ -52,6 +52,71 @@ export default class AppIndexViewModel {
textcls: '',
appfunctag: '',
resourcetag: '',
items: [
{
id: '72EF9A96-DED9-4262-8219-3212E7A332B6',
name: 'menuitem15',
text: '系统设置',
type: 'MENUITEM',
counterid: '',
tooltip: '系统设置',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: 'fa fa-cog',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
items: [
{
id: '0F6F0CEA-5965-4D70-AD5E-F149819CAA76',
name: 'menuitem16',
text: '服务等级',
type: 'MENUITEM',
counterid: '',
tooltip: '服务等级',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: 'fa fa-server',
icon: '',
textcls: '',
appfunctag: '_12',
appfuncyype: 'APPVIEW',
viewname: 'eamservice-level-grid-view',
resourcetag: '',
}
,
{
id: '7C4D180A-5AC9-451E-A7BE-969707F6E5E9',
name: 'menuitem17',
text: '维护申请类型',
type: 'MENUITEM',
counterid: '',
tooltip: '维护申请类型',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: 'fa fa-legal',
icon: '',
textcls: '',
appfunctag: '_4',
appfuncyype: 'APPVIEW',
viewname: 'eamapply-type-grid-view',
resourcetag: '',
}
,
],
}
,
],
}
,
{
......@@ -105,7 +170,7 @@ export default class AppIndexViewModel {
iconcls: 'fa fa-life-ring',
icon: '',
textcls: '',
appfunctag: '_6',
appfunctag: '_7',
appfuncyype: 'APPVIEW',
viewname: 'eamlocation-state-list-exp-view',
resourcetag: '',
......@@ -126,7 +191,7 @@ export default class AppIndexViewModel {
iconcls: 'fa fa-cube',
icon: '',
textcls: '',
appfunctag: '_5',
appfunctag: '_6',
appfuncyype: 'APPVIEW',
viewname: 'eamlocation-state-model-grid-view',
resourcetag: '',
......@@ -147,7 +212,7 @@ export default class AppIndexViewModel {
iconcls: 'fa fa-legal',
icon: '',
textcls: '',
appfunctag: '_7',
appfunctag: '_8',
appfuncyype: 'APPVIEW',
viewname: 'eamlocation-type-grid-view',
resourcetag: '',
......@@ -168,7 +233,7 @@ export default class AppIndexViewModel {
iconcls: 'fa fa-navicon',
icon: '',
textcls: '',
appfunctag: '_10',
appfunctag: '_11',
appfuncyype: 'APPVIEW',
viewname: 'eamlocation-tree-exp-view',
resourcetag: '',
......@@ -252,7 +317,7 @@ export default class AppIndexViewModel {
iconcls: 'fa fa-legal',
icon: '',
textcls: '',
appfunctag: '_9',
appfunctag: '_10',
appfuncyype: 'APPVIEW',
viewname: 'eamasset-type-grid-view',
resourcetag: '',
......@@ -273,7 +338,7 @@ export default class AppIndexViewModel {
iconcls: 'fa fa-rocket',
icon: '',
textcls: '',
appfunctag: '_8',
appfunctag: '_9',
appfuncyype: 'APPVIEW',
viewname: 'eamasset-tree-exp-view',
resourcetag: '',
......@@ -294,7 +359,7 @@ export default class AppIndexViewModel {
iconcls: 'fa fa-instagram',
icon: '',
textcls: '',
appfunctag: '_4',
appfunctag: '_5',
appfuncyype: 'APPVIEW',
viewname: 'eamspare-parts-group-grid-view',
resourcetag: '',
......@@ -374,7 +439,7 @@ export default class AppIndexViewModel {
*/
private funcs: any[] = [
{
appfunctag: '_9',
appfunctag: '_10',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'eamassettypegridview',
......@@ -386,7 +451,7 @@ export default class AppIndexViewModel {
],
},
{
appfunctag: '_8',
appfunctag: '_9',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'eamassettreeexpview',
......@@ -398,7 +463,7 @@ export default class AppIndexViewModel {
],
},
{
appfunctag: '_10',
appfunctag: '_11',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'eamlocationtreeexpview',
......@@ -410,7 +475,7 @@ export default class AppIndexViewModel {
],
},
{
appfunctag: '_5',
appfunctag: '_6',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'eamlocationstatemodelgridview',
......@@ -434,7 +499,7 @@ export default class AppIndexViewModel {
],
},
{
appfunctag: '_6',
appfunctag: '_7',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'eamlocationstatelistexpview',
......@@ -446,7 +511,7 @@ export default class AppIndexViewModel {
],
},
{
appfunctag: '_7',
appfunctag: '_8',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'eamlocationtypegridview',
......@@ -470,7 +535,7 @@ export default class AppIndexViewModel {
],
},
{
appfunctag: '_4',
appfunctag: '_5',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'eamsparepartsgroupgridview',
......@@ -481,6 +546,30 @@ export default class AppIndexViewModel {
{ pathName: 'gridview', parameterName: 'gridview' },
],
},
{
appfunctag: '_4',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'eamapplytypegridview',
deResParameters: [],
routepath: '/appindexview/:appindexview?/eamapplytypes/:eamapplytype?/gridview/:gridview?',
parameters: [
{ pathName: 'eamapplytypes', parameterName: 'eamapplytype' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
},
{
appfunctag: '_12',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'eamservicelevelgridview',
deResParameters: [],
routepath: '/appindexview/:appindexview?/eamservicelevels/:eamservicelevel?/gridview/:gridview?',
parameters: [
{ pathName: 'eamservicelevels', parameterName: 'eamservicelevel' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
},
];
/**
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, SearchFormControlBase } from '@/studio-core';
import EAMApplyTypeService from '@/service/eamapply-type/eamapply-type-service';
import DefaultService from './default-searchform-service';
import EAMApplyTypeUIService from '@/uiservice/eamapply-type/eamapply-type-ui-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
/**
* searchform部件基类
*
* @export
* @class SearchFormControlBase
* @extends {DefaultSearchFormBase}
*/
export class DefaultSearchFormBase extends SearchFormControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected controlType: string = 'SEARCHFORM';
/**
* 建构部件服务对象
*
* @type {DefaultService}
* @memberof DefaultSearchFormBase
*/
public service: DefaultService = new DefaultService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMApplyTypeService}
* @memberof DefaultSearchFormBase
*/
public appEntityService: EAMApplyTypeService = new EAMApplyTypeService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected appDeName: string = 'eamapplytype';
/**
* 表单数据对象
*
* @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 EAMApplyTypeService from '@/service/eamapply-type/eamapply-type-service';
import DefaultModel from './default-searchform-model';
/**
* Default 部件服务对象
*
* @export
* @class DefaultService
*/
export default class DefaultService extends ControlService {
/**
* 维护申请类型服务对象
*
* @type {EAMApplyTypeService}
* @memberof DefaultService
*/
public appEntityService: EAMApplyTypeService = new EAMApplyTypeService({ $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 EAMApplyTypeService from '@/service/eamapply-type/eamapply-type-service';
import MainService from './main-form-service';
import EAMApplyTypeUIService from '@/uiservice/eamapply-type/eamapply-type-ui-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
/**
* form部件基类
*
* @export
* @class EditFormControlBase
* @extends {MainEditFormBase}
*/
export class MainEditFormBase extends EditFormControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof MainEditFormBase
*/
protected controlType: string = 'FORM';
/**
* 建构部件服务对象
*
* @type {MainService}
* @memberof MainEditFormBase
*/
public service: MainService = new MainService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMApplyTypeService}
* @memberof MainEditFormBase
*/
public appEntityService: EAMApplyTypeService = new EAMApplyTypeService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainEditFormBase
*/
protected appDeName: string = 'eamapplytype';
/**
* 界面UI服务对象
*
* @type {EAMApplyTypeUIService}
* @memberof MainEditFormBase
*/
public appUIService:EAMApplyTypeUIService = new EAMApplyTypeUIService(this.$store);
/**
* 表单数据对象
*
* @type {*}
* @memberof MainEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
eamapplytypeid: null,
eamapplytypename: null,
description: null,
eamapplytype:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof MainEditFormBase
*/
public rules: any = {
eamapplytypename: [
{ 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: false, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.eamapplytype.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 }),
eamapplytypeid: new FormItemModel({ caption: '维护申请类型标识', detailType: 'FORMITEM', name: 'eamapplytypeid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamapplytypename: new FormItemModel({ caption: '维护申请类型名称', detailType: 'FORMITEM', name: 'eamapplytypename', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
description: new FormItemModel({ caption: '描述', detailType: 'FORMITEM', name: 'description', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
};
}
\ 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: 'eamapplytypeid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'eamapplytypename',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'eamapplytypeid',
prop: 'eamapplytypeid',
dataType: 'GUID',
},
{
name: 'eamapplytypename',
prop: 'eamapplytypename',
dataType: 'TEXT',
},
{
name: 'description',
prop: 'description',
dataType: 'LONGTEXT_1000',
},
{
name: 'eamapplytype',
prop: 'eamapplytypeid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import EAMApplyTypeService from '@/service/eamapply-type/eamapply-type-service';
import MainModel from './main-form-model';
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export default class MainService extends ControlService {
/**
* 维护申请类型服务对象
*
* @type {EAMApplyTypeService}
* @memberof MainService
*/
public appEntityService: EAMApplyTypeService = new EAMApplyTypeService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof MainService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of MainService.
*
* @param {*} [opts={}]
* @memberof MainService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new MainModel();
}
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof MainService
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof MainService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
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 MainService
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
Object.assign(Data,{eamapplytypeid: data.eamapplytypeid, srffrontuf: '1'});
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.eamapplytypeid = PrimaryKey;
Data.eamapplytype = 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.eamapplytypeid = 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='eamapplytype_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.eamapplytype.main_form.details.group1')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.group1" :data="data" :context="context" :viewparams="viewparams"/>
<row>
<i-col class="form-layout-container" v-show="detailsModel.eamapplytypeid.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamapplytypeid' :itemRules="this.rules.eamapplytypeid" class='' :caption="$t('entities.eamapplytype.main_form.details.eamapplytypeid')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamapplytypeid.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.eamapplytypeid"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.eamapplytypeid.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.eamapplytypename.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamapplytypename' :itemRules="this.rules.eamapplytypename" class='' :caption="$t('entities.eamapplytype.main_form.details.eamapplytypename')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamapplytypename.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.eamapplytypename"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.eamapplytypename.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.description.visible" :style="{}" :md="{ span: 24, offset: 0 }" :lg="{ span: 24, offset: 0 }" :xl="{ span: 24, offset: 0 }">
<app-form-item name='description' :itemRules="this.rules.description" class='' :caption="$t('entities.eamapplytype.main_form.details.description')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.description.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.description" :textareaId="this.$util.createUUID()" :disabled="detailsModel.description.disabled" type='textarea' textareaStyle="height:200px;" ></input-box>
</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 EAMApplyTypeService from '@/service/eamapply-type/eamapply-type-service';
import MainService from './main-grid-service';
import EAMApplyTypeUIService from '@/uiservice/eamapply-type/eamapply-type-ui-service';
import { FormItemModel } from '@/model/form-detail';
/**
* grid部件基类
*
* @export
* @class GridControlBase
* @extends {MainGridBase}
*/
export class MainGridBase extends GridControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof MainGridBase
*/
protected controlType: string = 'GRID';
/**
* 建构部件服务对象
*
* @type {MainService}
* @memberof MainGridBase
*/
public service: MainService = new MainService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {EAMApplyTypeService}
* @memberof MainGridBase
*/
public appEntityService: EAMApplyTypeService = new EAMApplyTypeService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainGridBase
*/
protected appDeName: string = 'eamapplytype';
/**
* 界面UI服务对象
*
* @type {EAMApplyTypeUIService}
* @memberof MainBase
*/
public appUIService:EAMApplyTypeUIService = new EAMApplyTypeUIService(this.$store);
/**
* 界面行为模型
*
* @type {*}
* @memberof MainBase
*/
public ActionModel: any = {
};
/**
* 本地缓存标识
*
* @protected
* @type {string}
* @memberof MainBase
*/
protected localStorageTag: string = 'eamapplytype_main_grid';
/**
* 所有列成员
*
* @type {any[]}
* @memberof MainGridBase
*/
public allColumns: any[] = [
{
name: 'eamapplytypeid',
label: '维护申请类型标识',
langtag: 'entities.eamapplytype.main_grid.columns.eamapplytypeid',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamapplytypename',
label: '维护申请类型名称',
langtag: 'entities.eamapplytype.main_grid.columns.eamapplytypename',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'description',
label: '描述',
langtag: 'entities.eamapplytype.main_grid.columns.description',
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 = {
'eamapplytypeid':false,
'eamapplytypename':false,
'description':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: 'description',
prop: 'description',
dataType: 'LONGTEXT_1000',
},
{
name: 'eamapplystatemodelid',
prop: 'eamapplystatemodelid',
dataType: 'PICKUP',
},
{
name: 'eamapplytypename',
prop: 'eamapplytypename',
dataType: 'TEXT',
},
{
name: 'srfmajortext',
prop: 'eamapplytypename',
dataType: 'TEXT',
},
{
name: 'srfdataaccaction',
prop: 'eamapplytypeid',
dataType: 'GUID',
},
{
name: 'srfkey',
prop: 'eamapplytypeid',
dataType: 'GUID',
isEditable:true
},
{
name: 'eamapplytypeid',
prop: 'eamapplytypeid',
dataType: 'GUID',
},
{
name: 'eamapplytype',
prop: 'eamapplytypeid',
},
{
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 EAMApplyTypeService from '@/service/eamapply-type/eamapply-type-service';
import MainModel from './main-grid-model';
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export default class MainService extends ControlService {
/**
* 维护申请类型服务对象
*
* @type {EAMApplyTypeService}
* @memberof MainService
*/
public appEntityService: EAMApplyTypeService = new EAMApplyTypeService({ $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.eamapplytypeid = 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('eamapplytypeid')">
<el-table-column show-overflow-tooltip :prop="'eamapplytypeid'" :label="$t('entities.eamapplytype.main_grid.columns.eamapplytypeid')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamapplytype.main_grid.columns.eamapplytypeid')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamapplytypeid}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamapplytypename')">
<el-table-column show-overflow-tooltip :prop="'eamapplytypename'" :label="$t('entities.eamapplytype.main_grid.columns.eamapplytypename')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamapplytype.main_grid.columns.eamapplytypename')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamapplytypename}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('description')">
<el-table-column show-overflow-tooltip :prop="'description'" :label="$t('entities.eamapplytype.main_grid.columns.description')" :width="300" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamapplytype.main_grid.columns.description')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.description}}</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>
......@@ -39,6 +39,9 @@ export default class PickupViewpickupviewpanelModel {
{
name: 'eamlocationstatemodelname',
},
{
name: 'description',
},
]
}
......
......@@ -54,6 +54,9 @@ export default class InfoViewtabexppanelModel {
{
name: 'locationnumber',
},
{
name: 'description',
},
]
}
......
......@@ -54,6 +54,9 @@ export default class InfoViewtabviewpanelModel {
{
name: 'locationnumber',
},
{
name: 'description',
},
]
}
......
......@@ -54,6 +54,9 @@ export default class InfoViewtabviewpanel2Model {
{
name: 'locationnumber',
},
{
name: 'description',
},
]
}
......
......@@ -54,6 +54,9 @@ export default class InfoViewtabviewpanel3Model {
{
name: 'locationnumber',
},
{
name: 'description',
},
]
}
......
......@@ -54,6 +54,9 @@ export default class LocationAssetTreeModel {
{
name: 'locationnumber',
},
{
name: 'description',
},
]
}
......
......@@ -54,6 +54,9 @@ export default class LocationTreeModel {
{
name: 'locationnumber',
},
{
name: 'description',
},
]
}
......
......@@ -54,6 +54,9 @@ export default class MainInfoModel {
{
name: 'locationnumber',
},
{
name: 'description',
},
]
}
......
......@@ -54,6 +54,9 @@ export default class PickupViewpickupviewpanelModel {
{
name: 'locationnumber',
},
{
name: 'description',
},
]
}
......
......@@ -54,6 +54,9 @@ export default class TreeExpViewtreeexpbarModel {
{
name: 'locationnumber',
},
{
name: 'description',
},
]
}
......
......@@ -54,6 +54,9 @@ export default class View_MainInfoModel {
{
name: 'locationnumber',
},
{
name: 'description',
},
]
}
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, SearchFormControlBase } from '@/studio-core';
import EAMServiceLevelService from '@/service/eamservice-level/eamservice-level-service';
import DefaultService from './default-searchform-service';
import EAMServiceLevelUIService from '@/uiservice/eamservice-level/eamservice-level-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 {EAMServiceLevelService}
* @memberof DefaultSearchFormBase
*/
public appEntityService: EAMServiceLevelService = new EAMServiceLevelService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected appDeName: string = 'eamservicelevel';
/**
* 表单数据对象
*
* @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 EAMServiceLevelService from '@/service/eamservice-level/eamservice-level-service';
import DefaultModel from './default-searchform-model';
/**
* Default 部件服务对象
*
* @export
* @class DefaultService
*/
export default class DefaultService extends ControlService {
/**
* 服务等级服务对象
*
* @type {EAMServiceLevelService}
* @memberof DefaultService
*/
public appEntityService: EAMServiceLevelService = new EAMServiceLevelService({ $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 EAMServiceLevelService from '@/service/eamservice-level/eamservice-level-service';
import MainService from './main-form-service';
import EAMServiceLevelUIService from '@/uiservice/eamservice-level/eamservice-level-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 {EAMServiceLevelService}
* @memberof MainEditFormBase
*/
public appEntityService: EAMServiceLevelService = new EAMServiceLevelService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainEditFormBase
*/
protected appDeName: string = 'eamservicelevel';
/**
* 界面UI服务对象
*
* @type {EAMServiceLevelUIService}
* @memberof MainEditFormBase
*/
public appUIService:EAMServiceLevelUIService = new EAMServiceLevelUIService(this.$store);
/**
* 表单数据对象
*
* @type {*}
* @memberof MainEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
eamservicelevelid: null,
eamservicelevelname: null,
description: null,
eamservicelevel:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof MainEditFormBase
*/
public rules: any = {
eamservicelevelname: [
{ 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: false, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.eamservicelevel.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 }),
eamservicelevelid: new FormItemModel({ caption: '服务等级标识', detailType: 'FORMITEM', name: 'eamservicelevelid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
eamservicelevelname: new FormItemModel({ caption: '服务等级名称', detailType: 'FORMITEM', name: 'eamservicelevelname', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
description: new FormItemModel({ caption: '描述', detailType: 'FORMITEM', name: 'description', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
};
}
\ 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: 'eamservicelevelid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'eamservicelevelname',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'eamservicelevelid',
prop: 'eamservicelevelid',
dataType: 'GUID',
},
{
name: 'eamservicelevelname',
prop: 'eamservicelevelname',
dataType: 'TEXT',
},
{
name: 'description',
prop: 'description',
dataType: 'LONGTEXT_1000',
},
{
name: 'eamservicelevel',
prop: 'eamservicelevelid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import EAMServiceLevelService from '@/service/eamservice-level/eamservice-level-service';
import MainModel from './main-form-model';
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export default class MainService extends ControlService {
/**
* 服务等级服务对象
*
* @type {EAMServiceLevelService}
* @memberof MainService
*/
public appEntityService: EAMServiceLevelService = new EAMServiceLevelService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof MainService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of MainService.
*
* @param {*} [opts={}]
* @memberof MainService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new MainModel();
}
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof MainService
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof MainService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
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 MainService
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
Object.assign(Data,{eamservicelevelid: data.eamservicelevelid, srffrontuf: '1'});
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.eamservicelevelid = PrimaryKey;
Data.eamservicelevel = 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.eamservicelevelid = 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='eamservicelevel_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.eamservicelevel.main_form.details.group1')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.group1" :data="data" :context="context" :viewparams="viewparams"/>
<row>
<i-col class="form-layout-container" v-show="detailsModel.eamservicelevelid.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamservicelevelid' :itemRules="this.rules.eamservicelevelid" class='' :caption="$t('entities.eamservicelevel.main_form.details.eamservicelevelid')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamservicelevelid.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.eamservicelevelid"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.eamservicelevelid.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.eamservicelevelname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='eamservicelevelname' :itemRules="this.rules.eamservicelevelname" class='' :caption="$t('entities.eamservicelevel.main_form.details.eamservicelevelname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.eamservicelevelname.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.eamservicelevelname"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.eamservicelevelname.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.description.visible" :style="{}" :md="{ span: 24, offset: 0 }" :lg="{ span: 24, offset: 0 }" :xl="{ span: 24, offset: 0 }">
<app-form-item name='description' :itemRules="this.rules.description" class='' :caption="$t('entities.eamservicelevel.main_form.details.description')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.description.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.description" :textareaId="this.$util.createUUID()" :disabled="detailsModel.description.disabled" type='textarea' textareaStyle="height:200px;" ></input-box>
</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 EAMServiceLevelService from '@/service/eamservice-level/eamservice-level-service';
import MainService from './main-grid-service';
import EAMServiceLevelUIService from '@/uiservice/eamservice-level/eamservice-level-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 {EAMServiceLevelService}
* @memberof MainGridBase
*/
public appEntityService: EAMServiceLevelService = new EAMServiceLevelService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainGridBase
*/
protected appDeName: string = 'eamservicelevel';
/**
* 界面UI服务对象
*
* @type {EAMServiceLevelUIService}
* @memberof MainBase
*/
public appUIService:EAMServiceLevelUIService = new EAMServiceLevelUIService(this.$store);
/**
* 界面行为模型
*
* @type {*}
* @memberof MainBase
*/
public ActionModel: any = {
};
/**
* 本地缓存标识
*
* @protected
* @type {string}
* @memberof MainBase
*/
protected localStorageTag: string = 'eamservicelevel_main_grid';
/**
* 所有列成员
*
* @type {any[]}
* @memberof MainGridBase
*/
public allColumns: any[] = [
{
name: 'eamservicelevelid',
label: '服务等级标识',
langtag: 'entities.eamservicelevel.main_grid.columns.eamservicelevelid',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'eamservicelevelname',
label: '服务等级名称',
langtag: 'entities.eamservicelevel.main_grid.columns.eamservicelevelname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'description',
label: '描述',
langtag: 'entities.eamservicelevel.main_grid.columns.description',
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 = {
'eamservicelevelid':false,
'eamservicelevelname':false,
'description':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: 'eamservicelevelname',
prop: 'eamservicelevelname',
dataType: 'TEXT',
},
{
name: 'description',
prop: 'description',
dataType: 'LONGTEXT_1000',
},
{
name: 'eamservicelevelid',
prop: 'eamservicelevelid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'eamservicelevelname',
dataType: 'TEXT',
},
{
name: 'srfdataaccaction',
prop: 'eamservicelevelid',
dataType: 'GUID',
},
{
name: 'srfkey',
prop: 'eamservicelevelid',
dataType: 'GUID',
isEditable:true
},
{
name: 'eamservicelevel',
prop: 'eamservicelevelid',
},
{
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 EAMServiceLevelService from '@/service/eamservice-level/eamservice-level-service';
import MainModel from './main-grid-model';
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export default class MainService extends ControlService {
/**
* 服务等级服务对象
*
* @type {EAMServiceLevelService}
* @memberof MainService
*/
public appEntityService: EAMServiceLevelService = new EAMServiceLevelService({ $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.eamservicelevelid = 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('eamservicelevelid')">
<el-table-column show-overflow-tooltip :prop="'eamservicelevelid'" :label="$t('entities.eamservicelevel.main_grid.columns.eamservicelevelid')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamservicelevel.main_grid.columns.eamservicelevelid')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamservicelevelid}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('eamservicelevelname')">
<el-table-column show-overflow-tooltip :prop="'eamservicelevelname'" :label="$t('entities.eamservicelevel.main_grid.columns.eamservicelevelname')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamservicelevel.main_grid.columns.eamservicelevelname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.eamservicelevelname}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('description')">
<el-table-column show-overflow-tooltip :prop="'description'" :label="$t('entities.eamservicelevel.main_grid.columns.description')" :width="300" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.eamservicelevel.main_grid.columns.description')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.description}}</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>
......@@ -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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册