Selaa lähdekoodia

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

hongrunxia 1 viikko sitten
vanhempi
commit
0653d63658

+ 4 - 4
src/views/vent/gas/gasInspect/components/addressAdd.vue

@@ -6,9 +6,9 @@
                 <JDictSelectTag v-model:value="formAddress.insType" placeholder="请选择巡检类型" dictCode="ins_type"
                     style="width: 220px" />
             </a-form-item>
-            <a-form-item label="巡检区域:">
+            <!-- <a-form-item label="巡检区域:">
                 <a-input v-model:value="formAddress.strremark" style="width: 220px" />
-            </a-form-item>
+            </a-form-item> -->
             <a-form-item label="巡检地址:">
                 <a-input v-model:value="formAddress.strinstallpos"  style="width: 220px" />
             </a-form-item>
@@ -28,7 +28,7 @@ import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectT
 
 let formAddress = reactive<any>({
     insType: '',
-    strremark: '',
+    // strremark: '',
     strinstallpos: '',
 })
 let $emit = defineEmits(['confirmAddress', 'cancelAddress'])
@@ -41,7 +41,7 @@ let confirmAddress = () => {
 let cancelAddress = () => {
     formAddress = {
         insType: '',
-        strremark: '',
+        // strremark: '',
         strinstallpos: '',
     }
     $emit('cancelAddress',)

+ 1 - 1
src/views/vent/gas/gasInspect/components/inspectEdit.vue

@@ -15,7 +15,7 @@
             </a-form-item>
             <a-form-item label="所属区队:">
                 <a-select ref="select" v-model:value="formStateEdit.disTeamId" placeholder="请选择...">
-                    <a-select-option v-for="(item, index) in qdList" :key="index">{{ item.label }}</a-select-option>
+                    <a-select-option v-for="(item, index) in qdList" :key="index" :value="item.value">{{ item.label }}</a-select-option>
                 </a-select>
             </a-form-item>
             <a-form-item label="巡检类型:">

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

@@ -169,6 +169,7 @@ let handlerEdit = (record) => {
     visibleEdit.value = true
     titleEdit.value = '瓦斯巡检点编辑'
     inspectEditData = Object.assign({}, record)
+    console.log(inspectEditData,'编辑------')
 }
 //编辑提交
 async function confirmEdit(param) {

+ 365 - 0
src/views/vent/gas/gasReport/gas-report.data.ts

@@ -555,3 +555,368 @@ export const columns: BasicColumn[] = [
     ],
   },
 ];
+//大海泽
+export const columnsDhz: BasicColumn[] = [
+  {
+    title: '瓦斯日报',
+    children: [
+      {
+        title: '夜班',
+        children: [
+          {
+            title: '检测地点',
+            dataIndex: 'strInstallPos',
+            key: 'strInstallPos',
+            width: 120,
+            align: 'center',
+          },
+          {
+            title: '检查工',
+            dataIndex: 'checkPersonNight',
+            key: 'checkPersonNight',
+            width: 80,
+            align: 'center',
+          },
+          {
+            title: '第一次',
+            children: [
+
+
+              {
+                title: '检测时间',
+                dataIndex: 'timeNight1',
+                key: 'timeNight1',
+                width: 120,
+                align: 'center',
+              },
+              {
+                title: 'CH₄‌(%)',
+                dataIndex: 'ch4Night1',
+                key: 'ch4Night1',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: 'CO₂‌(%)',
+                dataIndex: 'co2Night1',
+                key: 'co2Night1',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: 'CO(ppm)',
+                dataIndex: 'coNight1',
+                key: 'coNight1',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: 'O₂‌(%)',
+                dataIndex: 'o2Night1',
+                key: 'o2Night1',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: 'T(℃)',
+                dataIndex: 'tnight1',
+                key: 'tnight1',
+                width: 100,
+                align: 'center',
+              },
+            ],
+          },
+
+          {
+            title: '第二次',
+            children: [
+              {
+                title: '检测时间',
+                dataIndex: 'timeNight2',
+                key: 'timeNight2',
+                width: 120,
+                align: 'center',
+              },
+              {
+                title: 'CH₄‌(%)',
+                dataIndex: 'ch4Night2',
+                key: 'ch4Night2',
+                width: 100,
+                align: 'center',
+              },
+
+              {
+                title: 'CO₂‌(%)',
+                dataIndex: 'co2Night2',
+                key: 'co2Night2',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: 'CO(ppm)',
+                dataIndex: 'coNight2',
+                key: 'coNight2',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: 'O₂‌(%)',
+                dataIndex: 'o2Night2',
+                key: 'o2Night2',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: 'T(℃)',
+                dataIndex: 'tnight2',
+                key: 'tnight2',
+                width: 100,
+                align: 'center',
+              },
+            ],
+          },
+
+        ],
+      },
+      {
+        title: '早班',
+        children: [
+          {
+            title: '检测地点',
+            dataIndex: 'strInstallPos',
+            key: 'strInstallPos',
+            width: 120,
+            align: 'center',
+          },
+          {
+            title: '检查工',
+            dataIndex: 'checkPersonEarly',
+            key: 'checkPersonEarly',
+            width: 80,
+            align: 'center',
+          },
+          {
+            title: '第一次',
+            children: [
+
+
+              {
+                title: '检测时间',
+                dataIndex: 'timeEarly1',
+                key: 'timeEarly1',
+                width: 120,
+                align: 'center',
+              },
+              {
+                title: 'CH₄‌(%)',
+                dataIndex: 'ch4Early1',
+                key: 'ch4Early1',
+                width: 100,
+                align: 'center',
+              },
+
+              {
+                title: 'CO₂‌(%)',
+                dataIndex: 'co2Early1',
+                key: 'co2Early1',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: 'CO(ppm)',
+                dataIndex: 'coEarly1',
+                key: 'coEarly1',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: 'O₂‌(%)',
+                dataIndex: 'o2Early1',
+                key: 'o2Early1',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: 'T(℃)',
+                dataIndex: 'tearly1',
+                key: 'tearly1',
+                width: 100,
+                align: 'center',
+              },
+            ],
+          },
+
+          {
+            title: '第二次',
+            children: [
+              {
+                title: '检测时间',
+                dataIndex: 'timeEarly2',
+                key: 'timeEarly2',
+                width: 120,
+                align: 'center',
+              },
+              {
+                title: 'CH₄‌(%)',
+                dataIndex: 'ch4Early2',
+                key: 'ch4Early2',
+                width: 100,
+                align: 'center',
+              },
+
+              {
+                title: 'CO₂‌(%)',
+                dataIndex: 'co2Early2',
+                key: 'co2Early2',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: 'CO(ppm)',
+                dataIndex: 'coEarly2',
+                key: 'coEarly2',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: 'O₂‌(%)',
+                dataIndex: 'o2Early2',
+                key: 'o2Early2',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: 'T(℃)',
+                dataIndex: 'tearly2',
+                key: 'tearly2',
+                width: 100,
+                align: 'center',
+              },
+            ],
+          },
+
+        ],
+      },
+      {
+        title: '中班',
+        children: [
+          {
+            title: '检测地点',
+            dataIndex: 'strInstallPos',
+            key: 'strInstallPos',
+            width: 120,
+            align: 'center',
+          },
+
+          {
+            title: '检查工',
+            dataIndex: 'checkPersonNoon',
+            key: 'checkPersonNoon',
+            width: 80,
+            align: 'center',
+          },
+          {
+            title: '第一次',
+            children: [
+
+
+              {
+                title: '检测时间',
+                dataIndex: 'timeNoon1',
+                key: 'timeNoon1',
+                width: 120,
+                align: 'center',
+              },
+              {
+                title: 'CH₄‌(%)',
+                dataIndex: 'ch4Noon1',
+                key: 'ch4Noon1',
+                width: 100,
+                align: 'center',
+              },
+
+              {
+                title: 'CO₂‌(%)',
+                dataIndex: 'co2Noon1',
+                key: 'co2Noon1',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: 'CO(ppm)',
+                dataIndex: 'coNoon1',
+                key: 'coNoon1',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: 'O₂‌(%)',
+                dataIndex: 'o2Noon1',
+                key: 'o2Noon1',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: 'T(℃)',
+                dataIndex: 'tnoon1',
+                key: 'tnoon1',
+                width: 100,
+                align: 'center',
+              },
+            ],
+          },
+
+          {
+            title: '第二次',
+            children: [
+              {
+                title: '检测时间',
+                dataIndex: 'timeNoon2',
+                key: 'timeNoon2',
+                width: 120,
+                align: 'center',
+              },
+              {
+                title: 'CH₄‌(%)',
+                dataIndex: 'ch4Noon2',
+                key: 'ch4Noon2',
+                width: 100,
+                align: 'center',
+              },
+
+              {
+                title: 'CO₂‌(%)',
+                dataIndex: 'co2Noon2',
+                key: 'co2Noon2',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: 'CO(ppm)',
+                dataIndex: 'coNoon2',
+                key: 'coNoon2',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: 'O₂‌(%)',
+                dataIndex: 'o2Noon2',
+                key: 'o2Noon2',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: 'T(℃)',
+                dataIndex: 'tnoon2',
+                key: 'tnoon2',
+                width: 100,
+                align: 'center',
+              },
+            ],
+          },
+        ],
+      },
+    ],
+  },
+];
+

+ 450 - 0
src/views/vent/gas/gasReport/index1.vue

@@ -0,0 +1,450 @@
+<template>
+    <div class="gasReport">
+        <customHeader>通风瓦斯日报管理</customHeader>
+        <div class="report-container">
+            <div class="search-area">
+                <a-row>
+                    <a-col :span="4">
+                        <div class="area-item">
+                            <div class="item-text">日期区间:</div>
+                            <a-date-picker style="width: 220px" :showTime="false" valueFormat="YYYY-MM-DD"
+                                v-model:value="searchData.reportTime" placeholder="请选择填报日期" />
+                        </div>
+                    </a-col>
+                  
+                    <a-col :span="4">
+                        <div class="area-item">
+                            <div class="item-text">检查工:</div>
+                            <a-input style="width: 220px" v-model:value="searchData.sbr" placeholder="请输入检查工" />
+                        </div>
+                    </a-col>
+                    <a-col :span="4">
+                        <div class="area-item">
+                            <div class="item-text">上报地点:</div>
+                            <a-select v-model:value="searchData.strInstallPos" style="width: 220px"
+                                placeholder="请选择上报地点">
+                                <a-select-option v-for="item in addressList" :key="item" :value="item.value">{{
+                                    item.label
+                                    }}</a-select-option>
+                            </a-select>
+                        </div>
+                    </a-col>
+
+                    <a-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" 
+                        @click="getPassSh">审核通过</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"
+                :pagination="pagination" @change="pageChange">
+                <template #bodyCell="{ column, text }">
+                    <template v-if="
+                        column.dataIndex == 'o2Night1' ||
+                        column.dataIndex == 'o2Night2' ||
+                        column.dataIndex == 'o2Early1' ||
+                        column.dataIndex == 'o2Early2' ||
+                        column.dataIndex == 'o2Noon1' ||
+                        column.dataIndex == 'o2Noon2'
+                    ">
+                        <div :style="{ color: Number(text) >= 18 && Number(text) <= 20.9 ? '#0ae715' : '#ff2313' }">{{
+                            text }}
+                        </div>
+                    </template>
+                    <template v-if="
+                        column.dataIndex == 'coNight1' ||
+                        column.dataIndex == 'coNight2' ||
+                        column.dataIndex == 'coEarly1' ||
+                        column.dataIndex == 'coEarly2' ||
+                        column.dataIndex == 'coNoon1' ||
+                        column.dataIndex == 'coNoon2'
+                    ">
+                        <div :style="{ color: Number(text) >= 0 && Number(text) <= 23 ? '#0ae715' : '#ff2313' }">{{ text
+                            }}</div>
+                    </template>
+                    <template v-if="
+                        column.dataIndex == 'tnight1' ||
+                        column.dataIndex == 'tnight2' ||
+                        column.dataIndex == 'tearly1' ||
+                        column.dataIndex == 'tearly2' ||
+                        column.dataIndex == 'tnoon1' ||
+                        column.dataIndex == 'tnoon2'
+                    ">
+                        <div :style="{ color: Number(text) >= 3 && Number(text) <= 25 ? '#0ae715' : '#ff2313' }">{{ text
+                            }}</div>
+                    </template>
+                    <template v-if="
+                        column.dataIndex == 'co2Night1' ||
+                        column.dataIndex == 'co2Night2' ||
+                        column.dataIndex == 'co2Early1' ||
+                        column.dataIndex == 'co2Early2' ||
+                        column.dataIndex == 'co2Noon1' ||
+                        column.dataIndex == 'co2Noon2'
+                    ">
+                        <div :style="{ color: Number(text) >= 0.04 && Number(text) <= 0.1 ? '#0ae715' : '#ff2313' }">{{
+                            text }}
+                        </div>
+                    </template>
+                    <template v-if="
+                        column.dataIndex == 'ch4Night1' ||
+                        column.dataIndex == 'ch4Night2' ||
+                        column.dataIndex == 'ch4Early1' ||
+                        column.dataIndex == 'ch4Early2' ||
+                        column.dataIndex == 'ch4Noon1' ||
+                        column.dataIndex == 'ch4Noon2'
+                    ">
+                        <div :style="{ color: Number(text) >= 0 && Number(text) <= 0.1 ? '#0ae715' : '#ff2313' }">{{
+                            text }}</div>
+                    </template>
+                </template>
+            </a-table>
+        </div>
+      
+    </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 customHeader from '/@/components/vent/customHeader.vue';
+import { message } from 'ant-design-vue';
+import dayjs from 'dayjs';
+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 pagination = reactive({
+    current: 1, // 当前页码
+    pageSize: 10, // 每页显示条数
+    total: 0, // 总条目数,后端返回
+    // showTotal: (total, range) => `${range[0]}-${range[1]} 条,总共 ${total} 条`, // 分页右下角显示信息
+    showSizeChanger: true, // 是否可改变每页显示条数
+    pageSizeOptions: ['10', '20', '50'], // 可选的每页显示条数
+});
+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 : '-';
+    });
+    tableData.value = res.records;
+    pagination.total = res.total;
+}
+//查询
+function getSearch() {
+    pagination.current = 1;
+    getTableList();
+}
+//重置
+function onReset() {
+    pagination.current = 1;
+    searchData.districtTeam = '';
+    searchData.reportTime = '';
+    searchData.strInstallPos = '';
+    searchData.sbr = '';
+    getTableList();
+}
+//分页切换
+function pageChange(val) {
+    pagination.current = val.current;
+    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 });
+        });
+        qdList = uniqueObjectsArray(qdList);
+    }
+}
+//导出报表
+async function getExport() {
+    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);
+            }
+        } else {
+            message.warning('请选择需要导出数据的填报日期!');
+        }
+    }
+}
+function getTs() {
+    let param = true;
+    tableData.value.forEach((el) => {
+        if (
+            Number(el.o2Night1) >= 18 &&
+            Number(el.o2Night1) <= 20.9 &&
+            Number(el.o2Night2) >= 18 &&
+            Number(el.o2Night2) <= 20.9 &&
+            Number(el.o2Early1) >= 18 &&
+            Number(el.o2Early1) <= 20.9 &&
+            Number(el.o2Early2) >= 18 &&
+            Number(el.o2Early2) <= 20.9 &&
+            Number(el.o2Noon1) >= 18 &&
+            Number(el.o2Noon1) <= 20.9 &&
+            Number(el.o2Noon2) >= 18 &&
+            Number(el.o2Noon2) <= 20.9
+        ) {
+            param = false;
+        } else if (
+            Number(el.coNight1) >= 0 &&
+            Number(el.coNight1) <= 23 &&
+            Number(el.coNight2) >= 0 &&
+            Number(el.coNight2) <= 23 &&
+            Number(el.coEarly1) >= 0 &&
+            Number(el.coEarly1) <= 23 &&
+            Number(el.coEarly2) >= 0 &&
+            Number(el.coEarly2) <= 23 &&
+            Number(el.coNoon1) >= 0 &&
+            Number(el.coNoon1) <= 23 &&
+            Number(el.coNoon2) >= 0 &&
+            Number(el.coNoon2) <= 23
+        ) {
+            param = false;
+        } else if (
+            Number(el.co2Night1) >= 0.04 &&
+            Number(el.co2Night1) <= 0.1 &&
+            Number(el.co2Night2) >= 0.04 &&
+            Number(el.co2Night2) <= 0.1 &&
+            Number(el.co2Early1) >= 0.04 &&
+            Number(el.co2Early1) <= 0.1 &&
+            Number(el.co2Early2) >= 0.04 &&
+            Number(el.co2Early2) <= 0.1 &&
+            Number(el.co2Noon1) >= 0.04 &&
+            Number(el.co2Noon1) <= 0.1 &&
+            Number(el.co2Noon2) >= 0.04 &&
+            Number(el.co2Noon2) <= 0.1
+        ) {
+            param = false;
+        } else if (
+            Number(el.tnight1) >= 3 &&
+            Number(el.tnight1) <= 25 &&
+            Number(el.tnight2) >= 3 &&
+            Number(el.tnight2) <= 25 &&
+            Number(el.tearly1) >= 3 &&
+            Number(el.tearly1) <= 25 &&
+            Number(el.tearly2) >= 3 &&
+            Number(el.tearly2) <= 25 &&
+            Number(el.tnoon1) >= 3 &&
+            Number(el.tnoon1) <= 25 &&
+            Number(el.tnoon2) >= 3 &&
+            Number(el.tnoon2) <= 25
+        ) {
+            param = false;
+        } else if (
+            Number(el.ch4Night1) >= 0 &&
+            Number(el.ch4Night1) <= 0.1 &&
+            Number(el.ch4Night2) >= 0 &&
+            Number(el.ch4Night2) <= 0.1 &&
+            Number(el.ch4Early1) >= 0 &&
+            Number(el.ch4Early1) <= 0.1 &&
+            Number(el.ch4Early2) >= 0 &&
+            Number(el.ch4Early2) <= 0.1 &&
+            Number(el.ch4Noon1) >= 0 &&
+            Number(el.ch4Noon1) <= 0.1 &&
+            Number(el.ch4Noon2) >= 0 &&
+            Number(el.ch4Noon2) <= 0.1
+        ) {
+            param = false;
+        } else {
+            param = true;
+            return;
+        }
+    });
+    return param;
+}
+
+//审核通过
+async function getPassSh() {
+    if (getTs()) {
+        message.warning('数据异常!');
+    } else {
+        let res = await reviewPass({ reportTime: searchData.reportTime });
+        if (res) {
+            getTableList();
+        }
+    }
+}
+
+// 下载公用方法
+function downFilePublic(content, fileName) {
+    const blob = new Blob([content], { type: 'application/xlsx;charset=UTF-8' }); // 构造一个blob对象来处理数据
+    // 对于<a>标签,只有 Firefox 和 Chrome(内核) 支持 download 属性
+    // IE10以上支持blob但是依然不支持download
+    if ('download' in document.createElement('a')) {
+        // 支持a标签download的浏览器
+        const link = document.createElement('a'); // 创建a标签
+        link.download = fileName; // a标签添加属性
+        link.style.display = 'none';
+        link.href = URL.createObjectURL(blob);
+        document.body.appendChild(link);
+        link.click(); // 执行下载
+        URL.revokeObjectURL(link.href); // 释放url
+        document.body.removeChild(link); // 释放标签
+    } else {
+        // 其他浏览器
+        navigator.msSaveBlob(blob, fileName);
+    }
+}
+//导出瓦斯班报表
+async function handleMenuClick(val) {
+    if (searchData.reportTime) {
+        let res = await expComReportByParam({ tempName: 'wsrbshb', reportTime: searchData.reportTime });
+        let filename = searchData.reportTime + '.xlsx';
+        downFilePublic(res, filename);
+    } else {
+        message.warning('请选择需要导出数据的填报日期!');
+    }
+}
+
+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',
+            component: 'ApiSelect',
+            required: true,
+            componentProps: {
+                api: queryUserByRoleCode,
+                params: { roleCode: 'gasCheck' },
+                labelField: 'realname',
+                valueField: 'username',
+                showSearch: true,
+            },
+        },
+    ],
+    labelWidth: 100,
+    showActionButtonGroup: false,
+});
+
+onMounted(() => {
+    getSelectList();
+    getTableList();
+});
+</script>
+
+<style lang="less" scoped>
+@import '/@/design/theme.less';
+
+.gasReport {
+    width: 100%;
+    height: 100%;
+    padding: 80px 10px 15px 10px;
+    box-sizing: border-box;
+    position: relative;
+
+    .search-area {
+        margin: 20px 0px;
+
+        .area-item {
+            display: flex;
+            align-items: center;
+
+            .item-text {
+                color: #fff;
+            }
+        }
+    }
+
+    .zxm-picker,
+    .zxm-input {
+        border: 1px solid var(--vent-form-item-border) !important;
+        background-color: #ffffff00 !important;
+        color: #fff !important;
+    }
+}
+
+:deep(.zxm-table-thead > tr > th:last-child) {
+    border-right: 1px solid #91e9fe !important;
+}
+
+:deep(.zxm-picker-input > input) {
+    color: #fff;
+}
+
+:deep(.zxm-select:not(.zxm-select-customize-input) .zxm-select-selector) {
+    border: 1px solid var(--vent-form-item-border) !important;
+    background-color: #ffffff00 !important;
+}
+
+:deep(.zxm-select-selection-item) {
+    color: #fff !important;
+}
+</style>

