Browse Source

Merge branch 'master' of http://182.92.126.35:3000/hrx/mky-vent-base

hongrunxia 2 ngày trước cách đây
mục cha
commit
bce11f50a4

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 0
src/assets/icons/clound.svg


+ 5 - 0
src/assets/icons/detail.svg

@@ -0,0 +1,5 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="15.427" height="16" viewBox="0 0 15.427 16">
+  <g id="详情" transform="translate(-1636 -15.09)">
+    <path id="路径_57119" data-name="路径 57119" d="M109.074,76.281l2.189,2.19a.561.561,0,1,1-.794.794l-2.189-2.19a3.429,3.429,0,1,1,.794-.794Zm.641-5.018a4.592,4.592,0,0,0-1.143-.937V65.715a.569.569,0,0,0-.567-.572H97.71a.573.573,0,0,0-.567.571V78.286a.569.569,0,0,0,.567.571H108a.573.573,0,0,0,.567-.571v-.041l.042-.025,1.032,1.032a1.146,1.146,0,0,1-1.077.747H97.146A1.145,1.145,0,0,1,96,78.862V65.137A1.141,1.141,0,0,1,97.146,64h11.423a1.145,1.145,0,0,1,1.146,1.138Zm-3.449,5.289a2.286,2.286,0,1,0-2.286-2.286A2.286,2.286,0,0,0,106.266,76.551ZM98.286,68a.575.575,0,0,1,.573-.571h5.712a.571.571,0,1,1,0,1.143H98.858A.571.571,0,0,1,98.286,68Zm0,2.286a.573.573,0,0,1,.57-.571h3.432a.571.571,0,0,1,0,1.143H98.855a.569.569,0,0,1-.57-.571Z" transform="translate(1540 -48.91)" fill="#fff"/>
+  </g>
+</svg>

+ 3 - 0
src/assets/icons/rain.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="19.168" height="15.976" viewBox="0 0 19.168 15.976">
+  <path id="雨" d="M4.393,12.89a1.044,1.044,0,0,0-1.04,1.04v1.023a1.03,1.03,0,0,0,1.04,1.023A1.012,1.012,0,0,0,5.4,14.953V13.93a1.026,1.026,0,0,0-1.006-1.04Zm3.87,0a1.023,1.023,0,0,0-1.04,1.04v1.023a1.009,1.009,0,0,0,1.04,1.023,1,1,0,0,0,.989-1.023V13.93a1.012,1.012,0,0,0-.989-1.04Zm3.734,0a1.033,1.033,0,0,0-1.04,1.04v1.023A1.019,1.019,0,0,0,12,15.976a1.041,1.041,0,0,0,1.04-1.023V13.93A1.055,1.055,0,0,0,12,12.89ZM12.936,0A6.73,6.73,0,0,0,6.763,4.092c-.119.239-.2.563-.324.887A5,5,0,0,0,4.1,4.314,3.653,3.653,0,0,0,1.393,5.541,3.342,3.342,0,0,0,.455,7.348,3.574,3.574,0,0,0,1.87,11.185a4.12,4.12,0,0,0,1.859.6h11.68a.286.286,0,0,0,.2-.051,4.492,4.492,0,0,0,2.421-1.313,5.894,5.894,0,0,0,1.5-4.007A6.5,6.5,0,0,0,12.936,0Zm3.717,9.156a2.655,2.655,0,0,1-1.313.716H3.728a3.049,3.049,0,0,1-.818-.239A1.676,1.676,0,0,1,2.3,7.707a2.483,2.483,0,0,1,.375-.818c.034,0,.034-.017.034-.017a1.945,1.945,0,0,1,1.4-.7,3.4,3.4,0,0,1,1.876.784c.017,0,.017.051.051.051l.409.307a.931.931,0,0,0,.87.085.768.768,0,0,0,.563-.614c.136-.546.443-1.569.6-1.961a4.906,4.906,0,0,1,4.467-2.95,4.631,4.631,0,0,1,4.723,4.535,3.949,3.949,0,0,1-1.006,2.745ZM15.528,12.89a1.037,1.037,0,0,0-1.057,1.04v1.023a1.023,1.023,0,0,0,1.057,1.023,1.012,1.012,0,0,0,1.006-1.023V13.93A1.026,1.026,0,0,0,15.528,12.89Z" transform="translate(-0.366)"/>
+</svg>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 0
src/assets/icons/snow.svg


+ 18 - 41
src/assets/icons/sun.svg

