Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a44b6307
authored
Oct 17, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
客群活码优化
1 parent
2534d9c1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
89 deletions
vue3-lw-pc/src/views/drainageCode/group/add.vue
vue3-lw-pc/src/views/drainageCode/group/baseInfo.vue
vue3-lw-pc/src/views/drainageCode/group/list.vue
vue3-lw-pc/src/views/drainageCode/group/add.vue
View file @
a44b630
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
</el-steps>
</el-steps>
</div>
</div>
<div
class=
"g-card"
>
<div
class=
"g-card"
>
<div>
<div
v-if=
"active === 0"
>
<div
v-if=
"active === 0"
>
<BaseInfo
ref=
"baseInfo"
:groupCodeId=
"groupCodeId"
@
next=
"next"
></BaseInfo>
<BaseInfo
ref=
"baseInfo"
:groupCodeId=
"groupCodeId"
@
next=
"next"
></BaseInfo>
</div>
</div>
...
@@ -15,7 +14,7 @@
...
@@ -15,7 +14,7 @@
<GroupCode
:groupCodeId=
"groupCodeId"
:data=
"baseInfo"
></GroupCode>
<GroupCode
:groupCodeId=
"groupCodeId"
:data=
"baseInfo"
></GroupCode>
</div>
</div>
</div>
</div>
<div
class=
"ac
"
>
<div
class=
"g-footer-sticky
"
>
<template
v-if=
"active === 0"
>
<template
v-if=
"active === 0"
>
<el-button
@
click=
"$router.back()"
>
取消
</el-button>
<el-button
@
click=
"$router.back()"
>
取消
</el-button>
<el-button
type=
"primary"
v-loading=
"loading"
:disabled=
"loading"
@
click=
"handleGroupCode"
>
下一步
</el-button>
<el-button
type=
"primary"
v-loading=
"loading"
:disabled=
"loading"
@
click=
"handleGroupCode"
>
下一步
</el-button>
...
@@ -26,7 +25,6 @@
...
@@ -26,7 +25,6 @@
</
template
>
</
template
>
</div>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
...
vue3-lw-pc/src/views/drainageCode/group/baseInfo.vue
View file @
a44b630
<
template
>
<
template
>
<div>
<div>
<el-row>
<el-col
:sm=
"24"
:md=
"16"
:lg=
"14"
>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"form"
label-width=
"140px"
>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"form"
label-width=
"140px"
>
<el-row>
<el-col
:sm=
"24"
:md=
"18"
>
<el-form-item
label=
"活码名称:"
prop=
"activityName"
>
<el-form-item
label=
"活码名称:"
prop=
"activityName"
>
<el-input
<el-input
v-model=
"form.activityName"
placeholder=
"请输入名称"
show-word-limit
maxlength=
"15"
></el-input>
v-model=
"form.activityName"
placeholder=
"请输入名称"
show-word-limit
maxlength=
"15"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"活码客群:"
prop=
"chatIdList"
>
<el-form-item
label=
"活码客群:"
prop=
"chatIdList"
>
<template
v-for=
"(item, index) in groupList"
:key=
"index"
>
<el-button
type=
"primary"
@
click=
"selectGroupFn"
>
选择客群
</el-button>
<el-tag
v-if=
"item.groupName"
:key=
"index"
>
{{
item
.
groupName
}}
</el-tag>
</
template
>
<div>
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"selectGroupFn"
>
{{ '添加' }}客群
</el-button>
</div>
<div
class=
"sub-des"
>
最多选择五个客群
</div>
<div
class=
"sub-des"
>
最多选择五个客群
</div>
<TagEllipsis
:list=
"groupList"
limit=
"10"
defaultProps=
"groupName"
></TagEllipsis>
</el-form-item>
</el-form-item>
<el-form-item
label=
"客群标签:"
prop=
"tagIds"
>
<el-form-item
label=
"入群标签:"
prop=
"tagIds"
>
<
template
v-for=
"(item, index) in tagList"
:key=
"index"
>
<el-button
type=
"primary"
@
click=
"showSelectTag = true"
>
选择标签
</el-button>
<el-tag
v-if=
"item.name"
>
{{
item
.
name
}}
</el-tag>
<div
class=
"sub-des"
>
通过此群活码进群的客户自动设置以上标签
</div>
</
template
>
<TagEllipsis
:list=
"tagList"
limit=
"10"
></TagEllipsis>
<div>
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"showSelectTag = true"
>
{{ tagList.length ? '编辑' : '添加' }}标签
</el-button>
</div>
<div
class=
"sub-des"
>
设置群活码的标签
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"群满是否自动建群:"
>
<el-form-item
label=
"群满是否自动建群:"
>
<el-switch
v-model=
"form.autoCreateRoom"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
<el-switch
v-model=
"form.autoCreateRoom"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
<div
class=
"sub-des"
>
默认以第一个群的群主作为新建群的群主
</div>
<div
class=
"sub-des"
>
默认以第一个群的群主作为新建群的群主
</div>
</el-form-item>
<el-card
v-if=
"form.autoCreateRoom"
style=
"width: 600px; margin-top: 10px"
>
<el-form-item
v-if=
"form.autoCreateRoom"
label=
""
>
<el-card>
<el-form-item
label=
"群名前缀:"
prop=
"roomBaseName"
>
<el-form-item
label=
"群名前缀:"
prop=
"roomBaseName"
>
<el-input
<el-input
show-word-limit
show-word-limit
...
@@ -50,19 +30,14 @@
...
@@ -50,19 +30,14 @@
</el-form-item>
</el-form-item>
</el-card>
</el-card>
</el-form-item>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-form>
</el-col>
<SelectGroup
v-model:visible=
"showSelectModal"
:defaults=
"groupList"
@
submit=
"setSelectData"
></SelectGroup>
</el-row>
<SelectTag
v-model:visible=
"showSelectTag"
type=
"2"
:defaultValues=
"tagList"
@
success=
"getSelectTag"
></SelectTag>
<select-group
v-model:visible=
"showSelectModal"
:defaults=
"groupList"
@
submit=
"setSelectData"
></select-group>
<select-tag
v-model:visible=
"showSelectTag"
type=
"2"
:defaultValues=
"tagList"
@
success=
"getSelectTag"
></select-tag>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
add
,
update
,
getDetail
}
from
'@/api/drainageCode/group'
import
{
add
,
update
,
getDetail
}
from
'@/api/drainageCode/group'
import
SelectTag
from
'@/components/SelectTag.vue'
import
SelectGroup
from
'../components/SelectGroup.vue'
import
SelectGroup
from
'../components/SelectGroup.vue'
export
default
{
export
default
{
props
:
{
props
:
{
...
@@ -74,7 +49,6 @@ export default {
...
@@ -74,7 +49,6 @@ export default {
},
},
components
:
{
components
:
{
SelectGroup
,
SelectGroup
,
SelectTag
,
},
},
data
()
{
data
()
{
return
{
return
{
...
...
vue3-lw-pc/src/views/drainageCode/group/list.vue
View file @
a44b630
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
<el-button
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
class=
"g-card"
>
<div
class=
"g-card"
>
<div
class=
"mid-action"
>
<div
class=
"mid-action"
>
<el-button
type=
"primary"
@
click=
"$router.push('./groupAdd')"
>
新建活码
</el-button>
<el-button
type=
"primary"
@
click=
"$router.push('./groupAdd')"
>
新建活码
</el-button>
...
@@ -30,6 +31,7 @@
...
@@ -30,6 +31,7 @@
</el-button>
</el-button>
</div>
</div>
</div>
</div>
<el-table
:data=
"groupCodes"
v-loading=
"loading"
@
selection-change=
"handleSelectionChange"
>
<el-table
:data=
"groupCodes"
v-loading=
"loading"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
></el-table-column>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
></el-table-column>
<el-table-column
prop=
"activityName"
label=
"活码名称"
align=
"center"
></el-table-column>
<el-table-column
prop=
"activityName"
label=
"活码名称"
align=
"center"
></el-table-column>
...
@@ -41,9 +43,9 @@
...
@@ -41,9 +43,9 @@
</el-popover>
</el-popover>
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column
label=
"
客
群标签"
width=
"180px"
>
<el-table-column
label=
"
入
群标签"
width=
"180px"
>
<
template
#
default=
"{ row }"
>
<
template
#
default=
"{ row }"
>
<
tag-ellipsis
v-if=
"row.tags"
limit=
"2"
:list=
"row.tags.split(',')"
></tag-e
llipsis>
<
TagEllipsis
:list=
"row.tags?.split(',')"
></TagE
llipsis>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"活码客群数"
align=
"center"
width=
"120px"
prop=
"chatGroupNum"
>
<el-table-column
label=
"活码客群数"
align=
"center"
width=
"120px"
prop=
"chatGroupNum"
>
...
@@ -59,7 +61,7 @@
...
@@ -59,7 +61,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
>
...
@@ -112,15 +114,14 @@
...
@@ -112,15 +114,14 @@
@
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
text
@
click=
"handleDownload(row.id, row.activityName)"
>
下载
</el-button>
<el-button
text
@
click=
"handleDownload(row.id, row.activityName)"
>
下载
</el-button>
<el-button
text
class=
"copy-btn"
:data-clipboard-text=
"row.codeUrl"
>
复制
</el-button>
<el-button
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
text
>
<el-button
text
>
<el-icon-MoreFilled
class=
"el-icon-MoreFilled"
></el-icon-MoreFilled>
<el-icon-MoreFilled
class=
"el-icon-MoreFilled"
></el-icon-MoreFilled>
</el-button>
</el-button>
...
@@ -134,11 +135,10 @@
...
@@ -134,11 +135,10 @@
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>
...
@@ -156,14 +156,13 @@
...
@@ -156,14 +156,13 @@
: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=
"getGroupCodes"
@
pagination=
"getGroupCodes"
/>
/>
<el-dialog
v-if=
"realCodeDialog"
title=
"实际群码"
v-model=
"realCodeDialog"
append-to-body
width=
"70%"
>
<el-dialog
v-if=
"realCodeDialog"
title=
"实际群码"
v-model=
"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
v-model:visible=
"showSelectTag"
type=
"2"
:selected=
"tagList"
@
success=
"getSelectTag"
></select-tag>
<select-tag
v-model:visible=
"showSelectTag"
type=
"2"
:selected=
"tagList"
@
success=
"getSelectTag"
></select-tag>
<el-dialog
title=
"当前客群"
v-model=
"detailDialog"
append-to-body
width=
"70%"
>
<el-dialog
title=
"当前客群"
v-model=
"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=
"关联状态"
>
<el-table-column
label=
"关联状态"
>
<
template
#
default=
"{ row }"
>
<
template
#
default=
"{ row }"
>
...
@@ -176,22 +175,19 @@
...
@@ -176,22 +175,19 @@
align=
"center"
align=
"center"
prop=
"chatGroupMemberTotalNum"
prop=
"chatGroupMemberTotalNum"
min-width=
"100"
min-width=
"100"
show-overflow-tooltip
show-overflow-tooltip
></el-table-column>
></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
show-overflow-tooltip
></el-table-column>
></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
show-overflow-tooltip
></el-table-column>
></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
...
@@ -200,11 +196,10 @@
...
@@ -200,11 +196,10 @@
$router.push(
{
$router.push(
{
path: '/groupManage/customerGroupManage/group/groupDetail',
path: '/groupManage/customerGroupManage/group/groupDetail',
query: {
query: {
chatId: row.chatId
chatId: row.chatId
,
}
}
,
})
})
"
">
>
查看详情
查看详情
</el-button>
</el-button>
</
template
>
</
template
>
...
@@ -222,12 +217,12 @@
...
@@ -222,12 +217,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
{
...
@@ -235,7 +230,7 @@
...
@@ -235,7 +230,7 @@
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
activityName
:
''
,
activityName
:
''
,
tagIds
:
''
tagIds
:
''
,
},
},
tagNames
:
''
,
tagNames
:
''
,
loading
:
false
,
loading
:
false
,
...
@@ -252,7 +247,7 @@
...
@@ -252,7 +247,7 @@
tagIndex
:
1
,
tagIndex
:
1
,
tableList
:
[],
tableList
:
[],
loading
:
false
,
loading
:
false
,
detailDialog
:
false
detailDialog
:
false
,
}
}
},
},
watch
:
{
watch
:
{
...
@@ -265,12 +260,12 @@
...
@@ -265,12 +260,12 @@
}
else
{
}
else
{
;[
this
.
query
.
beginTime
,
this
.
query
.
endTime
]
=
dateRange
;[
this
.
query
.
beginTime
,
this
.
query
.
endTime
]
=
dateRange
}
}
}
},
},
},
// 如果实际群码弹出框关闭,刷新数据
// 如果实际群码弹出框关闭,刷新数据
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'
)
...
@@ -280,7 +275,7 @@
...
@@ -280,7 +275,7 @@
this
.
$store
.
setBusininessDesc
(
this
.
$store
.
setBusininessDesc
(
`
`
<div>生成永久二维码,根据规则自动切换企微客群,支持群满自动建群</div>
<div>生成永久二维码,根据规则自动切换企微客群,支持群满自动建群</div>
`
`
,
)
)
},
},
unmounted
()
{
unmounted
()
{
...
@@ -341,7 +336,7 @@
...
@@ -341,7 +336,7 @@
this
.
$confirm
(
'是否确认下载所有图片吗?'
,
'提示'
,
{
this
.
$confirm
(
'是否确认下载所有图片吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
,
})
})
.
then
(()
=>
{
.
then
(()
=>
{
return
downloadBatch
(
ids
+
''
)
return
downloadBatch
(
ids
+
''
)
...
@@ -364,7 +359,7 @@
...
@@ -364,7 +359,7 @@
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
)
...
@@ -397,7 +392,7 @@
...
@@ -397,7 +392,7 @@
this
.
$confirm
(
'确认删除当前群活码?删除操作无法撤销,请谨慎操作。'
,
'警告'
,
{
this
.
$confirm
(
'确认删除当前群活码?删除操作无法撤销,请谨慎操作。'
,
'警告'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
,
})
})
.
then
(()
=>
{
.
then
(()
=>
{
remove
(
codeId
).
then
((
res
)
=>
{
remove
(
codeId
).
then
((
res
)
=>
{
...
@@ -418,29 +413,29 @@
...
@@ -418,29 +413,29 @@
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
>
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment