fix: BUG修改
This commit is contained in:
parent
a6d5200ce5
commit
30e02139cf
@ -458,3 +458,8 @@ export const getProjectInfo = (params: any) => {
|
|||||||
export const downModel = (params: any) => {
|
export const downModel = (params: any) => {
|
||||||
return http.post(`/xmgl/governmentConfig/queryById`, params);
|
return http.post(`/xmgl/governmentConfig/queryById`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 质量、安全导出功能
|
||||||
|
export const exportXlsApi = (params: any) => {
|
||||||
|
return http.post(`/gov/inspectRecord/exportXls`, params, { responseType: "blob" });
|
||||||
|
};
|
||||||
|
|||||||
@ -28,12 +28,20 @@
|
|||||||
// height: 80%;
|
// height: 80%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
color: #c4c4c4;
|
|
||||||
.el-tree-node__content {
|
.el-tree-node__content {
|
||||||
|
color: #ffffff;
|
||||||
height: auto;
|
height: auto;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
.el-tree-node__content:hover {
|
.el-tree-node__content:hover {
|
||||||
|
background: #09405f;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
.el-tree-node__children .el-tree-node__content {
|
||||||
|
color: #c4c4c4;
|
||||||
|
}
|
||||||
|
.el-tree-node__children .el-tree-node__content:hover {
|
||||||
background: #09405f;
|
background: #09405f;
|
||||||
color: #0bc4f0;
|
color: #0bc4f0;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
|||||||
@ -238,14 +238,14 @@ onMounted(async () => {});
|
|||||||
}
|
}
|
||||||
td.el-table__cell {
|
td.el-table__cell {
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
border-bottom: 0 !important;
|
// border-bottom: 0 !important;
|
||||||
color: var(--el-menu-text-color);
|
color: var(--el-menu-text-color);
|
||||||
font-size: 20px !important;
|
font-size: 20px !important;
|
||||||
border-right: 2px solid #252526;
|
border-right: 2px solid #252526;
|
||||||
}
|
}
|
||||||
th.el-table__cell {
|
th.el-table__cell {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border-bottom: 0 !important;
|
// border-bottom: 0 !important;
|
||||||
border-right: 2px solid #252526;
|
border-right: 2px solid #252526;
|
||||||
}
|
}
|
||||||
.el-table__inner-wrapper::before {
|
.el-table__inner-wrapper::before {
|
||||||
|
|||||||
@ -1,10 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="overview">
|
<div class="overview">
|
||||||
<el-dialog :show-close="false" v-model="visible1" :style="dialogStyle" @close="closeMain">
|
<el-dialog id="contentPrint" :show-close="false" v-model="visible1" :style="dialogStyle" @close="closeMain">
|
||||||
<template #title>
|
<template #title>
|
||||||
<div class="title-detail">
|
<div class="title-detail">
|
||||||
<img src="@/assets/images/tableIcon/look.png" alt="" />
|
<img src="@/assets/images/tableIcon/look.png" alt="" />
|
||||||
<span>查看隐患整改信息</span>
|
<span>查看隐患整改信息</span>
|
||||||
|
<el-button type="primary" @click="submitPrint" style="margin-right: 20px">
|
||||||
|
<span>打印</span>
|
||||||
|
</el-button>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<close @click="closeMain" />
|
<close @click="closeMain" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
@ -320,6 +323,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
|
|||||||
import type { FormInstance, UploadProps } from "element-plus";
|
import type { FormInstance, UploadProps } from "element-plus";
|
||||||
import { relativeInfo, timeLineData, singleOptionAudit, allOptionAudit } from "@/api/modules/goverment";
|
import { relativeInfo, timeLineData, singleOptionAudit, allOptionAudit } from "@/api/modules/goverment";
|
||||||
import { submitReform } from "@/api/modules/project";
|
import { submitReform } from "@/api/modules/project";
|
||||||
|
import printJS from "print-js";
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
detailsDialog: Boolean,
|
detailsDialog: Boolean,
|
||||||
relativeId: String
|
relativeId: String
|
||||||
@ -349,6 +353,16 @@ const reformInfo = ref({
|
|||||||
solveImage: []
|
solveImage: []
|
||||||
});
|
});
|
||||||
const baseUrl = import.meta.env.VITE_API_URL;
|
const baseUrl = import.meta.env.VITE_API_URL;
|
||||||
|
// 提交打印
|
||||||
|
const submitPrint = async () => {
|
||||||
|
printJS({
|
||||||
|
printable: "contentPrint",
|
||||||
|
type: "html",
|
||||||
|
targetStyles: ["*"],
|
||||||
|
maxWidth: 5000,
|
||||||
|
style: "@page{size:auto; margin: 0;}" + "@media print { @page {size: landscape; } }"
|
||||||
|
});
|
||||||
|
};
|
||||||
// 提交整改情况
|
// 提交整改情况
|
||||||
const submitForm = async () => {
|
const submitForm = async () => {
|
||||||
reformInfo.value.solveImage = JSON.stringify(reformInfo.value.solveImage);
|
reformInfo.value.solveImage = JSON.stringify(reformInfo.value.solveImage);
|
||||||
|
|||||||
@ -44,6 +44,7 @@
|
|||||||
>
|
>
|
||||||
<template #formButton="scope">
|
<template #formButton="scope">
|
||||||
<el-button v-auth="'quality_inspect_add'" class="btnStyle" @click="handleAddItem">新增</el-button>
|
<el-button v-auth="'quality_inspect_add'" class="btnStyle" @click="handleAddItem">新增</el-button>
|
||||||
|
<el-button class="btnStyle" @click="handleExport">导出</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button type="primary" link @click="handleLookItem(row)">
|
<el-button type="primary" link @click="handleLookItem(row)">
|
||||||
@ -100,6 +101,7 @@ import orderAdd from "./components/orderAdd.vue";
|
|||||||
import { statisticsTable } from "@/api/modules/goverment";
|
import { statisticsTable } from "@/api/modules/goverment";
|
||||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||||
import { getDustprojectPage, getDustengineeringPage } from "@/api/modules/goverment";
|
import { getDustprojectPage, getDustengineeringPage } from "@/api/modules/goverment";
|
||||||
|
import { exportXlsApi } from "@/api/modules/huizhou";
|
||||||
import { sendIframeMessage } from "@/utils/util";
|
import { sendIframeMessage } from "@/utils/util";
|
||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
@ -188,6 +190,38 @@ const searchSn = ref("");
|
|||||||
const searchName = ref("");
|
const searchName = ref("");
|
||||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||||
const proTable = ref();
|
const proTable = ref();
|
||||||
|
const baseUrl = import.meta.env.VITE_API_URL;
|
||||||
|
// 导出
|
||||||
|
const handleExport = () => {
|
||||||
|
let requestData = {
|
||||||
|
engineeringSn: searchSn.value,
|
||||||
|
pageNo: pages.value.pageNo,
|
||||||
|
pageSize: pages.value.pageSize,
|
||||||
|
engineeringName: proTable.value.searchParam.engineeringName,
|
||||||
|
state: proTable.value.searchParam.state,
|
||||||
|
type: 2
|
||||||
|
};
|
||||||
|
exportXlsApi(requestData).then((res: any) => {
|
||||||
|
console.log(res);
|
||||||
|
let url = window.URL.createObjectURL(res);
|
||||||
|
let a = document.createElement("a");
|
||||||
|
console.log(url);
|
||||||
|
a.href = url;
|
||||||
|
a.download = "质量检查.xlsx";
|
||||||
|
a.click();
|
||||||
|
document.removeChild(a);
|
||||||
|
});
|
||||||
|
// window.location.href =
|
||||||
|
// baseUrl +
|
||||||
|
// "/gov/inspectRecord/exportXls?engineeringSn=" +
|
||||||
|
// searchSn.value +
|
||||||
|
// "&pageNo=" +
|
||||||
|
// pages.value.pageNo +
|
||||||
|
// "&pageSize=" +
|
||||||
|
// pages.value.pageSize +
|
||||||
|
// "&engineeringName=" +
|
||||||
|
// proTable.value.searchParam.engineeringName;
|
||||||
|
};
|
||||||
// 新增执法单
|
// 新增执法单
|
||||||
const handleAddItem = () => {
|
const handleAddItem = () => {
|
||||||
orderDialog.value = true;
|
orderDialog.value = true;
|
||||||
|
|||||||
@ -1,10 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="overview">
|
<div class="overview">
|
||||||
<el-dialog :show-close="false" v-model="visible1" :style="dialogStyle" @close="closeMain">
|
<el-dialog id="contentPrint" :show-close="false" v-model="visible1" :style="dialogStyle" @close="closeMain">
|
||||||
<template #title>
|
<template #title>
|
||||||
<div class="title-detail">
|
<div class="title-detail">
|
||||||
<img src="@/assets/images/tableIcon/look.png" alt="" />
|
<img src="@/assets/images/tableIcon/look.png" alt="" />
|
||||||
<span>查看隐患整改信息</span>
|
<span>查看隐患整改信息</span>
|
||||||
|
<el-button type="primary" @click="submitPrint" style="margin-right: 20px">
|
||||||
|
<span>打印</span>
|
||||||
|
</el-button>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<close @click="closeMain" />
|
<close @click="closeMain" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
@ -313,6 +316,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
|
|||||||
import type { FormInstance, UploadProps } from "element-plus";
|
import type { FormInstance, UploadProps } from "element-plus";
|
||||||
import { relativeInfo, timeLineData, singleOptionAudit, allOptionAudit } from "@/api/modules/goverment";
|
import { relativeInfo, timeLineData, singleOptionAudit, allOptionAudit } from "@/api/modules/goverment";
|
||||||
import { submitReform } from "@/api/modules/project";
|
import { submitReform } from "@/api/modules/project";
|
||||||
|
import printJS from "print-js";
|
||||||
const baseUrl = import.meta.env.VITE_API_URL;
|
const baseUrl = import.meta.env.VITE_API_URL;
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
detailsDialog: Boolean,
|
detailsDialog: Boolean,
|
||||||
@ -341,6 +345,16 @@ const auditForm = ref({
|
|||||||
const auditAgainForm = ref({
|
const auditAgainForm = ref({
|
||||||
content: ""
|
content: ""
|
||||||
});
|
});
|
||||||
|
// 提交打印
|
||||||
|
const submitPrint = async () => {
|
||||||
|
printJS({
|
||||||
|
printable: "contentPrint",
|
||||||
|
type: "html",
|
||||||
|
targetStyles: ["*"],
|
||||||
|
maxWidth: 5000,
|
||||||
|
style: "@page{size:auto; margin: 0;}" + "@media print { @page {size: landscape; } }"
|
||||||
|
});
|
||||||
|
};
|
||||||
// 提交整改情况
|
// 提交整改情况
|
||||||
const submitForm = async () => {
|
const submitForm = async () => {
|
||||||
reformInfo.value.solveImage = JSON.stringify(reformInfo.value.solveImage);
|
reformInfo.value.solveImage = JSON.stringify(reformInfo.value.solveImage);
|
||||||
|
|||||||
@ -45,6 +45,7 @@
|
|||||||
>
|
>
|
||||||
<template #formButton="scope">
|
<template #formButton="scope">
|
||||||
<el-button v-auth="'safe_inspect_add'" class="btnStyle" @click="handleAddItem">新增</el-button>
|
<el-button v-auth="'safe_inspect_add'" class="btnStyle" @click="handleAddItem">新增</el-button>
|
||||||
|
<el-button class="btnStyle" @click="handleExport">导出</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button type="primary" link @click="handleLookItem(row)">
|
<el-button type="primary" link @click="handleLookItem(row)">
|
||||||
@ -101,6 +102,7 @@ import orderAdd from "./components/orderAdd.vue";
|
|||||||
import { statisticsTable } from "@/api/modules/goverment";
|
import { statisticsTable } from "@/api/modules/goverment";
|
||||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||||
import { getDustprojectPage, getDustengineeringPage } from "@/api/modules/goverment";
|
import { getDustprojectPage, getDustengineeringPage } from "@/api/modules/goverment";
|
||||||
|
import { exportXlsApi } from "@/api/modules/huizhou";
|
||||||
import { sendIframeMessage } from "@/utils/util";
|
import { sendIframeMessage } from "@/utils/util";
|
||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
@ -189,6 +191,37 @@ const searchSn = ref("");
|
|||||||
const searchName = ref("");
|
const searchName = ref("");
|
||||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||||
const proTable = ref();
|
const proTable = ref();
|
||||||
|
// 导出
|
||||||
|
const handleExport = () => {
|
||||||
|
let requestData = {
|
||||||
|
engineeringSn: searchSn.value,
|
||||||
|
pageNo: pages.value.pageNo,
|
||||||
|
pageSize: pages.value.pageSize,
|
||||||
|
engineeringName: proTable.value.searchParam.engineeringName,
|
||||||
|
state: proTable.value.searchParam.state,
|
||||||
|
type: 1
|
||||||
|
};
|
||||||
|
exportXlsApi(requestData).then((res: any) => {
|
||||||
|
console.log(res);
|
||||||
|
let url = window.URL.createObjectURL(res);
|
||||||
|
let a = document.createElement("a");
|
||||||
|
console.log(url);
|
||||||
|
a.href = url;
|
||||||
|
a.download = "质量检查.xlsx";
|
||||||
|
a.click();
|
||||||
|
document.removeChild(a);
|
||||||
|
});
|
||||||
|
// window.location.href =
|
||||||
|
// baseUrl +
|
||||||
|
// "/gov/inspectRecord/exportXls?engineeringSn=" +
|
||||||
|
// searchSn.value +
|
||||||
|
// "&pageNo=" +
|
||||||
|
// pages.value.pageNo +
|
||||||
|
// "&pageSize=" +
|
||||||
|
// pages.value.pageSize +
|
||||||
|
// "&engineeringName=" +
|
||||||
|
// proTable.value.searchParam.engineeringName;
|
||||||
|
};
|
||||||
// 新增执法单
|
// 新增执法单
|
||||||
const handleAddItem = () => {
|
const handleAddItem = () => {
|
||||||
orderDialog.value = true;
|
orderDialog.value = true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user