@@ -1,42 +1,19 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
-	 viewBox="0 0 60 60" style="enable-background: new 0 0 60 60;" xml:space="preserve">
-<g>
-	<path style="fill: #F0C419;" d="M30,0c-0.552,0-1,0.448-1,1v6c0,0.552,0.448,1,1,1s1-0.448,1-1V1C31,0.448,30.552,0,30,0z"/>
-	<path style="fill: #F0C419;" d="M30,52c-0.552,0-1,0.448-1,1v6c0,0.552,0.448,1,1,1s1-0.448,1-1v-6C31,52.448,30.552,52,30,52z"/>
-	<path style="fill: #F0C419;" d="M59,29h-6c-0.552,0-1,0.448-1,1s0.448,1,1,1h6c0.552,0,1-0.448,1-1S59.552,29,59,29z"/>
-	<path style="fill: #F0C419;" d="M8,30c0-0.552-0.448-1-1-1H1c-0.552,0-1,0.448-1,1s0.448,1,1,1h6C7.552,31,8,30.552,8,30z"/>
-	<path style="fill: #F0C419;" d="M46.264,14.736c0.256,0,0.512-0.098,0.707-0.293l5.736-5.736c0.391-0.391,0.391-1.023,0-1.414
-		s-1.023-0.391-1.414,0l-5.736,5.736c-0.391,0.391-0.391,1.023,0,1.414C45.752,14.639,46.008,14.736,46.264,14.736z"/>
-	<path style="fill: #F0C419;" d="M13.029,45.557l-5.736,5.736c-0.391,0.391-0.391,1.023,0,1.414C7.488,52.902,7.744,53,8,53
-		s0.512-0.098,0.707-0.293l5.736-5.736c0.391-0.391,0.391-1.023,0-1.414S13.42,45.166,13.029,45.557z"/>
-	<path style="fill: #F0C419;" d="M46.971,45.557c-0.391-0.391-1.023-0.391-1.414,0s-0.391,1.023,0,1.414l5.736,5.736
-		C51.488,52.902,51.744,53,52,53s0.512-0.098,0.707-0.293c0.391-0.391,0.391-1.023,0-1.414L46.971,45.557z"/>
-	<path style="fill: #F0C419;" d="M8.707,7.293c-0.391-0.391-1.023-0.391-1.414,0s-0.391,1.023,0,1.414l5.736,5.736
-		c0.195,0.195,0.451,0.293,0.707,0.293s0.512-0.098,0.707-0.293c0.391-0.391,0.391-1.023,0-1.414L8.707,7.293z"/>
-	<path style="fill: #F0C419;" d="M50.251,21.404c0.162,0.381,0.532,0.61,0.921,0.61c0.13,0,0.263-0.026,0.39-0.08l2.762-1.172
-		c0.508-0.216,0.746-0.803,0.53-1.311s-0.804-0.746-1.311-0.53l-2.762,1.172C50.272,20.309,50.035,20.896,50.251,21.404z"/>
-	<path style="fill: #F0C419;" d="M9.749,38.596c-0.216-0.508-0.803-0.746-1.311-0.53l-2.762,1.172
-		c-0.508,0.216-0.746,0.803-0.53,1.311c0.162,0.381,0.532,0.61,0.921,0.61c0.13,0,0.263-0.026,0.39-0.08l2.762-1.172
-		C9.728,39.691,9.965,39.104,9.749,38.596z"/>
-	<path style="fill: #F0C419;" d="M54.481,38.813L51.7,37.688c-0.511-0.207-1.095,0.041-1.302,0.553
-		c-0.207,0.512,0.041,1.095,0.553,1.302l2.782,1.124c0.123,0.049,0.25,0.073,0.374,0.073c0.396,0,0.771-0.236,0.928-0.626
-		C55.241,39.603,54.994,39.02,54.481,38.813z"/>
-	<path style="fill: #F0C419;" d="M5.519,21.188L8.3,22.312c0.123,0.049,0.25,0.073,0.374,0.073c0.396,0,0.771-0.236,0.928-0.626
-		c0.207-0.512-0.041-1.095-0.553-1.302l-2.782-1.124c-0.513-0.207-1.095,0.04-1.302,0.553C4.759,20.397,5.006,20.98,5.519,21.188z"
-		/>
-	<path style="fill: #F0C419;" d="M39.907,50.781c-0.216-0.508-0.803-0.745-1.311-0.53c-0.508,0.216-0.746,0.803-0.53,1.311
-		l1.172,2.762c0.162,0.381,0.532,0.61,0.921,0.61c0.13,0,0.263-0.026,0.39-0.08c0.508-0.216,0.746-0.803,0.53-1.311L39.907,50.781z"
-		/>
-	<path style="fill: #F0C419;" d="M21.014,9.829c0.13,0,0.263-0.026,0.39-0.08c0.508-0.216,0.746-0.803,0.53-1.311l-1.172-2.762
-		c-0.215-0.509-0.802-0.747-1.311-0.53c-0.508,0.216-0.746,0.803-0.53,1.311l1.172,2.762C20.254,9.6,20.625,9.829,21.014,9.829z"/>
-	<path style="fill: #F0C419;" d="M21.759,50.398c-0.511-0.205-1.095,0.04-1.302,0.553l-1.124,2.782
-		c-0.207,0.512,0.041,1.095,0.553,1.302c0.123,0.049,0.25,0.073,0.374,0.073c0.396,0,0.771-0.236,0.928-0.626l1.124-2.782
-		C22.519,51.188,22.271,50.605,21.759,50.398z"/>
-	<path style="fill: #F0C419;" d="M38.615,9.675c0.396,0,0.771-0.236,0.928-0.626l1.124-2.782c0.207-0.512-0.041-1.095-0.553-1.302
-		c-0.511-0.207-1.095,0.041-1.302,0.553L37.688,8.3c-0.207,0.512,0.041,1.095,0.553,1.302C38.364,9.651,38.491,9.675,38.615,9.675z"
-		/>
-</g>
-<circle style="fill: #F0C419;" cx="30" cy="30" r="20"/>
-<circle style="fill: #EDE21B;" cx="30" cy="30" r="15"/>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="19.168" height="19.187" viewBox="0 0 19.168 19.187">
+  <defs>
+    <linearGradient id="linear-gradient" x1="0.5" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
+      <stop offset="0" stop-color="#ffc69c"/>
+      <stop offset="1" stop-color="#ff8025"/>
+    </linearGradient>
+  </defs>
+  <g id="晴" transform="translate(-80.025 -89.6)">
+    <path id="路径_57108" data-name="路径 57108" d="M254.376,265.256m-5.736,0a5.736,5.736,0,1,0,5.736-5.736A5.736,5.736,0,0,0,248.64,265.256Z" transform="translate(-164.785 -166.06)" fill="url(#linear-gradient)"/>
+    <path id="路径_57109" data-name="路径 57109" d="M478.08,89.6m.727,0h0a.643.643,0,0,1,.727.727V91.7a.643.643,0,0,1-.727.727h0a.643.643,0,0,1-.727-.727V90.327A.643.643,0,0,1,478.807,89.6Z" transform="translate(-389.012)" fill="url(#linear-gradient)"/>
+    <path id="路径_57110" data-name="路径 57110" d="M704.873,192.422m.522.506h0a.643.643,0,0,1,.016,1.028l-.956.987a.643.643,0,0,1-1.028.016h0a.643.643,0,0,1-.016-1.028l.956-.987A.643.643,0,0,1,705.4,192.928Z" transform="translate(-608.981 -100.486)" fill="url(#linear-gradient)"/>
+    <path id="路径_57111" data-name="路径 57111" d="M802.1,475.633m.023.727h0a.643.643,0,0,1-.7.749l-1.373.043a.643.643,0,0,1-.749-.7h0a.643.643,0,0,1,.7-.749l1.373-.043A.643.643,0,0,1,802.126,476.36Z" transform="translate(-702.934 -377.263)" fill="url(#linear-gradient)"/>
+    <path id="路径_57112" data-name="路径 57112" d="M708,707.9m-.489.538h0a.643.643,0,0,1-1.027.048l-1.016-.925a.643.643,0,0,1-.048-1.027h0a.643.643,0,0,1,1.027-.048l1.016.925A.643.643,0,0,1,707.515,708.433Z" transform="translate(-610.964 -602.639)" fill="url(#linear-gradient)"/>
+    <path id="路径_57113" data-name="路径 57113" d="M483.03,812.431m-.726.046h0a.643.643,0,0,1-.771-.68l-.086-1.371a.643.643,0,0,1,.68-.771h0a.643.643,0,0,1,.771.68l.086,1.371A.643.643,0,0,1,482.3,812.477Z" transform="translate(-392.301 -703.694)" fill="url(#linear-gradient)"/>
+    <path id="路径_57114" data-name="路径 57114" d="M207.988,725.9m-.553-.472h0a.642.642,0,0,1-.08-1.025l.893-1.045a.643.643,0,0,1,1.025-.08h0a.643.643,0,0,1,.08,1.025l-.892,1.045A.643.643,0,0,1,207.436,725.429Z" transform="translate(-124.225 -619.07)" fill="url(#linear-gradient)"/>
+    <path id="路径_57115" data-name="路径 57115" d="M80.1,503.843m-.068-.724h0a.643.643,0,0,1,.656-.792l1.368-.129a.643.643,0,0,1,.792.656h0a.643.643,0,0,1-.656.792l-1.368.129A.643.643,0,0,1,80.03,503.119Z" transform="translate(0 -403.219)" fill="url(#linear-gradient)"/>
+    <path id="路径_57116" data-name="路径 57116" d="M157.32,227.821m.455-.567h0a.643.643,0,0,1,1.022-.112l1.072.859a.643.643,0,0,1,.112,1.022h0a.643.643,0,0,1-1.022.112l-1.072-.859A.643.643,0,0,1,157.775,227.254Z" transform="translate(-75.539 -134.219)" fill="url(#linear-gradient)"/>
+  </g>
 </svg>

+ 3 - 0
src/assets/icons/wind.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="19.168" height="12.848" viewBox="0 0 19.168 12.848">
+  <path id="风" d="M7.395,127.109a2.113,2.113,0,0,1,.17-.852A2.221,2.221,0,0,1,8.724,125.1a2.113,2.113,0,0,1,.852-.17,2.071,2.071,0,0,1,.835.17,2.221,2.221,0,0,1,1.159,1.159,2.194,2.194,0,0,1,0,1.7,2.092,2.092,0,0,1-.469.69,2.293,2.293,0,0,1-.69.46,2.071,2.071,0,0,1-.835.17h-.2a.456.456,0,0,1-.17-.034H1.073v-2.13H7.395Zm4.379,6.441a2.125,2.125,0,0,1,1.951,2.939,2,2,0,0,1-.452.665,2.3,2.3,0,0,1-.673.452,2.089,2.089,0,0,1-1.653,0,2.143,2.143,0,0,1-1.116-1.116,2.011,2.011,0,0,1-.17-.826v-.017H0v-2.13H11.739v.034h.034Zm4.737-6.458a2.538,2.538,0,0,1,1.031.213,2.658,2.658,0,0,1,.843.579,2.839,2.839,0,0,1,.571.852,2.538,2.538,0,0,1,.213,1.031,2.58,2.58,0,0,1-.213,1.048,2.69,2.69,0,0,1-1.414,1.414,2.538,2.538,0,0,1-1.031.213H0v-2.13H13.886a2.778,2.778,0,0,1-.051-.545,2.538,2.538,0,0,1,.213-1.031,2.839,2.839,0,0,1,.571-.852,2.658,2.658,0,0,1,.843-.579A2.58,2.58,0,0,1,16.51,127.092Z" transform="translate(0 -124.928)"/>
+</svg>

BIN
src/assets/images/border.png


BIN
src/assets/images/tab-1.png


BIN
src/assets/images/tab-2.png


+ 4 - 5
src/design/themify/default.less

