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) => {
|
||||
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%;
|
||||
overflow: auto;
|
||||
background-color: transparent;
|
||||
color: #c4c4c4;
|
||||
.el-tree-node__content {
|
||||
color: #ffffff;
|
||||
height: auto;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.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;
|
||||
color: #0bc4f0;
|
||||
font-size: 20px;
|
||||
|
||||
@ -238,14 +238,14 @@ onMounted(async () => {});
|
||||
}
|
||||
td.el-table__cell {
|
||||
background-color: transparent !important;
|
||||
border-bottom: 0 !important;
|
||||
// border-bottom: 0 !important;
|
||||
color: var(--el-menu-text-color);
|
||||
font-size: 20px !important;
|
||||
border-right: 2px solid #252526;
|
||||
}
|
||||
th.el-table__cell {
|
||||
background-color: transparent;
|
||||
border-bottom: 0 !important;
|
||||
// border-bottom: 0 !important;
|
||||
border-right: 2px solid #252526;
|
||||
}
|
||||
.el-table__inner-wrapper::before {
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
<template>
|
||||
<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>
|
||||
<div class="title-detail">
|
||||
<img src="@/assets/images/tableIcon/look.png" alt="" />
|
||||
<span>查看隐患整改信息</span>
|
||||
<el-button type="primary" @click="submitPrint" style="margin-right: 20px">
|
||||
<span>打印</span>
|
||||
</el-button>
|
||||
<el-icon>
|
||||
<close @click="closeMain" />
|
||||
</el-icon>
|
||||
@ -320,6 +323,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import type { FormInstance, UploadProps } from "element-plus";
|
||||
import { relativeInfo, timeLineData, singleOptionAudit, allOptionAudit } from "@/api/modules/goverment";
|
||||
import { submitReform } from "@/api/modules/project";
|
||||
import printJS from "print-js";
|
||||
const props = defineProps({
|
||||
detailsDialog: Boolean,
|
||||
relativeId: String
|
||||
@ -349,6 +353,16 @@ const reformInfo = ref({
|
||||
solveImage: []
|
||||
});
|
||||
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 () => {
|
||||
reformInfo.value.solveImage = JSON.stringify(reformInfo.value.solveImage);
|
||||
|
||||
@ -44,6 +44,7 @@
|
||||
>
|
||||
<template #formButton="scope">
|
||||
<el-button v-auth="'quality_inspect_add'" class="btnStyle" @click="handleAddItem">新增</el-button>
|
||||
<el-button class="btnStyle" @click="handleExport">导出</el-button>
|
||||
</template>
|
||||
<template #operation="{ 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 LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||
import { getDustprojectPage, getDustengineeringPage } from "@/api/modules/goverment";
|
||||
import { exportXlsApi } from "@/api/modules/huizhou";
|
||||
import { sendIframeMessage } from "@/utils/util";
|
||||
import { GlobalStore } from "@/stores";
|
||||
const route = useRoute();
|
||||
@ -188,6 +190,38 @@ const searchSn = ref("");
|
||||
const searchName = ref("");
|
||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||
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 = () => {
|
||||
orderDialog.value = true;
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
<template>
|
||||
<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>
|
||||
<div class="title-detail">
|
||||
<img src="@/assets/images/tableIcon/look.png" alt="" />
|
||||
<span>查看隐患整改信息</span>
|
||||
<el-button type="primary" @click="submitPrint" style="margin-right: 20px">
|
||||
<span>打印</span>
|
||||
</el-button>
|
||||
<el-icon>
|
||||
<close @click="closeMain" />
|
||||
</el-icon>
|
||||
@ -313,6 +316,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import type { FormInstance, UploadProps } from "element-plus";
|
||||
import { relativeInfo, timeLineData, singleOptionAudit, allOptionAudit } from "@/api/modules/goverment";
|
||||
import { submitReform } from "@/api/modules/project";
|
||||
import printJS from "print-js";
|
||||
const baseUrl = import.meta.env.VITE_API_URL;
|
||||
const props = defineProps({
|
||||
detailsDialog: Boolean,
|
||||
@ -341,6 +345,16 @@ const auditForm = ref({
|
||||
const auditAgainForm = ref({
|
||||
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 () => {
|
||||
reformInfo.value.solveImage = JSON.stringify(reformInfo.value.solveImage);
|
||||
|
||||
@ -45,6 +45,7 @@
|
||||
>
|
||||
<template #formButton="scope">
|
||||
<el-button v-auth="'safe_inspect_add'" class="btnStyle" @click="handleAddItem">新增</el-button>
|
||||
<el-button class="btnStyle" @click="handleExport">导出</el-button>
|
||||
</template>
|
||||
<template #operation="{ 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 LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||
import { getDustprojectPage, getDustengineeringPage } from "@/api/modules/goverment";
|
||||
import { exportXlsApi } from "@/api/modules/huizhou";
|
||||
import { sendIframeMessage } from "@/utils/util";
|
||||
import { GlobalStore } from "@/stores";
|
||||
const route = useRoute();
|
||||
@ -189,6 +191,37 @@ const searchSn = ref("");
|
||||
const searchName = ref("");
|
||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||
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 = () => {
|
||||
orderDialog.value = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user