From e6d4c65175a88b633fa75a18ced616e204cd1c97 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:46:45 +0800
Subject: [PATCH] =?UTF-8?q?=E8=88=86=E6=83=85=E4=BF=A1=E6=81=AF=E9=87=8F?=
=?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=A8=A1=E5=9D=97=E8=BF=9B=E5=BA=A6=E6=9D=A1?=
=?UTF-8?q?=E6=A0=B9=E6=8D=AE=E6=95=B0=E6=8D=AE=E9=87=8F=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../sentiment/components/componentLeft.vue | 24 +++++++++++++------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/src/views/privateOrder/sentiment/components/componentLeft.vue b/src/views/privateOrder/sentiment/components/componentLeft.vue
index fe8cd26..81c34bc 100644
--- a/src/views/privateOrder/sentiment/components/componentLeft.vue
+++ b/src/views/privateOrder/sentiment/components/componentLeft.vue
@@ -32,7 +32,7 @@
> -->
@@ -355,11 +355,19 @@ export default {
areaId: 1,
},
//将敏感和非敏感区分开来
- positiveOpinion: [0,0,0,0,0,0,0],
- negativeOpinion: [0,0,0,0,0,0,0],
+ positiveOpinion: [0, 0, 0, 0, 0, 0, 0],
+ negativeOpinion: [0, 0, 0, 0, 0, 0, 0],
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"),],
+ 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"),
+ ],
dtsx: {},
//========
listTotal: 0,
@@ -453,13 +461,15 @@ export default {
// 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"));
+ 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 赋值给对应的下标
}
- })
+ });
// this.allDate.forEach((value) => {
// //把日期存储起来
// this.newDate.push(this.$moment(value.dateTime).format("MM-DD"));