Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-authorize
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 5984c2e8
authored
Sep 21, 2022
by
xuyl
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
更新企微接入页面
1 parent
f787ed47
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
267 additions
and
279 deletions
src/api/modules/collocation.js
src/api/modules/wechatGroup.js
src/views/collocation/index.vue
src/views/wechatGroup/addWechatGroup.vue
src/views/wechatGroup/index.vue
src/api/modules/collocation.js
View file @
5984c2e
import
{
http
,
http2
}
from
'@/main'
const
URL
=
'rop-scrm-entmicro/router'
export
default
{
}
src/api/modules/wechatGroup.js
View file @
5984c2e
...
...
@@ -23,9 +23,28 @@ const queryCrowdtree = params => {
})
}
const
customerCount
=
params
=>
{
params
.
method
=
'entmicro.api.mass.detail.customer.filter.count'
// return http({
const
batchmessagingRecord
=
params
=>
{
params
.
method
=
'entmicro.api.wechatcloudcontrol.batchmessaging.record'
return
http
({
url
:
URL
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// 企微群发查看预计群发人数
const
atchmessagingCustomercount
=
params
=>
{
params
.
method
=
'entmicro.api.wechatcloudcontrol.batchmessaging.customercount'
return
http
({
url
:
URL
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// 企微群发任务创建
const
atchmessagingCreate
=
params
=>
{
params
.
method
=
'entmicro.api.wechatcloudcontrol.batchmessaging.create'
return
http
({
url
:
URL
,
method
:
'POST'
,
...
...
@@ -37,5 +56,7 @@ const customerCount = params => {
export
default
{
querylabeltree
,
queryCrowdtree
,
customerCount
batchmessagingRecord
,
atchmessagingCustomercount
,
atchmessagingCreate
}
src/views/collocation/index.vue
View file @
5984c2e
...
...
@@ -4,10 +4,18 @@
<div
class=
"table-header"
>
<div
class=
"header-text"
>
已激活列表
</div>
<div>
<el-button
class=
"table-btn"
@
click=
"handle
Sync
"
:size=
"size"
type=
"primary"
plain
mode=
"el-button"
>
企微接入授权
</el-button>
<el-button
class=
"table-btn"
@
click=
"handle
qrCode
"
:size=
"size"
type=
"primary"
plain
mode=
"el-button"
>
企微接入授权
</el-button>
</div>
</div>
<GLTable
ref=
"activeTable"
:noDataImg=
"url"
:getListApi=
"getListApi"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
@
setTableFinishFun=
"setTableFinishFun"
></GLTable>
<GLDialog
:title=
"'授权登入二维码'"
mode=
"small"
:visible
.
sync=
"qrCodeVisible"
>
<div
class=
"qrIMGbox"
>
<img
class=
"qrIMG"
:src=
"url"
/>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"refreshQrcode"
>
刷新
</el-button>
</span>
</GLDialog>
</div>
</
template
>
...
...
@@ -18,6 +26,7 @@ export default {
data
()
{
return
{
url
,
qrCodeVisible
:
false
,
searchForm
:
{
belongWechat
:
''
,
staffName
:
''
,
...
...
@@ -70,11 +79,7 @@ export default {
listName
:
'list'
,
tableColumns
:
[
{
label
:
'员工姓名'
,
prop
:
'staffName'
},
{
label
:
'员工企微号'
,
label
:
'员工企微'
,
prop
:
'staffNum'
},
{
...
...
@@ -119,6 +124,12 @@ export default {
setTableFinishFun
()
{
//接收到的数据为空
this
.
$refs
.
activeTable
.
data
.
length
?
(
this
.
$refs
.
activeTable
.
tableHeightValues
=
''
)
:
this
.
$refs
.
activeTable
.
setTableHeightFun
()
},
handleqrCode
()
{
this
.
qrCodeVisible
=
true
},
refreshQrcode
()
{
console
.
log
(
'1111'
)
}
}
}
...
...
@@ -143,5 +154,15 @@ export default {
color
:
#5850ff
;
border
:
1px
solid
#5850ff
;
}
.qrIMGbox
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
.qrIMG
{
width
:
150px
;
height
:
150px
;
}
}
}
</
style
>
src/views/wechatGroup/addWechatGroup.vue
View file @
5984c2e
...
...
@@ -2,66 +2,51 @@
<div
class
>
<div
class=
"container"
>
<div>
<!-- 基础信息 -->
<div
class=
"title"
>
基础信息
</div>
<div
class=
"info-box"
>
<div
class=
"info-content gl-form-page"
>
<el-form
class=
"basic-form"
:model=
"basicForm"
:rules=
"basicRules"
ref=
"basicForm"
label-width=
"154px"
>
<el-form-item
label=
"群发名称:"
>
<el-input
size=
"small"
v-model=
"basicForm.sendName"
></el-input>
</el-form-item>
<el-form-item>
<label
slot=
"label"
class=
"required"
>
选择门店:
</label>
<el-button
size=
"small"
@
click=
"openStore"
>
<i
class=
"el-icon-plus"
></i>
选择门店
</el-button>
<div
v-show=
"basicForm.selectStore"
class=
"el-input-tag input-tag-wrapper"
>
<el-tag
:size=
"size"
type=
"info"
closable
:disable-transitions=
"false"
>
{{
basicForm
.
selectStore
}}
</el-tag>
</div>
<el-form-item
label=
"群发名称:"
prop=
"groupName"
>
<el-input
size=
"small"
v-model=
"basicForm.groupName"
></el-input>
</el-form-item>
<!--
<el-form-item
label=
"选择门店:"
>
-->
<!--
<el-select-->
<!-- clearable-->
<!-- filterable-->
<!-- remote-->
<!-- :remote-method="remoteMethod"-->
<!-- v-el-select-loadmore="loadmore"-->
<!-- v-model="ruleForm.merchant"-->
<!-- placeholder="请选择商户"-->
<!-- @change="selectChange"-->
<!-- >-->
<!--
<el-option-->
<!-- v-for="(x, i) in dataItems"-->
<!-- :key="i"-->
<!-- :label="x.merchantName"-->
<!-- :value="x.merchantName"-->
<!-- >
</el-option>
-->
<!--
</el-select>
-->
<!--
</el-form-item>
-->
<el-form-item
label=
"选择客户:"
prop=
"selectType"
>
<el-radio-group
@
change=
"radioChange"
v-model=
"basicForm.selectType"
>
<el-radio
:label=
"1"
>
标签筛选
</el-radio>
<el-radio
:label=
"2"
>
人群筛选
</el-radio>
</el-radio-group>
<div
class=
"filter-box"
v-show=
"basicForm.selectType == 1"
>
<div
class=
"filter-memeber"
>
<el-form
:model=
"basicForm.condition"
label-width=
"154px"
>
<el-form-item
label=
"性别:"
>
<el-radio-group
v-model=
"basicForm.condition.sex"
@
change=
"valueChange"
>
<el-radio
label
>
全部
</el-radio>
<el-radio
:label=
"1"
>
男性
</el-radio>
<el-radio
:label=
"2"
>
女性
</el-radio>
<el-radio
:label=
"0"
>
未知性别
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"所在群聊:"
>
<el-select
v-model=
"basicForm.condition.chat"
@
change=
"valueChange"
@
focus=
"groupFocus"
:size=
"size"
value-key=
"id"
multiple
collapse-tags
placeholder=
"请选择"
>
<el-option
v-for=
"item in groupList"
:key=
"item.id"
:label=
"item.groupName"
:value=
"item"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"添加客户时间:"
>
<el-date-picker
v-model=
"basicForm.condition.date"
@
change=
"valueChange"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:size=
"size"
style=
"width: 320px"
></el-date-picker>
</el-form-item>
<el-form-item
label=
"标签筛选:"
>
<el-button
size=
"small"
@
click=
"openLabel"
>
<i
class=
"el-icon-plus"
></i>
标签筛选
</el-button>
<div
v-show=
"tagging.length != 0"
:key=
"key"
class=
"el-input-tag input-tag-wrapper"
>
<span
v-for=
"(tag, idx) in tagging"
:key=
"idx"
>
<el-tag
v-for=
"(tagItem, idx1) in tag.labelList"
:key=
"idx1"
:size=
"size"
type=
"info"
closable
:disable-transitions=
"false"
@
close=
"removeTag(tag, idx1, idx)"
>
{{
tagItem
.
name
}}
</el-tag>
</span>
</div>
<!--
<div
class=
"sale-select"
v-show=
"basicForm.condition.labelList"
>
<div
:key=
"key"
class=
"el-input-tag input-tag-wrapper"
>
<el-tag
v-for=
"(tag, idx) in basicForm.condition.labelList"
:key=
"idx"
:size=
"size"
type=
"info"
closable
:disable-transitions=
"false"
@
close=
"remove(tag)"
>
{{
tag
.
staffName
}}
</el-tag>
<el-input
size=
"small"
style=
"outline: none; border: none"
></el-input>
</div>
</div>
-->
</el-form-item>
</el-form>
<div
v-show=
"basicForm.selectType == 1"
>
<div
class=
"selectedLabel"
>
<el-button
size=
"small"
@
click=
"openLabel"
>
<i
class=
"el-icon-plus"
></i>
选择标签
</el-button>
<div
class=
"selectLen"
v-show=
"taggingList.length != 0"
>
(已选
<span
class=
"num"
>
{{
taggingList
.
length
}}
</span>
个标签)
</div>
</div>
<div
v-show=
"tagging.length != 0"
:key=
"key"
class=
"el-input-tag input-tag-wrapper"
>
<span
v-for=
"(tag, idx) in tagging"
:key=
"idx"
>
<el-tag
v-for=
"(tagItem, idx1) in tag.labelList"
:key=
"idx1"
:size=
"size"
type=
"info"
closable
:disable-transitions=
"false"
@
close=
"removeTag(tag, idx1, idx)"
>
{{
tagItem
.
name
}}
</el-tag>
</span>
</div>
</div>
<div
v-show=
"basicForm.selectType == 2"
style=
"line-height: 32px; padding-bottom: 10px"
>
...
...
@@ -77,7 +62,7 @@
<div
v-show=
"basicForm.selectType == 2"
class=
"crowd-tips"
>
人群标签存在重复客户,群发人数会自动去重。若一个客户有多个成员添加,可手动在群发账号中删除多余成员。
</div>
<div
class=
"filter-footer"
>
<div
class=
"filter-number"
>
查看
预计群发人数
预计群发人数
<el-button
type=
"text"
v-show=
"isUpdate"
:loading=
"viewLoading"
@
click=
"viewMembers"
>
查看
</el-button>
<span
v-show=
"!isUpdate"
>
{{
groupNumber
}}
</span>
</div>
...
...
@@ -90,31 +75,22 @@
<el-form
:model=
"basicForm"
:rules=
"basicRules"
ref=
"groupForm"
label-width=
"154px"
>
<el-form-item
prop=
"attachmentList"
>
<label
slot=
"label"
class=
"required"
>
群发内容:
</label>
<GLEditor
ref=
"welcome"
:form=
"'customer'"
style=
"line-height: 12px;"
:btnList=
"btnList"
@
previewWord=
"previewForm"
></GLEditor>
<GLEditor
ref=
"welcome"
:form=
"'customer'"
style=
"line-height: 12px;"
:btnList=
"btnList"
></GLEditor>
<div
v-show=
"attachmentShow"
class=
"el-form-item__error"
>
{{
attachmentText
}}
</div>
</el-form-item>
<div
class=
"transform-text"
>
<!--
<div
class=
"tips-icon"
><img
src=
"@/assets/guestCustom/tips.png"
alt
/></div>
-->
<span>
每位客户每天可接收1条群发消息,超过接收上限的客户将无法再收到群发消息。
</span>
<!--
<span
v-if=
"form == 'customerGroup'"
>
每个客户群每天可接收1条群发消息,超过接收上限的客户群将无法再收到群发消息。
</span>
-->
</div>
</el-form>
</div>
</div>
<div
class=
"preview"
>
<Preview
:previewVal=
"previewVal"
></Preview>
</div>
</div>
</div>
<!--
<GLDialog
:bigTitle=
"'选择成员'"
mode=
"big"
:visible
.
sync=
"membersVisible"
@
onOk=
"handleConfirm"
@
onCancel=
"membersVisible = !membersVisible"
>
<SelectMember
ref=
"membersForm"
v-if=
"membersVisible"
:selectData=
"selectData"
></SelectMember>
</GLDialog>
-->
</div>
<GLFooter>
<el-button
type=
"primary"
v-loading=
"addLoading"
@
click=
"handleSubmit"
>
发送
</el-button>
<el-button
@
click=
"handleCancel"
>
取消
</el-button>
</GLFooter>
<SelectStore
ref=
"SelectStore"
@
crowdData=
"getCrowdData"
:storeDiaVisible=
"storeDiaVisible"
></SelectStore>
<SelectLabel
ref=
"selectLabel"
@
tagSelected=
"handleSelect"
:dialogVisible=
"dialogVisible"
></SelectLabel>
<SelectCrowd
ref=
"selectCrowd"
@
crowdData=
"getCrowdData"
:selectCrowdData=
"basicForm.crowdList"
></SelectCrowd>
</div>
...
...
@@ -128,11 +104,9 @@ const combineType = {
import
emoji
from
'@/utils/emo'
import
SelectCrowd
from
'./components/selectCrowd.vue'
import
SelectLabel
from
'./components/SelectLabel.vue'
import
SelectStore
from
'./components/selectStore.vue'
import
*
as
dayjs
from
'dayjs'
export
default
{
components
:
{
SelectStore
,
SelectLabel
,
SelectCrowd
},
...
...
@@ -160,23 +134,6 @@ export default {
callback
(
new
Error
(
'请输入群发内容'
))
}
}
const
validatorSendType
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
)
{
if
(
value
==
2
)
{
if
(
!
this
.
basicForm
.
sendTime
)
{
callback
(
new
Error
(
'请选择日期'
))
}
if
(
!
this
.
basicForm
.
sendDate
)
{
callback
(
new
Error
(
'请选择时间'
))
}
if
(
this
.
basicForm
.
sendTime
&&
this
.
basicForm
.
sendDate
)
{
callback
()
}
}
else
{
callback
()
}
}
}
return
{
// 新建按钮加载
addLoading
:
false
,
...
...
@@ -193,12 +150,6 @@ export default {
name
:
'图片'
,
funcName
:
''
,
type
:
'img'
,
// togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
// limitSize: 10, //限制图片大小
// limitNum: 2, //限制图片数量
// limitWidth: 10000, //限制单张图片宽度
// limitHeight: 10000,//限制单张图片高度
// Isdraggable: true, //图片拖拽
uploadApi
:
this
.
$apis
.
common
.
pictureUpload
},
{
...
...
@@ -291,57 +242,31 @@ export default {
templateDetailApi
:
this
.
$apis
.
welcomeword
.
templateDetail
}
],
basicForm
:
{
sendName
:
''
,
selectStore
:
''
,
selectType
:
1
,
condition
:
{
sex
:
''
,
chat
:
[]
}
},
attachmentShow
:
false
,
storeDiaVisible
:
false
,
attachmentText
:
''
,
basicRules
:
{
groupName
:[{
required
:
true
,
message
:
'请选择群发名称'
,
trigger
:
'blur'
}],
selectStore
:[{
required
:
true
,
message
:
'请选择门店'
,
trigger
:
'change'
}],
userList
:
[{
validator
:
validatorUser
,
trigger
:
'change'
}],
selectType
:
[{
required
:
true
,
message
:
'请选择客户类型'
,
trigger
:
'change'
}],
// attachmentList: [
// // { required: true, message: '请输入入群欢迎语' },
// { validator: validatorAttachment, trigger: 'change' }
// ],
sendType
:
[
{
required
:
true
,
message
:
'请选择发送时间'
,
trigger
:
'change'
},
{
validator
:
validatorSendType
,
trigger
:
'change'
}
]
},
// membersVisible: false,
basicForm
:
{
groupName
:
''
,
selectStore
:
''
,
selectType
:
1
,
},
groupList
:
[],
// key: new Date(),
dialogVisible
:
false
,
previewFlag
:
false
,
selectData
:
[],
// 是否有修改筛选成员
isUpdate
:
true
,
tagging
:
[],
groupNumber
:
0
,
dateOptions
:
{
disabledDate
(
time
)
{
let
now
=
new
Date
()
now
.
setTime
(
now
.
getTime
()
-
3600
*
1000
*
24
)
return
time
.
getTime
()
<
now
}
},
timeOptions
:
{
selectableRange
:
'00:00:00 - 23:59:59'
},
editStatus
:
false
,
firstFlag
:
true
,
footerLeft
:
40
,
footerWidth
:
500
,
viewLoading
:
false
,
isSelectCrowd
:
false
,
previewVal
:
[]
}
},
watch
:
{
...
...
@@ -370,16 +295,6 @@ export default {
this
.
boxHeight
=
clientHeight
-
200
},
methods
:
{
// openMembers() {
// this.membersVisible = !this.membersVisible
// },
// 预览回显事件
previewForm
(
val
)
{
console
.
log
(
val
)
const
value
=
this
.
$common
.
utils
.
deepClone
(
val
)
if
(
value
[
0
]
&&
!
value
[
0
].
attContent
)
value
.
splice
(
0
,
1
)
this
.
previewVal
=
value
},
// 返回
handleCancel
()
{
if
(
this
.
editStatus
||
this
.
$refs
.
welcome
.
previewList
.
length
>
0
)
{
...
...
@@ -396,51 +311,15 @@ export default {
this
.
$router
.
push
(
'/wechatGroup/index'
)
}
},
// 成员弹窗
// handleConfirm() {
// console.log(this.$refs.membersForm.innerTags)
// if (this.$refs.membersForm.innerTags.length) {
// // this.basicForm.userList = this.$refs.membersForm.innerTags
// this.$set(this.basicForm, 'userList', this.$refs.membersForm.innerTags)
// this.selectData = this.basicForm.userList
// this.openMembers()
// this.isUpdate = true
// this.editStatus = true
// } else {
// this.$message({
// type: 'error',
// message: '请选择成员'
// })
// }
// },
// 移除成员tag标签
// remove(val, idx) {
// if (this.$refs.membersForm) {
// this.$refs.membersForm.remove(val)
// this.$set(this.basicForm, 'userList', this.$refs.membersForm.innerTags)
// // this.key = new Date()
// } else {
// this.basicForm.userList.splice(idx, 1)
// this.selectData = this.basicForm.userList
// // this.key = new Date()
// }
// if (this.basicForm.selectType == 2) {
// if (!this.basicForm.userList.length) {
// this.basicForm.crowdList = []
// this.isSelectCrowd = false
// }
// }
// this.isUpdate = true
// },
// 打开标签筛选弹框
openLabel
()
{
if
(
!
this
.
basicForm
.
selectStore
)
{
this
.
$message
({
type
:
'error'
,
message
:
'请先选择门店'
})
return
}
//
if (!this.basicForm.selectStore) {
//
this.$message({
//
type: 'error',
//
message: '请先选择门店'
//
})
//
return
//
}
this
.
dialogVisible
=
!
this
.
dialogVisible
this
.
$refs
.
selectLabel
.
init
(
this
.
tagging
)
},
...
...
@@ -474,7 +353,6 @@ export default {
if
(
v
)
{
const
params
=
this
.
getSiftMembers
()
params
.
type
=
1
params
.
sendType
=
this
.
basicForm
.
sendType
const
previewList
=
this
.
$common
?
this
.
$common
.
utils
.
deepClone
(
this
.
$refs
.
welcome
.
previewList
)
:
this
.
$refs
.
welcome
.
previewList
const
attachmentList
=
previewList
.
map
(
item
=>
{
if
(
item
.
attType
==
1
)
{
...
...
@@ -495,15 +373,11 @@ export default {
return
item
})
params
.
attachmentList
=
attachmentList
if
(
params
.
sendType
==
2
)
{
params
.
sendTimeStr
=
this
.
basicForm
.
sendTime
+
' '
+
this
.
basicForm
.
sendDate
}
const
countParams
=
this
.
getSiftMembers
()
const
count
=
await
this
.
$apis
.
customerTransform
.
customerCount
(
countParams
)
console
.
log
(
count
)
if
(
count
)
{
if
(
countParams
)
{
this
.
addLoading
=
true
this
.
$apis
.
customerTransform
.
insert
(
params
).
then
(
res
=>
{
this
.
$apis
.
wechatGroup
.
atchmessagingCreate
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
'-1'
)
{
this
.
$message
({
type
:
'error'
,
...
...
@@ -552,9 +426,6 @@ export default {
})
})
this
.
taggingList
=
arr
console
.
log
(
this
.
taggingList
)
console
.
log
(
val
,
'1'
)
console
.
log
(
this
.
tagging
,
'2'
)
},
// 删除标签筛选标签
removeTag
(
tag
,
idx1
,
idx
)
{
...
...
@@ -590,10 +461,6 @@ export default {
}
this
.
key
=
new
Date
()
},
// 标签筛选选择切换
valueChange
(
val
)
{
this
.
isUpdate
=
true
},
// 获取所在群聊信息
getGroupList
()
{
if
(
this
.
basicForm
.
userList
&&
this
.
basicForm
.
userList
.
length
!=
0
)
{
...
...
@@ -614,20 +481,7 @@ export default {
selectType
:
this
.
basicForm
.
selectType
}
if
(
params
.
selectType
==
1
)
{
const
chatFlag
=
this
.
basicForm
.
condition
.
chat
&&
this
.
basicForm
.
condition
.
chat
.
length
params
.
condition
=
{
sex
:
this
.
basicForm
.
condition
.
sex
,
chatId
:
chatFlag
?
this
.
basicForm
.
condition
.
chat
.
map
(
item
=>
item
.
id
).
join
(
','
)
:
''
,
chatName
:
chatFlag
?
this
.
basicForm
.
condition
.
chat
.
map
(
item
=>
item
.
groupName
).
join
(
','
)
:
''
,
labelList
:
this
.
taggingList
,
combineType
:
combineType
.
label
}
if
(
this
.
basicForm
.
condition
.
date
)
{
let
endTime
=
new
Date
(
this
.
basicForm
.
condition
.
date
[
1
])
endTime
=
endTime
.
setDate
(
endTime
.
getDate
()
+
1
)
params
.
condition
.
sTime
=
dayjs
(
this
.
basicForm
.
condition
.
date
[
0
]).
format
(
'YYYY-MM-DD'
)
params
.
condition
.
eTime
=
dayjs
(
endTime
).
format
(
'YYYY-MM-DD'
)
}
console
.
log
(
'111'
)
}
else
if
(
params
.
selectType
==
2
)
{
params
.
crowdCondition
=
this
.
basicForm
.
crowdList
params
.
combineType
=
combineType
.
crowd
...
...
@@ -667,9 +521,8 @@ export default {
const
params
=
this
.
getSiftMembers
()
this
.
viewLoading
=
true
this
.
$apis
.
wechatGroup
.
customerC
ount
(
params
)
.
atchmessagingCustomerc
ount
(
params
)
.
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
||
res
==
0
)
{
this
.
isUpdate
=
false
this
.
groupNumber
=
res
...
...
@@ -688,36 +541,9 @@ export default {
radioChange
(
val
)
{
this
.
isSelectCrowd
=
false
this
.
isUpdate
=
true
this
.
basicForm
.
condition
=
{
sex
:
''
}
this
.
tagging
=
[]
this
.
taggingList
=
[]
},
// 发送时间change事件
changeValue
(
v
)
{
const
date
=
new
Date
(
v
).
getTime
()
if
(
date
<
Date
.
now
())
{
this
.
timeOptions
=
{
selectableRange
:
`
${
dayjs
()
.
add
(
1
,
'm'
)
.
format
(
'HH:mm'
)}
:00 - 23:59:59`
}
}
else
{
this
.
timeOptions
=
{
selectableRange
:
'00:00:00 - 23:59:59'
}
}
},
// 点击所在群聊
groupFocus
()
{
if
(
this
.
basicForm
.
condition
&&
this
.
basicForm
.
condition
.
chatId
)
{
this
.
basicForm
.
condition
.
chat
=
{}
this
.
groupList
=
[]
this
.
isUpdate
=
true
}
this
.
getGroupList
()
},
// 人群筛选弹窗
selectCrowd
()
{
if
(
!
this
.
basicForm
.
selectStore
)
{
...
...
@@ -756,11 +582,6 @@ export default {
// this.key = new Date()
// }
// },
// 打开选择门店弹框
openStore
()
{
this
.
storeDiaVisible
=
!
this
.
storeDiaVisible
this
.
$refs
.
SelectStore
.
init
()
}
}
}
</
script
>
...
...
@@ -792,21 +613,21 @@ export default {
width
:
66%
;
padding-right
:
20px
;
.filter-box
{
//
margin-left
:
120px
;
margin-bottom
:
10px
;
min-width
:
656px
;
background-color
:
#f7f7f7
;
.filter-memeber
{
padding
:
20px
20px
20px
0
;
//
border-bottom
:
1px
solid
#dcdfe6
;
.el-form
{
padding
:
0
;
}
}
}
//
.filter-box
{
//
//
margin-left
:
120px
;
//
margin-bottom
:
10px
;
//
min-width
:
656px
;
//
background-color
:
#f7f7f7
;
//
//
.filter-memeber
{
//
padding
:
20px
20px
20px
0
;
//
//
//
border-bottom
:
1px
solid
#dcdfe6
;
//
.el-form
{
//
padding
:
0
;
//
}
//
}
//
}
.filter-footer
{
display
:
flex
;
...
...
@@ -822,7 +643,7 @@ export default {
padding
:
7px
14px
;
background-color
:
#e6e9ff
;
color
:
#333
;
margin-top
:
8px
;
span
{
color
:
#5850ff
;
cursor
:
pointer
;
...
...
@@ -832,6 +653,17 @@ export default {
.basic-form
{
padding
:
32px
0
20px
20px
;
.selectedLabel{
display
:
flex
;
.selectLen{
margin-left
:
20px
;
font-size
:
14px
;
color
:
#666666
;
.num{
color
:
#5850FF
;
}
}
}
}
}
}
...
...
@@ -970,7 +802,7 @@ export default {
.required
::before
{
content
:
'*'
;
color
:
#f56c6c
;
margin-right
:
4
px
;
margin-right
:
4px
;
}
.el-loading-spinner
{
...
...
src/views/wechatGroup/index.vue
View file @
5984c2e
<
template
>
<div
class=
"container"
>
<div>
<el-button
@
click=
"addSendGroup"
:size=
"size"
type=
"primary"
mode=
"el-button"
>
新建群发
</el-button>
<div>
<div
class=
"createANewGroupBtn"
>
<el-button
@
click=
"addSendGroup"
:size=
"size"
type=
"primary"
mode=
"el-button"
>
<i
class=
"el-icon-plus"
></i>
新建群发
</el-button>
</div>
<GLCombiForm
:formObj=
"searchForm"
:rowNumber=
"1"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<GLTable
ref=
"groupTable"
:noDataImg=
"url"
:getListApi=
"getListApi"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
@
setTableFinishFun=
"setTableFinishFun"
></GLTable>
<div
class=
"container"
>
<GLCombiForm
:formObj=
"searchForm"
:rowNumber=
"1"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
>
<div
slot=
"optionBtns"
>
<div
class=
"sendRecord"
@
click=
"traceRecord"
>
发送记录
</div>
</div>
</GLCombiForm>
<GLTable
ref=
"groupTable"
:noDataImg=
"url"
:getListApi=
"getListApi"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
@
setTableFinishFun=
"setTableFinishFun"
></GLTable>
</div>
<el-drawer
size=
"40%"
title=
"发送记录"
:visible
.
sync=
"sendRecordDrawer.isVisible"
:direction=
"sendRecordDrawer.direction"
>
<div
class=
"horizon"
></div>
<div
class=
"sendRecordDrawerbox"
>
<div
v-for=
"(item, index) in sendRecordDrawer.traceFailandSuccess"
:key=
"index"
class=
"itemContent"
>
<div>
<p
class=
"title"
>
{{
item
.
title
}}
</p>
<p
class=
"num"
:style=
"
{ color: item.color }">
{{
item
.
num
}}
</p>
</div>
</div>
</div>
<GLTable
ref=
"sendRecordDrawer.ref"
:noDataImg=
"url"
:getListApi=
"sendRecordDrawer.getListApi"
:searchForm=
"sendRecordDrawer.searchForm"
:tableParams=
"sendRecordDrawer.tableParams"
:pageConf=
"sendRecordDrawer.pageConf"
></GLTable>
</el-drawer>
</div>
</
template
>
...
...
@@ -15,6 +36,45 @@ export default {
data
()
{
return
{
url
,
sendRecordDrawer
:
{
isVisible
:
false
,
direction
:
'rtl'
,
traceFailandSuccess
:
[
{
title
:
'发送成功'
,
id
:
'1'
,
num
:
22
,
color
:
'#2CCA74'
},
{
title
:
'发送失败'
,
id
:
'2'
,
num
:
4
,
color
:
'#EB4E4E '
}
],
ref
:
'sendRecordDrawerRef'
,
getListApi
:
''
,
searchForm
:
''
,
tableParams
:
{
listName
:
'list'
,
tableColumns
:
[
{
label
:
'客户'
,
prop
:
'sendName'
},
{
label
:
'发送时间'
,
prop
:
'senaStore'
},
{
label
:
'发送结果'
,
prop
:
'customerNum'
}
]
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
}
},
searchForm
:
{
sendName
:
''
,
sendTime
:
''
,
...
...
@@ -23,7 +83,7 @@ export default {
searchFormData
:
[
{
label
:
'群发名称'
,
name
:
'
send
Name'
,
name
:
'
messaging
Name'
,
type
:
'input'
,
isClear
:
true
},
...
...
@@ -35,7 +95,7 @@ export default {
},
{
label
:
'群发门店'
,
name
:
'
stor
e'
,
name
:
'
merchantNam
e'
,
type
:
'input'
,
isClear
:
true
}
...
...
@@ -45,37 +105,49 @@ export default {
tableColumns
:
[
{
label
:
'群发名称'
,
prop
:
'
send
Name'
prop
:
'
messaging
Name'
},
{
label
:
'群发门店'
,
prop
:
'
senaStore
'
prop
:
'
messagingMerchant
'
},
{
label
:
'客户数'
,
prop
:
'customer
Num
'
prop
:
'customer
Count
'
},
{
label
:
'标签/人群'
,
prop
:
'
tag
'
prop
:
'
labelCrowdName
'
},
{
label
:
'创建时间'
,
prop
:
'creatTime'
prop
:
'creat
e
Time'
},
{
label
:
'发送状态'
,
prop
:
'sendStat
us
'
prop
:
'sendStat
e
'
},
{
label
:
'
完成情况(失败/成功)
'
,
prop
:
'
finish
'
,
label
:
'
发送成功
'
,
prop
:
'
successCompletion
'
,
width
:
'200'
},
{
label
:
'发送失败'
,
prop
:
'failCompletion'
,
width
:
'200'
},
{
label
:
'操作'
,
prop
:
'optionBtns'
,
width
:
'66px'
,
addHtml
:
'optionBtns'
,
fixed
:
'right'
}
]
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
}
// getListApi: this.$apis.accountConfig.listCustomizedAgentWithPage,
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
}
,
getListApi
:
this
.
$apis
.
wechatGroup
.
batchmessagingRecord
}
},
methods
:
{
...
...
@@ -98,12 +170,18 @@ export default {
// 跳转新建群发
addSendGroup
()
{
this
.
$router
.
push
(
'/wechatGroup/addWechatGroup'
)
},
traceRecord
()
{
this
.
sendRecordDrawer
.
isVisible
=
true
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.createANewGroupBtn
{
margin-bottom
:
16px
;
}
.container
{
padding
:
20px
;
background-color
:
#fff
;
...
...
@@ -122,5 +200,32 @@ export default {
color
:
#5850ff
;
border
:
1px
solid
#5850ff
;
}
.sendRecord
{
color
:
#5850ff
;
}
}
.horizon
{
width
:
100%
;
height
:
1px
;
background
:
#e8e8ea
;
}
.sendRecordDrawerbox
{
padding
:
20px
;
display
:
flex
;
justify-content
:
space-around
;
.itemContent
{
width
:
334px
;
padding
:
8px
0
8px
20px
;
border
:
1px
solid
#e8e8ea
;
}
.title
{
color
:
#666666
;
font-size
:
14px
;
margin-bottom
:
8px
;
}
.num
{
font-size
:
20px
;
font-width
:
600
;
}
}
</
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