Преглед на файлове

Merge branch 'master' of http://182.92.126.35:3000/hrx/vent-forewarn-micro

hongrunxia преди 1 година
родител
ревизия
58664caca3

+ 1 - 0
package.json

@@ -77,6 +77,7 @@
     "vue": "^3.3.4",
     "vue-i18n": "^9.6.4",
     "vue-json-pretty": "^2.2.4",
+    "vue-mky-svg": "^0.1.7",
     "vue-router": "^4.2.3",
     "vue-seamless-scroll": "^1.1.23",
     "vue-types": "^5.1.0",

BIN
src/assets/images/fire/zhud-card.png


BIN
src/assets/images/fire/zhud-t.png


+ 2 - 2
src/locales/lang/zh-CN/routes/vent.json

@@ -10,8 +10,8 @@
     "workFace": "工作面监测预警分析",
     "beltConveyor": "带试运输机放灭火监测系统",
     "fireDistributionPoint": "安全监控系统预警分析",
-    "nitrogen": "智能注氮系统监测分析",
-    "grout": "智能灌浆系统监测分析"
+    "fireZhud": "智能注氮系统监测分析",
+    "fireZhuj": "智能灌浆系统监测分析"
   },
   "dust": {
     "dust": "粉尘",

+ 16 - 0
src/router/routes/vent/fire.ts

@@ -78,6 +78,22 @@ const fire: AppRouteModule = {
       },
       component: () => import('@/views/vent/fire/fireDistributionPoint/index.vue'),
     },
+    {
+      path: 'fire-zhuj',
+      name: 'fireZhuj',
+      meta: {
+        title: t('routes.vent.fire.fireZhuj'),
+      },
+      component: () => import('@/views/vent/fire/fireZhuj/index.vue'),
+    },
+    {
+      path: 'fire-zhud',
+      name: 'fireZhud',
+      meta: {
+        title: t('routes.vent.fire.fireZhud'),
+      },
+      component: () => import('@/views/vent/fire/fireZhud/index.vue'),
+    },
   ],
 };
 

+ 8 - 2
src/views/vent/dust/dustAtomizing/index.vue

@@ -56,7 +56,7 @@
 </template>
 
 <script setup lang="ts">
-import { ref, reactive, onMounted } from 'vue'
+import { ref, reactive, onMounted, onUnmounted } from 'vue'
 import { Form, FormItem, Table } from 'ant-design-vue';
 import { SearchOutlined, PlusOutlined } from '@ant-design/icons-vue';
 import { realData } from './dustAtomizing.api'
@@ -211,13 +211,19 @@ async function getList() {
 //列表查询
 function getSearch() {
   getList()
-  
+
 }
 
 onMounted(() => {
   getList()
   getMonitor()
 })
+onUnmounted(() => {
+  if (timer) {
+    clearTimeout(timer);
+    timer = null;
+  }
+});
 </script>
 
 <style lang="less" scoped>

+ 7 - 1
src/views/vent/dust/dustHome/index.vue

@@ -106,7 +106,7 @@
 </template>
 
 <script setup lang="ts">
-  import { ref, reactive, onMounted } from 'vue';
+  import { ref, reactive, onMounted,onUnmounted } from 'vue';
   import DanelBd from '../../common/danelBd.vue';
   import workJc from '../../fire/fireHome/components/workJc.vue';
   import multipleDust from './components/multipleDust.vue';
@@ -293,6 +293,12 @@
     getRealDataList();
     getMonitor();
   });
+  onUnmounted(() => {
+    if (timer) {
+      clearTimeout(timer);
+      timer = null;
+    }
+  });
 </script>
 
 <style lang="less" scoped>

+ 7 - 1
src/views/vent/dust/dustWarnAnalysis/index.vue

@@ -24,7 +24,7 @@
 </template>
 
 <script setup lang="ts">
-import { ref, reactive, onMounted } from 'vue';
+import { ref, reactive, onMounted,onUnmounted } from 'vue';
 import basicTree from '../../common/basicTree.vue'
 import basicCard4 from '../../common/basicCard4.vue';
 import basicCard5 from '../../common/basicCard5.vue';
@@ -164,6 +164,12 @@ onMounted(() => {
   getAreaTypeListd()
   getMonitor()
 })
+onUnmounted(() => {
+    if (timer) {
+      clearTimeout(timer);
+      timer = null;
+    }
+  });
 </script>
 
 <style lang="less" scoped>

+ 8 - 1
src/views/vent/fire/compositeWarn/index.vue

@@ -40,7 +40,7 @@
 </template>
 
 <script setup lang="ts">
-import { ref, reactive, onMounted } from 'vue'
+import { ref, reactive, onMounted, onUnmounted } from 'vue'
 import basicCard3 from '../../common/basicCard3.vue';
 import basicEchartLine from '../../common/basicEchartLine.vue';
 import basicTree from '../../common/basicTree.vue'
