jiawuxian 1 anno fa
parent
commit
486daaada5

+ 7 - 3
src/views/menu/iot/ups/index.vue

@@ -47,6 +47,7 @@ import { deptTreeList } from '@/api/public'
 import KList from '@/components/list/index.vue'
 import Item from './components/item.vue'
 import OrgTree from '@/components/orgTree'
+import dayjs from 'dayjs'
 export default {
   components: { NavBar, KList, Item, OrgTree },
   name: 'iot_ups',
@@ -104,19 +105,22 @@ export default {
             orgName: '六一分理处',
             deviceName: '监控主机Ups',
             state: 0,
-            stateText: '正常'
+            stateText: '正常',
+            stateUpdateTime:dayjs().add(-1000,'second').format('YYYY-MM-DD HH:mm:ss')
           },
           {
             orgName: '六一分理处',
             deviceName: '现金区Ups',
             state: 0,
-            stateText: '正常'
+            stateText: '正常',
+            stateUpdateTime:dayjs().add(-100,'second').format('YYYY-MM-DD HH:mm:ss')
           },
           {
             orgName: '六一分理处',
             deviceName: '大厅Ups',
             state: 0,
-            stateText: '正常'
+            stateText: '正常',
+            stateUpdateTime:dayjs().add(-300,'second').format('YYYY-MM-DD HH:mm:ss')
           }
         ]
       }

+ 12 - 2
src/views/menu/iot/videoDiagnosis/detail.vue

@@ -30,14 +30,14 @@
             </div>
             <van-image
               height="20vh"
-              :src="info.quality.image"
+              :src="imgUrl(info.quality.image)"
               @click="
                 () => {
                   showImage = true
                 }
               "
             ></van-image>
-            <van-image-preview v-model="showImage" :images="[info.quality.image]"></van-image-preview
+            <van-image-preview v-model="showImage" :images="[imgUrl(info.quality.image)]"></van-image-preview
           ></template>
         </van-cell>
       </van-cell-group>
@@ -141,6 +141,16 @@ export default {
       }
 
       return str
+    },
+    imgUrl(img) { 
+          // let path="http://localhost:8080/iot/VideoDiagnosis/img?path=";
+      let path = process.env.NODE_ENV === "development"
+      
+          ? "/dev/iot/VideoDiagnosis/img?path="
+          : process.env.VUE_APP_BASE_API + "/iot/VideoDiagnosis/img?path="
+      
+      if (img) path += `${encodeURIComponent(img)}`;
+      return path;
     }
   }
 }