Переглянути джерело

1.新增根据部门名查询该部门及其下辖部门员工
2.修改资产分单项目成员、实勘人为只能选择资产事业部人员

GouGengquan 10 місяців тому
батько
коміт
f7003170fb
2 змінених файлів з 19 додано та 4 видалено
  1. 4 0
      src/api/modules/user.js
  2. 15 4
      src/views/assets/orderDetail.vue

+ 4 - 0
src/api/modules/user.js

@@ -76,5 +76,9 @@ export default {
   // 获取资产评估师用户
   byAssetEvaluator(){
     return request.get(`user/byAssetEvaluator`);
+  },
+  // 根据部门名称获取部门及其下辖部门人员
+  byDepartmentName(params){
+    return request.get(`user/byDepartmentName/${params}`)
   }
 }

+ 15 - 4
src/views/assets/orderDetail.vue

@@ -351,7 +351,7 @@
                       :clearable="currentNode.nodeCode === 'DEPARTMENT_ALLOCATION'"
                       :readonly="currentNode.nodeCode != 'DEPARTMENT_ALLOCATION'"
                       :disabled="currentNode.nodeCode != 'DEPARTMENT_ALLOCATION'">
-                      <el-option v-for="(u, id) in allUsers" :label="u.name" :value="u.id" :key="u.id"></el-option>
+                      <el-option v-for="(u, id) in depUsers" :label="u.name" :value="u.id" :key="u.id"></el-option>
                     </el-select>
                   </el-form-item>
                 </el-col>
@@ -835,14 +835,14 @@
             <el-col :xs="24" :sm="12" :lg="12" :span="6">
               <el-form-item label="项目负责人:" label-width="200px" class="postInfo-container-item">
                 <el-select v-model="targetForm.principalId" placeholder="请选择" readonly disabled style="width: 100%">
-                  <el-option v-for="(u, id) in allUsers" :label="u.name" :value="u.id" :key="u.id"></el-option>
+                  <el-option v-for="(u, id) in principals" :label="u.name" :value="u.id" :key="u.id"></el-option>
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="12" :span="6">
               <el-form-item label="实勘人:" prop="siteIds" label-width="200px" class="postInfo-container-item">
                 <el-select v-model="targetForm.siteIds" placeholder="请选择" multiple style="width: 100%">
-                  <el-option v-for="(u, id) in allUsers" :label="u.name" :value="u.id" :key="u.id"></el-option>
+                  <el-option v-for="(u, id) in depUsers" :label="u.name" :value="u.id" :key="u.id"></el-option>
                 </el-select>
               </el-form-item>
             </el-col>
@@ -1611,6 +1611,8 @@ export default {
       allUsers: [],
       // 资产评估师
       assetEvaluator: [],
+      // 资产事业部人员
+      depUsers: [],
       // 资产评估对象信息
       assetsEvaluationTarget: [],
       writeProductionStatementNos: [],
@@ -1906,6 +1908,7 @@ export default {
     if (this.$route.query.activeTabName !== null && this.$route.query.activeTabName !== undefined) {
       this.activeTabName = this.$route.query.activeTabName;
     }
+    this.byDepartmentName();
     this.getCurrentNodeInfo();
     this.getAllotDepartment();
     this.getAssetsDetailById(this.pageParams.row.assetsId);
@@ -1921,7 +1924,7 @@ export default {
           this.initCustomerSelect(this.assetsForm.clienteleType);
           this.getPrincipalByAllotDepartment();
           this.getContactInfo();
-          this.getAllUser();
+          // this.getAllUser();
         }
       })
     },
@@ -2200,6 +2203,14 @@ export default {
         }
       })
     },
+    // 根据部门名称获取部门及其下辖部门人员
+    byDepartmentName(){
+      this.$api.user.byDepartmentName("资产评估事业部").then(res => {
+        if (res.code === 200) {
+          this.depUsers = res.data;
+        }
+      })
+    },
     // 获取流程节点信息
     getCurrentNodeInfo() {
       if (this.pageParams.row.assetsId) {