From 1407bb8239c7dd4c609062c407c9b4d667f932b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E6=89=BF?= Date: Mon, 14 Apr 2025 16:06:26 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=8A=A5=E8=A1=A8=20?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E8=A1=A8=E5=A4=B4=E6=98=BE=E7=A4=BA=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statisticalReport/index.vue | 67 +++++++++++++++++++-------- 1 file changed, 47 insertions(+), 20 deletions(-) diff --git a/src/views/statisticalReport/index.vue b/src/views/statisticalReport/index.vue index 6377c5b..7137eb3 100644 --- a/src/views/statisticalReport/index.vue +++ b/src/views/statisticalReport/index.vue @@ -83,14 +83,23 @@ - - - + + + + + + @@ -196,31 +205,30 @@ export default { }, methods: { //照片多的处理 - handlePresetsMany(row, column, cellValue) { + handlePresetsMany(row) { + let result = {txt: "" , number: 0}; if (row.wrongCount == 0) { - return "无"; + return result; } else { - var txt = ""; row.hours.forEach(data => { if (data.base < data.timeList.length) { let hour = parseInt(data.hour.substring(11, 13)); - txt += hour + "点" + data.wrongDetail + "张 , "; - return; + result.txt += hour + "点" + data.wrongDetail + "张 , "; + result.number += data.timeList.length - data.base; } }); - if ("" == txt) { - return "无"; - } else { - return txt; - } } + if (result.txt=="") { + result.txt = "无"; + } + return result; }, //照片少的处理 handlePresetsFew(row, column, cellValue) { if (row.wrongCount == 0) { return "无"; } else { - var txt = ""; + let txt = ""; row.hours.forEach(data => { if (data.base > data.timeList.length) { let hour = data.hour.substring(11, 13); @@ -237,12 +245,11 @@ export default { } }); if (xi == 0) { - txt += hour + ":00点少1张 , "; + txt += hour + ":00 , "; } if (da == 0) { - txt += hour + ":30点少1张 , "; + txt += hour + ":30 , "; } - return; } }); if ("" == txt) { @@ -252,6 +259,20 @@ export default { } } }, + //计数缺少图片数量 + countLackPicture(row, column, cellValue){ + let number = 0; + if (row.wrongCount == 0) { + return number; + } else { + row.hours.forEach(data => { + if (data.base > data.timeList.length) { + number += data.base - data.timeList.length; + } + }); + } + return number; + }, setDefaultImage(e) { e.target.src = defaultImage; }, @@ -390,6 +411,7 @@ export default { a.presetList = presetList; }); this.picList = dataList; + console.log(dataList); this.loading = false; // console.log(res.data); }).catch((err) => { @@ -605,5 +627,10 @@ export default { } } } + + } +.eltooltip{ + max-width:50%; + } \ No newline at end of file