|
@@ -777,29 +777,30 @@ export default {
|
|
if (valid) {
|
|
if (valid) {
|
|
const { organIdLists, postDeptIds, deptIds, deptId, ...res } =
|
|
const { organIdLists, postDeptIds, deptIds, deptId, ...res } =
|
|
this.form;
|
|
this.form;
|
|
- // let tempPost = [];
|
|
|
|
- // postDeptIds.forEach((post) => {
|
|
|
|
- // let tempIds = [];
|
|
|
|
- // post.deptIds.forEach((item) => {
|
|
|
|
- // tempIds.push(item[item.length - 1]);
|
|
|
|
- // });
|
|
|
|
- // tempPost.push({
|
|
|
|
- // postId: post.postId,
|
|
|
|
- // deptIds: tempIds,
|
|
|
|
- // });
|
|
|
|
- // });
|
|
|
|
- // const tempDeptIds = [];
|
|
|
|
- // deptIds.forEach((ds) => {
|
|
|
|
- // tempDeptIds.push(ds[ds.length - 1]);
|
|
|
|
- // });
|
|
|
|
-
|
|
|
|
- const tempDeptId = deptId ? deptId[deptId.length - 1] : "";
|
|
|
|
|
|
+ let tempPost = [];
|
|
|
|
+ // console.log(postDeptIds,'deptIds',deptIds,'deptId',deptId)
|
|
|
|
+ // postDeptIds.forEach((post) => {
|
|
|
|
+ // let tempIds = [];
|
|
|
|
+ // post.deptIds.forEach((item) => {
|
|
|
|
+ // tempIds.push(item[item.length - 1]);
|
|
|
|
+ // });
|
|
|
|
+ // tempPost.push({
|
|
|
|
+ // postId: post.postId,
|
|
|
|
+ // deptIds: tempIds,
|
|
|
|
+ // });
|
|
|
|
+ // });
|
|
|
|
+ // const tempDeptIds = [];
|
|
|
|
+ // deptIds.forEach((ds) => {
|
|
|
|
+ // tempDeptIds.push(ds[ds.length - 1]);
|
|
|
|
+ // });
|
|
|
|
+ // console.log(tempDeptIds)
|
|
|
|
+ // const tempDeptId = deptId ? deptId[deptId.length - 1] : "";
|
|
|
|
|
|
let tempForm = {
|
|
let tempForm = {
|
|
postDeptIds: JSON.stringify(postDeptIds),
|
|
postDeptIds: JSON.stringify(postDeptIds),
|
|
organIdList: organIdLists.join(","),
|
|
organIdList: organIdLists.join(","),
|
|
- // deptIds: tempDeptIds,
|
|
|
|
- // deptId: tempDeptId,
|
|
|
|
|
|
+ deptIds: deptIds,
|
|
|
|
+ deptId: deptId,
|
|
...res,
|
|
...res,
|
|
};
|
|
};
|
|
if (this.formActionTitle == "create") {
|
|
if (this.formActionTitle == "create") {
|
|
@@ -1027,7 +1028,7 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
const deptIds = data.deptIds ? eval(data.deptIds) : [];
|
|
const deptIds = data.deptIds ? eval(data.deptIds) : [];
|
|
- const tempDeptIds = [];
|
|
|
|
|
|
+ // const tempDeptIds = [];
|
|
// if (deptIds.length > 0) {
|
|
// if (deptIds.length > 0) {
|
|
// deptIds.forEach((ds) => {
|
|
// deptIds.forEach((ds) => {
|
|
// tempDeptIds.push(this.formatParentId(ds, this.deptList));
|
|
// tempDeptIds.push(this.formatParentId(ds, this.deptList));
|
|
@@ -1040,9 +1041,7 @@ export default {
|
|
gender: data.gender,
|
|
gender: data.gender,
|
|
phone: Number(data.phone),
|
|
phone: Number(data.phone),
|
|
roleIds: data.roleIds,
|
|
roleIds: data.roleIds,
|
|
- deptId: data.deptId
|
|
|
|
- ? this.formatParentId(data.deptId, this.deptList)
|
|
|
|
- : null,
|
|
|
|
|
|
+ deptId: data.deptId,
|
|
positionIds: data.positionIds
|
|
positionIds: data.positionIds
|
|
? data.positionIds.split(",").map((i) => Number(i))
|
|
? data.positionIds.split(",").map((i) => Number(i))
|
|
: [],
|
|
: [],
|
|
@@ -1052,7 +1051,7 @@ export default {
|
|
contactAddress: data.contactAddress,
|
|
contactAddress: data.contactAddress,
|
|
postalCode: data.postalCode,
|
|
postalCode: data.postalCode,
|
|
postDeptIds: postDeptArr,
|
|
postDeptIds: postDeptArr,
|
|
- deptIds: tempDeptIds,
|
|
|
|
|
|
+ deptIds: deptIds,
|
|
};
|
|
};
|
|
} else {
|
|
} else {
|
|
this.roleResetList = [...this.roleBaseList];
|
|
this.roleResetList = [...this.roleBaseList];
|