Bläddra i källkod

[Feat 0000]导入巡检任务功能 瓦斯日报管理页面修改

bobo04052021@163.com 3 dagar sedan
förälder
incheckning
8434e77bcb

+ 1 - 0
.env

@@ -1,4 +1,5 @@
 # port
+###8062 数据中心  3100  
 VITE_PORT = 3100
 
 #  网站标题

+ 3 - 2
src/hooks/setting/index.ts

@@ -9,11 +9,12 @@ let domainUrl = '',
   sysOrgCode = '',
   title = '',
   sysDataType = 'report';
-
+const port = window.location.port;
+const apiPath = port === '8062' ? '/collect/orgParams/queryDefault' : '/safety/orgParams/queryDefault';
 const getUrl = () => {
   return new Promise((resolve, reject) => {
     try {
-      fetch(VUE_APP_URL.baseUrl + '/safety/orgParams/queryDefault', {
+      fetch(VUE_APP_URL.baseUrl + apiPath, {
         method: 'GET',
         cache: 'no-cache',
         headers: {

+ 1 - 3
src/views/monitor/quartz/QuartzModal1.vue

@@ -13,7 +13,6 @@ import { isJsonObjectString } from '/@/utils/is';
 // Emits声明
 const emit = defineEmits(['register', 'success']);
 const isUpdate = ref(true);
-const sysType = ref('');
 //表单配置
 const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
   // labelWidth: 150,
@@ -36,7 +35,6 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
     //data.record = await getQuartzById({id: data.record.id});
     try {
       data.record.paramterType = isJsonObjectString(data?.record?.parameter) ? 'json' : 'string';
-      sysType.value = data.record.sysType;
     } catch (e) {
       console.log(e);
     }
@@ -55,7 +53,7 @@ async function handleSubmit(v) {
     setModalProps({ confirmLoading: true });
     //提交表单
     if (isUpdate.value) {
-      await dataCenterUpdateQuartz(values, sysType.value, 'edit');
+      await dataCenterUpdateQuartz(values, values.sysType, 'edit');
     } else {
       await dataCenterSaveQuartz(values, values.sysType, 'add');
     }

+ 7 - 0
src/views/vent/gas/gasInspect/gasInspect.api.ts

@@ -22,6 +22,7 @@ enum Api {
   zipdownload = '/ventanaly-sharefile/fileServer/zipdownload',
   operateGasCheckTaskDetail = '/safety/gasDayReport/operateGasCheckTaskDetail',
   getManageTasklist = '/safety/gasDayReport/getManageTasklist',
+  importSwGasCheckTask = '/ventanaly-device/safety/gasDayReport/importSwGasCheckTask', //导入瓦斯巡回检查任务
 }
 
 /**
@@ -125,3 +126,9 @@ export const operateGasCheckTaskDetail = (params) => defHttp.post({ url: Api.ope
  * @param params
  */
 export const getManageTasklist = (params) => defHttp.post({ url: Api.getManageTasklist, params });
+/**
+ * 导入瓦斯巡回检查任务
+ * @param params FormData:file(Excel文件)、taskTime(巡检任务日期)
+ */
+export const importSwGasCheckTask = (params) =>
+  defHttp.post({ headers: { 'Content-Type': 'multipart/form-data' }, url: Api.importSwGasCheckTask, params });

+ 361 - 239
src/views/vent/gas/gasInspect/index2.vue

@@ -6,7 +6,9 @@
       <BasicTable @register="registerTable1">
         <template #tableTitle>
           <a-space>
-            <a-button type="primary" preIcon="ant-design:plus-outlined" @click="handleEdit">新增任务</a-button>
+            <a-button type="primary" v-if="!isShowImport" preIcon="ant-design:plus-outlined" @click="handleEdit">新增任务</a-button>
+            <!--  v-if="isShowImport"  上湾显示导入巡检任务按钮 -->
+            <a-button type="primary" v-if="isShowImport" preIcon="ant-design:plus-outlined" @click="handleImport">导入巡检任务</a-button>
           </a-space>
         </template>
         <template #action="{ record }">
@@ -75,284 +77,404 @@
           </template>
         </BasicTable>
       </BasicModal>
+      <BasicModal :destroy-on-close="true" title="导入巡检任务" :width="520" @register="registerModal4" @ok="handleImportSubmit">
+        <div class="import-task-modal">
+          <a-form :label-col="{ span: 6 }" :wrapper-col="{ span: 16 }">
+            <a-form-item label="巡检任务">
+              <a-date-picker v-model:value="importForm.taskTime" style="width: 240px" value-format="YYYY-MM-DD" placeholder="请选择巡检任务日期" />
+            </a-form-item>
+            <a-form-item label="选择文件">
+              <a-upload :before-upload="beforeUpload" @remove="handleRemove" :multiple="false" :file-list="fileList" accept=".xls,.xlsx">
+                <a-button type="primary" preIcon="ant-design:cloud-upload-outlined">选择文件</a-button>
+              </a-upload>
+            </a-form-item>
+          </a-form>
+        </div>
+      </BasicModal>
     </div>
   </div>
 </template>
 
 <script setup lang="ts">
-  import { ref, onMounted, nextTick } from 'vue';
-  import customHeader from '/@/components/vent/customHeader.vue';
-  import { taskColumns, pagination, taskschemas, taskDetailsColumns, taskManageColumns } from './gasInspect.data';
-  import { deleteTeamNew, getManageTasklist, operateGasCheckTaskDetail, taskDetailsList, teamAdd, teamEdit, teamList } from './gasInspect.api';
-  import { BasicTable } from '/@/components/Table';
-  import { useListPage } from '/@/hooks/system/useListPage';
-  import { Modal, message } from 'ant-design-vue';
-  import { BasicModal, useModal } from '/@/components/Modal';
-  import { BasicForm, useForm } from '/@/components/Form';
-  import dayjs from 'dayjs';
+import { ref, onMounted, nextTick } from 'vue';
+import customHeader from '/@/components/vent/customHeader.vue';
+import { taskColumns, pagination, taskschemas, taskDetailsColumns, taskManageColumns } from './gasInspect.data';
+import {
+  deleteTeamNew,
+  getManageTasklist,
+  importSwGasCheckTask,
+  operateGasCheckTaskDetail,
+  taskDetailsList,
+  teamAdd,
+  teamEdit,
+  teamList,
+} from './gasInspect.api';
+import { BasicTable } from '/@/components/Table';
+import { useListPage } from '/@/hooks/system/useListPage';
+import { Modal, message } from 'ant-design-vue';
+import { BasicModal, useModal } from '/@/components/Modal';
+import { BasicForm, useForm } from '/@/components/Form';
+import { useGlobSetting } from '/@/hooks/setting';
+import dayjs from 'dayjs';
 
-  // 任务列表
-  const searchParams1 = ref<any>({ deviceName: '' });
-  const { tableContext: tx1 } = useListPage({
-    tableProps: {
-      api: teamList,
-      beforeFetch: (params) => {
-        Object.assign(params, searchParams1.value);
-      },
-      columns: taskColumns,
-      pagination,
-      formConfig: {
-        labelAlign: 'left',
-        labelWidth: 80,
-        compact: true,
-        schemas: [
-          {
-            label: '日期',
-            field: 'taskTime',
-            component: 'DatePicker',
-            defaultValue: dayjs(),
-            componentProps: {
-              showTime: false,
-              valueFormat: 'YYYY-MM-DD',
-              // getPopupContainer: getAutoScrollContainer,
-            },
+const { sysOrgCode } = useGlobSetting();
+const isShowImport = ref(false);
+if (sysOrgCode === 'sdmtjtswmk') {
+  isShowImport.value = true;
+} else {
+  isShowImport.value = false;
+}
+// 任务列表
+const searchParams1 = ref<any>({ deviceName: '' });
+const { tableContext: tx1 } = useListPage({
+  tableProps: {
+    api: teamList,
+    beforeFetch: (params) => {
+      Object.assign(params, searchParams1.value);
+    },
+    columns: taskColumns,
+    pagination,
+    formConfig: {
+      labelAlign: 'left',
+      labelWidth: 80,
+      compact: true,
+      schemas: [
+        {
+          label: '日期',
+          field: 'taskTime',
+          component: 'DatePicker',
+          defaultValue: dayjs(),
+          componentProps: {
+            showTime: false,
+            valueFormat: 'YYYY-MM-DD',
+            // getPopupContainer: getAutoScrollContainer,
           },
-          {
-            label: '所属区队',
-            field: 'teamCode',
-            component: 'JDictSelectTag',
-            componentProps: {
-              dictCode: 'districtTeam',
-            },
+        },
+        {
+          label: '所属区队',
+          field: 'teamCode',
+          component: 'JDictSelectTag',
+          componentProps: {
+            dictCode: 'districtTeam',
           },
-        ],
-      },
-      actionColumn: {
-        title: '操作',
-        dataIndex: 'action',
-        width: 250,
-        align: 'center',
-        slots: { customRender: 'action' },
-      },
-      showTableSetting: false,
-      useSearchForm: true,
+        },
+      ],
     },
-    pagination: true,
-  });
-  // 任务详情列表
-  const searchParams2 = ref<any>({ deviceName: '' });
-  const { tableContext: tx2 } = useListPage({
-    tableProps: {
-      api: taskDetailsList,
-      beforeFetch: (params) => {
-        Object.assign(params, {
-          ...searchParams2.value,
-          taskId: selectedRow.value.id,
-          taskTime: selectedRow.value.taskTime,
-        });
-      },
-      columns: taskDetailsColumns,
-      pagination,
-      showActionColumn: false,
-      showTableSetting: false,
-      useSearchForm: false,
+    actionColumn: {
+      title: '操作',
+      dataIndex: 'action',
+      width: 250,
+      align: 'center',
+      slots: { customRender: 'action' },
     },
-    pagination: true,
-  });
-  // 任务管理列表
-  const searchParams3 = ref<any>({ deviceName: '' });
-  const { tableContext: tx3 } = useListPage({
-    tableProps: {
-      api: getManageTasklist,
-      beforeFetch: (params) => {
-        Object.assign(params, {
-          ...searchParams3.value,
-          taskId: selectedRow.value.id,
-          taskTime: selectedRow.value.taskTime,
-        });
-      },
-      afterFetch(resultItems) {
-        resultItems.forEach((item, i) => {
-          item.id = i;
-        });
-        return resultItems;
-      },
-      rowSelection: {
-        type: 'checkbox',
-        getCheckboxProps: (record) => {
-          return {
-            disabled: record.isOtherSelect,
-          };
-        },
+    showTableSetting: false,
+    useSearchForm: true,
+  },
+  pagination: true,
+});
+// 任务详情列表
+const searchParams2 = ref<any>({ deviceName: '' });
+const { tableContext: tx2 } = useListPage({
+  tableProps: {
+    api: taskDetailsList,
+    beforeFetch: (params) => {
+      Object.assign(params, {
+        ...searchParams2.value,
+        taskId: selectedRow.value.id,
+        taskTime: selectedRow.value.taskTime,
+      });
+    },
+    columns: taskDetailsColumns,
+    pagination,
+    showActionColumn: false,
+    showTableSetting: false,
+    useSearchForm: false,
+  },
+  pagination: true,
+});
+// 任务管理列表
+const searchParams3 = ref<any>({ deviceName: '' });
+const { tableContext: tx3 } = useListPage({
+  tableProps: {
+    api: getManageTasklist,
+    beforeFetch: (params) => {
+      Object.assign(params, {
+        ...searchParams3.value,
+        taskId: selectedRow.value.id,
+        taskTime: selectedRow.value.taskTime,
+      });
+    },
+    afterFetch(resultItems) {
+      resultItems.forEach((item, i) => {
+        item.id = i;
+      });
+      return resultItems;
+    },
+    rowSelection: {
+      type: 'checkbox',
+      getCheckboxProps: (record) => {
+        return {
+          disabled: record.isOtherSelect,
+        };
       },
-      canResize: false,
-      columns: taskManageColumns,
-      showActionColumn: false,
-      showTableSetting: false,
-      useSearchForm: false,
     },
-    // pagination: false,
-  });
-  const [registerTable1, tableContext1] = tx1;
-  const [registerTable2, tableContext2] = tx2;
-  const [registerTable3, tableContext3, { rowSelection, selectedRows }] = tx3;
-  const [registerModal1, modalContext1] = useModal();
-  const [registerModal2, modalContext2] = useModal();
-  const [registerModal3, modalContext3] = useModal();
-  const [registerForm, formContext1] = useForm({
-    showActionButtonGroup: false,
-    schemas: taskschemas,
-    labelWidth: 170,
+    canResize: false,
+    columns: taskManageColumns,
+    showActionColumn: false,
+    showTableSetting: false,
+    useSearchForm: false,
+  },
+  // pagination: false,
+});
+const [registerTable1, tableContext1] = tx1;
+const [registerTable2, tableContext2] = tx2;
+const [registerTable3, tableContext3, { rowSelection, selectedRows }] = tx3;
+const [registerModal1, modalContext1] = useModal();
+const [registerModal2, modalContext2] = useModal();
+const [registerModal3, modalContext3] = useModal();
+const [registerModal4, modalContext4] = useModal();
+const [registerForm, formContext1] = useForm({
+  showActionButtonGroup: false,
+  schemas: taskschemas,
+  labelWidth: 170,
+});
+
+const selectedRow = ref<any>({});
+
+// 任务编辑/新增
+function handleEdit(record) {
+  modalContext1.openModal();
+  nextTick(async () => {
+    await formContext1.resetFields();
+    await formContext1.setFieldsValue(record);
   });
+}
 
-  const selectedRow = ref<any>({});
+// 导入巡检任务
+const importForm = ref<any>({ taskTime: dayjs().format('YYYY-MM-DD') });
+const fileList = ref<any[]>([]);
+const selectedFile = ref<any>(null);
 
-  // 任务编辑/新增
-  function handleEdit(record) {
-    modalContext1.openModal();
-    nextTick(async () => {
-      await formContext1.resetFields();
-      await formContext1.setFieldsValue(record);
-    });
-  }
+function handleImport() {
+  Modal.confirm({
+    title: '确认导入',
+    content: '导入会覆盖同一巡检时间原有的巡检任务,请确认是否导入?',
+    okText: '确认',
+    cancelText: '取消',
+    wrapClassName: 'gas-inspect-import-confirm',
+    onOk() {
+      importForm.value.taskTime = dayjs().format('YYYY-MM-DD');
+      fileList.value = [];
+      selectedFile.value = null;
+      modalContext4.openModal();
+    },
+  });
+}
 
-  // 任务删除
-  function handleDelete({ id, taskTime }) {
-    deleteTeamNew({ id, taskTime }).then(() => {
-      message.success('删除成功');
-      tableContext1.reload();
-    });
+// 选择文件(仅校验并暂存,确认时统一上传)
+function beforeUpload(file) {
+  const suffix = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
+  if (suffix !== 'xls' && suffix !== 'xlsx') {
+    message.warning('只能上传 Excel 文件!');
+    return false;
   }
+  selectedFile.value = file;
+  fileList.value = [{ uid: file.uid || String(Date.now()), name: file.name, status: 'done' }];
+  return false;
+}
 
-  // 任务管理
-  function handleManage(record) {
-    selectedRow.value = record;
-    modalContext3.openModal();
-    nextTick(() => {
-      tableContext3.clearSelectedRowKeys();
-    });
-  }
+// 移除文件
+function handleRemove() {
+  selectedFile.value = null;
+  fileList.value = [];
+}
 
-  // 详情管理
-  function handleDetail(record) {
-    selectedRow.value = record;
-    modalContext2.openModal();
+// 提交导入
+function handleImportSubmit() {
+  if (!importForm.value.taskTime) {
+    message.warning('请选择巡检任务日期');
+    return Promise.reject();
+  }
+  if (!selectedFile.value) {
+    message.warning('请选择要导入的文件');
+    return Promise.reject();
   }
+  const formData = new FormData();
+  formData.append('file', selectedFile.value);
+  formData.append('taskTime', importForm.value.taskTime);
+  return importSwGasCheckTask(formData).then(() => {
+    message.success('导入成功');
+    modalContext4.closeModal();
+    tableContext1.reload();
+  });
+}
+
+// 任务删除
+function handleDelete({ id, taskTime }) {
+  deleteTeamNew({ id, taskTime }).then(() => {
+    message.success('删除成功');
+    tableContext1.reload();
+  });
+}
+
+// 任务管理
+function handleManage(record) {
+  selectedRow.value = record;
+  modalContext3.openModal();
+  nextTick(() => {
+    tableContext3.clearSelectedRowKeys();
+  });
+}
+
+// 详情管理
+function handleDetail(record) {
+  selectedRow.value = record;
+  modalContext2.openModal();
+}
+
+// 关联明细
+function handlePatch(mode) {
+  // 过滤已选择条目,关联至其他任务的已经无法选中所以不做处理,关联至本任务的无法再添加,未关联的无法删除
+  const addedRows = selectedRows.value.filter((e) => {
+    return e.isSelect === true;
+  });
+  const otherRows = selectedRows.value.filter((e) => {
+    return e.isSelect === false;
+  });
 
-  // 关联明细
-  function handlePatch(mode) {
-    // 过滤已选择条目,关联至其他任务的已经无法选中所以不做处理,关联至本任务的无法再添加,未关联的无法删除
-    const addedRows = selectedRows.value.filter((e) => {
-      return e.isSelect === true;
+  if (mode === 'add' && addedRows.length) {
+    Modal.confirm({
+      title: '确认',
+      content: '您选择的条目含有已关联项,是否继续添加其他未关联项?',
+      okText: '确认',
+      cancelText: '取消',
+      onOk() {
+        patchConfirmHandler(otherRows, mode);
+      },
     });
-    const otherRows = selectedRows.value.filter((e) => {
-      return e.isSelect === false;
+  } else if (mode === 'del' && otherRows.length) {
+    Modal.confirm({
+      title: '确认',
+      content: '您选择的条目含有未关联项,是否继续删除其他已关联项?',
+      okText: '确认',
+      cancelText: '取消',
+      onOk() {
+        patchConfirmHandler(addedRows, mode);
+      },
     });
+  } else {
+    patchConfirmHandler(selectedRows.value, mode);
+  }
+}
 
-    if (mode === 'add' && addedRows.length) {
-      Modal.confirm({
-        title: '确认',
-        content: '您选择的条目含有已关联项,是否继续添加其他未关联项?',
-        okText: '确认',
-        cancelText: '取消',
-        onOk() {
-          patchConfirmHandler(otherRows, mode);
-        },
-      });
-    } else if (mode === 'del' && otherRows.length) {
-      Modal.confirm({
-        title: '确认',
-        content: '您选择的条目含有未关联项,是否继续删除其他已关联项?',
-        okText: '确认',
-        cancelText: '取消',
-        onOk() {
-          patchConfirmHandler(addedRows, mode);
-        },
+function patchConfirmHandler(rows, mode) {
+  operateGasCheckTaskDetail({
+    taskId: selectedRow.value.id,
+    taskTime: selectedRow.value.taskTime,
+    operateList: rows.map((e) => {
+      return {
+        deviceId: e.deviceId, //设备id(巡检地址id)
+        checkNum: e.checkNum, //巡检次数
+        operateType: mode, //操作类型,新增:add,删除:del
+      };
+    }),
+  }).then(() => {
+    message.success('操作成功');
+    tableContext3.clearSelectedRowKeys();
+    tableContext3.reload();
+    tableContext1.reload();
+  });
+}
+
+function handleSubmit() {
+  formContext1.validate().then((formData) => {
+    if (formData.id) {
+      teamEdit(formData).then(() => {
+        modalContext1.closeModal();
+        tableContext1.reload();
       });
     } else {
-      patchConfirmHandler(selectedRows.value, mode);
+      teamAdd(formData).then(() => {
+        modalContext1.closeModal();
+        tableContext1.reload();
+      });
     }
-  }
-
-  function patchConfirmHandler(rows, mode) {
-    operateGasCheckTaskDetail({
-      taskId: selectedRow.value.id,
-      taskTime: selectedRow.value.taskTime,
-      operateList: rows.map((e) => {
-        return {
-          deviceId: e.deviceId, //设备id(巡检地址id)
-          checkNum: e.checkNum, //巡检次数
-          operateType: mode, //操作类型,新增:add,删除:del
-        };
-      }),
-    }).then(() => {
-      message.success('操作成功');
-      tableContext3.clearSelectedRowKeys();
-      tableContext3.reload();
-      tableContext1.reload();
-    });
-  }
-
-  function handleSubmit() {
-    formContext1.validate().then((formData) => {
-      if (formData.id) {
-        teamEdit(formData).then(() => {
-          modalContext1.closeModal();
-          tableContext1.reload();
-        });
-      } else {
-        teamAdd(formData).then(() => {
-          modalContext1.closeModal();
-          tableContext1.reload();
-        });
-      }
-    });
-  }
+  });
+}
 
-  onMounted(() => {});
+onMounted(() => {});
 </script>
 
 <style lang="less" scoped>
-  @import '/@/design/theme.less';
+@import '/@/design/theme.less';
 
-  .gasReport {
-    width: 100%;
-    height: 100%;
-    padding: 80px 10px 15px 10px;
-    box-sizing: border-box;
-    position: relative;
-    color: var(--vent-font-color);
+.gasReport {
+  width: 100%;
+  height: 100%;
+  padding: 80px 10px 15px 10px;
+  box-sizing: border-box;
+  position: relative;
+  color: var(--vent-font-color);
 
-    .search-area {
-      margin: 20px 0px;
+  .search-area {
+    margin: 20px 0px;
 
-      .area-item {
-        display: flex;
-        align-items: center;
+    .area-item {
+      display: flex;
+      align-items: center;
 
-        .item-text {
-          color: var(--vent-font-color);
-        }
+      .item-text {
+        color: var(--vent-font-color);
       }
     }
+  }
 
-    .table-text {
-      margin-bottom: 5px;
-    }
+  .table-text {
+    margin-bottom: 5px;
+  }
 
-    .text-y {
-      color: #0be716;
-    }
+  .text-y {
+    color: #0be716;
+  }
 
-    .text-n {
-      color: #ff0000;
-    }
+  .text-n {
+    color: #ff0000;
+  }
 
-    .zxm-picker,
-    .zxm-input {
-      border: 1px solid #3ad8ff77 !important;
-      background-color: #ffffff00 !important;
-      color: var(--vent-font-color) !important;
-    }
+  .zxm-picker,
+  .zxm-input {
+    border: 1px solid #3ad8ff77 !important;
+    background-color: #ffffff00 !important;
+    color: var(--vent-font-color) !important;
+  }
+}
+</style>
+
+<style lang="less">
+// 导入巡检任务弹窗(弹窗内容挂载在 body 下,需全局样式)
+.gas-inspect-import-confirm {
+  .zxm-modal-confirm-title,
+  .zxm-modal-confirm-content {
+    color: #fff !important;
+  }
+}
+
+.import-task-modal {
+  .zxm-upload-list-item-name {
+    color: #fff !important;
+  }
+
+  .zxm-upload-list-item-name:hover {
+    background-color: transparent !important;
+    color: #fff !important;
+  }
+
+  .zxm-upload-list-item .anticon {
+    color: #fff !important;
+  }
+
+  .zxm-upload-list-item:hover .zxm-upload-list-item-info {
+    background-color: transparent !important;
   }
+}
 </style>

+ 308 - 10
src/views/vent/gas/gasReport/gas-report.data.ts

@@ -223,7 +223,6 @@ export const columns: BasicColumn[] = [
           {
             title: '第一次',
             children: [
-
               // {
               //   title: '检测区域',
               //   dataIndex: 'checkReg',
@@ -422,7 +421,6 @@ export const columns: BasicColumn[] = [
           {
             title: '第一次',
             children: [
-
               // {
               //   title: '检测区域',
               //   dataIndex: 'checkReg',
@@ -628,8 +626,6 @@ export const columnsDhz: BasicColumn[] = [
           {
             title: '第一次',
             children: [
-
-
               {
                 title: '检测时间',
                 dataIndex: 'timeNight1',
@@ -723,7 +719,6 @@ export const columnsDhz: BasicColumn[] = [
               },
             ],
           },
-
         ],
       },
       {
@@ -746,8 +741,6 @@ export const columnsDhz: BasicColumn[] = [
           {
             title: '第一次',
             children: [
-
-
               {
                 title: '检测时间',
                 dataIndex: 'timeEarly1',
@@ -842,7 +835,6 @@ export const columnsDhz: BasicColumn[] = [
               },
             ],
           },
-
         ],
       },
       {
@@ -866,8 +858,6 @@ export const columnsDhz: BasicColumn[] = [
           {
             title: '第一次',
             children: [
-
-
               {
                 title: '检测时间',
                 dataIndex: 'timeNoon1',
@@ -967,4 +957,312 @@ export const columnsDhz: BasicColumn[] = [
     ],
   },
 ];
+// 上湾
+export const columnsSw: 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: 'jwSdzNight1',
+                key: 'jwSdzNight1',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: '光瓦测量数据(%)',
+                dataIndex: 'ch4Night1',
+                key: 'ch4Night1',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: '便携仪测量数据(%)',
+                dataIndex: 'bxySdzNight1',
+                key: 'bxySdzNight1',
+                width: 100,
+                align: 'center',
+              },
+            ],
+          },
+          {
+            title: '巡检图片',
+            dataIndex: 'night1',
+            key: 'night1',
+            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: 'jwSdzEarly1',
+                key: 'jwSdzEarly1',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: '光瓦测量数据(%)',
+                dataIndex: 'ch4Early1',
+                key: 'ch4Early1',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: '便携仪测量数据(%)',
+                dataIndex: 'bxySdzEarly1',
+                key: 'bxySdzEarly1',
+                width: 100,
+                align: 'center',
+              },
+            ],
+          },
+          {
+            title: '巡检图片',
+            dataIndex: 'early1',
+            key: 'early1',
+            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: 'jwSdzNoon1',
+                key: 'jwSdzNoon1',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: '光瓦测量数据(%)',
+                dataIndex: 'ch4Noon1',
+                key: 'ch4Noon1',
+                width: 100,
+                align: 'center',
+              },
+              {
+                title: '便携仪测量数据(%)',
+                dataIndex: 'bxySdzNoon1',
+                key: 'bxySdzNoon1',
+                width: 100,
+                align: 'center',
+              },
+            ],
+          },
+          {
+            title: '巡检图片',
+            dataIndex: 'noon1',
+            key: 'noon1',
+            width: 100,
+            align: 'center',
+          },
+        ],
+      },
+    ],
+  },
+];

+ 412 - 404
src/views/vent/gas/gasReport/index.vue

@@ -67,7 +67,7 @@
         </a-row>
       </div>
       <a-table
-        :columns="columns"
+        :columns="tableColumns"
         :data-source="tableData"
         size="small"
         :scroll="{ y: 500 }"
@@ -162,447 +162,455 @@
 </template>
 
 <script setup lang="ts">
-  import { ref, onMounted, reactive } from 'vue';
-  import { columns } from './gas-report.data';
-  import {
-    getGasAddressList,
-    getList,
-    expComReportByParam,
-    reviewPass,
-    getIsReviewPass,
-    getAllUserInfo,
-    exportReportByPoi,
-    queryUserByRoleCode,
-    gasServerImg,
-  } from './gas-report.api';
-  import customHeader from '/@/components/vent/customHeader.vue';
-  import { message } from 'ant-design-vue';
-  import dayjs from 'dayjs';
-  import { BasicModal, useModal } from '/@/components/Modal';
-  import { BasicForm, useForm } from '/@/components/Form';
+import { ref, onMounted, reactive, computed } from 'vue';
+import { columns, columnsSw } from './gas-report.data';
+import {
+  getGasAddressList,
+  getList,
+  expComReportByParam,
+  reviewPass,
+  getIsReviewPass,
+  getAllUserInfo,
+  exportReportByPoi,
+  queryUserByRoleCode,
+  gasServerImg,
+} from './gas-report.api';
+import customHeader from '/@/components/vent/customHeader.vue';
+import { message } from 'ant-design-vue';
+import dayjs from 'dayjs';
+import { BasicModal, useModal } from '/@/components/Modal';
+import { BasicForm, useForm } from '/@/components/Form';
+import { useGlobSetting } from '/@/hooks/setting';
 
-  let imgSrcView = ref('');
-  let searchData = reactive({
-    reportTime: dayjs().format('YYYY-MM-DD'),
-    sbr: '',
-    strInstallPos: '',
-  });
-  let addressList = ref<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[]>([]);
-  const [registerPageTypeModal, pageTypeModalCtx] = useModal();
-  const [registerModal, { openModal }] = useModal();
+const { sysOrgCode } = useGlobSetting();
+const tableColumns = ref<any[]>([]);
+if (sysOrgCode === 'sdmtjtswmk') {
+  tableColumns.value = columnsSw;
+} else {
+  tableColumns.value = columns;
+}
+let imgSrcView = ref('');
+let searchData = reactive({
+  reportTime: dayjs().format('YYYY-MM-DD'),
+  sbr: '',
+  strInstallPos: '',
+});
+let addressList = ref<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[]>([]);
+const [registerPageTypeModal, pageTypeModalCtx] = useModal();
+const [registerModal, { openModal }] = useModal();
 
-  //打开瓦斯巡检预览弹窗
-  function imgViewClick(record) {
-    imgSrcView.value = '';
-    pageTypeModalCtx.openModal();
-    getImage(record);
-  }
-  //获取瓦斯巡检图片
-  function getImage(record) {
-    console.log(record, '000===');
-    let params;
-    switch (record.dataIndex) {
-      case 'night1':
-        params = {
-          reportdate: record.record.reportTime,
-          checkpath: record.record.strInstallPos,
-          order: '夜班',
-          checkorder: 1,
-        };
-        getImageList(params);
-        break;
-      case 'night2':
-        params = {
-          reportdate: record.record.reportTime,
-          checkpath: record.record.strInstallPos,
-          order: '夜班',
-          checkorder: 2,
-        };
-        getImageList(params);
-        break;
-      case 'early1':
-        params = {
-          reportdate: record.record.reportTime,
-          checkpath: record.record.strInstallPos,
-          order: '早班',
-          checkorder: 1,
-        };
-        getImageList(params);
-        break;
-      case 'early2':
-        params = {
-          reportdate: record.record.reportTime,
-          checkpath: record.record.strInstallPos,
-          order: '早班',
-          checkorder: 2,
-        };
-        getImageList(params);
-        break;
-      case 'noon1':
-        params = {
-          reportdate: record.record.reportTime,
-          checkpath: record.record.strInstallPos,
-          order: '中班',
-          checkorder: 1,
-        };
-        getImageList(params);
-        break;
-      case 'noon2':
-        params = {
-          reportdate: record.record.reportTime,
-          checkpath: record.record.strInstallPos,
-          order: '中班',
-          checkorder: 2,
-        };
-        getImageList(params);
-        break;
-    }
+//打开瓦斯巡检预览弹窗
+function imgViewClick(record) {
+  imgSrcView.value = '';
+  pageTypeModalCtx.openModal();
+  getImage(record);
+}
+//获取瓦斯巡检图片
+function getImage(record) {
+  console.log(record, '000===');
+  let params;
+  switch (record.dataIndex) {
+    case 'night1':
+      params = {
+        reportdate: record.record.reportTime,
+        checkpath: record.record.strInstallPos,
+        order: '夜班',
+        checkorder: 1,
+      };
+      getImageList(params);
+      break;
+    case 'night2':
+      params = {
+        reportdate: record.record.reportTime,
+        checkpath: record.record.strInstallPos,
+        order: '夜班',
+        checkorder: 2,
+      };
+      getImageList(params);
+      break;
+    case 'early1':
+      params = {
+        reportdate: record.record.reportTime,
+        checkpath: record.record.strInstallPos,
+        order: '早班',
+        checkorder: 1,
+      };
+      getImageList(params);
+      break;
+    case 'early2':
+      params = {
+        reportdate: record.record.reportTime,
+        checkpath: record.record.strInstallPos,
+        order: '早班',
+        checkorder: 2,
+      };
+      getImageList(params);
+      break;
+    case 'noon1':
+      params = {
+        reportdate: record.record.reportTime,
+        checkpath: record.record.strInstallPos,
+        order: '中班',
+        checkorder: 1,
+      };
+      getImageList(params);
+      break;
+    case 'noon2':
+      params = {
+        reportdate: record.record.reportTime,
+        checkpath: record.record.strInstallPos,
+        order: '中班',
+        checkorder: 2,
+      };
+      getImageList(params);
+      break;
   }
+}
 
-  async function getImageList(params) {
-    let res = await gasServerImg(params);
-    const img = new Blob(res, { type: 'image/png' }); // 创建Blob对象
-    imgSrcView.value = URL.createObjectURL(img); // 创建可访问的URL
-  }
-  //获取日报列表数据
-  async function getTableList() {
-    let res = await getList({ pageNo: pagination.current, pageSize: pagination.pageSize, ...searchData });
-    res.records.forEach((el) => {
-      el.jwSdzNight1 = el.jwSdzNight1 || '-';
-      el.jwSdzNight2 = el.jwSdzNight2 || '-';
-      el.jwSdzEarly1 = el.jwSdzEarly1 || '-';
-      el.jwSdzEarly2 = el.jwSdzEarly2 || '-';
-      el.jwSdzNoon1 = el.jwSdzNoon1 || '-';
-      el.jwSdzNoon2 = el.jwSdzNoon2 || '-';
-    });
-    tableData.value = res.records;
-    pagination.total = res.total;
-  }
-  //查询
-  function getSearch() {
-    pagination.current = 1;
-    getTableList();
-  }
-  //重置
-  function onReset() {
-    pagination.current = 1;
-    searchData.reportTime = '';
-    searchData.strInstallPos = '';
-    searchData.sbr = '';
-    getTableList();
-  }
-  //分页切换
-  function pageChange(val) {
-    pagination.current = val.current;
-    pagination.pageSize = val.pageSize;
-    getTableList();
-  }
+async function getImageList(params) {
+  let res = await gasServerImg(params);
+  const img = new Blob(res, { type: 'image/png' }); // 创建Blob对象
+  imgSrcView.value = URL.createObjectURL(img); // 创建可访问的URL
+}
+//获取日报列表数据
+async function getTableList() {
+  let res = await getList({ pageNo: pagination.current, pageSize: pagination.pageSize, ...searchData });
+  res.records.forEach((el) => {
+    el.jwSdzNight1 = el.jwSdzNight1 || '-';
+    el.jwSdzNight2 = el.jwSdzNight2 || '-';
+    el.jwSdzEarly1 = el.jwSdzEarly1 || '-';
+    el.jwSdzEarly2 = el.jwSdzEarly2 || '-';
+    el.jwSdzNoon1 = el.jwSdzNoon1 || '-';
+    el.jwSdzNoon2 = el.jwSdzNoon2 || '-';
+  });
+  tableData.value = res.records;
+  pagination.total = res.total;
+}
+//查询
+function getSearch() {
+  pagination.current = 1;
+  getTableList();
+}
+//重置
+function onReset() {
+  pagination.current = 1;
+  searchData.reportTime = '';
+  searchData.strInstallPos = '';
+  searchData.sbr = '';
+  getTableList();
+}
+//分页切换
+function pageChange(val) {
+  pagination.current = val.current;
+  pagination.pageSize = val.pageSize;
+  getTableList();
+}
 
-  //获取安装位置下拉选项
-  async function getSelectList() {
-    let res = await getGasAddressList({ coalseam: '', devicekind: 'gasDayReport' });
-    if (res.length != 0) {
-      addressList.value = res.map((el) => {
-        return { label: el.strinstallpos, value: el.strinstallpos };
-      });
-    }
-  }
-  //导出报表
-  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('请选择需要导出数据的填报日期!');
-      }
-    }
+//获取安装位置下拉选项
+async function getSelectList() {
+  let res = await getGasAddressList({ coalseam: '', devicekind: 'gasDayReport' });
+  if (res.length != 0) {
+    addressList.value = res.map((el) => {
+      return { label: el.strinstallpos, value: el.strinstallpos };
+    });
   }
-  //导出三对照报表
-  // async function getExport1() {
-  //   if (searchData.reportTime) {
-  //     let res = await expComReportByParam({ tempName: 'wssdz', reportTime: searchData.reportTime });
-  //     let filename = searchData.reportTime + '.xlsx';
-  //     downFilePublic(res, filename);
-  //   } else {
-  //     message.warning('请选择需要导出数据的填报日期!');
-  //   }
-  // }
-  //导出瓦斯检查小票
-  async function getExport2() {
+}
+//导出报表
+async function getExport() {
+  if (getTs()) {
+    message.warning('数据异常!');
+  } else {
     if (searchData.reportTime) {
-      openModal();
-    } 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('请选择需要导出数据的填报日期!');
-    } else if (!searchData.sbr) {
-      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 getExport1() {
+//   if (searchData.reportTime) {
+//     let res = await expComReportByParam({ tempName: 'wssdz', reportTime: searchData.reportTime });
+//     let filename = searchData.reportTime + '.xlsx';
+//     downFilePublic(res, filename);
+//   } else {
+//     message.warning('请选择需要导出数据的填报日期!');
+//   }
+// }
+//导出瓦斯检查小票
+async function getExport2() {
+  if (searchData.reportTime) {
+    openModal();
+  } else if (!searchData.reportTime) {
+    message.warning('请选择需要导出数据的填报日期!');
+  } else if (!searchData.sbr) {
+    message.warning('请输入检查工名称!');
   }
+}
 
-  //审核通过
-  async function getPassSh() {
-    if (getTs()) {
-      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 {
-      let res = await reviewPass({ reportTime: searchData.reportTime });
-      if (res) {
-        getTableList();
-      }
+      param = true;
+      return;
     }
-  }
+  });
+  return param;
+}
 
-  // 下载公用方法
-  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 getPassSh() {
+  if (getTs()) {
+    message.warning('数据异常!');
+  } else {
+    let res = await reviewPass({ reportTime: searchData.reportTime });
+    if (res) {
+      getTableList();
     }
   }
-  //导出瓦斯班报表
-  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('请选择需要导出数据的填报日期!');
-    }
+}
+
+// 下载公用方法
+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);
   }
-  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,
-        },
+}
+//导出瓦斯班报表
+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: '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,
-        },
+    },
+    {
+      label: '接班瓦检员',
+      field: 'nextCheckPerson',
+      component: 'ApiSelect',
+      required: true,
+      componentProps: {
+        api: queryUserByRoleCode,
+        params: { roleCode: 'gasCheck' },
+        labelField: 'realname',
+        valueField: 'username',
+        showSearch: true,
       },
-    ],
-    labelWidth: 100,
-    showActionButtonGroup: false,
-  });
+    },
+  ],
+  labelWidth: 100,
+  showActionButtonGroup: false,
+});
 
-  /** 导出瓦斯检查小票 */
-  async function submitHandler() {
-    const params = await validate();
-    const res = await exportReportByPoi({ tempName: 'wsjcxp', reportTime: searchData.reportTime, ...params });
-    const filename = searchData.reportTime + '.xlsx';
-    downFilePublic(res, filename);
-  }
+/** 导出瓦斯检查小票 */
+async function submitHandler() {
+  const params = await validate();
+  const res = await exportReportByPoi({ tempName: 'wsjcxp', reportTime: searchData.reportTime, ...params });
+  const filename = searchData.reportTime + '.xlsx';
+  downFilePublic(res, filename);
+}
 
-  onMounted(() => {
-    getSelectList();
-    getTableList();
-  });
+onMounted(() => {
+  getSelectList();
+  getTableList();
+});
 </script>
 
 <style lang="less" scoped>
-  @import '/@/design/theme.less';
+@import '/@/design/theme.less';
 
-  .gasReport {
-    width: 100%;
-    height: 100%;
-    padding: 80px 10px 15px 10px;
-    box-sizing: border-box;
-    position: relative;
+.gasReport {
+  width: 100%;
+  height: 100%;
+  padding: 80px 10px 15px 10px;
+  box-sizing: border-box;
+  position: relative;
 
-    .search-area {
-      margin: 20px 0px;
+  .search-area {
+    margin: 20px 0px;
 
-      .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 var(--vent-form-item-border) !important;
-      background-color: #ffffff00 !important;
-      color: #fff !important;
-    }
-
-    .img-view {
-      color: #1ff5e3;
-    }
-  }
-
-  :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) {
+  .zxm-picker,
+  .zxm-input {
     border: 1px solid var(--vent-form-item-border) !important;
     background-color: #ffffff00 !important;
+    color: #fff !important;
   }
 
-  :deep(.zxm-select-selection-item) {
-    color: #fff !important;
+  .img-view {
+    color: #1ff5e3;
   }
+}
+
+: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>