diff --git a/project/sass/apps/Announce/AppAnnounceStatistics/AppAnnounceStatistics.vue b/project/sass/apps/Announce/AppAnnounceStatistics/AppAnnounceStatistics.vue index a5e24bb2..10ed56e4 100644 --- a/project/sass/apps/Announce/AppAnnounceStatistics/AppAnnounceStatistics.vue +++ b/project/sass/apps/Announce/AppAnnounceStatistics/AppAnnounceStatistics.vue @@ -155,7 +155,10 @@ departData: {}, departBarChart: null, dialogDate: false, + timeListEffect: '', + timeListDepart: '', timeList: '', + isEffectTimeSelect: false, deptList: [], selectDeptName: '', isDepartData: true, @@ -222,11 +225,11 @@ return this.$message.error('请选择自定义时间'); } - if(this.effectType == 3) { //宣发效果 + if(this.effectType == 3 && this.isEffectTimeSelect) { //宣发效果 + this.timeListEffect = this.timeList this.getEffect() - } - - if(this.departType == 3) { //宣发明细 + } else { //宣发明细 + this.timeListDepart = this.timeList this.getDepart() } @@ -247,16 +250,21 @@ this.taskList = this.dateList[day].taskList }, changeEffectType(type) { + if(this.effectType != 3) { + this.timeList = [] + }else { + this.timeList = this.timeListEffect + } this.effectType = type if(type == 3) { + this.isEffectTimeSelect = true this.dialogDate = true - this.timeList = [] }else { this.getEffect() } }, getEffect() { - var startTime = this.timeList[0] || '' , endTime = this.timeList[1] || '', departId = this.deptList[0] || '' + var startTime = this.timeListEffect[0] || '' , endTime = this.timeListEffect[1] || '', departId = this.deptList[0] || '' this.instance.post(`/app/appmasssendingtask/statisticsEffect?type=${this.effectType}&startTime=${startTime}&endTime=${endTime}&departId=${departId}`).then(res => { if (res.code == 0) { this.effectData = res.data @@ -308,16 +316,21 @@ this[id].setOption(option) }, changeDepartType(type) { + if(this.departType != 3) { + this.timeList = [] + }else { + this.timeList = this.timeListDepart + } this.departType = type if(type == 3) { + this.isEffectTimeSelect = false this.dialogDate = true - this.timeList = [] }else { this.getDepart() } }, getDepart() { - var startTime = this.timeList[0] || '' , endTime = this.timeList[1] || '' + var startTime = this.timeListDepart[0] || '' , endTime = this.timeListDepart[1] || '' this.instance.post(`/app/appmasssendingtask/statisticsDepart?type=${this.departType}&startTime=${startTime}&endTime=${endTime}`).then(res => { if (res.code == 0) { if(res.data && res.data.length) {