This commit is contained in:
yanran200730
2022-07-27 15:49:56 +08:00

View File

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