From 3a17c4721771ca1d6e3cc4452ca529f82bb4947d Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Tue, 3 Sep 2024 10:58:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E8=AE=BF=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/longInsuranceDetail.vue | 181 ++++++++++++------ 1 file changed, 123 insertions(+), 58 deletions(-) diff --git a/src/views/customer/component/longInsuranceDetail.vue b/src/views/customer/component/longInsuranceDetail.vue index 9ce6ac4..0968ca3 100644 --- a/src/views/customer/component/longInsuranceDetail.vue +++ b/src/views/customer/component/longInsuranceDetail.vue @@ -3,36 +3,48 @@ - - - - - - - - + + + + + + + + + - - - + @@ -102,37 +153,49 @@ @@ -214,31 +277,33 @@ th { printWindow.document.write(table); printWindow.document.write(""); printWindow.document.close(); - let imgEl = printWindow.document.querySelectorAll('img') - let temp = 0 - imgEl.forEach(el => { - el.addEventListener('load',_ => { + let imgEl = printWindow.document.querySelectorAll("img"); + let temp = 0; + imgEl.forEach((el) => { + el.addEventListener("load", (_) => { temp++; - if(temp === imgEl.length) { + if (temp === imgEl.length) { printWindow.print(); } - }) - }) + }); + }); }, }, computed: { isMark() { - return function(markName,str) { - let arr = str?.split('|') || [] - return arr.indexOf(markName) !== -1 ? "✓" : "" - } + return function (markName, str) { + let arr = str?.split("|") || []; + return arr.indexOf(markName) !== -1 ? "✓" : ""; + }; }, otherVal() { return function (options, str) { - let arr = str?.split('|') || [] - return arr.filter(i => options.findIndex(j => j === i) === -1)[0] || " " - } - } + let arr = str?.split("|") || []; + return ( + arr.filter((i) => options.findIndex((j) => j === i) === -1)[0] || " " + ); + }; + }, }, watch: { isShow(newVal) {