Commit 9f7c20a0 by 姜鹏凯

客群详情路由更新

1 parent 50150ef9
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
<div class="g-card"> <div class="g-card">
<div class="g-card-title">数据趋势</div> <div class="g-card-title">数据趋势</div>
<search-title :showScene="true" @search="getLineData"></search-title> <search-title :showScene="true" @search="getLineData"></search-title>
<chart-line style="height: 300px" :legend="legend" :xData="xdata" :series="series"></chart-line> <chart-line style="height: 300px;" :legend="legend" :xData="xdata" :series="series"></chart-line>
</div> </div>
<div class="g-card"> <div class="g-card">
<div class="g-card-title">活码客群</div> <div class="g-card-title">活码客群</div>
<el-table v-loading="loading" :data="tableList" style="width: 100%"> <el-table v-loading="loading" :data="tableList" style="width: 100%;">
<el-table-column label="客群名称" align="center" min-width="100" prop="groupName" show-overflow-tooltip /> <el-table-column label="客群名称" align="center" min-width="100" prop="groupName" show-overflow-tooltip />
<el-table-column label="群主" align="center" min-width="100" prop="groupOwner" show-overflow-tooltip /> <el-table-column label="群主" align="center" min-width="100" prop="groupOwner" show-overflow-tooltip />
<el-table-column <el-table-column
...@@ -16,19 +16,22 @@ ...@@ -16,19 +16,22 @@
align="center" align="center"
prop="chatGroupMemberTotalNum" prop="chatGroupMemberTotalNum"
min-width="100" min-width="100"
show-overflow-tooltip></el-table-column> show-overflow-tooltip
></el-table-column>
<el-table-column <el-table-column
label="进群人数" label="进群人数"
align="center" align="center"
prop="joinChatGroupTotalMemberNum" prop="joinChatGroupTotalMemberNum"
min-width="100" min-width="100"
show-overflow-tooltip></el-table-column> show-overflow-tooltip
></el-table-column>
<el-table-column <el-table-column
label="退群人数" label="退群人数"
align="center" align="center"
prop="exitChatGroupTotalMemberNum" prop="exitChatGroupTotalMemberNum"
min-width="100" min-width="100"
show-overflow-tooltip></el-table-column> show-overflow-tooltip
></el-table-column>
<el-table-column label="操作" align="center" width="180"> <el-table-column label="操作" align="center" width="180">
<template #default="{ row }"> <template #default="{ row }">
<el-button <el-button
...@@ -36,12 +39,13 @@ ...@@ -36,12 +39,13 @@
size="mini" size="mini"
@click=" @click="
$router.push({ $router.push({
path: '/groupManage/customerGroupManage/groupDetail', path: '/groupManage/customerGroupManage/group/groupDetail',
query: { query: {
chatId: row.chatId, chatId: row.chatId
}, }
}) })
"> "
>
查看详情 查看详情
</el-button> </el-button>
</template> </template>
...@@ -51,15 +55,15 @@ ...@@ -51,15 +55,15 @@
</div> </div>
</template> </template>
<script> <script>
import ChartLine from '@/components/ChartLine.vue' import ChartLine from '@/components/ChartLine.vue'
import SearchTitle from '../components/SearchTitle.vue' import SearchTitle from '../components/SearchTitle.vue'
import { getLineChartTotal, getTableTotal, getGroupDetail } from '@/api/drainageCode/group.js' import { getLineChartTotal, getTableTotal, getGroupDetail } from '@/api/drainageCode/group.js'
export default { export default {
name: 'group-analyse', name: 'group-analyse',
components: { components: {
SearchTitle, SearchTitle,
ChartLine, ChartLine
}, },
data() { data() {
return { return {
...@@ -74,39 +78,39 @@ export default { ...@@ -74,39 +78,39 @@ export default {
title: '活码客群数', title: '活码客群数',
tips: '当前群活码所有群聊数量,包括自动建立的群', tips: '当前群活码所有群聊数量,包括自动建立的群',
value: 0, value: 0,
noArrow: true, noArrow: true
}, },
{ {
title: '群总人数', title: '群总人数',
tips: '当前群活码全部群的总人数(含员工及重复)', tips: '当前群活码全部群的总人数(含员工及重复)',
value: 0, value: 0,
title1: '较昨日', title1: '较昨日',
value1: 0, value1: 0
}, },
{ {
title: '进群人数', title: '进群人数',
tips: '通过当前群活码进群的人数(去重)', tips: '通过当前群活码进群的人数(去重)',
value: 0, value: 0,
title1: '较昨日', title1: '较昨日',
value1: 0, value1: 0
}, },
{ {
title: '退群人数', title: '退群人数',
tips: '通过当前群活码进群后退群的人数(去重)', tips: '通过当前群活码进群后退群的人数(去重)',
value: 0, value: 0,
title1: '较昨日', title1: '较昨日',
value1: 0, value1: 0
}, }
], ],
total: 0, total: 0,
query: { query: {
id: '', id: ''
}, },
tableList: [], tableList: [],
loading: false, loading: false,
searchData: {}, searchData: {},
bar1: [], bar1: [],
bar2: [], bar2: []
} }
}, },
methods: { methods: {
...@@ -150,14 +154,14 @@ export default { ...@@ -150,14 +154,14 @@ export default {
this.tableList = res.data this.tableList = res.data
this.loading = false this.loading = false
}) })
}, }
}, },
created() { created() {
this.id = this.$route.query.id this.id = this.$route.query.id
this.groupId = this.$route.query.groupId this.groupId = this.$route.query.groupId
this.getCardData() this.getCardData()
this.getTableFn() this.getTableFn()
}, }
} }
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</el-popover> </el-popover>
</template> </template>
<template #default="{ row }"> <template #default="{ row }">
<a style="color: var(--color); text-decoration: underline" @click="getDetail(row.id)"> <a style="color: var(--color); text-decoration: underline;" @click="getDetail(row.id)">
{{ row.chatGroupNum }} {{ row.chatGroupNum }}
</a> </a>
</template> </template>
...@@ -107,14 +107,15 @@ ...@@ -107,14 +107,15 @@
@click=" @click="
$router.push({ $router.push({
path: 'analyse', path: 'analyse',
query: { id: row.state, groupId: row.id }, query: { id: row.state, groupId: row.id }
}) })
"> "
>
统计 统计
</el-button> </el-button>
<el-button type="text" @click="handleDownload(row.id, row.activityName)">下载</el-button> <el-button type="text" @click="handleDownload(row.id, row.activityName)">下载</el-button>
<el-button type="text" class="copy-btn" :data-clipboard-text="row.codeUrl">复制</el-button> <el-button type="text" class="copy-btn" :data-clipboard-text="row.codeUrl">复制</el-button>
<el-dropdown style="margin-left: 10px"> <el-dropdown style="margin-left: 10px;">
<el-button type="text"> <el-button type="text">
<i class="el-icon-more"></i> <i class="el-icon-more"></i>
</el-button> </el-button>
...@@ -128,10 +129,11 @@ ...@@ -128,10 +129,11 @@
path: 'groupAdd', path: 'groupAdd',
query: { query: {
groupCodeId: row.id, groupCodeId: row.id,
obj: encodeURIComponent(JSON.stringify(row)), obj: encodeURIComponent(JSON.stringify(row))
}, }
}) })
"> "
>
编辑 编辑
</el-button> </el-button>
</el-dropdown-item> </el-dropdown-item>
...@@ -148,13 +150,14 @@ ...@@ -148,13 +150,14 @@
:total="total" :total="total"
:page.sync="query.pageNum" :page.sync="query.pageNum"
:limit.sync="query.pageSize" :limit.sync="query.pageSize"
@pagination="getGroupCodes" /> @pagination="getGroupCodes"
/>
<el-dialog v-if="realCodeDialog" title="实际群码" :visible.sync="realCodeDialog" append-to-body width="70%"> <el-dialog v-if="realCodeDialog" title="实际群码" :visible.sync="realCodeDialog" append-to-body width="70%">
<RealCode ref="realCode" :groupCodeId="openGroupCodeId" :status="openGroupCodeStatus"></RealCode> <RealCode ref="realCode" :groupCodeId="openGroupCodeId" :status="openGroupCodeStatus"></RealCode>
</el-dialog> </el-dialog>
<select-tag :visible.sync="showSelectTag" type="2" :selected="tagList" @success="getSelectTag"></select-tag> <select-tag :visible.sync="showSelectTag" type="2" :selected="tagList" @success="getSelectTag"></select-tag>
<el-dialog title="当前客群" :visible.sync="detailDialog" append-to-body width="70%"> <el-dialog title="当前客群" :visible.sync="detailDialog" append-to-body width="70%">
<el-table v-loading="loading" :data="tableList" style="width: 100%"> <el-table v-loading="loading" :data="tableList" style="width: 100%;">
<el-table-column label="客群名称" align="center" min-width="100" prop="groupName" show-overflow-tooltip /> <el-table-column label="客群名称" align="center" min-width="100" prop="groupName" show-overflow-tooltip />
<el-table-column label="群主" align="center" min-width="100" prop="groupOwner" show-overflow-tooltip /> <el-table-column label="群主" align="center" min-width="100" prop="groupOwner" show-overflow-tooltip />
<el-table-column <el-table-column
...@@ -162,19 +165,22 @@ ...@@ -162,19 +165,22 @@
align="center" align="center"
prop="chatGroupMemberTotalNum" prop="chatGroupMemberTotalNum"
min-width="100" min-width="100"
show-overflow-tooltip></el-table-column> show-overflow-tooltip
></el-table-column>
<el-table-column <el-table-column
label="进群人数" label="进群人数"
align="center" align="center"
prop="joinChatGroupTotalMemberNum" prop="joinChatGroupTotalMemberNum"
min-width="100" min-width="100"
show-overflow-tooltip></el-table-column> show-overflow-tooltip
></el-table-column>
<el-table-column <el-table-column
label="退群人数" label="退群人数"
align="center" align="center"
prop="exitChatGroupTotalMemberNum" prop="exitChatGroupTotalMemberNum"
min-width="100" min-width="100"
show-overflow-tooltip></el-table-column> show-overflow-tooltip
></el-table-column>
<el-table-column label="操作" align="center" width="180"> <el-table-column label="操作" align="center" width="180">
<template #default="{ row }"> <template #default="{ row }">
<el-button <el-button
...@@ -182,12 +188,13 @@ ...@@ -182,12 +188,13 @@
size="mini" size="mini"
@click=" @click="
$router.push({ $router.push({
path: '/groupManage/customerGroupManage/groupDetail', path: '/groupManage/customerGroupManage/group/groupDetail',
query: { query: {
chatId: row.chatId, chatId: row.chatId
}, }
}) })
"> "
>
查看详情 查看详情
</el-button> </el-button>
</template> </template>
...@@ -203,12 +210,12 @@ ...@@ -203,12 +210,12 @@
</template> </template>
<script> <script>
import RealCode from './realCode' import RealCode from './realCode'
import { getList, remove, downloadBatch, download, getTableTotal } from '@/api/drainageCode/group' import { getList, remove, downloadBatch, download, getTableTotal } from '@/api/drainageCode/group'
import ShowTag from '@/components/common/ShowTag.vue' import ShowTag from '@/components/common/ShowTag.vue'
import SelectTag from '@/components/SelectTag.vue' import SelectTag from '@/components/SelectTag.vue'
export default { export default {
components: { RealCode, ShowTag, SelectTag }, components: { RealCode, ShowTag, SelectTag },
data() { data() {
return { return {
...@@ -216,7 +223,7 @@ export default { ...@@ -216,7 +223,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
activityName: '', activityName: '',
tagIds: '', tagIds: ''
}, },
tagNames: '', tagNames: '',
loading: false, loading: false,
...@@ -233,7 +240,7 @@ export default { ...@@ -233,7 +240,7 @@ export default {
tagIndex: 1, tagIndex: 1,
tableList: [], tableList: [],
loading: false, loading: false,
detailDialog: false, detailDialog: false
} }
}, },
watch: { watch: {
...@@ -248,7 +255,7 @@ export default { ...@@ -248,7 +255,7 @@ export default {
// 如果实际群码弹出框关闭,刷新数据 // 如果实际群码弹出框关闭,刷新数据
realCodeDialog(val) { realCodeDialog(val) {
if (val === false) this.getGroupCodes() if (val === false) this.getGroupCodes()
}, }
}, },
mounted() { mounted() {
this.clipboard = new this.ClipboardJS('.copy-btn') this.clipboard = new this.ClipboardJS('.copy-btn')
...@@ -259,7 +266,7 @@ export default { ...@@ -259,7 +266,7 @@ export default {
'app/setBusininessDesc', 'app/setBusininessDesc',
` `
<div>生成永久二维码,根据规则自动切换企微客群,支持群满自动建群</div> <div>生成永久二维码,根据规则自动切换企微客群,支持群满自动建群</div>
`, `
) )
}, },
destroyed() { destroyed() {
...@@ -320,7 +327,7 @@ export default { ...@@ -320,7 +327,7 @@ export default {
this.$confirm('是否确认下载所有图片吗?', '提示', { this.$confirm('是否确认下载所有图片吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
return downloadBatch(ids + '') return downloadBatch(ids + '')
...@@ -343,7 +350,7 @@ export default { ...@@ -343,7 +350,7 @@ export default {
this.$confirm('确认删除当前群活码?删除操作无法撤销,请谨慎操作。', '警告', { this.$confirm('确认删除当前群活码?删除操作无法撤销,请谨慎操作。', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
const ids = this.multiGroupCode.map((group) => group.id) const ids = this.multiGroupCode.map((group) => group.id)
...@@ -376,7 +383,7 @@ export default { ...@@ -376,7 +383,7 @@ export default {
this.$confirm('确认删除当前群活码?删除操作无法撤销,请谨慎操作。', '警告', { this.$confirm('确认删除当前群活码?删除操作无法撤销,请谨慎操作。', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
remove(codeId).then((res) => { remove(codeId).then((res) => {
...@@ -397,29 +404,29 @@ export default { ...@@ -397,29 +404,29 @@ export default {
this.openGroupCodeId = groupCodeId this.openGroupCodeId = groupCodeId
this.openGroupCodeStatus = status this.openGroupCodeStatus = status
this.realCodeDialog = true this.realCodeDialog = true
}, }
}, }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.overflow-ellipsis { .overflow-ellipsis {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.table-desc { .table-desc {
max-width: 150px; max-width: 150px;
} }
.code-image { .code-image {
width: 200px; width: 200px;
height: 200px; height: 200px;
} }
.code-image--small { .code-image--small {
width: 50px; width: 50px;
height: 50px; height: 50px;
} }
.expire-icon { .expire-icon {
color: red; color: red;
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!