Explorar o código

[Mod 0000] 公司端首页各个模块内容修改

ruienger hai 9 meses
pai
achega
8125be86c9

+ 0 - 1
src/views/vent/home/billboard/components/DustStatus.vue

@@ -45,7 +45,6 @@
   watch(
     () => props.data,
     () => {
-      console.log('debug');
       fetchData();
     },
     { immediate: true }

+ 0 - 1
src/views/vent/home/billboard/components/FileOverview.vue

@@ -36,7 +36,6 @@
   watch(
     () => props.data,
     () => {
-      console.log('debug');
       fetchData();
     },
     { immediate: true }

+ 0 - 1
src/views/vent/home/billboard/components/FireStatus.vue

@@ -63,7 +63,6 @@
   watch(
     () => props.data,
     () => {
-      console.log('debug');
       fetchData();
     },
     { immediate: true }

+ 0 - 1
src/views/vent/home/billboard/components/GasStatus.vue

@@ -64,7 +64,6 @@
   watch(
     () => props.data,
     () => {
-      console.log('debug');
       fetchData();
     },
     { immediate: true }

+ 0 - 1
src/views/vent/home/billboard/components/Summary.vue

@@ -53,7 +53,6 @@
   watch(
     () => props.data,
     () => {
-      console.log('debug');
       fetchData();
     },
     { immediate: true }

+ 7 - 2
src/views/vent/home/billboard/components/VentilationStatus.vue

@@ -2,7 +2,7 @@
 <template>
   <Row justify="space-between">
     <Col v-for="(item, i) in VENTILATION_STATUS_HEADER_CONFIG" :key="`svvhbcvs${i}`" :span="12">
-      <MiniBoard :label="item.label" :value="headerData[item.prop]" :type="item.type" />
+      <MiniBoard :label="item.label" :value="filterBadValue(headerData[item.prop])" :type="item.type" />
     </Col>
     <div class="ventilate-status-card">
       <!-- <CommonTitle label="回风井系统数量" :value="ventilatorCount" /> -->
@@ -68,10 +68,15 @@
     });
   }
 
+  // 过滤不合法的值,小于5000的视为传感器出错
+  function filterBadValue(val: number | string) {
+    const valid = parseInt(val) > 5000;
+    return valid ? val : '/';
+  }
+
   watch(
     () => props.data,
     () => {
-      console.log('debug');
       fetchData();
     },
     { immediate: true }

+ 1 - 1
src/views/vent/home/billboard/index.vue

@@ -74,7 +74,7 @@
     Summary: undefined,
   };
 
-  const mainTitle = '国家能源神东煤炭集团';
+  const mainTitle = '国能神东一通三防管控平台';
 
   // 看板相关的基础配置
   const billboards = ref<BillboardType[]>([]);

+ 13 - 1
src/views/vent/home/clique/components/dialog-modal.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="dialogModal" id="detailModal">
     <div class="modal-top">
-      <i>
+      <i @click="redictTo">
         <SvgIcon class="icon" size="14" name="inner-kd" />
       </i>
       <span class="modal-title"> {{ title }}</span>
@@ -79,6 +79,7 @@
 <script lang="ts" setup>
   import { ref, reactive, defineProps, watch, inject } from 'vue';
   import { SvgIcon } from '/@/components/Icon';
+  import { useSSO } from '/@/hooks/vent/useSSO';
   import { getAssetURL } from '/@/utils/ui';
   const globalConfig = inject('globalConfig');
 
@@ -95,6 +96,7 @@
     },
   });
 
+  const { open } = useSSO();
   // let modalTitle = ref('布尔台矿');
   // let modalTitle = ref('yjl');
   let modalCard = reactive([
@@ -197,6 +199,13 @@
       deep: true,
     }
   );
