dedsudiyu vor 11 Monaten
Ursprung
Commit
2d83657ec6

+ 4 - 0
src/layout/components/AppMain.vue

@@ -93,6 +93,10 @@ export default {
           this.$set(this,'planData',response.data);
           this.$set(this,'planData',response.data);
           this.$set(this,'text',response.data[1]?'有多个实验室发生预案':'有实验室发生预案');
           this.$set(this,'text',response.data[1]?'有多个实验室发生预案':'有实验室发生预案');
           this.$set(this,'planType',true);
           this.$set(this,'planType',true);
+        }else{
+          this.$set(this,'planType',false);
+          this.$set(this,'planData',[]);
+          this.$set(this,'text','');
         }
         }
       })
       })
     },
     },

+ 1 - 1
src/views/emergencyManagement/performEvacuation/performEvacuationData.vue

@@ -833,7 +833,7 @@
             })
             })
           })
           })
           this.$set(this,'planSensorList',planSensorList);
           this.$set(this,'planSensorList',planSensorList);
-
+          this.iotBigViewDeviceFindBySubId();
           this.$forceUpdate();
           this.$forceUpdate();
         })
         })
       },
       },

+ 6 - 8
src/views/iotDevice/hardwareManagement/hardwareClassification/index.vue

@@ -40,13 +40,13 @@
           <el-table-column label="物联标识" prop="deviceTypeKey" width="200" show-overflow-tooltip/>
           <el-table-column label="物联标识" prop="deviceTypeKey" width="200" show-overflow-tooltip/>
           <el-table-column label="小图标" align="left" prop="icon" width="100" show-overflow-tooltip>
           <el-table-column label="小图标" align="left" prop="icon" width="100" show-overflow-tooltip>
             <template slot-scope="scope">
             <template slot-scope="scope">
-              <img v-if="scope.row.icon" style="height:24px;width:24px;" :src="scope.row.icon">
+              <img v-if="scope.row.icon" style="height:24px;width:24px;" :src="fileBrowseEnvironment+scope.row.icon">
               <span v-else>--</span>
               <span v-else>--</span>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column label="大图标" align="left" prop="exceptionIcon" width="100" show-overflow-tooltip>
           <el-table-column label="大图标" align="left" prop="exceptionIcon" width="100" show-overflow-tooltip>
             <template slot-scope="scope">
             <template slot-scope="scope">
-              <img v-if="scope.row.exceptionIcon" style="height:24px;width:24px;"  :src="scope.row.exceptionIcon">
+              <img v-if="scope.row.exceptionIcon" style="height:24px;width:24px;" :src="fileBrowseEnvironment+scope.row.exceptionIcon">
               <span v-else>--</span>
               <span v-else>--</span>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
@@ -149,7 +149,7 @@
             :headers="headers"
             :headers="headers"
             :before-upload="(file)=>beforeAvatarUpload(file)">
             :before-upload="(file)=>beforeAvatarUpload(file)">
             <div class="center-img" style="margin-left:20px;">
             <div class="center-img" style="margin-left:20px;">
-              <img v-if="dialogForm.icon" :src="dialogForm.icon" style="max-width:40px;max-height:40px;">
+              <img v-if="dialogForm.icon" :src="fileBrowseEnvironment+dialogForm.icon" style="max-width:40px;max-height:40px;">
               <p v-if="!dialogForm.icon" class="el-icon-upload" style="text-align: center;line-height:40px;font-size:30px;color:#0183FA;"></p>
               <p v-if="!dialogForm.icon" class="el-icon-upload" style="text-align: center;line-height:40px;font-size:30px;color:#0183FA;"></p>
             </div>
             </div>
           </el-upload>
           </el-upload>
@@ -164,7 +164,7 @@
             :headers="headers"
             :headers="headers"
             :before-upload="(file)=>beforeAvatarUpload(file)">
             :before-upload="(file)=>beforeAvatarUpload(file)">
             <div class="center-img" style="margin-left:20px;">
             <div class="center-img" style="margin-left:20px;">
-              <img v-if="dialogForm.exceptionIcon" :src="dialogForm.exceptionIcon" style="max-width:40px;max-height:40px;">
+              <img v-if="dialogForm.exceptionIcon" :src="fileBrowseEnvironment+dialogForm.exceptionIcon" style="max-width:40px;max-height:40px;">
               <p v-if="!dialogForm.exceptionIcon" class="el-icon-upload" style="text-align: center;line-height:40px;font-size:30px;color:#E65D6E;"></p>
               <p v-if="!dialogForm.exceptionIcon" class="el-icon-upload" style="text-align: center;line-height:40px;font-size:30px;color:#E65D6E;"></p>
             </div>
             </div>
           </el-upload>
           </el-upload>
@@ -244,6 +244,8 @@
         },
         },
         //物联分类下拉列表
         //物联分类下拉列表
         iotTypeOptions:[],
         iotTypeOptions:[],
