Selaa lähdekoodia

Merge branch 'v0.0.9' of http://10.87.21.221:8000/jzyd_yyds/soc_app into v0.0.9

zhulu 1 vuosi sitten
vanhempi
commit
84d5312eb3

+ 23 - 17
src/views/home/isMy.vue

@@ -76,21 +76,23 @@
       <div class="message-content">
         <div class="text-content">
           <div class="mainItem" style="margin-top: 10%;">
-            <van-row>
-              <van-col :span="6" class="label">
-<!--                <div style="text-align: center;">签名印章</div>-->
-              </van-col>
-              <van-col :span="18">
-                <imgCom
-                  :width="'150'"
-                  :list="imgList"
-                  v-for="item in imgList"
-                  :key="item"
-                  :height="'150'"
-                  :src="item"
-                ></imgCom>
-              </van-col>
-            </van-row>
+            <div style="height: 150px">
+              <van-row>
+                <van-col :span="6" class="label">
+                  <!--                <div style="text-align: center;">签名印章</div>-->
+                </van-col>
+                <van-col :span="18">
+                  <imgCom
+                    :width="'150'"
+                    :list="imgList"
+                    v-for="item in imgList"
+                    :key="item"
+                    :height="'150'"
+                    :src="item"
+                  ></imgCom>
+                </van-col>
+              </van-row>
+            </div>
             <div class="btns" style="text-align: center;margin-top: 10px;">
               <van-button v-if="signatureSeal" type="info" size="small" @click="showSignHandler">重置签名印章</van-button>
               <van-button v-else size="small" type="info" @click="showSignHandler">新增签名印章</van-button>