@@ -47,8 +47,8 @@ html {
   --vent-configurable-home-light-border: #3df6ff;
 
   --vent-gas-list-item-bg-img: linear-gradient(to right, #39a3ff55, #3977e500);
-  --vent-gas-tab-bg: #10427a;
-  --vent-gas-tab-bg-avtived: #166ab5;
+  --vent-gas-tab-bg: #0f3656;
+  --vent-gas-tab-bg-avtived: #1e7890;
   --vent-gas-tab-border: #5590d8;
   --vent-gas-primary-text: #00c8d9;
   --vent-gas-primary-bg: #1673bf;
@@ -63,7 +63,6 @@ html {
   --vent-warn-tab-border: #166ab5;
   --vent-warn-tab-bg-actived: #209dfc;
 
-  --vent-balancePress-fan-bg-default: linear-gradient( to right, #071D3C22, #035EA266);
-  --vent-balancePress-fan-bg-select: linear-gradient(to right, #21A6CE99, #052d3d99);
-
+  --vent-balancePress-fan-bg-default: linear-gradient(to right, #071d3c22, #035ea266);
+  --vent-balancePress-fan-bg-select: linear-gradient(to right, #21a6ce99, #052d3d99);
 }

+ 299 - 0
src/layouts/default/header/components/weatherBroadcast.vue

@@ -0,0 +1,299 @@
+<template>
+  <div>
+    <div class="btn" @click="showWarningBroad">
+      <!-- <div>语音播报</div>
+    <a-badge :count="10">
+      <a href="#" class="head-example"></a>
+    </a-badge> -->
+      <div style="display: flex; flex-direction: row; justify-content: space-between" class="btn-header">
+        <img :src="parseWeatherData(weatherObj.text)" class="weather-icon" />
+        <span class="unit">{{ weatherObj.pressure }} Pa</span>
+        <FileSearchOutlined style="font-size: 18px; color: #fff; line-height: 50px" />
+      </div>
+    </div>
+    <div v-if="isShowWeatherBroad" class="broadcast" ref="VoiceBroadcastRef" id="VoiceBroadcast">
+      <div class="title">
+        <div class="message-title">详情</div>
+      </div>
+      <div class="broadcast-context">
+        <div class="context-tab">
+          <div class="context-tab-item" :class="{ 'context-tab-item-active': activeKey == 0 }" @click="toSelectList(0)"> 温度</div>
+          <div class="context-tab-item" :class="{ 'context-tab-item-active': activeKey == 1 }" @click="toSelectList(1)"> 气压</div>
+          <div class="context-tab-item" :class="{ 'context-tab-item-active': activeKey == 2 }" @click="toSelectList(2)"> 风力</div>
+        </div>
+        <div class="context-box">
+          <div class="echarts-box">
+            <BarAndLine
+              v-if="activeKey == 0"
+              xAxisPropType="fxTime"
+              height="240px"
+              :dataSource="monitorData"
+              :chartsColumns="ChartsColumnsWD"
+              :option="Option"
+            />
+            <BarAndLine
+              v-if="activeKey == 1"
+              xAxisPropType="fxTime"
+              height="240px"
+              :dataSource="monitorData"
+              :chartsColumns="ChartsColumnsQY"
+              :option="Option"
+            />
+            <BarAndLine
+              v-if="activeKey == 2"
+              xAxisPropType="fxTime"
+              height="240px"
+              :dataSource="monitorData"
+              :chartsColumns="ChartsColumnsFL"
+              :option="Option"
+            />
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script lang="ts">
+import BarAndLine from '/@/components/chart/BarAndLine.vue';
+import { Tooltip, Badge } from 'ant-design-vue';
+import { SoundOutlined, ClearOutlined, FileSearchOutlined, WarningOutlined } from '@ant-design/icons-vue';
+import Icon from '/@/components/Icon';
+import { defineComponent, ref, onMounted, nextTick } from 'vue';
+import { defHttp } from '/@/utils/http/axios';
+import { useDrag } from '@/hooks/event/useDrag';
+
+export default defineComponent({
+  name: 'VoiceBroadcast',
+  components: { Icon, Tooltip, Badge, SoundOutlined, ClearOutlined, FileSearchOutlined, WarningOutlined, BarAndLine },
+
+  setup() {
+    const getWeather = () => defHttp.post({ url: '/safety/ventanalyDevice/getWeatherData' });
+    const activeKey = ref(0);
+    const isShowWeatherBroad = ref(false);
+    const monitorData = ref<any[]>([]);
+
+    const ChartsColumnsWD = [
+      {
+        legend: '温度',
+        seriesName: '(℃)',
+        ymax: 0.8,
+        yname: '℃',
+        linetype: 'line',
+        yaxispos: 'left',
+        color: '#00FFA8',
+        sort: 1,
+        xRotate: 0,
+        dataIndex: 'temp',
+      },
+    ];
+    const ChartsColumnsQY = [
+      {
+        legend: '气压',
+        seriesName: '(Pa)',
+        ymax: 0.8,
+        yname: 'Pa',
+        linetype: 'line',
+        yaxispos: 'left',
+        color: '#00FFA8',
+        sort: 1,
+        xRotate: 0,
+        dataIndex: 'pressure',
+      },
+    ];
+    const ChartsColumnsFL = [
+      {
+        legend: '风力',
+        seriesName: '(等级)',
+        ymax: 0.8,
+        yname: '等级',
+        linetype: 'line',
+        yaxispos: 'left',
+        color: '#00FFA8',
+        sort: 1,
+        xRotate: 0,
+        dataIndex: 'widnScale',
+      },
+    ];
+
+    const Option = {
+      grid: {
+        top: '20%',
+        left: '5%',
+        right: '5%',
+        bottom: '3%',
+        containLabel: true,
+      },
+      toolbox: {
+        feature: null,
+      },
+    };
+    const weatherObj = ref({
+      cloud: '',
+      dew: '',
+      fxTime: '',
+      humidity: '',
+      icon: '',
+      pop: '',
+      precip: '',
+      pressure: '',
+      temp: '',
+      text: '',
+      wind360: '',
+      windDir: '',
+      windScale: '',
+      windSpeed: '',
+    });
+
+    const iconMap = {
+      晴: new URL('/src/assets/icons/sun.svg', import.meta.url).href,
+      雨: new URL('/src/assets/icons/rain.svg', import.meta.url).href,
+      雪: new URL('/src/assets/icons/snow.svg', import.meta.url).href,
+      多云: new URL('/src/assets/icons/clound.svg', import.meta.url).href,
+      风: new URL('/src/assets/icons/wind.svg', import.meta.url).href,
+    };
+
+    function parseWeatherData(res) {
+      return iconMap[res] || new URL('/src/assets/icons/sun.svg', import.meta.url).href;
+    }
+    function showWarningBroad() {
+      isShowWeatherBroad.value = !isShowWeatherBroad.value;
+      if (isShowWeatherBroad.value) {
+        toSelectList(0);
+
+        nextTick(() => {
+          const dom = document.getElementById('VoiceBroadcast');
+          if (dom) useDrag(dom);
+        });
+      }
+    }
+    async function toSelectList(key) {
+      activeKey.value = key;
+    }
+    async function getWeatherInfo() {
+      const res = await getWeather();
+
+      weatherObj.value = JSON.parse(res.weatherDataNow);
+      monitorData.value = JSON.parse(res.weatherData);
+    }
+    onMounted(() => {
+      nextTick(async () => {
+        await getWeatherInfo();
+      });
+    });
+
+    return {
+      showWarningBroad,
+      isShowWeatherBroad,
+      activeKey,
+      weatherObj,
+      parseWeatherData,
+      toSelectList,
+      monitorData,
+      ChartsColumnsWD,
+      ChartsColumnsQY,
+      ChartsColumnsFL,
+      Option,
+    };
+  },
+});
+</script>
+<style lang="less" scoped>
+.unit {
+  font-size: 15px;
+  line-height: 47px;
+  color: #fff;
+}
+.btn {
+  line-height: 30px;
+  cursor: pointer;
+  display: flex;
+}
+.btn-header {
+  width: 130px;
+  height: 50px;
+}
+.weather-icon {
+  width: 20px;
+  height: 20px;
+  margin-top: 14px;
+  margin-right: 10px;
+}
+.broadcast {
+  width: 500px;
+  height: 350px;
+  border-radius: 4px;
+  position: fixed;
+  top: 50px;
+  right: 20px;
+  background-color: rgb(255, 255, 255);
+  background: url('../../../../assets/images/warn-dialog-bg.png') no-repeat center;
+  background-size: 100% 100%;
+  z-index: 9999999;
+  color: #fff;
+
+  .title {
+    text-align: center;
+    padding: 0 20px;
+
+    :deep(.ant-badge:not(.ant-badge-status)) {
+      margin-right: 40px !important;
+    }
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    .message-title {
+      font-size: 16px;
+      color: #fff;
+      font-weight: 600;
+      line-height: 50px;
+      flex: 1;
+    }
+    .badge-box {
+      display: flex;
+      align-items: center;
+      padding-top: 10px;
+      .badge-title {
+        display: inline-block;
+        width: 62px;
+        line-height: 32px;
+        background-color: #2174f0;
+        border-radius: 26px;
+        text-align: center;
+        color: #fff;
+        padding-bottom: 2px;
+      }
+    }
+  }
+
+  .broadcast-context {
+    .context-tab {
+      display: flex;
+      .context-tab-item {
+        line-height: 24px;
+        background: url('../../../../assets/images/tab-1.png') no-repeat center;
+        border-radius: 24px;
+        text-align: center;
+        color: #fff;
+        cursor: pointer;
+        font-size: 14px;
+        width: 80px;
+      }
+      .context-tab-item-active {
+        background: url('../../../../assets/images/tab-2.png') no-repeat center;
+      }
+    }
+    .context-box {
+      width: 100%;
+      height: calc(100% - 32px);
+      .echarts-box {
+        width: 100%;
+        height: 500px;
+      }
+    }
+  }
+}
+:deep(.zxm-badge-count) {
+  width: 0px;
+  height: 0px;
+}
+</style>

+ 250 - 247
src/layouts/default/header/index.vue

@@ -56,7 +56,8 @@
   </Header>
   <div :class="`${prefixCls}-action`" style="position: fixed; top: 30px; right: 20px; z-index: 999999">
     <div class="right-position">
-      <!-- 公司端不显示语音播报功能 -->
+      <!-- 公司端不显示语音播报功能 weatherBroadcast.vue-->
+      <WeatherBroadcast v-if="sysOrgCode != 'sdmtjtgsd'" />
       <VoiceBroadcast v-if="sysOrgCode != 'sdmtjtgsd'" />
       <VoiceBroadcastGsd v-if="sysOrgCode == 'sdmtjtgsd'" />
       <UserDropDown v-if="showUserDropdown" :theme="getHeaderTheme" />
@@ -65,267 +66,269 @@
   </div>
 </template>
 <script lang="ts">
-  import { defineComponent, unref, computed, ref, onMounted, toRaw } from 'vue';
-  import { useGlobSetting } from '/@/hooks/setting';
-  import { propTypes } from '/@/utils/propTypes';
-
-  import { Layout } from 'ant-design-vue';
-  import { AppLogo } from '/@/components/Application';
-  import LayoutMenu from '../menu/index.vue';
-  import LayoutTrigger from '../trigger/index.vue';
-
-  import { AppSearch } from '/@/components/Application';
-
-  import { useHeaderSetting } from '/@/hooks/setting/useHeaderSetting';
-  import { useMenuSetting } from '/@/hooks/setting/useMenuSetting';
-  import { useRootSetting } from '/@/hooks/setting/useRootSetting';
-
-  import { MenuModeEnum, MenuSplitTyeEnum } from '/@/enums/menuEnum';
-  import { SettingButtonPositionEnum } from '/@/enums/appEnum';
-  import { AppLocalePicker } from '/@/components/Application';
-
-  import { UserDropDown, LayoutBreadcrumb, FullScreen, Notify, ErrorAction, LockScreen } from './components';
-  import { useAppInject } from '/@/hooks/web/useAppInject';
-  import { useDesign } from '/@/hooks/web/useDesign';
-
-  import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent';
-  import { useLocale } from '/@/locales/useLocale';
-
-  import VoiceBroadcast from './components/VoiceBroadcast.vue';
-  import VoiceBroadcastGsd from './components/VoiceBroadcastGsd.vue';
-
-  import LoginSelect from '/@/views/sys/login/LoginSelect.vue';
-  import { useUserStore } from '/@/store/modules/user';
-  import { useRouter } from 'vue-router';
-
-  import { noHeadeLink } from '../layout.data';
-
-  export default defineComponent({
-    name: 'LayoutHeader',
-    components: {
-      Header: Layout.Header,
-      AppLogo,
-      LayoutTrigger,
-      LayoutBreadcrumb,
-      LayoutMenu,
-      UserDropDown,
-      AppLocalePicker,
-      FullScreen,
-      Notify,
-      AppSearch,
-      ErrorAction,
-      LockScreen,
-      LoginSelect,
-      VoiceBroadcast,
-      VoiceBroadcastGsd,
-      SettingDrawer: createAsyncComponent(() => import('/@/layouts/default/setting/index.vue'), {
-        loading: true,
-      }),
-    },
-    props: {
-      fixed: propTypes.bool,
-    },
-    setup(props) {
-      const { prefixCls } = useDesign('layout-header');
-      const userStore = useUserStore();
-      const { currentRoute } = useRouter();
-      console.log(currentRoute);
-
-      const { getShowTopMenu, getShowHeaderTrigger, getSplit, getIsMixMode, getMenuWidth, getIsMixSidebar } = useMenuSetting();
-      const { getUseErrorHandle, getShowSettingButton, getSettingButtonPosition } = useRootSetting();
-      const { title, sysOrgCode, homePath } = useGlobSetting();
-      const {
-        getHeaderTheme,
-        getShowFullScreen,
-        getShowNotice,
-        getShowContent,
-        getShowBread,
-        getShowHeaderLogo,
-        getShowHeader,
-        getShowSearch,
-        getUseLockPage,
-        getShowBreadTitle,
-        getShowFullHeaderRef,
-      } = useHeaderSetting();
-
-      const { getShowLocalePicker } = useLocale();
-
-      const { getIsMobile } = useAppInject();
-
-      const getHeaderClass = computed(() => {
-        const theme = unref(getHeaderTheme);
-        return [
-          prefixCls,
-          {
-            [`${prefixCls}--fixed`]: props.fixed,
-            [`${prefixCls}--mobile`]: unref(getIsMobile),
-            [`${prefixCls}--${theme}`]: theme,
-          },
-        ];
-      });
-
-      const getShowFullHeader = computed(() => {
-        const route = unref(currentRoute);
-        return getShowFullHeaderRef && route.path.startsWith('/micro-');
-      });
-
-      const getShowSetting = computed(() => {
-        if (!unref(getShowSettingButton)) {
-          return false;
-        }
-        const settingButtonPosition = unref(getSettingButtonPosition);
-
-        if (settingButtonPosition === SettingButtonPositionEnum.AUTO) {
-          return unref(getShowHeader);
-        }
-        return settingButtonPosition === SettingButtonPositionEnum.HEADER;
-      });
-
-      const getLogoWidth = computed(() => {
-        if (!unref(getIsMixMode) || unref(getIsMobile)) {
-          return {};
-        }
-        const width = unref(getMenuWidth) < 180 ? 180 : unref(getMenuWidth);
-        return { width: `${width}px` };
-      });
-
-      const getSplitType = computed(() => {
-        return unref(getSplit) ? MenuSplitTyeEnum.TOP : MenuSplitTyeEnum.NONE;
-      });
-
-      const getMenuMode = computed(() => {
-        return unref(getSplit) ? MenuModeEnum.HORIZONTAL : null;
-      });
-
-      // /**
-      //  * 首页多租户部门弹窗逻辑
-      //  */
-      const loginSelectRef = ref();
-
-      function showLoginSelect() {
-        //update-begin---author:liusq  Date:20220101  for:判断登录进来是否需要弹窗选择租户----
-        //判断是否是登陆进来
-        const loginInfo = toRaw(userStore.getLoginInfo) || {};
-        if (!!loginInfo.isLogin) {
-          loginSelectRef.value.show(loginInfo);
-        }
-        //update-end---author:liusq  Date:20220101  for:判断登录进来是否需要弹窗选择租户----
+import { defineComponent, unref, computed, ref, onMounted, toRaw } from 'vue';
+import { useGlobSetting } from '/@/hooks/setting';
+import { propTypes } from '/@/utils/propTypes';
+
+import { Layout } from 'ant-design-vue';
+import { AppLogo } from '/@/components/Application';
+import LayoutMenu from '../menu/index.vue';
+import LayoutTrigger from '../trigger/index.vue';
+
+import { AppSearch } from '/@/components/Application';
+
+import { useHeaderSetting } from '/@/hooks/setting/useHeaderSetting';
+import { useMenuSetting } from '/@/hooks/setting/useMenuSetting';
+import { useRootSetting } from '/@/hooks/setting/useRootSetting';
+
+import { MenuModeEnum, MenuSplitTyeEnum } from '/@/enums/menuEnum';
+import { SettingButtonPositionEnum } from '/@/enums/appEnum';
+import { AppLocalePicker } from '/@/components/Application';
+
+import { UserDropDown, LayoutBreadcrumb, FullScreen, Notify, ErrorAction, LockScreen } from './components';
+import { useAppInject } from '/@/hooks/web/useAppInject';
+import { useDesign } from '/@/hooks/web/useDesign';
+
+import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent';
+import { useLocale } from '/@/locales/useLocale';
+
+import WeatherBroadcast from './components/weatherBroadcast.vue';
+import VoiceBroadcast from './components/VoiceBroadcast.vue';
+import VoiceBroadcastGsd from './components/VoiceBroadcastGsd.vue';
+
+import LoginSelect from '/@/views/sys/login/LoginSelect.vue';
+import { useUserStore } from '/@/store/modules/user';
+import { useRouter } from 'vue-router';
+
+import { noHeadeLink } from '../layout.data';
+
+export default defineComponent({
+  name: 'LayoutHeader',
+  components: {
+    Header: Layout.Header,
+    AppLogo,
+    LayoutTrigger,
+    LayoutBreadcrumb,
+    LayoutMenu,
+    UserDropDown,
+    AppLocalePicker,
+    FullScreen,
+    Notify,
+    AppSearch,
+    ErrorAction,
+    LockScreen,
+    LoginSelect,
+    VoiceBroadcast,
+    VoiceBroadcastGsd,
+    WeatherBroadcast,
+    SettingDrawer: createAsyncComponent(() => import('/@/layouts/default/setting/index.vue'), {
+      loading: true,
+    }),
+  },
+  props: {
+    fixed: propTypes.bool,
+  },
+  setup(props) {
+    const { prefixCls } = useDesign('layout-header');
+    const userStore = useUserStore();
+    const { currentRoute } = useRouter();
+    console.log(currentRoute);
+
+    const { getShowTopMenu, getShowHeaderTrigger, getSplit, getIsMixMode, getMenuWidth, getIsMixSidebar } = useMenuSetting();
+    const { getUseErrorHandle, getShowSettingButton, getSettingButtonPosition } = useRootSetting();
+    const { title, sysOrgCode, homePath } = useGlobSetting();
+    const {
+      getHeaderTheme,
+      getShowFullScreen,
+      getShowNotice,
+      getShowContent,
+      getShowBread,
+      getShowHeaderLogo,
+      getShowHeader,
+      getShowSearch,
+      getUseLockPage,
+      getShowBreadTitle,
+      getShowFullHeaderRef,
+    } = useHeaderSetting();
+
+    const { getShowLocalePicker } = useLocale();
+
+    const { getIsMobile } = useAppInject();
+
+    const getHeaderClass = computed(() => {
+      const theme = unref(getHeaderTheme);
+      return [
+        prefixCls,
+        {
+          [`${prefixCls}--fixed`]: props.fixed,
+          [`${prefixCls}--mobile`]: unref(getIsMobile),
+          [`${prefixCls}--${theme}`]: theme,
+        },
+      ];
+    });
+
+    const getShowFullHeader = computed(() => {
+      const route = unref(currentRoute);
+      return getShowFullHeaderRef && route.path.startsWith('/micro-');
+    });
+
+    const getShowSetting = computed(() => {
+      if (!unref(getShowSettingButton)) {
+        return false;
       }
+      const settingButtonPosition = unref(getSettingButtonPosition);
 
-      function loginSelectOk() {
-        console.log('成功。。。。。');
+      if (settingButtonPosition === SettingButtonPositionEnum.AUTO) {
+        return unref(getShowHeader);
       }
+      return settingButtonPosition === SettingButtonPositionEnum.HEADER;
+    });
 
-      // 用户下拉框应该在以下情况中隐藏:
-      // 1. 本页面是由其他页面的 iframe 嵌入的页面
-      const showUserDropdown = computed(() => {
-        return window.self === window.top;
-      });
+    const getLogoWidth = computed(() => {
+      if (!unref(getIsMixMode) || unref(getIsMobile)) {
+        return {};
+      }
+      const width = unref(getMenuWidth) < 180 ? 180 : unref(getMenuWidth);
+      return { width: `${width}px` };
+    });
+
+    const getSplitType = computed(() => {
+      return unref(getSplit) ? MenuSplitTyeEnum.TOP : MenuSplitTyeEnum.NONE;
+    });
+
+    const getMenuMode = computed(() => {
+      return unref(getSplit) ? MenuModeEnum.HORIZONTAL : null;
+    });
+
+    // /**
+    //  * 首页多租户部门弹窗逻辑
+    //  */
+    const loginSelectRef = ref();
+
+    function showLoginSelect() {
+      //update-begin---author:liusq  Date:20220101  for:判断登录进来是否需要弹窗选择租户----
+      //判断是否是登陆进来
+      const loginInfo = toRaw(userStore.getLoginInfo) || {};
+      if (!!loginInfo.isLogin) {
+        loginSelectRef.value.show(loginInfo);
+      }
+      //update-end---author:liusq  Date:20220101  for:判断登录进来是否需要弹窗选择租户----
+    }
 
-      onMounted(() => {
-        showLoginSelect();
-      });
+    function loginSelectOk() {
+      console.log('成功。。。。。');
+    }
 
-      return {
-        prefixCls,
-        getHeaderClass,
-        getShowHeaderLogo,
-        getHeaderTheme,
-        getShowHeaderTrigger,
-        getIsMobile,
-        getShowBreadTitle,
-        getShowBread,
-        getShowContent,
-        getSplitType,
-        getSplit,
-        getMenuMode,
-        getShowTopMenu,
-        getShowLocalePicker,
-        getShowFullScreen,
-        getShowNotice,
-        getUseErrorHandle,
-        getLogoWidth,
-        getIsMixSidebar,
-        getShowSettingButton,
-        getShowSetting,
-        getShowSearch,
-        getUseLockPage,
-        loginSelectOk,
-        loginSelectRef,
-        currentRoute,
-        title,
-        getShowFullHeader,
-        noHeadeLink,
-        showUserDropdown,
-        sysOrgCode,
-        homePath,
-      };
-    },
-  });
+    // 用户下拉框应该在以下情况中隐藏:
+    // 1. 本页面是由其他页面的 iframe 嵌入的页面
+    const showUserDropdown = computed(() => {
+      return window.self === window.top;
+    });
+
+    onMounted(() => {
+      showLoginSelect();
+    });
+
+    return {
+      prefixCls,
+      getHeaderClass,
+      getShowHeaderLogo,
+      getHeaderTheme,
+      getShowHeaderTrigger,
+      getIsMobile,
+      getShowBreadTitle,
+      getShowBread,
+      getShowContent,
+      getSplitType,
+      getSplit,
+      getMenuMode,
+      getShowTopMenu,
+      getShowLocalePicker,
+      getShowFullScreen,
+      getShowNotice,
+      getUseErrorHandle,
+      getLogoWidth,
+      getIsMixSidebar,
+      getShowSettingButton,
+      getShowSetting,
+      getShowSearch,
+      getUseLockPage,
+      loginSelectOk,
+      loginSelectRef,
+      currentRoute,
+      title,
+      getShowFullHeader,
+      noHeadeLink,
+      showUserDropdown,
+      sysOrgCode,
+      homePath,
+    };
+  },
+});
 </script>
 <style lang="less">
-  @import './index.less';
-  //update-begin---author:scott ---date:2022-09-30  for:默认隐藏顶部菜单面包屑-----------
-  //顶部欢迎语展示样式
-  @prefix-cls: ~'@{namespace}-layout-header';
-
-  .@{prefix-cls} {
-    display: flex;
-    padding: 0 8px;
-    // align-items: center;
+@import './index.less';
+//update-begin---author:scott ---date:2022-09-30  for:默认隐藏顶部菜单面包屑-----------
+//顶部欢迎语展示样式
+@prefix-cls: ~'@{namespace}-layout-header';
+
+.@{prefix-cls} {
+  display: flex;
+  padding: 0 8px;
+  // align-items: center;
+
+  .headerIntroductionClass {
+    margin-right: 4px;
+    margin-bottom: 2px;
+    border-bottom: 0px;
+    border-left: 0px;
+  }
 
+  &--light {
     .headerIntroductionClass {
-      margin-right: 4px;
-      margin-bottom: 2px;
-      border-bottom: 0px;
-      border-left: 0px;
+      color: @breadcrumb-item-normal-color;
     }
+  }
 
-    &--light {
-      .headerIntroductionClass {
-        color: @breadcrumb-item-normal-color;
-      }
+  &--dark {
+    .headerIntroductionClass {
+      color: rgba(255, 255, 255, 0.6);
     }
 
-    &--dark {
-      .headerIntroductionClass {
-        color: rgba(255, 255, 255, 0.6);
-      }
-
-      .anticon {
-        color: rgba(255, 255, 255, 0.8);
-      }
+    .anticon {
+      color: rgba(255, 255, 255, 0.8);
     }
-
-    //update-end---author:scott ---date::2022-09-30  for:默认隐藏顶部菜单面包屑--------------
   }
 
-  // background: linear-gradient(#003f77, #0a134c);
-  //   // background: linear-gradient(#02050c 0%, #03114c 100%);
-  //   // border: none;
-  //   border-bottom: 1px solid #81aabf01;
-  //   padding-bottom: 2px;
-  //   box-shadow: 0 0 20px #44caff55 inset;
-  .normal-header {
-    height: 52px !important;
-    line-height: 52px !important;
-    background: var(--vent-header-bg-color) !important;
-    // background: linear-gradient(#005177,#0a344c) !important;
-    border-bottom: 1px solid #81aabf01 !important;
-    padding-bottom: 2px !important;
-    box-shadow: 0 0 20px #44caff55 inset !important;
-    padding: 0 8px !important;
-  }
-
-  .no-header {
-    height: 0px !important;
-    display: none !important;
-  }
-
-  .header-nav-title {
-    background-image: linear-gradient(#ffffff 50%, #60f4ff);
-    -webkit-background-clip: text;
-    color: transparent;
-    font-weight: 600;
-  }
+  //update-end---author:scott ---date::2022-09-30  for:默认隐藏顶部菜单面包屑--------------
+}
+
+// background: linear-gradient(#003f77, #0a134c);
+//   // background: linear-gradient(#02050c 0%, #03114c 100%);
+//   // border: none;
+//   border-bottom: 1px solid #81aabf01;
+//   padding-bottom: 2px;
+//   box-shadow: 0 0 20px #44caff55 inset;
+.normal-header {
+  height: 52px !important;
+  line-height: 52px !important;
+  background: var(--vent-header-bg-color) !important;
+  // background: linear-gradient(#005177,#0a344c) !important;
+  border-bottom: 1px solid #81aabf01 !important;
+  padding-bottom: 2px !important;
+  box-shadow: 0 0 20px #44caff55 inset !important;
+  padding: 0 8px !important;
+}
+
+.no-header {
+  height: 0px !important;
+  display: none !important;
+}
+
+.header-nav-title {
+  background-image: linear-gradient(#ffffff 50%, #60f4ff);
+  -webkit-background-clip: text;
+  color: transparent;
+  font-weight: 600;
+}
 </style>

+ 1 - 1
src/views/vent/gas/components/tab/baseTab.vue

@@ -3,7 +3,7 @@
     <div
       v-for="tab in tabs"
       :key="tab.id"
-      class="flex-1 cursor-pointer pt-5px pb-5px"
+      class="flex-1 cursor-pointer pt-1px pb-1px"
       :class="{ tabs_pane_actived: id === tab.id }"
       @click="clickHandler(tab.id)"
     >

+ 3 - 0
src/views/vent/gas/gasInspect/index.vue

@@ -261,10 +261,13 @@ let getupload = () => {
 async function handlerComfirm(param) {
     if (modalType.value == 'upload') {
         let res = await importByExcel(param)
+        console.log(res,'999===')
         if (res.code == 200) {
             visibleUploadorDown.value = false
             message.success('导入成功')
             queryByIdList()
+        }else {
+             message.warning(res.message)
         }
     } else {
         let res = await exportGasByExcel({ insType: param.insType })

+ 7 - 3
src/views/vent/monitorManager/balancePressMonitor/components/balancePressHome2.vue

@@ -64,8 +64,6 @@
 
     const result = Array.from(res.msgTxt).reduce(
       (obj: any, e: any) => {
-        obj[e.type] = e;
-
         // if (true) {
         if (sysOrgCode === 'sdmtjtswmk') {
           if (e.type.startsWith('fanlocal')) {
@@ -84,8 +82,15 @@
               }
             });
           }
+          if (e.type.startsWith('avgpressure_lowoxygen')) {
+            e.datalist.forEach((ele) => {
+              ele.strinstallpos = ele.strinstallpos.replaceAll(' ', '');
+              ele.strname = ele.strname.replaceAll(' ', '');
+            });
+          }
         }
 
+        obj[e.type] = e;
         return obj;
       },
       {
@@ -100,7 +105,6 @@
         others: { datalist: [] },
       }
     );
-
     return result;
   }
 

+ 29 - 21
src/views/vent/monitorManager/comment/HistoryTable.vue

@@ -40,7 +40,7 @@
         }"
         :data-source="dataSource"
         height="290px"
-        x-axis-prop-type="ttime"
+        :x-axis-prop-type="stationType !== 'redis' ? 'ttime' : 'time'"
       />
     </div>
   </div>
@@ -207,22 +207,6 @@
     } else {
       columns.value = column;
     }
-    if (props.showHistoryCurve) {
-      const arr = type.split('_');
-      // 没错,又是安全监控。安全监控的单位无法一次定好,所以根据返回的数据协定单位
-      if (props.deviceType.startsWith('safetymonitor')) {
-        chartsColumns.value = getTableHeaderColumns(arr[0] + '_chart').map((e) => {
-          const unit = get(selectedOption.value, 'readData.unit', e.unit);
-          return {
-            ...e,
-            unit: unit,
-            seriesName: unit,
-          };
-        });
-      } else {
-        chartsColumns.value = getTableHeaderColumns(arr[0] + '_chart');
-      }
-    }
     setColumns(columns.value);
   });
 
@@ -247,6 +231,24 @@
     return findDict(dtns);
   }
 
+  function initHistoryCurveColumns() {
+    if (!props.showHistoryCurve) return;
+    const arr = historyType.value.split('_');
+    // 没错,又是安全监控。安全监控的单位无法一次定好,所以根据返回的数据协定单位
+    if (props.deviceType.startsWith('safetymonitor')) {
+      chartsColumns.value = getTableHeaderColumns(arr[0] + '_chart').map((e) => {
+        const unit = get(selectedOption.value, 'readData.unit', e.unit);
+        return {
+          ...e,
+          unit: unit,
+          seriesName: unit,
+        };
+      });
+    } else {
+      chartsColumns.value = getTableHeaderColumns(arr[0] + '_chart');
+    }
+  }
+
   const tableScroll = computed(() => {
     if (props.scroll.y && showCurve.value) return { y: props.scroll.y - 450 };
     if (props.scroll.y) return { y: props.scroll.y - 100 };
@@ -319,12 +321,17 @@
       });
 
       stationType.value = deviceOptions.value[0]['stationtype'];
-      showCurve.value = calcShowCurveValue();
       if (props.deviceType.startsWith('vehicle')) {
         historyType.value = 'vehicle';
       } else {
         historyType.value = deviceOptions.value[0]['strtype'] || deviceOptions.value[0]['devicekind'];
       }
+
+      /** 此处使用nextTick是由于可能表单暂未更新,而下面的方法依赖表单项 */
+      nextTick(() => {
+        showCurve.value = calcShowCurveValue();
+        initHistoryCurveColumns();
+      });
     }
     if (VENT_PARAM.historyIsMultiple) {
       await getForm().setFieldsValue({
@@ -481,9 +488,10 @@
                         deviceTypeStr.value = option['strtype'];
                       }
                       stationType.value = option['stationtype'];
-                      showCurve.value = calcShowCurveValue();
-                      nextTick(async () => {
-                        await getDataSource();
+                      nextTick(() => {
+                        showCurve.value = calcShowCurveValue();
+                        initHistoryCurveColumns();
+                        getDataSource();
                       });
                     },
                   },

+ 102 - 65
src/views/vent/safetyList/common/detail-130.vue

@@ -33,9 +33,8 @@
                   'card-item',
                   {
                     selected: selectedIndex === index,
-                    'card-itemN': item.isNewAccess,
-                    'card-itemL': !item.isNewAccess && item.linkstatus,
-                    'card-itemD': !item.isNewAccess && !item.linkstatus,
+                    'card-itemL': item.linkstatus,
+                    'card-itemD': !item.linkstatus,
                   },
                 ]" @click="cardClick(item, index)">
                   <div class="card-item-label">{{ item.strname }}</div>
@@ -153,7 +152,8 @@
         <div class="detail-content" v-if="activeKey == 'manageAuto'">
 
           <a-table size="small" :scroll="{ y: 710 }" :row-key="(record) => record.stationId"
-            :expandedRowKeys="expandedRowKeys" :columns="columnsDetail" :data-source="tableData1" @expand="tableExpand">
+            :expandedRowKeys="expandedRowKeys" :columns="columnsDetail130" :data-source="tableData1"
+            @expand="tableExpand">
 
             <template #bodyCell="{ column, text }"></template>
             <template #expandedRowRender="{ record }">
@@ -217,6 +217,10 @@
                 </a-select>
                 <a-button type="success" @click="getDeviceList">读取</a-button>
               </a-form-item> -->
+              <a-form-item label="地址:">
+                <a-input v-model:value="formEdit.dz" placeholder="请输入" style="width: 260px; margin-right: 10px" />
+                <a-button class="down-btn" type="primary" @click="handleClick('地址')">下发</a-button>
+              </a-form-item>
               <a-form-item label="探头距离:">
                 <a-input v-model:value="formEdit.ttjl" placeholder="请输入" style="width: 260px; margin-right: 10px" />
                 <a-button class="down-btn" type="primary" @click="handleClick('探头距离')">下发</a-button>
@@ -302,10 +306,6 @@
                   style="width: 260px; margin-right: 10px" />
                 <a-button class="down-btn" type="primary" @click="handleClick('第一路485波特率')">下发</a-button>
               </a-form-item>
-              <a-form-item label="保存密码:">
-                <a-input v-model:value="formEdit.bcmm" placeholder="请输入" style="width: 260px; margin-right: 10px" />
-                <a-button class="down-btn" type="primary" @click="handleClick('保存密码')">下发</a-button>
-              </a-form-item>
               <a-form-item label="复位:">
                 <a-input v-model:value="formEdit.fw" placeholder="请输入" style="width: 260px; margin-right: 10px" />
                 <a-button class="down-btn" type="primary" @click="handleClick('复位')">下发</a-button>
@@ -314,12 +314,24 @@
                 <a-input v-model:value="formEdit.range" placeholder="请输入" style="width: 260px; margin-right: 10px" />
                 <a-button class="down-btn" type="primary" @click="handleClick('浮动范围')">下发</a-button>
               </a-form-item>
+              <a-form-item label="测试模式:">
+                <a-select ref="select" v-model:value="formEdit.csms" placeholder="请选择..."
+                  style="width: 260px; margin-right: 10px">
+                  <a-select-option v-for="(item, index) in optionList" :key="index" :value="item.value">{{ item.label
+                  }}</a-select-option>
+                </a-select>
+                <a-button class="down-btn" type="primary" @click="handleClick('测试模式')">下发</a-button>
+              </a-form-item>
               <a-form-item label="测试风速:">
                 <a-input v-model:value="formEdit.csfs" placeholder="请输入" style="width: 260px; margin-right: 10px" />
                 <a-button class="down-btn" type="primary" @click="handleClick('测试风速')">下发</a-button>
               </a-form-item>
               <a-form-item label="测试风向:">
-                <a-input v-model:value="formEdit.csfx" placeholder="请输入" style="width: 260px; margin-right: 10px" />
+                <a-select ref="select" v-model:value="formEdit.csfx" placeholder="请选择..."
+                  style="width: 260px; margin-right: 10px">
+                  <a-select-option v-for="(item, index) in optionList1" :key="index" :value="item.value">{{ item.label
+                  }}</a-select-option>
+                </a-select>
                 <a-button class="down-btn" type="primary" @click="handleClick('测试风向')">下发</a-button>
               </a-form-item>
             </a-form>
@@ -365,7 +377,7 @@ import {
   //   remove158Device
 } from '../safetyList.api';
 
-import { columnsDetail, columns, deviceColumns130 } from '../safetyList.data';
+import { columnsDetail130, columns, deviceColumns130, optionList, optionList1, derictList, pagination } from '../safetyList.data';
 
 import customHeader from '/@/components/vent/customHeader.vue';
 import operateRecord from './operateRecord.vue'
@@ -391,19 +403,13 @@ let openNum = ref(0);
 let clsoeNum = ref(0);
 let tableData = ref<any[]>([]);
 let tableData1 = ref<any[]>([]);
-//分页参数配置
-let pagination = reactive({
-  current: 1, // 当前页码
-  pageSize: 20, // 每页显示条数
-  total: 0, // 总条目数,后端返回
-  // showTotal: (total, range) => `${range[0]}-${range[1]} 条,总共 ${total} 条`, // 分页右下角显示信息
-  showSizeChanger: true, // 是否可改变每页显示条数
-  pageSizeOptions: ['10', '20', '30', '40', '50', '100'], // 可选的每页显示条数
-});
+
 let visibleModalEdit = ref(false);
 let visibleModalEdit1 = ref(false);
 let formEdit = reactive({
   id: '',
+  dz: '',
+  csms: '',
   ttjl: '',
   jxjl: '',
   jd: '',
@@ -425,7 +431,6 @@ let formEdit = reactive({
   dbjyz: '',
   bjsn: '',
   dyl485btl: '',
-  bcmm: '',
   fw: '',
   range: '',
   csfs: '',
@@ -464,10 +469,7 @@ let visibleModalDebug = ref(false);
 let debugFlag = ref('');
 let debugStationId = ref('');
 let debugDeviceId = ref('');
-let derictList = reactive<any[]>([
-  { label: '正向', value: '0' },
-  { label: '反向', value: '1' },
-]);
+
 let devStationId = ref('');
 let stationId = ref('');
 
@@ -476,8 +478,9 @@ let visibleModalDebugEnd = ref(false);
 let startupDataDebugEnd = reactive({
   pwd: '',
 });
-
 let operationData = ref<any[]>([])//操作记录列表
+
+
 //定时刷新左侧分站数据
 let timer: null | NodeJS.Timeout = null;
 function getMonitor(flag = false) {
@@ -557,7 +560,7 @@ async function onChangeTab(tab) {
   activeKey.value = tab;
   stationId.value = ''
   clearTimeout(timer);
-  timer = undefined
+  clearTimeout(timer3)
   if (activeKey.value == 'device') {
     // await getSubStationList();
     // await getStationList1();
@@ -570,10 +573,12 @@ async function onChangeTab(tab) {
   }
 }
 
-//弹窗关闭
+//弹窗关闭清空数据
 function cancenModal() {
-  clearTimeout(timer2)
+  // clearTimeout(timer2)
   formEdit.id = ''
+  formEdit.dz = ''
+  formEdit.csms = ''
   formEdit.ttjl = ''
   formEdit.jxjl = ''
   formEdit.jd = ''
@@ -595,7 +600,6 @@ function cancenModal() {
   formEdit.dbjyz = ''
   formEdit.bjsn = ''
   formEdit.dyl485btl = ''
-  formEdit.bcmm = ''
   formEdit.fw = ''
   formEdit.range = ''
   formEdit.csfs = ''
@@ -615,14 +619,14 @@ function cancenModal() {
 //获取详细信息列表
 async function getStationList() {
   let res = await get130List();
-  res.forEach((el) => {
-    el.linkstatusC = el.linkstatus ? '连接' : '断开';
-    el.key = el.stationId
+  tableData1.value = res.map((el: any) => {
     el.devInfoList = el.devInfoList.map(v => {
-      return { ...v, ...v.param }
+      return { ...v, ...v.param, stationId: el.id }
     })
+    el.key = el.id
+    el = { ...el, ...el.station130Param }
+    return el
   });
-  tableData1.value = res;
 }
 // //传感器选项切换
 // function changeCgq(val) {
@@ -633,6 +637,7 @@ async function handleEdit(record) {
   // cgqList.length = 0;
   visibleModalEdit1.value = true;
   devStationId.value = record.stationId;
+  formEdit.id = record.id
   // let res = await get130StationDevices({ stationId: devStationId.value });
   // if (res.length != 0) {
   //   res.forEach((el) => {
@@ -644,134 +649,166 @@ async function handleEdit(record) {
 //下发
 async function handleClick(data) {
   switch (data) {
+    case '地址':
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'dz', value: formEdit.dz });
+      visibleModalEdit1.value = false;
+      cancenModal()
+      getStationList();
+      break;
+    case '测试模式':
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'csms', value: formEdit.csms });
+      visibleModalEdit1.value = false;
+      cancenModal()
+      getStationList();
+      break;
     case '探头距离':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'ttjl', value: formEdit.ttjl });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'ttjl', value: formEdit.ttjl });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '基线距离':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'jxjl', value: formEdit.jxjl });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'jxjl', value: formEdit.jxjl });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '角度':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'jd', value: formEdit.jd });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'jd', value: formEdit.jd });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '开启时长':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'kqsz', value: formEdit.kqsz });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'kqsz', value: formEdit.kqsz });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '平滑周期':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'phzq', value: formEdit.phzq });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'phzq', value: formEdit.phzq });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '上行运放倍数':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'sxyfbs', value: formEdit.sxyfbs });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'sxyfbs', value: formEdit.sxyfbs });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '下行运放倍数':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'xxyfbs', value: formEdit.xxyfbs });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'xxyfbs', value: formEdit.xxyfbs });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '风道截面积':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'fdjmj', value: formEdit.fdjmj });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'fdjmj', value: formEdit.fdjmj });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '总体校准系数':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'ztxzxs', value: formEdit.ztxzxs });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'ztxzxs', value: formEdit.ztxzxs });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '校准系数一':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'xzxs1', value: formEdit.xzxs1 });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'xzxs1', value: formEdit.xzxs1 });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '校准系数二':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'xzxs2', value: formEdit.xzxs2 });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'xzxs2', value: formEdit.xzxs2 });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '校准系数三':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'xzxs3', value: formEdit.xzxs3 });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'xzxs3', value: formEdit.xzxs3 });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '校准系数四':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'xzxs4', value: formEdit.xzxs4 });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'xzxs4', value: formEdit.xzxs4 });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '校准系数五':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'xzxs5', value: formEdit.xzxs5 });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'xzxs5', value: formEdit.xzxs5 });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '校准系数六':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'xzxs6', value: formEdit.xzxs6 });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'xzxs6', value: formEdit.xzxs6 });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '校准系数b':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'xzxsb', value: formEdit.xzxsb });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'xzxsb', value: formEdit.xzxsb });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '系数b符号':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'xsbfh', value: formEdit.xsbfh });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'xsbfh', value: formEdit.xsbfh });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '高报警阈值':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'gbjyz', value: formEdit.gbjyz });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'gbjyz', value: formEdit.gbjyz });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '低报警阈值':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'dbjyz', value: formEdit.dbjyz });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'dbjyz', value: formEdit.dbjyz });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '报警使能':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'bjsn', value: formEdit.bjsn });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'bjsn', value: formEdit.bjsn });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '第一路485波特率':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'dyl485btl', value: formEdit.dyl485btl });
