Browse Source

158分站操作记录,粉尘监测预警更新

lxh 1 month ago
parent
commit
616d27fcb9

+ 3 - 3
src/views/vent/monitorManager/alarmMonitor/warn/dustWarn.vue

@@ -101,9 +101,9 @@ let flag = ref(true);
 let timer: null | NodeJS.Timeout = null;
 function getMonitor(flag?) {
   timer = setTimeout(
-    async () => {
-      await getMenuList()
-      await getWindDeviceList();
+    () => {
+      getMenuList()
+      getWindDeviceList();
       if (timer) {
         timer = null;
       }

+ 54 - 45
src/views/vent/safetyList/common/detail.vue

@@ -6,6 +6,7 @@
         <a-tab-pane tab="分站监测" key="device" />
         <a-tab-pane tab="历史数据" key="history" />
         <a-tab-pane tab="监测详情" key="manageAuto" />
+        <a-tab-pane tab="操作记录" key="operationRecord" />
       </a-tabs>
       <div class="box-content">
         <!-- 分站监测 -->
@@ -173,7 +174,7 @@
           <!-- <a-button preIcon="ant-design:sync-outlined" @click="visibleModalEdit1 = true">重置</a-button> -->
           <a-table size="small" :scroll="{ y: 710 }" :columns="columnsDetail" :data-source="tableData1">
             <template #action="{ record }">
-              <a-button type="primary" size="small" @click="handleEdit(record)">编辑</a-button>
+              <a-button  v-if="hasPermission('operateRecord:return')" type="primary" size="small" @click="handleEdit(record)">编辑</a-button>
             </template>
             <template #bodyCell="{ column, text }"></template>
           </a-table>
@@ -231,108 +232,112 @@
               <a-form-item label="RS485_MODBUS地址:">
                 <a-input v-model:value="formEdit.rs485modbusdz" placeholder="请输入"
                   style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('RS485_MODBUS地址')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('RS485_MODBUS地址')">下发</a-button>
               </a-form-item>
               <a-form-item label="探头安装距离:">
                 <a-input v-model:value="formEdit.ttazjl" placeholder="请输入" style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('探头安装距离')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('探头安装距离')">下发</a-button>
               </a-form-item>
               <a-form-item label="基线距离:">
                 <a-input v-model:value="formEdit.jxjl" placeholder="请输入" style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('基线距离')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('基线距离')">下发</a-button>
               </a-form-item>
               <a-form-item label="安装角度:">
                 <a-input v-model:value="formEdit.azjd" placeholder="请输入" style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('安装角度')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('安装角度')">下发</a-button>
               </a-form-item>
               <a-form-item label="设置时长:">
                 <a-input v-model:value="formEdit.szsz" placeholder="请输入" style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('设置时长')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('设置时长')">下发</a-button>
               </a-form-item>
               <a-form-item label="数据平均周期:">
                 <a-input v-model:value="formEdit.sjpjzq" placeholder="请输入" style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('数据平均周期')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('数据平均周期')">下发</a-button>
               </a-form-item>
               <a-form-item label="第一路一发二收PG值:">
                 <a-input v-model:value="formEdit.dylyfesPGz" placeholder="请输入"
                   style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('第一路一发二收PG值')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('第一路一发二收PG值')">下发</a-button>
               </a-form-item>
               <a-form-item label="第一路二发一收PG值:">
                 <a-input v-model:value="formEdit.dylefysPGz" placeholder="请输入"
                   style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('第一路二发一收PG值')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('第一路二发一收PG值')">下发</a-button>
               </a-form-item>
               <a-form-item label="风道截面积:">
                 <a-input v-model:value="formEdit.fdjmj" placeholder="请输入" style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('风道截面积')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('风道截面积')">下发</a-button>
               </a-form-item>
               <a-form-item label="第一路整体系数k:">
                 <a-input v-model:value="formEdit.dylztxsk" placeholder="请输入" style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('第一路整体系数k')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('第一路整体系数k')">下发</a-button>
               </a-form-item>
               <a-form-item label="第一路第一段系数:">
                 <a-input v-model:value="formEdit.dyldydxs1" placeholder="请输入"
                   style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('第一路第一段系数')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('第一路第一段系数')">下发</a-button>
               </a-form-item>
               <a-form-item label="第一路第二段系数:">
                 <a-input v-model:value="formEdit.dyldedxs2" placeholder="请输入"
                   style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('第一路第二段系数')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('第一路第二段系数')">下发</a-button>
               </a-form-item>
               <a-form-item label="第一路第三段系数:">
                 <a-input v-model:value="formEdit.dyldsdxs3" placeholder="请输入"
                   style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('第一路第三段系数')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('第一路第三段系数')">下发</a-button>
               </a-form-item>
               <a-form-item label="第一路第四段系数:">
                 <a-input v-model:value="formEdit.dyldsdxs4" placeholder="请输入"
                   style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('第一路第四段系数')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('第一路第四段系数')">下发</a-button>
               </a-form-item>
               <a-form-item label="第一路第五段系数:">
                 <a-input v-model:value="formEdit.dyldwdxs5" placeholder="请输入"
                   style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('第一路第五段系数')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('第一路第五段系数')">下发</a-button>
               </a-form-item>
               <a-form-item label="第一路第六段系数:">
                 <a-input v-model:value="formEdit.dyldldxs6" placeholder="请输入"
                   style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('第一路第六段系数')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('第一路第六段系数')">下发</a-button>
               </a-form-item>
               <a-form-item label="系数KB:">
                 <a-input v-model:value="formEdit.xsKB" placeholder="请输入" style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('系数KB')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('系数KB')">下发</a-button>
               </a-form-item>
               <a-form-item label="系数KB符号:">
                 <a-input v-model:value="formEdit.xsKBfh" placeholder="请输入" style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('系数KB符号')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('系数KB符号')">下发</a-button>
               </a-form-item>
               <a-form-item label="高报警阈值:">
                 <a-input v-model:value="formEdit.gbjyz" placeholder="请输入" style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('高报警阈值')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('高报警阈值')">下发</a-button>
               </a-form-item>
               <a-form-item label="低报警阈值:">
                 <a-input v-model:value="formEdit.dbjyz" placeholder="请输入" style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('低报警阈值')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('低报警阈值')">下发</a-button>
               </a-form-item>
               <a-form-item label="报警使能:">
                 <a-input v-model:value="formEdit.bjsn" placeholder="请输入" style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('报警使能')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('报警使能')">下发</a-button>
               </a-form-item>
               <a-form-item label="第一路485波特率:">
                 <a-input v-model:value="formEdit.dyl485btl" placeholder="请输入"
                   style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('第一路485波特率')">下发</a-button>
+                <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.sgzjbcmm" placeholder="请输入" style="width: 260px; margin-right: 10px" />
-                <a-button type="primary" @click="handleClick('四个字节保存密码')">下发</a-button>
+                <a-button class="down-btn" type="primary" @click="handleClick('四个字节保存密码')">下发</a-button>
               </a-form-item>
             </a-form>
           </a-modal>
         </div>
+        <!-- 操作记录 -->
+        <div class="detail-content" v-if="activeKey == 'operationRecord'">
+          <operateRecord></operateRecord>
+        </div>
       </div>
     </div>
   </div>
@@ -340,6 +345,7 @@
 
 <script setup lang="ts">
 import { ref, nextTick, reactive, onMounted, onUnmounted } from 'vue';
+import { usePermission } from '/@/hooks/web/usePermission';
 import {
   subStationList,
   getList,
@@ -358,8 +364,10 @@ import { historyColumns } from '../historyLsit.data';
 import { columnsDetail, columns } from '../safetyList.data';
 import HistoryTable from './HistoryTable.vue';
 import customHeader from '/@/components/vent/customHeader.vue';
+import operateRecord from './operateRecord.vue'
 import dayjs from 'dayjs';
 
+const { hasPermission } = usePermission();
 let activeKey = ref('device');
 let cardList = ref<any[]>([]);
 let activeIndex = ref(null);
@@ -460,6 +468,7 @@ let stationId = ref('');
 const scroll = reactive({
   y: 680,
 });
+
 //定时刷新左侧分站数据
 let timer: null | NodeJS.Timeout = null;
 function getMonitor(flag = false) {
@@ -519,9 +528,11 @@ async function onChangeTab(tab) {
     await getSubStationList();
     await getStationList();
     getMonitor()
-  } else {
+  } else if(activeKey.value == 'manageAuto') {
     await getStationList();
     getMonitor1();
+  }else if(activeKey.value == 'operationRecord'){
+
   }
 }
 
@@ -1374,7 +1385,12 @@ onUnmounted(() => {
     }
   }
 }
-
+.down-btn {
+  line-height: 15px;
+  height: 20px;
+  padding: 0px 17px;
+  font-size: 12px;
+}
 .zxm-form {
   width: 50%;
   height: 100%;
@@ -1408,29 +1424,22 @@ onUnmounted(() => {
 // ::v-deep(.zxm-form-item-label > label) {
 //   color: #fff !important;
 // }
-
-::v-deep .zxm-btn {
-  line-height: 15px;
-  height: 20px;
-  padding: 0px 17px;
-  font-size: 12px;
-}
 </style>
 <style>
 div[aria-hidden='true'] {
   display: none !important;
 }
 </style>
-<style lang="less" scoped>
-.search-area {
-  width: 100%;
-  padding: 5px;
-  margin: 10px;
-  box-sizing: border-box;
-}
+// <style lang="less" scoped>
+// .search-area {
+//   width: 100%;
+//   padding: 5px;
+//   margin: 10px;
+//   box-sizing: border-box;
+// }
 
-.card-item.selected {
-  border: 2px solid #3ad8ff77;
-  /* 选中时的边框颜色 */
-}
-</style>
+// .card-item.selected {
+//   border: 2px solid #3ad8ff77;
+//   /* 选中时的边框颜色 */
+// }
+// </style>

+ 98 - 0
src/views/vent/safetyList/common/operateRecord.vue

@@ -0,0 +1,98 @@
+<template>
+    <div class="operateRecord">
+        <div class="search-content">
+            <a-row>
+                <a-col :span="4">
+                    <div class="area-item">
+                        <div class="item-text">填报日期:</div>
+                        <a-date-picker style="width: 220px" :showTime="false" valueFormat="YYYY-MM-DD"
+                            v-model:value="searchData.reportTime" placeholder="请选择填报日期" />
+                    </div>
+                </a-col>
+                <a-col :span="4">
+                    <div class="area-item">
+                        <div class="item-text">上报地点:</div>
+                        <a-select v-model:value="searchData.strInstallPos" style="width: 220px" placeholder="请选择上报地点">
+                            <a-select-option v-for="item in addressList" :key="item" :value="item.value">{{ item.label
+                                }}</a-select-option>
+                        </a-select>
+                    </div>
+                </a-col>
+                <a-col :span="4">
+                    <div class="area-item">
+                        <div class="item-text">上报地点:</div>
+                        <a-select v-model:value="searchData.strInstallPos" style="width: 220px" placeholder="请选择上报地点">
+                            <a-select-option v-for="item in addressList" :key="item" :value="item.value">{{ item.label
+                                }}</a-select-option>
+                        </a-select>
+                    </div>
+                </a-col>
+
+                <a-button type="primary" preIcon="ant-design:search-outlined">查询</a-button>
+                <a-button preIcon="ant-design:sync-outlined" style="margin: 0px 15px">重置</a-button>
+            </a-row>
+        </div>
+        <a-table size="small" :scroll="{ y: 710 }" :columns="columnsDetail" :data-source="tableData">
+            <!-- <template #action="{ record }">
+                <a-button type="primary" size="small" @click="handleEdit(record)">编辑</a-button>
+            </template> -->
+            <template #bodyCell="{ column, text }"></template>
+        </a-table>
+    </div>
+</template>
+
+<script setup lang="ts">
+import { ref, reactive } from 'vue'
+import { columnsDetail } from '../safetyList.data';
+
+//操作记录
+let searchData = reactive({
+    reportTime: '',
+    sbr: '',
+    strInstallPos: '',
+})
+let addressList = ref<any[]>([])
+
+let tableData = ref<[]>([])
+</script>
+
+<style lang="less" scoped>
+.operateRecord {
+    position: relative;
+    width: 100%;
+    height: 100%;
+
+    .search-content {
+        margin: 15px 0px;
+
+        .area-item {
+            display: flex;
+            align-items: center;
+
+            .item-text {
+                color: #fff;
+            }
+        }
+    }
+
+    .zxm-picker,
+    .zxm-input {
+        border: 1px solid var(--vent-form-item-border) !important;
+        background-color: #ffffff00 !important;
+        color: #fff !important;
+    }
+}
+
+:deep(.zxm-select:not(.zxm-select-customize-input) .zxm-select-selector) {
+    border: 1px solid var(--vent-form-item-border) !important;
+    background-color: #ffffff00 !important;
+}
+
+:deep(.zxm-picker-input > input) {
+    color: #fff;
+}
+
+:deep(.zxm-select-selection-item) {
+    color: #fff !important;
+}
+</style>