Przeglądaj źródła

158分站调试按钮修改,瓦斯日报表导出修改

lxh 1 miesiąc temu
rodzic
commit
3487909d21

+ 22 - 44
src/views/vent/gas/gasReport/index.vue

@@ -11,15 +11,7 @@
                 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.districtTeam" style="width: 220px" placeholder="请选择区队">
-                <a-select-option v-for="item in qdList" :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>
@@ -31,7 +23,7 @@
               <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-option>
               </a-select>
             </div>
           </a-col>
@@ -148,12 +140,10 @@ import { BasicForm, useForm } from '/@/components/Form';
 
 let searchData = reactive({
   reportTime: dayjs().format('YYYY-MM-DD'),
-  districtTeam: '',
   sbr: '',
   strInstallPos: '',
 });
-let qdList = reactive<any[]>([]); //区队下拉列表
-let addressList = reactive<any[]>([]); //上报地点下拉列表
+let addressList = ref<any[]>([]); //上报地点下拉列表
 let pagination = reactive({
   current: 1, // 当前页码
   pageSize: 10, // 每页显示条数
@@ -168,12 +158,12 @@ let tableData = ref<any[]>([]);
 async function getTableList() {
   let res = await getList({ pageNo: pagination.current, pageSize: pagination.pageSize, ...searchData });
   res.records.forEach((el) => {
-    el.jwSdzNight1 = el.jwSdzNight1 != null ? el.jwSdzNight1 : '-';
-    el.jwSdzNight2 = el.jwSdzNight2 != null ? el.jwSdzNight2 : '-';
-    el.jwSdzEarly1 = el.jwSdzEarly1 != null ? el.jwSdzEarly1 : '-';
-    el.jwSdzEarly2 = el.jwSdzEarly2 != null ? el.jwSdzEarly2 : '-';
-    el.jwSdzNoon1 = el.jwSdzNoon1 != null ? el.jwSdzNoon1 : '-';
-    el.jwSdzNoon2 = el.jwSdzNoon2 != null ? el.jwSdzNoon2 : '-';
+    el.jwSdzNight1 = el.jwSdzNight1 || '-';
+    el.jwSdzNight2 = el.jwSdzNight2 || '-';
+    el.jwSdzEarly1 = el.jwSdzEarly1 || '-';
+    el.jwSdzEarly2 = el.jwSdzEarly2 || '-';
+    el.jwSdzNoon1 = el.jwSdzNoon1 || '-';
+    el.jwSdzNoon2 = el.jwSdzNoon2 || '-';
   });
   tableData.value = res.records;
   pagination.total = res.total;
@@ -186,7 +176,6 @@ function getSearch() {
 //重置
 function onReset() {
   pagination.current = 1;
-  searchData.districtTeam = '';
   searchData.reportTime = '';
   searchData.strInstallPos = '';
   searchData.sbr = '';
@@ -198,26 +187,14 @@ function pageChange(val) {
   pagination.pageSize = val.pageSize;
   getTableList();
 }
-function uniqueObjectsArray(arr) {
-  const map = new Map();
-  return arr.filter((item) => {
-    const key = JSON.stringify(item);
-    const isNew = !map.has(key);
-    map.set(key, item);
-    return isNew;
-  });
-}
+
 //获取安装位置下拉选项
 async function getSelectList() {
   let res = await getGasAddressList({ coalseam: '', devicekind: 'gasDayReport' });
-  qdList.length = 0;
-  addressList.length = 0;
   if (res.length != 0) {
-    res.forEach((el) => {
-      qdList.push({ label: el.devgroup_dictText, value: el.devgroup_dictText });
-      addressList.push({ label: el.strinstallpos, value: el.strinstallpos });
+    addressList.value = res.map((el) => {
+      return { label: el.strinstallpos, value: el.strinstallpos }
     });
-    qdList = uniqueObjectsArray(qdList);
   }
 }
 //导出报表
@@ -450,14 +427,14 @@ const [registerForm, { validate, setFieldsValue }] = useForm({
 async function submitHandler() {
   const params = await validate();
   const res = await exportReportByPoi({ tempName: 'wsjcxp', reportTime: searchData.reportTime, ...params });
-    const filename = searchData.reportTime + '.xlsx';
-    downFilePublic(res, filename);
-  }
+  const filename = searchData.reportTime + '.xlsx';
+  downFilePublic(res, filename);
+}
 
-  onMounted(() => {
-    getSelectList();
-    getTableList();
-  });
+onMounted(() => {
+  getSelectList();
+  getTableList();
+});
 </script>
 
 <style lang="less" scoped>
@@ -504,6 +481,7 @@ async function submitHandler() {
   background-color: #ffffff00 !important;
 }
 
-:deep(.zxm-select-selection-item) {color: #fff !important;
-  }
+:deep(.zxm-select-selection-item) {
+  color: #fff !important;
+}
 </style>

+ 38 - 79
src/views/vent/gas/gasReport/index1.vue

@@ -11,7 +11,7 @@
                                 v-model:value="searchData.reportTime" placeholder="请选择填报日期" />
                         </div>
                     </a-col>
-                  
+
                     <a-col :span="4">
                         <div class="area-item">
                             <div class="item-text">检查工:</div>
@@ -32,12 +32,13 @@
 
                     <a-button type="primary" preIcon="ant-design:search-outlined" @click="getSearch">查询</a-button>
                     <a-button preIcon="ant-design:sync-outlined" style="margin: 0px 10px" @click="onReset">重置</a-button>
-                    <a-button type="primary" preIcon="ant-design:check-circle-outlined" 
+                    <a-button type="primary" preIcon="ant-design:check-circle-outlined"
                         @click="getPassSh">审核通过</a-button>
-                    <a-button style="margin:0px 10px"  type="primary" preIcon="ant-design:download-outlined" @click="getExport">导出日报表</a-button>
+                    <a-button style="margin:0px 10px" type="primary" preIcon="ant-design:download-outlined"
+                        @click="getExport">导出日报表</a-button>
                     <a-button type="primary" preIcon="ant-design:download-outlined"
                         @click="handleMenuClick">导出班报表</a-button>
-                
+
                 </a-row>
             </div>
             <a-table :columns="columnsDhz" :data-source="tableData" size="small" :scroll="{ y: 500 }" class="tableW"
@@ -103,18 +104,22 @@
                 </template>
             </a-table>
         </div>
-      
+        <BasicModal :width="450" :height="240" :min-height="140" @register="registerModal" @ok="submitHandler">
+            <BasicForm @register="registerForm" />
+        </BasicModal>
     </div>
 </template>
 
 <script setup lang="ts">
 import { ref, onMounted, reactive } from 'vue';
 import { columnsDhz } from './gas-report.data';
-import { getGasAddressList, getList, expComReportByParam, reviewPass, getIsReviewPass, getAllUserInfo, exportReportByPoi, queryUserByRoleCode } from './gas-report.api';
+import { getGasAddressList, getList, expComReportByParam, reviewPass, } from './gas-report.api';
 import customHeader from '/@/components/vent/customHeader.vue';
 import { message } from 'ant-design-vue';
 import dayjs from 'dayjs';
 import { BasicForm, useForm } from '/@/components/Form';
+import { queryAllDisTeam } from '../gasInspect/gasInspect.api'
+import { BasicModal, useModal } from '/@/components/Modal';
 
 let searchData = reactive({
     reportTime: dayjs().format('YYYY-MM-DD'),
@@ -122,8 +127,7 @@ let searchData = reactive({
     sbr: '',
     strInstallPos: '',
 });
-let qdList = reactive<any[]>([]); //区队下拉列表
-let addressList = reactive<any[]>([]); //上报地点下拉列表
+let addressList = ref<any[]>([]); //上报地点下拉列表
 let pagination = reactive({
     current: 1, // 当前页码
     pageSize: 10, // 每页显示条数
@@ -133,17 +137,18 @@ let pagination = reactive({
     pageSizeOptions: ['10', '20', '50'], // 可选的每页显示条数
 });
 let tableData = ref<any[]>([]);
+const [registerModal, { openModal, closeModal }] = useModal();
 
 //获取日报列表数据
 async function getTableList() {
     let res = await getList({ pageNo: pagination.current, pageSize: pagination.pageSize, ...searchData });
     res.records.forEach((el) => {
-        el.jwSdzNight1 = el.jwSdzNight1 != null ? el.jwSdzNight1 : '-';
-        el.jwSdzNight2 = el.jwSdzNight2 != null ? el.jwSdzNight2 : '-';
-        el.jwSdzEarly1 = el.jwSdzEarly1 != null ? el.jwSdzEarly1 : '-';
-        el.jwSdzEarly2 = el.jwSdzEarly2 != null ? el.jwSdzEarly2 : '-';
-        el.jwSdzNoon1 = el.jwSdzNoon1 != null ? el.jwSdzNoon1 : '-';
-        el.jwSdzNoon2 = el.jwSdzNoon2 != null ? el.jwSdzNoon2 : '-';
+        el.jwSdzNight1 = el.jwSdzNight1 || '-';
+        el.jwSdzNight2 = el.jwSdzNight2 || '-';
+        el.jwSdzEarly1 = el.jwSdzEarly1 || '-';
+        el.jwSdzEarly2 = el.jwSdzEarly2 || '-';
+        el.jwSdzNoon1 = el.jwSdzNoon1 || '-';
+        el.jwSdzNoon2 = el.jwSdzNoon2 || '-';
     });
     tableData.value = res.records;
     pagination.total = res.total;
@@ -168,45 +173,38 @@ function pageChange(val) {
     pagination.pageSize = val.pageSize;
     getTableList();
 }
-function uniqueObjectsArray(arr) {
-    const map = new Map();
-    return arr.filter((item) => {
-        const key = JSON.stringify(item);
-        const isNew = !map.has(key);
-        map.set(key, item);
-        return isNew;
-    });
-}
+
 //获取安装位置下拉选项
 async function getSelectList() {
     let res = await getGasAddressList({ coalseam: '', devicekind: 'gasDayReport' });
-    qdList.length = 0;
-    addressList.length = 0;
     if (res.length != 0) {
-        res.forEach((el) => {
-            qdList.push({ label: el.devgroup_dictText, value: el.devgroup_dictText });
-            addressList.push({ label: el.strinstallpos, value: el.strinstallpos });
+        addressList.value = res.map((el) => {
+            return { label: el.strinstallpos, value: el.strinstallpos }
         });
-        qdList = uniqueObjectsArray(qdList);
     }
 }
+
 //导出报表
 async function getExport() {
+    openModal()
     if (getTs()) {
         message.warning('数据异常!');
     } else {
         if (searchData.reportTime) {
-            let data = await getIsReviewPass({ reportTime: searchData.reportTime });
-            if (data == '已审核通过!') {
-                let res = await expComReportByParam({ tempName: 'wsrb', reportTime: searchData.reportTime });
-                let filename = searchData.reportTime + '.xlsx';
-                downFilePublic(res, filename);
-            }
+            openModal()
         } else {
             message.warning('请选择需要导出数据的填报日期!');
         }
     }
 }
+//导出瓦斯日报表
+async function submitHandler() {
+    const params = await validate();
+    const res = await expComReportByParam({ tempName: 'wsrb', reportTime: searchData.reportTime, ...params });
+    const filename = searchData.reportTime + '.xlsx';
+    downFilePublic(res, filename);
+    closeModal()
+}
 function getTs() {
     let param = true;
     tableData.value.forEach((el) => {
@@ -339,53 +337,14 @@ async function handleMenuClick(val) {
 const [registerForm, { validate, setFieldsValue }] = useForm({
     schemas: [
         {
-            label: '检查工',
-            field: 'checkName',
-            component: 'ApiSelect',
-            required: true,
-            show: false,
-        },
-        {
-            label: '交班瓦检员',
-            field: 'agoCheckPerson',
-            component: 'ApiSelect',
-            required: true,
-            componentProps: {
-                api: queryUserByRoleCode,
-                params: { roleCode: 'gasCheck' },
-                labelField: 'realname',
-                valueField: 'username',
-                showSearch: true,
-            },
-        },
-        {
-            label: '当班瓦检员',
-            field: 'nowCheckPerson',
-            component: 'ApiSelect',
-            required: true,
-            componentProps: {
-                api: queryUserByRoleCode,
-                params: { roleCode: 'gasCheck' },
-                labelField: 'realname',
-                valueField: 'username',
-                showSearch: true,
-                onChange(__, { label }) {
-                    setFieldsValue({
-                        checkName: label,
-                    });
-                },
-            },
-        },
-        {
-            label: '接班瓦检员',
-            field: 'nextCheckPerson',
+            label: '区队',
+            field: 'disTeamId',
             component: 'ApiSelect',
             required: true,
             componentProps: {
-                api: queryUserByRoleCode,
-                params: { roleCode: 'gasCheck' },
-                labelField: 'realname',
-                valueField: 'username',
+                api: queryAllDisTeam,
+                labelField: 'name',
+                valueField: 'id',
                 showSearch: true,
             },
         },

+ 434 - 432
src/views/vent/safetyList/common/detail.vue

@@ -178,19 +178,19 @@
         </div>
         <!-- 监测详情 -->
         <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">
+
+          <a-table size="small" :scroll="{ y: 710 }" :row-key="(record) => record.stationId"
+            :expandedRowKeys="expandedRowKeys" :columns="columnsDetail" :data-source="tableData1" @expand="tableExpand">
             <template #action="{ record }">
               <a-button v-if="hasPermission('operateRecord:return') && record.deviceList" type="primary" size="small"
                 @click="handleEdit(record)">编辑</a-button>
             </template>
             <template #bodyCell="{ column, text }"></template>
             <template #expandedRowRender="{ record }">
-              <a-table :columns="deviceColumns" :data-source="record.deviceList" :pagination="false"   maxWidth="340"
-              :scroll="{ x: 'max-content', y: 200 }">
+              <a-table :columns="deviceColumns" :data-source="record.deviceList" :pagination="false" maxWidth="340"
+                :scroll="{ x: 'max-content', y: 200 }">
                 <!-- <template #action="{ record }"></template>
-                <template #bodyCell="{ column }"></template> -->
+    <template #bodyCell="{ column }"></template> -->
               </a-table>
             </template>
           </a-table>
@@ -386,7 +386,7 @@ import customHeader from '/@/components/vent/customHeader.vue';
 import operateRecord from './operateRecord.vue'
 import dayjs from 'dayjs';
 
-let expandedRowKeys=reactive<any[]>([])
+let expandedRowKeys = reactive<any[]>([])
 const { hasPermission } = usePermission();
 let activeKey = ref('device');
 let cardList = ref<any[]>([]);
@@ -495,6 +495,9 @@ function getMonitor(flag = false) {
   timer = setTimeout(
     async () => {
       await getSubStationList();
+      if (activeKey.value == 'device') {
+        await getStationList1();
+      }
       if (timer) {
         timer = null;
       }
@@ -513,7 +516,7 @@ function getMonitor1(flag = false) {
       }
       getMonitor1();
     },
-    flag ? 0 : 5000
+    flag ? 0 : 3000
   );
 }
 let timer2: null | NodeJS.Timeout = null;
@@ -550,293 +553,266 @@ async function getShowReadList() {
   }
 }
 async function tableExpand(expaned, record) {
-  let res=await set158StationDevicesRead({ stationId: record.stationId })
-  if(res && expaned){
+  let res = await set158StationDevicesRead({ stationId: record.stationId })
+  if (res && expaned) {
     // expandedRowKeys.length=0
     let data = await get158StationData();
-    tableData1.value=data
+    tableData1.value = data
     expandedRowKeys.push(record.stationId)
-  }else {
-    expandedRowKeys.length=0
+  } else {
+    expandedRowKeys.length = 0
   }
 }
 
-  
-  //tab选项切换
-  async function onChangeTab(tab) {
-    activeKey.value = tab;
-    stationId.value = ''
-    clearTimeout(timer1);
-    clearTimeout(timer);
-    if (activeKey.value == 'device') {
-      await getSubStationList();
-      await getStationList1();
-      getMonitor()
-    } else if (activeKey.value == 'history') {
-      await getSubStationList();
-      await getStationList();
-      getMonitor()
-    } else if (activeKey.value == 'manageAuto') {
-      await getStationList();
-      getMonitor1(true);
-    } else if (activeKey.value == 'operationRecord') {
-      await getSearchRecord({ stationId: '', deviceId: '' })
-    }
-  }
 
-  //弹窗关闭
-  function cancenModal() {
-    clearTimeout(timer2)
-    formEdit.id = ''
-    formEdit.cgq = ''
-    formEdit.rs485modbusdz = ''
-    formEdit.ttazjl = ''
-    formEdit.jxjl = ''
-    formEdit.azjd = ''
-    formEdit.szsz = ''
-    formEdit.sjpjzq = ''
-    formEdit.dylyfesPGz = ''
-    formEdit.dylefysPGz = ''
-    formEdit.fdjmj = ''
-    formEdit.dylztxsk = ''
-    formEdit.dyldydxs1 = ''
-    formEdit.dyldedxs2 = ''
-    formEdit.dyldsdxs3 = ''
-    formEdit.dyldsdxs4 = ''
-    formEdit.dyldwdxs5 = ''
-    formEdit.dyldldxs6 = ''
-    formEdit.xsKB = ''
-    formEdit.xsKBfh = ''
-    formEdit.gbjyz = ''
-    formEdit.dbjyz = ''
-    formEdit.bjsn = ''
-    formEdit.dyl485btl = ''
-    formEdit.sgzjbcmm = ''
-
-    formView.dylfsfx = ''
-    formView.dylbjzt = ''
-    formView.dyl1f2sADz = ''
-    formView.dyl2f1sADz = ''
-    formView.tfl = ''
-    formView.yjbb = ''
-    formView.rjbb = ''
-    formView.zxlxbz = ''
-    formView.rqsj = ''
+//tab选项切换
+async function onChangeTab(tab) {
+  activeKey.value = tab;
+  stationId.value = ''
+  clearTimeout(timer1);
+  clearTimeout(timer);
+  if (activeKey.value == 'device') {
+    // await getSubStationList();
+    // await getStationList1();
+    getMonitor()
+  } else if (activeKey.value == 'history') {
+    await getSubStationList();
+    await getStationList();
+    getMonitor()
+  } else if (activeKey.value == 'manageAuto') {
+    await getStationList();
+    getMonitor1(true);
+  } else if (activeKey.value == 'operationRecord') {
+    await getSearchRecord({ stationId: '', deviceId: '' })
   }
-  //获取详细信息列表
-  async function getStationList() {
-    let res = await get158StationData();
+}
+
+//弹窗关闭
+function cancenModal() {
+  clearTimeout(timer2)
+  formEdit.id = ''
+  formEdit.cgq = ''
+  formEdit.rs485modbusdz = ''
+  formEdit.ttazjl = ''
+  formEdit.jxjl = ''
+  formEdit.azjd = ''
+  formEdit.szsz = ''
+  formEdit.sjpjzq = ''
+  formEdit.dylyfesPGz = ''
+  formEdit.dylefysPGz = ''
+  formEdit.fdjmj = ''
+  formEdit.dylztxsk = ''
+  formEdit.dyldydxs1 = ''
+  formEdit.dyldedxs2 = ''
+  formEdit.dyldsdxs3 = ''
+  formEdit.dyldsdxs4 = ''
+  formEdit.dyldwdxs5 = ''
+  formEdit.dyldldxs6 = ''
+  formEdit.xsKB = ''
+  formEdit.xsKBfh = ''
+  formEdit.gbjyz = ''
+  formEdit.dbjyz = ''
+  formEdit.bjsn = ''
+  formEdit.dyl485btl = ''
+  formEdit.sgzjbcmm = ''
+
+  formView.dylfsfx = ''
+  formView.dylbjzt = ''
+  formView.dyl1f2sADz = ''
+  formView.dyl2f1sADz = ''
+  formView.tfl = ''
+  formView.yjbb = ''
+  formView.rjbb = ''
+  formView.zxlxbz = ''
+  formView.rqsj = ''
+}
+//获取详细信息列表
+async function getStationList() {
+  let res = await get158StationData();
+  res.forEach((el) => {
+    el.linkstatusC = el.linkstatus ? '连接' : '断开';
+    el.key = el.stationId
+  });
+  tableData1.value = res;
+}
+//传感器选项切换
+function changeCgq(val) {
+  formEdit.cgq = val;
+}
+//编辑
+async function handleEdit(record) {
+  cgqList.length = 0;
+  visibleModalEdit1.value = true;
+  devStationId.value = record.stationId;
+  let res = await get158StationDevices({ stationId: devStationId.value });
+  console.log(res, '分站下设备下拉选项-------------');
+  if (res.length != 0) {
     res.forEach((el) => {
-      el.linkstatusC = el.linkstatus ? '连接' : '断开';
-      el.key = el.stationId
+      cgqList.push({ label: el.strinstallpos, value: el.id });
     });
-    tableData1.value = res;
-  }
-  //传感器选项切换
-  function changeCgq(val) {
-    formEdit.cgq = val;
-  }
-  //编辑
-  async function handleEdit(record) {
-    cgqList.length = 0;
-    visibleModalEdit1.value = true;
-    devStationId.value = record.stationId;
-    let res = await get158StationDevices({ stationId: devStationId.value });
-    console.log(res, '分站下设备下拉选项-------------');
-    if (res.length != 0) {
-      res.forEach((el) => {
-        cgqList.push({ label: el.strinstallpos, value: el.id });
-      });
-    }
-  }
-
-  //下发
-  async function handleClick(data) {
-    switch (data) {
-      case 'RS485_MODBUS地址':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'rs485modbusdz', value: formEdit.rs485modbusdz });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '探头安装距离':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'ttazjl', value: formEdit.ttazjl });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '基线距离':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'jxjl', value: formEdit.jxjl });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '安装角度':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'azjd', value: formEdit.azjd });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '设置时长':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'szsz', value: formEdit.szsz });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '数据平均周期':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'sjpjzq', value: formEdit.sjpjzq });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '第一路一发二收PG值':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dylyfesPGz', value: formEdit.dylyfesPGz });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '第一路二发一收PG值':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dylefysPGz', value: formEdit.dylefysPGz });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '风道截面积':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'fdjmj', value: formEdit.fdjmj });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '第一路整体系数k':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dylztxsk', value: formEdit.dylztxsk });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '第一路第一段系数':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyldydxs1', value: formEdit.dyldydxs1 });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '第一路第二段系数':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyldedxs2', value: formEdit.dyldedxs2 });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '第一路第三段系数':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyldsdxs3', value: formEdit.dyldsdxs3 });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '第一路第四段系数':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyldsdxs4', value: formEdit.dyldsdxs4 });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '第一路第五段系数':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyldwdxs5', value: formEdit.dyldwdxs5 });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '第一路第六段系数':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyldldxs6', value: formEdit.dyldldxs6 });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '系数KB':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'xsKB', value: formEdit.xsKB });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '系数KB符号':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'xsKBfh', value: formEdit.xsKBfh });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '高报警阈值':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'gbjyz', value: formEdit.gbjyz });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '低报警阈值':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dbjyz', value: formEdit.dbjyz });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '报警使能':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'bjsn', value: formEdit.bjsn });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '第一路485波特率':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyl485btl', value: formEdit.dyl485btl });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-      case '四个字节保存密码':
-        await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'sgzjbcmm', value: formEdit.sgzjbcmm });
-        visibleModalEdit1.value = false;
-        getStationList();
-        break;
-    }
   }
