From 7e917bd8be30dceba89d673a79f5fd06fee1fd6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E6=89=BF?= Date: Thu, 24 Apr 2025 13:46:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=B0=83=E6=95=B4=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statisticalReport/index.vue | 156 +++++++++++++++----------- 1 file changed, 88 insertions(+), 68 deletions(-) diff --git a/src/views/statisticalReport/index.vue b/src/views/statisticalReport/index.vue index 7137eb3..06416f0 100644 --- a/src/views/statisticalReport/index.vue +++ b/src/views/statisticalReport/index.vue @@ -38,7 +38,8 @@ - + @@ -82,24 +83,32 @@ - + - @@ -131,9 +140,11 @@ import { getRealtimePhoto, deletePicList, getStatisticalReport, + getScheduleOne, + getScheduleList, } from "@/utils/api/index"; import { - getActivityApi, + getActivityApi, } from "@/utils/api/reportApi"; import defaultImage from "../../assets/img/nodatapic2.jpg"; export default { @@ -168,6 +179,7 @@ export default { total: 0, //总条数 loading: false, signtype: 0, //0第一次查询 + scheduleRule: {}, //装置拍照时间表规则 }; }, created() { @@ -204,74 +216,70 @@ export default { } }, methods: { + //预计拍照 + assumeTakePic(row){ + console.log(row); + return "123"; + }, //照片多的处理 handlePresetsMany(row) { - let result = {txt: "" , number: 0}; - if (row.wrongCount == 0) { - return result; - } else { - row.hours.forEach(data => { - if (data.base < data.timeList.length) { - let hour = parseInt(data.hour.substring(11, 13)); - result.txt += hour + "点" + data.wrongDetail + "张 , "; - result.number += data.timeList.length - data.base; - } - }); - } - if (result.txt=="") { + let result = { txt: "", number: 0 }; + // if (row.wrongCount == 0) { + // return result; + // } else { + // row.hours.forEach(data => { + // if (data.base < data.timeList.length) { + // let hour = parseInt(data.hour.substring(11, 13)); + // result.txt += hour + "点" + data.wrongDetail + "张 , "; + // result.number += data.timeList.length - data.base; + // } + // }); + // } + if (result.txt == "") { result.txt = "无"; } return result; }, //照片少的处理 handlePresetsFew(row, column, cellValue) { - if (row.wrongCount == 0) { - return "无"; - } else { - let txt = ""; - row.hours.forEach(data => { - if (data.base > data.timeList.length) { - let hour = data.hour.substring(11, 13); - //记录大于30之后的 - let da = 0; - //记录大于30之前的 - let xi = 0; - data.timeList.forEach(timedata => { - let min = parseInt(timedata.substring(11, 13)); - if (min > 30) { - da++; - } else if (min < 30) { - xi++; - } - }); - if (xi == 0) { - txt += hour + ":00 , "; - } - if (da == 0) { - txt += hour + ":30 , "; - } + let txt = ""; + row.scheduleList.forEach(data => { + if ( data.timeList.length == 0 ) { + let hour = data.hour; + if ( hour < 10 ) { + hour = "0" + hour; } - }); - if ("" == txt) { - return "无"; - } else { - return txt; + let minute = data.minute; + if ( data.minute < 10 ){ + minute = "0" + minute; + } + txt += hour + ":" + minute + ","; } + }); + if ("" == txt) { + return "无"; + } else { + return txt; } + }, //计数缺少图片数量 - countLackPicture(row, column, cellValue){ + 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; - } - }); - } + // 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; + }, + //规约处理 + statuteHandle(protocol, val) { + }, setDefaultImage(e) { e.target.src = defaultImage; @@ -379,7 +387,7 @@ export default { // : this.activityOptions[0].id; }).catch((err) => { }); }, - changeActive(val){ + changeActive(val) { this.formdata.activityId = val; }, getSearchtdAlone() { @@ -396,6 +404,16 @@ export default { this.$set(this.formdata, "pageindex", this.page); this.$set(this.formdata, "pagesize", this.pageSize); console.log(this.formdata); + // this.$set(this.formdata, "activityId", 10149); + + + // getScheduleList().then((res) => { + // res.data.forEach(obj => { + // this.scheduleRule['key' + obj.termId + obj.channelId] = obj; + // }); + // // console.log(this.scheduleRule); + // }).catch((err) => { }); + getStatisticalReport(this.formdata).then((res) => { this.picList = []; //presetList @@ -410,8 +428,9 @@ export default { }); a.presetList = presetList; }); + + // console.log(dataList); this.picList = dataList; - console.log(dataList); this.loading = false; // console.log(res.data); }).catch((err) => { @@ -628,9 +647,10 @@ export default { } } - + +} + +.eltooltip { + max-width: 50%; } -.eltooltip{ - max-width:50%; - } \ No newline at end of file