Forráskód Böngészése

Merge branch 'master' of http://192.168.1.43:3000/v3/v3-lab-web

dedsudiyu 8 hónapja
szülő
commit
2959265da0

+ 0 - 2
src/views/chemicalManage/basicManagement/chemicalsCabinetManage/addPage.vue

@@ -397,8 +397,6 @@
         this.$refs["form"].validate(valid => {
           if (valid) {
             let obj = JSON.parse(JSON.stringify(this.newData))
-            console.log(this.newData)
-            console.log(obj)
             let modelList = [];
             obj.cabinetDoorModelList.forEach((item)=>{
               let userList = [];

+ 29 - 3
src/views/chemicalManage/basicManagement/chemicalsCabinetManage/index.vue

@@ -105,7 +105,7 @@
   import listPage from "./listPage.vue";
   import infoPage from "./infoPage.vue";
   import qrCodeDialog from "@/components/qrCodeDialog/index.vue"
-  import { getDeptDropList,systemBuildingGetTreeList,} from "@/api/commonality/permission";
+  import { getDeptDropList,systemBuildingGetTreeList,systemUserSelect} from "@/api/commonality/permission";
   import {
     chemicalCabinetDelete,
     chemicalCabinetDetail,
@@ -237,8 +237,14 @@
         }else if(val == '2'){
           //编辑
           chemicalCabinetDetail({cabinetId:row.cabinetId}).then(response => {
-            this.$set(this,'propsData',response.data);
-            this.$set(this,'pageType',2);
+            let userIds=[];
+            response.data.cabinetDoorVoList.forEach(function(item) {
+              item.cabinetAdminVoList.forEach(function(item2) {
+                userIds.push(item2.userId)
+              })
+            })
+            this.filtrationUser(response.data,userIds)
+
           })
         }else if(val == '3'){
           //删除
@@ -255,6 +261,26 @@
           }).catch(() => {});
         }
       },
+
+      //过滤人员
+      filtrationUser(row,userIds){
+        systemUserSelect({userIds:userIds}).then(response => {
+          if (response.data[0]){
+            row.cabinetDoorVoList.forEach(function(item) {
+              item.cabinetAdminVoList.forEach(function(item2) {
+                response.data.forEach(function(item3) {
+                  if (item2.userId==item3.userId){
+                    item2.userName=item3.userName
+                  }
+                })
+                userIds.push(item2.userId)
+              })
+            })
+          }
+          this.$set(this,'propsData',row);
+          this.$set(this,'pageType',2);
+        });
+      },
       //二维码组件开关
       qrCodeDialogButton(row){
         this.$set(this,'qrCodeDialogData',{