+}
 
-  //获取分站实时监测信息
-  async function getSubStationList() {
-    let res = await subStationList({ strtype: 'modbus' });
-    if (res.length != 0) {
-      cardList.value = res;
-      stationId.value = stationId.value ? stationId.value : cardList.value[0].id
-      openNum.value = cardList.value?.filter((v) => v.linkstatus == 1)['length'];
-      clsoeNum.value = cardList.value?.filter((v) => v.linkstatus == 0)['length'];
-    } else {
-      cardList.value = [];
-    }
-  }
-  //分站站点选项点击
-  function cardClick(item, index) {
-    selectedIndex.value = index; // 更新选中索引
-    activeIndex.value = item.isNewAccess || !item.linkstatus ? index : null;
-    stationName.value = item.strname;
-    stationStatus.value = item.linkstatus;
-    stationId.value = item.id;
-    isShow.value = true;
-    getStationList1();
-  }
-  //分站站点名称编辑
-  function changeName(val) {
-    getChangeStation();
+//下发
+async function handleClick(data) {
+  switch (data) {
+    case 'RS485_MODBUS地址':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'rs485modbusdz', value: formEdit.rs485modbusdz });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '探头安装距离':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'ttazjl', value: formEdit.ttazjl });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '基线距离':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'jxjl', value: formEdit.jxjl });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '安装角度':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'azjd', value: formEdit.azjd });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '设置时长':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'szsz', value: formEdit.szsz });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '数据平均周期':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'sjpjzq', value: formEdit.sjpjzq });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '第一路一发二收PG值':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dylyfesPGz', value: formEdit.dylyfesPGz });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '第一路二发一收PG值':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dylefysPGz', value: formEdit.dylefysPGz });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '风道截面积':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'fdjmj', value: formEdit.fdjmj });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '第一路整体系数k':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dylztxsk', value: formEdit.dylztxsk });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '第一路第一段系数':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyldydxs1', value: formEdit.dyldydxs1 });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '第一路第二段系数':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyldedxs2', value: formEdit.dyldedxs2 });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '第一路第三段系数':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyldsdxs3', value: formEdit.dyldsdxs3 });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '第一路第四段系数':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyldsdxs4', value: formEdit.dyldsdxs4 });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '第一路第五段系数':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyldwdxs5', value: formEdit.dyldwdxs5 });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '第一路第六段系数':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyldldxs6', value: formEdit.dyldldxs6 });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '系数KB':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'xsKB', value: formEdit.xsKB });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '系数KB符号':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'xsKBfh', value: formEdit.xsKBfh });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '高报警阈值':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'gbjyz', value: formEdit.gbjyz });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '低报警阈值':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dbjyz', value: formEdit.dbjyz });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '报警使能':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'bjsn', value: formEdit.bjsn });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '第一路485波特率':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'dyl485btl', value: formEdit.dyl485btl });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
+    case '四个字节保存密码':
+      await set158StationData({ stationId: devStationId.value, deviceId: formEdit.cgq, plcCode: 'sgzjbcmm', value: formEdit.sgzjbcmm });
+      visibleModalEdit1.value = false;
+      getStationList();
+      break;
   }
