Browse Source

1. 新增风窗瓦斯超限模拟

hongrunxia 2 months ago
parent
commit
4c310f07d7

+ 0 - 0
@/design/theme.less


+ 2 - 0
src/design/themify/default.less

@@ -34,6 +34,7 @@ html {
   --vent-base-light-bg-opcity: #60f4ff55;
   --vent-transparent: #ffffff00;
   --vent-font-color: #ffffff;
+  --vent-font-yellow-color: #ffae00;
   --vent-font-action-link: #7af5ff;
 
   --vent-configurable-bg: #09316a;
@@ -60,4 +61,5 @@ html {
   --vent-warn-tab-bg: #0f376ccc;
   --vent-warn-tab-border: #166ab5;
   --vent-warn-tab-bg-actived: #209dfc;
+  
 }

+ 0 - 0
src/views/vent/gas/components/list/@/design/vent/color.less


+ 1 - 1
src/views/vent/home/clique/components/mine-wind.vue

@@ -7,7 +7,7 @@
       </div>
       <div class="content-text">
         <template v-for="(item, index) in mineData" :key="index">
-          <div class="text" :style="{ color: item['isWarning'] ? '#F56731' : '#fff', fontWeight: item['isWarning'] ? '600' : 'normal' }">
+          <div class="text">
             <span>{{ item.deviceName }}</span>
             <span>{{ filterBadValue(item.jf) }}</span>
             <span>{{ filterBadValue(item.hf) }}</span>

+ 19 - 16
src/views/vent/monitorManager/alarmMonitor/warn/ventilateWarn.vue

@@ -30,7 +30,7 @@
             </div>
           </div>
           <div v-else class="hd-content">
-            <div class="hd-content-text">{{ hdData.address }}</div>
+            <div class="hd-content-text">巷道阻变型故障预警分析</div>
             <div class="hd-content-val">{{ hdData.maxLevel }}</div>
           </div>
         </div>
@@ -394,7 +394,7 @@
       }
     });
     let maxLevel = data.length != 0 ? data.reduce((a, b) => (a.leveld > b.leveld ? a : b)).leveld : 0;
-    hdData.address = data.length != 0 ? data.reduce((a, b) => (a.leveld > b.leveld ? a : b)).strName : '';
+    // hdData.address = data.length != 0 ? data.reduce((a, b) => (a.leveld > b.leveld ? a : b)).strName : '';
     console.log(hdData.maxLevel);
     if (maxLevel == 0) {
       hdData.maxLevel = '正常';
@@ -582,25 +582,28 @@
           .hd-content {
             position: relative;
             width: 100%;
-            height: 100px;
-            background: url('@/assets/images/fire/no-choice.png') no-repeat;
+            height: 300px;
+            padding: 0 20px;
+            background: var(--image-no-choice) no-repeat;
             background-size: 100% 100%;
             .hd-content-text {
-              position: absolute;
-              left: 50%;
-              top: 26px;
-              transform: translate(-50%, 0);
-              font-family: 'douyuFont';
-              font-size: 16px;
-              color: var(--vent-table-action-link);
+              display: flex;
+              width: 100%;
+              height: 200px;
+              align-items: center;
+              justify-content: center;
+              font-size: 18px;
+              color: var(--vent-font-yellow-color);
             }
             .hd-content-val {
               position: absolute;
-              left: 50%;
-              bottom: 12px;
-              transform: translate(-50%, 0);
-              font-size: 14px;
-              color: var(--vent-font-color);
+              width: calc(100% - 40px);
+              display: flex;
+              justify-content: center;
+              font-family: 'douyuFont';
+              bottom: 80px;
+              font-size: 20px;
+              color: var(--vent-table-action-link);
             }
           }
         }

+ 5 - 0
src/views/vent/monitorManager/comment/HistoryTable.vue

@@ -85,6 +85,7 @@
     ['6', '10m'],
     ['7', '30m'],
     ['8', '1h'],
+    ['9', '1d'],
   ]);
 
   const getExportXlsUrl = () => {
@@ -417,6 +418,10 @@
                         label: '1小时',
                         value: '8',
                       },
+                      {
+                        label: '1天',
+                        value: '9',
+                      },
                     ],
                   },
                   colProps: {

+ 134 - 101
src/views/vent/monitorManager/comment/bundleMonitorTable.vue

@@ -17,134 +17,167 @@
       </a-row>
     </div>
     <div class="content-area">
-      <a-table :columns="bundleColumns" :data-source="tableData" size="small" class="tableW" :scroll="{ y: 300 }"> </a-table>
+      <a-table v-if="columns.length > 0" :columns="columns" :data-source="tableData" size="small" class="tableW" :scroll="{ y: 300 }">
+        <template #bodyCell="{ column, record }">
+          <a v-if="column.dataIndex === 'operation'" class="table-action-link" @click="handlerLocation(record)">定位</a>
+        </template>
+      </a-table>
     </div>
   </div>
 </template>
 
 <script setup lang="ts">
-import { ref, onMounted, reactive } from 'vue';
-import { bundleColumns } from './comment.data';
-import { getInfoList, getAllFileList } from './comment.api';
-// import 'ant-design-vue/dist/antd.css'; // 引入样式
-let selectList = ref<any[]>([]);
-let jcddArr = ref<any[]>([]);
-let createBy = ref<any[]>([]);
-let createTime = ref<any[]>([]);
-let formSearch = reactive({
-  pageNum: 1,
-  pageSize: 1000,
-  fileId: '',
-  fileName: '',
-});
-const latentCount = ref(0); // 缓慢氧化阶段(潜伏期)
-const selfHeatingCount = ref(0); // 加速氧化阶段(自热期)
-const combustionCount = ref(0); // 剧烈氧化阶段(燃烧期)
-const latentPercent = ref(0); // 缓慢氧化阶段(潜伏期)
-const selfHeatingPercent = ref(0); // 加速氧化阶段(自热期)
-const combustionPercent = ref(0); // 剧烈氧化阶段(燃烧期)
-let tableData = ref<any[]>([]);
-let selectedFileId = ref<string | null>(null);
-//获取束管日报
-async function getTableList(params: any) {
-  let res = await getInfoList({ type: 'bundle', ...params });
-  const content = res.content;
-  let contentArr = JSON.parse(content);
-  createBy.value = res.createBy;
-  createTime.value = res.createTime;
-  latentCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '缓慢氧化阶段(潜伏期)').length;
-  selfHeatingCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '加速氧化阶段(自热期)').length;
-  combustionCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '剧烈氧化阶段(燃烧期)').length;
-  const total = contentArr.length;
-  latentPercent.value = (latentCount.value / total) * 100;
-  selfHeatingPercent.value = (selfHeatingCount.value / total) * 100;
-  combustionPercent.value = (combustionCount.value / total) * 100;
-  tableData.value = contentArr;
-}
+  import { ref, onMounted, reactive, watch } from 'vue';
+  import { bundleColumns } from './comment.data';
+  import { getInfoList, getAllFileList } from './comment.api';
+  // import 'ant-design-vue/dist/antd.css'; // 引入样式
+  const emit = defineEmits(['locate']);
+  const props = defineProps({
+    isShowAction: {
+      type: Boolean,
+      default: false,
+    },
+  });
+  let selectList = ref<any[]>([]);
+  let jcddArr = ref<any[]>([]);
+  let createBy = ref<any[]>([]);
+  let createTime = ref<any[]>([]);
+  let formSearch = reactive({
+    pageNum: 1,
+    pageSize: 1000,
+    fileId: '',
+    fileName: '',
+  });
+  const latentCount = ref(0); // 缓慢氧化阶段(潜伏期)
+  const selfHeatingCount = ref(0); // 加速氧化阶段(自热期)
+  const combustionCount = ref(0); // 剧烈氧化阶段(燃烧期)
+  const latentPercent = ref(0); // 缓慢氧化阶段(潜伏期)
+  const selfHeatingPercent = ref(0); // 加速氧化阶段(自热期)
+  const combustionPercent = ref(0); // 剧烈氧化阶段(燃烧期)
+  let tableData = ref<any[]>([]);
+  let selectedFileId = ref<string | null>(null);
+  const columns = ref([]);
+  watch(
+    () => props.isShowAction,
+    (value) => {
+      if (value) {
+        bundleColumns.push({
+          title: '操作',
+          dataIndex: 'operation',
+          width: 100,
+          align: 'center',
+        });
+        if (columns.value.length == 0) columns.value = bundleColumns;
+      } else {
+        if (columns.value.length == 0) columns.value = bundleColumns;
+      }
+    },
+    { immediate: true }
+  );
+  function handlerLocation(record) {
+    emit('locate', record);
+  }
 
