舆情走势图

main
许宏杰 1 month ago
parent e6d4c65175
commit 2607f8d9fb

@ -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) => {
// //

Loading…
Cancel
Save