开始时间:
-
@@ -271,7 +289,6 @@ export default {
this.getNowDate();
},
mounted() {
- // this.getBrokenDate();
this.getBrokenEcharts1();
this.getBrokenEcharts2();
this.getBrokenEcharts3();
@@ -283,8 +300,8 @@ export default {
checkTime(index) {
if (index == 3) {
this.timeSelect = index;
- this.customShow = true;
-
+ this.customShow = true;
+
this.showStart = false;
this.showEnd = false;
} else {
@@ -298,34 +315,35 @@ export default {
// 重置
reset() {
this.timeType = 0;
- this.startTime = "";
- this.endTime = "";
+ this.timeSelect = 0;
+ this.start = "";
+ this.end = "";
this.departId = "";
},
selectConfirm() {
if (this.timeSelect == 3) {
- this.timeType = this.timeSelect;
+ this.detailType = this.timeSelect;
this.start = this.startTime;
this.end = this.endTime;
this.getBrokenDate();
} else {
- this.timeType = this.timeSelect;
+ this.detailType = this.timeSelect;
this.getBrokenDate();
}
this.filterShow = false;
},
confirmStart(val) {
- this.startTime = val.year + '-' + val.month + '-' + val.day
+ this.startTime = val.year + "-" + val.month + "-" + val.day;
},
confirmEnd(val) {
- this.endTime = val.year + '-' + val.month + '-' + val.day
+ this.endTime = val.year + "-" + val.month + "-" + val.day;
},
handleTime() {
- this.start = this.startTime
- this.end = this.endTime
+ this.start = this.startTime;
+ this.end = this.endTime;
this.customShow = false;
},
@@ -341,10 +359,8 @@ export default {
params: {},
})
.then((res) => {
- {
- if (res?.data) {
- this.calendarList = res.data;
- }
+ if (res?.data) {
+ this.calendarList = res.data;
}
});
},
@@ -363,18 +379,37 @@ export default {
.then((res) => {
if (res?.data) {
if (this.timeType == 0) {
- this.resX = res.data.trend.map((e) =>e.ymd.substring(5, 7) + "月" + e.ymd.substring(8, 10) + "日");
+ this.resX = res.data.trend.map(
+ (e) =>
+ e.ymd.substring(5, 7) + "月" + e.ymd.substring(8, 10) + "日"
+ );
} else if (this.timeType == 1) {
- this.resX = res.data.trend.map((e) =>e.ymd.substring(5, 7) + "月" + e.ymd.substring(8, 10) + "日");
+ this.resX = res.data.trend.map(
+ (e) =>
+ e.ymd.substring(5, 7) + "月" + e.ymd.substring(8, 10) + "日"
+ );
} else if (this.timeType == 2) {
- this.resX = res.data.trend.map((e) =>e.ymd.substring(0, 4) + "年" + e.ymd.substring(5, 7) + "月");
+ this.resX = res.data.trend.map(
+ (e) =>
+ e.ymd.substring(0, 4) + "年" + e.ymd.substring(5, 7) + "月"
+ );
}
this.resY = res.data.trend.map((e) => e.receiveCount);
- this.peopleNum = this.resY.reduce((accumulator, currentValue)=>{ return accumulator + currentValue})
+ this.peopleNum = this.resY.reduce((accumulator, currentValue) => {
+ return accumulator + currentValue;
+ });
this.res2Y = res.data.trend.map((e) => e.executeCount);
- this.sendNum = this.res2Y.reduce((accumulator, currentValue)=>{ return accumulator + currentValue})
+ this.sendNum = this.res2Y.reduce((accumulator, currentValue) => {
+ return accumulator + currentValue;
+ });
this.res3Y = res.data.trend.map((e) => e.createCount);
- this.predictNum = this.res3Y.reduce((accumulator, currentValue)=>{ return accumulator + currentValue})
+ this.predictNum = this.res3Y.reduce((accumulator, currentValue) => {
+ return accumulator + currentValue;
+ });
+ this.getBrokenEcharts1();
+ this.getBrokenEcharts2();
+ this.getBrokenEcharts3();
+ this.getColumnarEcharts();
}
});
},
@@ -382,8 +417,6 @@ export default {
getBrokenEcharts1() {
let dataX = this.resX;
let dataY1 = this.resY;
- console.log(dataX);
- console.log(dataY1);
this.brokenEcharts1 = echarts.init(
document.getElementById("brokenEcharts1")
);
@@ -414,7 +447,7 @@ export default {
axisLine: {
show: false,
},
- data: dataX,
+ data: this.resX,
},
yAxis: {
type: "value",
diff --git a/src/project/saas/AppPropagandaStatistics/calendarInfo.vue b/src/project/saas/AppPropagandaStatistics/calendarInfo.vue
index a02149e2..43f7ecca 100644
--- a/src/project/saas/AppPropagandaStatistics/calendarInfo.vue
+++ b/src/project/saas/AppPropagandaStatistics/calendarInfo.vue
@@ -1,6 +1,6 @@
-
+
@@ -38,6 +38,7 @@ export default {
year: '',
month: '',
day: '',
+ yyyyMM: '',
}
},
components: {
@@ -49,6 +50,14 @@ export default {
},
methods: {
+ changeMonth(e) {
+ if(e.month<=9) {
+ this.yyyyMM = e.year + '-' + '0' + e.month
+ } else if(e.month > 9) {
+ this.yyyyMM = e.year + '-' + e.month
+ }
+ this.getData()
+ },
change(val) {
this.date = `${val.year} + '-' + ${val.month} + '-' + ${val.day}`
},
@@ -62,21 +71,27 @@ export default {
},
getData() {
this.$http.post(`/app/appmasssendingtask/statisticsCalendar`, null, {
- params: {},
+ params: {
+ yyyyMM: this.yyyyMM,
+ },
})
.then((res) => {
if (res?.data) {
this.calendarList = res.data;
- var arr = Object.keys(res.data).map(key => (res.data[key]))
- var calList = arr.filter(item=> (item.taskList && item.taskList.length > 0))
+ let arr = Object.keys(res.data).map(key => (res.data[key]))
+ let calList = arr.filter(item=> (item.taskList && item.taskList.length > 0))
this.selected = calList.map(item=> {
if(item.day>=1 && item.day<=9) {
if(this.month>=1 && this.month <=9) {
- return this.year + '-' + '0' + this.month + '-' + '0' + item.day
+ return {
+ date: this.year + '-' + '0' + this.month + '-' + '0' + item.day
+ }
}
} else if(item.day> 9) {
if(this.month > 9) {
- return this.year + '-' + this.month + '-' + item.day
+ return {
+ date: this.year + '-' + this.month + '-' + item.day
+ }
}
}
})