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 @@ {{ scope.row.hours.length * 2 }} + - - - + + + + + {{handlePresetsMany(row).txt}} + {{handlePresetsMany(row).number}} + + + + + @@ -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