From 79916567d5cb7f829cd6612183e5ce452b105c04 Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Tue, 7 Jun 2022 17:56:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=BC=96=E5=88=B6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organization/components/staff/Staff.js | 30 ++++++++++++------- pc4mobx/organization/public/i18n.js | 1 + pc4mobx/organization/stores/staff.js | 7 ++++- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/pc4mobx/organization/components/staff/Staff.js b/pc4mobx/organization/components/staff/Staff.js index a4d1dd0..5b354b6 100644 --- a/pc4mobx/organization/components/staff/Staff.js +++ b/pc4mobx/organization/components/staff/Staff.js @@ -212,18 +212,14 @@ export default class Staff extends React.Component { } = staff; staff.setStaffName(val); - !this.isEmptyObject(form2.getFormParams()) && staff.updateFields(val); + //!this.isEmptyObject(form2.getFormParams()) && staff.updateFields(val); } reRenderColumns(columns) { let _this = this; - columns.forEach((c, index) => { - // if (c.dataIndex == 'forbidden_tag') { - // c.render = function(text, record) { - // return _this.updateForbiddenTag(checked,record.id)} /> - // } - // }; - }) + // columns.forEach((c, index) => { + + // }) } updateForbiddenTag(checked,id) { @@ -239,7 +235,7 @@ export default class Staff extends React.Component { } = operate; (index == '0') && this.doEdit(record.randomFieldId); (index == '1') && this.doDel(record.randomFieldId); - + (index == '2') && this.doChange(record.randomFieldId); } doEdit(id) { @@ -248,7 +244,21 @@ export default class Staff extends React.Component { } = this.props; staff.setNeDialogTitle(i18n.label.editStaff()); - staff.setSchemeId(id); + staff.setStaffId(id); + staff.setOperateType("1"); + staff.setIsNew(false); + staff.setVisible(true); + staff.getForm(); + } + + doChange(id) { + const { + staff + } = this.props; + + staff.setNeDialogTitle(i18n.label.changeStaff()); + staff.setStaffId(id); + staff.setOperateType("2"); staff.setIsNew(false); staff.setVisible(true); staff.getForm(); diff --git a/pc4mobx/organization/public/i18n.js b/pc4mobx/organization/public/i18n.js index 1542efc..badfdd0 100644 --- a/pc4mobx/organization/public/i18n.js +++ b/pc4mobx/organization/public/i18n.js @@ -136,6 +136,7 @@ export const i18n = { staffName: () => getLabel(385936, '编制上报'), newStaff: () => getLabel(386246, '新建编制'), editStaff: () => getLabel(386247, '编辑编制'), + changeStaff: () => getLabel(386247, '编辑变更'), jobName: () => getLabel(385936, '岗位'), newJob: () => getLabel(386246, '新建岗位'), editJob: () => getLabel(386247, '编辑岗位'), diff --git a/pc4mobx/organization/stores/staff.js b/pc4mobx/organization/stores/staff.js index aafcbc0..61ee658 100644 --- a/pc4mobx/organization/stores/staff.js +++ b/pc4mobx/organization/stores/staff.js @@ -45,7 +45,7 @@ export class StaffStore { @observable staffId = ''; @observable date = ''; @observable hasRight = ''; - + @observable operateType = ''; //1 编辑 2 变更 @@ -292,4 +292,9 @@ export class StaffStore { this.hasRight = bool; } + setOperateType(operateType) { + this.operateType = operateType; + } + + } \ No newline at end of file From ce772613972d45b188cd6010c0f716651083e938 Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Tue, 7 Jun 2022 17:58:20 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=BC=96=E5=88=B6=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/organization/public/i18n.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/organization/public/i18n.js b/pc4mobx/organization/public/i18n.js index badfdd0..32a40a1 100644 --- a/pc4mobx/organization/public/i18n.js +++ b/pc4mobx/organization/public/i18n.js @@ -136,7 +136,7 @@ export const i18n = { staffName: () => getLabel(385936, '编制上报'), newStaff: () => getLabel(386246, '新建编制'), editStaff: () => getLabel(386247, '编辑编制'), - changeStaff: () => getLabel(386247, '编辑变更'), + changeStaff: () => getLabel(386247, '编制变更'), jobName: () => getLabel(385936, '岗位'), newJob: () => getLabel(386246, '新建岗位'), editJob: () => getLabel(386247, '编辑岗位'),