Commit fa58c254 by test

Merge branch 'front_end_dev_2.0' of https://gitee.com/LinkWeChat/link-wechat into front_end_dev_2.0

2 parents 07822506 132b4027
......@@ -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
......@@ -18,7 +18,7 @@ const service = window.CONFIG.services.wecom + '/code'
export function getList(params) {
return request({
url: service + '/list',
params,
params
})
}
......@@ -28,7 +28,7 @@ export function getList(params) {
*/
export function getDetail(id) {
return request({
url: service + '/' + id,
url: service + '/' + id
})
}
......@@ -59,7 +59,7 @@ export function update(data) {
return request({
url: service + '/update',
method: 'put',
data,
data
})
}
......@@ -87,7 +87,7 @@ export function add(data) {
return request({
url: service + '/add',
method: 'post',
data,
data
})
}
......@@ -99,7 +99,7 @@ export function batchAdd(data) {
return request({
url: service + '/batchAdd',
method: 'post',
data,
data
})
}
......@@ -110,7 +110,7 @@ export function batchAdd(data) {
export function remove(id) {
return request({
url: service + '/delete/' + id,
method: 'delete',
method: 'delete'
})
}
......@@ -125,7 +125,7 @@ export function remove(id) {
export function getQrcode(params) {
return request({
url: service + '/getQrcode',
params,
params
})
}
......@@ -137,7 +137,7 @@ export function downloadBatch(ids) {
return request({
url: service + '/downloadBatch',
params: {
ids,
ids
},
responseType: 'blob'
})
......@@ -147,7 +147,7 @@ export function download(id) {
return request({
url: service + '/download',
params: {
id,
id
},
responseType: 'blob'
})
......@@ -156,11 +156,11 @@ export function download(id) {
/**
* 成员添加客户统计
* @param {*} params
* userId=成员id&addWay=添加类型,二维码:1&beginTime=开始时间&endTime=结束时间
* codeId=活码id&beginTime=开始时间&endTime=结束时间
*/
export function getUserAddCustomerStat(params) {
return request({
url: service + '/getUserAddCustomerStat',
params,
params
})
}
......@@ -35,7 +35,6 @@ export default {
rewardImageUrl: '',
rewardRule: ''
},
rewardImageUrlTemp: '',
action: process.env.VUE_APP_BASE_API + window.CONFIG.services.wecom + '/fission/upload',
headers: window.CONFIG.headers,
ruleForm: {
......@@ -223,7 +222,7 @@ export default {
},
handleAvatarSuccess(res, file) {
// this.rewardImageUrlTemp = URL.createObjectURL(file.raw) //预览
this.rewardImageUrlTemp = this.groupForm.rewardImageUrl = res.data.rewardImageUrl
this.groupForm.rewardImageUrl = res.data.rewardImageUrl
},
beforeAvatarUpload(file) {
const isJPG = file.type === 'image/jpeg'
......@@ -388,7 +387,7 @@ export default {
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
>
<img v-if="rewardImageUrlTemp" :src="rewardImageUrlTemp" class="avatar" />
<img v-if="groupForm.rewardImageUrl" :src="groupForm.rewardImageUrl" class="avatar" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
......
......@@ -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>
......
<script>
import {
getAllocateCustomers,
getAllocateGroups
} from '@/api/customer/dimission'
import { getAllocateCustomers, getAllocateGroups } from '@/api/customer/dimission'
export default {
name: 'AllocatedStaffDetailList',
......@@ -50,9 +47,7 @@ export default {
}
page && (this.query.pageNum = page)
this.loading = true
;(this.type === 'customer' ? getAllocateCustomers : getAllocateGroups)(
this.query
)
;(this.type === 'customer' ? getAllocateCustomers : getAllocateGroups)(this.query)
.then(({ rows, total }) => {
this.list = rows
this.total = +total
......@@ -68,40 +63,20 @@ export default {
<template>
<div class="page">
<el-table
ref="multipleTable"
:data="list"
tooltip-effect="dark"
style="width: 100%"
>
<el-table-column
v-if="type === 'customer'"
prop="customerName"
label="客户名称"
></el-table-column>
<el-table ref="multipleTable" :data="list" tooltip-effect="dark" style="width: 100%">
<el-table-column v-if="type === 'customer'" prop="customerName" label="客户名称"></el-table-column>
<el-table-column v-else prop="groupName" label="群名称"></el-table-column>
<el-table-column
:prop="type === 'customer' ? 'takeUserName' : 'newOwnerName'"
label="接替员工"
></el-table-column>
<el-table-column
prop="department"
label="接替员工所属部门"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop="allocateTime"
label="分配时间"
show-overflow-tooltip
></el-table-column>
<el-table-column :prop="type === 'customer' ? 'takeUserName' : 'newOwnerName'" label="接替员工"></el-table-column>
<el-table-column prop="department" label="接替员工所属部门" show-overflow-tooltip></el-table-column>
<el-table-column prop="allocateTime" label="分配时间" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="100">
<template slot-scope="scope">
<template slot-scope="{ row }">
<el-button
v-hasPermi="['customerManage:dimission:edit']"
@click="
$router.push({
path: 'customerDetail',
query: { id: scope.row.id }
query: { data: JSON.stringify(row) }
})
"
type="text"
......
......@@ -20,8 +20,8 @@ export default {
form: {},
// 查询参数
query: {
userId: undefined,
addWay: undefined,
codeId: undefined,
// addWay: undefined,
beginTime: undefined,
endTime: undefined
},
......@@ -30,9 +30,12 @@ export default {
}
},
created() {
let id = this.$route.query.id
id && this.getDetail(id)
// this.getList()
let id = (this.query.codeId = this.$route.query.id)
if (id) {
this.getDetail(id)
this.setTime(7)
this.getList()
}
},
mounted() {
this.clipboard = new ClipboardJS('.copy-btn')
......@@ -57,11 +60,8 @@ export default {
getDetail(id).then(({ data }) => {
this.form = data
this.loading = false
this.query.userId = data.weEmpleCodeUseScops[0].businessId
this.query.addWay = 1
this.setTime(7)
this.getList()
// this.query.userId = data.weEmpleCodeUseScops[0].businessId
// this.query.addWay = 1
})
},
/** */
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!