-  async function getChangeStation() {
-    let res = await getEdit({ id: stationId.value, strname: stationName.value, linkstatus: stationStatus.value });
-    getSubStationList();
-    isShow.value = false;
-  }
-  //站点连接状态修改
-  function changeStatus(val) {
-    getChangeStation();
-  }
-  //获取详细信息列表
-  async function getStationList1() {
-    let res = await getList({ subId: stationId.value, pageNo: pagination.current, pageSize: pagination.pageSize });
-    if (res && res.length != 0) {
-      res.forEach((el) => {
-        el.key = el.id;
-        el.linkIdC = el.linkId || '';
-        el.stripC = el.strip || '';
-        el.linkstatusC = el.linkstatus ? '连接' : '断开';
-        el.gdmsC = el.gdms == '1' ? '直流供电' : el.gdms == '0' ? '交流供电' : '';
-        el.children = el.devInfoList;
-        el.children.forEach((v) => {
-          v.key = v.id;
-          // v.debugTitle = v.deviceType == 'windrect_ds_25x' || v.deviceType == 'windrect_ds_two' ? '调试' : '';
-          v.debugTitle = v.status===1 ? '结束调试'  : v.status===0 ? '调试' : ''
-          v.stripC = v.strserno || '';
-          v.linkstatusC = v.netStatus ? '连接' : '断开';
-          v.linkIdC = v.linkId == '0' ? '未启用' : v.linkId == '1' ? '启用' : v.linkId == '2' ? '设备异常' : '';
-          v.updateTime = v.time;
-          v.gdmsC = v.gdms == '1' ? '直流供电' : v.gdms == '0' ? '交流供电' : '';
-          v.valueJc = `风向:${v.forward || ''},风量:${v.m3 || ''}m³/min,风速:${v.windSpeed || ''}m/s,气压:${v.pa || ''}Pa,压差:${v.difPress || ''
-            }Pa,温度:${v.temperature || ''}℃,湿度:${v.humidity || ''}%,断面积:${v.area || ''}㎡`;
-        });
-      });
-    }
+}
 
