|
|
@ -136,7 +136,8 @@ function OrgnizationMgm() { |
|
|
|
orgForm.setFieldsValue({ |
|
|
|
id: id, |
|
|
|
'depart_id': recursionFindIdPath([...departTree], id, undefined, false), |
|
|
|
'name': name |
|
|
|
'name': name, |
|
|
|
pid: pid |
|
|
|
}) |
|
|
|
setActiveOrgTree({ isTop: isTop }) |
|
|
|
setOrgModalVisible(true) |
|
|
@ -374,12 +375,13 @@ function OrgnizationMgm() { |
|
|
|
|
|
|
|
const handleOrgConfirm = () => { |
|
|
|
orgForm.validateFields().then((data) => { |
|
|
|
// console.log(data) |
|
|
|
let arr =data.depart_id |
|
|
|
if (data.id) { |
|
|
|
ajaxAreaEdit(Object.assign({}, { |
|
|
|
id: data.id, |
|
|
|
name: data.name, |
|
|
|
pid: arr ? arr.at(-1) : '' |
|
|
|
pid: data.pid |
|
|
|
})).then((msg) => { |
|
|
|
message.success(msg) |
|
|
|
setOrgModalVisible(false) |
|
|
@ -642,6 +644,7 @@ function OrgnizationMgm() { |
|
|
|
> |
|
|
|
<Form.Item name="id" hidden></Form.Item> |
|
|
|
<Form.Item name="level" hidden></Form.Item> |
|
|
|
<Form.Item name="pid" hidden></Form.Item> |
|
|
|
<Form.Item label="部门名称" name="name" rules={[ |
|
|
|
{ |
|
|
|
required: true |
|
|
|