diff --git a/src/views/simulationEvaluation/a.js b/src/views/simulationEvaluation/a.js
deleted file mode 100644
index e69de29..0000000
diff --git a/src/views/simulationEvaluation/reportDesc.vue b/src/views/simulationEvaluation/reportDesc.vue
index 8230766..fd64323 100644
--- a/src/views/simulationEvaluation/reportDesc.vue
+++ b/src/views/simulationEvaluation/reportDesc.vue
@@ -59,12 +59,12 @@
-
-
+
+
-
+
@@ -129,33 +129,42 @@ const info = reactive({
extra_evaluation_type: '',
tasks: [],
reportType: '',
- robustness: []
+ robustness: [],
+ isPrint: false,
+ elPrint: 0,
})
-const doExport=async () => {
- try{
- let dom=document.querySelector("#print_simulation_report_desc");
- const canvas = await html2canvas(dom,{
- allowTaint: true,
- useCORS: true,
- });
+const doExport = async () => {
+ try {
+ let dom = document.querySelector("#print_simulation_report_desc");
+ const canvas = await html2canvas(dom, {
+ allowTaint: true,
+ useCORS: true,
+ });
const img = canvas.toDataURL('image/png');
const link = document.createElement('a');
link.href = img;
- link.setAttribute('download', info.report.report_name+ useDateFormat(new Date(),"YYYYMMDDHHmmss").value+'.png');
+ link.setAttribute('download', info.report.report_name + useDateFormat(new Date(), "YYYYMMDDHHmmss").value + '.png');
link.click();
- }catch(e){
+ } catch (e) {
ElMessage.error("导出图片失败!");
- console.error("导出图片失败!",e);
+ console.error("导出图片失败!", e);
}
}
function goBack() {
router.push({ path: "/simulationEvaluation/reportList" });
}
-function doPrint() {
+function doPrint() {
document.querySelector("html").classList.add("report-print");
- window.print();
- document.querySelector("html").classList.remove("report-print");
+ info.isPrint = true;
+ info.elPrint++;
+ setTimeout(() => {
+ window.print();
+ document.querySelector("html").classList.remove("report-print");
+ info.isPrint = false;
+ info.elPrint++;
+ }, 800);
}
+
const doDelete = () => {
let id = route.query.id;
ElMessageBox.confirm("确认删除?", "警告", {
@@ -331,10 +340,11 @@ html.report-print {
height: unset !important;
.simulation-report-desc {
-
- .el-scrollbar__view{
+
+ .el-scrollbar__view {
vertical-align: unset !important;
}
+
.el-table {
table {
width: unset !important;