+ 13 - 1
src/views/vent/monitorManager/balancePressMonitor/balancePress.api.ts

@@ -1,5 +1,4 @@
 import { defHttp } from '/@/utils/http/axios';
-import { Modal } from 'ant-design-vue';
 
 enum Api {
   list = '/monitor/device',
@@ -8,6 +7,8 @@ enum Api {
   submit = '/monitor/demo/avePress/add',
   submitEdit = '/monitor/demo/avePress/edit',
   subList = '/monitor/demo/avePress/list',
+  updatePassword = '/monitor/demo/avePress/update/password',
+  validPassword = '/monitor/demo/avePress/valid/password',
 }
 /**
  * 列表接口
@@ -44,3 +45,14 @@ export const subList = (params) => defHttp.get({ url: Api.subList, params });
  * @param params
  */
 export const submitEdit = (params) => defHttp.post({ url: Api.submitEdit, params });
+
+export const updatePassword = (params) =>
+  defHttp.get({ url: Api.updatePassword, params }).then((e) => {
+    if (e.success) return Promise.resolve(e.result);
+    throw e.message;
+  });
+export const validPassword = (params) =>
+  defHttp.get({ url: Api.validPassword, params }).then((e) => {
+    if (e.success) return Promise.resolve(e.result);
+    throw e.message;
+  });

+ 52 - 11
src/views/vent/monitorManager/balancePressMonitor/components/balancePressHomeBD.vue

@@ -48,13 +48,13 @@
           <template #container>
             <div class="vent-flex-row-between auto-control mt-10px mb-10px">
               <div class="title">自动调节:</div>
-              <a-radio-group v-model:value="avePress.isAuto" name="radioGroup">
+              <a-radio-group :value="avePress.isAuto" name="radioGroup" @change="changeIsAuto">
                 <a-radio :value="false">关闭</a-radio>
                 <a-radio :value="true">开启</a-radio>
               </a-radio-group>
             </div>
             <div class="btn-box" style="text-align: center">
-              <div class="btn btn1" @click="modalVisible = true">提交</div>
+              <div class="btn btn1" @click="openModal">控制密码修改</div>
             </div>
           </template>
         </ventBox1>
@@ -71,12 +71,13 @@
       />
     </div>
     <PasswordModal :modal-is-show="modalVisible" modal-title="提交" @handle-ok="handleControl" @handle-cancel="modalVisible = false" />
+    <UpdatePassword @register="updatePwdRegister" @submit="changePassword" />
   </a-spin>
 </template>
 <script setup lang="ts">
   import { ref, onMounted, onUnmounted, defineProps } from 'vue';
   import { mountedThree, destroy, setModelType, updateText, play } from '../balancePress.threejs';
-  import { list, submitEdit, subList } from '../balancePress.api';
+  import { list, submitEdit, subList, updatePassword, validPassword } from '../balancePress.api';
   import ModuleCommon from '../../../home/configurable/components/ModuleCommon.vue';
   import { useInitConfigs } from '../../../home/configurable/hooks/useInit';
   import { useGlobSetting } from '/@/hooks/setting';
@@ -84,7 +85,9 @@
   import { message } from 'ant-design-vue';
   import ventBox1 from '/@/components/vent/ventBox1.vue';
   import PasswordModal from '../../comment/components/PasswordModal.vue';
+  import UpdatePassword from '../../comment/components/UpdatePassword.vue';
   import { get } from 'lodash-es';
+  import { useModal } from '/@/components/Modal';
   // import { Config } from '../../../deviceManager/configurationTable/types';
 
   const props = defineProps({
@@ -325,9 +328,17 @@
 
   // const { configs, fetchConfigs } = useInitConfigs();
 
-  const formData = ref({});
+  const formData = ref({
+    isAuto: false,
+  });
   // 默认初始是第一行
   const isAutoControl = ref('1');
+
+  function changeIsAuto({ target }) {
+    formData.value.isAuto = target.value;
+    modalVisible.value = true;
+  }
+
   const changeType = (isAutoControl) => {
     isAutoControl;
     //
@@ -336,20 +347,28 @@
   const modalVisible = ref(false);
 
   function handleControl(password) {
-    submitEdit({
+    validPassword({
       id: avePress.value.id,
       password,
-      isAuto: avePress.value.isAuto,
     })
       .then(() => {
-        message.success('操作成功');
-        getAvePress();
+        return submitEdit({
+          id: avePress.value.id,
+          isAuto: formData.value.isAuto,
+        })
+          .then(() => {
+            message.success('操作成功');
+          })
+          .catch(() => {
+            message.error('操作失败');
+          });
       })
-      .catch(() => {
-        message.error('操作失败');
+      .catch((e) => {
+        message.error(e);
       })
       .finally(() => {
         modalVisible.value = false;
+        getAvePress();
       });
   }
 
@@ -364,9 +383,31 @@
 
   const { configs, fetchConfigs } = useInitConfigs();
 
+  const [updatePwdRegister, { openModal, closeModal, setModalProps }] = useModal();
+
+  function changePassword(values) {
+    setModalProps({ confirmLoading: true });
+    updatePassword({
+      id: avePress.value.id,
+      newPassword: values.password,
+      oldPassword: values.oldpassword,
+    })
+      .then(() => {
+        message.success('操作成功');
+      })
+      .catch((e) => {
+        message.error(e);
+      })
+      .finally(() => {
+        setModalProps({ confirmLoading: false });
+        closeModal();
+        getAvePress();
+      });
+  }
+
   onMounted(() => {
     // getMonitor()
-    // fetchConfigs('balancePressHome');
+    fetchConfigs('balancePressHome');
     getAvePress();
     loading.value = true;
     mountedThree().then(async () => {

+ 55 - 0
src/views/vent/monitorManager/comment/components/UpdatePassword.vue

@@ -0,0 +1,55 @@
+<template>
+  <BasicModal v-bind="$attrs" @register="registerModal" title="修改密码" @ok="handleSubmit" width="600px">
+    <BasicForm @register="registerForm" />
+  </BasicModal>
+</template>
+<script lang="ts" setup>
+  import { rules } from '/@/utils/helper/validator';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import BasicForm from '/@/components/Form/src/BasicForm.vue';
+  import { useForm } from '/@/components/Form/src/hooks/useForm';
+
+  // 声明Emits
+  const emit = defineEmits(['register', 'submit']);
+  //表单配置
+  const [registerForm, { validate }] = useForm({
+    schemas: [
+      {
+        label: '旧密码',
+        field: 'oldpassword',
+        component: 'InputPassword',
+        required: true,
+      },
+      {
+        label: '新密码',
+        field: 'password',
+        component: 'InputPassword',
+        // component: 'StrengthMeter',
+        componentProps: {
+          placeholder: '请输入新密码',
+        },
+        rules: [
+          {
+            required: true,
+            message: '请输入新密码',
+          },
+        ],
+      },
+      {
+        label: '确认新密码',
+        field: 'confirmpassword',
+        component: 'InputPassword',
+        dynamicRules: ({ values }) => rules.confirmPassword(values, true),
+      },
+    ],
+    showActionButtonGroup: false,
+  });
+  //表单赋值
+  const [registerModal] = useModalInner();
+
+  //表单提交事件
+  async function handleSubmit() {
+    const values = await validate();
+    emit('submit', values);
+  }
+</script>

+ 280 - 262
src/views/vent/monitorManager/safetyMonitor/AlarmHistoryTable.vue

@@ -9,299 +9,317 @@
 </template>
 
 <script lang="ts" name="system-user" setup>
-  //ts语法
-  import { watch, ref, defineExpose, inject, onMounted } from 'vue';
-  import { BasicTable } from '/@/components/Table';
-  import { useListPage } from '/@/hooks/system/useListPage';
-  import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
-  import { defHttp } from '/@/utils/http/axios';
-  import dayjs from 'dayjs';
-  import { getAutoScrollContainer } from '/@/utils/common/compUtils';
-  import { safetyDeviceList, safetyList } from './safety.api';
+//ts语法
+import { watch, ref, defineExpose, inject, onMounted } from 'vue';
+import { BasicTable } from '/@/components/Table';
+import { useListPage } from '/@/hooks/system/useListPage';
+import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
+import { defHttp } from '/@/utils/http/axios';
+import dayjs from 'dayjs';
+import { getAutoScrollContainer } from '/@/utils/common/compUtils';
+import { safetyDeviceList, safetyList } from './safety.api';
 
-  const props = defineProps({
-    columnsType: {
-      type: String,
-      required: true,
-    },
-    columns: {
-      type: Array,
-      // required: true,
-      default: () => [],
-    },
-    deviceType: {
-      type: String,
-      required: true,
-    },
-    deviceListApi: {
-      type: Function,
-    },
-    designScope: {
-      type: String,
-    },
-    sysId: {
-      type: String,
-    },
-    scroll: {
-      type: Object,
-      default: { y: 0 },
-    },
-    list: {
-      type: Function,
-      default: (params) => defHttp.get({ url: '/safety/ventanalyAlarmLog/list', params }),
-    },
-  });
+const props = defineProps({
+  columnsType: {
+    type: String,
+    required: true,
+  },
+  columns: {
+    type: Array,
+    // required: true,
+    default: () => [],
+  },
+  deviceType: {
+    type: String,
+    required: true,
+  },
+  deviceListApi: {
+    type: Function,
+  },
+  designScope: {
+    type: String,
+  },
+  sysId: {
+    type: String,
+  },
+  scroll: {
+    type: Object,
+    default: { y: 0 },
+  },
+  list: {
+    type: Function,
+    default: (params) => defHttp.get({ url: '/safety/ventanalyAlarmLog/list', params }),
+  },
+});
 
-  const getDeviceListApi = (params) => defHttp.post({ url: '/monitor/device', params });
-  const globalConfig = inject('globalConfig');
-  const alarmHistory = ref();
-  const columns = ref([]);
-  const deviceOptions = ref([]);
-  const dataTypeName = ref('');
+const getDeviceListApi = (params) => defHttp.post({ url: '/monitor/device', params });
+const globalConfig = inject('globalConfig');
+const alarmHistory = ref();
+const columns = ref([]);
+const deviceOptions = ref([]);
+const dataTypeName = ref('');
 
-  const tableScroll = props.scroll.y ? ref({ y: props.scroll.y - 100 }) : ref({});
+const tableScroll = props.scroll.y ? ref({ y: props.scroll.y - 100 }) : ref({});
 
-  async function getDeviceList() {
-    let result;
-    const res = await getDeviceListApi({ devicetype: props.deviceType, filterParams: { dataTypeName: dataTypeName.value }, pageSize: 10000 });
-    if (res['records'] && res['records'].length > 0) {
-      result = res['records'];
-    } else if (res['msgTxt'] && res['msgTxt'][0] && res['msgTxt'][0]['datalist']) {
-      result = res['msgTxt'][0]['datalist'];
+async function getDeviceList() {
+  let result;
+  const res = await getDeviceListApi({ devicetype: props.deviceType, filterParams: { dataTypeName: dataTypeName.value }, pageSize: 10000 });
+  if (res['records'] && res['records'].length > 0) {
+    result = res['records'];
+  } else if (res['msgTxt'] && res['msgTxt'][0] && res['msgTxt'][0]['datalist']) {
+    result = res['msgTxt'][0]['datalist'];
+  }
+  if (result && result.length > 0) {
+    deviceOptions.value = [];
+    deviceOptions.value = result.map((item, index) => {
+      return {
+        label: item['strinstallpos'],
+        value: item['id'] || item['deviceID'],
+        strtype: item['strtype'] || item['deviceType'],
+        strinstallpos: item['strinstallpos'],
+        devicekind: item['devicekind'],
+        stationtype: item['stationtype'],
+      };
+    });
+  } else {
+    deviceOptions.value = [];
+  }
+  await getForm().setFieldsValue({ deviceId: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '' });
+}
+
+watch(
+  () => {
+    return props.columnsType;
+  },
+  async (newVal) => {
+    if (!newVal) return;
+    let column;
+    column = getTableHeaderColumns('safetymonitor_warning');
+    if (!column || column.length < 1) {
+      column = getTableHeaderColumns(newVal + '_history');
     }
-    if (result && result.length > 0) {
-      deviceOptions.value = [];
-      deviceOptions.value = result.map((item, index) => {
-        return {
-          label: item['strinstallpos'],
-          value: item['id'] || item['deviceID'],
-          strtype: item['strtype'] || item['deviceType'],
-          strinstallpos: item['strinstallpos'],
-          devicekind: item['devicekind'],
-          stationtype: item['stationtype'],
-        };
+    if (column && column.length < 1) {
+      const arr = newVal.split('_');
+      const columnKey = arr.reduce((prev, cur, index) => {
+        if (index !== arr.length - 2) {
+          return prev + '_' + cur;
+        } else {
+          return prev;
+        }
       });
+      columns.value = getTableHeaderColumns(arr[0] + '_history');
     } else {
-      deviceOptions.value = [];
+      columns.value = column;
     }
-    await getForm().setFieldsValue({ deviceId: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '' });
+    if (alarmHistory.value) reload();
+  },
+  {
+    immediate: true,
   }
+);
 
-  watch(
-    () => {
-      return props.columnsType;
-    },
-    async (newVal) => {
-      if (!newVal) return;
-      let column;
-      column = getTableHeaderColumns('safetymonitor_warning');
-      if (!column || column.length < 1) {
-        column = getTableHeaderColumns(newVal + '_history');
-      }
-      if (column && column.length < 1) {
-        const arr = newVal.split('_');
-        const columnKey = arr.reduce((prev, cur, index) => {
-          if (index !== arr.length - 2) {
-            return prev + '_' + cur;
-          } else {
-            return prev;
-          }
-        });
-        columns.value = getTableHeaderColumns(arr[0] + '_history');
-      } else {
-        columns.value = column;
-      }
-      if (alarmHistory.value) reload();
-    },
-    {
-      immediate: true,
-    }
-  );
+watch(
+  () => props.deviceType,
+  async () => {
+    if (alarmHistory.value) getForm().resetFields();
+    await getDeviceList();
+  }
+);
 
-  watch(
-    () => props.deviceType,
-    async () => {
-      if (alarmHistory.value) getForm().resetFields();
-      await getDeviceList();
+watch(
+  () => props.scroll.y,
+  (newVal) => {
+    if (newVal) {
+      tableScroll.value = { y: newVal - 100 };
+    } else {
+      tableScroll.value = {};
     }
-  );
+  }
+);
 
-  watch(
-    () => props.scroll.y,
-    (newVal) => {
-      if (newVal) {
-        tableScroll.value = { y: newVal - 100 };
-      } else {
-        tableScroll.value = {};
-      }
-    }
-  );
+// 列表页面公共参数、方法
+const { tableContext, onExportXls } = useListPage({
+  tableProps: {
+    api: safetyList,
+    columns: props.columnsType ? columns : (props.columns as any[]),
+    canResize: false,
+    showTableSetting: false,
+    showActionColumn: false,
+    bordered: false,
+    showIndexColumn: true,
+    size: 'small',
+    scroll: tableScroll,
+    formConfig: {
+      labelAlign: 'left',
+      showAdvancedButton: false,
+      // autoAdvancedCol: 2,
+      actionColOptions: {
 
-  // 列表页面公共参数、方法
-  const { tableContext, onExportXls } = useListPage({
-    tableProps: {
-      api: safetyList,
-      columns: props.columnsType ? columns : (props.columns as any[]),
-      canResize: false,
-      showTableSetting: false,
-      showActionColumn: false,
-      bordered: false,
-      showIndexColumn: true,
-      size: 'small',
-      scroll: tableScroll,
-      formConfig: {
-        labelAlign: 'left',
-        showAdvancedButton: false,
-        // autoAdvancedCol: 2,
-        schemas: [
-          {
-            field: 'startTime',
-            label: '开始时间',
-            component: 'DatePicker',
-            defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
-            required: true,
-            componentProps: {
-              showTime: true,
-              valueFormat: 'YYYY-MM-DD HH:mm:ss',
-              getPopupContainer: getAutoScrollContainer,
-            },
-            colProps: {
-              span: 4,
-            },
+        xs: 4, // <576px
+        sm: 14, // ≥576px
+        md: 4, // ≥768px
+        lg: 4, // ≥992px
+        xl: 4, // ≥1200px
+        xxl: 4, // ≥1600px
+
+        style: { textAlign: 'left' },
+      },
+      schemas: [
+        {
+          field: 'startTime',
+          label: '开始时间',
+          component: 'DatePicker',
+          defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
+          required: true,
+          componentProps: {
+            showTime: true,
+            valueFormat: 'YYYY-MM-DD HH:mm:ss',
+            getPopupContainer: getAutoScrollContainer,
           },
-          {
-            field: 'endTime',
-            label: '结束时间',
-            component: 'DatePicker',
-            defaultValue: dayjs(),
-            required: true,
-            componentProps: {
-              showTime: true,
-              valueFormat: 'YYYY-MM-DD HH:mm:ss',
-              getPopupContainer: getAutoScrollContainer,
-            },
-            colProps: {
-              span: 4,
-            },
+          colProps: {
+            span: 4,
           },
-          {
-            label: '设备类型',
-            field: 'dataTypeName',
-            component: 'ApiSelect',
-            componentProps: {
-              api: safetyDeviceList.bind(null, { devicetype: 'safetymonitor', code: 'dataTypeName' }),
-              labelField: 'name',
-              valueField: 'code',
-              onChange: async (e, option) => {
-                console.log('1111', e, option);
-                dataTypeName.value = e;
-                await getDeviceList();
-              },
-            },
-            colProps: {
-              span: 4,
-            },
+        },
+        {
+          field: 'endTime',
+          label: '结束时间',
+          component: 'DatePicker',
+          defaultValue: dayjs(),
+          required: true,
+          componentProps: {
+            showTime: true,
+            valueFormat: 'YYYY-MM-DD HH:mm:ss',
+            getPopupContainer: getAutoScrollContainer,
           },
-          {
-            label: '查询设备',
-            field: 'deviceId',
-            component: 'Select',
-            defaultValue: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '',
-            componentProps: {
-              showSearch: true,
-              filterOption: (input: string, option: any) => {
-                return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
-              },
-              options: deviceOptions,
-            },
-            colProps: {
-              span: 4,
+          colProps: {
+            span: 4,
+          },
+        },
+        {
+          label: '设备类型',
+          field: 'dataTypeName',
+          component: 'ApiSelect',
+          componentProps: {
+            api: safetyDeviceList.bind(null, { devicetype: 'safetymonitor', code: 'dataTypeName' }),
+            labelField: 'name',
+            valueField: 'code',
+            onChange: async (e, option) => {
+              console.log('1111', e, option);
+              dataTypeName.value = e;
+              await getDeviceList();
             },
           },
-          {
-            label: '是否解决',
-            field: 'isok',
-            component: 'Select',
-            componentProps: {
-              options: [
-                {
-                  label: '未解决',
-                  value: '0',
-                },
-                {
-                  label: '已解决',
-                  value: '1',
-                },
-              ],
+          colProps: {
+            span: 4,
+          },
+        },
+        {
+          label: '查询设备',
+          field: 'deviceId',
+          component: 'Select',
+          defaultValue: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '',
+          componentProps: {
+            showSearch: true,
+            filterOption: (input: string, option: any) => {
+              return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
             },
-            colProps: { span: 4 },
+            options: deviceOptions,
           },
-        ],
-      },
-      fetchSetting: {
-        listField: 'records',
-      },
-      pagination: {
-        current: 1,
-        pageSize: 10,
-        pageSizeOptions: ['10', '30', '50', '100'],
-      },
-      // beforeFetch(params) {
-      //   params.devicetype = props.deviceType + '*';
-      //   if (props.sysId) {
-      //     params.sysId = props.sysId;
-      //   }
-      // },
+          colProps: {
+            span: 4,
+          },
+        },
+        {
+          label: '是否解决',
+          field: 'isok',
+          component: 'Select',
+          componentProps: {
+            options: [
+              {
+                label: '未解决',
+                value: '0',
+              },
+              {
+                label: '已解决',
+                value: '1',
+              },
+            ],
+          },
+          colProps: { span: 4 },
+        },
+      ],
     },
-    exportConfig: {
-      name: '预警历史列表',
-      url: '/safety/ventanalyAlarmLog/exportXls',
+    fetchSetting: {
+      listField: 'records',
     },
-  });
-  //注册table数据
-  const [registerTable, { reload, setLoading, getForm }] = tableContext;
+    pagination: {
+      current: 1,
+      pageSize: 10,
+      pageSizeOptions: ['10', '30', '50', '100'],
+    },
+    // beforeFetch(params) {
+    //   params.devicetype = props.deviceType + '*';
+    //   if (props.sysId) {
+    //     params.sysId = props.sysId;
+    //   }
+    // },
+  },
+  exportConfig: {
+    name: '预警历史列表',
+    url: '/safety/ventanalyAlarmLog/exportXls',
+  },
+});
+//注册table数据
+const [registerTable, { reload, setLoading, getForm }] = tableContext;
 
-  onMounted(async () => {
-    await getDeviceList();
-  });
+onMounted(async () => {
+  await getDeviceList();
+});
 
-  defineExpose({ setLoading });
+defineExpose({ setLoading });
 </script>
 
 <style scoped lang="less">
-  @ventSpace: zxm;
+@ventSpace: zxm;
 
-  :deep(.ventSpace-table-body) {
-    height: auto !important;
-  }
-  :deep(.zxm-picker) {
-    height: 30px !important;
-  }
-  .alarm-history-table {
-    width: 100%;
-    :deep(.jeecg-basic-table-form-container) {
-      .@{ventSpace}-form {
-        padding: 0 !important;
-        border: none !important;
-        margin-bottom: 0 !important;
-        .@{ventSpace}-picker,
-        .@{ventSpace}-select-selector {
-          width: 100% !important;
-          background: #00000017;
-          border: 1px solid #b7b7b7;
-          input,
-          .@{ventSpace}-select-selection-item,
-          .@{ventSpace}-picker-suffix {
-            color: #fff;
-          }
-          .@{ventSpace}-select-selection-placeholder {
-            color: #ffffffaa;
-          }
+:deep(.ventSpace-table-body) {
+  height: auto !important;
+}
+
+:deep(.zxm-picker) {
+  height: 30px !important;
+}
+
+.alarm-history-table {
+  width: 100%;
+
+  :deep(.jeecg-basic-table-form-container) {
+    .@{ventSpace}-form {
+      padding: 0 !important;
+      border: none !important;
+      margin-bottom: 0 !important;
+
+      .@{ventSpace}-picker,
+      .@{ventSpace}-select-selector {
+        width: 100% !important;
+        background: #00000017;
+        border: 1px solid #b7b7b7;
+
+        input,
+        .@{ventSpace}-select-selection-item,
+        .@{ventSpace}-picker-suffix {
+          color: #fff;
+        }
+
+        .@{ventSpace}-select-selection-placeholder {
+          color: #ffffffaa;
         }
       }
-      .@{ventSpace}-table-title {
-        min-height: 0 !important;
-      }
+    }
+
+    .@{ventSpace}-table-title {
+      min-height: 0 !important;
     }
   }
+}
 </style>

+ 45 - 34
src/views/vent/monitorManager/warningMonitor/index-mine.vue

@@ -1,5 +1,5 @@
 <template>
-  <customHeader>预警历史监控系统222</customHeader>
+  <customHeader>预警历史监控系统</customHeader>
   <div class="data-statistics">
     <div class="statistics-box" v-for="(item, index) in statisticsList" :key="index">
       <div class="left-box">
@@ -20,43 +20,52 @@
   <a-tabs class="tab-box" v-model:activeKey="activeKey" @change="onChangeTab">
     <a-tab-pane tab="设备预警历史" key="device" />
     <a-tab-pane tab="联动预警历史" key="manageAuto" />
+    <a-tab-pane tab="安全监控预警历史" key="safety" />
   </a-tabs>
   <div class="alarm-history-table">
-    <BasicTable v-if="activeKey == 'device'" ref="alarmHistory" @register="registerTable" :scroll="{ x: 0, y: 350 }">
-      <template #form-onExportXls>
-        <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls()"> 导出</a-button>
-      </template>
-      <template #bodyCell="{ column, record }">
-        <template v-if="column.dict">
-          <!-- 除了 101(蓝色预警)其他都是红色字体 -->
-          <span v-if="column.dataIndex === 'nwartype'"
-            :class="{ 'color-#ff3823': ['102', '103', '104', '201', '1001'].includes(record.nwartype) }">
-            {{ render.renderDictText(record.nwartype, 'leveltype') || '-' }}
-          </span>
-          <span v-else>
-            {{ render.renderDictText(record[column.dataIndex], column.dict) || '-' }}
-          </span>
+    <template v-if="activeKey == 'device'">
+      <BasicTable ref="alarmHistory" @register="registerTable" :scroll="{ x: 0, y: 350 }">
+        <template #form-onExportXls>
+          <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls()"> 导出</a-button>
         </template>
-      </template>
-    </BasicTable>
-    <BasicTable v-if="activeKey == 'manageAuto'" ref="alarmHistory" @register="registerTable"
-      :scroll="{ x: 0, y: 350 }">
-      <template #form-onExportXls>
-        <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls()"> 导出</a-button>
-      </template>
-      <template #bodyCell="{ column, record }">
-        <template v-if="column.dict">
-          <!-- 除了 101(蓝色预警)其他都是红色字体 -->
-          <span v-if="column.dataIndex === 'nwartype'"
-            :class="{ 'color-#ff3823': ['102', '103', '104', '201', '1001'].includes(record.nwartype) }">
-            {{ render.renderDictText(record.nwartype, 'leveltype') || '-' }}
-          </span>
-          <span v-else>
-            {{ render.renderDictText(record[column.dataIndex], column.dict) || '-' }}
-          </span>
+        <template #bodyCell="{ column, record }">
+          <template v-if="column.dict">
+            <!-- 除了 101(蓝色预警)其他都是红色字体 -->
+            <span v-if="column.dataIndex === 'nwartype'"
+              :class="{ 'color-#ff3823': ['102', '103', '104', '201', '1001'].includes(record.nwartype) }">
+              {{ render.renderDictText(record.nwartype, 'leveltype') || '-' }}
+            </span>
+            <span v-else>
+              {{ render.renderDictText(record[column.dataIndex], column.dict) || '-' }}
+            </span>
+          </template>
         </template>
-      </template>
-    </BasicTable>
+      </BasicTable>
+    </template>
+    <template v-if="activeKey == 'manageAuto'">
+      <BasicTable ref="alarmHistory" @register="registerTable" :scroll="{ x: 0, y: 350 }">
+        <template #form-onExportXls>
+          <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls()"> 导出</a-button>
+        </template>
+        <template #bodyCell="{ column, record }">
+          <template v-if="column.dict">
+            <!-- 除了 101(蓝色预警)其他都是红色字体 -->
+            <span v-if="column.dataIndex === 'nwartype'"
+              :class="{ 'color-#ff3823': ['102', '103', '104', '201', '1001'].includes(record.nwartype) }">
+              {{ render.renderDictText(record.nwartype, 'leveltype') || '-' }}
+            </span>
+            <span v-else>
+              {{ render.renderDictText(record[column.dataIndex], column.dict) || '-' }}
+            </span>
+          </template>
+        </template>
+      </BasicTable>
+    </template>
+    <template v-if="activeKey == 'safety'">
+      <AlarmHistoryTable ref="alarmHistoryTable" columns-type="alarm" :list="safetyList" device-type="safetymonitor"
+        :device-list-api="getDeviceList.bind(null, { devicekind: 'safetymonitor', pageSize: 10000 })"
+        designScope="alarm-history" />
+    </template>
   </div>
 </template>
 
@@ -69,8 +78,10 @@ import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
 import { manageAutoColumns } from './alarm.data';
 import { getAutoScrollContainer } from '/@/utils/common/compUtils';
 import { getAlarmLogList, getManageAutoLogList, getWarnCountInfo } from './warning.api';
+import { getDeviceList, safetyList, } from '../safetyMonitor/safety.api';
 import { useRoute } from 'vue-router';
 import customHeader from '/@/components/vent/customHeader.vue';
+import AlarmHistoryTable from '../safetyMonitor/AlarmHistoryTable.vue';
 import { render } from '/@/utils/common/renderUtils';
 const props = defineProps({
   formConfig: {