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