舆情信息量统计模块进度条根据数据量显示

main
许宏杰 1 month ago
parent bf02bd7c35
commit e6d4c65175

@ -32,7 +32,7 @@
></el-progress> --> ></el-progress> -->
<!-- :percentage="Number(item.info)" --> <!-- :percentage="Number(item.info)" -->
<el-progress <el-progress
:percentage="100" :percentage="item.info"
:color="item.color" :color="item.color"
></el-progress> ></el-progress>
<div class="StatisticsText"> <div class="StatisticsText">
@ -355,11 +355,19 @@ export default {
areaId: 1, areaId: 1,
}, },
// //
positiveOpinion: [0,0,0,0,0,0,0], positiveOpinion: [0, 0, 0, 0, 0, 0, 0],
negativeOpinion: [0,0,0,0,0,0,0], negativeOpinion: [0, 0, 0, 0, 0, 0, 0],
allDate: [], allDate: [],
date: [], 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: {}, dtsx: {},
//======== //========
listTotal: 0, listTotal: 0,
@ -453,13 +461,15 @@ export default {
// this.allDate.sort(function (a, b) { // this.allDate.sort(function (a, b) {
// return new Date(a.dateTime) - new Date(b.dateTime); // return new Date(a.dateTime) - new Date(b.dateTime);
// }); // });
this.allDate.forEach((value)=>{ this.allDate.forEach((value) => {
const index = this.newDate.indexOf(this.$moment(value.dateTime).format("MM-DD")); const index = this.newDate.indexOf(
this.$moment(value.dateTime).format("MM-DD")
);
if (index !== -1) { if (index !== -1) {
this.positiveOpinion[index] = value.count1; // count1 this.positiveOpinion[index] = value.count1; // count1
this.negativeOpinion[index] = value.count2; // count2 this.negativeOpinion[index] = value.count2; // count2
} }
}) });
// this.allDate.forEach((value) => { // this.allDate.forEach((value) => {
// // // //
// this.newDate.push(this.$moment(value.dateTime).format("MM-DD")); // this.newDate.push(this.$moment(value.dateTime).format("MM-DD"));

Loading…
Cancel
Save