1
0

2 Revīzijas 9a3a68a2d5 ... 61df06f795

Autors SHA1 Ziņojums Datums
  lxh 61df06f795 Merge branch 'master' of http://182.92.126.35:3000/hrx/mky-vent-base 1 nedēļu atpakaļ
  lxh 3846e8f5b7 瓦斯巡检地点管理,瓦斯日报监测功能及界面修改-提交 1 nedēļu atpakaļ

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

@@ -0,0 +1,74 @@
+<template>
+    <div class="inspectEdit">
+        <a-form :model="formAddress" name="basic" :label-col="{ span: 8 }" :wrapper-col="{ span: 12 }"
+            autocomplete="off">
+            <a-form-item label="巡检类型:">
+                <JDictSelectTag v-model:value="formAddress.insType" placeholder="请选择巡检类型" dictCode="ins_type"
+                    style="width: 220px" />
+            </a-form-item>
+            <a-form-item label="巡检区域:">
+                <a-input v-model:value="formAddress.strremark" style="width: 220px" />
+            </a-form-item>
+            <a-form-item label="巡检地址:">
+                <a-input v-model:value="formAddress.strinstallpos"  style="width: 220px" />
+            </a-form-item>
+
+
+        </a-form>
+        <div class="edit-btn">
+            <a-button type="primary" @click="confirmAddress">确定</a-button>
+            <a-button type="success" @click="cancelAddress">取消</a-button>
+        </div>
+    </div>
+</template>
+
+<script setup lang="ts">
+import { ref, reactive, onMounted, watch } from 'vue'
+import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
+
+let formAddress = reactive<any>({
+    insType: '',
+    strremark: '',
+    strinstallpos: '',
+})
+let $emit = defineEmits(['confirmAddress', 'cancelAddress'])
+
+//确定
+let confirmAddress = () => {
+    $emit('confirmAddress', formAddress)
+}
+//取消
+let cancelAddress = () => {
+    formAddress = {
+        insType: '',
+        strremark: '',
+        strinstallpos: '',
+    }
+    $emit('cancelAddress',)
+}
+
+onMounted(() => { })
+</script>
+
+<style lang="less" scoped>
+.inspectEdit {
+    padding: 10px;
+    box-sizing: border-box;
+
+    .edit-btn {
+        display: flex;
+        justify-content: flex-end;
+
+        .zxm-btn {
+            margin: 0px 10px;
+        }
+    }
+
+}
+
+:deep(.zxm-input) {
+    color: #fff;
+    border: 1px solid #3ad8ff77 !important;
+    background-color: #ffffff00 !important;
+}
+</style>

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

@@ -17,10 +17,16 @@ enum Api {
     teamAdd='/safety/disTeamInfo/add',//区队添加
     teamEdit='/safety/disTeamInfo/edit',//区队编辑
     deleteTeam='/safety/disTeamInfo/delete',//区队删除
+    addGasReportAddress= '/safety/gasDayReport/addGasReportAddress'//新增瓦斯巡检地址
 
 }
 
 /**
+ * 新增瓦斯巡检地址
+ * @param params 
+ */
+export const addGasReportAddress = (params) => defHttp.post({ url: Api.addGasReportAddress,params });
+/**
  * 下载文件目录
  * @param params
  */

+ 47 - 19
src/views/vent/gas/gasInspect/index.vue

@@ -41,11 +41,13 @@
                                 <DownOutlined />
                             </a-button>
                         </a-dropdown>
+                        <a-button type="primary" preIcon="ant-design:plus-outlined" style="margin-left: 15px;"
+                            @click="getTjAddress">新增瓦斯巡检地址</a-button>
                     </a-col>
                 </a-row>
             </div>
-            <a-table :key="keyActive" :columns="columns" size="small" :data-source="tableData" :scroll="{ y: 650 }" class="tableW"
-                :pagination="pagination" @change="pageChange">
+            <a-table :key="keyActive" :columns="columns" size="small" :data-source="tableData" :scroll="{ y: 650 }"
+                class="tableW" :pagination="pagination" @change="pageChange">
                 <template #action="{ record }">
                     <a class="table-action-link" @click="handlerEdit(record)">编辑</a>
                     <a class="table-action-link" @click="handlerDel(record)">删除</a>
