Commit ec8d20de by xinla

--no commit message

1 parent 76c0aac9
......@@ -180,7 +180,7 @@ export default {
<el-form-item label="活码客群:" prop="groups">
<el-button type="primary" @click="dialogVisibleSelectGroup = true">选择客群</el-button>
<div class="g-tip">最多选择五个客群</div>
<TagEllipsis :list="form.groups" limit="5"></TagEllipsis>
<TagEllipsis :list="form.groups" limit="5" defaultProps="groupName"></TagEllipsis>
</el-form-item>
<el-form-item label="群满自动建群:">
......@@ -251,34 +251,19 @@ export default {
v-model:visible="dialogVisibleSelectUser"
title="选择使用员工"
:defaultValues="form.users"
@success="
(data) => {
form.users = data.map((e) => ((e.id = e.userId), e))
$refs.form.validateField('users')
}
"></SelectUser>
@success="(data) => ((form.users = data), $refs.form.validateField('users'))"></SelectUser>
<!-- 选择标签弹窗 -->
<SelectTag
v-model:visible="dialogVisibleSelectTag"
:selected="form.tags"
@success="
(data) => {
form.tags = data.map((e) => ((e.id = e.tagId), e))
$refs.form.validateField('tags')
}
"></SelectTag>
@success="(data) => ((form.tags = data), $refs.form.validateField('tags'))"></SelectTag>
<!-- 选择客群弹窗 -->
<SelectGroup
v-model:visible="dialogVisibleSelectGroup"
:defaults="form.groups"
@submit="
(data) => {
form.groups = data.map((e) => ((e.id = e.chatId), (e.name = e.groupName), e))
$refs.form.validateField('groups')
}
"></SelectGroup>
@submit="(data) => ((form.groups = data), $refs.form.validateField('groups'))"></SelectGroup>
<!-- 选择二维码弹窗 -->
<!-- <SelectQrCode
......
......@@ -27,17 +27,15 @@ export function getDetail(id) {
// 统一处理数据结构
if (data.emplList && data.emplNames) {
let names = data.emplNames?.split(',')
data.users = data.emplList?.split(',').map((e, i) => ({ id: e, userId: e, name: names?.[i] }))
data.users = data.emplList?.split(',').map((e, i) => ({ userId: e, name: names?.[i] }))
}
if (data.tagList && data.tagNames) {
let names = data.tagNames?.split(',')
data.tags = data.tagList?.split(',').map((e, i) => ({ id: e, tagId: e, name: names?.[i] }))
data.tags = data.tagList?.split(',').map((e, i) => ({ tagId: e, name: names?.[i] }))
}
if (data.chatIdList && data.groupNames) {
let names = data.groupNames?.split(',')
data.groups = data.chatIdList
?.split(',')
.map((e, i) => ({ id: e, chatId: e, name: names?.[i], groupName: names?.[i] }))
data.groups = data.chatIdList?.split(',').map((e, i) => ({ chatId: e, groupName: names?.[i] }))
}
return { data }
})
......@@ -86,12 +84,12 @@ export function getDetail(id) {
*/
export function add(data) {
data = Object.assign({}, data, {
emplList: data.users?.map((e) => e.id)?.join(','),
emplList: data.users?.map((e) => e.userId)?.join(','),
emplNames: data.users?.map((e) => e.name)?.join(','),
tagList: data.tags?.map((e) => e.id)?.join(','),
tagList: data.tags?.map((e) => e.tagId)?.join(','),
tagNames: data.tags?.map((e) => e.name)?.join(','),
chatIdList: data.groups?.map((e) => e.id)?.join(','),
groupNames: data.groups?.map((e) => e.name)?.join(','),
chatIdList: data.groups?.map((e) => e.chatId)?.join(','),
groupNames: data.groups?.map((e) => e.groupName)?.join(','),
})
return request({
url: service + '/add',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!