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

jackwang 部署微服务应用

上级 69092580
...@@ -36,6 +36,35 @@ ...@@ -36,6 +36,35 @@
} }
] ]
}, },
{
"srfkey": "CL_HR_004",
"emptytext": "未定义",
"codelisttype":"static",
"items": [
{
"id": "FULLTIME",
"label": "全职",
"text": "全职",
"data":"",
"codename":"Fulltime",
"value": "FULLTIME",
"disabled": false,
"default": false
}
, {
"id": "PARTTIME",
"label": "兼职",
"text": "兼职",
"data":"",
"codename":"Parttime",
"value": "PARTTIME",
"disabled": false,
"default": false
}
]
},
{ {
"srfkey": "CL_HR_0001", "srfkey": "CL_HR_0001",
"emptytext": "未定义", "emptytext": "未定义",
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
"memo": "" "memo": ""
}, },
"hromhierarchycatv_002": { "hromhierarchycatv_002": {
"title": "结构层次类别编辑视图", "title": "层次结构",
"caption": "结构层次类别", "caption": "结构层次类别",
"viewtype": "DEEDITVIEW", "viewtype": "DEEDITVIEW",
"viewmodule": "Base", "viewmodule": "Base",
...@@ -149,6 +149,26 @@ ...@@ -149,6 +149,26 @@
"viewtag": "3110aca6f6c27996e9874cfb924c569f", "viewtag": "3110aca6f6c27996e9874cfb924c569f",
"memo": "" "memo": ""
}, },
"hrpostv_003": {
"title": "失效职位",
"caption": "职位",
"viewtype": "DEGRIDVIEW",
"viewmodule": "HumanResource",
"viewname": "HRPostV_003",
"viewfilename": "hrpost-v-003",
"viewtag": "3274463a5fe4c1bcb99fee2240c044ed",
"memo": "系统自动添加"
},
"hrpostv_002": {
"title": "空缺职位",
"caption": "职位",
"viewtype": "DEGRIDVIEW",
"viewmodule": "HumanResource",
"viewname": "HRPostV_002",
"viewfilename": "hrpost-v-002",
"viewtag": "3b1d535a219b7256d7ada3a1a7f5120d",
"memo": "系统自动添加"
},
"hrlegalgridview": { "hrlegalgridview": {
"title": "法人", "title": "法人",
"caption": "法人", "caption": "法人",
...@@ -209,6 +229,16 @@ ...@@ -209,6 +229,16 @@
"viewtag": "7933350eca0f8dbcb5402928a860c4ec", "viewtag": "7933350eca0f8dbcb5402928a860c4ec",
"memo": "系统自动添加" "memo": "系统自动添加"
}, },
"hrposteditview": {
"title": "职位编辑视图",
"caption": "职位",
"viewtype": "DEEDITVIEW",
"viewmodule": "HumanResource",
"viewname": "HRPostEditView",
"viewfilename": "hrpost-edit-view",
"viewtag": "7ad274dc8cc9e8f7e464195ca0953dc3",
"memo": "系统自动添加"
},
"hromhierarchypickupgridview": { "hromhierarchypickupgridview": {
"title": "组织层次结构选择表格视图", "title": "组织层次结构选择表格视图",
"caption": "组织层次结构", "caption": "组织层次结构",
...@@ -279,6 +309,16 @@ ...@@ -279,6 +309,16 @@
"viewtag": "af1a0e288eecf89cd99ed798594e1753", "viewtag": "af1a0e288eecf89cd99ed798594e1753",
"memo": "" "memo": ""
}, },
"hrpostv_001": {
"title": "有效职位",
"caption": "职位",
"viewtype": "DEGRIDVIEW",
"viewmodule": "HumanResource",
"viewname": "HRPostV_001",
"viewfilename": "hrpost-v-001",
"viewtag": "b4b751d7088fd1c29aed976e9e9528b2",
"memo": "系统自动添加"
},
"hrorganizationeditview": { "hrorganizationeditview": {
"title": "组织编辑视图", "title": "组织编辑视图",
"caption": "组织", "caption": "组织",
...@@ -299,6 +339,16 @@ ...@@ -299,6 +339,16 @@
"viewtag": "b932c0eb66409c638c29ee27ba4fda37", "viewtag": "b932c0eb66409c638c29ee27ba4fda37",
"memo": "系统自动添加" "memo": "系统自动添加"
}, },
"hrposttabexpview": {
"title": "职位信息",
"caption": "职位信息",
"viewtype": "DETABEXPVIEW",
"viewmodule": "HumanResource",
"viewname": "HRPostTabExpView",
"viewfilename": "hrpost-tab-exp-view",
"viewtag": "bae1de77dc5bd2584e2dcf7201a06495",
"memo": ""
},
"hromhierarchytreeexpview": { "hromhierarchytreeexpview": {
"title": "组织层次结构树导航视图", "title": "组织层次结构树导航视图",
"caption": "组织层级结构", "caption": "组织层级结构",
...@@ -339,6 +389,26 @@ ...@@ -339,6 +389,26 @@
"viewtag": "d32b549b3c49b790b092eca97d1de2c1", "viewtag": "d32b549b3c49b790b092eca97d1de2c1",
"memo": "" "memo": ""
}, },
"hrpostgridview": {
"title": "职位表格",
"caption": "职位",
"viewtype": "DEGRIDVIEW",
"viewmodule": "HumanResource",
"viewname": "HRPostGridView",
"viewfilename": "hrpost-grid-view",
"viewtag": "d5b65e4ae9fc38e66c7faf5698dc6776",
"memo": "系统自动添加"
},
"hrdutypickupgridview": {
"title": "职务选择表格视图",
"caption": "职务",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "HumanResource",
"viewname": "HRDutyPickupGridView",
"viewfilename": "hrduty-pickup-grid-view",
"viewtag": "de53ae7d577a526b3b268951df885868",
"memo": "系统自动添加"
},
"hroperationunitdashboardview": { "hroperationunitdashboardview": {
"title": "运营单位信息看板", "title": "运营单位信息看板",
"caption": "运营单位", "caption": "运营单位",
...@@ -369,6 +439,16 @@ ...@@ -369,6 +439,16 @@
"viewtag": "e7ba37699bd458dc8dd5c02abac8dadd", "viewtag": "e7ba37699bd458dc8dd5c02abac8dadd",
"memo": "" "memo": ""
}, },
"hrdutypickupview": {
"title": "职务数据选择视图",
"caption": "职务",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "HumanResource",
"viewname": "HRDutyPickupView",
"viewfilename": "hrduty-pickup-view",
"viewtag": "ebcbf493e0a574cf170412456645a3a7",
"memo": "系统自动添加"
},
"hrlegaltabexpview": { "hrlegaltabexpview": {
"title": "法人信息", "title": "法人信息",
"caption": "法人信息", "caption": "法人信息",
......
...@@ -48,7 +48,9 @@ export class AuthServiceRegister { ...@@ -48,7 +48,9 @@ export class AuthServiceRegister {
this.allAuthService.set('hromhierarchypurpose', () => import('@/authservice/hromhierarchypurpose/hromhierarchypurpose-auth-service')); this.allAuthService.set('hromhierarchypurpose', () => import('@/authservice/hromhierarchypurpose/hromhierarchypurpose-auth-service'));
this.allAuthService.set('hromhierarchy', () => import('@/authservice/hromhierarchy/hromhierarchy-auth-service')); this.allAuthService.set('hromhierarchy', () => import('@/authservice/hromhierarchy/hromhierarchy-auth-service'));
this.allAuthService.set('hrorgaddress', () => import('@/authservice/hrorg-address/hrorg-address-auth-service')); this.allAuthService.set('hrorgaddress', () => import('@/authservice/hrorg-address/hrorg-address-auth-service'));
this.allAuthService.set('hrpost', () => import('@/authservice/hrpost/hrpost-auth-service'));
this.allAuthService.set('hrorganization', () => import('@/authservice/hrorganization/hrorganization-auth-service')); this.allAuthService.set('hrorganization', () => import('@/authservice/hrorganization/hrorganization-auth-service'));
this.allAuthService.set('hrduty', () => import('@/authservice/hrduty/hrduty-auth-service'));
} }
/** /**
......
import AuthService from '../auth-service';
/**
* 职务权限服务对象基类
*
* @export
* @class HRDutyAuthServiceBase
* @extends {AuthService}
*/
export default class HRDutyAuthServiceBase extends AuthService {
/**
* Creates an instance of HRDutyAuthServiceBase.
*
* @param {*} [opts={}]
* @memberof HRDutyAuthServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 根据当前数据获取实体操作标识
*
* @param {*} mainSateOPPrivs 传入数据操作标识
* @returns {any}
* @memberof HRDutyAuthServiceBase
*/
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 HRDutyAuthServiceBase from './hrduty-auth-service-base';
/**
* 职务权限服务对象
*
* @export
* @class HRDutyAuthService
* @extends {HRDutyAuthServiceBase}
*/
export default class HRDutyAuthService extends HRDutyAuthServiceBase {
/**
* Creates an instance of HRDutyAuthService.
*
* @param {*} [opts={}]
* @memberof HRDutyAuthService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import AuthService from '../auth-service';
/**
* 职位权限服务对象基类
*
* @export
* @class HRPostAuthServiceBase
* @extends {AuthService}
*/
export default class HRPostAuthServiceBase extends AuthService {
/**
* Creates an instance of HRPostAuthServiceBase.
*
* @param {*} [opts={}]
* @memberof HRPostAuthServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 根据当前数据获取实体操作标识
*
* @param {*} mainSateOPPrivs 传入数据操作标识
* @returns {any}
* @memberof HRPostAuthServiceBase
*/
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 HRPostAuthServiceBase from './hrpost-auth-service-base';
/**
* 职位权限服务对象
*
* @export
* @class HRPostAuthService
* @extends {HRPostAuthServiceBase}
*/
export default class HRPostAuthService extends HRPostAuthServiceBase {
/**
* Creates an instance of HRPostAuthService.
*
* @param {*} [opts={}]
* @memberof HRPostAuthService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
/**
* 职务
*
* @export
* @interface HRDuty
*/
export interface HRDuty {
/**
* 职务标识
*
* @returns {*}
* @memberof HRDuty
*/
hrdutyid?: any;
/**
* 建立时间
*
* @returns {*}
* @memberof HRDuty
*/
createdate?: any;
/**
* 更新时间
*
* @returns {*}
* @memberof HRDuty
*/
updatedate?: any;
/**
* 职务名称
*
* @returns {*}
* @memberof HRDuty
*/
hrdutyname?: any;
/**
* 建立人
*
* @returns {*}
* @memberof HRDuty
*/
createman?: any;
/**
* 更新人
*
* @returns {*}
* @memberof HRDuty
*/
updateman?: any;
}
\ No newline at end of file
/**
* 职位
*
* @export
* @interface HRPost
*/
export interface HRPost {
/**
* 职位标识
*
* @returns {*}
* @memberof HRPost
*/
hrpostid?: any;
/**
* 更新人
*
* @returns {*}
* @memberof HRPost
*/
updateman?: any;
/**
* 职位
*
* @returns {*}
* @memberof HRPost
*/
hrpostname?: any;
/**
* 建立人
*
* @returns {*}
* @memberof HRPost
*/
createman?: any;
/**
* 更新时间
*
* @returns {*}
* @memberof HRPost
*/
updatedate?: any;
/**
* 建立时间
*
* @returns {*}
* @memberof HRPost
*/
createdate?: any;
/**
* 职务标识
*
* @returns {*}
* @memberof HRPost
*/
hrdutyid?: any;
/**
* 职务
*
* @returns {*}
* @memberof HRPost
*/
hrdutyname?: any;
/**
* 编号
*
* @returns {*}
* @memberof HRPost
*/
postcode?: any;
/**
* 职位类型
*
* @returns {*}
* @memberof HRPost
*/
posttype?: any;
/**
* 是否有效
*
* @returns {*}
* @memberof HRPost
*/
activeflag?: any;
/**
* 组织
*
* @returns {*}
* @memberof HRPost
*/
hrorganizationid?: any;
/**
* 部门
*
* @returns {*}
* @memberof HRPost
*/
hrorganizationname?: any;
/**
* 最早入职时间
*
* @returns {*}
* @memberof HRPost
*/
entrytime?: any;
}
\ No newline at end of file
...@@ -7,7 +7,9 @@ import hrlegal_en_US from '@locale/lanres/entities/hrlegal/hrlegal_en_US'; ...@@ -7,7 +7,9 @@ import hrlegal_en_US from '@locale/lanres/entities/hrlegal/hrlegal_en_US';
import hromhierarchypurpose_en_US from '@locale/lanres/entities/hromhierarchypurpose/hromhierarchypurpose_en_US'; import hromhierarchypurpose_en_US from '@locale/lanres/entities/hromhierarchypurpose/hromhierarchypurpose_en_US';
import hromhierarchy_en_US from '@locale/lanres/entities/hromhierarchy/hromhierarchy_en_US'; import hromhierarchy_en_US from '@locale/lanres/entities/hromhierarchy/hromhierarchy_en_US';
import hrorgaddress_en_US from '@locale/lanres/entities/hrorg-address/hrorg-address_en_US'; import hrorgaddress_en_US from '@locale/lanres/entities/hrorg-address/hrorg-address_en_US';
import hrpost_en_US from '@locale/lanres/entities/hrpost/hrpost_en_US';
import hrorganization_en_US from '@locale/lanres/entities/hrorganization/hrorganization_en_US'; import hrorganization_en_US from '@locale/lanres/entities/hrorganization/hrorganization_en_US';
import hrduty_en_US from '@locale/lanres/entities/hrduty/hrduty_en_US';
import components_en_US from '@locale/lanres/components/components_en_US'; import components_en_US from '@locale/lanres/components/components_en_US';
import codelist_en_US from '@locale/lanres/codelist/codelist_en_US'; import codelist_en_US from '@locale/lanres/codelist/codelist_en_US';
import userCustom_en_US from '@locale/lanres/userCustom/userCustom_en_US'; import userCustom_en_US from '@locale/lanres/userCustom/userCustom_en_US';
...@@ -142,10 +144,8 @@ export default { ...@@ -142,10 +144,8 @@ export default {
menuitem7: "组织层次结构", menuitem7: "组织层次结构",
menuitem9: "所有组织", menuitem9: "所有组织",
menuitem10: "职位", menuitem10: "职位",
menuitem11: "有效职位", menuitem11: "职位",
menuitem12: "空缺职位", menuitem12: "职务",
menuitem13: "所有职位",
menuitem14: "无效职位",
menuitem8: "测试", menuitem8: "测试",
bottom_exp: "底部内容", bottom_exp: "底部内容",
footer_left: "底部左侧", footer_left: "底部左侧",
...@@ -258,7 +258,9 @@ export default { ...@@ -258,7 +258,9 @@ export default {
hromhierarchypurpose: hromhierarchypurpose_en_US, hromhierarchypurpose: hromhierarchypurpose_en_US,
hromhierarchy: hromhierarchy_en_US, hromhierarchy: hromhierarchy_en_US,
hrorgaddress: hrorgaddress_en_US, hrorgaddress: hrorgaddress_en_US,
hrpost: hrpost_en_US,
hrorganization: hrorganization_en_US, hrorganization: hrorganization_en_US,
hrduty: hrduty_en_US,
}, },
components: components_en_US, components: components_en_US,
codelist: codelist_en_US, codelist: codelist_en_US,
......
...@@ -7,7 +7,9 @@ import hrlegal_zh_CN from '@locale/lanres/entities/hrlegal/hrlegal_zh_CN'; ...@@ -7,7 +7,9 @@ import hrlegal_zh_CN from '@locale/lanres/entities/hrlegal/hrlegal_zh_CN';
import hromhierarchypurpose_zh_CN from '@locale/lanres/entities/hromhierarchypurpose/hromhierarchypurpose_zh_CN'; import hromhierarchypurpose_zh_CN from '@locale/lanres/entities/hromhierarchypurpose/hromhierarchypurpose_zh_CN';
import hromhierarchy_zh_CN from '@locale/lanres/entities/hromhierarchy/hromhierarchy_zh_CN'; import hromhierarchy_zh_CN from '@locale/lanres/entities/hromhierarchy/hromhierarchy_zh_CN';
import hrorgaddress_zh_CN from '@locale/lanres/entities/hrorg-address/hrorg-address_zh_CN'; import hrorgaddress_zh_CN from '@locale/lanres/entities/hrorg-address/hrorg-address_zh_CN';
import hrpost_zh_CN from '@locale/lanres/entities/hrpost/hrpost_zh_CN';
import hrorganization_zh_CN from '@locale/lanres/entities/hrorganization/hrorganization_zh_CN'; import hrorganization_zh_CN from '@locale/lanres/entities/hrorganization/hrorganization_zh_CN';
import hrduty_zh_CN from '@locale/lanres/entities/hrduty/hrduty_zh_CN';
import components_zh_CN from '@locale/lanres/components/components_zh_CN'; import components_zh_CN from '@locale/lanres/components/components_zh_CN';
import codelist_zh_CN from '@locale/lanres/codelist/codelist_zh_CN'; import codelist_zh_CN from '@locale/lanres/codelist/codelist_zh_CN';
import userCustom_zh_CN from '@locale/lanres/userCustom/userCustom_zh_CN'; import userCustom_zh_CN from '@locale/lanres/userCustom/userCustom_zh_CN';
...@@ -142,10 +144,8 @@ export default { ...@@ -142,10 +144,8 @@ export default {
menuitem7: "组织层次结构", menuitem7: "组织层次结构",
menuitem9: "所有组织", menuitem9: "所有组织",
menuitem10: "职位", menuitem10: "职位",
menuitem11: "有效职位", menuitem11: "职位",
menuitem12: "空缺职位", menuitem12: "职务",
menuitem13: "所有职位",
menuitem14: "无效职位",
menuitem8: "测试", menuitem8: "测试",
bottom_exp: "底部内容", bottom_exp: "底部内容",
footer_left: "底部左侧", footer_left: "底部左侧",
...@@ -257,7 +257,9 @@ export default { ...@@ -257,7 +257,9 @@ export default {
hromhierarchypurpose: hromhierarchypurpose_zh_CN, hromhierarchypurpose: hromhierarchypurpose_zh_CN,
hromhierarchy: hromhierarchy_zh_CN, hromhierarchy: hromhierarchy_zh_CN,
hrorgaddress: hrorgaddress_zh_CN, hrorgaddress: hrorgaddress_zh_CN,
hrpost: hrpost_zh_CN,
hrorganization: hrorganization_zh_CN, hrorganization: hrorganization_zh_CN,
hrduty: hrduty_zh_CN,
}, },
components: components_zh_CN, components: components_zh_CN,
codelist: codelist_zh_CN, codelist: codelist_zh_CN,
......
...@@ -7,6 +7,11 @@ export default { ...@@ -7,6 +7,11 @@ export default {
"0": "否", "0": "否",
"empty": "" "empty": ""
}, },
CL_HR_004: {
"FULLTIME": "全职",
"PARTTIME": "兼职",
"empty": ""
},
CL_HR_0001: { CL_HR_0001: {
"COSTCENTER": "成本中心", "COSTCENTER": "成本中心",
"BUSINESSUNIT": "业务单位", "BUSINESSUNIT": "业务单位",
......
...@@ -7,6 +7,11 @@ export default { ...@@ -7,6 +7,11 @@ export default {
"0": "否", "0": "否",
"empty": "", "empty": "",
}, },
CL_HR_004: {
"FULLTIME": "全职",
"PARTTIME": "兼职",
"empty": "",
},
CL_HR_0001: { CL_HR_0001: {
"COSTCENTER": "成本中心", "COSTCENTER": "成本中心",
"BUSINESSUNIT": "业务单位", "BUSINESSUNIT": "业务单位",
......
export default {
fields: {
hrdutyid: "职务标识",
createdate: "建立时间",
updatedate: "更新时间",
hrdutyname: "职务名称",
createman: "建立人",
updateman: "更新人",
},
views: {
pickupgridview: {
caption: "职务",
title: "职务选择表格视图",
},
pickupview: {
caption: "职务",
title: "职务数据选择视图",
},
},
main_grid: {
columns: {
hrdutyname: "职务名称",
updateman: "更新人",
updatedate: "更新时间",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
};
\ No newline at end of file
export default {
fields: {
hrdutyid: "职务标识",
createdate: "建立时间",
updatedate: "更新时间",
hrdutyname: "职务名称",
createman: "建立人",
updateman: "更新人",
},
views: {
pickupgridview: {
caption: "职务",
title: "职务选择表格视图",
},
pickupview: {
caption: "职务",
title: "职务数据选择视图",
},
},
main_grid: {
columns: {
hrdutyname: "职务名称",
updateman: "更新人",
updatedate: "更新时间",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
};
\ No newline at end of file
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
}, },
v_002: { v_002: {
caption: "结构层次类别", caption: "结构层次类别",
title: "结构层次类别编辑视图", title: "层次结构",
}, },
mpickupview: { mpickupview: {
caption: "结构层次类别", caption: "结构层次类别",
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
}, },
ef_001_form: { ef_001_form: {
details: { details: {
group1: "结构层次类别", group1: "用途",
druipart1: "", druipart1: "",
grouppanel1: "层次结构", grouppanel1: "层次结构",
formpage1: "基本信息", formpage1: "基本信息",
......
...@@ -19,7 +19,7 @@ export default { ...@@ -19,7 +19,7 @@ export default {
}, },
v_002: { v_002: {
caption: "结构层次类别", caption: "结构层次类别",
title: "结构层次类别编辑视图", title: "层次结构",
}, },
mpickupview: { mpickupview: {
caption: "结构层次类别", caption: "结构层次类别",
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
}, },
ef_001_form: { ef_001_form: {
details: { details: {
group1: "结构层次类别", group1: "用途",
druipart1: "", druipart1: "",
grouppanel1: "层次结构", grouppanel1: "层次结构",
formpage1: "基本信息", formpage1: "基本信息",
......
export default {
fields: {
hrpostid: "职位标识",
updateman: "更新人",
hrpostname: "职位",
createman: "建立人",
updatedate: "更新时间",
createdate: "建立时间",
hrdutyid: "职务标识",
hrdutyname: "职务",
postcode: "编号",
posttype: "职位类型",
activeflag: "是否有效",
hrorganizationid: "组织",
hrorganizationname: "部门",
entrytime: "最早入职时间",
},
views: {
v_003: {
caption: "职位",
title: "失效职位",
},
v_002: {
caption: "职位",
title: "空缺职位",
},
editview: {
caption: "职位",
title: "职位编辑视图",
},
v_001: {
caption: "职位",
title: "有效职位",
},
tabexpview: {
caption: "职位信息",
title: "职位信息",
},
gridview: {
caption: "职位",
title: "职位表格",
},
},
main_form: {
details: {
group1: "职位基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "职位标识",
srfmajortext: "职位",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
postcode: "编号",
hrpostname: "职位",
hrdutyname: "职务",
posttype: "职位类型",
hrorganizationname: "部门",
activeflag: "是否有效",
hrpostid: "职位标识",
hrorganizationid: "组织",
hrdutyid: "职务标识",
},
uiactions: {
},
},
main_grid: {
columns: {
postcode: "编号",
hrpostname: "职位",
hrdutyname: "职务",
posttype: "职位类型",
hrorganizationname: "部门",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
v_003toolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "Save",
tip: "Save",
},
tbitem4: {
caption: "Save And New",
tip: "Save And New",
},
tbitem5: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem6: {
caption: "-",
tip: "",
},
tbitem7: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "New",
tip: "New",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem22: {
caption: "Help",
tip: "Help",
},
},
v_002toolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
v_001toolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
};
\ No newline at end of file
export default {
fields: {
hrpostid: "职位标识",
updateman: "更新人",
hrpostname: "职位",
createman: "建立人",
updatedate: "更新时间",
createdate: "建立时间",
hrdutyid: "职务标识",
hrdutyname: "职务",
postcode: "编号",
posttype: "职位类型",
activeflag: "是否有效",
hrorganizationid: "组织",
hrorganizationname: "部门",
entrytime: "最早入职时间",
},
views: {
v_003: {
caption: "职位",
title: "失效职位",
},
v_002: {
caption: "职位",
title: "空缺职位",
},
editview: {
caption: "职位",
title: "职位编辑视图",
},
v_001: {
caption: "职位",
title: "有效职位",
},
tabexpview: {
caption: "职位信息",
title: "职位信息",
},
gridview: {
caption: "职位",
title: "职位表格",
},
},
main_form: {
details: {
group1: "职位基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "职位标识",
srfmajortext: "职位",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
postcode: "编号",
hrpostname: "职位",
hrdutyname: "职务",
posttype: "职位类型",
hrorganizationname: "部门",
activeflag: "是否有效",
hrpostid: "职位标识",
hrorganizationid: "组织",
hrdutyid: "职务标识",
},
uiactions: {
},
},
main_grid: {
columns: {
postcode: "编号",
hrpostname: "职位",
hrdutyname: "职务",
posttype: "职位类型",
hrorganizationname: "部门",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
v_003toolbar_toolbar: {
tbitem3: {
caption: "新建",
tip: "新建",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "保存",
tip: "保存",
},
tbitem4: {
caption: "保存并新建",
tip: "保存并新建",
},
tbitem5: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem6: {
caption: "-",
tip: "",
},
tbitem7: {
caption: "删除并关闭",
tip: "删除并关闭",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "新建",
tip: "新建",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "拷贝",
tip: "拷贝",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem22: {
caption: "帮助",
tip: "帮助",
},
},
v_002toolbar_toolbar: {
tbitem3: {
caption: "新建",
tip: "新建",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
},
v_001toolbar_toolbar: {
tbitem3: {
caption: "新建",
tip: "新建",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "新建",
tip: "新建",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
},
};
\ No newline at end of file
...@@ -211,7 +211,7 @@ mock.onGet('v7/pimappmenu').reply((config: any) => { ...@@ -211,7 +211,7 @@ mock.onGet('v7/pimappmenu').reply((config: any) => {
iconcls: 'fa fa-signal', iconcls: 'fa fa-signal',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '_7', appfunctag: '_8',
resourcetag: '', resourcetag: '',
}, },
{ {
...@@ -229,7 +229,7 @@ mock.onGet('v7/pimappmenu').reply((config: any) => { ...@@ -229,7 +229,7 @@ mock.onGet('v7/pimappmenu').reply((config: any) => {
iconcls: 'fa fa-sitemap', iconcls: 'fa fa-sitemap',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '_6', appfunctag: '_7',
resourcetag: '', resourcetag: '',
}, },
{ {
...@@ -244,7 +244,7 @@ mock.onGet('v7/pimappmenu').reply((config: any) => { ...@@ -244,7 +244,7 @@ mock.onGet('v7/pimappmenu').reply((config: any) => {
hidden: false, hidden: false,
hidesidebar: false, hidesidebar: false,
opendefault: false, opendefault: false,
iconcls: '', iconcls: 'fa fa-server',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '', appfunctag: '',
...@@ -253,70 +253,34 @@ mock.onGet('v7/pimappmenu').reply((config: any) => { ...@@ -253,70 +253,34 @@ mock.onGet('v7/pimappmenu').reply((config: any) => {
{ {
id: 'F40EFB9B-4A24-45F2-8CD1-BD9CFD890109', id: 'F40EFB9B-4A24-45F2-8CD1-BD9CFD890109',
name: 'menuitem11', name: 'menuitem11',
text: '有效职位', text: '职位',
type: 'MENUITEM', type: 'MENUITEM',
counterid: '', counterid: '',
tooltip: '有效职位', tooltip: '职位',
expanded: false, expanded: false,
separator: false, separator: false,
hidden: false, hidden: false,
hidesidebar: false, hidesidebar: false,
opendefault: false, opendefault: false,
iconcls: '', iconcls: 'fa fa-cog',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '', appfunctag: '_5',
resourcetag: '', resourcetag: '',
}, },
{ {
id: '5866C16B-4C55-4E2C-8229-15F7533B9E4F', id: '5866C16B-4C55-4E2C-8229-15F7533B9E4F',
name: 'menuitem12', name: 'menuitem12',
text: '空缺职位', text: '职务',
type: 'MENUITEM',
counterid: '',
tooltip: '空缺职位',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
},
{
id: '0E9C48F5-46B8-4F0C-915D-27A35AEAD41C',
name: 'menuitem13',
text: '所有职位',
type: 'MENUITEM', type: 'MENUITEM',
counterid: '', counterid: '',
tooltip: '所有职位', tooltip: '职务',
expanded: false, expanded: false,
separator: false, separator: false,
hidden: false, hidden: false,
hidesidebar: false, hidesidebar: false,
opendefault: false, opendefault: false,
iconcls: '', iconcls: 'fa fa-cog',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
},
{
id: '876E25B2-96E1-430F-890B-80DA30FA4DE8',
name: 'menuitem14',
text: '无效职位',
type: 'MENUITEM',
counterid: '',
tooltip: '无效职位',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '', appfunctag: '',
...@@ -337,7 +301,7 @@ mock.onGet('v7/pimappmenu').reply((config: any) => { ...@@ -337,7 +301,7 @@ mock.onGet('v7/pimappmenu').reply((config: any) => {
iconcls: '', iconcls: '',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '_5', appfunctag: '_6',
resourcetag: '', resourcetag: '',
}, },
], ],
......
...@@ -42,6 +42,33 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => { ...@@ -42,6 +42,33 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
}, },
] ]
}, },
{
srfkey: "CL_HR_004",
emptytext: "未定义",
"codelisttype":"static",
items: [
{
id: "FULLTIME",
label: "全职",
text: "全职",
"data":"",
"codename":"Fulltime",
value: "FULLTIME",
disabled: false,
},
{
id: "PARTTIME",
label: "兼职",
text: "兼职",
"data":"",
"codename":"Parttime",
value: "PARTTIME",
disabled: false,
},
]
},
{ {
srfkey: "CL_HR_0001", srfkey: "CL_HR_0001",
emptytext: "未定义", emptytext: "未定义",
......
import qs from 'qs';
import { MockAdapter } from '@/mock/mock-adapter';
const mock = MockAdapter.getInstance();
// 模拟数据
const mockDatas: Array<any> = [
];
//getwflink
mock.onGet(new RegExp(/^\/wfcore\/ibizhumanresources-app-pim\/hrduties\/[a-zA-Z0-9\-\;]+\/usertasks\/[a-zA-Z0-9\-\;]+\/ways$/)).reply((config: any) => {
console.groupCollapsed("实体:hrduty 方法: 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\/ibizhumanresources-app-pim\/hrduties\/process-definitions-nodes$/)).reply((config: any) => {
console.groupCollapsed("实体:hrduty 方法: 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(/^\/hrduties\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:hrduty 方法: 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(/^\/hrduties\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:hrduty 方法: 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(/^\/hrduties\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:hrduty 方法: 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(/^\/hrduties\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:hrduty 方法: 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> = ['hrdutyid'];
const matchArray:any = new RegExp(/^\/hrduties\/([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.hrdutyid, tempValue.hrdutyid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Create
mock.onPost(new RegExp(/^\/hrduties\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrduty 方法: 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> = ['hrdutyid'];
const matchArray:any = new RegExp(/^\/hrduties\/([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(/^\/hrduties\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrduty 方法: 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> = ['hrdutyid'];
const matchArray:any = new RegExp(/^\/hrduties\/([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.hrdutyid, tempValue.hrdutyid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['hrdutyid'] == tempValue['hrdutyid'] ){
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(/^\/hrduties\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:hrduty 方法: 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(/^\/hrduties\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:hrduty 方法: 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> = ['hrdutyid'];
const matchArray:any = new RegExp(/^\/hrduties\/([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.hrdutyid, tempValue.hrdutyid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['hrdutyid'] == tempValue['hrdutyid'] ){
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(/^\/hrduties\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:hrduty 方法: 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> = ['hrdutyid'];
const matchArray:any = new RegExp(/^\/hrduties\/([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.hrdutyid, tempValue.hrdutyid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['hrdutyid'] == tempValue['hrdutyid'] ){
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(/^\/hrduties\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:hrduty 方法: 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(/^\/hrduties\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:hrduty 方法: 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(/^\/hrduties\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrduty 方法: 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> = ['hrdutyid'];
const matchArray:any = new RegExp(/^\/hrduties\/([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.hrdutyid, tempValue.hrdutyid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/hrduties\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrduty 方法: 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> = ['hrdutyid'];
const matchArray:any = new RegExp(/^\/hrduties\/([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.hrdutyid, tempValue.hrdutyid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
import qs from 'qs';
import { MockAdapter } from '@/mock/mock-adapter';
const mock = MockAdapter.getInstance();
// 模拟数据
const mockDatas: Array<any> = [
];
//getwflink
mock.onGet(new RegExp(/^\/wfcore\/ibizhumanresources-app-pim\/hrposts\/[a-zA-Z0-9\-\;]+\/usertasks\/[a-zA-Z0-9\-\;]+\/ways$/)).reply((config: any) => {
console.groupCollapsed("实体:hrpost 方法: 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\/ibizhumanresources-app-pim\/hrposts\/process-definitions-nodes$/)).reply((config: any) => {
console.groupCollapsed("实体:hrpost 方法: 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(/^\/hrposts\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:hrpost 方法: 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(/^\/hrposts\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:hrpost 方法: 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(/^\/hrposts\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:hrpost 方法: 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(/^\/hrposts\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:hrpost 方法: 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> = ['hrpostid'];
const matchArray:any = new RegExp(/^\/hrposts\/([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.hrpostid, tempValue.hrpostid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Create
mock.onPost(new RegExp(/^\/hrposts\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrpost 方法: 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> = ['hrpostid'];
const matchArray:any = new RegExp(/^\/hrposts\/([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(/^\/hrposts\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrpost 方法: 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> = ['hrpostid'];
const matchArray:any = new RegExp(/^\/hrposts\/([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.hrpostid, tempValue.hrpostid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['hrpostid'] == tempValue['hrpostid'] ){
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(/^\/hrposts\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:hrpost 方法: 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(/^\/hrposts\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:hrpost 方法: 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> = ['hrpostid'];
const matchArray:any = new RegExp(/^\/hrposts\/([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.hrpostid, tempValue.hrpostid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['hrpostid'] == tempValue['hrpostid'] ){
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(/^\/hrposts\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:hrpost 方法: 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> = ['hrpostid'];
const matchArray:any = new RegExp(/^\/hrposts\/([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.hrpostid, tempValue.hrpostid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['hrpostid'] == tempValue['hrpostid'] ){
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(/^\/hrposts\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:hrpost 方法: 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(/^\/hrposts\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:hrpost 方法: 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(/^\/hrposts\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrpost 方法: 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> = ['hrpostid'];
const matchArray:any = new RegExp(/^\/hrposts\/([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.hrpostid, tempValue.hrpostid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/hrposts\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:hrpost 方法: 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> = ['hrpostid'];
const matchArray:any = new RegExp(/^\/hrposts\/([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.hrpostid, tempValue.hrpostid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
...@@ -16,4 +16,6 @@ import './entity/hrlegals/hrlegals'; ...@@ -16,4 +16,6 @@ import './entity/hrlegals/hrlegals';
import './entity/hromhierarchypurposes/hromhierarchypurposes'; import './entity/hromhierarchypurposes/hromhierarchypurposes';
import './entity/hromhierarchys/hromhierarchys'; import './entity/hromhierarchys/hromhierarchys';
import './entity/hrorg-addresss/hrorg-addresss'; import './entity/hrorg-addresss/hrorg-addresss';
import './entity/hrposts/hrposts';
import './entity/hrorganizations/hrorganizations'; import './entity/hrorganizations/hrorganizations';
import './entity/hrdutys/hrdutys';
...@@ -48,7 +48,7 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -48,7 +48,7 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewtag": "114f056047eddd92374e982356e59852" "viewtag": "114f056047eddd92374e982356e59852"
}, },
"hromhierarchycatv_002": { "hromhierarchycatv_002": {
"title": "结构层次类别编辑视图", "title": "层次结构",
"caption": "结构层次类别", "caption": "结构层次类别",
"viewtype": "DEEDITVIEW", "viewtype": "DEEDITVIEW",
"viewmodule": "Base", "viewmodule": "Base",
...@@ -127,6 +127,22 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -127,6 +127,22 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "HROrgAddressV_001", "viewname": "HROrgAddressV_001",
"viewtag": "3110aca6f6c27996e9874cfb924c569f" "viewtag": "3110aca6f6c27996e9874cfb924c569f"
}, },
"hrpostv_003": {
"title": "失效职位",
"caption": "职位",
"viewtype": "DEGRIDVIEW",
"viewmodule": "HumanResource",
"viewname": "HRPostV_003",
"viewtag": "3274463a5fe4c1bcb99fee2240c044ed"
},
"hrpostv_002": {
"title": "空缺职位",
"caption": "职位",
"viewtype": "DEGRIDVIEW",
"viewmodule": "HumanResource",
"viewname": "HRPostV_002",
"viewtag": "3b1d535a219b7256d7ada3a1a7f5120d"
},
"hrlegalgridview": { "hrlegalgridview": {
"title": "法人", "title": "法人",
"caption": "法人", "caption": "法人",
...@@ -175,6 +191,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -175,6 +191,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "HROMHierarchyPickupView", "viewname": "HROMHierarchyPickupView",
"viewtag": "7933350eca0f8dbcb5402928a860c4ec" "viewtag": "7933350eca0f8dbcb5402928a860c4ec"
}, },
"hrposteditview": {
"title": "职位编辑视图",
"caption": "职位",
"viewtype": "DEEDITVIEW",
"viewmodule": "HumanResource",
"viewname": "HRPostEditView",
"viewtag": "7ad274dc8cc9e8f7e464195ca0953dc3"
},
"hromhierarchypickupgridview": { "hromhierarchypickupgridview": {
"title": "组织层次结构选择表格视图", "title": "组织层次结构选择表格视图",
"caption": "组织层次结构", "caption": "组织层次结构",
...@@ -231,6 +255,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -231,6 +255,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "HRLegalV_001", "viewname": "HRLegalV_001",
"viewtag": "af1a0e288eecf89cd99ed798594e1753" "viewtag": "af1a0e288eecf89cd99ed798594e1753"
}, },
"hrpostv_001": {
"title": "有效职位",
"caption": "职位",
"viewtype": "DEGRIDVIEW",
"viewmodule": "HumanResource",
"viewname": "HRPostV_001",
"viewtag": "b4b751d7088fd1c29aed976e9e9528b2"
},
"hrorganizationeditview": { "hrorganizationeditview": {
"title": "组织编辑视图", "title": "组织编辑视图",
"caption": "组织", "caption": "组织",
...@@ -247,6 +279,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -247,6 +279,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "HREmployeeEditView", "viewname": "HREmployeeEditView",
"viewtag": "b932c0eb66409c638c29ee27ba4fda37" "viewtag": "b932c0eb66409c638c29ee27ba4fda37"
}, },
"hrposttabexpview": {
"title": "职位信息",
"caption": "职位信息",
"viewtype": "DETABEXPVIEW",
"viewmodule": "HumanResource",
"viewname": "HRPostTabExpView",
"viewtag": "bae1de77dc5bd2584e2dcf7201a06495"
},
"hromhierarchytreeexpview": { "hromhierarchytreeexpview": {
"title": "组织层次结构树导航视图", "title": "组织层次结构树导航视图",
"caption": "组织层级结构", "caption": "组织层级结构",
...@@ -279,6 +319,22 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -279,6 +319,22 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "HROperationUnitV_001", "viewname": "HROperationUnitV_001",
"viewtag": "d32b549b3c49b790b092eca97d1de2c1" "viewtag": "d32b549b3c49b790b092eca97d1de2c1"
}, },
"hrpostgridview": {
"title": "职位表格",
"caption": "职位",
"viewtype": "DEGRIDVIEW",
"viewmodule": "HumanResource",
"viewname": "HRPostGridView",
"viewtag": "d5b65e4ae9fc38e66c7faf5698dc6776"
},
"hrdutypickupgridview": {
"title": "职务选择表格视图",
"caption": "职务",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "HumanResource",
"viewname": "HRDutyPickupGridView",
"viewtag": "de53ae7d577a526b3b268951df885868"
},
"hroperationunitdashboardview": { "hroperationunitdashboardview": {
"title": "运营单位信息看板", "title": "运营单位信息看板",
"caption": "运营单位", "caption": "运营单位",
...@@ -303,6 +359,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -303,6 +359,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "HROrganizationPickupView", "viewname": "HROrganizationPickupView",
"viewtag": "e7ba37699bd458dc8dd5c02abac8dadd" "viewtag": "e7ba37699bd458dc8dd5c02abac8dadd"
}, },
"hrdutypickupview": {
"title": "职务数据选择视图",
"caption": "职务",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "HumanResource",
"viewname": "HRDutyPickupView",
"viewtag": "ebcbf493e0a574cf170412456645a3a7"
},
"hrlegaltabexpview": { "hrlegaltabexpview": {
"title": "法人信息", "title": "法人信息",
"caption": "法人信息", "caption": "法人信息",
......
...@@ -6,7 +6,7 @@ import EditViewEngine from '@engine/view/edit-view-engine'; ...@@ -6,7 +6,7 @@ import EditViewEngine from '@engine/view/edit-view-engine';
import HROMHierarchyCatUIService from '@/uiservice/hromhierarchy-cat/hromhierarchy-cat-ui-service'; import HROMHierarchyCatUIService from '@/uiservice/hromhierarchy-cat/hromhierarchy-cat-ui-service';
/** /**
* 结构层次类别编辑视图视图基类 * 层次结构视图基类
* *
* @export * @export
* @class HROMHierarchyCatV_002Base * @class HROMHierarchyCatV_002Base
......
<studio-view-style2 viewName="hromhierarchycatv_002" viewTitle="结构层次类别编辑视图" class='deeditview hromhierarchy-cat-v-002 from-dashboard-style'> <studio-view-style2 viewName="hromhierarchycatv_002" viewTitle="层次结构" class='deeditview hromhierarchy-cat-v-002 from-dashboard-style'>
<template slot="toolbar"> <template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template> <view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<view_form <view_form
......
...@@ -6,7 +6,7 @@ import { HROMHierarchyCatV_002Base } from './hromhierarchy-cat-v-002-base'; ...@@ -6,7 +6,7 @@ import { HROMHierarchyCatV_002Base } from './hromhierarchy-cat-v-002-base';
import view_form from '@widgets/hromhierarchy-cat/ef-001-form/ef-001-form.vue'; import view_form from '@widgets/hromhierarchy-cat/ef-001-form/ef-001-form.vue';
/** /**
* 结构层次类别编辑视图视图 * 层次结构视图
* *
* @export * @export
* @class HROMHierarchyCatV_002 * @class HROMHierarchyCatV_002
......
import { Subject } from 'rxjs';
import { PickupGridViewBase } from '@/studio-core';
import HRDutyService from '@/service/hrduty/hrduty-service';
import HRDutyAuthService from '@/authservice/hrduty/hrduty-auth-service';
import PickupGridViewEngine from '@engine/view/pickup-grid-view-engine';
import HRDutyUIService from '@/uiservice/hrduty/hrduty-ui-service';
/**
* 职务选择表格视图视图基类
*
* @export
* @class HRDutyPickupGridViewBase
* @extends {PickupGridViewBase}
*/
export class HRDutyPickupGridViewBase extends PickupGridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof HRDutyPickupGridViewBase
*/
protected appDeName: string = 'hrduty';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof HRDutyPickupGridViewBase
*/
protected appDeKey: string = 'hrdutyid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof HRDutyPickupGridViewBase
*/
protected appDeMajor: string = 'hrdutyname';
/**
* 实体服务对象
*
* @type {HRDutyService}
* @memberof HRDutyPickupGridViewBase
*/
protected appEntityService: HRDutyService = new HRDutyService;
/**
* 实体权限服务对象
*
* @type HRDutyUIService
* @memberof HRDutyPickupGridViewBase
*/
public appUIService: HRDutyUIService = new HRDutyUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof HRDutyPickupGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof HRDutyPickupGridViewBase
*/
protected model: any = {
srfCaption: 'entities.hrduty.views.pickupgridview.caption',
srfTitle: 'entities.hrduty.views.pickupgridview.title',
srfSubTitle: 'entities.hrduty.views.pickupgridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof HRDutyPickupGridViewBase
*/
protected containerModel: any = {
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'de53ae7d577a526b3b268951df885868';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof HRDutyPickupGridViewBase
*/
public engine: PickupGridViewEngine = new PickupGridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof HRDutyPickupGridViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
grid: this.$refs.grid,
searchform: this.$refs.searchform,
keyPSDEField: 'hrduty',
majorPSDEField: 'hrdutyname',
isLoadDefault: true,
});
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRDutyPickupGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRDutyPickupGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRDutyPickupGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRDutyPickupGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRDutyPickupGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRDutyPickupGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRDutyPickupGridViewBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 是否展开搜索表单
*
* @protected
* @type {boolean}
* @memberof HRDutyPickupGridViewBase
*/
protected isExpandSearchForm: boolean = true;
}
\ No newline at end of file
<studio-view-style2 viewName="hrdutypickupgridview" viewTitle="职务选择表格视图" class='depickupgridview hrduty-pickup-grid-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<template slot="searchForm">
<view_searchform
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
@search="searchform_search($event)"
@load="searchform_load($event)"
@closeview="closeView($event)">
</view_searchform>
</template>
<view_grid
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:isSingleSelect="isGridSingleSelect"
:selectedData="selectedData"
:showBusyIndicator="true"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</studio-view-style2>
\ No newline at end of file
<template src="./hrduty-pickup-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { HRDutyPickupGridViewBase } from './hrduty-pickup-grid-view-base';
import view_grid from '@widgets/hrduty/main-grid/main-grid.vue';
import view_searchform from '@widgets/hrduty/default-searchform/default-searchform.vue';
/**
* 职务选择表格视图视图
*
* @export
* @class HRDutyPickupGridView
* @extends {HRDutyPickupGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class HRDutyPickupGridView extends HRDutyPickupGridViewBase { }
</script>
import { Subject } from 'rxjs';
import { PickupViewBase } from '@/studio-core';
import HRDutyService from '@/service/hrduty/hrduty-service';
import HRDutyAuthService from '@/authservice/hrduty/hrduty-auth-service';
import PickupViewEngine from '@engine/view/pickup-view-engine';
import HRDutyUIService from '@/uiservice/hrduty/hrduty-ui-service';
/**
* 职务数据选择视图视图基类
*
* @export
* @class HRDutyPickupViewBase
* @extends {PickupViewBase}
*/
export class HRDutyPickupViewBase extends PickupViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof HRDutyPickupViewBase
*/
protected appDeName: string = 'hrduty';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof HRDutyPickupViewBase
*/
protected appDeKey: string = 'hrdutyid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof HRDutyPickupViewBase
*/
protected appDeMajor: string = 'hrdutyname';
/**
* 实体服务对象
*
* @type {HRDutyService}
* @memberof HRDutyPickupViewBase
*/
protected appEntityService: HRDutyService = new HRDutyService;
/**
* 实体权限服务对象
*
* @type HRDutyUIService
* @memberof HRDutyPickupViewBase
*/
public appUIService: HRDutyUIService = new HRDutyUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof HRDutyPickupViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof HRDutyPickupViewBase
*/
protected model: any = {
srfCaption: 'entities.hrduty.views.pickupview.caption',
srfTitle: 'entities.hrduty.views.pickupview.title',
srfSubTitle: 'entities.hrduty.views.pickupview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof HRDutyPickupViewBase
*/
protected containerModel: any = {
view_pickupviewpanel: { name: 'pickupviewpanel', type: 'PICKUPVIEWPANEL' },
view_okbtn: { name: 'okbtn', type: 'button', text: '确定', disabled: true },
view_cancelbtn: { name: 'cancelbtn', type: 'button', text: '取消', disabled: false },
view_leftbtn: { name: 'leftbtn', type: 'button', text: '左移', disabled: true },
view_rightbtn: { name: 'rightbtn', type: 'button', text: '右移', disabled: true },
view_allleftbtn: { name: 'allleftbtn', type: 'button', text: '全部左移', disabled: true },
view_allrightbtn: { name: 'allrightbtn', type: 'button', text: '全部右移', disabled: true },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'ebcbf493e0a574cf170412456645a3a7';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof HRDutyPickupViewBase
*/
public engine: PickupViewEngine = new PickupViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof HRDutyPickupViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
pickupviewpanel: this.$refs.pickupviewpanel,
keyPSDEField: 'hrduty',
majorPSDEField: 'hrdutyname',
isLoadDefault: true,
});
}
/**
* pickupviewpanel 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRDutyPickupViewBase
*/
public pickupviewpanel_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'selectionchange', $event);
}
/**
* pickupviewpanel 部件 activated 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRDutyPickupViewBase
*/
public pickupviewpanel_activated($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'activated', $event);
}
/**
* pickupviewpanel 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRDutyPickupViewBase
*/
public pickupviewpanel_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'load', $event);
}
}
\ No newline at end of file
<studio-view-style2 viewName="hrdutypickupview" viewTitle="职务数据选择视图" class='depickupview hrduty-pickup-view'>
<div class="content-container pickup-view">
<view_pickupviewpanel
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
:isSingleSelect="isSingleSelect"
:selectedData="selectedData"
:isShowButton="isShowButton"
name="pickupviewpanel"
ref='pickupviewpanel'
@selectionchange="pickupviewpanel_selectionchange($event)"
@activated="pickupviewpanel_activated($event)"
@load="pickupviewpanel_load($event)"
@closeview="closeView($event)">
</view_pickupviewpanel>
</div>
<template slot="footer">
<div v-if="isShowButton" :style="{ textAlign: 'right' }">
<i-button type="primary" :disabled="this.viewSelections.length > 0 ? false : true" @click="onClickOk.apply(_self, arguments)">{{this.containerModel.view_okbtn.text}}</i-button>
&nbsp;&nbsp;
<i-button @click="onClickCancel.apply(_self, arguments)">{{this.containerModel.view_cancelbtn.text}}</i-button>
</div>
</template>
</studio-view-style2>
\ No newline at end of file
<template src="./hrduty-pickup-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { HRDutyPickupViewBase } from './hrduty-pickup-view-base';
import view_pickupviewpanel from '@widgets/hrduty/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel.vue';
/**
* 职务数据选择视图视图
*
* @export
* @class HRDutyPickupView
* @extends {HRDutyPickupViewBase}
*/
@Component({
components: {
view_pickupviewpanel,
}
})
@VueLifeCycleProcessing()
export default class HRDutyPickupView extends HRDutyPickupViewBase { }
</script>
import { Subject } from 'rxjs';
import { EditViewBase } from '@/studio-core';
import HRPostService from '@/service/hrpost/hrpost-service';
import HRPostAuthService from '@/authservice/hrpost/hrpost-auth-service';
import EditViewEngine from '@engine/view/edit-view-engine';
import HRPostUIService from '@/uiservice/hrpost/hrpost-ui-service';
/**
* 职位编辑视图视图基类
*
* @export
* @class HRPostEditViewBase
* @extends {EditViewBase}
*/
export class HRPostEditViewBase extends EditViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof HRPostEditViewBase
*/
protected appDeName: string = 'hrpost';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof HRPostEditViewBase
*/
protected appDeKey: string = 'hrpostid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof HRPostEditViewBase
*/
protected appDeMajor: string = 'hrpostname';
/**
* 实体服务对象
*
* @type {HRPostService}
* @memberof HRPostEditViewBase
*/
protected appEntityService: HRPostService = new HRPostService;
/**
* 实体权限服务对象
*
* @type HRPostUIService
* @memberof HRPostEditViewBase
*/
public appUIService: HRPostUIService = new HRPostUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof HRPostEditViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof HRPostEditViewBase
*/
protected model: any = {
srfCaption: 'entities.hrpost.views.editview.caption',
srfTitle: 'entities.hrpost.views.editview.title',
srfSubTitle: 'entities.hrpost.views.editview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof HRPostEditViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_form: { name: 'form', type: 'FORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof HRPostEditView
*/
public toolBarModels: any = {
tbitem3: { name: 'tbitem3', 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: '' } },
tbitem4: { name: 'tbitem4', 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: '' } },
tbitem5: { name: 'tbitem5', caption: '保存并关闭', 'isShowCaption': true, 'isShowIcon': true, tooltip: '保存并关闭', iconcls: 'fa fa-power-off', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '', class: '' } },
tbitem6: { name: 'tbitem6', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem7: { name: 'tbitem7', 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: '' } },
tbitem8: { name: 'tbitem8', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem12: { name: 'tbitem12', 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: '' } },
tbitem13: { name: 'tbitem13', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem14: { name: 'tbitem14', 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: '' } },
tbitem16: { name: 'tbitem16', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem22: { name: 'tbitem22', 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 = '7ad274dc8cc9e8f7e464195ca0953dc3';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof HRPostEditViewBase
*/
public engine: EditViewEngine = new EditViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof HRPostEditViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'hrpost',
majorPSDEField: 'hrpostname',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostEditViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem7')) {
this.toolbar_tbitem7_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem9')) {
this.toolbar_tbitem9_click(null, '', $event2);
}
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, 'tbitem14')) {
this.toolbar_tbitem14_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem15')) {
this.toolbar_tbitem15_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem22')) {
this.toolbar_tbitem22_click(null, '', $event2);
}
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostEditViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostEditViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostEditViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
/**
* 逻辑事件
*
* @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.Save(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.SaveAndNew(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.SaveAndStart(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.ViewWFStep(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.New(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.Copy(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem15_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,"HRPost");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem22_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,"HRPost");
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof HRPostEditViewBase
*/
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 HRPostEditViewBase
*/
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 HRPostEditViewBase
*/
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 HRPostEditViewBase
*/
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 HRPostEditViewBase
*/
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 HRPostEditViewBase
*/
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 HRPostEditViewBase
*/
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 HRPostEditViewBase
*/
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, { hrpost: args[0].hrpost });
}
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 HRPostEditViewBase
*/
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 HRPostEditViewBase
*/
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="hrposteditview" viewTitle="职位编辑视图" class='deeditview hrpost-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="./hrpost-edit-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { HRPostEditViewBase } from './hrpost-edit-view-base';
import view_form from '@widgets/hrpost/main-form/main-form.vue';
/**
* 职位编辑视图视图
*
* @export
* @class HRPostEditView
* @extends {HRPostEditViewBase}
*/
@Component({
components: {
view_form,
}
})
@VueLifeCycleProcessing()
export default class HRPostEditView extends HRPostEditViewBase { }
</script>
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import HRPostService from '@/service/hrpost/hrpost-service';
import HRPostAuthService from '@/authservice/hrpost/hrpost-auth-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import HRPostUIService from '@/uiservice/hrpost/hrpost-ui-service';
import CodeListService from "@service/app/codelist-service";
/**
* 职位表格视图基类
*
* @export
* @class HRPostGridViewBase
* @extends {GridViewBase}
*/
export class HRPostGridViewBase extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof HRPostGridViewBase
*/
protected appDeName: string = 'hrpost';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof HRPostGridViewBase
*/
protected appDeKey: string = 'hrpostid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof HRPostGridViewBase
*/
protected appDeMajor: string = 'hrpostname';
/**
* 实体服务对象
*
* @type {HRPostService}
* @memberof HRPostGridViewBase
*/
protected appEntityService: HRPostService = new HRPostService;
/**
* 实体权限服务对象
*
* @type HRPostUIService
* @memberof HRPostGridViewBase
*/
public appUIService: HRPostUIService = new HRPostUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof HRPostGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof HRPostGridViewBase
*/
protected model: any = {
srfCaption: 'entities.hrpost.views.gridview.caption',
srfTitle: 'entities.hrpost.views.gridview.title',
srfSubTitle: 'entities.hrpost.views.gridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof HRPostGridViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof HRPostGridView
*/
public toolBarModels: any = {
tbitem3: { name: 'tbitem3', 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: '' } },
tbitem4: { name: 'tbitem4', 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: '' } },
tbitem7: { name: 'tbitem7', 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: '' } },
tbitem9: { name: 'tbitem9', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem13: { name: 'tbitem13', 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: '' },
tbitem10: { name: 'tbitem10', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem19: { name: 'tbitem19', 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 = 'd5b65e4ae9fc38e66c7faf5698dc6776';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof HRPostGridViewBase
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof HRPostGridViewBase
*/
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: 'hrpost',
majorPSDEField: 'hrpostname',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostGridViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_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, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem13')) {
this.toolbar_tbitem13_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem11')) {
this.toolbar_tbitem11_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem19')) {
this.toolbar_tbitem19_click(null, '', $event2);
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostGridViewBase
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostGridViewBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @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.New(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.Edit(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.NewRow(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_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.SaveRow(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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,"HRPost");
}
/**
* 逻辑事件
*
* @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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.Print(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem19_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,"HRPost");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof HRPostGridView
*/
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.hrpost;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'hrposts', parameterName: 'hrpost' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof HRPostGridView
*/
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: 'hrposts', parameterName: 'hrpost' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof HRPostGridViewBase
*/
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 HRPostGridViewBase
*/
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, { hrpost: args[0].hrpost })
}
_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 HRPostGridViewBase
*/
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 HRPostGridViewBase
*/
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 HRPostGridViewBase
*/
public SaveRow(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();
} 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 HRPostGridViewBase
*/
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 HRPostGridViewBase
*/
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 HRPostGridViewBase
*/
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 HRPostGridViewBase
*/
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="hrpostgridview" viewTitle="职位表格" class='degridview hrpost-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="./hrpost-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { HRPostGridViewBase } from './hrpost-grid-view-base';
import view_grid from '@widgets/hrpost/main-grid/main-grid.vue';
import view_searchform from '@widgets/hrpost/default-searchform/default-searchform.vue';
/**
* 职位表格视图
*
* @export
* @class HRPostGridView
* @extends {HRPostGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class HRPostGridView extends HRPostGridViewBase { }
</script>
import { Subject } from 'rxjs';
import { TabExpViewBase } from '@/studio-core';
import HRPostService from '@/service/hrpost/hrpost-service';
import HRPostAuthService from '@/authservice/hrpost/hrpost-auth-service';
import TabExpViewEngine from '@engine/view/tab-exp-view-engine';
import HRPostUIService from '@/uiservice/hrpost/hrpost-ui-service';
/**
* 职位信息视图基类
*
* @export
* @class HRPostTabExpViewBase
* @extends {TabExpViewBase}
*/
export class HRPostTabExpViewBase extends TabExpViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof HRPostTabExpViewBase
*/
protected appDeName: string = 'hrpost';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof HRPostTabExpViewBase
*/
protected appDeKey: string = 'hrpostid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof HRPostTabExpViewBase
*/
protected appDeMajor: string = 'hrpostname';
/**
* 实体服务对象
*
* @type {HRPostService}
* @memberof HRPostTabExpViewBase
*/
protected appEntityService: HRPostService = new HRPostService;
/**
* 实体权限服务对象
*
* @type HRPostUIService
* @memberof HRPostTabExpViewBase
*/
public appUIService: HRPostUIService = new HRPostUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof HRPostTabExpViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof HRPostTabExpViewBase
*/
protected model: any = {
srfCaption: 'entities.hrpost.views.tabexpview.caption',
srfTitle: 'entities.hrpost.views.tabexpview.title',
srfSubTitle: 'entities.hrpost.views.tabexpview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof HRPostTabExpViewBase
*/
protected containerModel: any = {
view_tabexppanel: { name: 'tabexppanel', type: 'TABEXPPANEL' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'bae1de77dc5bd2584e2dcf7201a06495';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof HRPostTabExpViewBase
*/
public engine: TabExpViewEngine = new TabExpViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof HRPostTabExpViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
keyPSDEField: 'hrpost',
majorPSDEField: 'hrpostname',
isLoadDefault: true,
});
}
}
\ No newline at end of file
<studio-view-style2 viewName="hrposttabexpview" viewTitle="职位信息" class='detabexpview hrpost-tab-exp-view'>
<view_tabexppanel
:viewState="viewState"
:viewparams="viewparams"
:context="context"
name="tabexppanel"
ref='tabexppanel'
@closeview="closeView($event)">
</view_tabexppanel>
</studio-view-style2>
\ No newline at end of file
<template src="./hrpost-tab-exp-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { HRPostTabExpViewBase } from './hrpost-tab-exp-view-base';
import view_tabexppanel from '@widgets/hrpost/tab-exp-viewtabexppanel-tabexppanel/tab-exp-viewtabexppanel-tabexppanel.vue';
/**
* 职位信息视图
*
* @export
* @class HRPostTabExpView
* @extends {HRPostTabExpViewBase}
*/
@Component({
components: {
view_tabexppanel,
}
})
@VueLifeCycleProcessing()
export default class HRPostTabExpView extends HRPostTabExpViewBase { }
</script>
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import HRPostService from '@/service/hrpost/hrpost-service';
import HRPostAuthService from '@/authservice/hrpost/hrpost-auth-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import HRPostUIService from '@/uiservice/hrpost/hrpost-ui-service';
import CodeListService from "@service/app/codelist-service";
/**
* 有效职位视图基类
*
* @export
* @class HRPostV_001Base
* @extends {GridViewBase}
*/
export class HRPostV_001Base extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof HRPostV_001Base
*/
protected appDeName: string = 'hrpost';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof HRPostV_001Base
*/
protected appDeKey: string = 'hrpostid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof HRPostV_001Base
*/
protected appDeMajor: string = 'hrpostname';
/**
* 实体服务对象
*
* @type {HRPostService}
* @memberof HRPostV_001Base
*/
protected appEntityService: HRPostService = new HRPostService;
/**
* 实体权限服务对象
*
* @type HRPostUIService
* @memberof HRPostV_001Base
*/
public appUIService: HRPostUIService = new HRPostUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof HRPostV_001Base
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof HRPostV_001Base
*/
protected model: any = {
srfCaption: 'entities.hrpost.views.v_001.caption',
srfTitle: 'entities.hrpost.views.v_001.title',
srfSubTitle: 'entities.hrpost.views.v_001.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof HRPostV_001Base
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof HRPostV_001
*/
public toolBarModels: any = {
tbitem3: { name: 'tbitem3', 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: '' } },
tbitem4: { name: 'tbitem4', 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: '' } },
tbitem7: { name: 'tbitem7', 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: '' } },
tbitem9: { name: 'tbitem9', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem13: { name: 'tbitem13', 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: '' },
tbitem10: { name: 'tbitem10', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem19: { name: 'tbitem19', 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 = 'b4b751d7088fd1c29aed976e9e9528b2';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof HRPostV_001Base
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof HRPostV_001Base
*/
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: 'hrpost',
majorPSDEField: 'hrpostname',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_001Base
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_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, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem13')) {
this.toolbar_tbitem13_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem11')) {
this.toolbar_tbitem11_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem19')) {
this.toolbar_tbitem19_click(null, '', $event2);
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_001Base
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_001Base
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_001Base
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_001Base
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_001Base
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_001Base
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_001Base
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_001Base
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @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.New(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.Edit(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.NewRow(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_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.SaveRow(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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,"HRPost");
}
/**
* 逻辑事件
*
* @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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.Print(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem19_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,"HRPost");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof HRPostV_001
*/
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.hrpost;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'hrposts', parameterName: 'hrpost' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof HRPostV_001
*/
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: 'hrposts', parameterName: 'hrpost' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof HRPostV_001Base
*/
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 HRPostV_001Base
*/
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, { hrpost: args[0].hrpost })
}
_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 HRPostV_001Base
*/
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 HRPostV_001Base
*/
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 HRPostV_001Base
*/
public SaveRow(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();
} 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 HRPostV_001Base
*/
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 HRPostV_001Base
*/
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 HRPostV_001Base
*/
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 HRPostV_001Base
*/
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="hrpostv_001" viewTitle="有效职位" class='degridview hrpost-v-001'>
<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="./hrpost-v-001.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { HRPostV_001Base } from './hrpost-v-001-base';
import view_grid from '@widgets/hrpost/main-grid/main-grid.vue';
import view_searchform from '@widgets/hrpost/default-searchform/default-searchform.vue';
/**
* 有效职位视图
*
* @export
* @class HRPostV_001
* @extends {HRPostV_001Base}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class HRPostV_001 extends HRPostV_001Base { }
</script>
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import HRPostService from '@/service/hrpost/hrpost-service';
import HRPostAuthService from '@/authservice/hrpost/hrpost-auth-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import HRPostUIService from '@/uiservice/hrpost/hrpost-ui-service';
import CodeListService from "@service/app/codelist-service";
/**
* 空缺职位视图基类
*
* @export
* @class HRPostV_002Base
* @extends {GridViewBase}
*/
export class HRPostV_002Base extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof HRPostV_002Base
*/
protected appDeName: string = 'hrpost';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof HRPostV_002Base
*/
protected appDeKey: string = 'hrpostid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof HRPostV_002Base
*/
protected appDeMajor: string = 'hrpostname';
/**
* 实体服务对象
*
* @type {HRPostService}
* @memberof HRPostV_002Base
*/
protected appEntityService: HRPostService = new HRPostService;
/**
* 实体权限服务对象
*
* @type HRPostUIService
* @memberof HRPostV_002Base
*/
public appUIService: HRPostUIService = new HRPostUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof HRPostV_002Base
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof HRPostV_002Base
*/
protected model: any = {
srfCaption: 'entities.hrpost.views.v_002.caption',
srfTitle: 'entities.hrpost.views.v_002.title',
srfSubTitle: 'entities.hrpost.views.v_002.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof HRPostV_002Base
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof HRPostV_002
*/
public toolBarModels: any = {
tbitem3: { name: 'tbitem3', 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: '' } },
tbitem4: { name: 'tbitem4', 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: '' } },
tbitem7: { name: 'tbitem7', 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: '' } },
tbitem9: { name: 'tbitem9', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem13: { name: 'tbitem13', 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: '' },
tbitem10: { name: 'tbitem10', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem19: { name: 'tbitem19', 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 = '3b1d535a219b7256d7ada3a1a7f5120d';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof HRPostV_002Base
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof HRPostV_002Base
*/
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: 'hrpost',
majorPSDEField: 'hrpostname',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_002Base
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_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, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem13')) {
this.toolbar_tbitem13_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem11')) {
this.toolbar_tbitem11_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem19')) {
this.toolbar_tbitem19_click(null, '', $event2);
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_002Base
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_002Base
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_002Base
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_002Base
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_002Base
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_002Base
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_002Base
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_002Base
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @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.New(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.Edit(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.NewRow(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_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.SaveRow(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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,"HRPost");
}
/**
* 逻辑事件
*
* @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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.Print(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem19_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,"HRPost");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof HRPostV_002
*/
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.hrpost;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'hrposts', parameterName: 'hrpost' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof HRPostV_002
*/
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: 'hrposts', parameterName: 'hrpost' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof HRPostV_002Base
*/
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 HRPostV_002Base
*/
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, { hrpost: args[0].hrpost })
}
_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 HRPostV_002Base
*/
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 HRPostV_002Base
*/
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 HRPostV_002Base
*/
public SaveRow(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();
} 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 HRPostV_002Base
*/
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 HRPostV_002Base
*/
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 HRPostV_002Base
*/
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 HRPostV_002Base
*/
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="hrpostv_002" viewTitle="空缺职位" class='degridview hrpost-v-002'>
<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="./hrpost-v-002.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { HRPostV_002Base } from './hrpost-v-002-base';
import view_grid from '@widgets/hrpost/main-grid/main-grid.vue';
import view_searchform from '@widgets/hrpost/default-searchform/default-searchform.vue';
/**
* 空缺职位视图
*
* @export
* @class HRPostV_002
* @extends {HRPostV_002Base}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class HRPostV_002 extends HRPostV_002Base { }
</script>
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import HRPostService from '@/service/hrpost/hrpost-service';
import HRPostAuthService from '@/authservice/hrpost/hrpost-auth-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import HRPostUIService from '@/uiservice/hrpost/hrpost-ui-service';
import CodeListService from "@service/app/codelist-service";
/**
* 失效职位视图基类
*
* @export
* @class HRPostV_003Base
* @extends {GridViewBase}
*/
export class HRPostV_003Base extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof HRPostV_003Base
*/
protected appDeName: string = 'hrpost';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof HRPostV_003Base
*/
protected appDeKey: string = 'hrpostid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof HRPostV_003Base
*/
protected appDeMajor: string = 'hrpostname';
/**
* 实体服务对象
*
* @type {HRPostService}
* @memberof HRPostV_003Base
*/
protected appEntityService: HRPostService = new HRPostService;
/**
* 实体权限服务对象
*
* @type HRPostUIService
* @memberof HRPostV_003Base
*/
public appUIService: HRPostUIService = new HRPostUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof HRPostV_003Base
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof HRPostV_003Base
*/
protected model: any = {
srfCaption: 'entities.hrpost.views.v_003.caption',
srfTitle: 'entities.hrpost.views.v_003.title',
srfSubTitle: 'entities.hrpost.views.v_003.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof HRPostV_003Base
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof HRPostV_003
*/
public toolBarModels: any = {
tbitem3: { name: 'tbitem3', 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: '' } },
tbitem4: { name: 'tbitem4', 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: '' } },
tbitem7: { name: 'tbitem7', 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: '' } },
tbitem9: { name: 'tbitem9', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem13: { name: 'tbitem13', 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: '' },
tbitem10: { name: 'tbitem10', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem19: { name: 'tbitem19', 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 = '3274463a5fe4c1bcb99fee2240c044ed';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof HRPostV_003Base
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof HRPostV_003Base
*/
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: 'hrpost',
majorPSDEField: 'hrpostname',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_003Base
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_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, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem13')) {
this.toolbar_tbitem13_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem11')) {
this.toolbar_tbitem11_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem19')) {
this.toolbar_tbitem19_click(null, '', $event2);
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_003Base
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_003Base
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_003Base
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_003Base
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_003Base
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_003Base
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_003Base
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRPostV_003Base
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @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.New(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.Edit(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.NewRow(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_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.SaveRow(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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,"HRPost");
}
/**
* 逻辑事件
*
* @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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @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.Print(datas, contextJO,paramJO, $event, xData,this,"HRPost");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem19_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,"HRPost");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof HRPostV_003
*/
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.hrpost;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'hrposts', parameterName: 'hrpost' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof HRPostV_003
*/
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: 'hrposts', parameterName: 'hrpost' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof HRPostV_003Base
*/
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 HRPostV_003Base
*/
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, { hrpost: args[0].hrpost })
}
_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 HRPostV_003Base
*/
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 HRPostV_003Base
*/
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 HRPostV_003Base
*/
public SaveRow(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();
} 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 HRPostV_003Base
*/
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 HRPostV_003Base
*/
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 HRPostV_003Base
*/
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 HRPostV_003Base
*/
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="hrpostv_003" viewTitle="失效职位" class='degridview hrpost-v-003'>
<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="./hrpost-v-003.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { HRPostV_003Base } from './hrpost-v-003-base';
import view_grid from '@widgets/hrpost/main-grid/main-grid.vue';
import view_searchform from '@widgets/hrpost/default-searchform/default-searchform.vue';
/**
* 失效职位视图
*
* @export
* @class HRPostV_003
* @extends {HRPostV_003Base}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class HRPostV_003 extends HRPostV_003Base { }
</script>
export const PageComponents = { export const PageComponents = {
install(Vue: any, opt: any) { install(Vue: any, opt: any) {
Vue.component('hroperation-unit-edit-view', () => import('@pages/base/hroperation-unit-edit-view/hroperation-unit-edit-view.vue')); Vue.component('hroperation-unit-edit-view', () => import('@pages/base/hroperation-unit-edit-view/hroperation-unit-edit-view.vue'));
Vue.component('hrpost-grid-view', () => import('@pages/human-resource/hrpost-grid-view/hrpost-grid-view.vue'));
Vue.component('hrorg-address-edit-view', () => import('@pages/base/hrorg-address-edit-view/hrorg-address-edit-view.vue')); Vue.component('hrorg-address-edit-view', () => import('@pages/base/hrorg-address-edit-view/hrorg-address-edit-view.vue'));
Vue.component('hrpost-v-002', () => import('@pages/human-resource/hrpost-v-002/hrpost-v-002.vue'));
Vue.component('hrorg-contact-grid-view', () => import('@pages/base/hrorg-contact-grid-view/hrorg-contact-grid-view.vue')); Vue.component('hrorg-contact-grid-view', () => import('@pages/base/hrorg-contact-grid-view/hrorg-contact-grid-view.vue'));
Vue.component('hromhierarchy-cat-grid-view', () => import('@pages/base/hromhierarchy-cat-grid-view/hromhierarchy-cat-grid-view.vue')); Vue.component('hromhierarchy-cat-grid-view', () => import('@pages/base/hromhierarchy-cat-grid-view/hromhierarchy-cat-grid-view.vue'));
Vue.component('hrorganization-edit-view', () => import('@pages/base/hrorganization-edit-view/hrorganization-edit-view.vue')); Vue.component('hrorganization-edit-view', () => import('@pages/base/hrorganization-edit-view/hrorganization-edit-view.vue'));
Vue.component('hroperation-unit-v-001', () => import('@pages/base/hroperation-unit-v-001/hroperation-unit-v-001.vue')); Vue.component('hroperation-unit-v-001', () => import('@pages/base/hroperation-unit-v-001/hroperation-unit-v-001.vue'));
Vue.component('hroperation-unit-grid-view', () => import('@pages/base/hroperation-unit-grid-view/hroperation-unit-grid-view.vue')); Vue.component('hroperation-unit-grid-view', () => import('@pages/base/hroperation-unit-grid-view/hroperation-unit-grid-view.vue'));
Vue.component('hrduty-pickup-grid-view', () => import('@pages/human-resource/hrduty-pickup-grid-view/hrduty-pickup-grid-view.vue'));
Vue.component('hromhierarchy-pickup-view', () => import('@pages/base/hromhierarchy-pickup-view/hromhierarchy-pickup-view.vue')); Vue.component('hromhierarchy-pickup-view', () => import('@pages/base/hromhierarchy-pickup-view/hromhierarchy-pickup-view.vue'));
Vue.component('hrpost-tab-exp-view', () => import('@pages/human-resource/hrpost-tab-exp-view/hrpost-tab-exp-view.vue'));
Vue.component('hremployee-grid-view', () => import('@pages/human-resource/hremployee-grid-view/hremployee-grid-view.vue')); Vue.component('hremployee-grid-view', () => import('@pages/human-resource/hremployee-grid-view/hremployee-grid-view.vue'));
Vue.component('hrpost-v-003', () => import('@pages/human-resource/hrpost-v-003/hrpost-v-003.vue'));
Vue.component('hrlegal-tab-exp-view', () => import('@pages/base/hrlegal-tab-exp-view/hrlegal-tab-exp-view.vue')); Vue.component('hrlegal-tab-exp-view', () => import('@pages/base/hrlegal-tab-exp-view/hrlegal-tab-exp-view.vue'));
Vue.component('hrorg-contact-v-001', () => import('@pages/base/hrorg-contact-v-001/hrorg-contact-v-001.vue')); Vue.component('hrorg-contact-v-001', () => import('@pages/base/hrorg-contact-v-001/hrorg-contact-v-001.vue'));
Vue.component('hrorg-address-v-001', () => import('@pages/base/hrorg-address-v-001/hrorg-address-v-001.vue')); Vue.component('hrorg-address-v-001', () => import('@pages/base/hrorg-address-v-001/hrorg-address-v-001.vue'));
Vue.component('hroperation-unit-dashboard-view', () => import('@pages/base/hroperation-unit-dashboard-view/hroperation-unit-dashboard-view.vue')); Vue.component('hroperation-unit-dashboard-view', () => import('@pages/base/hroperation-unit-dashboard-view/hroperation-unit-dashboard-view.vue'));
Vue.component('hrpost-v-001', () => import('@pages/human-resource/hrpost-v-001/hrpost-v-001.vue'));
Vue.component('hromhierarchy-grid-view', () => import('@pages/base/hromhierarchy-grid-view/hromhierarchy-grid-view.vue')); Vue.component('hromhierarchy-grid-view', () => import('@pages/base/hromhierarchy-grid-view/hromhierarchy-grid-view.vue'));
Vue.component('hromhierarchy-cat-pickup-grid-view', () => import('@pages/base/hromhierarchy-cat-pickup-grid-view/hromhierarchy-cat-pickup-grid-view.vue')); Vue.component('hromhierarchy-cat-pickup-grid-view', () => import('@pages/base/hromhierarchy-cat-pickup-grid-view/hromhierarchy-cat-pickup-grid-view.vue'));
Vue.component('hroperation-unit-v-002', () => import('@pages/base/hroperation-unit-v-002/hroperation-unit-v-002.vue')); Vue.component('hroperation-unit-v-002', () => import('@pages/base/hroperation-unit-v-002/hroperation-unit-v-002.vue'));
Vue.component('hromhierarchy-cat-pickup-view', () => import('@pages/base/hromhierarchy-cat-pickup-view/hromhierarchy-cat-pickup-view.vue')); Vue.component('hromhierarchy-cat-pickup-view', () => import('@pages/base/hromhierarchy-cat-pickup-view/hromhierarchy-cat-pickup-view.vue'));
Vue.component('hrlegal-edit-view', () => import('@pages/base/hrlegal-edit-view/hrlegal-edit-view.vue')); Vue.component('hrlegal-edit-view', () => import('@pages/base/hrlegal-edit-view/hrlegal-edit-view.vue'));
Vue.component('hrorganization-pickup-view', () => import('@pages/base/hrorganization-pickup-view/hrorganization-pickup-view.vue')); Vue.component('hrorganization-pickup-view', () => import('@pages/base/hrorganization-pickup-view/hrorganization-pickup-view.vue'));
Vue.component('hrorganization-grid-view', () => import('@pages/base/hrorganization-grid-view/hrorganization-grid-view.vue')); Vue.component('hrduty-pickup-view', () => import('@pages/human-resource/hrduty-pickup-view/hrduty-pickup-view.vue'));
Vue.component('hromhierarchy-edit-view', () => import('@pages/base/hromhierarchy-edit-view/hromhierarchy-edit-view.vue')); Vue.component('hromhierarchy-edit-view', () => import('@pages/base/hromhierarchy-edit-view/hromhierarchy-edit-view.vue'));
Vue.component('hrorganization-grid-view', () => import('@pages/base/hrorganization-grid-view/hrorganization-grid-view.vue'));
Vue.component('hromhierarchy-cat-edit-view', () => import('@pages/base/hromhierarchy-cat-edit-view/hromhierarchy-cat-edit-view.vue')); Vue.component('hromhierarchy-cat-edit-view', () => import('@pages/base/hromhierarchy-cat-edit-view/hromhierarchy-cat-edit-view.vue'));
Vue.component('hrorg-contact-edit-view', () => import('@pages/base/hrorg-contact-edit-view/hrorg-contact-edit-view.vue')); Vue.component('hrorg-contact-edit-view', () => import('@pages/base/hrorg-contact-edit-view/hrorg-contact-edit-view.vue'));
Vue.component('hromhierarchy-tree-exp-view', () => import('@pages/base/hromhierarchy-tree-exp-view/hromhierarchy-tree-exp-view.vue')); Vue.component('hromhierarchy-tree-exp-view', () => import('@pages/base/hromhierarchy-tree-exp-view/hromhierarchy-tree-exp-view.vue'));
...@@ -34,5 +41,6 @@ export const PageComponents = { ...@@ -34,5 +41,6 @@ export const PageComponents = {
Vue.component('hrorganization-pickup-grid-view', () => import('@pages/base/hrorganization-pickup-grid-view/hrorganization-pickup-grid-view.vue')); Vue.component('hrorganization-pickup-grid-view', () => import('@pages/base/hrorganization-pickup-grid-view/hrorganization-pickup-grid-view.vue'));
Vue.component('hrlegal-dashboard-view', () => import('@pages/base/hrlegal-dashboard-view/hrlegal-dashboard-view.vue')); Vue.component('hrlegal-dashboard-view', () => import('@pages/base/hrlegal-dashboard-view/hrlegal-dashboard-view.vue'));
Vue.component('hrlegal-v-001', () => import('@pages/base/hrlegal-v-001/hrlegal-v-001.vue')); Vue.component('hrlegal-v-001', () => import('@pages/base/hrlegal-v-001/hrlegal-v-001.vue'));
Vue.component('hrpost-edit-view', () => import('@pages/human-resource/hrpost-edit-view/hrpost-edit-view.vue'));
} }
}; };
\ No newline at end of file
...@@ -57,6 +57,20 @@ const router = new Router({ ...@@ -57,6 +57,20 @@ const router = new Router({
}, },
component: () => import('@pages/base/hroperation-unit-edit-view/hroperation-unit-edit-view.vue'), component: () => import('@pages/base/hroperation-unit-edit-view/hroperation-unit-edit-view.vue'),
}, },
{
path: 'hrposts/:hrpost?/gridview/:gridview?',
meta: {
caption: 'entities.hrpost.views.gridview.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hrposts', parameterName: 'hrpost' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/human-resource/hrpost-grid-view/hrpost-grid-view.vue'),
},
{ {
path: 'hroperationunits/:hroperationunit?/hrorgaddresses/:hrorgaddress?/editview/:editview?', path: 'hroperationunits/:hroperationunit?/hrorgaddresses/:hrorgaddress?/editview/:editview?',
meta: { meta: {
...@@ -101,6 +115,20 @@ const router = new Router({ ...@@ -101,6 +115,20 @@ const router = new Router({
}, },
component: () => import('@pages/base/hrorg-address-edit-view/hrorg-address-edit-view.vue'), component: () => import('@pages/base/hrorg-address-edit-view/hrorg-address-edit-view.vue'),
}, },
{
path: 'hrposts/:hrpost?/v_002/:v_002?',
meta: {
caption: 'entities.hrpost.views.v_002.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hrposts', parameterName: 'hrpost' },
{ pathName: 'v_002', parameterName: 'v_002' },
],
requireAuth: true,
},
component: () => import('@pages/human-resource/hrpost-v-002/hrpost-v-002.vue'),
},
{ {
path: 'hroperationunits/:hroperationunit?/hrorgcontacts/:hrorgcontact?/gridview/:gridview?', path: 'hroperationunits/:hroperationunit?/hrorgcontacts/:hrorgcontact?/gridview/:gridview?',
meta: { meta: {
...@@ -201,6 +229,20 @@ const router = new Router({ ...@@ -201,6 +229,20 @@ const router = new Router({
}, },
component: () => import('@pages/base/hroperation-unit-grid-view/hroperation-unit-grid-view.vue'), component: () => import('@pages/base/hroperation-unit-grid-view/hroperation-unit-grid-view.vue'),
}, },
{
path: 'hrduties/:hrduty?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.hrduty.views.pickupgridview.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hrduties', parameterName: 'hrduty' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/human-resource/hrduty-pickup-grid-view/hrduty-pickup-grid-view.vue'),
},
{ {
path: 'hromhierarchycats/:hromhierarchycat?/hromhierarchies/:hromhierarchy?/pickupview/:pickupview?', path: 'hromhierarchycats/:hromhierarchycat?/hromhierarchies/:hromhierarchy?/pickupview/:pickupview?',
meta: { meta: {
...@@ -230,6 +272,20 @@ const router = new Router({ ...@@ -230,6 +272,20 @@ const router = new Router({
}, },
component: () => import('@pages/base/hromhierarchy-pickup-view/hromhierarchy-pickup-view.vue'), component: () => import('@pages/base/hromhierarchy-pickup-view/hromhierarchy-pickup-view.vue'),
}, },
{
path: 'hrposts/:hrpost?/tabexpview/:tabexpview?',
meta: {
caption: 'entities.hrpost.views.tabexpview.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hrposts', parameterName: 'hrpost' },
{ pathName: 'tabexpview', parameterName: 'tabexpview' },
],
requireAuth: true,
},
component: () => import('@pages/human-resource/hrpost-tab-exp-view/hrpost-tab-exp-view.vue'),
},
{ {
path: 'hremployees/:hremployee?/gridview/:gridview?', path: 'hremployees/:hremployee?/gridview/:gridview?',
meta: { meta: {
...@@ -244,6 +300,20 @@ const router = new Router({ ...@@ -244,6 +300,20 @@ const router = new Router({
}, },
component: () => import('@pages/human-resource/hremployee-grid-view/hremployee-grid-view.vue'), component: () => import('@pages/human-resource/hremployee-grid-view/hremployee-grid-view.vue'),
}, },
{
path: 'hrposts/:hrpost?/v_003/:v_003?',
meta: {
caption: 'entities.hrpost.views.v_003.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hrposts', parameterName: 'hrpost' },
{ pathName: 'v_003', parameterName: 'v_003' },
],
requireAuth: true,
},
component: () => import('@pages/human-resource/hrpost-v-003/hrpost-v-003.vue'),
},
{ {
path: 'hrlegals/:hrlegal?/tabexpview/:tabexpview?', path: 'hrlegals/:hrlegal?/tabexpview/:tabexpview?',
meta: { meta: {
...@@ -360,6 +430,20 @@ const router = new Router({ ...@@ -360,6 +430,20 @@ const router = new Router({
}, },
component: () => import('@pages/base/hroperation-unit-dashboard-view/hroperation-unit-dashboard-view.vue'), component: () => import('@pages/base/hroperation-unit-dashboard-view/hroperation-unit-dashboard-view.vue'),
}, },
{
path: 'hrposts/:hrpost?/v_001/:v_001?',
meta: {
caption: 'entities.hrpost.views.v_001.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hrposts', parameterName: 'hrpost' },
{ pathName: 'v_001', parameterName: 'v_001' },
],
requireAuth: true,
},
component: () => import('@pages/human-resource/hrpost-v-001/hrpost-v-001.vue'),
},
{ {
path: 'hromhierarchycats/:hromhierarchycat?/hromhierarchies/:hromhierarchy?/gridview/:gridview?', path: 'hromhierarchycats/:hromhierarchycat?/hromhierarchies/:hromhierarchy?/gridview/:gridview?',
meta: { meta: {
...@@ -460,18 +544,18 @@ const router = new Router({ ...@@ -460,18 +544,18 @@ const router = new Router({
component: () => import('@pages/base/hrorganization-pickup-view/hrorganization-pickup-view.vue'), component: () => import('@pages/base/hrorganization-pickup-view/hrorganization-pickup-view.vue'),
}, },
{ {
path: 'hrorganizations/:hrorganization?/gridview/:gridview?', path: 'hrduties/:hrduty?/pickupview/:pickupview?',
meta: { meta: {
caption: 'entities.hrorganization.views.gridview.title', caption: 'entities.hrduty.views.pickupview.title',
info:'', info:'',
parameters: [ parameters: [
{ pathName: 'pim', parameterName: 'pim' }, { pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hrorganizations', parameterName: 'hrorganization' }, { pathName: 'hrduties', parameterName: 'hrduty' },
{ pathName: 'gridview', parameterName: 'gridview' }, { pathName: 'pickupview', parameterName: 'pickupview' },
], ],
requireAuth: true, requireAuth: true,
}, },
component: () => import('@pages/base/hrorganization-grid-view/hrorganization-grid-view.vue'), component: () => import('@pages/human-resource/hrduty-pickup-view/hrduty-pickup-view.vue'),
}, },
{ {
path: 'hromhierarchycats/:hromhierarchycat?/hromhierarchies/:hromhierarchy?/editview/:editview?', path: 'hromhierarchycats/:hromhierarchycat?/hromhierarchies/:hromhierarchy?/editview/:editview?',
...@@ -502,6 +586,20 @@ const router = new Router({ ...@@ -502,6 +586,20 @@ const router = new Router({
}, },
component: () => import('@pages/base/hromhierarchy-edit-view/hromhierarchy-edit-view.vue'), component: () => import('@pages/base/hromhierarchy-edit-view/hromhierarchy-edit-view.vue'),
}, },
{
path: 'hrorganizations/:hrorganization?/gridview/:gridview?',
meta: {
caption: 'entities.hrorganization.views.gridview.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hrorganizations', parameterName: 'hrorganization' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/base/hrorganization-grid-view/hrorganization-grid-view.vue'),
},
{ {
path: 'hromhierarchycats/:hromhierarchycat?/editview/:editview?', path: 'hromhierarchycats/:hromhierarchycat?/editview/:editview?',
meta: { meta: {
...@@ -774,6 +872,20 @@ const router = new Router({ ...@@ -774,6 +872,20 @@ const router = new Router({
}, },
component: () => import('@pages/base/hrlegal-v-001/hrlegal-v-001.vue'), component: () => import('@pages/base/hrlegal-v-001/hrlegal-v-001.vue'),
}, },
{
path: 'hrposts/:hrpost?/editview/:editview?',
meta: {
caption: 'entities.hrpost.views.editview.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hrposts', parameterName: 'hrpost' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/human-resource/hrpost-edit-view/hrpost-edit-view.vue'),
},
...indexRoutes, ...indexRoutes,
], ],
}, },
......
...@@ -48,7 +48,9 @@ export class EntityServiceRegister { ...@@ -48,7 +48,9 @@ export class EntityServiceRegister {
this.allEntityService.set('hromhierarchypurpose', () => import('@/service/hromhierarchypurpose/hromhierarchypurpose-service')); this.allEntityService.set('hromhierarchypurpose', () => import('@/service/hromhierarchypurpose/hromhierarchypurpose-service'));
this.allEntityService.set('hromhierarchy', () => import('@/service/hromhierarchy/hromhierarchy-service')); this.allEntityService.set('hromhierarchy', () => import('@/service/hromhierarchy/hromhierarchy-service'));
this.allEntityService.set('hrorgaddress', () => import('@/service/hrorg-address/hrorg-address-service')); this.allEntityService.set('hrorgaddress', () => import('@/service/hrorg-address/hrorg-address-service'));
this.allEntityService.set('hrpost', () => import('@/service/hrpost/hrpost-service'));
this.allEntityService.set('hrorganization', () => import('@/service/hrorganization/hrorganization-service')); this.allEntityService.set('hrorganization', () => import('@/service/hrorganization/hrorganization-service'));
this.allEntityService.set('hrduty', () => import('@/service/hrduty/hrduty-service'));
} }
/** /**
......
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
/**
* 职务服务对象基类
*
* @export
* @class HRDutyServiceBase
* @extends {EntityServie}
*/
export default class HRDutyServiceBase extends EntityService {
/**
* Creates an instance of HRDutyServiceBase.
*
* @param {*} [opts={}]
* @memberof HRDutyServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础数据
*
* @memberof HRDutyServiceBase
*/
public initBasicData(){
this.APPLYDEKEY ='hrduty';
this.APPDEKEY = 'hrdutyid';
this.APPDENAME = 'hrduties';
this.APPDETEXT = 'hrdutyname';
this.APPNAME = 'pim';
this.SYSTEMNAME = 'ibizhumanresources';
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRDutyServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/hrduties/${context.hrduty}/select`,isloading);
return res;
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRDutyServiceBase
*/
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(`/hrduties`,data,isloading);
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRDutyServiceBase
*/
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(`/hrduties/${context.hrduty}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRDutyServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/hrduties/${context.hrduty}`,isloading);
return res;
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRDutyServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/hrduties/${context.hrduty}`,isloading);
return res;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRDutyServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/hrduties/getdraft`,isloading);
res.data.hrduty = data.hrduty;
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRDutyServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/hrduties/${context.hrduty}/checkkey`,data,isloading);
return res;
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRDutyServiceBase
*/
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(`/hrduties/${context.hrduty}/save`,data,isloading);
return res;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRDutyServiceBase
*/
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(`/hrduties/fetchdefault`,tempData,isloading);
return res;
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import HRDutyServiceBase from './hrduty-service-base';
/**
* 职务服务对象
*
* @export
* @class HRDutyService
* @extends {HRDutyServiceBase}
*/
export default class HRDutyService extends HRDutyServiceBase {
/**
* Creates an instance of HRDutyService.
*
* @param {*} [opts={}]
* @memberof HRDutyService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
/**
* 职位服务对象基类
*
* @export
* @class HRPostServiceBase
* @extends {EntityServie}
*/
export default class HRPostServiceBase extends EntityService {
/**
* Creates an instance of HRPostServiceBase.
*
* @param {*} [opts={}]
* @memberof HRPostServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础数据
*
* @memberof HRPostServiceBase
*/
public initBasicData(){
this.APPLYDEKEY ='hrpost';
this.APPDEKEY = 'hrpostid';
this.APPDENAME = 'hrposts';
this.APPDETEXT = 'hrpostname';
this.APPNAME = 'pim';
this.SYSTEMNAME = 'ibizhumanresources';
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRPostServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/hrposts/${context.hrpost}/select`,isloading);
return res;
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRPostServiceBase
*/
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(`/hrposts`,data,isloading);
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRPostServiceBase
*/
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(`/hrposts/${context.hrpost}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRPostServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/hrposts/${context.hrpost}`,isloading);
return res;
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRPostServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/hrposts/${context.hrpost}`,isloading);
return res;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRPostServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/hrposts/getdraft`,isloading);
res.data.hrpost = data.hrpost;
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRPostServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/hrposts/${context.hrpost}/checkkey`,data,isloading);
return res;
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRPostServiceBase
*/
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(`/hrposts/${context.hrpost}/save`,data,isloading);
return res;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof HRPostServiceBase
*/
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(`/hrposts/fetchdefault`,tempData,isloading);
return res;
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import HRPostServiceBase from './hrpost-service-base';
/**
* 职位服务对象
*
* @export
* @class HRPostService
* @extends {HRPostServiceBase}
*/
export default class HRPostService extends HRPostServiceBase {
/**
* Creates an instance of HRPostService.
*
* @param {*} [opts={}]
* @memberof HRPostService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
...@@ -147,6 +147,26 @@ export const viewstate: any = { ...@@ -147,6 +147,26 @@ export const viewstate: any = {
'90f2bd2f58c482b25a1e1db0f8e4ca26', '90f2bd2f58c482b25a1e1db0f8e4ca26',
], ],
}, },
{
viewtag: '3274463a5fe4c1bcb99fee2240c044ed',
viewmodule: 'HumanResource',
viewname: 'HRPostV_003',
viewaction: '',
viewdatachange: false,
refviews: [
'7ad274dc8cc9e8f7e464195ca0953dc3',
],
},
{
viewtag: '3b1d535a219b7256d7ada3a1a7f5120d',
viewmodule: 'HumanResource',
viewname: 'HRPostV_002',
viewaction: '',
viewdatachange: false,
refviews: [
'7ad274dc8cc9e8f7e464195ca0953dc3',
],
},
{ {
viewtag: '41036146909ab3f28ff59b80370514b2', viewtag: '41036146909ab3f28ff59b80370514b2',
viewmodule: 'Base', viewmodule: 'Base',
...@@ -166,6 +186,7 @@ export const viewstate: any = { ...@@ -166,6 +186,7 @@ export const viewstate: any = {
viewdatachange: false, viewdatachange: false,
refviews: [ refviews: [
'286e8ac9eca7b6eb8058fde93995db10', '286e8ac9eca7b6eb8058fde93995db10',
'bae1de77dc5bd2584e2dcf7201a06495',
'9559258a9c3ac118e15ead941b780682', '9559258a9c3ac118e15ead941b780682',
'0d8ac739134947cc5f6545d4041024de', '0d8ac739134947cc5f6545d4041024de',
'41036146909ab3f28ff59b80370514b2', '41036146909ab3f28ff59b80370514b2',
...@@ -215,6 +236,17 @@ export const viewstate: any = { ...@@ -215,6 +236,17 @@ export const viewstate: any = {
'811880336a6c1c1beeb894c91404544b', '811880336a6c1c1beeb894c91404544b',
], ],
}, },
{
viewtag: '7ad274dc8cc9e8f7e464195ca0953dc3',
viewmodule: 'HumanResource',
viewname: 'HRPostEditView',
viewaction: '',
viewdatachange: false,
refviews: [
'e7ba37699bd458dc8dd5c02abac8dadd',
'ebcbf493e0a574cf170412456645a3a7',
],
},
{ {
viewtag: '811880336a6c1c1beeb894c91404544b', viewtag: '811880336a6c1c1beeb894c91404544b',
viewmodule: 'Base', viewmodule: 'Base',
...@@ -272,6 +304,16 @@ export const viewstate: any = { ...@@ -272,6 +304,16 @@ export const viewstate: any = {
refviews: [ refviews: [
], ],
}, },
{
viewtag: 'b4b751d7088fd1c29aed976e9e9528b2',
viewmodule: 'HumanResource',
viewname: 'HRPostV_001',
viewaction: '',
viewdatachange: false,
refviews: [
'7ad274dc8cc9e8f7e464195ca0953dc3',
],
},
{ {
viewtag: 'b4ef4b87eb87fc3a2a8479027d62ac4c', viewtag: 'b4ef4b87eb87fc3a2a8479027d62ac4c',
viewmodule: 'Base', viewmodule: 'Base',
...@@ -290,6 +332,19 @@ export const viewstate: any = { ...@@ -290,6 +332,19 @@ export const viewstate: any = {
refviews: [ refviews: [
], ],
}, },
{
viewtag: 'bae1de77dc5bd2584e2dcf7201a06495',
viewmodule: 'HumanResource',
viewname: 'HRPostTabExpView',
viewaction: '',
viewdatachange: false,
refviews: [
'3274463a5fe4c1bcb99fee2240c044ed',
'd5b65e4ae9fc38e66c7faf5698dc6776',
'b4b751d7088fd1c29aed976e9e9528b2',
'3b1d535a219b7256d7ada3a1a7f5120d',
],
},
{ {
viewtag: 'bf1effbdf9fb9d7d2a1c9d281ab35441', viewtag: 'bf1effbdf9fb9d7d2a1c9d281ab35441',
viewmodule: 'Base', viewmodule: 'Base',
...@@ -322,6 +377,25 @@ export const viewstate: any = { ...@@ -322,6 +377,25 @@ export const viewstate: any = {
refviews: [ refviews: [
], ],
}, },
{
viewtag: 'd5b65e4ae9fc38e66c7faf5698dc6776',
viewmodule: 'HumanResource',
viewname: 'HRPostGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'7ad274dc8cc9e8f7e464195ca0953dc3',
],
},
{
viewtag: 'de53ae7d577a526b3b268951df885868',
viewmodule: 'HumanResource',
viewname: 'HRDutyPickupGridView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{ {
viewtag: 'e249cd84a7d955affe21832bbe41c40a', viewtag: 'e249cd84a7d955affe21832bbe41c40a',
viewmodule: 'Base', viewmodule: 'Base',
...@@ -351,6 +425,16 @@ export const viewstate: any = { ...@@ -351,6 +425,16 @@ export const viewstate: any = {
'07e98f33b8d972b70860e615aaa10b89', '07e98f33b8d972b70860e615aaa10b89',
], ],
}, },
{
viewtag: 'ebcbf493e0a574cf170412456645a3a7',
viewmodule: 'HumanResource',
viewname: 'HRDutyPickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'de53ae7d577a526b3b268951df885868',
],
},
{ {
viewtag: 'f6a6d0da81100b5a69aba1b9b967b6ab', viewtag: 'f6a6d0da81100b5a69aba1b9b967b6ab',
viewmodule: 'Base', viewmodule: 'Base',
......
import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import HRDutyService from '@/service/hrduty/hrduty-service';
import HRDutyAuthService from '@/authservice/hrduty/hrduty-auth-service';
/**
* 职务UI服务对象基类
*
* @export
* @class HRDutyUIServiceBase
*/
export default class HRDutyUIServiceBase extends UIService {
/**
* 是否支持工作流
*
* @memberof HRDutyUIServiceBase
*/
public isEnableWorkflow:boolean = false;
/**
* 当前UI服务对应的数据服务对象
*
* @memberof HRDutyUIServiceBase
*/
public dataService:HRDutyService = new HRDutyService();
/**
* 所有关联视图
*
* @memberof HRDutyUIServiceBase
*/
public allViewMap: Map<string, Object> = new Map();
/**
* 状态值
*
* @memberof HRDutyUIServiceBase
*/
public stateValue: number = 0;
/**
* 状态属性
*
* @memberof HRDutyUIServiceBase
*/
public stateField: string = "";
/**
* 主状态属性集合
*
* @memberof HRDutyUIServiceBase
*/
public mainStateFields:Array<any> = [];
/**
* 主状态集合Map
*
* @memberof HRDutyUIServiceBase
*/
public allDeMainStateMap:Map<string,string> = new Map();
/**
* 主状态操作标识Map
*
* @memberof HRDutyUIServiceBase
*/
public allDeMainStateOPPrivsMap:Map<string,any> = new Map();
/**
* Creates an instance of HRDutyUIServiceBase.
*
* @param {*} [opts={}]
* @memberof HRDutyUIServiceBase
*/
constructor(opts: any = {}) {
super(opts);
this.authService = new HRDutyAuthService(opts);
this.initViewMap();
this.initDeMainStateMap();
this.initDeMainStateOPPrivsMap();
}
/**
* 初始化视图Map
*
* @memberof HRDutyUIServiceBase
*/
public initViewMap(){
this.allViewMap.set(':',{viewname:'pickupgridview',srfappde:'hrduties'});
this.allViewMap.set('PICKUPVIEW:',{viewname:'pickupview',srfappde:'hrduties'});
}
/**
* 初始化主状态集合
*
* @memberof HRDutyUIServiceBase
*/
public initDeMainStateMap(){
}
/**
* 初始化主状态操作标识
*
* @memberof HRDutyUIServiceBase
*/
public initDeMainStateOPPrivsMap(){
}
/**
* 获取指定数据的重定向页面
*
* @param srfkey 数据主键
* @param isEnableWorkflow 重定向视图是否需要处理流程中的数据
* @memberof HRDutyUIServiceBase
*/
public async getRDAppView(srfkey:string,isEnableWorkflow:boolean){
this.isEnableWorkflow = isEnableWorkflow;
// 进行数据查询
let result:any = await this.dataService.Get({hrduty: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 HRDutyUIServiceBase
*/
public getRealDEType(entity:any){
}
/**
* 获取实体单数据实体视图预定义参数
*
* @param curData 当前数据
* @param bDataInWF 是否有数据在工作流中
* @param bWFMode 是否工作流模式
* @memberof HRDutyUIServiceBase
*/
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 HRDutyUIServiceBase
*/
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 HRDutyUIServiceBase
*/
public getDEMainStateOPPrivs(data:any){
if(this.getDEMainStateTag(data)){
return this.allDeMainStateOPPrivsMap.get((this.getDEMainStateTag(data) as string));
}else{
return null;
}
}
/**
* 获取数据对象所有的操作标识
*
* @param data 当前数据
* @memberof HRDutyUIServiceBase
*/
public getAllOPPrivs(data:any){
return this.authService.getOPPrivs(this.getDEMainStateOPPrivs(data));
}
}
\ No newline at end of file
import HRDutyUIServiceBase from './hrduty-ui-service-base';
/**
* 职务UI服务对象
*
* @export
* @class HRDutyUIService
*/
export default class HRDutyUIService extends HRDutyUIServiceBase {
/**
* Creates an instance of HRDutyUIService.
*
* @param {*} [opts={}]
* @memberof HRDutyUIService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import HRPostService from '@/service/hrpost/hrpost-service';
import HRPostAuthService from '@/authservice/hrpost/hrpost-auth-service';
/**
* 职位UI服务对象基类
*
* @export
* @class HRPostUIServiceBase
*/
export default class HRPostUIServiceBase extends UIService {
/**
* 是否支持工作流
*
* @memberof HRPostUIServiceBase
*/
public isEnableWorkflow:boolean = false;
/**
* 当前UI服务对应的数据服务对象
*
* @memberof HRPostUIServiceBase
*/
public dataService:HRPostService = new HRPostService();
/**
* 所有关联视图
*
* @memberof HRPostUIServiceBase
*/
public allViewMap: Map<string, Object> = new Map();
/**
* 状态值
*
* @memberof HRPostUIServiceBase
*/
public stateValue: number = 0;
/**
* 状态属性
*
* @memberof HRPostUIServiceBase
*/
public stateField: string = "";
/**
* 主状态属性集合
*
* @memberof HRPostUIServiceBase
*/
public mainStateFields:Array<any> = [];
/**
* 主状态集合Map
*
* @memberof HRPostUIServiceBase
*/
public allDeMainStateMap:Map<string,string> = new Map();
/**
* 主状态操作标识Map
*
* @memberof HRPostUIServiceBase
*/
public allDeMainStateOPPrivsMap:Map<string,any> = new Map();
/**
* Creates an instance of HRPostUIServiceBase.
*
* @param {*} [opts={}]
* @memberof HRPostUIServiceBase
*/
constructor(opts: any = {}) {
super(opts);
this.authService = new HRPostAuthService(opts);
this.initViewMap();
this.initDeMainStateMap();
this.initDeMainStateOPPrivsMap();
}
/**
* 初始化视图Map
*
* @memberof HRPostUIServiceBase
*/
public initViewMap(){
this.allViewMap.set(':',{viewname:'v_003',srfappde:'hrposts'});
this.allViewMap.set(':',{viewname:'v_002',srfappde:'hrposts'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'hrposts'});
this.allViewMap.set(':',{viewname:'v_001',srfappde:'hrposts'});
this.allViewMap.set(':',{viewname:'tabexpview',srfappde:'hrposts'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'hrposts'});
}
/**
* 初始化主状态集合
*
* @memberof HRPostUIServiceBase
*/
public initDeMainStateMap(){
}
/**
* 初始化主状态操作标识
*
* @memberof HRPostUIServiceBase
*/
public initDeMainStateOPPrivsMap(){
}
/**
* 获取指定数据的重定向页面
*
* @param srfkey 数据主键
* @param isEnableWorkflow 重定向视图是否需要处理流程中的数据
* @memberof HRPostUIServiceBase
*/
public async getRDAppView(srfkey:string,isEnableWorkflow:boolean){
this.isEnableWorkflow = isEnableWorkflow;
// 进行数据查询
let result:any = await this.dataService.Get({hrpost: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 HRPostUIServiceBase
*/
public getRealDEType(entity:any){
}
/**
* 获取实体单数据实体视图预定义参数
*
* @param curData 当前数据
* @param bDataInWF 是否有数据在工作流中
* @param bWFMode 是否工作流模式
* @memberof HRPostUIServiceBase
*/
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 HRPostUIServiceBase
*/
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 HRPostUIServiceBase
*/
public getDEMainStateOPPrivs(data:any){
if(this.getDEMainStateTag(data)){
return this.allDeMainStateOPPrivsMap.get((this.getDEMainStateTag(data) as string));
}else{
return null;
}
}
/**
* 获取数据对象所有的操作标识
*
* @param data 当前数据
* @memberof HRPostUIServiceBase
*/
public getAllOPPrivs(data:any){
return this.authService.getOPPrivs(this.getDEMainStateOPPrivs(data));
}
}
\ No newline at end of file
import HRPostUIServiceBase from './hrpost-ui-service-base';
/**
* 职位UI服务对象
*
* @export
* @class HRPostUIService
*/
export default class HRPostUIService extends HRPostUIServiceBase {
/**
* Creates an instance of HRPostUIService.
*
* @param {*} [opts={}]
* @memberof HRPostUIService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
...@@ -48,7 +48,9 @@ export class UIServiceRegister { ...@@ -48,7 +48,9 @@ export class UIServiceRegister {
this.allUIService.set('hromhierarchypurpose', () => import('@/uiservice/hromhierarchypurpose/hromhierarchypurpose-ui-service')); this.allUIService.set('hromhierarchypurpose', () => import('@/uiservice/hromhierarchypurpose/hromhierarchypurpose-ui-service'));
this.allUIService.set('hromhierarchy', () => import('@/uiservice/hromhierarchy/hromhierarchy-ui-service')); this.allUIService.set('hromhierarchy', () => import('@/uiservice/hromhierarchy/hromhierarchy-ui-service'));
this.allUIService.set('hrorgaddress', () => import('@/uiservice/hrorg-address/hrorg-address-ui-service')); this.allUIService.set('hrorgaddress', () => import('@/uiservice/hrorg-address/hrorg-address-ui-service'));
this.allUIService.set('hrpost', () => import('@/uiservice/hrpost/hrpost-ui-service'));
this.allUIService.set('hrorganization', () => import('@/uiservice/hrorganization/hrorganization-ui-service')); this.allUIService.set('hrorganization', () => import('@/uiservice/hrorganization/hrorganization-ui-service'));
this.allUIService.set('hrduty', () => import('@/uiservice/hrduty/hrduty-ui-service'));
} }
/** /**
......
...@@ -15,18 +15,20 @@ export class PIMBase extends Vue { ...@@ -15,18 +15,20 @@ export class PIMBase extends Vue {
if (item) { if (item) {
let judge = true; let judge = true;
switch (item.appfunctag) { switch (item.appfunctag) {
case '_6': case '_7':
this.click_6(item); break; this.click_7(item); break;
case '_3': case '_3':
this.click_3(item); break; this.click_3(item); break;
case '_2': case '_2':
this.click_2(item); break; this.click_2(item); break;
case '_4': case '_4':
this.click_4(item); break; this.click_4(item); break;
case '_7':
this.click_7(item); break;
case '_5': case '_5':
this.click_5(item); break; this.click_5(item); break;
case '_8':
this.click_8(item); break;
case '_6':
this.click_6(item); break;
default: default:
judge = false; judge = false;
console.warn('未指定应用功能'); console.warn('未指定应用功能');
...@@ -43,7 +45,7 @@ export class PIMBase extends Vue { ...@@ -43,7 +45,7 @@ export class PIMBase extends Vue {
* @param {*} [item={}] * @param {*} [item={}]
* @memberof PIM * @memberof PIM
*/ */
public click_6(item: any = {}) { public click_7(item: any = {}) {
const viewparam: any = {}; const viewparam: any = {};
Object.assign(viewparam, {}); Object.assign(viewparam, {});
const deResParameters: any[] = []; const deResParameters: any[] = [];
...@@ -129,13 +131,36 @@ export class PIMBase extends Vue { ...@@ -129,13 +131,36 @@ export class PIMBase extends Vue {
}) })
} }
/**
* 职位
*
* @param {*} [item={}]
* @memberof PIM
*/
public click_5(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'hrposts', parameterName: 'hrpost' },
{ pathName: 'tabexpview', parameterName: 'tabexpview' },
];
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={}] * @param {*} [item={}]
* @memberof PIM * @memberof PIM
*/ */
public click_7(item: any = {}) { public click_8(item: any = {}) {
const viewparam: any = {}; const viewparam: any = {};
Object.assign(viewparam, {}); Object.assign(viewparam, {});
const deResParameters: any[] = []; const deResParameters: any[] = [];
...@@ -158,7 +183,7 @@ export class PIMBase extends Vue { ...@@ -158,7 +183,7 @@ export class PIMBase extends Vue {
* @param {*} [item={}] * @param {*} [item={}]
* @memberof PIM * @memberof PIM
*/ */
public click_5(item: any = {}) { public click_6(item: any = {}) {
const viewparam: any = {}; const viewparam: any = {};
Object.assign(viewparam, {}); Object.assign(viewparam, {});
const deResParameters: any[] = []; const deResParameters: any[] = [];
......
...@@ -231,7 +231,7 @@ export default class PIMModel { ...@@ -231,7 +231,7 @@ export default class PIMModel {
iconcls: 'fa fa-signal', iconcls: 'fa fa-signal',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '_7', appfunctag: '_8',
appfuncyype: 'APPVIEW', appfuncyype: 'APPVIEW',
viewname: 'hromhierarchy-cat-grid-view', viewname: 'hromhierarchy-cat-grid-view',
resourcetag: '', resourcetag: '',
...@@ -252,7 +252,7 @@ export default class PIMModel { ...@@ -252,7 +252,7 @@ export default class PIMModel {
iconcls: 'fa fa-sitemap', iconcls: 'fa fa-sitemap',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '_6', appfunctag: '_7',
appfuncyype: 'APPVIEW', appfuncyype: 'APPVIEW',
viewname: 'hrorganization-grid-view', viewname: 'hrorganization-grid-view',
resourcetag: '', resourcetag: '',
...@@ -270,7 +270,7 @@ export default class PIMModel { ...@@ -270,7 +270,7 @@ export default class PIMModel {
hidden: false, hidden: false,
hidesidebar: false, hidesidebar: false,
opendefault: false, opendefault: false,
iconcls: '', iconcls: 'fa fa-server',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '', appfunctag: '',
...@@ -279,73 +279,37 @@ export default class PIMModel { ...@@ -279,73 +279,37 @@ export default class PIMModel {
{ {
id: 'F40EFB9B-4A24-45F2-8CD1-BD9CFD890109', id: 'F40EFB9B-4A24-45F2-8CD1-BD9CFD890109',
name: 'menuitem11', name: 'menuitem11',
text: '有效职位', text: '职位',
type: 'MENUITEM', type: 'MENUITEM',
counterid: '', counterid: '',
tooltip: '有效职位', tooltip: '职位',
expanded: false, expanded: false,
separator: false, separator: false,
hidden: false, hidden: false,
hidesidebar: false, hidesidebar: false,
opendefault: false, opendefault: false,
iconcls: '', iconcls: 'fa fa-cog',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '', appfunctag: '_5',
appfuncyype: 'APPVIEW',
viewname: 'hrpost-tab-exp-view',
resourcetag: '', resourcetag: '',
} }
, ,
{ {
id: '5866C16B-4C55-4E2C-8229-15F7533B9E4F', id: '5866C16B-4C55-4E2C-8229-15F7533B9E4F',
name: 'menuitem12', name: 'menuitem12',
text: '空缺职位', text: '职务',
type: 'MENUITEM',
counterid: '',
tooltip: '空缺职位',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
}
,
{
id: '0E9C48F5-46B8-4F0C-915D-27A35AEAD41C',
name: 'menuitem13',
text: '所有职位',
type: 'MENUITEM',
counterid: '',
tooltip: '所有职位',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
}
,
{
id: '876E25B2-96E1-430F-890B-80DA30FA4DE8',
name: 'menuitem14',
text: '无效职位',
type: 'MENUITEM', type: 'MENUITEM',
counterid: '', counterid: '',
tooltip: '无效职位', tooltip: '职务',
expanded: false, expanded: false,
separator: false, separator: false,
hidden: false, hidden: false,
hidesidebar: false, hidesidebar: false,
opendefault: false, opendefault: false,
iconcls: '', iconcls: 'fa fa-cog',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '', appfunctag: '',
...@@ -367,7 +331,7 @@ export default class PIMModel { ...@@ -367,7 +331,7 @@ export default class PIMModel {
iconcls: '', iconcls: '',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '_5', appfunctag: '_6',
appfuncyype: 'APPVIEW', appfuncyype: 'APPVIEW',
viewname: 'hromhierarchy-grid-view', viewname: 'hromhierarchy-grid-view',
resourcetag: '', resourcetag: '',
...@@ -469,7 +433,7 @@ export default class PIMModel { ...@@ -469,7 +433,7 @@ export default class PIMModel {
*/ */
private funcs: any[] = [ private funcs: any[] = [
{ {
appfunctag: '_6', appfunctag: '_7',
appfuncyype: 'APPVIEW', appfuncyype: 'APPVIEW',
openmode: '', openmode: '',
codename: 'hrorganizationgridview', codename: 'hrorganizationgridview',
...@@ -517,7 +481,19 @@ export default class PIMModel { ...@@ -517,7 +481,19 @@ export default class PIMModel {
], ],
}, },
{ {
appfunctag: '_7', appfunctag: '_5',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'hrposttabexpview',
deResParameters: [],
routepath: '/pim/:pim?/hrposts/:hrpost?/tabexpview/:tabexpview?',
parameters: [
{ pathName: 'hrposts', parameterName: 'hrpost' },
{ pathName: 'tabexpview', parameterName: 'tabexpview' },
],
},
{
appfunctag: '_8',
appfuncyype: 'APPVIEW', appfuncyype: 'APPVIEW',
openmode: '', openmode: '',
codename: 'hromhierarchycatgridview', codename: 'hromhierarchycatgridview',
...@@ -529,7 +505,7 @@ export default class PIMModel { ...@@ -529,7 +505,7 @@ export default class PIMModel {
], ],
}, },
{ {
appfunctag: '_5', appfunctag: '_6',
appfuncyype: 'APPVIEW', appfuncyype: 'APPVIEW',
openmode: '', openmode: '',
codename: 'hromhierarchygridview', codename: 'hromhierarchygridview',
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, SearchFormControlBase } from '@/studio-core';
import HRDutyService from '@/service/hrduty/hrduty-service';
import DefaultService from './default-searchform-service';
import HRDutyUIService from '@/uiservice/hrduty/hrduty-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 {HRDutyService}
* @memberof DefaultSearchFormBase
*/
public appEntityService: HRDutyService = new HRDutyService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected appDeName: string = 'hrduty';
/**
* 表单数据对象
*
* @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 HRDutyService from '@/service/hrduty/hrduty-service';
import DefaultModel from './default-searchform-model';
/**
* Default 部件服务对象
*
* @export
* @class DefaultService
*/
export default class DefaultService extends ControlService {
/**
* 职务服务对象
*
* @type {HRDutyService}
* @memberof DefaultService
*/
public appEntityService: HRDutyService = new HRDutyService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof DefaultService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of DefaultService.
*
* @param {*} [opts={}]
* @memberof DefaultService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new DefaultModel();
}
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof DefaultService
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof DefaultService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
return Promise.reject([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public frontLogic(action:string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response,true);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof DefaultService
*/
public handleRequestData(action: string,context:any, data: any = {},isMerge:boolean = false){
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return data;
}
let formItemItems: any[] = mode.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
formItemItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.prop){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof DefaultService
*/
public getItemNameByDeName(name:string) :string{
let itemName = name;
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return name;
}
let formItemItems: any[] = mode.getDataItems();
formItemItems.forEach((item:any)=>{
if(item.prop === name){
itemName = item.name;
}
});
return itemName.trim();
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-search-form' ref='searchform' style="">
<input style="display:none;"/>
<div class="search-button">
<i-button size="small" type="primary" ghost @click="onSearch.apply(_self, arguments)">{{$t('app.searchButton.search')}}</i-button>
<i-button size="small" type="default" ghost @click="onReset.apply(_self, arguments)">{{this.$t('app.searchButton.reset')}}</i-button>
</div>
<div class="form-content">
</div>
</i-form>
\ No newline at end of file
<template src="./default-searchform.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { DefaultSearchFormBase } from './default-searchform-base';
/**
* searchform部件
*
* @export
* @class DefaultSearchForm
* @extends {DefaultSearchFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class DefaultSearchForm extends DefaultSearchFormBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, GridControlBase } from '@/studio-core';
import HRDutyService from '@/service/hrduty/hrduty-service';
import MainService from './main-grid-service';
import HRDutyUIService from '@/uiservice/hrduty/hrduty-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 {HRDutyService}
* @memberof MainGridBase
*/
public appEntityService: HRDutyService = new HRDutyService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainGridBase
*/
protected appDeName: string = 'hrduty';
/**
* 界面UI服务对象
*
* @type {HRDutyUIService}
* @memberof MainBase
*/
public appUIService:HRDutyUIService = new HRDutyUIService(this.$store);
/**
* 界面行为模型
*
* @type {*}
* @memberof MainBase
*/
public ActionModel: any = {
};
/**
* 本地缓存标识
*
* @protected
* @type {string}
* @memberof MainBase
*/
protected localStorageTag: string = 'hrduty_main_grid';
/**
* 所有列成员
*
* @type {any[]}
* @memberof MainGridBase
*/
public allColumns: any[] = [
{
name: 'hrdutyname',
label: '职务名称',
langtag: 'entities.hrduty.main_grid.columns.hrdutyname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'updateman',
label: '更新人',
langtag: 'entities.hrduty.main_grid.columns.updateman',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'updatedate',
label: '更新时间',
langtag: 'entities.hrduty.main_grid.columns.updatedate',
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 = {
'hrdutyname':false,
'updateman':false,
'updatedate':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, [
{
name: 'updateman',
srfkey: 'SysOperator',
codelistType : 'DYNAMIC',
renderMode: 'other',
textSeparator: '、',
valueSeparator: ',',
},
]);
}
}
\ 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: 'hrdutyname',
prop: 'hrdutyname',
dataType: 'TEXT',
},
{
name: 'updateman',
prop: 'updateman',
dataType: 'TEXT',
},
{
name: 'updatedate',
prop: 'updatedate',
dataType: 'DATETIME',
},
{
name: 'srfmajortext',
prop: 'hrdutyname',
dataType: 'TEXT',
},
{
name: 'srfdataaccaction',
prop: 'hrdutyid',
dataType: 'GUID',
},
{
name: 'srfkey',
prop: 'hrdutyid',
dataType: 'GUID',
isEditable:true
},
{
name: 'hrduty',
prop: 'hrdutyid',
},
{
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 HRDutyService from '@/service/hrduty/hrduty-service';
import MainModel from './main-grid-model';
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export default class MainService extends ControlService {
/**
* 职务服务对象
*
* @type {HRDutyService}
* @memberof MainService
*/
public appEntityService: HRDutyService = new HRDutyService({ $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.hrdutyid = 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('hrdutyname')">
<el-table-column show-overflow-tooltip :prop="'hrdutyname'" :label="$t('entities.hrduty.main_grid.columns.hrdutyname')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrduty.main_grid.columns.hrdutyname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.hrdutyname}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('updateman')">
<el-table-column show-overflow-tooltip :prop="'updateman'" :label="$t('entities.hrduty.main_grid.columns.updateman')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrduty.main_grid.columns.updateman')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<template >
<codelist :value="row.updateman" tag='SysOperator' codelistType='DYNAMIC' ></codelist>
</template>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('updatedate')">
<el-table-column show-overflow-tooltip :prop="'updatedate'" :label="$t('entities.hrduty.main_grid.columns.updatedate')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrduty.main_grid.columns.updatedate')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<app-format-data format="YYYY-MM-DD HH:mm:ss" :data="row.updatedate"></app-format-data>
</template>
</el-table-column>
</template>
<template v-if="adaptiveState">
<el-table-column></el-table-column>
</template>
</el-table>
<row class='grid-pagination' v-show="items.length > 0">
<page class='pull-right' @on-change="pageOnChange($event)"
@on-page-size-change="onPageSizeChange($event)"
:transfer="true" :total="totalRecord"
show-sizer :current="curPage" :page-size="limit"
:page-size-opts="[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]" show-elevator show-total>
<span>
<span class="page-column">
<poptip transfer placement="top-start">
<i-button icon="md-menu">{{$t('app.gridpage.choicecolumns')}}</i-button>
<div slot="content">
<template v-for="col in allColumns">
<div :key="col.name"><el-checkbox v-model="col.show" @change="onColChange()">{{$t(col.langtag)}}</el-checkbox></div>
</template>
</div>
</poptip>
</span>
<span v-if="selections.length > 0" class="batch-toolbar">
</span>
<span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
<span>
{{$t('app.gridpage.show')}}&nbsp;
<span>
<template v-if="items.length === 1">
1
</template>
<template v-else>
<span>{{(curPage - 1) * limit + 1}}&nbsp;-&nbsp;{{totalRecord > curPage * limit ? curPage * limit : totalRecord}}</span>
</template>
</span>&nbsp;
{{$t('app.gridpage.records')}},{{$t('app.gridpage.totle')}}&nbsp;{{totalRecord}}&nbsp;{{$t('app.gridpage.records')}}
</span>
</span>
</page>
</row>
</i-form>
</div>
\ No newline at end of file
<template src="./main-grid.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { MainGridBase } from './main-grid-base';
/**
* grid部件
*
* @export
* @class MainGrid
* @extends {MainGridBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class MainGrid extends MainGridBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import HRDutyService from '@/service/hrduty/hrduty-service';
import PickupViewpickupviewpanelService from './pickup-viewpickupviewpanel-pickupviewpanel-service';
import HRDutyUIService from '@/uiservice/hrduty/hrduty-ui-service';
import PickupViewpickupviewpanelModel from './pickup-viewpickupviewpanel-pickupviewpanel-model';
/**
* pickupviewpanel部件基类
*
* @export
* @class MainControlBase
* @extends {PickupViewpickupviewpanelPickupviewpanelBase}
*/
export class PickupViewpickupviewpanelPickupviewpanelBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
protected controlType: string = 'PICKUPVIEWPANEL';
/**
* 建构部件服务对象
*
* @type {PickupViewpickupviewpanelService}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
public service: PickupViewpickupviewpanelService = new PickupViewpickupviewpanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {HRDutyService}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
public appEntityService: HRDutyService = new HRDutyService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
protected appDeName: string = 'hrduty';
/**
* 选中数据字符串
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
@Prop() public selectedData?: string;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof PickupViewpickupviewpanel
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof PickupViewpickupviewpanel
*/
public getData(): any {
return {};
}
/**
* 视图名称
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public view: any = {
viewname: 'hrduty-pickup-grid-view',
data: {},
}
/**
* 局部上下文
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public localViewParam: any = null;
/**
* 视图数据
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
@Prop({default: true}) public isShowButton!: boolean;
/**
* 是否单选
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
@Prop() public isSingleSelect?: boolean;
/**
* 初始化完成
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
public inited: boolean = false;
/**
* 视图数据变化
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public onViewDatasChange($event: any): void {
if($event.length>0){
$event.forEach((item:any,index:any) => {
let srfmajortext = item['hrdutyname'];
if(srfmajortext){
Object.assign($event[index],{srfmajortext: srfmajortext});
}
});
}
this.$emit('selectionchange', $event);
}
/**
* 视图数据被激活
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public viewDatasActivated($event: any): void {
this.$emit('activated', $event);
}
/**
* 视图加载完成
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public onViewLoad($event: any): void {
this.$emit('load', $event);
}
/**
* vue 生命周期
*
* @memberof PickupViewpickupviewpanel
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof PickupViewpickupviewpanel
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('load', action)) {
this.viewdata = JSON.stringify(this.context);
this.viewparam = JSON.stringify(Object.assign(data, this.viewparams));
this.inited = true;
}
});
}
}
/**
* 初始化导航参数
*
* @memberof PickupViewpickupviewpanel
*/
public initNavParam(){
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata = JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* vue 生命周期
*
* @memberof PickupViewpickupviewpanel
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof PickupViewpickupviewpanel
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* PickupViewpickupviewpanel 部件模型
*
* @export
* @class PickupViewpickupviewpanelModel
*/
export default class PickupViewpickupviewpanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof PickupViewpickupviewpanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'hrduty',
prop: 'hrdutyid',
},
{
name: 'createdate',
},
{
name: 'updatedate',
},
{
name: 'hrdutyname',
},
{
name: 'createman',
},
{
name: 'updateman',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* PickupViewpickupviewpanel 部件服务对象
*
* @export
* @class PickupViewpickupviewpanelService
*/
export default class PickupViewpickupviewpanelService extends ControlService {
}
\ No newline at end of file
<div class='pickupviewpanel'>
<component
v-if="inited && view.viewname && !Object.is(view.viewname, '')"
:is="view.viewname"
class="viewcontainer3"
:viewdata="viewdata"
:viewparam="viewparam"
:viewDefaultUsage="false"
:isSingleSelect="isSingleSelect"
:selectedData="selectedData"
:isShowButton="isShowButton"
@viewdataschange="onViewDatasChange.apply(_self, arguments)"
@viewdatasactivated="viewDatasActivated.apply(_self, arguments)"
@viewload="onViewLoad.apply(_self, arguments)">
</component>
</div>
\ No newline at end of file
<template src="./pickup-viewpickupviewpanel-pickupviewpanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { PickupViewpickupviewpanelPickupviewpanelBase } from './pickup-viewpickupviewpanel-pickupviewpanel-base';
/**
* pickupviewpanel部件
*
* @export
* @class PickupViewpickupviewpanelPickupviewpanel
* @extends {PickupViewpickupviewpanelPickupviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class PickupViewpickupviewpanelPickupviewpanel extends PickupViewpickupviewpanelPickupviewpanelBase { }
</script>
...@@ -113,7 +113,7 @@ export class EF_001EditFormBase extends EditFormControlBase { ...@@ -113,7 +113,7 @@ export class EF_001EditFormBase extends EditFormControlBase {
* @memberof EF_001EditFormBase * @memberof EF_001EditFormBase
*/ */
public detailsModel: any = { public detailsModel: any = {
group1: new FormGroupPanelModel({ caption: '结构层次类别', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: false, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.hromhierarchycat.ef_001_form', extractMode: 'ITEM', details: [] } }), group1: new FormGroupPanelModel({ caption: '用途', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: true, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.hromhierarchycat.ef_001_form', extractMode: 'ITEM', details: [] } }),
druipart1: new FormDRUIPartModel({ caption: '', detailType: 'DRUIPART', name: 'druipart1', visible: true, isShowCaption: true, form: this, showMoreMode: 0 }), druipart1: new FormDRUIPartModel({ caption: '', detailType: 'DRUIPART', name: 'druipart1', visible: true, isShowCaption: true, form: this, showMoreMode: 0 }),
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<row > <row >
<i-col class="form-layout-container" v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }"> <i-col class="form-layout-container" v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :model="detailsModel.group1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.hromhierarchycat.ef_001_form.details.group1')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="1" :isInfoGroupMode="true" > <app-form-group :model="detailsModel.group1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.hromhierarchycat.ef_001_form.details.group1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="1" :isInfoGroupMode="true" >
<app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.group1" :data="data" :context="context" :viewparams="viewparams"/> <app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.group1" :data="data" :context="context" :viewparams="viewparams"/>
<row> <row>
<i-col class="form-layout-container" v-show="detailsModel.omhierarchycatname.visible" :style="{}" :sm="{ span: 6, offset: 0 }" :md="{ span: 6, offset: 0 }" :lg="{ span: 6, offset: 0 }" :xl="{ span: 6, offset: 0 }"> <i-col class="form-layout-container" v-show="detailsModel.omhierarchycatname.visible" :style="{}" :sm="{ span: 6, offset: 0 }" :md="{ span: 6, offset: 0 }" :lg="{ span: 6, offset: 0 }" :xl="{ span: 6, offset: 0 }">
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, SearchFormControlBase } from '@/studio-core';
import HRPostService from '@/service/hrpost/hrpost-service';
import DefaultService from './default-searchform-service';
import HRPostUIService from '@/uiservice/hrpost/hrpost-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 {HRPostService}
* @memberof DefaultSearchFormBase
*/
public appEntityService: HRPostService = new HRPostService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected appDeName: string = 'hrpost';
/**
* 表单数据对象
*
* @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 HRPostService from '@/service/hrpost/hrpost-service';
import DefaultModel from './default-searchform-model';
/**
* Default 部件服务对象
*
* @export
* @class DefaultService
*/
export default class DefaultService extends ControlService {
/**
* 职位服务对象
*
* @type {HRPostService}
* @memberof DefaultService
*/
public appEntityService: HRPostService = new HRPostService({ $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 HRPostService from '@/service/hrpost/hrpost-service';
import MainService from './main-form-service';
import HRPostUIService from '@/uiservice/hrpost/hrpost-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 {HRPostService}
* @memberof MainEditFormBase
*/
public appEntityService: HRPostService = new HRPostService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainEditFormBase
*/
protected appDeName: string = 'hrpost';
/**
* 界面UI服务对象
*
* @type {HRPostUIService}
* @memberof MainEditFormBase
*/
public appUIService:HRPostUIService = new HRPostUIService(this.$store);
/**
* 表单数据对象
*
* @type {*}
* @memberof MainEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
postcode: null,
hrpostname: null,
hrdutyname: null,
posttype: null,
hrorganizationname: null,
activeflag: null,
hrpostid: null,
hrorganizationid: null,
hrdutyid: null,
hrpost:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof MainEditFormBase
*/
public rules: any = {
}
/**
* 属性值规则
*
* @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.hrpost.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 }),
postcode: new FormItemModel({ caption: '编号', detailType: 'FORMITEM', name: 'postcode', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
hrpostname: new FormItemModel({ caption: '职位', detailType: 'FORMITEM', name: 'hrpostname', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
hrdutyname: new FormItemModel({ caption: '职务', detailType: 'FORMITEM', name: 'hrdutyname', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
posttype: new FormItemModel({ caption: '职位类型', detailType: 'FORMITEM', name: 'posttype', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
hrorganizationname: new FormItemModel({ caption: '部门', detailType: 'FORMITEM', name: 'hrorganizationname', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
activeflag: new FormItemModel({ caption: '是否有效', detailType: 'FORMITEM', name: 'activeflag', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
hrpostid: new FormItemModel({ caption: '职位标识', detailType: 'FORMITEM', name: 'hrpostid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
hrorganizationid: new FormItemModel({ caption: '组织', detailType: 'FORMITEM', name: 'hrorganizationid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
hrdutyid: new FormItemModel({ caption: '职务标识', detailType: 'FORMITEM', name: 'hrdutyid', 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: 'hrpostid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'hrpostname',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'postcode',
prop: 'postcode',
dataType: 'TEXT',
},
{
name: 'hrpostname',
prop: 'hrpostname',
dataType: 'TEXT',
},
{
name: 'hrdutyname',
prop: 'hrdutyname',
dataType: 'PICKUPTEXT',
},
{
name: 'posttype',
prop: 'posttype',
dataType: 'SSCODELIST',
},
{
name: 'hrorganizationname',
prop: 'hrorganizationname',
dataType: 'PICKUPTEXT',
},
{
name: 'activeflag',
prop: 'activeflag',
dataType: 'YESNO',
},
{
name: 'hrpostid',
prop: 'hrpostid',
dataType: 'GUID',
},
{
name: 'hrorganizationid',
prop: 'hrorganizationid',
dataType: 'PICKUP',
},
{
name: 'hrdutyid',
prop: 'hrdutyid',
dataType: 'PICKUP',
},
{
name: 'hrpost',
prop: 'hrpostid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import HRPostService from '@/service/hrpost/hrpost-service';
import MainModel from './main-form-model';
import HRDutyService from '@/service/hrduty/hrduty-service';
import HROrganizationService from '@/service/hrorganization/hrorganization-service';
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export default class MainService extends ControlService {
/**
* 职位服务对象
*
* @type {HRPostService}
* @memberof MainService
*/
public appEntityService: HRPostService = new HRPostService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof MainService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of MainService.
*
* @param {*} [opts={}]
* @memberof MainService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new MainModel();
}
/**
* 职务服务对象
*
* @type {HRDutyService}
* @memberof MainService
*/
public hrdutyService: HRDutyService = new HRDutyService();
/**
* 组织服务对象
*
* @type {HROrganizationService}
* @memberof MainService
*/
public hrorganizationService: HROrganizationService = new HROrganizationService();
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof MainService
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof MainService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
if (Object.is(serviceName, 'HRDutyService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.hrdutyService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'hrdutyid', 'hrduty');
}
if (Object.is(serviceName, 'HROrganizationService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.hrorganizationService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'organizationid', 'hrorganization');
}
return Promise.reject([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.hrpostid = PrimaryKey;
Data.hrpost = 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.hrpostid = 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='hrpost_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.hrpost.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.postcode.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='postcode' :itemRules="this.rules.postcode" class='' :caption="$t('entities.hrpost.main_form.details.postcode')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.postcode.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.postcode"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.postcode.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.hrpostname.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='hrpostname' :itemRules="this.rules.hrpostname" class='' :caption="$t('entities.hrpost.main_form.details.hrpostname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.hrpostname.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.hrpostname"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.hrpostname.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.hrdutyname.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='hrdutyname' :itemRules="this.rules.hrdutyname" class='' :caption="$t('entities.hrpost.main_form.details.hrdutyname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.hrdutyname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.hrdutyname.disabled"
name='hrdutyname'
deMajorField='hrdutyname'
deKeyField='hrduty'
:service="service"
:acParams="{ serviceName: 'HRDutyService', interfaceName: 'FetchDefault'}"
valueitem='hrdutyid'
:value="data.hrdutyname"
:pickupView="{ viewname: 'hrduty-pickup-view', title: $t('entities.hrduty.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'hrduties', parameterName: 'hrduty' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.posttype.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='posttype' :itemRules="this.rules.posttype" class='' :caption="$t('entities.hrpost.main_form.details.posttype')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.posttype.error" :isEmptyCaption="false" labelPos="LEFT">
<dropdown-list
v-model="data.posttype"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.posttype.disabled"
valueType="string"
tag='CL_HR_004'
codelistType='STATIC'
placeholder='请选择...'
/>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.hrorganizationname.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='hrorganizationname' :itemRules="this.rules.hrorganizationname" class='' :caption="$t('entities.hrpost.main_form.details.hrorganizationname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.hrorganizationname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.hrorganizationname.disabled"
name='hrorganizationname'
deMajorField='organizationname'
deKeyField='hrorganization'
:service="service"
:acParams="{ serviceName: 'HROrganizationService', interfaceName: 'FetchDefault'}"
valueitem='hrorganizationid'
:value="data.hrorganizationname"
:pickupView="{ viewname: 'hrorganization-pickup-view', title: $t('entities.hrorganization.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'hrorganizations', parameterName: 'hrorganization' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.activeflag.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='activeflag' :itemRules="this.rules.activeflag" class='' :caption="$t('entities.hrpost.main_form.details.activeflag')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.activeflag.error" :isEmptyCaption="false" labelPos="LEFT">
<dropdown-list
v-model="data.activeflag"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.activeflag.disabled"
style="width:100px;width: 100px;"
valueType="number"
tag='YesNo'
codelistType='STATIC'
placeholder='请选择...'
/>
</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 HRPostService from '@/service/hrpost/hrpost-service';
import MainService from './main-grid-service';
import HRPostUIService from '@/uiservice/hrpost/hrpost-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 {HRPostService}
* @memberof MainGridBase
*/
public appEntityService: HRPostService = new HRPostService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainGridBase
*/
protected appDeName: string = 'hrpost';
/**
* 界面UI服务对象
*
* @type {HRPostUIService}
* @memberof MainBase
*/
public appUIService:HRPostUIService = new HRPostUIService(this.$store);
/**
* 界面行为模型
*
* @type {*}
* @memberof MainBase
*/
public ActionModel: any = {
};
/**
* 本地缓存标识
*
* @protected
* @type {string}
* @memberof MainBase
*/
protected localStorageTag: string = 'hrpost_main_grid';
/**
* 所有列成员
*
* @type {any[]}
* @memberof MainGridBase
*/
public allColumns: any[] = [
{
name: 'postcode',
label: '编号',
langtag: 'entities.hrpost.main_grid.columns.postcode',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'hrpostname',
label: '职位',
langtag: 'entities.hrpost.main_grid.columns.hrpostname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'hrdutyname',
label: '职务',
langtag: 'entities.hrpost.main_grid.columns.hrdutyname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'posttype',
label: '职位类型',
langtag: 'entities.hrpost.main_grid.columns.posttype',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'hrorganizationname',
label: '部门',
langtag: 'entities.hrpost.main_grid.columns.hrorganizationname',
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 = {
'postcode':false,
'hrpostname':false,
'hrdutyname':false,
'posttype':false,
'hrorganizationname':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, [
{
name: 'posttype',
srfkey: 'CL_HR_004',
codelistType : 'STATIC',
renderMode: 'other',
textSeparator: '、',
valueSeparator: ',',
},
]);
}
}
\ 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: 'hrorganizationname',
prop: 'hrorganizationname',
dataType: 'PICKUPTEXT',
},
{
name: 'hrdutyname',
prop: 'hrdutyname',
dataType: 'PICKUPTEXT',
},
{
name: 'hrpostname',
prop: 'hrpostname',
dataType: 'TEXT',
},
{
name: 'hrorganizationid',
prop: 'hrorganizationid',
dataType: 'PICKUP',
},
{
name: 'posttype',
prop: 'posttype',
dataType: 'SSCODELIST',
},
{
name: 'postcode',
prop: 'postcode',
dataType: 'TEXT',
},
{
name: 'srfmajortext',
prop: 'hrpostname',
dataType: 'TEXT',
},
{
name: 'srfdataaccaction',
prop: 'hrpostid',
dataType: 'GUID',
},
{
name: 'srfkey',
prop: 'hrpostid',
dataType: 'GUID',
isEditable:true
},
{
name: 'hrdutyid',
prop: 'hrdutyid',
dataType: 'PICKUP',
},
{
name: 'hrpost',
prop: 'hrpostid',
},
{
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 HRPostService from '@/service/hrpost/hrpost-service';
import MainModel from './main-grid-model';
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export default class MainService extends ControlService {
/**
* 职位服务对象
*
* @type {HRPostService}
* @memberof MainService
*/
public appEntityService: HRPostService = new HRPostService({ $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.hrpostid = 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('postcode')">
<el-table-column show-overflow-tooltip :prop="'postcode'" :label="$t('entities.hrpost.main_grid.columns.postcode')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrpost.main_grid.columns.postcode')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.postcode}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('hrpostname')">
<el-table-column show-overflow-tooltip :prop="'hrpostname'" :label="$t('entities.hrpost.main_grid.columns.hrpostname')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrpost.main_grid.columns.hrpostname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.hrpostname}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('hrdutyname')">
<el-table-column show-overflow-tooltip :prop="'hrdutyname'" :label="$t('entities.hrpost.main_grid.columns.hrdutyname')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrpost.main_grid.columns.hrdutyname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.hrdutyname}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('posttype')">
<el-table-column show-overflow-tooltip :prop="'posttype'" :label="$t('entities.hrpost.main_grid.columns.posttype')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrpost.main_grid.columns.posttype')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<template >
<codelist :value="row.posttype" tag='CL_HR_004' codelistType='STATIC' ></codelist>
</template>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('hrorganizationname')">
<el-table-column show-overflow-tooltip :prop="'hrorganizationname'" :label="$t('entities.hrpost.main_grid.columns.hrorganizationname')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrpost.main_grid.columns.hrorganizationname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.hrorganizationname}}</span>
</template>
</el-table-column>
</template>
<template v-if="adaptiveState">
<el-table-column></el-table-column>
</template>
</el-table>
<row class='grid-pagination' v-show="items.length > 0">
<page class='pull-right' @on-change="pageOnChange($event)"
@on-page-size-change="onPageSizeChange($event)"
:transfer="true" :total="totalRecord"
show-sizer :current="curPage" :page-size="limit"
:page-size-opts="[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]" show-elevator show-total>
<span>
<span class="page-column">
<poptip transfer placement="top-start">
<i-button icon="md-menu">{{$t('app.gridpage.choicecolumns')}}</i-button>
<div slot="content">
<template v-for="col in allColumns">
<div :key="col.name"><el-checkbox v-model="col.show" @change="onColChange()">{{$t(col.langtag)}}</el-checkbox></div>
</template>
</div>
</poptip>
</span>
<span v-if="selections.length > 0" class="batch-toolbar">
</span>
<span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
<span>
{{$t('app.gridpage.show')}}&nbsp;
<span>
<template v-if="items.length === 1">
1
</template>
<template v-else>
<span>{{(curPage - 1) * limit + 1}}&nbsp;-&nbsp;{{totalRecord > curPage * limit ? curPage * limit : totalRecord}}</span>
</template>
</span>&nbsp;
{{$t('app.gridpage.records')}},{{$t('app.gridpage.totle')}}&nbsp;{{totalRecord}}&nbsp;{{$t('app.gridpage.records')}}
</span>
</span>
</page>
</row>
</i-form>
</div>
\ No newline at end of file
<template src="./main-grid.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { MainGridBase } from './main-grid-base';
/**
* grid部件
*
* @export
* @class MainGrid
* @extends {MainGridBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class MainGrid extends MainGridBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, TabExpPanelControlBase } from '@/studio-core';
import HRPostService from '@/service/hrpost/hrpost-service';
import TabExpViewtabexppanelService from './tab-exp-viewtabexppanel-tabexppanel-service';
import HRPostUIService from '@/uiservice/hrpost/hrpost-ui-service';
/**
* tabexppanel部件基类
*
* @export
* @class TabExpPanelControlBase
* @extends {TabExpViewtabexppanelTabexppanelBase}
*/
export class TabExpViewtabexppanelTabexppanelBase extends TabExpPanelControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof TabExpViewtabexppanelTabexppanelBase
*/
protected controlType: string = 'TABEXPPANEL';
/**
* 建构部件服务对象
*
* @type {TabExpViewtabexppanelService}
* @memberof TabExpViewtabexppanelTabexppanelBase
*/
public service: TabExpViewtabexppanelService = new TabExpViewtabexppanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {HRPostService}
* @memberof TabExpViewtabexppanelTabexppanelBase
*/
public appEntityService: HRPostService = new HRPostService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof TabExpViewtabexppanelTabexppanelBase
*/
protected appDeName: string = 'hrpost';
/**
* 是否初始化
*
* @protected
* @returns {any}
* @memberof TabExpViewtabexppanel
*/
protected isInit: any = {
tabviewpanel: true ,
tabviewpanel2: false ,
tabviewpanel3: false ,
tabviewpanel4: false ,
}
/**
* 被激活的分页面板
*
* @protected
* @type {string}
* @memberof TabExpViewtabexppanel
*/
protected activatedTabViewPanel: string = 'tabviewpanel';
/**
* 组件创建完毕
*
* @protected
* @memberof TabExpViewtabexppanel
*/
protected ctrlCreated(): void {
//设置分页导航srfparentdename和srfparentkey
if (this.context.hrpost) {
Object.assign(this.context, { srfparentdename: 'HRPost', srfparentkey: this.context.hrpost });
}
super.ctrlCreated();
}
}
\ No newline at end of file
/**
* TabExpViewtabexppanel 部件模型
*
* @export
* @class TabExpViewtabexppanelModel
*/
export default class TabExpViewtabexppanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof TabExpViewtabexppanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'hrpost',
prop: 'hrpostid',
},
{
name: 'updateman',
},
{
name: 'hrpostname',
},
{
name: 'createman',
},
{
name: 'updatedate',
},
{
name: 'createdate',
},
{
name: 'hrdutyid',
},
{
name: 'hrdutyname',
},
{
name: 'postcode',
},
{
name: 'posttype',
},
{
name: 'activeflag',
},
{
name: 'hrorganizationid',
},
{
name: 'hrorganizationname',
},
{
name: 'entrytime',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import HRPostService from '@/service/hrpost/hrpost-service';
import TabExpViewtabexppanelModel from './tab-exp-viewtabexppanel-tabexppanel-model';
/**
* TabExpViewtabexppanel 部件服务对象
*
* @export
* @class TabExpViewtabexppanelService
*/
export default class TabExpViewtabexppanelService extends ControlService {
/**
* 职位服务对象
*
* @type {HRPostService}
* @memberof TabExpViewtabexppanelService
*/
public appEntityService: HRPostService = new HRPostService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof TabExpViewtabexppanelService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of TabExpViewtabexppanelService.
*
* @param {*} [opts={}]
* @memberof TabExpViewtabexppanelService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new TabExpViewtabexppanelModel();
}
}
\ No newline at end of file
<div class='tabviewpanel'>
<tabs :value="activatedTabViewPanel" :animated="false" class='tabexppanel' name='tabexpviewtabexppanel' @on-click="tabPanelClick($event)">
<tab-pane :index="0" name='tabviewpanel' tab='tabexpviewtabexppanel' class=''
:label="(h) =>{
return h('div', [
h('i',{
class:'fa fa-link',
style:{
'margin-right' : '2px'
}
}),
h('span', '有效职位'),
h('Badge', {
props: {
count: undefined,
type: 'primary'
}
})
])
}" >
<view_tabviewpanel
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
v-if="isInit.tabviewpanel"
name="tabviewpanel"
ref='tabviewpanel'
:expActive="activatedTabViewPanel === 'tabviewpanel'"
@viewpanelDatasChange = "tabViewPanelDatasChange"
@closeview="closeView($event)">
</view_tabviewpanel>
</tab-pane>
<tab-pane :index="1" name='tabviewpanel2' tab='tabexpviewtabexppanel' class=''
:label="(h) =>{
return h('div', [
h('i',{
class:'fa fa-circle-thin',
style:{
'margin-right' : '2px'
}
}),
h('span', '空缺职位'),
h('Badge', {
props: {
count: undefined,
type: 'primary'
}
})
])
}" >
<view_tabviewpanel2
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
v-if="isInit.tabviewpanel2"
name="tabviewpanel2"
ref='tabviewpanel2'
:expActive="activatedTabViewPanel === 'tabviewpanel2'"
@viewpanelDatasChange = "tabViewPanelDatasChange"
@closeview="closeView($event)">
</view_tabviewpanel2>
</tab-pane>
<tab-pane :index="2" name='tabviewpanel3' tab='tabexpviewtabexppanel' class=''
:label="(h) =>{
return h('div', [
h('i',{
class:'fa fa-unlink',
style:{
'margin-right' : '2px'
}
}),
h('span', '失效职位'),
h('Badge', {
props: {
count: undefined,
type: 'primary'
}
})
])
}" >
<view_tabviewpanel3
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
v-if="isInit.tabviewpanel3"
name="tabviewpanel3"
ref='tabviewpanel3'
:expActive="activatedTabViewPanel === 'tabviewpanel3'"
@viewpanelDatasChange = "tabViewPanelDatasChange"
@closeview="closeView($event)">
</view_tabviewpanel3>
</tab-pane>
<tab-pane :index="3" name='tabviewpanel4' tab='tabexpviewtabexppanel' class=''
:label="(h) =>{
return h('div', [
h('span', '全部职位'),
h('Badge', {
props: {
count: undefined,
type: 'primary'
}
})
])
}" >
<view_tabviewpanel4
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
v-if="isInit.tabviewpanel4"
name="tabviewpanel4"
ref='tabviewpanel4'
:expActive="activatedTabViewPanel === 'tabviewpanel4'"
@viewpanelDatasChange = "tabViewPanelDatasChange"
@closeview="closeView($event)">
</view_tabviewpanel4>
</tab-pane>
</tabs>
</div>
\ No newline at end of file
<template src="./tab-exp-viewtabexppanel-tabexppanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { TabExpViewtabexppanelTabexppanelBase } from './tab-exp-viewtabexppanel-tabexppanel-base';
import view_tabviewpanel from '@widgets/hrpost/tab-exp-viewtabviewpanel-tabviewpanel/tab-exp-viewtabviewpanel-tabviewpanel.vue';
import view_tabviewpanel2 from '@widgets/hrpost/tab-exp-viewtabviewpanel2-tabviewpanel/tab-exp-viewtabviewpanel2-tabviewpanel.vue';
import view_tabviewpanel3 from '@widgets/hrpost/tab-exp-viewtabviewpanel3-tabviewpanel/tab-exp-viewtabviewpanel3-tabviewpanel.vue';
import view_tabviewpanel4 from '@widgets/hrpost/tab-exp-viewtabviewpanel4-tabviewpanel/tab-exp-viewtabviewpanel4-tabviewpanel.vue';
/**
* tabexppanel部件
*
* @export
* @class TabExpViewtabexppanelTabexppanel
* @extends {TabExpViewtabexppanelTabexppanelBase}
*/
@Component({
components: {
view_tabviewpanel,
view_tabviewpanel2,
view_tabviewpanel3,
view_tabviewpanel4,
}
})
@VueLifeCycleProcessing()
export default class TabExpViewtabexppanelTabexppanel extends TabExpViewtabexppanelTabexppanelBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import HRPostService from '@/service/hrpost/hrpost-service';
import TabExpViewtabviewpanelService from './tab-exp-viewtabviewpanel-tabviewpanel-service';
import HRPostUIService from '@/uiservice/hrpost/hrpost-ui-service';
/**
* tabviewpanel部件基类
*
* @export
* @class MainControlBase
* @extends {TabExpViewtabviewpanelTabviewpanelBase}
*/
export class TabExpViewtabviewpanelTabviewpanelBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof TabExpViewtabviewpanelTabviewpanelBase
*/
protected controlType: string = 'TABVIEWPANEL';
/**
* 建构部件服务对象
*
* @type {TabExpViewtabviewpanelService}
* @memberof TabExpViewtabviewpanelTabviewpanelBase
*/
public service: TabExpViewtabviewpanelService = new TabExpViewtabviewpanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {HRPostService}
* @memberof TabExpViewtabviewpanelTabviewpanelBase
*/
public appEntityService: HRPostService = new HRPostService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof TabExpViewtabviewpanelTabviewpanelBase
*/
protected appDeName: string = 'hrpost';
/**
* 导航模式下项是否激活
*
* @type {*}
* @memberof TabExpViewtabviewpanel
*/
@Prop()
public expActive!: any;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof TabExpViewtabviewpanel
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof TabExpViewtabviewpanel
*/
public getData(): any {
return null;
}
/**
* 是否被激活
*
* @type {boolean}
* @memberof TabExpViewtabviewpanel
*/
public isActivied: boolean = true;
/**
* 局部上下文
*
* @type {*}
* @memberof TabExpViewtabviewpanel
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof TabExpViewtabviewpanel
*/
public localViewParam: any = null;
/**
* 传入上下文
*
* @type {string}
* @memberof TabExpViewtabviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 传入视图参数
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 视图面板过滤项
*
* @type {string}
* @memberof TabExpViewtabviewpanel
*/
public navfilter: string = "";
/**
* vue 生命周期
*
* @returns
* @memberof TabExpViewtabviewpanel
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof TabExpViewtabviewpanel
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.$forceUpdate();
this.initNavParam();
});
}
}
/**
* 初始化导航参数
*
* @memberof TabExpViewtabviewpanel
*/
public initNavParam(){
if(!Object.is(this.navfilter,"")){
Object.assign(this.viewparams,{[this.navfilter]:this.context['majorentity']})
}
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata =JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* 视图数据变化
*
* @memberof TabExpViewtabviewpanel
*/
public viewDatasChange($event:any){
this.$emit('viewpanelDatasChange',$event);
}
/**
* vue 生命周期
*
* @memberof TabExpViewtabviewpanel
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof TabExpViewtabviewpanel
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* TabExpViewtabviewpanel 部件模型
*
* @export
* @class TabExpViewtabviewpanelModel
*/
export default class TabExpViewtabviewpanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof TabExpViewtabviewpanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'hrpost',
prop: 'hrpostid',
},
{
name: 'updateman',
},
{
name: 'hrpostname',
},
{
name: 'createman',
},
{
name: 'updatedate',
},
{
name: 'createdate',
},
{
name: 'hrdutyid',
},
{
name: 'hrdutyname',
},
{
name: 'postcode',
},
{
name: 'posttype',
},
{
name: 'activeflag',
},
{
name: 'hrorganizationid',
},
{
name: 'hrorganizationname',
},
{
name: 'entrytime',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* TabExpViewtabviewpanel 部件服务对象
*
* @export
* @class TabExpViewtabviewpanelService
*/
export default class TabExpViewtabviewpanelService extends ControlService {
}
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'>
<hrpost-v-001
class='viewcontainer2'
:viewdata="viewdata"
:viewparam="viewparam"
@viewload="viewDatasChange($event)"
:viewDefaultUsage="false"
:viewUsage="7"
:expActive="expActive"
@closeview="closeView($event)"
/>
</div>
\ No newline at end of file
<template src="./tab-exp-viewtabviewpanel-tabviewpanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { TabExpViewtabviewpanelTabviewpanelBase } from './tab-exp-viewtabviewpanel-tabviewpanel-base';
/**
* tabviewpanel部件
*
* @export
* @class TabExpViewtabviewpanelTabviewpanel
* @extends {TabExpViewtabviewpanelTabviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class TabExpViewtabviewpanelTabviewpanel extends TabExpViewtabviewpanelTabviewpanelBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import HRPostService from '@/service/hrpost/hrpost-service';
import TabExpViewtabviewpanel2Service from './tab-exp-viewtabviewpanel2-tabviewpanel-service';
import HRPostUIService from '@/uiservice/hrpost/hrpost-ui-service';
/**
* tabviewpanel2部件基类
*
* @export
* @class MainControlBase
* @extends {TabExpViewtabviewpanel2TabviewpanelBase}
*/
export class TabExpViewtabviewpanel2TabviewpanelBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof TabExpViewtabviewpanel2TabviewpanelBase
*/
protected controlType: string = 'TABVIEWPANEL';
/**
* 建构部件服务对象
*
* @type {TabExpViewtabviewpanel2Service}
* @memberof TabExpViewtabviewpanel2TabviewpanelBase
*/
public service: TabExpViewtabviewpanel2Service = new TabExpViewtabviewpanel2Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {HRPostService}
* @memberof TabExpViewtabviewpanel2TabviewpanelBase
*/
public appEntityService: HRPostService = new HRPostService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof TabExpViewtabviewpanel2TabviewpanelBase
*/
protected appDeName: string = 'hrpost';
/**
* 导航模式下项是否激活
*
* @type {*}
* @memberof TabExpViewtabviewpanel2
*/
@Prop()
public expActive!: any;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof TabExpViewtabviewpanel2
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof TabExpViewtabviewpanel2
*/
public getData(): any {
return null;
}
/**
* 是否被激活
*
* @type {boolean}
* @memberof TabExpViewtabviewpanel2
*/
public isActivied: boolean = true;
/**
* 局部上下文
*
* @type {*}
* @memberof TabExpViewtabviewpanel2
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof TabExpViewtabviewpanel2
*/
public localViewParam: any = null;
/**
* 传入上下文
*
* @type {string}
* @memberof TabExpViewtabviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 传入视图参数
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 视图面板过滤项
*
* @type {string}
* @memberof TabExpViewtabviewpanel2
*/
public navfilter: string = "";
/**
* vue 生命周期
*
* @returns
* @memberof TabExpViewtabviewpanel2
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof TabExpViewtabviewpanel2
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.$forceUpdate();
this.initNavParam();
});
}
}
/**
* 初始化导航参数
*
* @memberof TabExpViewtabviewpanel2
*/
public initNavParam(){
if(!Object.is(this.navfilter,"")){
Object.assign(this.viewparams,{[this.navfilter]:this.context['majorentity']})
}
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata =JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* 视图数据变化
*
* @memberof TabExpViewtabviewpanel2
*/
public viewDatasChange($event:any){
this.$emit('viewpanelDatasChange',$event);
}
/**
* vue 生命周期
*
* @memberof TabExpViewtabviewpanel2
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof TabExpViewtabviewpanel2
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* TabExpViewtabviewpanel2 部件模型
*
* @export
* @class TabExpViewtabviewpanel2Model
*/
export default class TabExpViewtabviewpanel2Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof TabExpViewtabviewpanel2Model
*/
public getDataItems(): any[] {
return [
{
name: 'hrpost',
prop: 'hrpostid',
},
{
name: 'updateman',
},
{
name: 'hrpostname',
},
{
name: 'createman',
},
{
name: 'updatedate',
},
{
name: 'createdate',
},
{
name: 'hrdutyid',
},
{
name: 'hrdutyname',
},
{
name: 'postcode',
},
{
name: 'posttype',
},
{
name: 'activeflag',
},
{
name: 'hrorganizationid',
},
{
name: 'hrorganizationname',
},
{
name: 'entrytime',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* TabExpViewtabviewpanel2 部件服务对象
*
* @export
* @class TabExpViewtabviewpanel2Service
*/
export default class TabExpViewtabviewpanel2Service extends ControlService {
}
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'>
<hrpost-v-002
class='viewcontainer2'
:viewdata="viewdata"
:viewparam="viewparam"
@viewload="viewDatasChange($event)"
:viewDefaultUsage="false"
:viewUsage="7"
:expActive="expActive"
@closeview="closeView($event)"
/>
</div>
\ No newline at end of file
<template src="./tab-exp-viewtabviewpanel2-tabviewpanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { TabExpViewtabviewpanel2TabviewpanelBase } from './tab-exp-viewtabviewpanel2-tabviewpanel-base';
/**
* tabviewpanel2部件
*
* @export
* @class TabExpViewtabviewpanel2Tabviewpanel
* @extends {TabExpViewtabviewpanel2TabviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class TabExpViewtabviewpanel2Tabviewpanel extends TabExpViewtabviewpanel2TabviewpanelBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import HRPostService from '@/service/hrpost/hrpost-service';
import TabExpViewtabviewpanel3Service from './tab-exp-viewtabviewpanel3-tabviewpanel-service';
import HRPostUIService from '@/uiservice/hrpost/hrpost-ui-service';
/**
* tabviewpanel3部件基类
*
* @export
* @class MainControlBase
* @extends {TabExpViewtabviewpanel3TabviewpanelBase}
*/
export class TabExpViewtabviewpanel3TabviewpanelBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof TabExpViewtabviewpanel3TabviewpanelBase
*/
protected controlType: string = 'TABVIEWPANEL';
/**
* 建构部件服务对象
*
* @type {TabExpViewtabviewpanel3Service}
* @memberof TabExpViewtabviewpanel3TabviewpanelBase
*/
public service: TabExpViewtabviewpanel3Service = new TabExpViewtabviewpanel3Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {HRPostService}
* @memberof TabExpViewtabviewpanel3TabviewpanelBase
*/
public appEntityService: HRPostService = new HRPostService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof TabExpViewtabviewpanel3TabviewpanelBase
*/
protected appDeName: string = 'hrpost';
/**
* 导航模式下项是否激活
*
* @type {*}
* @memberof TabExpViewtabviewpanel3
*/
@Prop()
public expActive!: any;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof TabExpViewtabviewpanel3
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof TabExpViewtabviewpanel3
*/
public getData(): any {
return null;
}
/**
* 是否被激活
*
* @type {boolean}
* @memberof TabExpViewtabviewpanel3
*/
public isActivied: boolean = true;
/**
* 局部上下文
*
* @type {*}
* @memberof TabExpViewtabviewpanel3
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof TabExpViewtabviewpanel3
*/
public localViewParam: any = null;
/**
* 传入上下文
*
* @type {string}
* @memberof TabExpViewtabviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 传入视图参数
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 视图面板过滤项
*
* @type {string}
* @memberof TabExpViewtabviewpanel3
*/
public navfilter: string = "";
/**
* vue 生命周期
*
* @returns
* @memberof TabExpViewtabviewpanel3
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof TabExpViewtabviewpanel3
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.$forceUpdate();
this.initNavParam();
});
}
}
/**
* 初始化导航参数
*
* @memberof TabExpViewtabviewpanel3
*/
public initNavParam(){
if(!Object.is(this.navfilter,"")){
Object.assign(this.viewparams,{[this.navfilter]:this.context['majorentity']})
}
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata =JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* 视图数据变化
*
* @memberof TabExpViewtabviewpanel3
*/
public viewDatasChange($event:any){
this.$emit('viewpanelDatasChange',$event);
}
/**
* vue 生命周期
*
* @memberof TabExpViewtabviewpanel3
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof TabExpViewtabviewpanel3
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* TabExpViewtabviewpanel3 部件模型
*
* @export
* @class TabExpViewtabviewpanel3Model
*/
export default class TabExpViewtabviewpanel3Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof TabExpViewtabviewpanel3Model
*/
public getDataItems(): any[] {
return [
{
name: 'hrpost',
prop: 'hrpostid',
},
{
name: 'updateman',
},
{
name: 'hrpostname',
},
{
name: 'createman',
},
{
name: 'updatedate',
},
{
name: 'createdate',
},
{
name: 'hrdutyid',
},
{
name: 'hrdutyname',
},
{
name: 'postcode',
},
{
name: 'posttype',
},
{
name: 'activeflag',
},
{
name: 'hrorganizationid',
},
{
name: 'hrorganizationname',
},
{
name: 'entrytime',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* TabExpViewtabviewpanel3 部件服务对象
*
* @export
* @class TabExpViewtabviewpanel3Service
*/
export default class TabExpViewtabviewpanel3Service extends ControlService {
}
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'>
<hrpost-v-003
class='viewcontainer2'
:viewdata="viewdata"
:viewparam="viewparam"
@viewload="viewDatasChange($event)"
:viewDefaultUsage="false"
:viewUsage="7"
:expActive="expActive"
@closeview="closeView($event)"
/>
</div>
\ No newline at end of file
<template src="./tab-exp-viewtabviewpanel3-tabviewpanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { TabExpViewtabviewpanel3TabviewpanelBase } from './tab-exp-viewtabviewpanel3-tabviewpanel-base';
/**
* tabviewpanel3部件
*
* @export
* @class TabExpViewtabviewpanel3Tabviewpanel
* @extends {TabExpViewtabviewpanel3TabviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class TabExpViewtabviewpanel3Tabviewpanel extends TabExpViewtabviewpanel3TabviewpanelBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import HRPostService from '@/service/hrpost/hrpost-service';
import TabExpViewtabviewpanel4Service from './tab-exp-viewtabviewpanel4-tabviewpanel-service';
import HRPostUIService from '@/uiservice/hrpost/hrpost-ui-service';
/**
* tabviewpanel4部件基类
*
* @export
* @class MainControlBase
* @extends {TabExpViewtabviewpanel4TabviewpanelBase}
*/
export class TabExpViewtabviewpanel4TabviewpanelBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof TabExpViewtabviewpanel4TabviewpanelBase
*/
protected controlType: string = 'TABVIEWPANEL';
/**
* 建构部件服务对象
*
* @type {TabExpViewtabviewpanel4Service}
* @memberof TabExpViewtabviewpanel4TabviewpanelBase
*/
public service: TabExpViewtabviewpanel4Service = new TabExpViewtabviewpanel4Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {HRPostService}
* @memberof TabExpViewtabviewpanel4TabviewpanelBase
*/
public appEntityService: HRPostService = new HRPostService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof TabExpViewtabviewpanel4TabviewpanelBase
*/
protected appDeName: string = 'hrpost';
/**
* 导航模式下项是否激活
*
* @type {*}
* @memberof TabExpViewtabviewpanel4
*/
@Prop()
public expActive!: any;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof TabExpViewtabviewpanel4
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof TabExpViewtabviewpanel4
*/
public getData(): any {
return null;
}
/**
* 是否被激活
*
* @type {boolean}
* @memberof TabExpViewtabviewpanel4
*/
public isActivied: boolean = true;
/**
* 局部上下文
*
* @type {*}
* @memberof TabExpViewtabviewpanel4
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof TabExpViewtabviewpanel4
*/
public localViewParam: any = null;
/**
* 传入上下文
*
* @type {string}
* @memberof TabExpViewtabviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 传入视图参数
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 视图面板过滤项
*
* @type {string}
* @memberof TabExpViewtabviewpanel4
*/
public navfilter: string = "";
/**
* vue 生命周期
*
* @returns
* @memberof TabExpViewtabviewpanel4
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof TabExpViewtabviewpanel4
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.$forceUpdate();
this.initNavParam();
});
}
}
/**
* 初始化导航参数
*
* @memberof TabExpViewtabviewpanel4
*/
public initNavParam(){
if(!Object.is(this.navfilter,"")){
Object.assign(this.viewparams,{[this.navfilter]:this.context['majorentity']})
}
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata =JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* 视图数据变化
*
* @memberof TabExpViewtabviewpanel4
*/
public viewDatasChange($event:any){
this.$emit('viewpanelDatasChange',$event);
}
/**
* vue 生命周期
*
* @memberof TabExpViewtabviewpanel4
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof TabExpViewtabviewpanel4
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* TabExpViewtabviewpanel4 部件模型
*
* @export
* @class TabExpViewtabviewpanel4Model
*/
export default class TabExpViewtabviewpanel4Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof TabExpViewtabviewpanel4Model
*/
public getDataItems(): any[] {
return [
{
name: 'hrpost',
prop: 'hrpostid',
},
{
name: 'updateman',
},
{
name: 'hrpostname',
},
{
name: 'createman',
},
{
name: 'updatedate',
},
{
name: 'createdate',
},
{
name: 'hrdutyid',
},
{
name: 'hrdutyname',
},
{
name: 'postcode',
},
{
name: 'posttype',
},
{
name: 'activeflag',
},
{
name: 'hrorganizationid',
},
{
name: 'hrorganizationname',
},
{
name: 'entrytime',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* TabExpViewtabviewpanel4 部件服务对象
*
* @export
* @class TabExpViewtabviewpanel4Service
*/
export default class TabExpViewtabviewpanel4Service extends ControlService {
}
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'>
<hrpost-grid-view
class='viewcontainer2'
:viewdata="viewdata"
:viewparam="viewparam"
@viewload="viewDatasChange($event)"
:viewDefaultUsage="false"
:viewUsage="7"
:expActive="expActive"
@closeview="closeView($event)"
/>
</div>
\ No newline at end of file
<template src="./tab-exp-viewtabviewpanel4-tabviewpanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { TabExpViewtabviewpanel4TabviewpanelBase } from './tab-exp-viewtabviewpanel4-tabviewpanel-base';
/**
* tabviewpanel4部件
*
* @export
* @class TabExpViewtabviewpanel4Tabviewpanel
* @extends {TabExpViewtabviewpanel4TabviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class TabExpViewtabviewpanel4Tabviewpanel extends TabExpViewtabviewpanel4TabviewpanelBase { }
</script>
...@@ -37,11 +37,11 @@ ...@@ -37,11 +37,11 @@
git clone -b master $para2 ibizhumanresources/ git clone -b master $para2 ibizhumanresources/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd ibizhumanresources/ cd ibizhumanresources/
mvn clean package -Phrapi mvn clean package -Ppim
cd humanresource-provider/humanresource-provider-hrapi cd humanresource-app/humanresource-app-pim
mvn -Phrapi docker:build mvn -Ppim docker:build
mvn -Phrapi docker:push mvn -Ppim docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/humanresource-provider-hrapi.yaml iBizEE --with-registry-auth docker -H $para1 stack deploy --compose-file=src/main/docker/humanresource-app-pim.yaml iBizEE --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \ ...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /humanresource-app-pim.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /humanresource-app-pim.jar
EXPOSE 8080 EXPOSE 10327
ADD humanresource-app-pim.jar /humanresource-app-pim.jar ADD humanresource-app-pim.jar /humanresource-app-pim.jar
...@@ -3,9 +3,25 @@ services: ...@@ -3,9 +3,25 @@ services:
humanresource-app-pim: humanresource-app-pim:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/humanresource-app-pim:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/humanresource-app-pim:latest
ports: ports:
- "8080:8080" - "10327:10327"
networks: networks:
- agent_network - agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10327
- 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: deploy:
resources: resources:
limits: limits:
......
...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \ ...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /humanresource-provider-hrapi.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /humanresource-provider-hrapi.jar
EXPOSE 10317 EXPOSE 8081
ADD humanresource-provider-hrapi.jar /humanresource-provider-hrapi.jar ADD humanresource-provider-hrapi.jar /humanresource-provider-hrapi.jar
...@@ -3,25 +3,9 @@ services: ...@@ -3,25 +3,9 @@ services:
humanresource-provider-hrapi: humanresource-provider-hrapi:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/humanresource-provider-hrapi:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/humanresource-provider-hrapi:latest
ports: ports:
- "10317:10317" - "8081:8081"
networks: networks:
- agent_network - agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10317
- 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: deploy:
resources: resources:
limits: limits:
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册