Commit b513a7a9 by xinla

Merge branch 'vue3-master' into xxj-23.10.16-老客拉群优化-open

2 parents ea69fb1d c563825d
...@@ -65,12 +65,15 @@ export default { ...@@ -65,12 +65,15 @@ export default {
mounted() {}, mounted() {},
methods: { methods: {
setData() { setData() {
this.list = []
if (this.initList.length) { if (this.initList.length) {
this.init.forEach((dd, index) => { this.init.forEach((dd, index) => {
let once = false
dd.weTags.forEach((ff) => { dd.weTags.forEach((ff) => {
if (this.initList.includes(ff.tagId)) { if (this.initList.includes(ff.tagId)) {
ff.show = true ff.show = true
this.list[index] = dd once || this.list.push(dd)
once = true
} }
}) })
}) })
...@@ -128,7 +131,7 @@ export default { ...@@ -128,7 +131,7 @@ export default {
<el-dialog :title="title" v-model="Pvisible" :destroy-on-close="destroyOnClose"> <el-dialog :title="title" v-model="Pvisible" :destroy-on-close="destroyOnClose">
<div v-loading="loading"> <div v-loading="loading">
<section class="label-group"> <section class="label-group">
<template v-for="item in list" :key="item.groupId"> <template v-for="(item, index) in list" :key="index">
<div class="label-group-item" v-if="item"> <div class="label-group-item" v-if="item">
<div class="label-group-item-title">{{ item.groupName }}</div> <div class="label-group-item-title">{{ item.groupName }}</div>
<div v-if="item.weTags" class="label-group-item-body"> <div v-if="item.weTags" class="label-group-item-body">
......
...@@ -20,6 +20,7 @@ export default { ...@@ -20,6 +20,7 @@ export default {
}, },
data() { data() {
return { return {
loading: true,
list: [], list: [],
listOneArray: [], listOneArray: [],
selectedList: [], selectedList: [],
...@@ -45,7 +46,9 @@ export default { ...@@ -45,7 +46,9 @@ export default {
mounted() {}, mounted() {},
methods: { methods: {
getList() { getList() {
getList({ groupTagType: this.type }).then(({ rows }) => { this.loading = true
getList({ groupTagType: this.type })
.then(({ rows }) => {
this.list = rows this.list = rows
this.listOneArray = [] this.listOneArray = []
this.list.forEach((element) => { this.list.forEach((element) => {
...@@ -54,6 +57,9 @@ export default { ...@@ -54,6 +57,9 @@ export default {
}) })
}) })
}) })
.finally(() => {
this.loading = false
})
}, },
submit() { submit() {
// 统一数据格式 // 统一数据格式
...@@ -81,7 +87,7 @@ export default { ...@@ -81,7 +87,7 @@ export default {
</script> </script>
<template> <template>
<section class="label-group"> <section class="label-group" v-loading="loading">
<div v-for="item in list" :key="item.groupId" class="label-group-item"> <div v-for="item in list" :key="item.groupId" class="label-group-item">
<div class="label-group-item-title">{{ item.groupName }}</div> <div class="label-group-item-title">{{ item.groupName }}</div>
<div v-if="item.weTags" class="label-group-item-body"> <div v-if="item.weTags" class="label-group-item-body">
......
...@@ -830,7 +830,6 @@ export default { ...@@ -830,7 +830,6 @@ export default {
if (valid) { if (valid) {
let laoding = this.$loading() let laoding = this.$loading()
const form = this.form const form = this.form
debugger
form.tagIds = form.tags?.map((item, index) => item.tagId) + '' form.tagIds = form.tags?.map((item, index) => item.tagId) + ''
form.posterJSON = this.canvas.toJSON(['customType']) form.posterJSON = this.canvas.toJSON(['customType'])
let list = form.posterJSON.objects let list = form.posterJSON.objects
......
...@@ -92,27 +92,12 @@ export default { ...@@ -92,27 +92,12 @@ export default {
}) })
return str return str
}, },
unique(arr) {
if (!Array.isArray(arr)) {
console.log('type error!')
return
}
let res = []
for (let i = 0; i < arr.length; i++) {
if (res.indexOf(arr[i]) === -1) {
res.push(arr[i])
}
}
return res
},
openDeleteDialog() { openDeleteDialog() {
let str = '' let tagIds = []
this.multipleSelection.forEach((dd) => { this.multipleSelection.forEach((dd) => {
if (dd.tagIds) { dd.tagIds && tagIds.push(...dd.tagIds)
str = str + ',' + dd.tagIds
}
}) })
this.deleteData = this.unique(str.split(',')) this.deleteData = Array.from(new Set(tagIds))
this.deleteDialog = true this.deleteDialog = true
}, },
getDeleteData(data) { getDeleteData(data) {
...@@ -576,7 +561,7 @@ export default { ...@@ -576,7 +561,7 @@ export default {
}}</template> --> }}</template> -->
</el-table-column> </el-table-column>
<el-table-column label="操作" width="200" align="center"> <el-table-column label="操作" width="220" align="center" fixed="right">
<template #default="{ row, $index }"> <template #default="{ row, $index }">
<el-button text @click="goRoute(row)">查看</el-button> <el-button text @click="goRoute(row)">查看</el-button>
<template v-if="row.isJoinBlacklist == 1"> <template v-if="row.isJoinBlacklist == 1">
......
<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: {
type: String, type: String,
default: 'customer' default: 'customer',
} },
}, },
data() { data() {
return { return {
...@@ -23,11 +23,11 @@ ...@@ -23,11 +23,11 @@
handoverUserId: undefined, handoverUserId: undefined,
oldOwner: undefined, oldOwner: undefined,
beginTime: undefined, beginTime: undefined,
endTime: undefined endTime: undefined,
}, },
loading: false, loading: false,
total: 0, total: 0,
list: [] list: [],
} }
}, },
watch: {}, watch: {},
...@@ -62,22 +62,22 @@ ...@@ -62,22 +62,22 @@
if (this.type == 'customer') { if (this.type == 'customer') {
this.$router.push({ this.$router.push({
name: window.lwConfig.CUSTOMER_DETAIL_ROUTE_NAME, name: window.lwConfig.CUSTOMER_DETAIL_ROUTE_NAME,
query: { externalUserid: row.externalUserid, userId: row.firstUserId, isDelete: true } query: { externalUserid: row.externalUserid, userId: row.firstUserId },
}) })
} else { } else {
this.$router.push({ this.$router.push({
path: window.lwConfig.GROUP_DETAIL_ROUTE_PATH, path: window.lwConfig.GROUP_DETAIL_ROUTE_PATH,
query: { chatId: row.chatId } query: { chatId: row.chatId },
}) })
} }
} },
} },
} }
</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>
...@@ -85,9 +85,7 @@ ...@@ -85,9 +85,7 @@
<el-table-column prop="allocateTime" 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"> <el-table-column label="操作" width="100">
<template #default="{ row }"> <template #default="{ row }">
<el-button v-hasPermi="['customerManage:dimission:edit']" @click="gotoRoute(row)" text> <el-button @click="gotoRoute(row)" text>查看</el-button>
查看
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -97,8 +95,7 @@ ...@@ -97,8 +95,7 @@
:total="total" :total="total"
v-model:page="query.pageNum" v-model:page="query.pageNum"
v-model:limit="query.pageSize" v-model:limit="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!