+        // 文件服务地址
+        fileBrowseEnvironment:window.location.href.split('://')[0]+'://'+localStorage.getItem('fileBrowseEnvironment'),
       }
       }
     },
     },
     created () {
     created () {
@@ -308,10 +310,6 @@
         this.$set(this,'loading',true);
         this.$set(this,'loading',true);
         let obj = JSON.parse(JSON.stringify(this.queryParams))
         let obj = JSON.parse(JSON.stringify(this.queryParams))
         iotHardwareTypeList(obj).then(response => {
         iotHardwareTypeList(obj).then(response => {
-          response.data.records.forEach((item)=>{
-            item.icon = item.icon?window.location.href.split('://')[0]+'://'+localStorage.getItem('fileBrowseEnvironment')+item.icon:null;
-            item.exceptionIcon = item.exceptionIcon?window.location.href.split('://')[0]+'://'+localStorage.getItem('fileBrowseEnvironment')+item.exceptionIcon:null;
-          })
           this.$set(this,'loading',false);
           this.$set(this,'loading',false);
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);
           this.$set(this,'total',response.data.total);

+ 7 - 9
src/views/iotDevice/intelligenceIot/iotClassification/attributePage.vue

@@ -40,13 +40,13 @@
         <el-table-column label="标识" align="left" prop="code" width="150" show-overflow-tooltip/>
         <el-table-column label="标识" align="left" prop="code" width="150" show-overflow-tooltip/>
         <el-table-column label="小图标" align="left" prop="icon" width="100" show-overflow-tooltip>
         <el-table-column label="小图标" align="left" prop="icon" width="100" show-overflow-tooltip>
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <img v-if="scope.row.icon" style="height:24px;width:24px;" :src="scope.row.icon">
+            <img v-if="scope.row.icon" style="height:24px;width:24px;" :src="fileBrowseEnvironment+scope.row.icon">
             <span v-else>--</span>
             <span v-else>--</span>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <el-table-column label="大图标" align="left" prop="exceptionIcon" width="100" show-overflow-tooltip>
         <el-table-column label="大图标" align="left" prop="exceptionIcon" width="100" show-overflow-tooltip>
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <img v-if="scope.row.exceptionIcon" style="height:24px;width:24px;"  :src="scope.row.exceptionIcon">
+            <img v-if="scope.row.exceptionIcon" style="height:24px;width:24px;" :src="fileBrowseEnvironment+scope.row.exceptionIcon">
             <span v-else>--</span>
             <span v-else>--</span>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
@@ -160,7 +160,7 @@
                     :headers="headers"
                     :headers="headers"
                     :before-upload="(file)=>beforeAvatarUpload(file)">
                     :before-upload="(file)=>beforeAvatarUpload(file)">
                     <div class="center-img" style="margin-left:20px;">
                     <div class="center-img" style="margin-left:20px;">
-                      <img v-if="dialogForm.icon" :src="dialogForm.icon" style="max-width:40px;max-height:40px;">
+                      <img v-if="dialogForm.icon" :src="fileBrowseEnvironment+dialogForm.icon" style="max-width:40px;max-height:40px;">
                       <p v-if="!dialogForm.icon" class="el-icon-upload" style="text-align: center;line-height:40px;font-size:30px;color:#0183FA;"></p>
                       <p v-if="!dialogForm.icon" class="el-icon-upload" style="text-align: center;line-height:40px;font-size:30px;color:#0183FA;"></p>
                     </div>
                     </div>
                   </el-upload>
                   </el-upload>
@@ -175,7 +175,7 @@
                     :headers="headers"
                     :headers="headers"
                     :before-upload="(file)=>beforeAvatarUpload(file)">
                     :before-upload="(file)=>beforeAvatarUpload(file)">
                     <div class="center-img" style="margin-left:20px;">
                     <div class="center-img" style="margin-left:20px;">
-                      <img v-if="dialogForm.exceptionIcon" :src="dialogForm.exceptionIcon" style="max-width:40px;max-height:40px;">
+                      <img v-if="dialogForm.exceptionIcon" :src="fileBrowseEnvironment+dialogForm.exceptionIcon" style="max-width:40px;max-height:40px;">
                       <p v-if="!dialogForm.exceptionIcon" class="el-icon-upload" style="text-align: center;line-height:40px;font-size:30px;color:#E65D6E;"></p>
                       <p v-if="!dialogForm.exceptionIcon" class="el-icon-upload" style="text-align: center;line-height:40px;font-size:30px;color:#E65D6E;"></p>
                     </div>
                     </div>
                   </el-upload>
                   </el-upload>
@@ -355,7 +355,9 @@
             { required: true, message: "请输入字段名称", validator: this.spaceJudgment, trigger: "blur" }
             { required: true, message: "请输入字段名称", validator: this.spaceJudgment, trigger: "blur" }
           ],
           ],
         },
         },
-        dialogRulesNo:{}
+        dialogRulesNo:{},
+        // 文件服务地址
+        fileBrowseEnvironment:window.location.href.split('://')[0]+'://'+localStorage.getItem('fileBrowseEnvironment'),
       }
       }
     },
     },
     created(){
     created(){
@@ -390,10 +392,6 @@
       getList(){
       getList(){
         let obj = JSON.parse(JSON.stringify(this.queryParams))
         let obj = JSON.parse(JSON.stringify(this.queryParams))
         iotAttributeList(obj).then(response => {
         iotAttributeList(obj).then(response => {
-          response.data.records.forEach((item)=>{
-            item.icon = item.icon?window.location.href.split('://')[0]+'://'+localStorage.getItem('fileBrowseEnvironment')+item.icon:null;
-            item.exceptionIcon = item.exceptionIcon?window.location.href.split('://')[0]+'://'+localStorage.getItem('fileBrowseEnvironment')+item.exceptionIcon:null;
-          })
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);
           this.$set(this,'total',response.data.total);
         });
         });