Kaynağa Gözat

reactor:一键巡查视频无信号问题解决

liu_w601 3 ay önce
ebeveyn
işleme
932fa996a9

+ 3 - 2
src/views/hydrologic-info/right.vue

@@ -329,8 +329,9 @@ export default {
               {
                 type: 'value',
                 splitLine: { show: false },
-                // min: 380,
-                // interval: 10,
+                min: 380,
+                interval: 10,
+                max:420,
                 axisLine: {
                   lineStyle: {
                     color: '#374672',

+ 1 - 1
src/views/hydrological-station/hyInfo.vue

@@ -51,7 +51,7 @@
     >
     </el-pagination>
     <el-dialog :title="title" :visible.sync="addDialogVisible">
-      <el-form ref="form" :model="form" :rules="rules" label-width="110px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-form-item label="水文站名称:" prop="stationName">
           <el-input v-model="form.stationName"></el-input>
         </el-form-item>

+ 2 - 2
src/views/hydrological-station/jcInfo.vue

@@ -61,8 +61,8 @@
     </div>
     <el-dialog :title="title" :visible.sync="addDialogVisible">
       <el-form ref="form" :model="form" label-width="130px" class="addJcForm">
-        <el-form-item label="实时高程:"> <el-input v-model="form.realTimeElevation" type="number" :min="0"></el-input> <span>m</span> </el-form-item>
-        <el-form-item label="昨日最高高程:"> <el-input v-model="form.maxElevationYesterday" type="number" :min="0"> </el-input><span>m</span> </el-form-item>
+        <el-form-item label="实时高程:"> <el-input v-model="form.realTimeElevation" type="number" :min="380" :max="420"></el-input> <span>m</span> </el-form-item>
+        <el-form-item label="昨日最高高程:"> <el-input v-model="form.maxElevationYesterday" type="number" :min="380" :max="420"> </el-input><span>m</span> </el-form-item>
         <el-form-item label="1小时雨量:"> <el-input v-model="form.precipitationOneH" type="number" :min="0"> </el-input> <span>mm</span> </el-form-item>
         <el-form-item label="当天雨量:"> <el-input v-model="form.precipitationToday" type="number" :min="0"> </el-input> <span>mm</span> </el-form-item>
         <el-form-item label="实时流量:"> <el-input v-model="form.realTimeDischarge" type="number" :min="0"> </el-input> <span>m³/s</span> </el-form-item>

+ 13 - 17
src/views/safety-inspection/addInspectionTask.vue

@@ -29,7 +29,7 @@
         <el-form-item>
           <div style="display: flex; justify-content: flex-end; margin-top: 0.22rem">
             <el-button size="mini" plain @click="closeModal" class="cancelBtn">取消</el-button>
-            <el-button size="mini" type="primary" @click="toSave">保存</el-button>
+            <el-button size="mini" type="primary" @click="toSave" v-loading="saveLoading">保存</el-button>
             <el-button size="mini" type="primary" @click="startInspection">开始巡查</el-button>
           </div>
         </el-form-item>
@@ -55,6 +55,7 @@ export default {
   },
   data() {
     return {
+      saveLoading:false,
       addTaskFrom: {
         securityPatrolName: '',
         securityPatrolContext: '',
@@ -100,6 +101,7 @@ export default {
   mounted() {
     this.$globalEventBus.$on('closeVideoPlayAdd', () => {
       this.stopPatrol()
+      this.$emit('getSecurityPatrolList')
     })
     this.$globalEventBus.$on('toPlayNextVideoAdd', () => {
       this.goToNextPatrolPoint()
@@ -145,7 +147,9 @@ export default {
     toSave() {
       this.$refs.addTaskFormRef.validate((valid) => {
         if (valid) {
+          this.saveLoading = true
           toAddSecurityPatrol(this.addTaskFrom).then((res) => {
+            this.saveLoading = false
             if (res.data) {
               this.$message.success('添加成功')
               this.closeModal()
@@ -176,20 +180,6 @@ export default {
             this.$message.warning('请先添加至少一个巡查点')
             return
           }
-          this.addTaskFrom.inspectionPoint.forEach((item, index) => {
-            this.fetchUrl(item).then((res) => {
-              let url = ''
-              if (res.code == 200) {
-                url = res.data.streamUrl
-              } else if (res.code == 400) {
-                this.$message.error(res.msg)
-              } else if (res.code == 4001) {
-                this.$message.warning('设备离线')
-              }
-
-              this.$set(this.addTaskFrom.inspectionPoint[index], 'url', url)
-            })
-          })
           this.isPatrolling = true
           this.currentPatrolIndex = 0
           this.goToNextPatrolPoint()
@@ -238,8 +228,14 @@ export default {
         this.currentPatrolIndex++
     },
     playVideo(point) {
-      console.info(point)
-      this.$globalEventBus.$emit('clickVideoPlay', { point: point, visible: true, type: 'add' })
+      this.fetchUrl(point).then((res) => {
+        if (res.code == 200) {
+            point.url = res.data.streamUrl
+            this.$globalEventBus.$emit('clickVideoPlay', { point: point, visible: true, type: 'add' })
+          } else if (res.code == 4001) {
+            this.$message.warning('设备离线')
+          }
+      })
     },
     stopPatrol() {
       this.isPatrolling = false

+ 29 - 16
src/views/safety-inspection/right.vue

@@ -30,7 +30,7 @@
       <base-header title="预警联系人"></base-header>
       <div class="card-item">
         <div class="tools-panel" style="display: flex; align-items: center">
-          <el-select v-model="personStatus" size="mini">
+          <el-select v-model="personStatus" size="mini" popper-class="u-popper-select">
             <el-option label="在线" value="1"></el-option>
             <el-option label="离线" value="2"></el-option>
           </el-select>
@@ -59,7 +59,7 @@
       </div>
     </div>
   </base-panel-right>
-   <AddInspectionTask :visible="addTaskShow" :inspectionOptions="inspectionOptions" @closeAddTask="closeAddTask" @refreshData="toLoadLeftList"/>
+   <AddInspectionTask :visible="addTaskShow" :inspectionOptions="inspectionOptions" @closeAddTask="closeAddTask" @getSecurityPatrolList="getSecurityPatrolList" @refreshData="toLoadLeftList"/>
 </div>
 </template>
 <script>
@@ -140,19 +140,6 @@ export default {
       this.currentTime = moment().format('YYYY-MM-DD HH:mm:ss'); 
       this.xcId = item.id
       this.inspectionPoint = item.inspectionPoints
-      this.inspectionPoint.forEach((item, index) => {
-        this.fetchUrl(item).then((res) => {
-          let url = ''
-           if(res.code == 4001){
-            this.$message.warning('设备离线')
-          }else if(res.code == 400){
-            this.$message.error(res.msg)
-          }else{
-             url = res.data.streamUrl
-          }
-          this.$set(this.inspectionPoint[index], 'url', url)
-        })
-      })
       this.isPatrolling = true
       this.currentPatrolIndex = 0
       this.goToNextPatrolPoint()
@@ -208,7 +195,14 @@ export default {
       })
     },
     playVideo(point) {
-      this.$globalEventBus.$emit('clickVideoPlay', { point: point, visible: true,type:'xc' })
+      this.fetchUrl(point).then((res) => {
+        if (res.code == 200) {
+            point.url = res.data.streamUrl
+              this.$globalEventBus.$emit('clickVideoPlay', { point: point, visible: true,type:'xc' })
+          } else if (res.code == 4001) {
+            this.$message.warning('设备离线')
+          }
+      })
     },
     stopPatrol() {
       this.isPatrolling = false
@@ -400,4 +394,23 @@ export default {
     text-align: center;
   }
 }
+ .vSelect {
+    :deep(.el-input__inner) {
+      background: rgba(79, 159, 255, 0.3);
+      border-color: #4f9fff;
+      width: px-to-rem(96);
+      border-radius: px-to-rem(4);
+      color: #fff;
+      padding: 0 px-to-rem(2);
+    }
+    :deep(.el-input__suffix .el-input__icon) {
+      width: px-to-rem(18) !important;
+    }
+  }
+  .vSelect:last-child {
+    margin-left: px-to-rem(10);
+    :deep(.el-input__inner) {
+      width: px-to-rem(58);
+    }
+  }
 </style>