Kaynağa Gözat

上湾-通风瓦斯日报管理修改-提交

lxh 3 hafta önce
ebeveyn
işleme
8dcaad373e

+ 90 - 42
src/views/vent/gas/gasReport/gas-report.data.ts

@@ -1,5 +1,6 @@
 import { BasicColumn } from '/@/components/Table';
 import { render } from '/@/utils/common/renderUtils';
+
 export const columns: BasicColumn[] = [
   {
     title: '瓦斯日报',
@@ -8,6 +9,20 @@ export const columns: BasicColumn[] = [
         title: '夜班',
         children: [
           {
+            title: '检测地点',
+            dataIndex: 'strInstallPos',
+            key: 'strInstallPos',
+            width: 120,
+            align: 'center',
+          },
+          {
+            title: '检查工',
+            dataIndex: 'checkPersonNight',
+            key: 'checkPersonNight',
+            width: 80,
+            align: 'center',
+          },
+          {
             title: '第一次',
             children: [
               // {
@@ -17,20 +32,7 @@ export const columns: BasicColumn[] = [
               //   width: 120,
               //   align: 'center',
               // },
-              {
-                title: '检测地点',
-                dataIndex: 'strInstallPos',
-                key: 'strInstallPos',
-                width: 120,
-                align: 'center',
-              },
-              {
-                title: '检查工',
-                dataIndex: 'checkPersonNight',
-                key: 'checkPersonNight',
-                width: 80,
-                align: 'center',
-              },
+
               // {
               //   title: '审核状态',
               //   dataIndex: 'reviewSta',
@@ -111,6 +113,13 @@ export const columns: BasicColumn[] = [
             ],
           },
           {
+            title: '巡检图片',
+            dataIndex: 'night1',
+            key: 'night1',
+            width: 100,
+            align: 'center',
+          },
+          {
             title: '第二次',
             children: [
               {
@@ -184,21 +193,37 @@ export const columns: BasicColumn[] = [
               },
             ],
           },
+          {
+            title: '巡检图片',
+            dataIndex: 'night2',
+            key: 'night2',
+            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: 'strInstallPos',
-                key: 'strInstallPos',
-                width: 120,
-                align: 'center',
-              },
+
               // {
               //   title: '检测区域',
               //   dataIndex: 'checkReg',
@@ -206,13 +231,6 @@ export const columns: BasicColumn[] = [
               //   width: 120,
               //   align: 'center',
               // },
-              {
-                title: '检查工',
-                dataIndex: 'checkPersonEarly',
-                key: 'checkPersonEarly',
-                width: 80,
-                align: 'center',
-              },
               // {
               //   title: '审核状态',
               //   dataIndex: 'reviewSta',
@@ -294,6 +312,13 @@ export const columns: BasicColumn[] = [
             ],
           },
           {
+            title: '巡检图片',
+            dataIndex: 'early1',
+            key: 'early1',
+            width: 100,
+            align: 'center',
+          },
+          {
             title: '第二次',
             children: [
               {
@@ -367,21 +392,37 @@ export const columns: BasicColumn[] = [
               },
             ],
           },
+          {
+            title: '巡检图片',
+            dataIndex: 'early2',
+            key: 'early2',
+            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: 'strInstallPos',
-                key: 'strInstallPos',
-                width: 120,
-                align: 'center',
-              },
+
               // {
               //   title: '检测区域',
               //   dataIndex: 'checkReg',
@@ -389,13 +430,6 @@ export const columns: BasicColumn[] = [
               //   width: 120,
               //   align: 'center',
               // },
-              {
-                title: '检查工',
-                dataIndex: 'checkPersonNoon',
-                key: 'checkPersonNoon',
-                width: 80,
-                align: 'center',
-              },
               // {
               //   title: '审核状态',
               //   dataIndex: 'reviewSta',
@@ -477,6 +511,13 @@ export const columns: BasicColumn[] = [
             ],
           },
           {
+            title: '巡检图片',
+            dataIndex: 'noon1',
+            key: 'noon1',
+            width: 100,
+            align: 'center',
+          },
+          {
             title: '第二次',
             children: [
               {
@@ -550,6 +591,13 @@ export const columns: BasicColumn[] = [
               },
             ],
           },
+          {
+            title: '巡检图片',
+            dataIndex: 'noon2',
+            key: 'noon2',
+            width: 100,
+            align: 'center',
+          },
         ],
       },
     ],

+ 28 - 2
src/views/vent/gas/gasReport/index.vue

@@ -67,6 +67,10 @@
       <a-table :columns="columns" :data-source="tableData" size="small" :scroll="{ y: 500 }" class="tableW"
         :pagination="pagination" @change="pageChange">
         <template #bodyCell="{ column, text }">
+          <template
+            v-if="column.dataIndex == 'night1' || column.dataIndex == 'night2' || column.dataIndex == 'early1' || column.dataIndex == 'early2' || column.dataIndex == 'noon1' || column.dataIndex == 'noon2'">
+            <a-button class="img-view" type="text" size="small" @click="imgViewClick(text)">查看</a-button>
+          </template>
           <template v-if="
             column.dataIndex == 'o2Night1' ||
             column.dataIndex == 'o2Night2' ||
@@ -125,6 +129,11 @@
     <BasicModal @register="registerModal" @ok="submitHandler">
       <BasicForm @register="registerForm" />
     </BasicModal>
+    //巡检图片预览弹窗
+    <BasicModal @register="registerPageTypeModal" :showCancelBtn="false" :showOkBtn="false" :footer="null"
+      :defaultFullscreen="true" destroyOnClose>
+      <img style="width:100%;height:100%" :src="imgSrcView" alt="暂无图片">
+    </BasicModal>
   </div>
 </template>
 
@@ -138,6 +147,7 @@ import dayjs from 'dayjs';
 import { BasicModal, useModal } from '/@/components/Modal';
 import { BasicForm, useForm } from '/@/components/Form';
 
+let imgSrcView = ref('')
 let searchData = reactive({
   reportTime: dayjs().format('YYYY-MM-DD'),
   sbr: '',
@@ -153,7 +163,14 @@ let pagination = reactive({
   pageSizeOptions: ['10', '20', '50'], // 可选的每页显示条数
 });
 let tableData = ref<any[]>([]);
+const [registerPageTypeModal, pageTypeModalCtx] = useModal();
+const [registerModal, { openModal }] = useModal();
 
+//瓦斯巡检图片预览
+function imgViewClick(img) {
+  pageTypeModalCtx.openModal()
+  imgSrcView.value = img
+}
 //获取日报列表数据
 async function getTableList() {
   let res = await getList({ pageNo: pagination.current, pageSize: pagination.pageSize, ...searchData });
@@ -164,8 +181,15 @@ async function getTableList() {
     el.jwSdzEarly2 = el.jwSdzEarly2 || '-';
     el.jwSdzNoon1 = el.jwSdzNoon1 || '-';
     el.jwSdzNoon2 = el.jwSdzNoon2 || '-';
+    el.night1 = `http://${window.location.hostname}:${window.location.port}/data/py_servers/imgs/${searchData.reportTime}_${el.strInstallPos}_夜班_1.png`
+    el.night2 = `http://${window.location.hostname}:${window.location.port}/data/py_servers/imgs/${searchData.reportTime}_${el.strInstallPos}_夜班_2.png`
+    el.early1 = `http://${window.location.hostname}:${window.location.port}/data/py_servers/imgs/${searchData.reportTime}_${el.strInstallPos}_早班_1.png`
+    el.early2 = `http://${window.location.hostname}:${window.location.port}/data/py_servers/imgs/${searchData.reportTime}_${el.strInstallPos}_早班_2.png`
+    el.noon1 = `http://${window.location.hostname}:${window.location.port}/data/py_servers/imgs/${searchData.reportTime}_${el.strInstallPos}_中班_1.png`
+    el.noon2 = `http://${window.location.hostname}:${window.location.port}/data/py_servers/imgs/${searchData.reportTime}_${el.strInstallPos}_中班_2.png`
   });
   tableData.value = res.records;
+
   pagination.total = res.total;
 }
 //查询
@@ -363,8 +387,6 @@ async function handleMenuClick(val) {
     message.warning('请选择需要导出数据的填报日期!');
   }
 }
-
-const [registerModal, { openModal }] = useModal();
 const [registerForm, { validate, setFieldsValue }] = useForm({
   schemas: [
     {
@@ -466,6 +488,10 @@ onMounted(() => {
     background-color: #ffffff00 !important;
     color: #fff !important;
   }
+
+  .img-view {
+    color: #1ff5e3;
+  }
 }
 
 :deep(.zxm-table-thead > tr > th:last-child) {