-//获取所有文件列表
-async function getAllFile() {
-  let res = await getAllFileList({ type: 'bundle' });
-  selectList.value = res.records.map((item: any) => ({
-    fileId: item.fileId,
-    fileName: item.fileName,
-  }));
-  jcddArr.value = res.records.map((item: any) => ({
-    fileId: item.jcdd,
-  }));
-  if (selectList.value.length > 0) {
-    formSearch.fileId = selectList.value[0].fileId;
-    getSearch();
+  //获取束管日报
+  async function getTableList(params: any) {
+    let res = await getInfoList({ type: 'bundle', ...params });
+    const content = res.content;
+    let contentArr = JSON.parse(content);
+    createBy.value = res.createBy;
+    createTime.value = res.createTime;
+    latentCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '缓慢氧化阶段(潜伏期)').length;
+    selfHeatingCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '加速氧化阶段(自热期)').length;
+    combustionCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '剧烈氧化阶段(燃烧期)').length;
+    const total = contentArr.length;
+    latentPercent.value = (latentCount.value / total) * 100;
+    selfHeatingPercent.value = (selfHeatingCount.value / total) * 100;
+    combustionPercent.value = (combustionCount.value / total) * 100;
+    tableData.value = contentArr;
   }
-}
-//查询
-function getSearch() {
-  const selectedFile = selectList.value.find((item) => item.fileId === formSearch.fileId);
-  const params = {
-    fileId: formSearch.fileId,
-    fileName: selectedFile ? selectedFile.fileName : '',
-  };
-  getTableList(params);
-}
-onMounted(() => {
-  getTableList({ type: 'bundle' });
-  getAllFile().then(() => {
+
+  //获取所有文件列表
+  async function getAllFile() {
+    let res = await getAllFileList({ type: 'bundle' });
+    selectList.value = res.records.map((item: any) => ({
+      fileId: item.fileId,
+      fileName: item.fileName,
+    }));
+    jcddArr.value = res.records.map((item: any) => ({
+      fileId: item.jcdd,
+    }));
     if (selectList.value.length > 0) {
       formSearch.fileId = selectList.value[0].fileId;
-      selectedFileId.value = selectList.value[0].fileId;
       getSearch();
     }
+  }
+  //查询
+  function getSearch() {
+    const selectedFile = selectList.value.find((item) => item.fileId === formSearch.fileId);
+    const params = {
+      fileId: formSearch.fileId,
+      fileName: selectedFile ? selectedFile.fileName : '',
+    };
+    getTableList(params);
+  }
+  onMounted(() => {
+    getTableList({ type: 'bundle' });
+    getAllFile().then(() => {
+      if (selectList.value.length > 0) {
+        formSearch.fileId = selectList.value[0].fileId;
+        selectedFileId.value = selectList.value[0].fileId;
+        getSearch();
+      }
+    });
   });
-});
 </script>
 
 <style lang="less" scoped>
-@ventSpace: zxm;
-.dustMonitor {
-  .search-area {
-    margin: 15px;
+  @ventSpace: zxm;
+  .dustMonitor {
+    .search-area {
+      margin: 15px;
 
-    .area-item {
-      display: flex;
-      align-items: center;
+      .area-item {
+        display: flex;
+        align-items: center;
 
-      .item-text {
-        color: #fff;
+        .item-text {
+          color: #fff;
+        }
       }
     }
-  }
 
-  .zxm-picker,
-  .zxm-input {
-    border: 1px solid #3ad8ff77;
-    background-color: #ffffff00;
-    color: #fff;
+    .zxm-picker,
+    .zxm-input {
+      border: 1px solid #3ad8ff77;
+      background-color: #ffffff00;
+      color: #fff;
+    }
   }
-}
 
-:deep(.@{ventSpace}-table-body) {
-  height: auto !important;
+  :deep(.@{ventSpace}-table-body) {
+    height: auto !important;
 
-  tr > td {
-    background: #ffffff00 !important;
-  }
+    tr > td {
+      background: #ffffff00 !important;
+    }
 
-  tr.@{ventSpace}-table-row-selected {
-    td {
-      background: #007cc415 !important;
+    tr.@{ventSpace}-table-row-selected {
+      td {
+        background: #007cc415 !important;
+      }
     }
   }
-}
 
-:deep(.jeecg-basic-table .@{ventSpace}-table-wrapper .@{ventSpace}-table-title) {
-  min-height: 0;
-}
+  :deep(.jeecg-basic-table .@{ventSpace}-table-wrapper .@{ventSpace}-table-title) {
+    min-height: 0;
+  }
 
-:deep(.@{ventSpace}-pagination) {
-  margin-right: 20px !important;
-}
+  :deep(.@{ventSpace}-pagination) {
+    margin-right: 20px !important;
+  }
 
-:deep(.zxm-table-thead > tr > th:last-child) {
-  border-right: 1px solid #91e9fe55 !important;
-}
+  :deep(.zxm-table-thead > tr > th:last-child) {
+    border-right: 1px solid #91e9fe55 !important;
+  }
 </style>

+ 132 - 97
src/views/vent/monitorManager/comment/bundleSpyMonitorTable.vue

@@ -16,129 +16,164 @@
         </a-col>
       </a-row>
     </div>
-    <div class="content-area"> <a-table :columns="bundleSpycolumns" :data-source="tableData" size="small" class="tableW" :scroll="{ y: 250 }" /></div>
+    <div class="content-area">
+      <a-table v-if="columns.length > 0" :columns="columns" :data-source="tableData" size="small" class="tableW" :scroll="{ y: 250 }">
+        <template #bodyCell="{ column, record }">
+          <a v-if="column.dataIndex === 'operation'" class="table-action-link" @click="handlerLocation(record)">定位</a>
+        </template>
+      </a-table>
+    </div>
   </div>
 </template>
 
 <script setup lang="ts">
-import { ref, onMounted, reactive } from 'vue';
-import { bundleSpycolumns } from './comment.data';
-import { getInfoList, getAllFileList } from './comment.api';
-// import 'ant-design-vue/dist/antd.css'; // 引入样式
-let selectList = ref<any[]>([]);
+  import { ref, onMounted, reactive, watch } from 'vue';
+  import { bundleSpycolumns } from './comment.data';
+  import { getInfoList, getAllFileList } from './comment.api';
+  // import 'ant-design-vue/dist/antd.css'; // 引入样式
+  const emit = defineEmits(['locate']);
+  const props = defineProps({
+    isShowAction: {
+      type: Boolean,
+      default: false,
+    },
+  });
+  const columns = ref([]);
+  watch(
+    () => props.isShowAction,
+    (value) => {
+      if (value) {
+        bundleSpycolumns.push({
+          title: '操作',
+          dataIndex: 'operation',
+          width: 100,
+          align: 'center',
+        });
+        if (columns.value.length == 0) columns.value = bundleSpycolumns;
+      } else {
+        if (columns.value.length == 0) columns.value = bundleSpycolumns;
+      }
+    },
+    { immediate: true }
+  );
 
-let formSearch = reactive({
-  pageNum: 1,
-  pageSize: 1000,
-  fileId: '',
-  fileName: '',
-});
-const latentCount = ref(0); // 缓慢氧化阶段(潜伏期)
-const selfHeatingCount = ref(0); // 加速氧化阶段(自热期)
-const combustionCount = ref(0); // 剧烈氧化阶段(燃烧期)
-const latentPercent = ref(0); // 缓慢氧化阶段(潜伏期)
-const selfHeatingPercent = ref(0); // 加速氧化阶段(自热期)
-const combustionPercent = ref(0); // 剧烈氧化阶段(燃烧期)
-let createBy = ref<any[]>([]);
-let createTime = ref<any[]>([]);
-let tableData = ref<any[]>([]);
-let selectedFileId = ref<string | null>(null);
-//获取色谱仪报表
-async function getTableList(params: any) {
-  let res = await getInfoList({ type: 'bundleSpy', ...params });
-  const content = res.content;
-  let contentArr = JSON.parse(content);
-  createBy.value = res.createBy;
-  createTime.value = res.createTime;
-  latentCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '缓慢氧化阶段(潜伏期)').length;
-  selfHeatingCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '加速氧化阶段(自热期)').length;
-  combustionCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '剧烈氧化阶段(燃烧期)').length;
-  const total = contentArr.length;
-  latentPercent.value = (latentCount.value / total) * 100;
-  selfHeatingPercent.value = (selfHeatingCount.value / total) * 100;
-  combustionPercent.value = (combustionCount.value / total) * 100;
-  tableData.value = contentArr;
-}
-//获取所有文件列表
-async function getAllFile() {
-  let res = await getAllFileList({ type: 'bundleSpy' });
-  selectList.value = res.records.map((item: any) => ({
-    fileId: item.fileId,
-    fileName: item.fileName,
-  }));
-  if (selectList.value.length > 0) {
-    formSearch.fileId = selectList.value[0].fileId;
-    getSearch();
+  let selectList = ref<any[]>([]);
+
+  let formSearch = reactive({
+    pageNum: 1,
+    pageSize: 1000,
+    fileId: '',
+    fileName: '',
+  });
+  const latentCount = ref(0); // 缓慢氧化阶段(潜伏期)
+  const selfHeatingCount = ref(0); // 加速氧化阶段(自热期)
+  const combustionCount = ref(0); // 剧烈氧化阶段(燃烧期)
+  const latentPercent = ref(0); // 缓慢氧化阶段(潜伏期)
+  const selfHeatingPercent = ref(0); // 加速氧化阶段(自热期)
+  const combustionPercent = ref(0); // 剧烈氧化阶段(燃烧期)
+  let createBy = ref<any[]>([]);
+  let createTime = ref<any[]>([]);
+  let tableData = ref<any[]>([]);
+  let selectedFileId = ref<string | null>(null);
+  //获取色谱仪报表
+  async function getTableList(params: any) {
+    let res = await getInfoList({ type: 'bundleSpy', ...params });
+    const content = res.content;
+    let contentArr = JSON.parse(content);
+    createBy.value = res.createBy;
+    createTime.value = res.createTime;
+    latentCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '缓慢氧化阶段(潜伏期)').length;
+    selfHeatingCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '加速氧化阶段(自热期)').length;
+    combustionCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '剧烈氧化阶段(燃烧期)').length;
+    const total = contentArr.length;
+    latentPercent.value = (latentCount.value / total) * 100;
+    selfHeatingPercent.value = (selfHeatingCount.value / total) * 100;
+    combustionPercent.value = (combustionCount.value / total) * 100;
+    tableData.value = contentArr;
   }
-}
-//查询
-function getSearch() {
-  const selectedFile = selectList.value.find((item) => item.fileId === formSearch.fileId);
-  const params = {
-    fileId: formSearch.fileId,
-    fileName: selectedFile ? selectedFile.fileName : '',
-  };
-  getTableList(params);
-}
-onMounted(() => {
-  getTableList({ type: 'bundleSpy' });
-  getAllFile().then(() => {
+  //获取所有文件列表
+  async function getAllFile() {
+    let res = await getAllFileList({ type: 'bundleSpy' });
+    selectList.value = res.records.map((item: any) => ({
+      fileId: item.fileId,
+      fileName: item.fileName,
+    }));
     if (selectList.value.length > 0) {
       formSearch.fileId = selectList.value[0].fileId;
-      selectedFileId.value = selectList.value[0].fileId;
       getSearch();
     }
+  }
+  //查询
+  function getSearch() {
+    const selectedFile = selectList.value.find((item) => item.fileId === formSearch.fileId);
+    const params = {
+      fileId: formSearch.fileId,
+      fileName: selectedFile ? selectedFile.fileName : '',
+    };
+    getTableList(params);
+  }
+  function handlerLocation(record) {
+    emit('locate', record);
+  }
+  onMounted(() => {
+    getTableList({ type: 'bundleSpy' });
+    getAllFile().then(() => {
+      if (selectList.value.length > 0) {
+        formSearch.fileId = selectList.value[0].fileId;
+        selectedFileId.value = selectList.value[0].fileId;
+        getSearch();
+      }
+    });
   });
-});
 </script>
 
 <style lang="less" scoped>
-@ventSpace: zxm;
-.dustMonitor {
-  .search-area {
-    margin: 15px;
+  @ventSpace: zxm;
+  .dustMonitor {
+    .search-area {
+      margin: 15px;
 
-    .area-item {
-      display: flex;
-      align-items: center;
+      .area-item {
+        display: flex;
+        align-items: center;
 
-      .item-text {
-        color: #fff;
+        .item-text {
+          color: #fff;
+        }
       }
     }
-  }
 
-  .zxm-picker,
-  .zxm-input {
-    border: 1px solid #3ad8ff77;
-    background-color: #ffffff00;
-    color: #fff;
+    .zxm-picker,
+    .zxm-input {
+      border: 1px solid #3ad8ff77;
+      background-color: #ffffff00;
+      color: #fff;
+    }
   }
-}
 
-:deep(.@{ventSpace}-table-body) {
-  height: auto !important;
+  :deep(.@{ventSpace}-table-body) {
+    height: auto !important;
 
-  tr > td {
-    background: #ffffff00 !important;
-  }
+    tr > td {
+      background: #ffffff00 !important;
+    }
 
-  tr.@{ventSpace}-table-row-selected {
-    td {
-      background: #007cc415 !important;
+    tr.@{ventSpace}-table-row-selected {
+      td {
+        background: #007cc415 !important;
+      }
     }
   }
-}
 
-:deep(.jeecg-basic-table .@{ventSpace}-table-wrapper .@{ventSpace}-table-title) {
-  min-height: 0;
-}
+  :deep(.jeecg-basic-table .@{ventSpace}-table-wrapper .@{ventSpace}-table-title) {
+    min-height: 0;
+  }
 
-:deep(.@{ventSpace}-pagination) {
-  margin-right: 20px !important;
-}
+  :deep(.@{ventSpace}-pagination) {
+    margin-right: 20px !important;
+  }
 
-:deep(.zxm-table-thead > tr > th:last-child) {
-  border-right: 1px solid #91e9fe55 !important;
-}
+  :deep(.zxm-table-thead > tr > th:last-child) {
+    border-right: 1px solid #91e9fe55 !important;
+  }
 </style>

+ 197 - 164
src/views/vent/monitorManager/comment/dustMonitorTable.vue

@@ -16,207 +16,240 @@
         </a-col>
       </a-row>
     </div>
-    <div class="content-area"> <a-table :columns="dsutColumns" :data-source="tableData" size="small" class="tableW" :scroll="{ y: 250 }" /></div>
+    <div class="content-area">
+      <a-table v-if="columns.length > 0" :columns="columns" :data-source="tableData" size="small" class="tableW" :scroll="{ y: 250 }">
+        <template #bodyCell="{ column, record }">
+          <a v-if="column.dataIndex === 'operation'" class="table-action-link" @click="handlerLocation(record)">定位</a>
+        </template>
+      </a-table>
+    </div>
   </div>
 </template>
 
 <script setup lang="ts">
-import { ref, onMounted, reactive, computed, watch, nextTick } from 'vue';
-import { dsutColumns } from './comment.data';
-import { getInfoList, getAllFileList } from './comment.api';
-let tableData = ref<any[]>([]);
-let selectList = ref<any[]>([]);
-let resultByWorkplace = ref<any[]>([]);
-let AllMaxValues = ref<any[]>([]);
-let filteredResultByWorkplace = ref<any[]>([]); //根据工作场所查询的数据
-let workplaceList = ref<any[]>([]); //根据工作场所查询的数据
-let selectedFileId = ref<string | null>(null);
-let selectedWorkplace = ref<string | null>(null);
-let DefaultValue = ref<string | null>(null);
-let createBy = ref<any[]>([]);
-let createTime = ref<any[]>([]);
-let formSearch = reactive({
-  pageNum: 1,
-  pageSize: 1000,
-  fileId: '',
-  fileName: '',
-});
-
-//获取粉尘监测结果数据
-async function getTableList(params: any) {
-  let res = await getInfoList({ type: 'smoke', ...params });
-  const content = res.content;
-  let contentArr = JSON.parse(content);
-  tableData.value = contentArr;
-  createBy.value = res.createBy;
-  createTime.value = res.createTime;
-  processTableData(contentArr);
-  if (workplaceList.value.length > 0) {
-    console.log(workplaceList.value, 'workplaceList');
-    DefaultValue.value = workplaceList.value[0];
-    workPlaceChange(selectedWorkplace.value);
+  import { ref, onMounted, reactive, computed, watch, nextTick } from 'vue';
+  import { dsutColumns } from './comment.data';
+  import { getInfoList, getAllFileList } from './comment.api';
+  const emit = defineEmits(['locate']);
+  const props = defineProps({
+    isShowAction: {
+      type: Boolean,
+      default: false,
+    },
+  });
+  let tableData = ref<any[]>([]);
+  let selectList = ref<any[]>([]);
+  let resultByWorkplace = ref<any[]>([]);
+  let AllMaxValues = ref<any[]>([]);
+  let filteredResultByWorkplace = ref<any[]>([]); //根据工作场所查询的数据
+  let workplaceList = ref<any[]>([]); //根据工作场所查询的数据
+  let selectedFileId = ref<string | null>(null);
+  let selectedWorkplace = ref<string | null>(null);
+  let DefaultValue = ref<string | null>(null);
+  let createBy = ref<any[]>([]);
+  let createTime = ref<any[]>([]);
+  let formSearch = reactive({
+    pageNum: 1,
+    pageSize: 1000,
+    fileId: '',
+    fileName: '',
+  });
+  const columns = ref([]);
+  watch(
+    () => props.isShowAction,
+    (value) => {
+      if (value) {
+        dsutColumns.push({
+          title: '操作',
+          dataIndex: 'operation',
+          width: 100,
+          align: 'center',
+        });
+        if (columns.value.length == 0) columns.value = dsutColumns;
+      } else {
+        if (columns.value.length == 0) columns.value = dsutColumns;
+      }
+    },
+    { immediate: true }
+  );
+  function handlerLocation(record) {
+    emit('locate', record);
   }
-}
-// 处理 tableData 数据
-function processTableData(data: any) {
-  // 根据 gzcs 字段进行分组
-  const groupedData = data.reduce((acc: any, item: any) => {
-    const workplace = item.gzcs;
-    if (!acc[workplace]) {
-      acc[workplace] = [];
+  //获取粉尘监测结果数据
+  async function getTableList(params: any) {
+    let res = await getInfoList({ type: 'smoke', ...params });
+    const content = res.content;
+    let contentArr = JSON.parse(content);
+    tableData.value = contentArr;
+    createBy.value = res.createBy;
+    createTime.value = res.createTime;
+    processTableData(contentArr);
+    if (workplaceList.value.length > 0) {
+      console.log(workplaceList.value, 'workplaceList');
+      DefaultValue.value = workplaceList.value[0];
+      workPlaceChange(selectedWorkplace.value);
     }
-    acc[workplace].push(item);
-    return acc;
-  }, {});
-
-  // 筛选每个工作场所下的最大值
-  const result = Object.keys(groupedData).flatMap((workplace) => {
-    const items = groupedData[workplace];
-    const maxValues = [
-      { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-      { key: 'jx_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-      { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-      { key: 'jx_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-      { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-      { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-      { key: 'zcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-      { key: 'zcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-      { key: 'hcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-      { key: 'hcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
-    ];
+  }
+  // 处理 tableData 数据
+  function processTableData(data: any) {
+    // 根据 gzcs 字段进行分组
+    const groupedData = data.reduce((acc: any, item: any) => {
+      const workplace = item.gzcs;
+      if (!acc[workplace]) {
+        acc[workplace] = [];
+      }
+      acc[workplace].push(item);
+      return acc;
+    }, {});
+
+    // 筛选每个工作场所下的最大值
+    const result = Object.keys(groupedData).flatMap((workplace) => {
+      const items = groupedData[workplace];
+      const maxValues = [
+        { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
+        { key: 'jx_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
+        { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
+        { key: 'jx_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
+        { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
+        { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
+        { key: 'zcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
+        { key: 'zcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
+        { key: 'hcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
+        { key: 'hcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
+      ];
+
+      items.forEach((item: any) => {
+        maxValues.forEach((maxValue) => {
+          if (item[maxValue.key] > maxValue.value) {
+            maxValue.value = item[maxValue.key];
+            maxValue.gz = item.gz;
+            maxValue.jcdd = item.jcdd;
+            maxValue.fczl = item.fczl;
+          }
+        });
+      });
 
-    items.forEach((item: any) => {
-      maxValues.forEach((maxValue) => {
+      return maxValues;
+    });
+
+    resultByWorkplace.value = result;
+    workplaceList.value = Array.from(new Set(resultByWorkplace.value.map((item) => item.gzcs)));
+    if (workplaceList.value.length > 0) {
+      selectedWorkplace.value = workplaceList.value[0];
+      workPlaceChange(selectedWorkplace.value);
+    }
+    // 筛选整个 tableData 下的最大值
+    const overallMaxValues = [
+      { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+      { key: 'jx_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+      { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+      { key: 'jx_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+      { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+      { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+      { key: 'zcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+      { key: 'zcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+      { key: 'hcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+      { key: 'hcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
+    ];
+    data.forEach((item: any) => {
+      overallMaxValues.forEach((maxValue) => {
         if (item[maxValue.key] > maxValue.value) {
           maxValue.value = item[maxValue.key];
           maxValue.gz = item.gz;
           maxValue.jcdd = item.jcdd;
           maxValue.fczl = item.fczl;
+          maxValue.gzcs = item.gzcs;
         }
       });
     });
 
-    return maxValues;
-  });
-
-  resultByWorkplace.value = result;
-  workplaceList.value = Array.from(new Set(resultByWorkplace.value.map((item) => item.gzcs)));
-  if (workplaceList.value.length > 0) {
-    selectedWorkplace.value = workplaceList.value[0];
-    workPlaceChange(selectedWorkplace.value);
-  }
-  // 筛选整个 tableData 下的最大值
-  const overallMaxValues = [
-    { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
-    { key: 'jx_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
-    { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
-    { key: 'jx_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
-    { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
-    { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
-    { key: 'zcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
-    { key: 'zcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
-    { key: 'hcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
-    { key: 'hcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
-  ];
-  data.forEach((item: any) => {
-    overallMaxValues.forEach((maxValue) => {
-      if (item[maxValue.key] > maxValue.value) {
-        maxValue.value = item[maxValue.key];
-        maxValue.gz = item.gz;
-        maxValue.jcdd = item.jcdd;
-        maxValue.fczl = item.fczl;
-        maxValue.gzcs = item.gzcs;
-      }
-    });
-  });
-
-  AllMaxValues.value = overallMaxValues;
-}
-//获取所有文件列表
-async function getAllFile() {
-  let res = await getAllFileList({ type: 'smoke' });
-  selectList.value = res.records.map((item: any) => ({
-    fileId: item.fileId,
-    fileName: item.fileName,
-  }));
-  if (selectList.value.length > 0) {
-    formSearch.fileId = selectList.value[0].fileId;
-    getSearch();
+    AllMaxValues.value = overallMaxValues;
   }
-}
-//查询
-function getSearch() {
-  const selectedFile = selectList.value.find((item) => item.fileId === formSearch.fileId);
-  const params = {
-    fileId: formSearch.fileId,
-    fileName: selectedFile ? selectedFile.fileName : '',
-  };
-  getTableList(params);
-}
-function workPlaceChange(value: any) {
-  selectedWorkplace.value = value;
-  filteredResultByWorkplace.value = resultByWorkplace.value.filter((item) => item.gzcs === value);
-}
-
-onMounted(() => {
-  getTableList({ type: 'smoke' });
-  getAllFile().then(() => {
+  //获取所有文件列表
+  async function getAllFile() {
+    let res = await getAllFileList({ type: 'smoke' });
+    selectList.value = res.records.map((item: any) => ({
+      fileId: item.fileId,
+      fileName: item.fileName,
+    }));
     if (selectList.value.length > 0) {
       formSearch.fileId = selectList.value[0].fileId;
-      selectedFileId.value = selectList.value[0].fileId;
       getSearch();
     }
+  }
+  //查询
+  function getSearch() {
+    const selectedFile = selectList.value.find((item) => item.fileId === formSearch.fileId);
+    const params = {
+      fileId: formSearch.fileId,
+      fileName: selectedFile ? selectedFile.fileName : '',
+    };
+    getTableList(params);
+  }
+  function workPlaceChange(value: any) {
+    selectedWorkplace.value = value;
+    filteredResultByWorkplace.value = resultByWorkplace.value.filter((item) => item.gzcs === value);
+  }
+
+  onMounted(() => {
+    getTableList({ type: 'smoke' });
+    getAllFile().then(() => {
+      if (selectList.value.length > 0) {
+        formSearch.fileId = selectList.value[0].fileId;
+        selectedFileId.value = selectList.value[0].fileId;
+        getSearch();
+      }
+    });
   });
-});
 </script>
 
 <style lang="less" scoped>
-@ventSpace: zxm;
-.dustMonitor {
-  .search-area {
-    margin: 15px;
+  @ventSpace: zxm;
+  .dustMonitor {
+    .search-area {
+      margin: 15px;
 
-    .area-item {
-      display: flex;
-      align-items: center;
+      .area-item {
+        display: flex;
+        align-items: center;
 
-      .item-text {
-        color: #fff;
+        .item-text {
+          color: #fff;
+        }
       }
     }
-  }
 
-  .zxm-picker,
-  .zxm-input {
-    border: 1px solid #3ad8ff77;
-    background-color: #ffffff00;
-    color: #fff;
+    .zxm-picker,
+    .zxm-input {
+      border: 1px solid #3ad8ff77;
+      background-color: #ffffff00;
+      color: #fff;
+    }
   }
-}
 
-:deep(.@{ventSpace}-table-body) {
-  height: auto !important;
+  :deep(.@{ventSpace}-table-body) {
+    height: auto !important;
 
-  tr > td {
-    background: #ffffff00 !important;
-  }
+    tr > td {
+      background: #ffffff00 !important;
+    }
 
-  tr.@{ventSpace}-table-row-selected {
-    td {
-      background: #007cc415 !important;
+    tr.@{ventSpace}-table-row-selected {
+      td {
+        background: #007cc415 !important;
+      }
     }
   }
-}
 
-:deep(.jeecg-basic-table .@{ventSpace}-table-wrapper .@{ventSpace}-table-title) {
-  min-height: 0;
-}
+  :deep(.jeecg-basic-table .@{ventSpace}-table-wrapper .@{ventSpace}-table-title) {
+    min-height: 0;
+  }
 
-:deep(.@{ventSpace}-pagination) {
-  margin-right: 20px !important;
-}
+  :deep(.@{ventSpace}-pagination) {
+    margin-right: 20px !important;
+  }
 
-:deep(.zxm-table-thead > tr > th:last-child) {
-  border-right: 1px solid #91e9fe55 !important;
-}
+  :deep(.zxm-table-thead > tr > th:last-child) {
+    border-right: 1px solid #91e9fe55 !important;
+  }
 </style>

+ 9 - 1
src/views/vent/monitorManager/comment/gaspatrolTable.vue

@@ -37,7 +37,11 @@
       </a-row>
     </div>
     <div class="content-area">
-      <a-table :columns="Columns" size="small" :data-source="gaspatrolTableData" class="tableW" :pagination="false" />
+      <a-table :columns="Columns" size="small" :data-source="gaspatrolTableData" class="tableW" :pagination="false">
+        <!-- <template #bodyCell="{ column, record }">
+          <a v-if="column.dataIndex === 'operation'" class="table-action-link" @click="handlerLocation(record)">定位</a>
+        </template> -->
+      </a-table>
     </div>
   </div>
 </template>
@@ -46,6 +50,10 @@
   import { ref, reactive, onMounted, watch } from 'vue';
   import { gaspatrolColumnsOne, gaspatrolColumnsTwo } from './comment.data';
   let props = defineProps({
+    isShowAction: {
+      type: Boolean,
+      default: false,
+    },
     addressData: {
       type: String,
       default: '',

+ 4 - 0
src/views/vent/monitorManager/deviceMonitor/components/device/device.data.ts

@@ -520,6 +520,10 @@ export const haveHandlerArr = [
   'spray',
   'dustdev',
   'gate_linkdlfm',
+  'bundleSpyDayReport',
+  'dustDayReport',
+  'bundleDayReport',
+  'gasDayReport',
 
   // 'firemon',
 ]; // table无操作

+ 8 - 3
src/views/vent/monitorManager/deviceMonitor/components/device/index.vue

@@ -327,13 +327,13 @@
             </template>
             <!-- 粉尘监测报表-->
             <template v-else-if="deviceType.startsWith('dustDayReport') && activeKey == '1'">
-              <dustMonitorTable></dustMonitorTable>
+              <dustMonitorTable @locate="goLocation" :isShowAction = "true"></dustMonitorTable>
             </template>
             <template v-else-if="deviceType.startsWith('bundleDayReport') && activeKey == '1'">
-              <bundleMonitorTable></bundleMonitorTable>
+              <bundleMonitorTable @locate="goLocation" :isShowAction = "true"></bundleMonitorTable>
             </template>
             <template v-else-if="deviceType.startsWith('bundleSpyDayReport') && activeKey == '1'">
-              <bundleSpyMonitorTable></bundleSpyMonitorTable>
+              <bundleSpyMonitorTable @locate="goLocation" :isShowAction = "true"></bundleSpyMonitorTable>
             </template>
             <template v-else-if="deviceType.startsWith('dusting') && activeKey == '1'">
               <DustingTable :dataSource="dataSource" :deviceType="deviceType" :scroll="scroll" />
@@ -971,8 +971,13 @@
   }
 
   function goLocation(record) {
+    // debugger;
     if (record['deviceType'] == 'person_bd' || record['deviceType'] == 'car_bd') {
       actions.setGlobalState({ locationId: record.devNum, locationObj: null, pageObj: null, type: record['deviceType'].split('_')[0] });
+    } else if(deviceType.value == 'bundleSpyDayReport' || deviceType.value == 'dustDayReport' || deviceType.value == 'bundleDayReport') {
+      actions.setGlobalState({ locationName: record.jcdd, locationObj: null, pageObj: null, type: record['deviceType'] });
+    } else if(deviceType.value == 'gasDayReport' ) {
+      actions.setGlobalState({ locationName: record.strInstallPos, locationObj: null, pageObj: null, type: record['deviceType'] });
     } else {
       if (deviceType.value.startsWith('location')) {
         actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null, type: 'person' });

File diff suppressed because it is too large
+ 624 - 572
src/views/vent/monitorManager/fanLocalMonitor/index.vue


+ 402 - 0
src/views/vent/monitorManager/windowMonitor/components/gasSupplyAir.vue

@@ -0,0 +1,402 @@
+<template>
+  <a-modal
+    v-model:visible="visible"
+    width="1200px"
+    height="500px"
+    class="supplyAir-modal"
+    title="风窗自主调控风量监测"
+    @ok="handleOk"
+    @cancel="handleOk"
+  >
+    <div class="modal-box">
+      <div class="left-box"> </div>
+      <div class="right-box">
+        <BarAndLine
+          class="echarts-line"
+          xAxisPropType="readTime"
+          height="400px"
+          :dataSource="echartsData"
+          :chartsColumns="chartsColumnList"
+          :option="echatsOption"
+        />
+      </div>
+    </div>
+    <div class="setting-box">
+      <div class="right-inputs">
+        <div class="vent-flex-row" v-if="!isMock">
+          <template v-if="monitorData['nwindownum'] == 1">
+            <div class="input-box"
+              >风窗实时开度(°):<span>{{ monitorData['forntArea'] }}</span></div
+            >
+          </template>
+          <template v-else>
+            <div class="input-box"
+              >前窗实时开度(°):<span>{{ monitorData['forntArea'] }}</span></div
+            >
+            <div class="input-box"
+              >后窗实时开度(°):<span>{{ monitorData['rearArea'] }}</span></div
+            >
+          </template>
+          <div class="input-box"
+            >风窗实时瓦斯含量(%):<span>{{ monitorData['gas'] }}</span></div
+          >
+        </div>
+        <div class="vent-flex-row" v-else>
+          <template v-if="monitorData['nwindownum'] == 1">
+            <div class="input-box"
+              >风窗实时开度(°):<span>{{ frontWindowAngle }}</span></div
+            >
+          </template>
+          <template v-else>
+            <div class="input-box"
+              >前窗实时开度(°):<span>{{ frontWindowAngle }}</span></div
+            >
+            <div class="input-box"
+              >后窗实时开度(°):<span>{{ rearWindowAngle }}</span></div
+            >
+          </template>
+          <div class="input-box"
+            >风窗实时瓦斯含量(%):<span>{{ gasTemp ? gasTemp.toFixed(2) : gas?.toFixed(2) }}</span></div
+          >
+          <div class="input-box"
+            >风窗实时风量(m³/min):<span>{{ fWindowM3Temp ? fWindowM3Temp.toFixed(2) : fWindowM3?.toFixed(2) }}</span></div
+          >
+        </div>
+      </div>
+    </div>
+  </a-modal>
+</template>
+
+<script lang="ts" setup>
+  import { ref, nextTick, onMounted, watch, computed, reactive } from 'vue';
+  import BarAndLine from '/@/components/chart/BarAndLine.vue';
+  import { number } from 'vue-types';
+  const props = defineProps({
+    modalIsShow: {
+      type: Boolean,
+      default: false,
+    },
+    modalType: {
+      type: String,
+    },
+    data: {
+      type: Object,
+      default: () => {},
+    },
+    gasVal: {
+      type: Number,
+    },
+    isMock: {
+      type: Boolean,
+    },
+  });
+  const emit = defineEmits(['handleOk', 'handleCancel']);
+  const visible = computed(() => props.modalIsShow);
+  const changeEchart = computed(() => props.modalType);
+  const echartsData = ref<
+    {
+      gasVal: string | number;
+      gas: string | number;
+      readTime: string;
+      fWindowM3: string | number;
+      forntArea: string | number;
+      rearArea?: string | number;
+    }[]
+  >([]);
+  const monitorData = ref({});
+  const echatsOption = {
+    legend: {
+      top: 10,
+    },
+    grid: {
+      top: '80',
+      left: '30',
+      right: '35',
+      bottom: '10',
+      containLabel: true,
+    },
+    toolbox: {
+      feature: {
+        saveAsImage: {
+          show: false,
+        },
+      },
+    },
+    xAxis: {
+      type: 'category',
+      axisLabel: {
+        margin: 10,
+        color: '#f1f1f199',
+      },
+      name: '',
+    },
+    yAxis: {
+      axisLabel: {
+        color: '#0071A5',
+      },
+    },
+  };
+
+  const chartsColumnListTemp = [
+    {
+      legend: '瓦斯超限值',
+      seriesName: '(%)',
+      ymax: 1100,
+      yname: '%',
+      linetype: 'line',
+      yaxispos: 'left',
+      color: '#00FFA8',
+      sort: 1,
+      xRotate: 0,
+      dataIndex: 'gasVal',
+    },
+    {
+      legend: '瓦斯实时值',
+      seriesName: '(%)',
+      ymax: 1100,
+      yname: '%',
+      linetype: 'line',
+      yaxispos: 'left',
+      color: '#00FFA8',
+      sort: 1,
+      xRotate: 0,
+      dataIndex: 'gas',
+    },
+    {
+      legend: '风窗开度',
+      seriesName: '(°)',
+      ymax: 1100,
+      yname: '°',
+      linetype: 'line',
+      yaxispos: 'right',
+      color: '#FDB146',
+      sort: 2,
+      xRotate: 0,
+      dataIndex: 'forntArea',
+    },
+    {
+      legend: '前窗开度',
+      seriesName: '(°)',
+      ymax: 1100,
+      yname: '°',
+      linetype: 'line',
+      yaxispos: 'right',
+      color: '#FDB146',
+      sort: 2,
+      xRotate: 0,
+      dataIndex: 'forntArea',
+    },
+    {
+      legend: '后窗开度',
+      seriesName: '(°)',
+      ymax: 1100,
+      yname: '°',
+      linetype: 'line',
+      yaxispos: 'right',
+      color: '#FDB146',
+      sort: 2,
+      xRotate: 0,
+      dataIndex: 'rearArea',
+    },
+  ];
+  const chartsColumnList = ref(chartsColumnListTemp);
+  let frontWindowAngle = ref<undefined | number>(undefined);
+  let rearWindowAngle = ref<undefined | number>(undefined);
+  let fWindowM3 = ref<undefined | number>(undefined);
+  let gas = ref<undefined | number>(undefined);
+  let fWindowM3Temp = ref<undefined | number>(undefined);
+  let gasTemp = ref<undefined | number>(undefined);
+  let index = 1;
+  watch(
+    () => props.data,
+    (newVal) => {
+      if (!visible.value) return;
+      if (newVal['nwindownum'] == 1) {
+        // 单道风窗
+        if (chartsColumnList.value.length != 3) chartsColumnList.value = [chartsColumnListTemp[0], chartsColumnListTemp[1], chartsColumnListTemp[2]];
+      } else {
+        // 多道风窗
+        if (chartsColumnList.value.length != 4)
+          chartsColumnList.value = [chartsColumnListTemp[0], chartsColumnListTemp[1], chartsColumnListTemp[3], chartsColumnListTemp[4]];
+      }
+      monitorData.value = newVal;
+      if (echartsData.value.length > 20) {
+        echartsData.value.shift();
+      }
+      if (props.isMock) {
+        // 这里开启风窗开度模拟
+        if (newVal['nwindownum'] == 1 && frontWindowAngle.value === undefined) {
+          frontWindowAngle.value = newVal['forntArea'];
+        } else if (newVal['nwindownum'] == 2) {
+          if (frontWindowAngle.value === undefined) frontWindowAngle.value = (newVal['forntArea'] / newVal['maxarea']) * 90;
+          if (rearWindowAngle.value === undefined) rearWindowAngle.value = (newVal['rearArea'] / newVal['maxarea']) * 90;
+        }
+        if (fWindowM3.value === undefined) fWindowM3.value = newVal['fWindowM3'];
+        // if (gas == undefined) gas = Number(newVal['gas']) > Number(props.gasVal) ? newVal['gas'] : props.gasVal + 0.2;
+        if (gas.value == undefined) gas.value = props.gasVal + 0.2;
+        // 开启模拟
+        if (gas.value > props.gasVal - 0.3) {
+          mock(newVal['maxarea']);
+          echartsData.value = [
+            ...echartsData.value,
+            {
+              gasVal: props.gasVal,
+              gas: gas.value as number,
+              readTime: newVal['readTime'].substring(11),
+              forntArea: frontWindowAngle.value as number,
+              rearArea: rearWindowAngle.value as number,
+              fWindowM3: fWindowM3.value as number,
+            },
+          ];
+        } else {
+          const random = Math.random() - 0.5;
+          fWindowM3Temp.value = fWindowM3.value + random * 50;
+          gasTemp.value = gas.value + random * 0.01;
+          echartsData.value = [
+            ...echartsData.value,
+            {
+              gasVal: props.gasVal,
+              gas: gasTemp.value,
+              readTime: newVal['readTime'].substring(11),
+              forntArea: frontWindowAngle.value as number,
+              rearArea: rearWindowAngle.value as number,
+              fWindowM3: fWindowM3Temp.value,
+            },
+          ];
+        }
+      } else {
+        echartsData.value = [
+          ...echartsData.value,
+          {
+            gasVal: props.gasVal,
+            gas: newVal['gas'],
+            readTime: newVal['readTime'].substring(11),
+            forntArea: (newVal['forntArea'] / newVal['maxarea']) * 90,
+            rearArea: (newVal['rearArea'] / newVal['maxarea']) * 90,
+            fWindowM3: newVal['fWindowM3'],
+          },
+        ];
+      }
+    }
+  );
+
+  function mock(maxArea?: number) {
+    debugger;
+    if (maxArea) {
+      // 每调用一次数据就增减一些
+      // frontWindowAngle 增加一些
+      if (frontWindowAngle.value !== undefined && frontWindowAngle.value <= 90) {
+        frontWindowAngle.value = Math.min(frontWindowAngle.value + 3, 90);
+      }
+      if (rearWindowAngle.value !== undefined && rearWindowAngle.value <= 90) {
+        rearWindowAngle.value = Math.min(rearWindowAngle.value + 3, 90);
+      }
+      if (fWindowM3.value !== undefined) {
+        fWindowM3.value += 40 * index;
+      }
+      if (gas.value !== undefined) {
+        gas.value -= 0.001 * index;
+      }
+      ++index;
+    }
+  }
+
+  function handleOk() {
+    emit('handleCancel');
+    echartsData.value = [];
+    frontWindowAngle.value = undefined;
+    rearWindowAngle.value = undefined;
+    fWindowM3.value = undefined;
+    gas.value = undefined;
+    fWindowM3Temp.value = undefined;
+    gasTemp.value = undefined;
+  }
+  onMounted(() => {});
+</script>
+
+<style scoped lang="less">
+  .modal-box {
+    display: flex;
+    flex-direction: row;
+    background-color: #ffffff05;
+    padding: 10px 8px 0 8px;
+    border: 1px solid #00d8ff22;
+    position: relative;
+    // min-height: 600px;
+    .left-box {
+      flex: 1; /* 占据 3/4 的空间 */
+      background-image: url(../../../../../assets/images/supplyAir.svg);
+      background-repeat: no-repeat;
+      background-size: contain; /* 确保背景图片完整显示 */
+      background-position: center; /* 确保背景图片居中 */
+    }
+    .right-box {
+      flex: 1; /* 占据 3/4 的空间 */
+      height: 400px;
+      width: 100%;
+    }
+  }
+  .setting-box {
+    width: 1570px;
+    height: 70px;
+    margin: 10px 0;
+    background-color: #ffffff05;
+    border: 1px solid #00d8ff22;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+
+    .right-inputs {
+      width: 100%;
+      display: flex;
+      height: 40px;
+      margin: 0 10px;
+      justify-content: space-between;
+    }
+    .left-buttons {
+      display: flex;
+      height: 40px;
+
+      .btn {
+        margin: 0 10px;
+      }
+    }
+    .border-clip {
+      width: 1px;
+      height: 25px;
+      border-right: 1px solid #8b8b8b77;
+    }
+
+    .input-box {
+      width: 300px;
+      span {
+        color: aqua;
+        padding: 0 20px;
+      }
+    }
+  }
+
+  @keyframes open {
+    0% {
+      height: 0px;
+    }
+    100% {
+      height: fit-content;
+    }
+  }
+
+  @keyframes close {
+    0% {
+      height: fit-content;
+    }
+    100% {
+      height: 0px;
+    }
+  }
+  :deep(.zxm-divider-inner-text) {
+    color: #cacaca88 !important;
+  }
+  :deep(.zxm-form-item) {
+    margin-bottom: 10px;
+  }
+</style>

+ 16 - 14
src/views/vent/monitorManager/windowMonitor/modal.vue → src/views/vent/monitorManager/windowMonitor/components/modal.vue

@@ -8,31 +8,31 @@
       <template v-if="type == '1' || type == '2'">
         <div class="vent-flex-row input-box">
           <div class="label">{{ title.includes('角度') ? '风窗角度:' : '风窗面积:' }}</div>
-          <a-input-number size="small" placeholder="0" :min="0" v-model:value="area" />
+          <a-input-number size="small" placeholder="0" :min="0" v-model:value="data" />
         </div>
       </template>
       <template v-if="type == '7'">
         <div class="vent-flex-row input-box">
           <div class="label">前窗目标风量:</div>
-          <a-input-number size="small" placeholder="0" :min="0" v-model:value="frontW" />
+          <a-input-number size="small" placeholder="0" :min="0" v-model:value="data" />
         </div>
       </template>
       <template v-if="type == '8'">
         <div class="vent-flex-row input-box">
           <div class="label">后窗目标风量:</div>
-          <a-input-number size="small" placeholder="0" :min="0" v-model:value="rearW" />
+          <a-input-number size="small" placeholder="0" :min="0" v-model:value="data" />
         </div>
       </template>
-      <template v-if="type == '3'">
+      <template v-if="type == 'ldkzStart'">
         <div class="vent-flex-row input-box">
           <div class="label">瓦斯超限浓度:</div>
-          <a-input-number size="small" placeholder="0" :min="0" v-model:value="ch4" />
+          <a-input-number size="small" placeholder="0" :min="0" v-model:value="data" />
         </div>
       </template>
       <template v-if="type.startsWith('frontSetValue')">
         <div class="vent-flex-row input-box">
           <div class="label">风窗角度:</div>
-          <a-input-number size="small" placeholder="0" :min="0" v-model:value="area" />
+          <a-input-number size="small" placeholder="0" :min="0" v-model:value="data" />
         </div>
       </template>
       <div v-if="!globalConfig?.simulatedPassword" class="vent-flex-row input-box">
@@ -69,33 +69,35 @@
   const title = ref<String>('');
   const type = ref<String>('');
   const passWord = ref('');
-  const area = ref(0);
-  const frontW = ref(0);
-  const rearW = ref(0);
-  const ch4 = ref(0);
+  const data = ref(0);
 
   watch([() => props.modalIsShow, () => props.modalTitle, () => props.modalType], ([newVal, newModalTitle, newModalType]) => {
     visible.value = newVal;
     if (newModalTitle) title.value = newModalTitle;
     if (newModalType) type.value = newModalType;
     passWord.value = '';
-    area.value = 0;
+    data.value = 0;
   });
 
   function handleOk() {
     if (globalConfig?.simulatedPassword) {
-      emit('handleOk', '', type.value, area.value);
+      emit('handleOk', '', type.value, data.value);
     } else {
       if (type.value == '3') {
-        emit('handleOk', passWord.value, type.value, ch4.value);
+        emit('handleOk', passWord.value, type.value, data.value);
+      } else if (type.value == '7') {
+        emit('handleOk', passWord.value, type.value, data.value);
+      } else if (type.value == '8') {
+        emit('handleOk', passWord.value, type.value, data.value);
       } else {
-        emit('handleOk', passWord.value, type.value, area.value);
+        emit('handleOk', passWord.value, type.value, data.value);
       }
     }
   }
   function handleCancel() {
     //
     emit('handleCancel');
+    data.value = 0;
   }
 </script>
 <style scoped lang="less">

+ 236 - 0
src/views/vent/monitorManager/windowMonitor/components/supplyAir.vue

@@ -0,0 +1,236 @@
+<template>
+  <a-modal
+    v-model:visible="visible"
+    width="1200px"
+    height="500px"
+    class="supplyAir-modal"
+    title="风窗自主调控风量监测"
+    @ok="handleOk"
+    @cancel="handleOk"
+  >
+    <div class="modal-box">
+      <div class="left-box"> </div>
+      <div class="right-box">
+        <BarAndLine
+          class="echarts-line"
+          xAxisPropType="readTime"
+          height="400px"
+          :dataSource="echartsData"
+          :chartsColumns="chartsColumnList"
+          :option="echatsOption"
+        />
+      </div>
+    </div>
+    <div class="setting-box">
+      <div class="right-inputs">
+        <div class="vent-flex-row">
+          <div class="input-box"
+            >风窗目标风量(m³/min):<span>{{ props.targetVolume }}</span></div
+          >
+          <div class="input-box"
+            >风窗实时供风量(m³/min):<span>{{ monitorData['fWindowM3'] }}</span></div
+          >
+        </div>
+      </div>
+    </div>
+  </a-modal>
+</template>
+
+<script lang="ts" setup>
+  import { ref, nextTick, onMounted, watch, computed, reactive } from 'vue';
+  import BarAndLine from '/@/components/chart/BarAndLine.vue';
+  const props = defineProps({
+    modalIsShow: {
+      type: Boolean,
+      default: false,
+    },
+    modalType: {
+      type: String,
+    },
+    data: {
+      type: Object,
+      default: () => {},
+    },
+    targetVolume: {
+      type: Number,
+    },
+  });
+  const emit = defineEmits(['handleOk', 'handleCancel']);
+  const visible = computed(() => props.modalIsShow);
+  const changeEchart = computed(() => props.modalType);
+  const echartsData = ref<{ targetVolume: string | Number; readTime: string; fWindowM3: string | Number; rearm3?: string | Number }[]>([]);
+  const monitorData = ref({});
+  const echatsOption = {
+    legend: {
+      top: 10,
+    },
+    grid: {
+      top: '80',
+      left: '30',
+      right: '35',
+      bottom: '10',
+      containLabel: true,
+    },
+    toolbox: {
+      feature: {
+        saveAsImage: {
+          show: false,
+        },
+      },
+    },
+    xAxis: {
+      type: 'category',
+      axisLabel: {
+        margin: 10,
+        color: '#f1f1f199',
+      },
+      name: '',
+    },
+    yAxis: {
+      axisLabel: {
+        color: '#0071A5',
+      },
+    },
+  };
+
+  const chartsColumnList = reactive([
+    {
+      legend: '目标风量',
+      seriesName: '(m³/min)',
+      ymax: 1100,
+      yname: 'm³/min',
+      linetype: 'line',
+      yaxispos: 'left',
+      color: '#00FFA8',
+      sort: 1,
+      xRotate: 0,
+      dataIndex: 'targetVolume',
+    },
+    {
+      legend: '供风量',
+      seriesName: '(m³/min)',
+      ymax: 1100,
+      yname: 'm³/min',
+      linetype: 'line',
+      yaxispos: 'right',
+      color: '#FDB146',
+      sort: 1,
+      xRotate: 0,
+      dataIndex: 'fWindowM3',
+    },
+  ]);
+  watch(
+    () => props.data,
+    (newVal) => {
+      if (!visible.value) return;
+      if (props.modalType == '8') {
+        chartsColumnList[1].dataIndex = 'rearm31';
+        chartsColumnList[1].legend = '后窗实时供风量';
+      } else {
+        chartsColumnList[1].dataIndex = 'fWindowM3';
+        chartsColumnList[1].legend = '前窗实时供风量';
+      }
+      monitorData.value = newVal;
+      if (echartsData.value.length > 20) {
+        echartsData.value.shift();
+      }
+      echartsData.value = [
+        ...echartsData.value,
+        { fWindowM3: newVal['fWindowM3'], targetVolume: props.targetVolume, readTime: newVal['readTime'].substring(11), rearm3: newVal['rearm3'] },
+      ];
+    }
+  );
+
+  function handleOk() {
+    emit('handleCancel');
+    echartsData.value = [];
+  }
+  onMounted(() => {});
+</script>
+
+<style scoped lang="less">
+  .modal-box {
+    display: flex;
+    flex-direction: row;
+    background-color: #ffffff05;
+    padding: 10px 8px 0 8px;
+    border: 1px solid #00d8ff22;
+    position: relative;
+    // min-height: 600px;
+    .left-box {
+      flex: 1; /* 占据 3/4 的空间 */
+      background-image: url(../../../../../assets/images/supplyAir.svg);
+      background-repeat: no-repeat;
+      background-size: contain; /* 确保背景图片完整显示 */
+      background-position: center; /* 确保背景图片居中 */
+    }
+    .right-box {
+      flex: 1; /* 占据 3/4 的空间 */
+      height: 400px;
+      width: 100%;
+    }
+  }
+  .setting-box {
+    width: 1570px;
+    height: 70px;
+    margin: 10px 0;
+    background-color: #ffffff05;
+    border: 1px solid #00d8ff22;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+
+    .right-inputs {
+      width: 100%;
+      display: flex;
+      height: 40px;
+      margin: 0 10px;
+      justify-content: space-between;
+    }
+    .left-buttons {
+      display: flex;
+      height: 40px;
+
+      .btn {
+        margin: 0 10px;
+      }
+    }
+    .border-clip {
+      width: 1px;
+      height: 25px;
+      border-right: 1px solid #8b8b8b77;
+    }
+
+    .input-box {
+      width: 350px;
+      span {
+        color: aqua;
+        padding: 0 20px;
+      }
+    }
+  }
+
+  @keyframes open {
+    0% {
+      height: 0px;
+    }
+    100% {
+      height: fit-content;
+    }
+  }
+
+  @keyframes close {
+    0% {
+      height: fit-content;
+    }
+    100% {
+      height: 0px;
+    }
+  }
+  :deep(.zxm-divider-inner-text) {
+    color: #cacaca88 !important;
+  }
+  :deep(.zxm-form-item) {
+    margin-bottom: 10px;
+  }
+</style>

+ 83 - 30
src/views/vent/monitorManager/windowMonitor/index.vue

@@ -25,8 +25,7 @@
           <div v-if="hasPermission('window:showAngle')" class="button-box" @click="setAngle(2)">设定后窗角度</div>
           <div v-if="hasPermission('window:gateControl')" class="button-box" @click="playAnimation(1)">打开前门</div>
           <div v-if="hasPermission('window:gateControl')" class="button-box" @click="playAnimation(2)">关闭前门</div>
-          <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(7)">前窗自主调控</div>
-          <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(8)">后窗自主调控</div>
+
           <!-- 展会功能 -->
           <!-- <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(3)">自主联动控制开启</div>
           <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(4)">自主联动控制停止</div> -->
@@ -41,15 +40,24 @@
         <div class="row" v-if="Number(selectData.nwindownum) == 1">
           <div v-if="hasPermission('window:AreaControl')" class="button-box" @click="setArea(1)">设定风窗面积</div>
           <div v-if="hasPermission('window:showAngle')" class="button-box" @click="setAngle(1)">设定风窗角度</div>
-          <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(7)">风窗自主调控</div>
         </div>
       </div>
       <div class="top-right row">
+        <template v-if="Number(selectData.nwindownum) > 1">
+          <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(7)">前窗自主调控</div>
+          <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(8)">后窗自主调控</div>
+          <div v-if="hasPermission('window:gasldkz')" class="button-box" @click="setArea('ldkzStart')">瓦斯超限调控开启</div>
+          <!-- <div v-if="hasPermission('window:gasldkz')" class="button-box" @click="setArea('ldkzStop')">瓦斯超限调控停止</div> -->
+        </template>
+        <template v-else>
+          <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(7)">风窗自主调控</div>
+          <div v-if="hasPermission('window:gasldkz')" class="button-box" @click="setArea('ldkzStart')">瓦斯超限调控开启</div>
+        </template>
         <div v-if="hasPermission('window:controlFull')" class="button-box" @click="setArea(5)">一键全开</div>
         <div v-if="hasPermission('window:controlFull')" class="button-box" @click="setArea(6)">一键全关</div>
         <!-- 展会功能 -->
-        <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(3)">自主联动控制开启</div>
-        <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(4)">自主联动控制停止</div>
+        <!-- <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea('ldkzStart')">自主联动控制开启</div>
+        <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea('ldkzStop')">自主联动控制停止</div> -->
         <!-- <div class="button-box" @click="() => (linkAlarmShow = true)">预警指标</div> -->
         <!-- <div class="control-type row">
           <div class="control-title">控制模式:</div>
@@ -181,6 +189,22 @@
     :device-id="selectData.deviceID"
     @close="() => (linkAlarmShow = false)"
   />
+  <SupplyAir
+    :data="currentData"
+    :targetVolume="targetVolume"
+    :modal-is-show="showTargetModal"
+    :modalType="modalType"
+    @handle-cancel="() => (showTargetModal = false)"
+  />
+
+  <GasSupplyAir
+    :data="currentData"
+    :gasVal="ch4"
+    :modal-is-show="showGasModal"
+    :modalType="modalType"
+    :isMock="isMock"
+    @handle-cancel="() => (showGasModal = false)"
+  />
 </template>
 
 <script setup lang="ts">
@@ -191,13 +215,14 @@
   import HistoryTable from '../comment/HistoryTable.vue';
   import AlarmHistoryTable from '../comment/AlarmHistoryTable.vue';
   import HandlerHistoryTable from '../comment/HandlerHistoryTable.vue';
-  import HandleModal from './modal.vue';
+  import HandleModal from './components/modal.vue';
+  import SupplyAir from './components/supplyAir.vue';
+  import GasSupplyAir from './components/gasSupplyAir.vue';
   import DeviceBaseInfo from '../comment/components/DeviceBaseInfo.vue';
   import LinkControlDesModal from '../comment/components/LinkControlDesModal.vue';
   import { mountedThree, destroy, addMonitorText, computePlay, setModelType, initCameraCanvas } from './window.threejs';
-  import { list, getTableList, windControl } from './window.api';
+  import { list, getTableList, updateWindowAutoAdjustStatus } from './window.api';
   import { list as baseList } from '../../deviceManager/windWindowTabel/ventanalyWindow.api';
-  import { chartsColumns } from './window.data';
   import { deviceControlApi } from '/@/api/vent/index';
   import lodash from 'lodash';
   import { setDivHeight } from '/@/utils/event';
@@ -219,7 +244,7 @@
   const scroll = reactive({
     y: 230,
   });
-
+  const isMock = ref(true);
   const modalIsShow = ref<boolean>(false); // 是否显示模态框
   const linkAlarmShow = ref<boolean>(false); // 是否显示模态框
   const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
@@ -230,7 +255,9 @@
   const loading = ref(false);
   const windowAngle = ref(0);
   const ch4 = ref(0.6);
-
+  const targetVolume = ref(0);
+  const showTargetModal = ref(false);
+  const showGasModal = ref(false);
   // const rotationParam = {
   //   frontDeg0: 0, // 前门初始
   //   frontDeg1: windowAngle.value, // 前门目标
@@ -280,7 +307,7 @@
 
   // 监测数据
   const selectData = reactive(lodash.cloneDeep(initData));
-
+  const currentData = ref(initData);
   // https获取监测数据
   let timer: null | NodeJS.Timeout = null;
   const getMonitor = (flag?) => {
@@ -288,6 +315,7 @@
       timer = setTimeout(
         async () => {
           const data = await getDataSource();
+          currentData.value = data;
           Object.assign(selectData, data);
           playAnimation(selectData, selectData.maxarea);
           addMonitorText(selectData);
@@ -362,9 +390,9 @@
       modalIsShow.value = true;
     } else {
       if (!globalConfig?.simulatedPassword) {
-        if (flag == 3) {
+        if (flag == 'ldkzStart') {
           modalTitle.value = '自主联动控制开启';
-        } else if (flag == 4) {
+        } else if (flag == 'ldkzStop') {
           modalTitle.value = '自主联动控制停止';
         } else if (flag == 5) {
           modalTitle.value = '一键全开';
@@ -395,9 +423,9 @@
       modalIsShow.value = true;
     } else {
       if (!globalConfig?.simulatedPassword) {
-        if (flag == 3) {
+        if (flag == 'ldkzStart') {
           modalTitle.value = '自主联动控制开启';
-        } else if (flag == 4) {
+        } else if (flag == 'ldkzStop') {
           modalTitle.value = '自主联动控制停止';
         } else if (flag == 5) {
           modalTitle.value = '一键全开';
@@ -417,7 +445,8 @@
     modalIsShow.value = true;
   };
 
-  const handleOK = (passWord, handlerState, windowAngleNum) => {
+  const handleOK = (passWord, handlerState, value) => {
+    debugger;
     if (!passWord && !globalConfig?.simulatedPassword) {
       message.warning('请输入密码!');
       return;
@@ -430,52 +459,76 @@
       value: null,
     };
     let params;
+    // 风窗风量自主调控
     if (handlerState == 7 || handlerState == 8) {
       let params;
       if (handlerState == 7) {
         // 单道风窗
         params = {
-          deviceRelationId: selectData.deviceID,
+          windowId: selectData.deviceID,
           auto: 1,
-          fengliangF: windowAngleNum,
+          fengliangF: value,
         };
       } else {
         // 双道风窗
         params = {
-          deviceRelationId: selectData.deviceID,
+          windowId: selectData.deviceID,
           auto: 1,
-          fengliangR: windowAngleNum,
+          fengliangR: value, // 后风窗
         };
       }
-      windControl(params).then((res) => {
+      updateWindowAutoAdjustStatus(params).then((res) => {
         if (res.success) {
           if (globalConfig.History_Type == 'remote') {
             message.success('指令已下发至生产管控平台成功!');
           } else {
             message.success('指令已下发成功!');
           }
+          handleCancel();
+          targetVolume.value = value;
+          showTargetModal.value = true;
         } else {
           message.error(res.message);
         }
       });
+      return;
+    } else if (handlerState == 'ldkzStart' || handlerState == 'ldkzStop') {
+      data.paramcode = 'autoRun';
+      data.value = handlerState == 'ldkzStart' ? 1 : 0;
+      if (handlerState == 'ldkzStart') {
+        ch4.value = value;
+        params = { auto: 1, windowId: selectData.deviceID, gasMax: ch4.value };
+      } else {
+        params = { auto: 0, windowId: selectData.deviceID };
+      }
+      if (isMock.value) {
+        showGasModal.value = true;
+      } else {
+        updateWindowAutoAdjustStatus(params).then((res) => {
+          if (res.success) {
+            if (globalConfig.History_Type == 'remote') {
+              message.success('指令已下发至生产管控平台成功!');
+            } else {
+              message.success('指令已下发成功!');
+            }
+            handleCancel();
+            showGasModal.value = true;
+          } else {
+            message.error(res.message);
+          }
+        });
+      }
     } else {
       if (handlerState == 1 || handlerState == 2) {
-        windowAngle.value = windowAngleNum;
+        windowAngle.value = value;
         data.paramcode = handlerState == 1 ? 'frontSetValue' : 'rearSetValue';
         data.value = windowAngle.value;
-      } else if (handlerState == 3 || handlerState == 4) {
-        data.paramcode = 'autoRun';
-        data.value = handlerState == 3 ? 1 : 0;
-        if (handlerState == 3) {
-          ch4.value = windowAngleNum;
-          params = { auto: 1, windowId: selectData.deviceID, gasMax: ch4.value };
-        }
       } else if (handlerState == 5 || handlerState == 6) {
         data.paramcode = 'frontSetValue';
         data.value = handlerState == 5 ? selectData.maxarea : 0;
       } else if (handlerState.startsWith('frontSetValue')) {
         data.paramcode = handlerState;
-        data.value = windowAngleNum;
+        data.value = value;
       }
       deviceControlApi(handlerState == 3 ? params : data)
         .then((res) => {

+ 2 - 1
src/views/vent/monitorManager/windowMonitor/window.api.ts

@@ -23,4 +23,5 @@ export const getTableList = (params) => defHttp.get({ url: Api.baseList, params
 export const cameraList = (params) => defHttp.get({ url: Api.cameraList, params });
 export const cameraAddrList = (params) => defHttp.post({ url: Api.cameraAddrList, params });
 
-export const windControl = (params) => defHttp.post({ url: Api.updateWindowAutoAdjustStatus, params });
+export const updateWindowAutoAdjustStatus = (params) => defHttp.post({ url: Api.updateWindowAutoAdjustStatus, params });
+export const windControl = (params) => defHttp.post({ url: Api.windControl, params });

Some files were not shown because too many files changed in this diff