!33 编制补充

Merge pull request !33 from reset/feature/cl
This commit is contained in:
reset 2022-06-07 09:59:09 +00:00 committed by Gitee
commit d3f49f9be6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 27 additions and 11 deletions

View File

@ -212,18 +212,14 @@ export default class Staff extends React.Component {
} = staff; } = staff;
staff.setStaffName(val); staff.setStaffName(val);
!this.isEmptyObject(form2.getFormParams()) && staff.updateFields(val); //!this.isEmptyObject(form2.getFormParams()) && staff.updateFields(val);
} }
reRenderColumns(columns) { reRenderColumns(columns) {
let _this = this; let _this = this;
columns.forEach((c, index) => { // columns.forEach((c, index) => {
// if (c.dataIndex == 'forbidden_tag') {
// c.render = function(text, record) { // })
// return <Switch defaultChecked={record.forbidden_tag == "0" ? true : false} onChange={checked => _this.updateForbiddenTag(checked,record.id)} />
// }
// };
})
} }
updateForbiddenTag(checked,id) { updateForbiddenTag(checked,id) {
@ -239,7 +235,7 @@ export default class Staff extends React.Component {
} = operate; } = operate;
(index == '0') && this.doEdit(record.randomFieldId); (index == '0') && this.doEdit(record.randomFieldId);
(index == '1') && this.doDel(record.randomFieldId); (index == '1') && this.doDel(record.randomFieldId);
(index == '2') && this.doChange(record.randomFieldId);
} }
doEdit(id) { doEdit(id) {
@ -248,7 +244,21 @@ export default class Staff extends React.Component {
} = this.props; } = this.props;
staff.setNeDialogTitle(i18n.label.editStaff()); 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.setIsNew(false);
staff.setVisible(true); staff.setVisible(true);
staff.getForm(); staff.getForm();

View File

@ -136,6 +136,7 @@ export const i18n = {
staffName: () => getLabel(385936, '编制上报'), staffName: () => getLabel(385936, '编制上报'),
newStaff: () => getLabel(386246, '新建编制'), newStaff: () => getLabel(386246, '新建编制'),
editStaff: () => getLabel(386247, '编辑编制'), editStaff: () => getLabel(386247, '编辑编制'),
changeStaff: () => getLabel(386247, '编制变更'),
jobName: () => getLabel(385936, '岗位'), jobName: () => getLabel(385936, '岗位'),
newJob: () => getLabel(386246, '新建岗位'), newJob: () => getLabel(386246, '新建岗位'),
editJob: () => getLabel(386247, '编辑岗位'), editJob: () => getLabel(386247, '编辑岗位'),

View File

@ -45,7 +45,7 @@ export class StaffStore {
@observable staffId = ''; @observable staffId = '';
@observable date = ''; @observable date = '';
@observable hasRight = ''; @observable hasRight = '';
@observable operateType = ''; //1 编辑 2 变更
@ -292,4 +292,9 @@ export class StaffStore {
this.hasRight = bool; this.hasRight = bool;
} }
setOperateType(operateType) {
this.operateType = operateType;
}
} }