Merge branch 'dev' into build

This commit is contained in:
aixianling
2022-08-22 15:23:01 +08:00
2 changed files with 17 additions and 6 deletions

View File

@@ -61,10 +61,10 @@
<ai-title title="宣发效果"></ai-title>
<div class="right-search">
<div class="time-select" :class="effectType == index ? 'active' : ''" v-for="(item, index) in dateTypeList" :key="index" @click="changeEffectType(index)">{{item}}</div>
<ai-picker :instance="instance" v-model="deptList" @change="getEffect" dialogTitle="选择部门">
<ai-picker :instance="instance" @pick="e => onUserChange(e)" :multiple="false" dialogTitle="选择部门" action="/app/wxcp/wxdepartment/departList">
<div class="time-select">
<span class="dept-name" style="color:#999;" v-if="deptList && !deptList.length">宣发部门</span>
<ai-open-data class="dept-name" type="departmentName" :openid="deptList[0]" v-else/>
<span class="dept-name" v-else>{{deptList[0].name}}</span>
<i class="el-icon-arrow-down"></i>
</div>
</ai-picker>
@@ -219,6 +219,10 @@
},
methods: {
...mapActions(['initOpenData', 'transCanvas']),
onUserChange (e) {
this.deptList = e
this.getEffect()
},
selectDete() {
if(!this.timeList || !this.timeList.length) {
return this.$message.error('请选择自定义时间');
@@ -265,7 +269,10 @@
}
},
getEffect() {
var startTime = this.timeListEffect[0] || '' , endTime = this.timeListEffect[1] || '', departId = this.deptList[0] || ''
var startTime = this.timeListEffect[0] || '' , endTime = this.timeListEffect[1] || '', departId = ''
if(this.deptList && this.deptList.length) {
departId = this.deptList[0].id
}
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

View File

@@ -63,10 +63,10 @@
<ai-title title="宣发效果"></ai-title>
<div class="right-search">
<div class="time-select" :class="effectType == index ? 'active' : ''" v-for="(item, index) in dateTypeList" :key="index" @click="changeEffectType(index)">{{item}}</div>
<ai-picker :instance="instance" v-model="deptList" @change="getEffect" dialogTitle="选择部门">
<ai-picker :instance="instance" @pick="e => onUserChange(e)" :multiple="false" dialogTitle="选择部门" action="/app/wxcp/wxdepartment/departList">
<div class="time-select">
<span class="dept-name" style="color:#999;" v-if="deptList && !deptList.length">宣发部门</span>
<ai-open-data class="dept-name" type="departmentName" :openid="deptList[0]" v-else/>
<ai-open-data class="dept-name" type="departmentName" :openid="deptList[0].id" v-else/>
<i class="el-icon-arrow-down"></i>
</div>
</ai-picker>
@@ -221,6 +221,10 @@
},
methods: {
...mapActions(['initOpenData', 'transCanvas']),
onUserChange (e) {
this.deptList = e
this.getEffect()
},
selectDete() {
if(!this.timeList || !this.timeList.length) {
return this.$message.error('请选择自定义时间');