Browse Source

增加传感器与愿缺省样式 修改报警窗口监控获取数量

dedsudiyu 1 week ago
parent
commit
77740f1a90

+ 5 - 0
src/components/LabStats/EnvSensing.vue

@@ -15,6 +15,7 @@
               v-for="(minItem,minIndex) in item.sensorList" :key="minIndex">{{ minItem.deviceName }} : {{ minItem.deviceValue?minItem.deviceValue:'-' }}{{ minItem.unit }}</span>
               v-for="(minItem,minIndex) in item.sensorList" :key="minIndex">{{ minItem.deviceName }} : {{ minItem.deviceValue?minItem.deviceValue:'-' }}{{ minItem.unit }}</span>
             </div>
             </div>
           </div>
           </div>
+          <p class='null-data-text'>暂无数据</p>
         </div>
         </div>
       </div>
       </div>
     </div>
     </div>
@@ -110,6 +111,10 @@ export default {
   border: 1px solid rgba(255,0,0,0.7)!important;
   border: 1px solid rgba(255,0,0,0.7)!important;
   color:red!important;
   color:red!important;
 }
 }
+.null-data-text{
+  text-align: center;
+  line-height:220px;
+}
 .sensor-item {
 .sensor-item {
   padding: 10px 12px;
   padding: 10px 12px;
   margin-bottom: 6px;
   margin-bottom: 6px;

+ 6 - 0
src/components/LabStats/RiskWarning.vue

@@ -19,6 +19,7 @@
             <div class="w-sensor" :style="{ color: categoryColor(item.category) }">异常: {{ item.type }}</div>
             <div class="w-sensor" :style="{ color: categoryColor(item.category) }">异常: {{ item.type }}</div>
             <div class="w-time">{{ item.time }}</div>
             <div class="w-time">{{ item.time }}</div>
           </div>
           </div>
+          <p class='null-data-text'>暂无数据</p>
         </div>
         </div>
       </div>
       </div>
     </div>
     </div>
@@ -190,6 +191,11 @@ export default {
   min-height: 0;
   min-height: 0;
 }
 }
 
 
+.null-data-text{
+  text-align: center;
+  line-height:130px;
+}
+
 .warning-item {
 .warning-item {
   padding: 8px 12px;
   padding: 8px 12px;
   margin-bottom: 6px;
   margin-bottom: 6px;

+ 16 - 12
src/components/alarmWindow/AlertModal.vue

@@ -51,11 +51,12 @@
                 <span class="rec-indicator"><span class="rec-dot"></span> REC</span>
                 <span class="rec-indicator"><span class="rec-dot"></span> REC</span>
                 <span class="rec-name">{{ info.lab || '' }}</span>
                 <span class="rec-name">{{ info.lab || '' }}</span>
               </div>
               </div>
-              <div class="video-placeholder" v-if="!videoData">
-                <i class="el-icon-video-camera"></i>
-                <span>实时监控画面</span>
-              </div>
+              <!--<div class="video-placeholder" v-if="!videoData">-->
+                <!--<i class="el-icon-video-camera"></i>-->
+                <!--<span>实时监控画面</span>-->
+              <!--</div>-->
               <!--<H5PlayerVideo style="margin:10px 0 0 12px;" v-if="videoData" :videoProps="videoData"></H5PlayerVideo>-->
               <!--<H5PlayerVideo style="margin:10px 0 0 12px;" v-if="videoData" :videoProps="videoData"></H5PlayerVideo>-->
+              <p v-if="!videoData" style="line-height:210px;text-align: center;color:#fff;font-size:16px;">该实验室无监控</p>
               <mpegts-video style="display: inline-block" :videoProps="videoData"></mpegts-video>
               <mpegts-video style="display: inline-block" :videoProps="videoData"></mpegts-video>
             </div>
             </div>
           </div>
           </div>
@@ -165,20 +166,23 @@ export default {
     async getVideoList(data) {
     async getVideoList(data) {
       try {
       try {
         let obj = {
         let obj = {
-          "subIds": [data.subId],
-          "streamType": 1,
-          "protocol": window.location.href.indexOf('https') !== -1 ? 'wss' : 'ws',
-          "source": 4,
-          "page": 1,
-          "pageSize": 10
+          page:'1',
+          pageSize:'1',
+          buildId:'',
+          floorId:'',
+          passageway:'',
+          subIds:[data.subId],
+          protocol:window.location.href.indexOf('https') !== -1?'wss':'ws',
+          streamType:1,
+          source:1,
         }
         }
         const res = await getVideoList(obj)
         const res = await getVideoList(obj)
         if(res.data.list[0]){
         if(res.data.list[0]){
           this.$set(this,'videoData',{
           this.$set(this,'videoData',{
             width: 400, //(宽度:非必传-默认600)
             width: 400, //(宽度:非必传-默认600)
             height: 210, //(高度:非必传-默认338)
             height: 210, //(高度:非必传-默认338)
-            url: res.data.list[0].streamUrl,
-            cameraIndexCode: res.data.list[0].deviceNo,
+            url: res.data.records[0].streamUrl,
+            cameraIndexCode: res.data.records[0].deviceNo,
           });
           });
         }
         }
       } catch (e) {
       } catch (e) {