Commit 3bbfdbd4 by xinla

--no commit message

1 parent 57d61e59
<script> <script>
import { getAllocateCustomers, getAllocateGroups } from '@/api/customer/dimission' import { getAllocateCustomers, getAllocateGroups } from '@/api/customer/dimission'
export default { export default {
name: 'AllocatedStaffDetailList', name: 'AllocatedStaffDetailList',
components: {}, components: {},
props: { props: {
dateRange: { dateRange: {
type: Array, type: Array,
default: () => [] default: () => [],
},
type: {
type: String,
default: 'customer'
}
},
data() {
return {
// 查询参数
query: {
pageNum: 1,
pageSize: 10,
handoverUserId: undefined,
oldOwner: undefined,
beginTime: undefined,
endTime: undefined
},
loading: false,
total: 0,
list: []
}
}, },
watch: {}, type: {
computed: {}, type: String,
created() { default: 'customer',
this.query.handoverUserId = this.$route.query.userId
this.query.oldOwner = this.$route.query.userId
this.getList()
}, },
mounted() {}, },
methods: { data() {
/** 查询 */ return {
getList(page) { // 查询参数
if (this.dateRange) { query: {
this.query.beginTime = this.dateRange[0] pageNum: 1,
this.query.endTime = this.dateRange[1] pageSize: 10,
} handoverUserId: undefined,
page && (this.query.pageNum = page) oldOwner: undefined,
this.loading = true beginTime: undefined,
;(this.type === 'customer' ? getAllocateCustomers : getAllocateGroups)(this.query) endTime: undefined,
.then(({ rows, total }) => { },
this.list = rows loading: false,
this.total = +total total: 0,
this.loading = false list: [],
})
.catch(() => {
this.loading = false
})
}
} }
} },
watch: {},
computed: {},
created() {
this.query.handoverUserId = this.$route.query.userId
this.query.oldOwner = this.$route.query.userId
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
})
},
},
}
</script> </script>
<template> <template>
<div class="page"> <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-if="type === 'customer'" prop="customerName" label="客户名称"></el-table-column>
<el-table-column v-else prop="groupName" 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="type === 'customer' ? 'takeUserName' : 'newOwnerName'" label="接替员工"></el-table-column>
...@@ -75,12 +75,11 @@ ...@@ -75,12 +75,11 @@
v-hasPermi="['customerManage:dimission:edit']" v-hasPermi="['customerManage:dimission:edit']"
@click=" @click="
$router.push({ $router.push({
path: 'customerDetail', name: 'customerDetail',
query: { externalUserid: row.externalUserid, userId: row.firstUserId, isDelete: true } query: { externalUserid: row.externalUserid, userId: row.firstUserId, isDelete: true },
}) })
" "
type="text" type="text">
>
查看 查看
</el-button> </el-button>
</template> </template>
...@@ -92,8 +91,7 @@ ...@@ -92,8 +91,7 @@
:total="total" :total="total"
:page.sync="query.pageNum" :page.sync="query.pageNum"
:limit.sync="query.pageSize" :limit.sync="query.pageSize"
@pagination="getList()" @pagination="getList()" />
/>
</div> </div>
</template> </template>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!