@@ -100,7 +102,12 @@
             <!-- 区队管理弹窗 -->
             <a-modal v-model:visible="visibleTeam" width="850px" :footer="null" :title="titleTeam" centered
                 destroyOnClose>
-              <inspectTeam></inspectTeam>
+                <inspectTeam></inspectTeam>
+            </a-modal>
+            <!-- 新增瓦斯巡检地点弹窗 -->
+            <a-modal v-model:visible="visibleAddress" width="450px" :footer="null" :title="titleAddress" centered
+                destroyOnClose>
+                <addressAdd @confirmAddress="confirmAddress" @cancelAddress="cancelAddress"></addressAdd>
             </a-modal>
         </div>
     </div>
@@ -114,20 +121,21 @@ import inspectEdit from './components/inspectEdit.vue'
 import inspectDel from './components/inspectDel.vue'
 import uploadOrdown from './components/uploadOrdown.vue'
 import inspectTeam from './components/inspectTeam.vue'
+import addressAdd from './components/addressAdd.vue'
 import { message } from 'ant-design-vue';
 import { columns, pagination } from './gasInspect.data'
-import { list, importByExcel, exportGasByExcel, moveOrderNum, edit, deleteCard, taskSubmit, clearCardInfo, teamList } from './gasInspect.api'
+import { list, importByExcel, exportGasByExcel, moveOrderNum, edit, deleteCard, taskSubmit, clearCardInfo, teamList, addGasReportAddress } from './gasInspect.api'
 
 
-let keyActive=ref(0)
+let keyActive = ref(0)
 let searchId = ref('')
 let tableData = ref<any[]>([])//巡检列表
 let visibleTask = ref(false)//控制任务管理弹窗的显示与隐藏
 let titleTask = ref('')
 let visibleEdit = ref(false)//控制编辑弹窗的显示与隐藏
 let titleEdit = ref('')//编辑弹窗标题
-let visibleTeam=ref(false)//控制区队管理弹窗的显示与隐藏
-let titleTeam=ref('')//区队管理弹窗标题
+let visibleTeam = ref(false)//控制区队管理弹窗的显示与隐藏
+let titleTeam = ref('')//区队管理弹窗标题
 let inspectEditData = reactive({})//编辑弹窗数据
 let visibleDel = ref(false)//控制删除弹窗的显示与隐藏
 let titleDel = ref('')//删除弹窗标题
@@ -135,7 +143,8 @@ let inspectDelData = ref('')
 let visibleUploadorDown = ref(false)//控制导入/导出弹窗的显示与隐藏
 let titleUploadorDown = ref('')
 let modalType = ref('')//判断当前是导入/导出弹窗
