From 2607f8d9fb921fca17301d2f24a4eaf188b6760d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=AE=8F=E6=9D=B0?= <1943105267@qq.com> Date: Sun, 19 Jan 2025 11:54:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=88=86=E6=83=85=E8=B5=B0=E5=8A=BF=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sentiment/components/componentLeft.vue | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/views/privateOrder/sentiment/components/componentLeft.vue b/src/views/privateOrder/sentiment/components/componentLeft.vue index 81c34bc..3710466 100644 --- a/src/views/privateOrder/sentiment/components/componentLeft.vue +++ b/src/views/privateOrder/sentiment/components/componentLeft.vue @@ -360,13 +360,13 @@ export default { allDate: [], date: [], newDate: [ - this.$moment(this.$moment().subtract(7, "d")).format("MM-DD"), - this.$moment(this.$moment().subtract(6, "d")).format("MM-DD"), - this.$moment(this.$moment().subtract(5, "d")).format("MM-DD"), - this.$moment(this.$moment().subtract(4, "d")).format("MM-DD"), - this.$moment(this.$moment().subtract(3, "d")).format("MM-DD"), - this.$moment(this.$moment().subtract(2, "d")).format("MM-DD"), - this.$moment(this.$moment().subtract(1, "d")).format("MM-DD"), + // this.$moment(this.$moment().subtract(7, "d")).format("MM-DD"), + // this.$moment(this.$moment().subtract(6, "d")).format("MM-DD"), + // this.$moment(this.$moment().subtract(5, "d")).format("MM-DD"), + // this.$moment(this.$moment().subtract(4, "d")).format("MM-DD"), + // this.$moment(this.$moment().subtract(3, "d")).format("MM-DD"), + // this.$moment(this.$moment().subtract(2, "d")).format("MM-DD"), + // this.$moment(this.$moment().subtract(1, "d")).format("MM-DD"), ], dtsx: {}, //======== @@ -457,18 +457,20 @@ export default { from.params.endDateTime = this.$moment(datetwo).format("YYYY-MM-DD"); listYqzs(from).then((res) => { this.allDate = res.rows; + // console.log("敏感数据", res); //已经排序过的数组 // this.allDate.sort(function (a, b) { // return new Date(a.dateTime) - new Date(b.dateTime); // }); this.allDate.forEach((value) => { - const index = this.newDate.indexOf( - this.$moment(value.dateTime).format("MM-DD") - ); - if (index !== -1) { - this.positiveOpinion[index] = value.count1; // 将 count1 赋值给对应的下标 - this.negativeOpinion[index] = value.count2; // 将 count2 赋值给对应的下标 - } + // const index = this.newDate.indexOf( + // this.$moment(value.dateTime).format("MM-DD") + // ); + // if (index !== -1) { + this.newDate[index] = value.dateTime; + this.positiveOpinion[index] = value.count1; // 将 count1 赋值给对应的下标 + this.negativeOpinion[index] = value.count2; // 将 count2 赋值给对应的下标 + // } }); // this.allDate.forEach((value) => { // //把日期存储起来