Commit 0fe325de by xinla

离职分配客户点击详情问题

1 parent 367192ea
......@@ -830,7 +830,6 @@ export default {
if (valid) {
let laoding = this.$loading()
const form = this.form
debugger
form.tagIds = form.tags?.map((item, index) => item.tagId) + ''
form.posterJSON = this.canvas.toJSON(['customType'])
let list = form.posterJSON.objects
......
<script>
import { getAllocateCustomers, getAllocateGroups } from '@/api/customer/dimission'
import { getAllocateCustomers, getAllocateGroups } from '@/api/customer/dimission'
export default {
name: 'AllocatedStaffDetailList',
components: {},
props: {
dateRange: {
type: Array,
default: () => []
export default {
name: 'AllocatedStaffDetailList',
components: {},
props: {
dateRange: {
type: Array,
default: () => [],
},
type: {
type: String,
default: 'customer',
},
},
data() {
return {
// 查询参数
query: {
pageNum: 1,
pageSize: 10,
handoverUserId: undefined,
oldOwner: undefined,
beginTime: undefined,
endTime: undefined,
},
type: {
type: String,
default: 'customer'
loading: false,
total: 0,
list: [],
}
},
watch: {},
computed: {},
created() {
this.query.handoverUserId = this.$route.query.userId
this.query.oldOwner = this.$route.query.userId
this.query.leaveUserId = this.$route.query.leaveUserId
this.getList()
},
mounted() {},
methods: {
/** 查询 */
getList(page) {
if (this.dateRange) {
this.query.beginTime = this.dateRange[0]
this.query.endTime = this.dateRange[1]
}
page && (this.query.pageNum = page)
this.loading = true
;(this.type === 'customer' ? getAllocateCustomers : getAllocateGroups)(this.query)
.then(({ rows, total }) => {
this.list = rows
this.total = +total
this.loading = false
})
.catch(() => {
this.loading = false
})
},
data() {
return {
// 查询参数
query: {
pageNum: 1,
pageSize: 10,
handoverUserId: undefined,
oldOwner: undefined,
beginTime: undefined,
endTime: undefined
},
loading: false,
total: 0,
list: []
gotoRoute(row) {
if (this.type == 'customer') {
this.$router.push({
name: window.lwConfig.CUSTOMER_DETAIL_ROUTE_NAME,
query: { externalUserid: row.externalUserid, userId: row.firstUserId },
})
} else {
this.$router.push({
path: window.lwConfig.GROUP_DETAIL_ROUTE_PATH,
query: { chatId: row.chatId },
})
}
},
watch: {},
computed: {},
created() {
this.query.handoverUserId = this.$route.query.userId
this.query.oldOwner = this.$route.query.userId
this.query.leaveUserId = this.$route.query.leaveUserId
this.getList()
},
mounted() {},
methods: {
/** 查询 */
getList(page) {
if (this.dateRange) {
this.query.beginTime = this.dateRange[0]
this.query.endTime = this.dateRange[1]
}
page && (this.query.pageNum = page)
this.loading = true
;(this.type === 'customer' ? getAllocateCustomers : getAllocateGroups)(this.query)
.then(({ rows, total }) => {
this.list = rows
this.total = +total
this.loading = false
})
.catch(() => {
this.loading = false
})
},
gotoRoute(row) {
if (this.type == 'customer') {
this.$router.push({
name: window.lwConfig.CUSTOMER_DETAIL_ROUTE_NAME,
query: { externalUserid: row.externalUserid, userId: row.firstUserId, isDelete: true }
})
} else {
this.$router.push({
path: window.lwConfig.GROUP_DETAIL_ROUTE_PATH,
query: { chatId: row.chatId }
})
}
}
}
}
},
}
</script>
<template>
<div class="page">
<el-table ref="multipleTable" :data="list" tooltip-effect="dark" style="width: 100%;">
<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>
......@@ -85,9 +85,7 @@
<el-table-column prop="allocateTime" label="分配时间" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="100">
<template #default="{ row }">
<el-button v-hasPermi="['customerManage:dimission:edit']" @click="gotoRoute(row)" text>
查看
</el-button>
<el-button @click="gotoRoute(row)" text>查看</el-button>
</template>
</el-table-column>
</el-table>
......@@ -97,8 +95,7 @@
:total="total"
v-model:page="query.pageNum"
v-model:limit="query.pageSize"
@pagination="getList()"
/>
@pagination="getList()" />
</div>
</template>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!