@@ -285,6 +285,13 @@ onMounted(() => {
 
 })
 
+onUnmounted(() => {
+  if (timer) {
+    clearTimeout(timer);
+    timer = null;
+  }
+});
+
 </script>
 
 <style lang="less" scoped>

+ 8 - 1
src/views/vent/fire/fireDistributionPoint/index.vue

@@ -19,7 +19,7 @@
   </div>
 </template>
 <script lang="ts" setup>
-import { ref, reactive, onMounted } from 'vue';
+import { ref, reactive, onMounted,onUnmounted } from 'vue';
 import basicSensor from '../../common/basicSensor.vue';
 import { getFireAreaInfo, getZcHfWd, getHeadingFace, getDsWd, getMainTrafficYw } from './firePoint.api'
 
@@ -138,6 +138,13 @@ onMounted(() => {
   
 })
 
+onUnmounted(() => {
+  if (timer) {
+    clearTimeout(timer);
+    timer = null;
+  }
+});
+
 </script>
 <style lang="less" scoped>
 .fireDistributionPoint {

+ 8 - 1
src/views/vent/fire/fireGoaf/index.vue

@@ -25,7 +25,7 @@
 </template>
 
 <script setup lang="ts">
-import { ref, reactive, onMounted } from 'vue'
+import { ref, reactive, onMounted,onUnmounted } from 'vue'
 import basicCard3 from '../../common/basicCard3.vue';
 import basicEchartLine from '../../common/basicEchartLine.vue';
 import basicTree from '../../common/basicTree.vue'
@@ -148,6 +148,13 @@ onMounted(() => {
   getMonitor()
 
 })
+
+onUnmounted(() => {
+  if (timer) {
+    clearTimeout(timer);
+    timer = null;
+  }
+});
 </script>
 
 <style lang="less" scoped>

+ 41 - 23
src/views/vent/fire/fireHome/components/systemJc.vue

@@ -1,41 +1,59 @@
 <template>
   <div class="systemJc">
-    <div class="systemJc-box" v-for="(item, index) in systemJcList" :key="index">
+    <div class="systemJc-box" v-for="(item, index) in systemJcList" :key="index" @click="getDetail(index)">
       <div class="system-label">{{ item.label }}</div>
     </div>
   </div>
 </template>
 
 <script setup lang="ts">
-  import { ref, reactive } from 'vue';
+import { ref, reactive } from 'vue';
+import {useRouter } from 'vue-router'
 
-  let systemJcList = reactive([{ label: '智能灌浆系统' }, { label: '智能注氮系统' }]);
+let router = useRouter(); //路由
+
+let systemJcList = reactive([{ label: '智能灌浆系统' }, { label: '智能注氮系统' }]);
+
+function getDetail(index) {
+  console.log(index, 'index--------')
+  switch (index) {
+    case 0:
+    router.push({
+      path: '/fire/fire-composite-warn',
+      // query: { sysOrgCode: homeParam.sysOrgCode, bpmStatus: homeParam.bpmStatus, flag: homeParam.flag },
+    });
+      break;
+    case 1:
+      break;
+  }
+}
 </script>
 
 <style lang="less" scoped>
-  .systemJc {
-    display: flex;
+.systemJc {
+  display: flex;
+  position: relative;
+  align-items: center;
+  justify-content: space-around;
+  width: 100%;
+  height: 100%;
+
+  .systemJc-box {
     position: relative;
-    align-items: center;
-    justify-content: space-around;
-    width: 100%;
+    width: 168px;
     height: 100%;
+    background: url('../../../../../assets/images/fire/firehome/zu-14578.png') no-repeat center;
+    background-size: 100% 100%;
+    cursor: pointer;
 
-    .systemJc-box {
-      position: relative;
-      width: 168px;
-      height: 100%;
-      background: url('../../../../../assets/images/fire/firehome/zu-14578.png') no-repeat center;
-      background-size: 100% 100%;
-
-      .system-label {
-        position: absolute;
-        top: 14px;
-        left: 50%;
-        transform: translate(-50%, 0);
-        color: #fff;
-        font-size: 14px;
-      }
+    .system-label {
+      position: absolute;
+      top: 14px;
+      left: 50%;
+      transform: translate(-50%, 0);
+      color: #fff;
+      font-size: 14px;
     }
   }
+}
 </style>

+ 8 - 1
src/views/vent/fire/fireHome/index.vue

@@ -83,7 +83,7 @@
 </template>
 
 <script setup lang="ts">
-import { ref, reactive, onMounted } from 'vue'
+import { ref, reactive, onMounted,onUnmounted } from 'vue'
 import DanelBd from '../../common/danelBd.vue';
 import workJc from './components/workJc.vue';
 import emptyJc from './components/emptyJc.vue';
@@ -475,6 +475,13 @@ onMounted(() => {
   getMonitor()
 
 })
+
+onUnmounted(() => {
+  if (timer) {
+    clearTimeout(timer);
+    timer = null;
+  }
+});
 </script>
 
 <style lang="less" scoped>

+ 12 - 0
src/views/vent/fire/fireZhud/fireZhud.api.ts

@@ -0,0 +1,12 @@
+
+import { defHttp } from '@/utils/http/axios';
+enum Api {
+  getRealData= '/fire/show/realData',
+
+}
+/**
+ * 智能注氮数据
+ * @param params
+ */
+export const getRealData = (params) => defHttp.post({ url: Api.getRealData, params });
+

+ 0 - 0
src/views/vent/fire/fireZhud/fireZhud.data.ts


+ 119 - 0
src/views/vent/fire/fireZhud/index.vue

@@ -0,0 +1,119 @@
+<template>
+  <div class="fireZhud">
+    <div class="zhud-content">
+      <div class="content-item" v-for="(item, index) in contentList" :key="index">
+        <div class="card-item">
+          <span>设备名称 : </span>
+          <span>{{ item.deviceName || '--' }}</span>
+        </div>
+        <div class="card-item">
+          <span>额定注氮压力(Mpa) : </span>
+          <span>{{ item.injectionPressure || '--' }}</span>
+        </div>
+        <div class="card-item">
+          <span>额定注氮流量(m3/h) : </span>
+          <span>{{ item.injectionFlow || '--' }}</span>
+        </div>
+        <div class="card-item">
+          <span>额定氮气浓度(%) : </span>
+          <span>{{ item.injectionConsistence || '--' }}</span>
+        </div>
+        <div class="card-item">
+          <span>设备型号 : </span>
+          <span>{{ item.modelCode || '--' }}</span>
+        </div>
+        <div class="card-item">
+          <span>额定电流 : </span>
+          <span>{{ item.current || '--' }}</span>
+        </div>
+        <div class="card-item">
+          <span>额定电压 : </span>
+          <span>{{ item.voltage || '--' }}</span>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+import { ref, reactive, onMounted, onUnmounted } from 'vue'
+import { getRealData } from './fireZhud.api'
+
+let contentList = reactive<any[]>([])
+
+// https获取监测数据
+let timer: null | NodeJS.Timeout = null;
+function getMonitor() {
+  timer = setTimeout(
+    async () => {
+      //智能注氮
+      await getRealDataList()
+      if (timer) {
+        timer = null;
+      }
+      getMonitor();
+    },
+    5000
+  );
+}
+
+async function getRealDataList() {
+  let res = await getRealData({ type: 'FireZhuD' })
+  console.log(res, '智能注氮数据----------')
+  if (res.length != 0) {
+    contentList.length = 0
+    res.forEach(el => {
+      contentList.push(el)
+    })
+  }
+}
+
+onMounted(() => {
+  getRealDataList()
+  getMonitor()
+})
+onUnmounted(() => {
+  if (timer) {
+    clearTimeout(timer);
+    timer = null;
+  }
+});
+
+</script>
+
+<style lang="less" scoped>
+.fireZhud {
+  display: flex;
+  position: relative;
+  align-items: center;
+  justify-content: center;
+  width: calc(100% - 20px);
+  // height: calc(100vh - 82px);
+  height: 863px;
+  margin: 50px 10px 15px;
+  background: #282828;
+
+  .zhud-content {
+    position: relative;
+    width: 1566px;
+    height: 100%;
+    background: url('../../../../assets/images/fire/zhud-t.png') no-repeat center;
+    background-size: 100% 100%;
+
+    .content-item{
+      &:nth-child(1){
+        position: absolute;
+        top: 20px;
+        right: 20px;
+      }
+
+      &:nth-child(2){
+        position: absolute;
+        top: 40px;
+        right: 40px;
+      }
+    }
+  }
+
+}
+</style>

+ 21 - 0
src/views/vent/fire/fireZhuj/index.vue

@@ -0,0 +1,21 @@
+<template>
+  <div class="fireZhuj">
+    <iframe src="http://172.16.253.25:8090/FireZhuj/monitor" width="100%" height="100%" frameborder="0"></iframe>
+  </div>
+</template>
+
+<script setup lang="ts">
+import { ref, reactive, onMounted } from 'vue'
+
+</script>
+
+<style lang="less" scoped>
+.fireZhuj {
+  position: relative;
+  width: calc(100% - 20px);
+  // height: calc(100vh - 82px);
+  height: 863px;
+  margin: 50px 10px 15px;
+  background: #282828;
+}
+</style>