-      visibleModalEdit1.value = false;
-      getStationList();
-      break;
-    case '保存密码':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'bcmm', value: formEdit.bcmm });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'dyl485btl', value: formEdit.dyl485btl });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '复位':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'fw', value: formEdit.fw });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'fw', value: formEdit.fw });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '浮动范围':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'range', value: formEdit.range });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'range', value: formEdit.range });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '测试风速':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'csfs', value: formEdit.csfs });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'csfs', value: formEdit.csfs });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '测试风向':
-      await set130StationData({ stationId: devStationId.value, deviceId: '', plcCode: 'csfx', value: formEdit.csfx });
+      await set130StationData({ stationId: devStationId.value, deviceId: formEdit.id, plcCode: 'csfx', value: formEdit.csfx });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
   }
@@ -794,7 +831,7 @@ function cardClick(item, index) {
   clearTimeout(timer3)
   clearTimeout(timer)
   selectedIndex.value = index; // 更新选中索引
-  activeIndex.value = item.isNewAccess || !item.linkstatus ? index : null;
+  activeIndex.value =  !item.linkstatus ? index : null;
   stationName.value = item.strname;
   stationStatus.value = item.linkstatus;
   stationId.value = item.id;

+ 29 - 2
src/views/vent/safetyList/common/detail.vue

@@ -606,8 +606,10 @@ async function tableExpand(expaned, record) {
 async function onChangeTab(tab) {
   activeKey.value = tab;
   stationId.value = ''
-  clearTimeout(timer1);
   clearTimeout(timer);
+  clearTimeout(timer1);
+  clearTimeout(timer2)
+  clearTimeout(timer3)
   if (activeKey.value == 'device') {
     // await getSubStationList();
     // await getStationList1();
@@ -695,116 +697,139 @@ async function handleClick(data) {
     case 'RS485_MODBUS地址':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'rs485modbusdz', value: formEdit.rs485modbusdz });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '探头安装距离':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'ttazjl', value: formEdit.ttazjl });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '基线距离':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'jxjl', value: formEdit.jxjl });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '安装角度':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'azjd', value: formEdit.azjd });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '设置时长':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'szsz', value: formEdit.szsz });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '数据平均周期':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'sjpjzq', value: formEdit.sjpjzq });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '第一路一发二收PG值':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dylyfesPGz', value: formEdit.dylyfesPGz });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '第一路二发一收PG值':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dylefysPGz', value: formEdit.dylefysPGz });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '风道截面积':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'fdjmj', value: formEdit.fdjmj });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '第一路整体系数k':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dylztxsk', value: formEdit.dylztxsk });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '第一路第一段系数':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyldydxs1', value: formEdit.dyldydxs1 });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '第一路第二段系数':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyldedxs2', value: formEdit.dyldedxs2 });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '第一路第三段系数':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyldsdxs3', value: formEdit.dyldsdxs3 });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '第一路第四段系数':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyldsdxs4', value: formEdit.dyldsdxs4 });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '第一路第五段系数':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyldwdxs5', value: formEdit.dyldwdxs5 });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '第一路第六段系数':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyldldxs6', value: formEdit.dyldldxs6 });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '系数KB':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'xsKB', value: formEdit.xsKB });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '系数KB符号':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'xsKBfh', value: formEdit.xsKBfh });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '高报警阈值':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'gbjyz', value: formEdit.gbjyz });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '低报警阈值':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dbjyz', value: formEdit.dbjyz });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '报警使能':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'bjsn', value: formEdit.bjsn });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '第一路485波特率':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyl485btl', value: formEdit.dyl485btl });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
     case '四个字节保存密码':
       await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'sgzjbcmm', value: formEdit.sgzjbcmm });
       visibleModalEdit1.value = false;