-
+let visibleAddress = ref(false)//控制巡检地址新增弹窗的显示与隐藏
+let titleAddress = ref('')//区队巡检地址新增弹窗标题
 
 //打开任务管理弹窗
 let handlerTask = () => {
@@ -204,16 +213,16 @@ let handleCancelDelCard = () => {
     visibleDel.value = false
 }
 //打开区队管理弹窗
-let handlerTeam=()=>{
-    visibleTeam.value=true
-    titleTeam.value='区队管理'
+let handlerTeam = () => {
+    visibleTeam.value = true
+    titleTeam.value = '区队管理'
 }
 
 //通过id(巡检卡id)查询
 async function queryByIdList() {
     let res = await list({ id: searchId.value, pageNo: pagination.current, pageSize: pagination.pageSize })
     console.log(res, '列表查询---')
-    keyActive.value=new Date().getTime()
+    keyActive.value = new Date().getTime()
     tableData.value = res.records.map((el: any) => {
         return {
             morning: el.insType,
@@ -221,26 +230,26 @@ async function queryByIdList() {
             evening: el.insType,
             ...el
         }
-    }) 
-    pagination.total =res.total
+    })
+    pagination.total = res.total
 }
 //查询
 let getSearchCardId = () => {
-    pagination.current=1
+    pagination.current = 1
     queryByIdList()
 }
 //重置
 let getReset = () => {
     searchId.value = ''
-    pagination.current=1
+    pagination.current = 1
     queryByIdList()
 }
- //分页切换
- let pageChange=(val)=> {
+//分页切换
+let pageChange = (val) => {
     pagination.current = val.current;
     pagination.pageSize = val.pageSize;
     queryByIdList()
-  }
+}
 //导入
 let getupload = () => {
     modalType.value = 'upload'
@@ -329,6 +338,25 @@ let handlerFilter = (param) => {
     }
 }
 
+//新增瓦斯巡检地点
+let getTjAddress = () => {
+    visibleAddress.value = true
+    titleAddress.value = '新增瓦斯巡检地址'
+}
+//确定新增
+async function confirmAddress(param){
+    let res=await addGasReportAddress(param)
+    console.log(res,'新增瓦斯巡检地点')
+    if(res){
+        visibleAddress.value=false
+        queryByIdList()
+    }
+}
+//取消新增
+let cancelAddress=()=>{
+    visibleAddress.value=false
+}
+
 onMounted(() => {
     queryByIdList()
 })

+ 6 - 0
src/views/vent/gas/gasInspectNonfc/gasInspectNonfc.data.ts

@@ -19,6 +19,12 @@ export const columns: BasicColumn[] = [
         align: 'center',
     },
     {
+        title: '检查区域',
+        dataIndex: 'strremark',
+        key: 'strremark',
+        align: 'center',
+    },
+    {
         title: '巡检人',
         children: [
             {

+ 12 - 0
src/views/vent/gas/gasReport/gas-report.api.ts

@@ -4,6 +4,8 @@ enum Api {
   getGasAddressList = '/safety/gasDayReport/getGasAddressList',
   getList = '/safety/gasDayReport/list',
   expComReportByParam = '/safety/reportInfo/expComReportByParam',
+  reviewPass='/safety/gasDayReport/reviewPass',
+  getIsReviewPass='/safety/gasDayReport/getIsReviewPass'
 }
 /**
  * 获取瓦斯日报区队,检测地点下拉选项
@@ -22,3 +24,13 @@ export const getList = (params) => defHttp.get({ url: Api.getList, params });
  * @param params
  */
 export const expComReportByParam = (params) => defHttp.post({ url: Api.expComReportByParam, params, responseType: 'blob' });
+/**
+ * 审核通过
+ * @param params 
+ */
+export const reviewPass = (params) => defHttp.post({ url: Api.reviewPass,params });
+/**
+ * 判断是否已审核通过
+ * @param params 
+ */
+export const getIsReviewPass = (params) => defHttp.post({ url: Api.getIsReviewPass,params });

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

@@ -1,4 +1,5 @@
 import { BasicColumn } from '/@/components/Table';
+import { render } from '/@/utils/common/renderUtils';
 export const columns: BasicColumn[] = [
   {
     title: '瓦斯日报',
@@ -24,6 +25,13 @@ export const columns: BasicColumn[] = [
                 align: 'center',
               },
               {
+                title: '检测区域',
+                dataIndex: 'checkReg',
+                key: 'checkReg',
+                width: 120,
+                align: 'center',
+              },
+              {
                 title: '检查工',
                 dataIndex: 'checkPersonNight',
                 key: 'checkPersonNight',
@@ -31,6 +39,15 @@ export const columns: BasicColumn[] = [
                 align: 'center',
               },
               {
+                title: '审核状态',
+                dataIndex: 'reviewSta',
+                width: 120,
+                align: 'center',
+                customRender: ({ text }) => {
+                  return render.renderDict(text, 'reviewSta');
+                },
+              },
+              {
                 title: '检测时间',
                 dataIndex: 'timeNight1',
                 key: 'timeNight1',
@@ -198,6 +215,13 @@ export const columns: BasicColumn[] = [
                 align: 'center',
               },
               {
+                title: '检测区域',
+                dataIndex: 'checkReg',
+                key: 'checkReg',
+                width: 120,
+                align: 'center',
+              },
+              {
                 title: '检查工',
                 dataIndex: 'checkPersonEarly',
                 key: 'checkPersonEarly',
@@ -205,6 +229,15 @@ export const columns: BasicColumn[] = [
                 align: 'center',
               },
               {
+                title: '审核状态',
+                dataIndex: 'reviewSta',
+                width: 120,
+                align: 'center',
+                customRender: ({ text }) => {
+                  return render.renderDict(text, 'reviewSta');
+                },
+              },
+              {
                 title: '检测时间',
                 dataIndex: 'timeEarly1',
                 key: 'timeEarly1',
@@ -372,6 +405,13 @@ export const columns: BasicColumn[] = [
                 align: 'center',
               },
               {
+                title: '检测区域',
+                dataIndex: 'checkReg',
+                key: 'checkReg',
+                width: 120,
+                align: 'center',
+              },
+              {
                 title: '检查工',
                 dataIndex: 'checkPersonNoon',
                 key: 'checkPersonNoon',
@@ -379,6 +419,15 @@ export const columns: BasicColumn[] = [
                 align: 'center',
               },
               {
+                title: '审核状态',
+                dataIndex: 'reviewSta',
+                width: 120,
+                align: 'center',
+                customRender: ({ text }) => {
+                  return render.renderDict(text, 'reviewSta');
+                },
+              },
+              {
                 title: '检测时间',
                 dataIndex: 'timeNoon1',
                 key: 'timeNoon1',

+ 191 - 181
src/views/vent/gas/gasReport/index.vue

@@ -7,14 +7,8 @@
           <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="请选择填报日期"
-                @change="onChange"
-              />
+              <a-date-picker style="width: 220px" :showTime="false" valueFormat="YYYY-MM-DD"
+                v-model:value="searchData.reportTime" placeholder="请选择填报日期" @change="onChange" />
             </div>
           </a-col>
           <!-- <a-col :span="4">
@@ -36,16 +30,21 @@
             <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-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 15px" @click="onReset">重置</a-button>
+          <a-button type="primary" preIcon="ant-design:check-circle-outlined" style="margin-right:15px"
+            @click="getPassSh">审核通过</a-button>
           <a-button type="primary" preIcon="ant-design:download-outlined" @click="getExport">导出日报表</a-button>
-          <a-button type="primary" preIcon="ant-design:download-outlined" @click="getExport1" style="margin: 0px 15px">导出瓦斯三对照报表</a-button>
-          <a-button type="primary" preIcon="ant-design:download-outlined" @click="getExport2" style="margin-right:15px">导出瓦斯检查小票</a-button>
+          <a-button type="primary" preIcon="ant-design:download-outlined" @click="getExport1"
+            style="margin: 0px 15px">导出瓦斯三对照报表</a-button>
+          <a-button type="primary" preIcon="ant-design:download-outlined" @click="getExport2"
+            style="margin-right:15px">导出瓦斯检查小票</a-button>
           <a-dropdown>
             <template #overlay>
               <a-menu @click="handleMenuClick">
@@ -72,8 +71,8 @@
           </a-dropdown>
         </a-row>
       </div>
-      <a-table :columns="columns" :data-source="tableData" size="small" :scroll="{ y: 500 }" class="tableW" :pagination="pagination"
-        @change="pageChange">
+      <a-table :columns="columns" :data-source="tableData" size="small" :scroll="{ y: 500 }" class="tableW"
+        :pagination="pagination" @change="pageChange">
         <template #bodyCell="{ column, text }"></template>
       </a-table>
     </div>
@@ -81,204 +80,215 @@
 </template>
 
 <script setup lang="ts">
-  import { ref, onMounted, computed, reactive } from 'vue';
-  import { columns } from './gas-report.data';
-  import { getGasAddressList, getList, expComReportByParam } from './gas-report.api';
-  import customHeader from '/@/components/vent/customHeader.vue';
-  import { message } from 'ant-design-vue';
-  import dayjs from 'dayjs';
+import { ref, onMounted, computed, reactive } from 'vue';
+import { columns } from './gas-report.data';
+import { getGasAddressList, getList, expComReportByParam, reviewPass, getIsReviewPass } from './gas-report.api';
+import customHeader from '/@/components/vent/customHeader.vue';
+import { message } from 'ant-design-vue';
+import dayjs from 'dayjs';
 
-  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[]>([]);
+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[]>([]);
 
-  function onChange(val, time) {
-    searchData.reportTime = time;
-  }
-  //获取日报列表数据
-  async function getTableList() {
-    let res = await getList({ pageNo: pagination.current, pageSize: pagination.pageSize, ...searchData });
-    console.log(res, '瓦斯日报列表数据-----------');
-    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;
+function onChange(val, time) {
+  searchData.reportTime = time;
+}
+//获取日报列表数据
+async function getTableList() {
+  let res = await getList({ pageNo: pagination.current, pageSize: pagination.pageSize, ...searchData });
+  console.log(res, '瓦斯日报列表数据-----------');
+  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' });
+  console.log(res, '区队下拉选项--------');
+  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 getSelectList() {
-    let res = await getGasAddressList({ coalseam: '', devicekind: 'gasDayReport'  });
-    console.log(res, '区队下拉选项--------');
-    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 (searchData.reportTime) {
+}
+//导出报表
+async function getExport() {
+  if (searchData.reportTime) {
+    let data = await getIsReviewPass({ reportTime: searchData.reportTime })
+    if (data == '已审核通过!') {
       let res = await expComReportByParam({ tempName: 'wsrb', reportTime: searchData.reportTime });
       console.log(res, '导出------------');
       let filename = searchData.reportTime + '.xlsx';
       downFilePublic(res, filename);
-    } else {
-      message.warning('请选择需要导出数据的填报日期!');
     }
+  } else {
+    message.warning('请选择需要导出数据的填报日期!');
   }
-  //导出三对照报表
-  async function getExport1() {
-    if (searchData.reportTime) {
-      let res = await expComReportByParam({ tempName: 'wssdz', reportTime: searchData.reportTime });
-      console.log(res, '导出------------');
-      let filename = searchData.reportTime + '.xlsx';
-      downFilePublic(res, filename);
-    } else {
-      message.warning('请选择需要导出数据的填报日期!');
-    }
+}
+//导出三对照报表
+async function getExport1() {
+  if (searchData.reportTime) {
+    let res = await expComReportByParam({ tempName: 'wssdz', reportTime: searchData.reportTime });
+    console.log(res, '导出------------');
+    let filename = searchData.reportTime + '.xlsx';
+    downFilePublic(res, filename);
+  } else {
+    message.warning('请选择需要导出数据的填报日期!');
+  }
+}
+//导出瓦斯检查小票
+async function getExport2() {
+  if (searchData.reportTime && searchData.sbr) {
+    let res = await expComReportByParam({ tempName: 'wsjcxp', reportTime: searchData.reportTime, checkName: searchData.sbr });
+    console.log(res, '导出------------');
+    let filename = searchData.reportTime + '.xlsx';
+    downFilePublic(res, filename);
+  } else if (!searchData.reportTime) {
+    message.warning('请选择需要导出数据的填报日期!');
+  } else if (!searchData.sbr) {
+    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);
   }
-  //导出瓦斯检查小票
-  async function getExport2() {
-    if (searchData.reportTime && searchData.sbr) {
-      let res = await expComReportByParam({ tempName: 'wsjcxp', reportTime: searchData.reportTime,checkName:searchData.sbr });
+}
+//导出瓦斯班报表
+async function handleMenuClick(val) {
+  console.log(val, 'val--------');
+  if (searchData.reportTime) {
+      let res = await expComReportByParam({ tempName: 'wsrbshb', reportTime: searchData.reportTime });
       console.log(res, '导出------------');
       let filename = searchData.reportTime + '.xlsx';
       downFilePublic(res, filename);
-    } else if(!searchData.reportTime) {
-      message.warning('请选择需要导出数据的填报日期!');
-    }else if(!searchData.sbr){
-      message.warning('请输入上报人名称!');
-    }
+  } 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);
-    }
-  }
-  //下拉选项切换
-  function handleMenuClick(val) {
-    console.log(val, 'val--------');
-    switch (val.key) {
-      case '1':
-        break;
-      case '2':
-        break;
-      case '3':
-        break;
-    }
+}
+//审核通过
+async function getPassSh() {
+  let res = await reviewPass({ reportTime: searchData.reportTime })
+  console.log(res, '审核通过')
+  if (res) {
+    getTableList();
   }
+}
 
-  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;
-    }
   }
 
-  :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;
-  }
-
-  :deep(.zxm-select-selection-item) {
     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>