Эх сурвалжийг харах

监测流程调整、漫游功能测试

linqilong 5 сар өмнө
parent
commit
d8f091fafa

+ 13 - 0
src/components/StationRightButtonGroup.vue

@@ -279,6 +279,19 @@ onUnmounted(() => {
     Operate.roam('station', '结束')
   }
 })
+
+// 底板回调监听
+bus.on('handle_ue_response', (data) => {
+  if (data.Data && data.Data.Name && data.Data.Name === '漫游结束') {
+    if (riverRoamStatus.value !== 0) {
+      riverRoamStatus.value = 0
+    }
+
+    if (stationRoamStatus.value !== 0) {
+      stationRoamStatus.value = 0
+    }
+  }
+})
 </script>
 <template>
   <div class="right-btn-container">

+ 2 - 2
src/components/UePlayer.vue

@@ -16,9 +16,9 @@ onMounted(() => {
     useUrlParams: true,
     initialSettings: {
       // ss: "ws://192.168.0.136:85",
-      // ss: "ws://192.168.0.120:85",
+      ss: "ws://192.168.0.120:85",
       // ss: "ws://192.168.0.121:85",
-      ss: "ws://10.8.48.235:85",
+      // ss: "ws://10.8.48.235:85",
       AutoConnect: true,
       AutoPlayVideo: true,
       StartVideoMuted: false,

+ 1 - 1
src/utils/tdInstruction/operate.ts

@@ -93,7 +93,7 @@ export function roam(type: any = 'river', operate: any = 'play') {
   let descriptor = {
     "command": "Roaming",
     "data": {
-      "tag": type === 'river' ? "远" : "近",
+      "tag": type === 'river' ? "太师桥远" : "太师桥近",
       "Type": operate
     }
   }

+ 0 - 1
src/views/Situational.vue

@@ -277,7 +277,6 @@ async function reloadRight1() {
 
 async function reloadRight3() {
   const stcds = stationSzList.map(s => s.stcd).join(',')
-  const tm = formatd(getLatestTimeWithMinuteMultipleOfFive(new Date(), 20), 'yyyy-MM-dd hh:mm:ss')
   const waterData = await getWaterQualityLatest({stcds}).then(res => res.data)
   const list = []
 

+ 18 - 40
src/views/StationHouse.vue

@@ -13,13 +13,12 @@ import {getAlarmInfo} from '@/api/alarm.ts'
 import StationRightButtonGroup from "@/components/StationRightButtonGroup.vue";
 import GwVideo from "@/components/Video/index.vue";
 import {getVideoCodeByMark} from "@/components/Video/video";
-import CardList from "@/components/CardList.vue";
 import {Operate} from "@/utils/tdInstruction";
 import {getDeviceByType} from "@/utils/device";
 import {getDeviceStatus} from "@/api/nanshui";
 import {HexToRgb} from "@/utils/color";
-import instrument from "@/assets/svg/instrument.svg";
 import bus from "@/utils/bus";
+import DataTag from "@/components/tag/DataTag.vue";
 
 const route = useRoute()
 const videoSrc = ref(new URL('@/assets/images/video.png', import.meta.url).href)
@@ -40,7 +39,7 @@ const RGB_RED = HexToRgb(RED)
 // 浅红色
 const LIGHT_RED = `rgba(${RGB_RED[0]}, ${RGB_RED[1]}, ${RGB_RED[2]}, 0.3)`
 
-const frequency = ref(2)
+const frequency = ref([2, 8])
 
 const wqData = ref({d1: '6', d2: '22.3', d3: '5', d4: '20', d5: '6', d6: '22.3', d7: '5', d8: '20'})
 // 设备列表
@@ -269,44 +268,17 @@ bus.on('test_simulation', (data) => {
     </template>
     <template #rightModule>
       <card01 style="height: 65%" title="监测流程">
-        <el-form label-position="top" label-width="auto">
-          <el-row>
-            <el-col :span="12">
-              <el-form-item label="检测频率">
-                <el-input-number v-model="frequency" controls-position="right"/>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="设备启闭">
-                <el-checkbox-group v-model="deviceStatus">
-                  <el-checkbox-button name="type" value="open">开启</el-checkbox-button>
-                  <el-checkbox-button name="type" value="close">关闭</el-checkbox-button>
-                </el-checkbox-group>
-              </el-form-item>
-            </el-col>
-          </el-row>
+        <el-form label-width="auto">
+          <el-form-item label="检测频率">
+            <el-select v-model="frequency" multiple placeholder="Select" style="width: 240px">
+              <el-option v-for="item in 24" :key="item" :label="item + '时'" :value="item"></el-option>
+              <template #tag>
+                <el-tag v-for="color in frequency" :key="color" color="#4167F0" style="color: #fff;">{{ color + '时' }}
+                </el-tag>
+              </template>
+            </el-select>
+          </el-form-item>
         </el-form>
-        <card-list :data="deviceList" style="height: calc(100% - 166px);margin-bottom: 10px;">
-          <template #default="scope">
-            <div
-              :style="{'background-image': scope.row.status === 'open' ? `linear-gradient(100deg, ${LIGHT_GREEN} 0%, ${GREEN} 70%)`:`linear-gradient(100deg, ${LIGHT_RED} 0%, ${RED} 70%)`}"
-              style="padding: 12px 20px;display: flex;justify-content: space-between;align-items: center;">
-              <div style="font-weight: bolder;cursor: pointer;"
-                   @click="jumpDevicePage(scope.row.ueDeviceName)">
-                <icon :data="instrument"/>&nbsp;
-                {{ scope.row.deviceName }}
-              </div>
-              <div>
-                <el-switch
-                  v-model="scope.row.status"
-                  active-value="open"
-                  inactive-value="close"
-                  style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
-                />
-              </div>
-            </div>
-          </template>
-        </card-list>
         <div :style="{ 'background-image': `url(${simulateSrc})`}" class="video-control-bar test-simulation">
           <icon v-if="testSimulationStatus == 0 || testSimulationStatus == 2" :data="play" class="video-btn"
                 @click="handleTestSimulation('play')"/>
@@ -314,6 +286,10 @@ bus.on('test_simulation', (data) => {
                 @click="handleTestSimulation('pause')"/>
           <icon v-if="testSimulationStatus != 0" :data="stop" class="video-btn" @click="handleTestSimulation('stop')"/>
         </div>
+        <div>
+          <h3>测验结果:</h3>
+          <DataTag :data="wqData"></DataTag>
+        </div>
       </card01>
       <card01 style="height: 35%" title="站房监控">
         <gw-video :code="videoCode" :imageSrc="videoSrc"></gw-video>
@@ -353,6 +329,8 @@ bus.on('test_simulation', (data) => {
 
 
 .test-simulation {
+  background-size: 100% 100%;
   height: 76px;
+  margin-bottom: 18px;
 }
 </style>