Browse Source

Merge branch 'master' of http://39.98.38.2:13000/lql/tba-nbhs

# Conflicts:
#	src/components/UePlayer.vue
#	src/views/StationHouse.vue
viviandjava 6 tháng trước cách đây
mục cha
commit
1e935b4e93

+ 11 - 0
package-lock.json

@@ -20,6 +20,7 @@
         "echarts": "^5.5.1",
         "echarts-gl": "^2.0.9",
         "element-plus": "^2.8.6",
+        "jsencrypt": "^3.3.2",
         "mitt": "^3.0.1",
         "moment": "^2.30.1",
         "pinia": "^2.2.4",
@@ -6451,6 +6452,11 @@
         "node": ">=18"
       }
     },
+    "node_modules/jsencrypt": {
+      "version": "3.3.2",
+      "resolved": "https://registry.npmmirror.com/jsencrypt/-/jsencrypt-3.3.2.tgz",
+      "integrity": "sha512-arQR1R1ESGdAxY7ZheWr12wCaF2yF47v5qpB76TtV64H1pyGudk9Hvw8Y9tb/FiTIaaTRUyaSnm5T/Y53Ghm/A=="
+    },
     "node_modules/jsesc": {
       "version": "3.0.2",
       "resolved": "https://registry.npmmirror.com/jsesc/-/jsesc-3.0.2.tgz",
@@ -14608,6 +14614,11 @@
         }
       }
     },