+      cancenModal()
       getStationList();
       break;
   }
@@ -825,6 +850,7 @@ async function getSubStationList() {
 //分站站点选项点击
 function cardClick(item, index) {
   clearTimeout(timer3)
+  clearTimeout(timer)
   selectedIndex.value = index; // 更新选中索引
   activeIndex.value = item.isNewAccess || !item.linkstatus ? index : null;
   stationName.value = item.strname;
@@ -902,6 +928,7 @@ async function getStationListAll() {
 //显示全部
 function getAllShow() {
   clearTimeout(timer)
+  clearTimeout(timer3)
   getStationListAll()
   getMonitor3()
 }
@@ -963,7 +990,7 @@ function debugClick(record) {
 async function handleOkDebugEnd() {
   const encryption = new AesEncryption({ key: loginCipher.key, iv: loginCipher.iv });
   let res = await updateDebugStatus({ pwd: encryption.encryptByAES(startupDataDebugEnd.pwd), stationId: debugStationId.value, deviceId: debugDeviceId.value, debugFlag: '0' });
-  if (res.code = 500) {
+  if (res.code == 500) {
     message.error(res.message);
   } else {
     visibleModalDebugEnd.value = false;

+ 154 - 6
src/views/vent/safetyList/safetyList.data.ts

@@ -1,5 +1,27 @@
 import { BasicColumn } from '/@/components/Table';
-
+//130分站测试模式
+export  const optionList:any[] = [
+  { label: '调试模式', value: '1' },
+  { label: '正常模式', value: '0' }
+]
+//130分站测试风向
+export  const  optionList1:any[] = [
+  { label: '反风', value: '1' },
+  { label: '正风', value: '0' }
+]
+export  const derictList:any[] = [
+  { label: '正向', value: '0' },
+  { label: '反向', value: '1' },
+];
+//分页参数配置
+export const pagination = {
+  current: 1, // 当前页码
+  pageSize: 20, // 每页显示条数
+  total: 0, // 总条目数,后端返回
+  // showTotal: (total, range) => `${range[0]}-${range[1]} 条,总共 ${total} 条`, // 分页右下角显示信息
+  showSizeChanger: true, // 是否可改变每页显示条数
+  pageSizeOptions: ['10', '20', '30', '40', '50', '100'], // 可选的每页显示条数
+};
 export const columns: BasicColumn[] = [
   // {
   //     title: '序号',
@@ -177,6 +199,130 @@ export const columnsDetail: BasicColumn[] = [
     slots: { customRender: 'action' },
   },
 ];
+export const columnsDetail130: BasicColumn[] = [
+    {
+    title: '安装位置',
+    dataIndex: 'strinstallpos',
+    key: 'strinstallpos',
+    width: 180,
+    align: 'center',
+  },
+  {
+    title: '煤矿名称',
+    dataIndex: 'mkmc',
+    key: 'mkmc',
+    align: 'center',
+  },
+  {
+    title: '电流1',
+    dataIndex: 'dl1',
+    key: 'dl1',
+    align: 'center',
+  },
+  {
+    title: '电流2',
+    dataIndex: 'dl2',
+    key: 'dl2',
+    align: 'center',
+  },
+  {
+    title: '电流3',
+    dataIndex: 'dl3',
+    key: 'dl3',
+    align: 'center',
+  },
+  {
+    title: '电流4',
+    dataIndex: 'dl4',
+    key: 'dl4',
+    align: 'center',
+  },
+  {
+    title: '电流5',
+    dataIndex: 'dl5',
+    key: 'dl5',
+    align: 'center',
+  },
+  {
+    title: '电流6',
+    dataIndex: 'dl6',
+    key: 'dl6',
+    align: 'center',
+  },
+  {
+    title: '电池电量',
+    dataIndex: 'dcdl',
+    key: 'dcdl',
+    align: 'center',
+  },
+  {
+    title: '电池电压',
+    dataIndex: 'dcdy',
+    key: 'dcdy',
+    align: 'center',
+  },
+  {
+    title: '输出电压1',
+    dataIndex: 'scdy1',
+    key: 'scdy1',
+    align: 'center',
+  },
+  {
+    title: '输出电压2',
+    dataIndex: 'scdy2',
+    key: 'scdy2',
+    align: 'center',
+  },
+  {
+    title: '输出电压3',
+    dataIndex: 'scdy3',
+    key: 'scdy3',
+    align: 'center',
+  },
+  {
+    title: '输出电压4',
+    dataIndex: 'scdy4',
+    key: 'scdy4',
+    align: 'center',
+  },
+  {
+    title: '输出电压5',
+    dataIndex: 'scdy5',
+    key: 'scdy5',
+    align: 'center',
+  },
+  {
+    title: '输出电压6',
+    dataIndex: 'scdy6',
+    key: 'scdy6',
+    align: 'center',
+  },
+  {
+    title: '交直流',
+    dataIndex: 'jzl',
+    key: 'jzl',
+    align: 'center',
+  },
+   {
+    title: '版本寄存器',
+    dataIndex: 'bbjcq',
+    key: 'bbjcq',
+    align: 'center',
+  },
+   {
+    title: '传感器版本',
+    dataIndex: 'csfx',
+    key: 'csfx',
+    align: 'center',
+  },
+  // {
+  //   title: '操作',
+  //   dataIndex: 'action',
+  //   width: 150,
+  //   align: 'center',
+  //   slots: { customRender: 'action' },
+  // },
+];
 export const deviceColumns: BasicColumn[] = [
   {
     title: '安装位置',
@@ -636,11 +782,6 @@ export const deviceColumns130: BasicColumn[] = [
     width: 100,
   },
  
-  
- 
-  
-  
-  
   {
     title: '复位',
     dataIndex: 'fw',
@@ -676,6 +817,13 @@ export const deviceColumns130: BasicColumn[] = [
     align: 'center',
     width: 100,
   },
+   {
+    title: '操作',
+    dataIndex: 'action',
+    width: 150,
+    align: 'center',
+    slots: { customRender: 'action' },
+  },
 ];
 
 export const columnsOperate: BasicColumn[] = [

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác