Jelajahi Sumber

fix:人员管理选择领导人bug修复

test 2 tahun lalu
induk
melakukan
8a65ed8b47

+ 8 - 3
src/views/PeopleManage/Agent/AgentManage.vue

@@ -218,8 +218,8 @@
                     <el-option
                       v-for="val in leaderOptions"
                       :label="val.name"
-                      :value="val.id"
-                      :key="val.id"
+                      :value="val.userId"
+                      :key="val.userId"
                     ></el-option>
                   </el-select>
                 </el-form-item>
@@ -915,7 +915,12 @@ export default {
       this.$api.user
         .selectfindByreferrerId({ deptId: this.deptId })
         .then((res) => {
-          this.recommenderOptions = res.data;
+          this.leaderOptions = res.data.map((val) => {
+            return {
+              userId: val.id,
+              name: val.name,
+            };
+          });
         });
       // formData
       this.$api.user.findListByDeptId({ deptId: this.deptId }).then((res) => {

+ 8 - 3
src/views/PeopleManage/Player/PlayerManageteam.vue

@@ -204,8 +204,8 @@
                     <el-option
                       v-for="val in leaderOptions"
                       :label="val.name"
-                      :value="val.id"
-                      :key="val.id"
+                      :value="val.userId"
+                      :key="val.userId"
                     ></el-option>
                   </el-select>
                 </el-form-item>
@@ -829,7 +829,12 @@ export default {
       this.$api.user
         .findBackListByDeptId({ deptId: this.deptId })
         .then((res) => {
-          this.leaderOptions = res.data;
+          this.leaderOptions = res.data.map((val) => {
+            return {
+              userId: val.id,
+              name: val.name,
+            };
+          });
         });
       if (this.currentTreeNode == null) {
         this.$message.info("请选择所属公司或部门");

+ 8 - 3
src/views/PeopleManage/Staff/StaffManage.vue

@@ -278,8 +278,8 @@
                     <el-option
                       v-for="val in leaderOptions"
                       :label="val.name"
-                      :value="val.id"
-                      :key="val.id"
+                      :value="val.userId"
+                      :key="val.userId"
                     ></el-option>
                   </el-select>
                 </el-form-item>
@@ -992,7 +992,12 @@ export default {
       // }
       // formData
       this.$api.user.findListByDeptId({ deptId: this.deptId }).then((res) => {
-        this.leaderOptions = res.data;
+        this.leaderOptions = res.data.map((val) => {
+          return {
+            userId: val.id,
+            name: val.name,
+          };
+        });
       });
       if (this.currentTreeNode == null) {
         this.$message.info("请选择所属公司或部门");

+ 8 - 3
src/views/PeopleManage/TeamLeader/TeamLeaderManage.vue

@@ -281,8 +281,8 @@
                     <el-option
                       v-for="val in leaderOptions"
                       :label="val.name"
-                      :value="val.id"
-                      :key="val.id"
+                      :value="val.userId"
+                      :key="val.userId"
                     ></el-option>
                   </el-select>
                 </el-form-item>
@@ -946,7 +946,12 @@ export default {
       this.dialogVisible = true;
       this.dialogPassword = true;
       this.$api.user.findListByDeptId({ deptId: this.deptId }).then((res) => {
-        this.leaderOptions = res.data;
+        this.leaderOptions = res.data.map((val) => {
+          return {
+            userId: val.id,
+            name: val.name,
+          };
+        });
       });
     },
     // 新增或修改的弹出框Start