소스 검색

修改项目安排现场负责人选不到子部门的人

余思翰 3 달 전
부모
커밋
5cb06b5953
1개의 변경된 파일15개의 추가작업 그리고 2개의 파일을 삭제
  1. 15
    2
      oa-ui/src/views/flowable/form/projectProcess/arrangeProject.vue

+ 15
- 2
oa-ui/src/views/flowable/form/projectProcess/arrangeProject.vue 파일 보기

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-03-19 09:24:06
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-09-12 10:08:01
5
+ * @LastEditTime: 2025-01-08 10:12:31
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -199,8 +199,21 @@ export default {
199 199
     handleChangeDept(deptId) {
200 200
       this.peopleForm.userId = '';
201 201
       this.$set(this.peopleForm, 'deptId', deptId)
202
-      listUser({ pageSize: 999999, deptId }).then(res => {
202
+      listUser({ pageSize: 999999, deptId: deptId }).then(res => {
203 203
         this.peopleForm.userList = res.rows
204
+        for (let a of res.rows) {
205
+          this.peopleForm.allDeptUserList.push(a)
206
+        }
207
+        // 去重
208
+        const seenIds = new Set();
209
+        const uniqueArray = [];
210
+        this.peopleForm.allDeptUserList.forEach(item => {
211
+          if (!seenIds.has(item.userId)) {
212
+            seenIds.add(item.userId);
213
+            uniqueArray.push(item);
214
+          }
215
+        });
216
+        this.peopleForm.allDeptUserList = uniqueArray
204 217
       })
205 218
     },
206 219
     // 确定项目负责人

Loading…
취소
저장