|
@@ -67,7 +67,7 @@
|
|
|
</a-row>
|
|
</a-row>
|
|
|
</div>
|
|
</div>
|
|
|
<a-table
|
|
<a-table
|
|
|
- :columns="columns"
|
|
|
|
|
|
|
+ :columns="tableColumns"
|
|
|
:data-source="tableData"
|
|
:data-source="tableData"
|
|
|
size="small"
|
|
size="small"
|
|
|
:scroll="{ y: 500 }"
|
|
:scroll="{ y: 500 }"
|
|
@@ -162,447 +162,455 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<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) {
|
|
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('请选择需要导出数据的填报日期!');
|
|
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 {
|
|
} 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>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<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;
|
|
border: 1px solid var(--vent-form-item-border) !important;
|
|
|
background-color: #ffffff00 !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>
|
|
</style>
|