+
+  // 重新向到新的页面,业务上讲是公司端跳转矿端
+  function redictTo() {
+    if (!props.centerDetail.ip) return;
+    const url = `http://${props.centerDetail.ip}:8092/login`;
+    open(url);
+  }
 </script>
 <style lang="less" scoped>
   @font-face {
@@ -221,6 +230,9 @@
       line-height: 30px;
       width: 90%;
 
+      .icon {
+        cursor: pointer;
+      }
       .modal-title {
         font-size: 14px;
         font-family: 'douyuFont';

+ 3 - 3
src/views/vent/home/clique/components/echart-scene.vue

@@ -7,15 +7,15 @@
     <div class="percent">
       <div class="percent-box">
         <span class="per-v">{{ percent.jf }}</span>
-        <span class="per-d">m³/min</span>
+        <span class="per-d">pa</span>
       </div>
       <div class="percent-box">
         <span class="per-v">{{ percent.yf }}</span>
-        <span class="per-d">m³/min</span>
+        <span class="per-d">pa</span>
       </div>
       <div class="percent-box">
         <span class="per-v">{{ percent.hf }}</span>
-        <span class="per-d">m³/min</span>
+        <span class="per-d">pa</span>
       </div>
     </div>
   </div>

+ 1 - 1
src/views/vent/home/clique/components/scene-key.vue

@@ -46,7 +46,7 @@
     },
   });
 
-  let sceneTitle = ref('关键场景通防综合监测');
+  let sceneTitle = ref('回风系统通风状态监测');
 
   let sceneList = reactive([
     { label: '总阻力', value: 0 },

+ 7 - 2
src/views/vent/home/clique/components/wind-road-middle.vue

@@ -11,7 +11,7 @@
       <div class="road-card">
         <div class="head-nav">
           <span>{{ roadDatas.label }} : </span>
-          <span>{{ roadDatas.value }}km</span>
+          <span>{{ parseBigInt(roadDatas.value) }}</span>
         </div>
         <div class="echart-box">
           <div ref="road" class="road"></div>
@@ -49,6 +49,11 @@
   let yData = ref<any[]>([]);
   let maxData = reactive<any[]>([]);
 
+  function parseBigInt(int: string | number) {
+    const num = parseInt(int);
+    return `${Math.floor(num / 1000)}km`;
+  }
+
   function getOption() {
     nextTick(() => {
       const myChart = echarts.init(road.value);
@@ -336,7 +341,7 @@
     (newR, oldR) => {
       if (JSON.stringify(newR) != '{}') {
         maxData.length = 0;
-        roadDatas.value = Math.floor(newR.totallength / 1000);
+        roadDatas.value = newR.totallength;
         xData.value = newR.data1;
         yData.value = newR.data;
         yData.value.forEach((el) => {

+ 7 - 5
src/views/vent/home/clique/index.vue

@@ -90,7 +90,7 @@
     data1: [],
   });
 
-  let orgcode=ref('')
+  let orgcode = ref('');
 
   // https获取监测数据
   let timer: null | NodeJS.Timeout = null;
@@ -127,8 +127,10 @@
         roadData.data.push(el.sys_data.totallength);
         roadData.data1.push(el.sys_data.deviceName);
       });
-      compositeData.value = res[0].majorpath_data;
-      centerDetail.value = res.filter(v=>v.orgcode==orgcode.value)[0];
+      compositeData.value = res.reduce((arr, e) => {
+        return [...arr, ...e.majorpath_data];
+      }, []);
+      centerDetail.value = res.filter((v) => v.orgcode == orgcode.value)[0];
     }
   }
   //获取文件共享中心数据
@@ -144,10 +146,10 @@
 
   function showDetail(code, label, leftV, topV) {
     if (code) {
-      orgcode.value=code
+      orgcode.value = code;
       dialogTitle.value = label;
       isShowDialog.value = true;
-      getHomeDataList()
+      getHomeDataList();
     }
     nextTick(() => {
       const tooltipDom = document.getElementById('detailModal') as HTMLElement;