-    tableData.value = res;
-    pagination.total = res.total;
+//获取分站实时监测信息
+async function getSubStationList() {
+  let res = await subStationList({ strtype: 'modbus' });
+  if (res.length != 0) {
+    cardList.value = res;
+    stationId.value = stationId.value ? stationId.value : cardList.value[0].id
+    openNum.value = cardList.value?.filter((v) => v.linkstatus == 1)['length'];
+    clsoeNum.value = cardList.value?.filter((v) => v.linkstatus == 0)['length'];
+  } else {
+    cardList.value = [];
   }
-  async function getStationListAll() {
-    let res = await getListAll();
+}
+//分站站点选项点击
+function cardClick(item, index) {
+  selectedIndex.value = index; // 更新选中索引
+  activeIndex.value = item.isNewAccess || !item.linkstatus ? index : null;
+  stationName.value = item.strname;
+  stationStatus.value = item.linkstatus;
+  stationId.value = item.id;
+  isShow.value = true;
+  getStationList1();
+}
+//分站站点名称编辑
+function changeName(val) {
+  getChangeStation();
+}
+async function getChangeStation() {
+  let res = await getEdit({ id: stationId.value, strname: stationName.value, linkstatus: stationStatus.value });
+  getSubStationList();
+  isShow.value = false;
+}
+//站点连接状态修改
+function changeStatus(val) {
+  getChangeStation();
+}
+//获取详细信息列表
+async function getStationList1() {
+  let res = await getList({ subId: stationId.value, pageNo: pagination.current, pageSize: pagination.pageSize });
+  if (res && res.length != 0) {
     res.forEach((el) => {
       el.key = el.id;
       el.linkIdC = el.linkId || '';
@@ -846,8 +822,7 @@ async function tableExpand(expaned, record) {
       el.children = el.devInfoList;
       el.children.forEach((v) => {
         v.key = v.id;
-        // v.debugTitle = v.deviceType == 'windrect_ds_25x' || v.deviceType == 'windrect_ds_two' ? '调试' : '';
-           v.debugTitle = v.status===1 ? '结束调试'  : v.status===0 ? '调试' : ''
+        v.debugTitle = v.deviceType == 'windrect_ds_25x' || v.deviceType == 'windrect_ds_two' ? v.status === 1 ? '结束调试' : v.status === 0 ? '调试' : '' : ''
         v.stripC = v.strserno || '';
         v.linkstatusC = v.netStatus ? '连接' : '断开';
         v.linkIdC = v.linkId == '0' ? '未启用' : v.linkId == '1' ? '启用' : v.linkId == '2' ? '设备异常' : '';
@@ -857,171 +832,198 @@ async function tableExpand(expaned, record) {
           }Pa,温度:${v.temperature || ''}℃,湿度:${v.humidity || ''}%,断面积:${v.area || ''}㎡`;
       });
     });
-    tableData.value = res;
-    // pagination.total = res.total;
   }
-  //显示全部
-  function getAllShow() {
-    // pagination.current = 1;
-    // stationId.value = '';
-    getStationListAll();
-  }
-  //启动新设备
-  async function handlerunDeviceMonitor(record, val) {
-    devId.value = record.id;
-    switch (val) {
-      case '编辑':
-        visibleModalEdit.value = true;
-        startupDataEdit.address = record.strinstallpos;
-        paramId.value = record.devInfoList ? 'subId' : 'devId';
-        break;
-      case '启动':
-        visibleModal.value = true;
-        startupData.address = record.strinstallpos;
-        break;
-      case '删除':
-        await remove158Device({ devId: devId.value })
-        getStationList1()
-        break;
-    }
+
+  tableData.value = res;
+  pagination.total = res.total;
+}
+async function getStationListAll() {
+  let res = await getListAll();
+  res.forEach((el) => {
+    el.key = el.id;
+    el.linkIdC = el.linkId || '';
+    el.stripC = el.strip || '';
+    el.linkstatusC = el.linkstatus ? '连接' : '断开';
+    el.gdmsC = el.gdms == '1' ? '直流供电' : el.gdms == '0' ? '交流供电' : '';
+    el.children = el.devInfoList;
+    el.children.forEach((v) => {
+      v.key = v.id;
+      v.debugTitle = v.deviceType == 'windrect_ds_25x' || v.deviceType == 'windrect_ds_two' ? v.status === 1 ? '结束调试' : v.status === 0 ? '调试' : '' : ''
+      v.stripC = v.strserno || '';
+      v.linkstatusC = v.netStatus ? '连接' : '断开';
+      v.linkIdC = v.linkId == '0' ? '未启用' : v.linkId == '1' ? '启用' : v.linkId == '2' ? '设备异常' : '';
+      v.updateTime = v.time;
+      v.gdmsC = v.gdms == '1' ? '直流供电' : v.gdms == '0' ? '交流供电' : '';
+      v.valueJc = `风向:${v.forward || ''},风量:${v.m3 || ''}m³/min,风速:${v.windSpeed || ''}m/s,气压:${v.pa || ''}Pa,压差:${v.difPress || ''
+        }Pa,温度:${v.temperature || ''}℃,湿度:${v.humidity || ''}%,断面积:${v.area || ''}㎡`;
+    });
+  });
+  tableData.value = res;
+  // pagination.total = res.total;
+}
+//显示全部
+function getAllShow() {
+  // pagination.current = 1;
+  // stationId.value = '';
+  getStationListAll();
+}
+//启动新设备
+async function handlerunDeviceMonitor(record, val) {
+  devId.value = record.id;
+  switch (val) {
+    case '编辑':
+      visibleModalEdit.value = true;
+      startupDataEdit.address = record.strinstallpos;
+      paramId.value = record.devInfoList ? 'subId' : 'devId';
+      break;
+    case '启动':
+      visibleModal.value = true;
+      startupData.address = record.strinstallpos;
+      break;
+    case '删除':
+      await remove158Device({ devId: devId.value })
+      getStationList1()
+      break;
   }
-  //分站,设备调试
-  function debugClick(record) {
-    if (record.debugTitle == '调试') {
-      //正在调试中
-      startupDataDebug.speed = '';
-      startupDataDebug.direction = '';
-      visibleModalDebug.value = true;
-      debugFlag.value = 'device';
-      debugDeviceId.value = record.id;
-      tableData.value.forEach((el) => {
-        el.devInfoList.forEach((v) => {
-          if (v.id == debugDeviceId.value) {
-            debugStationId.value = el.id;
-          }
-        });
-      });
-      // record.debugTitle = '结束调试';
-    
-    } else if (record.debugTitle == '结束调试') {
-      debugFlag.value = 'device';
-      debugDeviceId.value = record.id;
-      tableData.value.forEach((el) => {
-        el.devInfoList.forEach((v) => {
-          if (v.id == debugDeviceId.value) {
-            debugStationId.value = el.id;
-          }
-        });
+}
+//分站,设备调试
+function debugClick(record) {
+  if (record.debugTitle == '调试') {
+    //正在调试中
+    startupDataDebug.speed = '';
+    startupDataDebug.direction = '';
+    visibleModalDebug.value = true;
+    debugFlag.value = 'device';
+    debugDeviceId.value = record.id;
+    tableData.value.forEach((el) => {
+      el.devInfoList.forEach((v) => {
+        if (v.id == debugDeviceId.value) {
+          debugStationId.value = el.id;
+        }
       });
-      // record.debugTitle = '调试';
-      stopDebug();
-     
-    }
-  }
-  //停止调试
-  async function stopDebug() {
-    let res = await updateDebugStatus({ stationId: debugStationId.value, deviceId: debugDeviceId.value, debugFlag: '0' });
-    if (res) {
-      getStationList1();
-    }
-   
-  }
-  async function handleOk() {
-    let res = await runDeviceMonitor({ devId: devId.value, devName: startupData.address });
-    visibleModal.value = false;
-    getStationList1({ subId: stationId.value, pageNo: pagination.current, pageSize: pagination.pageSize });
-  }
-  function handleCancel() {
-    visibleModal.value = false;
-    startupData.address = '';
-  }
-  //编辑
-  async function handleOkEdit() {
-    if (paramId.value == 'subId') {
-      let res = await update158DevName({ subId: devId.value, devName: startupDataEdit.address });
-      console.log(res, '设备名称编辑---');
-      visibleModalEdit.value = false;
-      getStationList1();
-    } else {
-      let res = await update158DevName({ devId: devId.value, devName: startupDataEdit.address });
-      console.log(res, '设备名称编辑---');
-      visibleModalEdit.value = false;
-      getStationList1();
-    }
-  }
-  //取消编辑
-  function handleCancelEdit() {
-    visibleModalEdit.value = false;
-    startupDataEdit.address = '';
-  }
-  //调试确认
-  async function handleOkDebug() {
-    let res = await updateDebugStatus({
-      stationId: debugStationId.value,
-      deviceId: debugDeviceId.value,
-      speed: startupDataDebug.speed,
-      direction: startupDataDebug.direction,
-      debugFlag: '1',
     });
-    if (res) {
-      visibleModalDebug.value = false;
-      getStationList1();
-    }
-   
-  }
-  //调试取消
-  function handleCancelDebug() {
-    visibleModalDebug.value = false;
+    // record.debugTitle = '结束调试';
+
+  } else if (record.debugTitle == '结束调试') {
+    debugFlag.value = 'device';
+    debugDeviceId.value = record.id;
     tableData.value.forEach((el) => {
       el.devInfoList.forEach((v) => {
-         v.debugTitle = v.status===1 ? '结束调试'  : v.status===0 ? '调试' : ''
+        if (v.id == debugDeviceId.value) {
+          debugStationId.value = el.id;
+        }
       });
     });
-    debugFlag.value = '';
-    debugStationId.value = '';
-    debugDeviceId.value = '';
+    // record.debugTitle = '调试';
+    stopDebug();
+
   }
-  //分页切换
-  function pageChange(val) {
-    pagination.current = val.current;
-    pagination.pageSize = val.pageSize;
+}
+//停止调试
+async function stopDebug() {
+  let res = await updateDebugStatus({ stationId: debugStationId.value, deviceId: debugDeviceId.value, debugFlag: '0' });
+  if (res) {
     getStationList1();
   }
 
-  //删除左侧分站
-  async function handleDelStation() {
-    let res = await remove158Substation({ stationId: stationId.value })
-    console.log(res, '删除左侧分站')
-    if (res) {
-      getSubStationList();
-      getStationList1();
-    }
-  }
-  //取消删除左侧分站
-  function handleCancelDelStation() { }
-
-  //操作记录查询
-  async function getSearchRecord(param) {
-    let res = await get158SetLog({ ...param })
-    if (res && res.length != 0) {
-      operationData.value = res.records
-    }
+}
+async function handleOk() {
+  let res = await runDeviceMonitor({ devId: devId.value, devName: startupData.address });
+  visibleModal.value = false;
+  getStationList1();
+}
+function handleCancel() {
+  visibleModal.value = false;
+  startupData.address = '';
+}
+//编辑
+async function handleOkEdit() {
+  if (paramId.value == 'subId') {
+    let res = await update158DevName({ subId: devId.value, devName: startupDataEdit.address });
+    console.log(res, '设备名称编辑---');
+    visibleModalEdit.value = false;
+    getStationList1();
+  } else {
+    let res = await update158DevName({ devId: devId.value, devName: startupDataEdit.address });
+    console.log(res, '设备名称编辑---');
+    visibleModalEdit.value = false;
+    getStationList1();
   }
-  onMounted(async () => {
-    await getSubStationList();
-    await getStationList1();
-    getMonitor()
+}
+//取消编辑
+function handleCancelEdit() {
+  visibleModalEdit.value = false;
+  startupDataEdit.address = '';
+}
+//调试确认
+async function handleOkDebug() {
+  let res = await updateDebugStatus({
+    stationId: debugStationId.value,
+    deviceId: debugDeviceId.value,
+    speed: startupDataDebug.speed,
+    direction: startupDataDebug.direction,
+    debugFlag: '1',
   });
-  onUnmounted(() => {
-    if (timer) {
-      clearTimeout(timer);
-      timer = undefined;
-    }
-    if (timer1) {
-      clearTimeout(timer1);
-      timer1 = undefined;
-    }
+  if (res) {
+    visibleModalDebug.value = false;
+    getStationList1();
+  }
+
+}
+//调试取消
+function handleCancelDebug() {
+  visibleModalDebug.value = false;
+  tableData.value.forEach((el) => {
+    el.devInfoList.forEach((v) => {
+      //  v.debugTitle = v.status===1 ? '结束调试'  : v.status===0 ? '调试' : ''
+      v.debugTitle = v.deviceType == 'windrect_ds_25x' || v.deviceType == 'windrect_ds_two' ? v.status === 1 ? '结束调试' : v.status === 0 ? '调试' : '' : ''
+    });
   });
+  debugFlag.value = '';
+  debugStationId.value = '';
+  debugDeviceId.value = '';
+}
+//分页切换
+function pageChange(val) {
+  pagination.current = val.current;
+  pagination.pageSize = val.pageSize;
+  getStationList1();
+}
+
+//删除左侧分站
+async function handleDelStation() {
+  let res = await remove158Substation({ stationId: stationId.value })
+  console.log(res, '删除左侧分站')
+  if (res) {
+    getSubStationList();
+    getStationList1();
+  }
+}
+//取消删除左侧分站
+function handleCancelDelStation() { }
+
+//操作记录查询
+async function getSearchRecord(param) {
+  let res = await get158SetLog({ ...param })
+  if (res && res.length != 0) {
+    operationData.value = res.records
+  }
+}
+onMounted(async () => {
+  await getSubStationList();
+  await getStationList1();
+  getMonitor()
+});
+onUnmounted(() => {
+  if (timer) {
+    clearTimeout(timer);
+    timer = undefined;
+  }
+  if (timer1) {
+    clearTimeout(timer1);
+    timer1 = undefined;
+  }
+});
 </script>
 
 <style lang="less" scoped>