Commit 8fb87a19 by unknown

老客接口调整

1 parent 8892a025
......@@ -9,10 +9,13 @@
<div class="group">
<van-cell class="group-tags" title="发送给客户群">
<template #default>
<template v-for="group of task.groupList.slice(0, 2)">
<!-- <template v-for="group of task.groupList.slice(0, 2)">
<van-tag :key="group.chatId" size="large"> {{ group.groupName }} </van-tag>
</template> -->
<template v-if="task.groupList && task.groupList.length > 0">
<van-tag v-for="group of task.groupList.slice(0, 2)" :key="group.chatId" size="large"> {{ group.groupName }} </van-tag>
</template>
<template v-if="task.groupList.length > 2">
<template v-if="task.groupList && task.groupList.length > 2">
<van-tag size="large"> ... </van-tag>
</template>
</template>
......@@ -195,7 +198,8 @@ export default {
showTodo() {
if (this.todoMembers.length === 0) return '无'
const names = this.todoMembers.map((m) => m.name)
const namesMap = this.todoMembers.map((m) => m.name || '')
const names = namesMap.filter(m => m !== '')
if (this.todoMembers.length <= 2) return names.join('、')
return names[0] + '、' + names[1] + '等' + this.todoMembers.length + '人'
......@@ -215,7 +219,8 @@ export default {
showDone() {
if (this.doneMembers.length === 0) return '无'
const names = this.doneMembers.map((m) => m.name)
const namesMap = this.doneMembers.map((m) => m.name || '')
const names = namesMap.filter(m => m !== '')
if (this.doneMembers.length <= 2) return names.join('、')
return names[0] + '、' + names[1] + '等' + this.doneMembers.length + '人'
......
......@@ -91,9 +91,10 @@ export function remove(ids) {
* @param {*} params
* id: 老客标签建群任务ID
*/
export function getStat(id) {
export function getStat(id, params) {
return request({
url: service + '/stat/' + id,
method: 'get',
params
})
}
\ No newline at end of file
......@@ -99,7 +99,7 @@ export default {
page && (this.customerQuery.pageNum = page)
this.customerLoading = true
getStat(this.customerSearchId)
getStat(this.customerSearchId, this.customerQuery)
.then(({ rows, total }) => {
this.customerList = rows
this.customerTotal = +total
......@@ -127,10 +127,9 @@ export default {
},
// 获取显示用tag字符串
getDisplayTags(row) {
if (!(row && row.length > 0)) return ''
const tags = row.tagList.map((t) => (t && t.name ? t.name : ''))
if (!(row && row.tagList.length > 0)) return ''
return tags.join(' ')
return row.tagList.join(' ')
},
// 批量删除
handleBulkRemove() {
......@@ -198,15 +197,15 @@ export default {
},
// 客户统计查询
customerSearch() {
// this.getStat()
this.customerFilter()
this.getStat()
// this.customerFilter()
},
// 客户统计重置
resetCustomerQuery() {
this.$refs['customerForm'].resetFields()
// this.getStat(1)
this.customerFilter()
this.getStat(1)
// this.customerFilter()
}
}
}
......@@ -378,7 +377,7 @@ export default {
:total="customerTotal"
:page.sync="customerQuery.pageNum"
:limit.sync="customerQuery.pageSize"
@pagination="customerFilter"
@pagination="customerSearch"
/>
</div>
</el-dialog>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!