@@ -144,7 +146,10 @@ export default {
   },
   methods: {
     initData(){
-      this.imgList = this.signatureSeal.split(',') || [];
+      console.log("123456")
+      if (this.signatureSeal){
+        this.imgList = this.signatureSeal.split(',');
+      }
       getServer({code:'CUSTOMER_SERVICE'}).then(res => {
         let data = res.data;
         if(data){
@@ -189,7 +194,8 @@ export default {
           updateSignatureSeal({"signatureSeal":imgUrl}).then(res => {
             this.showSign = false;
             this.imgList = imgUrl.split(',') || [];
-            this.$store.commit('SET_MASTER_SIGNATURE_SEAL', imgUrl)
+            this.$store.commit('SET_MASTER_SIGNATURE_SEAL', imgUrl);
+            this.signatureSeal = imgUrl;
           })
 
           // this.$emit("imgUrl", res.data.url);

+ 14 - 14
src/views/menu/iot/envMonitor/index.vue

@@ -68,8 +68,8 @@ export default {
       waterCheckBadge: null,
       upsCheckBadge: null,
       airCheckBadge: null,
-      totalCount: null,
-      alarmCount: null,
+      totalCount: 0,
+      alarmCount: 0,
       dataInfo:{},
       tabName:"thiefCheck"
     }
@@ -157,28 +157,28 @@ export default {
     },
     tabActiveHandler(name){
       if (name === "thiefCheck"){
-        this.totalCount = this.dataInfo.thiefCount;
-        this.alarmCount = this.dataInfo.thiefAlarmCount;
+        this.totalCount = this.dataInfo.thiefCount === null ? 0 : this.dataInfo.thiefCount;
+        this.alarmCount = this.dataInfo.thiefAlarmCount === null ? 0 : this.dataInfo.thiefAlarmCount;
         this.search.deviceType = "41881";
       }else if (name === "infraredCheck"){
-        this.totalCount = this.dataInfo.infraredCount;
-        this.alarmCount = this.dataInfo.infraredAlarmCount;
+        this.totalCount = this.dataInfo.infraredCount === null ? 0 : this.dataInfo.infraredCount;
+        this.alarmCount = this.dataInfo.infraredAlarmCount === null ? 0 : this.dataInfo.infraredAlarmCount;
         this.search.deviceType = "4181";
       }else if (name === "doorCheck"){
-        this.totalCount = this.dataInfo.doorCount;
-        this.alarmCount = this.dataInfo.doorAlarmCount;
+        this.totalCount = this.dataInfo.doorCount === null ? 0 : this.dataInfo.doorCount;
+        this.alarmCount = this.dataInfo.doorAlarmCount === null ? 0 : this.dataInfo.doorAlarmCount;
         this.search.deviceType = "4188";
       }else if (name === "waterCheck"){
-        this.totalCount = this.dataInfo.waterCount;
-        this.alarmCount = this.dataInfo.waterAlarmCount;
+        this.totalCount = this.dataInfo.waterCount === null ? 0 : this.dataInfo.waterCount;
+        this.alarmCount = this.dataInfo.waterAlarmCount === null ? 0 : this.dataInfo.waterAlarmCount;
         this.search.deviceType = "4184";
       }else if (name === "upsCheck"){
-        this.totalCount = this.dataInfo.upsCount;
-        this.alarmCount = this.dataInfo.upsAlarmCount;
+        this.totalCount = this.dataInfo.upsCount === null ? 0 : this.dataInfo.upsCount;
+        this.alarmCount = this.dataInfo.upsAlarmCount === null ? 0 : this.dataInfo.upsAlarmCount;
         this.search.deviceType = "408";
       }else if (name === "airCheck"){
-        this.totalCount = this.dataInfo.airCount;
-        this.alarmCount = this.dataInfo.airAlarmCount;
+        this.totalCount = this.dataInfo.airCount === null ? 0 : this.dataInfo.airCount;
+        this.alarmCount = this.dataInfo.airAlarmCount === null ? 0 : this.dataInfo.airAlarmCount;
         this.search.deviceType = "415";
       }
       this.tabName = name;

+ 8 - 8
src/views/menu/iot/fireWarning/index.vue

@@ -62,8 +62,8 @@ export default {
       smokeCheckBadge: null,
       gasCheckBadge: null,
       temperatureAndHumidityCheckBadge: null,
-      totalCount: null,
-      alarmCount: null,
+      totalCount: 0,
+      alarmCount: 0,
       dataInfo:{},
       tabName:"smokeCheck"
     }
@@ -137,16 +137,16 @@ export default {
     },
     tabActiveHandler(name){
       if (name === "smokeCheck"){
-        this.totalCount = this.dataInfo.smokeCount;
-        this.alarmCount = this.dataInfo.smokeAlarmCount;
+        this.totalCount = this.dataInfo.smokeCount === null ? 0 : this.dataInfo.smokeCount;
+        this.alarmCount = this.dataInfo.smokeAlarmCount === null ? 0 : this.dataInfo.smokeAlarmCount;
         this.search.deviceType = "4182";
       }else if (name === "gasCheck"){
-        this.totalCount = this.dataInfo.gasCount;
-        this.alarmCount = this.dataInfo.gasAlarmCount;
+        this.totalCount = this.dataInfo.gasCount === null ? 0 : this.dataInfo.gasCount;
+        this.alarmCount = this.dataInfo.gasAlarmCount === null ? 0 : this.dataInfo.gasAlarmCount;
         this.search.deviceType = "41885";
       }else if (name === "temperatureAndHumidityCheck"){
-        this.totalCount = this.dataInfo.temperatureAndHumidityCount;
-        this.alarmCount = this.dataInfo.temperatureAndHumidityAlarmCount;
+        this.totalCount = this.dataInfo.temperatureAndHumidityCount === null ? 0 : this.dataInfo.temperatureAndHumidityCount;
+        this.alarmCount = this.dataInfo.temperatureAndHumidityAlarmCount === null ? 0 : this.dataInfo.temperatureAndHumidityAlarmCount;
         this.search.deviceType = "4183";
       }
       this.tabName = name;