+    "jsencrypt": {
+      "version": "3.3.2",
+      "resolved": "https://registry.npmmirror.com/jsencrypt/-/jsencrypt-3.3.2.tgz",
+      "integrity": "sha512-arQR1R1ESGdAxY7ZheWr12wCaF2yF47v5qpB76TtV64H1pyGudk9Hvw8Y9tb/FiTIaaTRUyaSnm5T/Y53Ghm/A=="
+    },
     "jsesc": {
       "version": "3.0.2",
       "resolved": "https://registry.npmmirror.com/jsesc/-/jsesc-3.0.2.tgz",

+ 2 - 2
src/api/alarm.ts

@@ -4,11 +4,11 @@ import request from '@/utils/request'
  * 水文测站实时信息
  */
 
-export function getAlarmInfo(data) {
+export function getAlarmInfo(data: any) {
   return request({
     url: '/lantai_api/warnRecord/getPage',
     method: 'get',
-    params:data,
+    params: data,
     headers: {
       Authorization: localStorage.getItem('Authorization'),
     },

+ 98 - 81
src/api/gx.ts

@@ -9,7 +9,7 @@ const gxToken = 'test'
 export function getWaterQualityLatest(data: any) {
   data.accessToken = gxToken
   return request({
-    url: '/gx_api/gx/awq/waterQuality/latest',
+    url: '/gx_api/sz/tba-gx/gx/awq/waterQuality/latest',
     method: 'get',
     params: data,
     timeout: 1000 * 60
@@ -218,7 +218,7 @@ export function getWaterQualityLatest(data: any) {
 export function getWaterQualityListOfPageByStcd(data: any) {
   data.accessToken = gxToken
   return request({
-    url: '/gx_api/gx/awq/waterQuality/listOfPageByStcd',
+    url: '/gx_api/sz/tba-gx/gx/awq/waterQuality/listOfPageByStcd',
     method: 'get',
     params: data,
     timeout: 1000 * 60
@@ -464,83 +464,83 @@ export function getWaterQualityListOfPageByStcd(data: any) {
  * 水位流量多站最新数据
  */
 export function getWaterLevelAndFlowLatest(data: any) {
-    data.accessToken = gxToken
-    return request({
-        url: '/gx_api/gx/sq/waterLevelAndFlow/latest',
-        method: 'get',
-        params: data,
-        timeout: 1000 * 60 * 6
-    })
+  data.accessToken = gxToken
+  return request({
+    url: '/gx_api/sz/tba-gx/gx/sq/waterLevelAndFlow/latest',
+    method: 'get',
+    params: data,
+    timeout: 1000 * 60 * 6
+  })
 
-    // return Promise.resolve({
-    //   "msg": "操作成功",
-    //   "code": 200,
-    //   "data": [
-    //     {
-    //       "stcd": "63202740",
-    //       "stnm": "常州(三堡街)",
-    //       "tm": "2024-12-10 17:30:00",
-    //       "z": 3.34,
-    //       "q": null
-    //     },
-    //     {
-    //       "stcd": "63202850",
-    //       "stnm": "无锡南门",
-    //       "tm": "2024-12-10 17:30:00",
-    //       "z": 3.35,
-    //       "q": null
-    //     },
-    //     {
-    //       "stcd": "63202900",
-    //       "stnm": "望亭(大)",
-    //       "tm": "2024-12-10 17:25:00",
-    //       "z": 3.36,
-    //       "q": null
-    //     },
-    //     {
-    //       "stcd": "63203000",
-    //       "stnm": "苏州(枫桥)",
-    //       "tm": "2024-12-10 17:30:00",
-    //       "z": 3.26,
-    //       "q": null
-    //     },
-    //     {
-    //       "stcd": "63203040",
-    //       "stnm": "苏州(觅渡桥)",
-    //       "tm": "2024-12-10 17:00:00",
-    //       "z": 2.92,
-    //       "q": null
-    //     },
-    //     {
-    //       "stcd": "63203050",
-    //       "stnm": "苏州(二)",
-    //       "tm": "2024-12-10 17:00:00",
-    //       "z": 3.09,
-    //       "q": null
-    //     },
-    //     {
-    //       "stcd": "63300200",
-    //       "stnm": "拱宸桥",
-    //       "tm": "2024-12-10 17:00:00",
-    //       "z": 3.171,
-    //       "q": null
-    //     },
-    //     {
-    //       "stcd": "63304650",
-    //       "stnm": "思源大桥",
-    //       "tm": "2024-12-10 17:25:00",
-    //       "z": 2.97,
-    //       "q": 5.553
-    //     },
-    //     {
-    //       "stcd": "63304700",
-    //       "stnm": "太师桥",
-    //       "tm": "2024-12-10 17:25:00",
-    //       "z": 3.02,
-    //       "q": 64.847
-    //     }
-    //   ],
-    // })
+  // return Promise.resolve({
+  //   "msg": "操作成功",
+  //   "code": 200,
+  //   "data": [
+  //     {
+  //       "stcd": "63202740",
+  //       "stnm": "常州(三堡街)",
+  //       "tm": "2024-12-10 17:30:00",
+  //       "z": 3.34,
+  //       "q": null
+  //     },
+  //     {
+  //       "stcd": "63202850",
+  //       "stnm": "无锡南门",
+  //       "tm": "2024-12-10 17:30:00",
+  //       "z": 3.35,
+  //       "q": null
+  //     },
+  //     {
+  //       "stcd": "63202900",
+  //       "stnm": "望亭(大)",
+  //       "tm": "2024-12-10 17:25:00",
+  //       "z": 3.36,
+  //       "q": null
+  //     },
+  //     {
+  //       "stcd": "63203000",
+  //       "stnm": "苏州(枫桥)",
+  //       "tm": "2024-12-10 17:30:00",
+  //       "z": 3.26,
+  //       "q": null
+  //     },
+  //     {
+  //       "stcd": "63203040",
+  //       "stnm": "苏州(觅渡桥)",
+  //       "tm": "2024-12-10 17:00:00",
+  //       "z": 2.92,
+  //       "q": null
+  //     },
+  //     {
+  //       "stcd": "63203050",
+  //       "stnm": "苏州(二)",
+  //       "tm": "2024-12-10 17:00:00",
+  //       "z": 3.09,
+  //       "q": null
+  //     },
+  //     {
+  //       "stcd": "63300200",
+  //       "stnm": "拱宸桥",
+  //       "tm": "2024-12-10 17:00:00",
+  //       "z": 3.171,
+  //       "q": null
+  //     },
+  //     {
+  //       "stcd": "63304650",
+  //       "stnm": "思源大桥",
+  //       "tm": "2024-12-10 17:25:00",
+  //       "z": 2.97,
+  //       "q": 5.553
+  //     },
+  //     {
+  //       "stcd": "63304700",
+  //       "stnm": "太师桥",
+  //       "tm": "2024-12-10 17:25:00",
+  //       "z": 3.02,
+  //       "q": 64.847
+  //     }
+  //   ],
+  // })
 }
 
 /**
@@ -549,7 +549,7 @@ export function getWaterLevelAndFlowLatest(data: any) {
 export function getWaterLevelAndFlowListOfPageByStcd(data: any) {
   data.accessToken = gxToken
   return request({
-    url: '/gx_api/gx/sq/waterLevelAndFlow/listOfPageByStcd',
+    url: '/gx_api/sz/tba-gx/gx/sq/waterLevelAndFlow/listOfPageByStcd',
     method: 'get',
     params: data,
     timeout: 1000 * 60
@@ -2586,7 +2586,7 @@ export function getWaterLevelAndFlowListOfPageByStcd(data: any) {
 export function getRainfallLatest(data: any) {
   data.accessToken = gxToken
   return request({
-    url: '/gx_api/gx/yq/rainfall/latest',
+    url: '/gx_api/sz/tba-gx/gx/yq/rainfall/latest',
     method: 'get',
     params: data,
     timeout: 1000 * 60
@@ -2612,7 +2612,7 @@ export function getRainfallLatest(data: any) {
 export function getRainfallListOfPageByStcd(data: any) {
   data.accessToken = gxToken
   return request({
-    url: '/gx_api/gx/yq/rainfall/listOfPageByStcd',
+    url: '/gx_api/sz/tba-gx/gx/yq/rainfall/listOfPageByStcd',
     method: 'get',
     params: data,
     timeout: 1000 * 60
@@ -12221,6 +12221,23 @@ export function getRainfallListOfPageByStcd(data: any) {
   // });
 }
 
+/**
+ * 查询水质评价
+ */
+export async function getWaterQualityAssessment(data: any) {
+  return request({
+    url: '/szybh_api/szybh/openInterface/station/wq/getLevel',
+    method: 'post',
+    headers: {
+      "Content-Type": 'x-www-form-urlencoded'
+    },
+    data: {
+      method: 1,
+      source: JSON.stringify(data)
+    }
+  })
+}
+
 /**
  * 获取水位流量雨量多站最新数据
  */

+ 64 - 13
src/api/nanshui.ts

@@ -1,21 +1,11 @@
 import request from "@/utils/request";
 
-/**
- * 登录
- */
-export function nanshuiLogin() {
-  return request({
-    url: '/nanshui_api/login',
-    method: 'get'
-  })
-}
-
 /**
  * 查询空调运行状态、UPS运行状态和温湿度数据,返回结果:envstatus空调状态、upsstatusups状态、tmpstatus温湿度数据
  */
 export function getEnvStatus() {
   // return request({
-  //   url: '/nanshui_api/env-status',
+  //   url: '/tsq_api/env-status',
   //   method: 'get'
   // })
   return Promise.resolve({
@@ -35,7 +25,7 @@ export function getEnvStatus() {
  */
 export function getDeviceStatus() {
   // return request({
-  //   url: '/nanshui_api/station-status',
+  //   url: '/tsq_api/station-status',
   //   method: 'post'
   // })
   return Promise.resolve({
@@ -206,7 +196,7 @@ export function getDeviceStatus() {
  */
 export function setDeviceStatus(devid: string, cmd = true) {
   // return request({
-  //   url: '/nanshui_api/dev-exec',
+  //   url: '/tsq_api/dev-exec',
   //   method: 'post',
   //   data: {
   //     devid,
@@ -221,3 +211,64 @@ export function setDeviceStatus(devid: string, cmd = true) {
     }
   })
 }
+
+/**
+ * 查看现在的定时任务
+ * @param stcd 站码
+ */
+export function getTaskRead(stcd: any) {
+  return request({
+    url: '/tsq_api/task-read?taskid=SZCD',
+    method: 'post',
+  })
+  // .then(res => {
+  //   res.data.hour.split(',')
+  // })
+  // return Promise.resolve({
+  //   "result": true,
+  //   "msg": "成功",
+  //   "data": {
+  //     "mday": null,
+  //     "wday": null,
+  //     "hour": "8,20",
+  //     "minute": "0",
+  //     "pretype": "hour",
+  //     "taskid": "SZCD"
+  //   }
+  // })
+}
+
+/**
+ * 修改定时任务
+ * @param stcd 站码
+ * @param hour 小时数组
+ */
+export function setTaskRead(stcd: any, hour: Number[]) {
+  return request({
+    url: `/tsq_api/task-edit?taskid=SZCD&hour=${hour.join(',')}&minute=0&pretype=hour`,
+    method: 'post',
+  })
+}
+
+/**
+ * 获取最新的水质检测数据
+ * @param stcd 站码
+ * @param hour 小时数组
+ */
+export function getWaterQualityData(stcd: any) {
+  return request({
+    url: `/tsq_api/get-data`,
+    method: 'post',
+  })
+}
+
+/**
+ * 启动水质监测
+ * @param stcd 站码
+ */
+export function runTest(stcd: any) {
+  return request({
+    url: `/tsq_api/work-flow-start?wfid=SZCD`,
+    method: 'post',
+  })
+}

+ 1 - 1
src/api/rolldata.ts

@@ -2,7 +2,7 @@ import request from "@/utils/request";
 
 export function getAlarmData(){
   return request({
-    url: '/gx_gj_api/Orcl_Idbs3.asmx/rollData?accessToken=test&type=1',
+    url: '/gx_api/sq_zh/Orcl_Idbs3.asmx/rollData?accessToken=test&type=1',
     method: 'get'
   })
 }

BIN
src/assets/images/map/station-point-green.png


BIN
src/assets/images/map/station-point-green1.png


+ 4 - 0
src/assets/styles/element/index.scss

@@ -103,3 +103,7 @@ $--card: (
 .el-radio-button:first-child .el-radio-button__inner {
   border-left: 1px solid var(--el-border-color-light);
 }
+
+.el-message-box {
+  background-color: var(--el-bg-color-overlay);
+}

BIN
src/assets/video/BGM.WAV


BIN
src/assets/video/openAnimation.mp4


+ 2 - 0
src/components/AntvMap/index.vue

@@ -5,6 +5,7 @@ import {useMapStore} from "@/stores/map";
 
 const store = useMapStore()
 const stationPointBlueImage = new URL('@/assets/images/map/station-point-blue.png', import.meta.url).href
+const stationPointGreenImage = new URL('@/assets/images/map/station-point-green.png', import.meta.url).href
 const stationPointYellowImage = new URL('@/assets/images/map/station-point-yellow.png', import.meta.url).href
 const stationPointGrayImage = new URL('@/assets/images/map/station-point-gray.png', import.meta.url).href
 
@@ -13,6 +14,7 @@ onMounted(() => {
   init({
     images: [
       {name: 'stationPointBlue', src: stationPointBlueImage},
+      {name: 'stationPointGreen', src: stationPointGreenImage},
       {name: 'stationPointYellow', src: stationPointYellowImage},
       {name: 'stationPointGray', src: stationPointGrayImage},
     ]

+ 8 - 0
src/components/StationRightButtonGroup.vue

@@ -292,6 +292,14 @@ bus.on('handle_ue_response', (data) => {
     }
   }
 })
+
+watch(() => riverRoamStatus.value, (value) => {
+  bus.emit("roam", value !== 0)
+})
+watch(() => stationRoamStatus.value, (value) => {
+  bus.emit("roam", value !== 0)
+})
+
 </script>
 <template>
   <div class="right-btn-container">

+ 1 - 1
src/components/TimeScrollbar.vue

@@ -69,7 +69,7 @@ onUnmounted(() => {
       <RefreshLeft v-if="value > 0" @click="refresh"></RefreshLeft>
     </div>
     <div class="time-slider-container">
-      <el-slider ref="sliderRef" v-model="value" :format-tooltip="formatTooltip" :marks="props.marks"
+      <el-slider ref="sliderRef" v-model="value" :format-tooltip="props.formatTooltip" :marks="props.marks"
                  :max="props.max"
                  style="width: 100%;" tooltip-class="show-tooltip"></el-slider>
     </div>

+ 6 - 3
src/components/Video/video.ts

@@ -60,9 +60,12 @@ const videoCode = [
 ]
 
 export function getVideoCodeByMark(stcd: string, mark: string) {
-  const videos = videoCode.find(v => v.stcd === stcd)
-  const video = videos?.children.find(v => v.mark === mark)
-  return video?.code || null
+  // const videos = videoCode.find(v => v.stcd === stcd)
+  // const video = videos?.children.find(v => v.mark === mark)
+  // return video?.code || null
+  const index = Math.floor(Math.random() * 4)
+  console.log(index)
+  return ['33042106531322001000', '33041106531322000100', '32050906531322002500', '33041106531322000300'][index]
 }
 
 function encryptPwd() {

+ 32 - 9
src/components/tag/DataTag.vue

@@ -1,14 +1,37 @@
 <script lang="ts" setup>
-import {getCurrentInstance, ref} from 'vue'
+import {getCurrentInstance, ref, watch} from 'vue'
+import {getWaterQualityAssessment} from "@/api/gx";
+import {useRoute} from "vue-router";
 
 defineProps({
   data: {type: Object, default: () => ({})}
 })
 
+const route = useRoute()
 const {props} = getCurrentInstance()
 const imgSrc = ref(new URL('@/assets/images/szpj.png', import.meta.url).href)
 const szpjTitleSrc = ref(new URL('@/assets/images/szpj_title.png', import.meta.url).href)
 const tempImg = ref(new URL('@/assets/images/temperature.png', import.meta.url).href)
+
+watch(() => props.data, (val) => {
+  if (val && Object.keys(val).length > 0) {
+    const waterQuery = Object.keys(val).reduce((acc, key) => {
+      if (val[key]) {
+        acc[key.toUpperCase()] = val[key];
+      }
+      return acc;
+    }, {});
+    waterQuery['STCD'] = route.params.stcd
+    getWaterQualityAssessment([waterQuery]).then(res => {
+      console.log(res)
+      if (res.result) {
+
+      }
+
+
+    })
+  }
+}, {deep: true, immediate: true})
 </script>
 
 <template>
@@ -25,19 +48,19 @@ const tempImg = ref(new URL('@/assets/images/temperature.png', import.meta.url).
       <el-col :span="12">
         <div class="background-image">
           <span style="font-size:14px;color:#81d4d9;">PH值</span>
-          <span style="font-size:18px;font-weight: bold;font-style: italic;">{{ props.data.d1 }}</span>
+          <span style="font-size:18px;font-weight: bold;font-style: italic;">{{ props.data.ph }}</span>
         </div>
         <div class="background-image">
           <span style="font-size:14px;color:#81d4d9;">溶解氧</span>
-          <span style="font-size:18px;font-weight: bold;font-style: italic;">{{ props.data.d2 }}</span>
+          <span style="font-size:18px;font-weight: bold;font-style: italic;">{{ props.data.dox }}</span>
         </div>
         <div class="background-image">
           <span style="font-size:14px;color:#81d4d9;">氨氮</span>
-          <span style="font-size:18px;font-weight: bold;font-style: italic;">{{ props.data.d3 }}</span>
+          <span style="font-size:18px;font-weight: bold;font-style: italic;">{{ props.data.nh3n }}</span>
         </div>
         <div class="background-image">
           <span style="font-size:14px;color:#81d4d9;">浊度</span>
-          <span style="font-size:18px;font-weight: bold;font-style: italic;">{{ props.data.d4 }}</span>
+          <span style="font-size:18px;font-weight: bold;font-style: italic;">{{ props.data.turb }}</span>
         </div>
       </el-col>
     </el-row>
@@ -48,7 +71,7 @@ const tempImg = ref(new URL('@/assets/images/temperature.png', import.meta.url).
             <div class="tubiao-image tempImg"></div>
             <span style="font-size: 14px;padding-left:15px;color:#81d4d9;">水温</span>
           </div>
-          <span style="padding-right: 10px;font-size: 20px;font-weight: bold;">{{ data.d5 }}</span>
+          <span style="padding-right: 10px;font-size: 20px;font-weight: bold;">{{ data.wt }}</span>
         </el-row>
         <el-row>
           <div
@@ -61,7 +84,7 @@ const tempImg = ref(new URL('@/assets/images/temperature.png', import.meta.url).
             <div class="tubiao-image tempImg"></div>
             <span style="font-size: 14px;padding-left:15px;color:#81d4d9;">电导率</span>
           </div>
-          <span style="padding-right: 10px;font-size: 20px;font-weight: bold;">{{ data.d6 }}</span>
+          <span style="padding-right: 10px;font-size: 20px;font-weight: bold;">{{ data.cond }}</span>
         </el-row>
         <el-row>
           <div
@@ -76,7 +99,7 @@ const tempImg = ref(new URL('@/assets/images/temperature.png', import.meta.url).
             <div class="tubiao-image tempImg"></div>
             <span style="font-size: 14px;padding-left:15px;color:#81d4d9;">总氮</span>
           </div>
-          <span style="padding-right: 10px;font-size: 20px;font-weight: bold;">{{ data.d7 }}</span>
+          <span style="padding-right: 10px;font-size: 20px;font-weight: bold;">{{ data.tn }}</span>
         </el-row>
         <el-row>
           <div
@@ -89,7 +112,7 @@ const tempImg = ref(new URL('@/assets/images/temperature.png', import.meta.url).
             <div class="tubiao-image tempImg"></div>
             <span style="font-size: 14px;padding-left:15px;color:#81d4d9;">总磷</span>
           </div>
-          <span style="padding-right: 10px;font-size: 20px;font-weight: bold;">{{ data.d8 }}</span>
+          <span style="padding-right: 10px;font-size: 20px;font-weight: bold;">{{ data.tp }}</span>
         </el-row>
         <el-row>
           <div

+ 2 - 1
src/utils/request.ts

@@ -18,7 +18,8 @@ service.interceptors.request.use(
     if (
       !config.url.startsWith("/tbazmw_api") &&
       !config.url.startsWith("/gx_api") &&
-      !config.url.startsWith("/gx_gj_api") &&
+      !config.url.startsWith("/szybh_api") &&
+      !config.url.startsWith("/tsq_api") &&
       !config.url.startsWith("/lantai_api") &&
       !config.url.startsWith("/nmc_api") &&
       !config.url.startsWith("/video_api") &&

+ 34 - 31
src/views/Device.vue

@@ -1,22 +1,22 @@
 <script lang="ts" setup>
-import { computed, onMounted, onUnmounted, ref } from 'vue'
-import { useRoute } from 'vue-router'
+import {computed, onMounted, onUnmounted, ref} from 'vue'
+import {useRoute} from 'vue-router'
 import RightFrame from '@/components/RightFrame.vue'
 import Card01 from '@/components/card/Card01.vue'
 import StripeTable from '@/components/StripeTable.vue'
-import { getDeviceByName, getDeviceTypeByName } from '@/utils/device'
+import {getDeviceByName, getDeviceTypeByName} from '@/utils/device'
 import Chart from '@/components/Chart.vue'
 import StationRightButtonGroup from '@/components/StationRightButtonGroup.vue'
 
-import { Label, View } from '@/utils/tdInstruction'
+import {Label, View} from '@/utils/tdInstruction'
 import GwVideo from '@/components/Video/index.vue'
-import { getVideoCodeByMark } from '@/components/Video/video'
+import {getVideoCodeByMark} from '@/components/Video/video'
 import WaterQualityAnalysis from '@/components/DeviceComponent/WaterQualityAnalysis.vue'
 import WaterLevel from '@/components/DeviceComponent/WaterLevel.vue'
 import Rainfall from '@/components/DeviceComponent/Rainfall.vue'
 import AdcpFlow from '@/components/DeviceComponent/AdcpFlow.vue'
 import WaterFlow from '@/components/DeviceComponent/WaterFlow.vue'
-import { getMaintenanceScheduleTask, getMaintenanceTaskLog, getSparePart } from '@/api/device'
+import {getMaintenanceScheduleTask, getMaintenanceTaskLog, getSparePart} from '@/api/device'
 import moment from 'moment'
 import DeviceIntroduce from '@/components/DeviceIntroduce.vue'
 
@@ -32,20 +32,20 @@ const videoCode = ref(getVideoCodeByMark(route.params.stcd + '', '室外'))
 
 
 const deviceStatusColumns = [
-  { label: '维护信息', prop: 'deviceName', width: '100' },
-  { label: '维护人员', prop: 'woker', width: '90' },
-  { label: '维护日期‌', prop: 'updateTm' },
-  { label: '状态', prop: 'status', width: '70' }
+  {label: '维护信息', prop: 'deviceName', width: '100'},
+  {label: '维护人员', prop: 'woker', width: '90'},
+  {label: '维护日期‌', prop: 'updateTm'},
+  {label: '状态', prop: 'status', width: '70'}
 ]
 // const deviceStatusData = ref([])
 const deviceStatusData = [
-  { deviceName: '总磷分析仪', woker: '陈标', updateTm: '11-20 15:00:00', status: '正常' },
-  { deviceName: '总氮分析仪', woker: '于奇', updateTm: '11-20 15:00:00', status: '正常' },
-  { deviceName: '水位计', woker: '张孝荣', updateTm: '11-20 15:00:00', status: '正常' },
-  { deviceName: '氨氮分析仪', woker: '张孝荣', updateTm: '11-20 15:00:00', status: '正常' }
+  {deviceName: '总磷分析仪', woker: '陈标', updateTm: '11-20 15:00:00', status: '正常'},
+  {deviceName: '总氮分析仪', woker: '于奇', updateTm: '11-20 15:00:00', status: '正常'},
+  {deviceName: '水位计', woker: '张孝荣', updateTm: '11-20 15:00:00', status: '正常'},
+  {deviceName: '氨氮分析仪', woker: '张孝荣', updateTm: '11-20 15:00:00', status: '正常'}
 ]
 const accessoriesColumns = [
-  { label: '耗材名称', prop: 'partName', width: '110' },
+  {label: '耗材名称', prop: 'partName', width: '110'},
   {
     label: '剩余有效期', prop: 'warranty', width: '110', convertFn: (data) => {
       var formatDate = 'yyyy-MM-DD'
@@ -67,15 +67,15 @@ const accessoriesData = ref([])
 //   // { name: '瓶子', days: 102, warranty: '11-20 15:00:00' }
 // ]
 const reagentColumns = [
-  { label: '试剂名称', prop: 'name' },
-  { label: '添加体积', prop: 'volume', width: '110' },
-  { label: '更换时间', prop: 'updateTm', width: '110' }
+  {label: '试剂名称', prop: 'name'},
+  {label: '添加体积', prop: 'volume', width: '110'},
+  {label: '更换时间', prop: 'updateTm', width: '110'}
 ]
 const reagentData = [
-  { name: '硫酸溶液', volume: 2, updateTm: '11-20 15:00:00' },
-  { name: '高锰酸钾溶液', volume: 1, updateTm: '11-20 15:00:00' },
-  { name: '草酸钠溶液', volume: 3, updateTm: '11-20 15:00:00' },
-  { name: '去离子水', volume: 2, updateTm: '11-20 15:00:00' }
+  {name: '硫酸溶液', volume: 2, updateTm: '11-20 15:00:00'},
+  {name: '高锰酸钾溶液', volume: 1, updateTm: '11-20 15:00:00'},
+  {name: '草酸钠溶液', volume: 3, updateTm: '11-20 15:00:00'},
+  {name: '去离子水', volume: 2, updateTm: '11-20 15:00:00'}
 ]
 // function reloadRight3(list) {
 //   if (!list || list.length === 0) {
@@ -215,7 +215,7 @@ async function reloadRight3() {
       axisLabel: { // 坐标轴刻度标签的相关设置
         color: '#02cacf'
       },
-      axisTick: { show: false },
+      axisTick: {show: false},
       data: sparePart.value['xdata']
     }],
     yAxis: [{
@@ -243,7 +243,7 @@ async function reloadRight3() {
       name: '数量',
       type: 'bar',
       itemStyle: {
-        color: function(params) {
+        color: function (params) {
           // 根据params的
           const colorsMap = [
             '#4768ec',
@@ -279,7 +279,7 @@ function getMaintainRecordData() {
   getMaintenanceTaskLog(data).then(res => {
     if (res.status == 200) {
       if (res.data.length != 0) {
-        maintainRecord.value = res.data.records[0]
+        maintainRecord.value = res.data.records[0] || {}
       }
     }
   })
@@ -350,7 +350,7 @@ onUnmounted(() => {
 <template>
   <right-frame>
     <template #leftModule>
-      <template v-if="['rainfall', 'flow','waterLevel'].includes(deviceType)">
+      <template v-if="['rainfall','waterLevel'].includes(deviceType)">
         <card01 :title="device.deviceName" style="height: 65%">
           <device-introduce></device-introduce>
           <h4 style="color: #00ccff">维护记录</h4>
@@ -405,8 +405,11 @@ onUnmounted(() => {
       </template>
       <template v-if="deviceType=== 'flow'">
         <card01 style="height: 36%" title="流量监测">
-          <adcp-flow v-if="device.ueDeviceName === '无人船'" />
-          <water-flow v-else />
+          <adcp-flow v-if="device.ueDeviceName === '无人船'"/>
+          <water-flow v-else/>
+        </card01>
+        <card01 style="height: 40%" title="设备维护情况">
+          <stripe-table :columns="deviceStatusColumns" :data="deviceStatusData"></stripe-table>
         </card01>
       </template>
       <template v-if="deviceType=== 'waterQuality'">
@@ -416,10 +419,10 @@ onUnmounted(() => {
         <card01 style="height: 33%" title="配件运维信息">
           <stripe-table :columns="accessoriesColumns" :data="accessoriesData"></stripe-table>
         </card01>
-        <card01 style="height: 33%" title="耗材余量监控">
-          <chart ref="right3Ref"></chart>
-        </card01>
       </template>
+      <card01 v-show="deviceType=== 'waterQuality'" style="height: 33%" title="耗材余量监控">
+        <chart ref="right3Ref"></chart>
+      </card01>
     </template>
     <template #btnGroup>
       <station-right-button-group></station-right-button-group>

+ 1 - 1
src/views/Home.vue

@@ -178,7 +178,7 @@ function initPoints() {
           isConstant: false,
           field: 'jump',
           value: value => {
-            return value ? 'stationPointBlue' : 'stationPointBlue'
+            return value ? 'stationPointGreen' : 'stationPointGreen'
           }
         },
         popup: {

+ 1 - 1
src/views/IntellOper.vue

@@ -250,7 +250,7 @@ function handleDeviceClick(row) {
   const device = getDeviceByName(row.deviceName, 'deviceName')
   if (device) {
     if (device['deviceType'] === '水质测验设备') {
-      View.changeDeviceView('打开模型', route.params.stcd, device.ueDeviceName)
+      // View.changeDeviceView('打开模型', route.params.stcd, device.ueDeviceName)
     } else {
       View.changeView(`${route.params.stcd}_${device.ueDeviceName}`)
     }

+ 2 - 15
src/views/Situational.vue

@@ -30,7 +30,7 @@ const left2Ref = ref(null)
 const left3Ref = ref(null)
 const right1Ref = ref(null)
 const right3Ref = ref(null)
-const wqData = ref({d1: '6', d2: '22.3', d3: '5', d4: '20', d5: '6', d6: '22.3', d7: '5', d8: '20'})
+const wqData = ref({})
 const station = computed(() => getStation(route.params.stcd))
 const wlData = reactive({
   ss: '0',
@@ -205,7 +205,6 @@ async function reloadLeft3() {
 }
 
 async function reloadRight1() {
-  debugger
   const curDay = new Date(new Date().getTime() + 1 * 24 * 60 * 60 * 1000)
   const sevenDayAgo = new Date(new Date().getTime() - 7 * 24 * 60 * 60 * 1000)
   const rainfallData = await getRainfallListOfPageByStcd({
@@ -371,19 +370,7 @@ async function reloadRight3() {
  * 获取最新水质数据
  */
 function getLatestWaterQuality() {
-  getWaterQualityLatest({stcds: route.params.stcd}).then(res => {
-    const data = res.data[0]
-    wqData.value = {
-      d1: data.ph,
-      d2: data.dox,
-      d3: data.nh3n,
-      d4: data.turb,
-      d5: data.wt,
-      d6: data.cond,
-      d7: data.tn,
-      d8: data.tp
-    }
-  })
+  getWaterQualityLatest({stcds: route.params.stcd}).then(res => wqData.value = res.data[0])
 }
 
 function handleControlWaterLevel(value) {

+ 18 - 4
src/views/Station.vue

@@ -14,6 +14,7 @@ import TimeScrollbar from "@/components/TimeScrollbar.vue";
 import {Label, Operate, Setting, View} from "@/utils/tdInstruction";
 import {getRainfallLatest, getWaterLevelAndFlowLatest} from "@/api/gx";
 import {getRainfallLevel} from "@/utils/rainfall";
+import bus from "@/utils/bus";
 
 const route = useRoute()
 const stationStore = useStationStore()
@@ -33,17 +34,27 @@ const eventData = ref([])
 // 时间戳
 const max = ref(100)
 const marks = ref({})
+const typicalEventTimeScrollbarShow = ref(true)
 
 const handleEventChange = async (name: string) => {
   event.value = typicalEvents.value.find(t => t.name === name)
   eventData.value = await getTypicalData(route.params.stcd, event.value.id)
-  max.value = eventData.value?.lenght || 100
+  max.value = eventData.value ? eventData.value.length : 100
 }
 
 function sliderlTooltip(val) {
   if (eventData.value && eventData.value.length > 0) {
     const data = eventData.value[val]
     Operate.setWaterLevel(route.params.stcd, data.z, (data.q * 4).toFixed(2))
+    let weather = "晴"
+    if (data.z >= 3.6) {
+      weather = "大雨"
+    } else if (data.z >= 3.4) {
+      weather = "中雨"
+    } else if (data.z >= 3.3) {
+      weather = "小雨"
+    }
+    Setting.setWeather(weather)
     return `${data.tm}\n 水位: ${data.z}m\n 流量: ${data.q}m³/s\n 平均流速: ${data.smv}m³/s\n`
   }
   return ''
@@ -51,7 +62,6 @@ function sliderlTooltip(val) {
 
 function handleTimeChange(status) {
   if (status) {
-    Setting.setWeather("中雨")
     View.changeView(station.value.stnm + '近')
     stationStore.setLabelState2('测站主页', true)
     stationStore.setLabelState2('仪器运维', false)
@@ -87,6 +97,10 @@ onMounted(() => {
   // 获取最新水雨情数据,更新大屏
   handleSetLED()
 })
+
+bus.on("roam", roaming => {
+  typicalEventTimeScrollbarShow.value = !roaming
+})
 </script>
 <template>
   <div class="station-wrapper">
@@ -99,7 +113,7 @@ onMounted(() => {
         </card01>
         <card01 style="height: 30%" title="现场监控">
           <!--  34102206531322000100 这是有视频的CODE  -->
-          <gw-video :code="videoCode" :imageSrc="jiankong"></gw-video>
+          <gw-video :imageSrc="jiankong" :code="videoCode"></gw-video>
         </card01>
       </template>
       <template #rightModule>
@@ -127,7 +141,7 @@ onMounted(() => {
         <station-right-button-group></station-right-button-group>
       </template>
     </right-frame>
-    <div class="typical-event-time-scrollbar">
+    <div v-if="typicalEventTimeScrollbarShow" class="typical-event-time-scrollbar">
       <time-scrollbar :formatTooltip="sliderlTooltip" :marks="marks" :max="max"
                       @change="handleTimeChange"></time-scrollbar>
     </div>

+ 0 - 1
src/views/Zhyw.vue

@@ -19,7 +19,6 @@ onMounted(async () => {
   const srcType = route.params.type
 
   const token = localStorage.getItem('Authorization')
-  debugger
   iframeUrl.value = `${urlMap[srcType]}?code=${token}&stcd=${stcd}`
 })
 </script>

+ 10 - 4
vite.config.ts

@@ -28,15 +28,15 @@ export default defineConfig({
       },
       '/gx_api': {
         // 共享平台
-        target: 'http://10.8.4.136:8881/api/sz/tba-gx/',
+        target: 'http://10.8.4.136:8881/api/',
         changeOrigin: true,
         rewrite: path => path.replace(/^\/gx_api/, '')
       },
-      '/gx_gj_api': {
+      '/szybh_api': {
         // 共享平台
-        target: 'http://10.8.4.136:8881/api/sq_zh/',
+        target: 'http://10.8.4.135:8083/',
         changeOrigin: true,
-        rewrite: path => path.replace(/^\/gx_gj_api/, '')
+        rewrite: path => path.replace(/^\/szybh_api/, '')
       },
       '/lantai': {
         // 共享平台
@@ -56,6 +56,12 @@ export default defineConfig({
         changeOrigin: true,
         rewrite: path => path.replace(/^\/video_api/, '')
       },
+      '/tsq_api': {
+        // 南水太师桥
+        target: 'http://10.8.251.166:8001/',
+        changeOrigin: true,
+        rewrite: path => path.replace(/^\/tsq_api/, '')
+      },
     }
   },
   plugins: [