Jelajahi Sumber

添加蓝泰链接

viviandjava 5 bulan lalu
induk
melakukan
08bd3ebf40
6 mengubah file dengan 91 tambahan dan 95 penghapusan
  1. 34 34
      src/api/alarm.ts
  2. 3 3
      src/layout/components/Navbar.vue
  3. 3 3
      src/router/index.ts
  4. 3 3
      src/views/IntellOper.vue
  5. 0 52
      src/views/Sw.vue
  6. 48 0
      src/views/Zhyw.vue

+ 34 - 34
src/api/alarm.ts

@@ -3,65 +3,65 @@
  */
 export function getAlarmInfo() {
   // return request({
-  //   url: '/tbazmw_api/tbazmw/thdata/getRVandDrpMaxDate',
+  //   url: '/tbazmw_api/warnRecord/getPage',
   //   method: 'get'
   // })
   return Promise.resolve([
     {
       "id": "1",
-      "deviceName": "设备故障",
-      "content": "COD分析仪故障",
-      "tm": "2024-10-30 14:00:00",
+      "warnType": "设备故障",
+      "warnContent": "COD分析仪故障",
+      "reportTime": "2024-10-30 14:00:00",
     }, {
       "id": "2",
-      "deviceName": "数据中断",
-      "content": "水质监测数据中断",
-      "tm": "2024-10-30 14:00:00",
+      "warnType": "数据中断",
+      "warnContent": "水质监测数据中断",
+      "reportTime": "2024-10-30 14:00:00",
     }, {
       "id": "3",
-      "deviceName": "数据异常",
-      "content": "数据出现大值",
-      "tm": "2024-10-30 14:00:00",
+      "warnType": "数据异常",
+      "warnContent": "数据出现大值",
+      "reportTime": "2024-10-30 14:00:00",
     }, {
       "id": "4",
-      "deviceName": "设备故障",
-      "content": "高锰酸盐设备故障",
-      "tm": "2024-10-30 14:00:00",
+      "warnType": "设备故障",
+      "warnContent": "高锰酸盐设备故障",
+      "reportTime": "2024-10-30 14:00:00",
     }, {
       "id": "5",
-      "deviceName": "设备不在线",
-      "content": "设备断电",
-      "tm": "2024-10-30 14:00:00",
+      "warnType": "设备不在线",
+      "warnContent": "设备断电",
+      "reportTime": "2024-10-30 14:00:00",
     }, {
       "id": "6",
-      "deviceName": "温度",
-      "content": "高温报警",
-      "tm": "2024-10-30 14:00:00",
+      "warnType": "温度",
+      "warnContent": "高温报警",
+      "reportTime": "2024-10-30 14:00:00",
     }, {
       "id": "7",
-      "deviceName": "数据跳变",
-      "content": "数据变化范围超10%",
-      "tm": "2024-10-30 14:00:00",
+      "warnType": "数据跳变",
+      "warnContent": "数据变化范围超10%",
+      "reportTime": "2024-10-30 14:00:00",
     }, {
       "id": "8",
-      "deviceName": "水压",
-      "content": "高压泵进口水压力低报警",
-      "tm": "2024-10-30 14:00:00",
+      "warnType": "水压",
+      "warnContent": "高压泵进口水压力低报警",
+      "reportTime": "2024-10-30 14:00:00",
     }, {
       "id": "9",
-      "deviceName": "温度",
-      "content": "高温报警",
-      "tm": "2024-10-30 14:00:00",
+      "warnType": "温度",
+      "warnContent": "高温报警",
+      "reportTime": "2024-10-30 14:00:00",
     }, {
       "id": "10",
-      "deviceName": "数据跳变",
-      "content": "数据变化范围超10%",
-      "tm": "2024-10-30 14:00:00",
+      "warnType": "数据跳变",
+      "warnContent": "数据变化范围超10%",
+      "reportTime": "2024-10-30 14:00:00",
     }, {
       "id": "11",
-      "deviceName": "水压",
-      "content": "高压泵进口水压力低报警",
-      "tm": "2024-10-30 14:00:00",
+      "warnType": "水压",
+      "warnContent": "高压泵进口水压力低报警",
+      "reportTime": "2024-10-30 14:00:00",
     },
   ])
 }

+ 3 - 3
src/layout/components/Navbar.vue

@@ -32,14 +32,14 @@ const rightMenu = computed(() => {
         {
           name: '智慧运维', path: '/intelloper/' + route.params.stcd
         }, {
-          name: '测站运维', path: '/sw/' + route.params.stcd + '/shebei'
+          name: '测站运维', path: '/zhyw/' + route.params.stcd + '/czyw'
         }]
     },
     {
       name: '业务管理', path: '/index', type: 'right', style: {}, secMenu: [{
-        name: '实时监测', path: '/sw/' + route.params.stcd + '/sw'
+        name: '实时监测', path: '/zhyw/' + route.params.stcd + '/ssjc'
       }, {
-        name: '查询分析', path: '/sw/' + route.params.stcd + '/flow'
+        name: '查询分析', path: '/zhyw/' + route.params.stcd + '/cxfx'
       }]
     }
   ]

+ 3 - 3
src/router/index.ts

@@ -43,9 +43,9 @@ const router = createRouter({
           name: 'device',
           component: () => import('@/views/Device.vue'),
         }, {
-          path: 'sw/:stcd/:type',
-          name: 'sw',
-          component: () => import('@/views/Sw.vue'),
+          path: 'zhyw/:stcd/:type',
+          name: 'zhyw',
+          component: () => import('@/views/Zhyw.vue'),
         },
       ],
     },

+ 3 - 3
src/views/IntellOper.vue

@@ -40,17 +40,17 @@ const deviceData = reactive([])
 
 const alarmColumns = [
   {
-    label: '报警类型', prop: 'deviceName', width: '100', convertFn: (data) => {
+    label: '报警类型', prop: 'warnType', width: '100', convertFn: (data) => {
       return data ? data.trim() : ''
     }
   },
   {
-    label: '时间', prop: 'tm', convertFn: (data) => {
+    label: '时间', prop: 'reportTime', convertFn: (data) => {
       return data ? data.substring(5, 16) : ''
     }
   },
   {
-    label: '告警内容', prop: 'content', width: '180', convertFn: (data) => {
+    label: '告警内容', prop: 'warnContent', width: '180', convertFn: (data) => {
       return data ? data.trim() : ''
     }
   },

+ 0 - 52
src/views/Sw.vue

@@ -1,52 +0,0 @@
-<script lang="ts" setup>
-import { onMounted, ref } from 'vue'
-import { useRoute } from 'vue-router'
-
-const imgSrc = ref(null)
-const route = useRoute()
-
-onMounted(() => {
-  var srcType = route.params.type
-  switch (srcType) {
-    case 'sw':
-      imgSrc.value = new URL('@/assets/images/lantai/ss_sw.jpg', import.meta.url).href
-      break
-    case 'flow':
-      imgSrc.value =new URL('@/assets/images/lantai/flow.jpg', import.meta.url).href
-      break
-    case 'bj':
-      imgSrc.value =new URL('@/assets/images/lantai/bj.png', import.meta.url).href
-      break
-    case 'gj':
-      imgSrc.value =new URL('@/assets/images/lantai/gj.png', import.meta.url).href
-      break
-    case 'jilu':
-      imgSrc.value =new URL('@/assets/images/lantai/jilu.png', import.meta.url).href
-      break
-    case 'shebei':
-      imgSrc.value =new URL('@/assets/images/lantai/shebei.png', import.meta.url).href
-      break
-    case 'weihu':
-      imgSrc.value =new URL('@/assets/images/lantai/weihu.png', import.meta.url).href
-      break
-    case 'dzll':
-      imgSrc.value =new URL('@/assets/images/lantai/dzll.png', import.meta.url).href
-      break
-  }
-})
-</script>
-
-<template>
-  <div class="right-frame">
-    <img :src="imgSrc"
-         style="width: 100%;height: 100%;">
-  </div>
-</template>
-<style lang="scss" scoped>
-.right-frame {
-  position: relative;
-  height: 100%;
-  padding: 0 0.7rem 0.7rem 0.7rem;
-  overflow: hidden;
-}
-</style>

+ 48 - 0
src/views/Zhyw.vue

@@ -0,0 +1,48 @@
+<script lang="ts" setup>
+import { onMounted, ref } from 'vue'
+import { useRoute } from 'vue-router'
+
+// const imgSrc = ref(null)
+const route = useRoute()
+const iframeUrl = ref('https://www.baidu.com')
+// 实时监测
+const baseUrl_ss = ref('http://10.8.48.235:8100/homePage.html#/watermonitoring/realhydrology?code=bf0740e4-5ddf-4482-b252-f0e9fa176f6d&stcd=')
+// 测站运维
+const baseUrl_yw = ref('http://10.8.48.235:8100/homePage.html#/inspectionmaintenance/equipmentInventory?code=bf0740e4-5ddf-4482-b252-f0e9fa176f6d&stcd=')
+// 查询分析
+const baseUrl_cx = ref('http://10.8.48.235:8100/homePage.html#/dataManagement/watermultiplestations?code=bf0740e4-5ddf-4482-b252-f0e9fa176f6d&stcd=')
+onMounted(() => {
+  debugger
+  const stcd = route.params.stcd
+  const srcType = route.params.type
+
+  let baseUrl = ''
+  switch (srcType) {
+    case 'ssjc':
+      baseUrl = baseUrl_ss.value
+      break
+    case 'czyw':
+      baseUrl = baseUrl_yw.value
+      break
+    case 'cxfx':
+      baseUrl = baseUrl_cx.value
+      break
+  }
+  iframeUrl.value = baseUrl + stcd
+})
+</script>
+
+<template>
+  <div class="right-frame">
+    <!--    <img :src="imgSrc"-->
+    <!--         style="width: 100%;height: 100%;">-->
+    <iframe :src="iframeUrl" style="width: 100%;height: 100%;"></iframe>
+  </div>
+</template>
+<style lang="scss" scoped>
+.right-frame {
+  position: relative;
+  height: 100%;
+  overflow: hidden;
+}
+</style>