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 3104fa2e
authored
Sep 26, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'xuyl_dev_v2.11.0' into 'v2.11.0'
Xuyl dev v2.11.0 See merge request
!20
2 parents
5f7b3e4e
1c148811
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
604 additions
and
309 deletions
src/api/modules/collocation.js
src/api/modules/wechatGroup.js
src/views/collocation/index.vue
src/views/wechatGroup/addWechatGroup.vue
src/views/wechatGroup/components/searchDropDown/api.js
src/views/wechatGroup/components/searchDropDown/index.vue
src/views/wechatGroup/index.vue
src/api/modules/collocation.js
View file @
3104fa2
import
{
http
,
http2
}
from
'@/main'
import
{
http
,
http2
}
from
'@/main'
const
URL
=
'rop-scrm-entmicro/router'
// 获取验证码
const
getLoginQcCode
=
params
=>
{
params
.
method
=
'entmicro.api.wechatcloudcontrol.cloudconlogin.getLoginQcCode'
return
http
({
url
:
'rop-scrm-entmicro/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// 验证二维码是否失效
const
getQcCodeDetail
=
params
=>
{
params
.
method
=
'entmicro.api.wechatcloudcontrol.cloudconlogin.getQcCodeDetail'
return
http
({
url
:
'rop-scrm-entmicro/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
wechatDepositList
=
params
=>
{
params
.
method
=
'entmicro.api.wechatcloudcontrol.cloudconlogin.wechatDepositList'
return
http
({
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
export
default
{
getLoginQcCode
,
getQcCodeDetail
,
wechatDepositList
}
}
src/api/modules/wechatGroup.js
View file @
3104fa2
...
@@ -33,7 +33,7 @@ const batchmessagingRecord = params => {
...
@@ -33,7 +33,7 @@ const batchmessagingRecord = params => {
})
})
}
}
// 企微群发查看预计群发人数
// 企微群发查看预计群发人数
const
atchmessagingCustomercount
=
params
=>
{
const
b
atchmessagingCustomercount
=
params
=>
{
params
.
method
=
'entmicro.api.wechatcloudcontrol.batchmessaging.customercount'
params
.
method
=
'entmicro.api.wechatcloudcontrol.batchmessaging.customercount'
return
http
({
return
http
({
url
:
URL
,
url
:
URL
,
...
@@ -49,14 +49,37 @@ const atchmessagingCreate = params => {
...
@@ -49,14 +49,37 @@ const atchmessagingCreate = params => {
url
:
URL
,
url
:
URL
,
method
:
'POST'
,
method
:
'POST'
,
data
:
params
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
const
getStoreList
=
params
=>
{
params
.
method
=
'entmicro.api.wechatcloudcontrol.batchmessaging.create.merchant'
return
http
({
url
:
URL
,
method
:
'POST'
,
data
:
params
,
sign
:
true
sign
:
true
})
})
}
}
const
recordSend
=
params
=>
{
params
.
method
=
'entmicro.api.wechatcloudcontrol.batchmessaging.record.send'
return
http
({
url
:
URL
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
export
default
{
querylabeltree
,
querylabeltree
,
queryCrowdtree
,
queryCrowdtree
,
batchmessagingRecord
,
batchmessagingRecord
,
atchmessagingCustomercount
,
batchmessagingCustomercount
,
atchmessagingCreate
atchmessagingCreate
,
getStoreList
,
recordSend
}
}
src/views/collocation/index.vue
View file @
3104fa2
...
@@ -7,14 +7,28 @@
...
@@ -7,14 +7,28 @@
<el-button
class=
"table-btn"
@
click=
"handleqrCode"
:size=
"size"
type=
"primary"
plain
mode=
"el-button"
>
企微接入授权
</el-button>
<el-button
class=
"table-btn"
@
click=
"handleqrCode"
:size=
"size"
type=
"primary"
plain
mode=
"el-button"
>
企微接入授权
</el-button>
</div>
</div>
</div>
</div>
<GLTable
ref=
"activeTable"
:noDataImg=
"url"
:getListApi=
"getListApi"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
@
setTableFinishFun=
"setTableFinishFun"
></GLTable>
<GLTable
ref=
"activeTable"
:noDataImg=
"url"
:getListApi=
"getListApi"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
slot=
"staffName"
slot-scope=
"scope"
>
<div
class=
"staffName"
>
<span>
{{
scope
.
scope
.
staffName
}}
</span>
<span
class=
"entmicroName"
v-if=
"scope.scope.entmicroName"
>
@
{{
scope
.
scope
.
entmicroName
}}
</span>
</div>
</div>
<div
slot=
"loginStatus"
slot-scope=
"scope"
>
<div
class=
"loginStatus"
v-if=
"scope.scope.loginStatus"
>
<span
class=
"cycle"
:style=
"
{ background: scope.scope.loginStatus == '1' ? '#2CCA74' : scope.scope.loginStatus == '0' ? '#999999' : '' }">
</span>
{{
scope
.
scope
.
loginStatus
==
'1'
?
'在线'
:
scope
.
scope
.
loginStatus
==
'0'
?
'离线'
:
''
}}
</div>
<div
v-else
>
--
</div>
</div>
</GLTable>
<GLDialog
:title=
"'授权登入二维码'"
mode=
"small"
:visible
.
sync=
"qrCodeVisible"
>
<GLDialog
:title=
"'授权登入二维码'"
mode=
"small"
:visible
.
sync=
"qrCodeVisible"
>
<div
class=
"qrIMGbox"
>
<div
v-loading=
"addLoading"
class=
"qrIMGbox"
>
<img
class=
"qrIMG"
:src=
"
u
rl"
/>
<img
class=
"qrIMG"
:src=
"
qrcodeU
rl"
/>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"refreshQrcode"
>
刷新
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"refreshQrcode"
>
刷新
</el-button>
</span>
</span>
</GLDialog>
</GLDialog>
</div>
</div>
</
template
>
</
template
>
...
@@ -26,17 +40,16 @@ export default {
...
@@ -26,17 +40,16 @@ export default {
data
()
{
data
()
{
return
{
return
{
url
,
url
,
verifyQRCodeFailsToOpen
:
false
,
addLoading
:
false
,
qrcodeUrl
:
''
,
qrCodeVisible
:
false
,
qrCodeVisible
:
false
,
searchForm
:
{
qrcodeId
:
''
,
belongWechat
:
''
,
searchForm
:
{},
staffName
:
''
,
telphone
:
''
,
status
:
''
},
searchFormData
:
[
searchFormData
:
[
{
{
label
:
'所属企微'
,
label
:
'所属企微'
,
name
:
'
belongWechat
'
,
name
:
'
entmicroName
'
,
type
:
'input'
,
type
:
'input'
,
isClear
:
true
isClear
:
true
},
},
...
@@ -48,13 +61,13 @@ export default {
...
@@ -48,13 +61,13 @@ export default {
},
},
{
{
label
:
'手机号码'
,
label
:
'手机号码'
,
name
:
'
telp
hone'
,
name
:
'
staffP
hone'
,
type
:
'input'
,
type
:
'input'
,
isClear
:
true
isClear
:
true
},
},
{
{
label
:
'状态'
,
label
:
'状态'
,
name
:
'
s
tatus'
,
name
:
'
loginS
tatus'
,
type
:
'select'
,
type
:
'select'
,
optionList
:
[
optionList
:
[
{
{
...
@@ -76,36 +89,34 @@ export default {
...
@@ -76,36 +89,34 @@ export default {
}
}
],
],
tableParams
:
{
tableParams
:
{
listName
:
'
list
'
,
listName
:
'
data
'
,
tableColumns
:
[
tableColumns
:
[
{
{
label
:
'员工企微'
,
label
:
'员工企微'
,
prop
:
'staffNum'
prop
:
'staffName'
,
addHtml
:
'staffName'
},
},
{
{
label
:
'手机号码'
,
label
:
'手机号码'
,
prop
:
'
telp
hone'
prop
:
'
staffP
hone'
},
},
{
{
label
:
'所属门店'
,
label
:
'所属门店'
,
prop
:
'belongStore'
prop
:
'merchantName'
},
{
label
:
'所属企微'
,
prop
:
'belongWechat'
},
},
{
{
label
:
'最后同步时间'
,
label
:
'最后同步时间'
,
prop
:
'
t
ime'
prop
:
'
lastLoginT
ime'
},
},
{
{
label
:
'状态'
,
label
:
'状态'
,
prop
:
'status'
prop
:
'loginStatus'
,
addHtml
:
'loginStatus'
}
}
]
]
},
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'
total'
}
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'
count'
},
// getListApi: this.$apis.accountConfig.listCustomizedAgentWithPage,
getListApi
:
this
.
$apis
.
collocation
.
wechatDepositList
}
}
},
},
methods
:
{
methods
:
{
...
@@ -114,22 +125,59 @@ export default {
...
@@ -114,22 +125,59 @@ export default {
},
},
// 重置搜索框搜索
// 重置搜索框搜索
handleReset
()
{
handleReset
()
{
this
.
searchForm
=
{
this
.
searchForm
=
{}
isBuyPermit
:
''
,
merchantId
:
''
,
merchantName
:
''
}
this
.
handleSearch
()
this
.
handleSearch
()
},
},
setTableFinishFun
()
{
setTableFinishFun
()
{
//接收到的数据为空
//接收到的数据为空
this
.
$refs
.
activeTable
.
data
.
length
?
(
this
.
$refs
.
activeTable
.
tableHeightValues
=
''
)
:
this
.
$refs
.
activeTable
.
setTableHeightFun
()
this
.
$refs
.
activeTable
.
data
.
length
?
(
this
.
$refs
.
activeTable
.
tableHeightValues
=
''
)
:
this
.
$refs
.
activeTable
.
setTableHeightFun
()
},
},
handleqrCode
()
{
async
handleqrCode
()
{
this
.
addLoading
=
true
this
.
qrCodeVisible
=
true
this
.
qrCodeVisible
=
true
await
this
.
$apis
.
collocation
.
getLoginQcCode
({})
.
then
(
res
=>
{
this
.
addLoading
=
false
;(
this
.
verifyQRCodeFailsToOpen
=
true
),
(
this
.
qrcodeUrl
=
`data:image/png;base64,
${
res
.
qcCodeUrl
}
`
)
this
.
qrcodeId
=
res
.
id
})
.
catch
(
err
=>
{
this
.
qrCodeVisible
=
false
})
},
verifyQRCodeIsInvalid
()
{
this
.
qrCodeInterval
=
setInterval
(()
=>
{
this
.
$apis
.
collocation
.
getQcCodeDetail
({
id
:
this
.
qrcodeId
}).
then
(
res
=>
{
if
(
res
==
true
)
{
this
.
$message
({
type
:
'error'
,
message
:
'二维码已失效,请刷新'
})
this
.
verifyQRCodeFailsToOpen
=
false
clearInterval
(
this
.
qrCodeInterval
)
return
}
})
},
3000000
)
},
},
refreshQrcode
()
{
refreshQrcode
()
{
console
.
log
(
'1111'
)
this
.
handleqrCode
()
}
},
computed
:
{
listenChange
()
{
const
{
verifyQRCodeFailsToOpen
,
qrCodeVisible
}
=
this
return
{
verifyQRCodeFailsToOpen
,
qrCodeVisible
}
}
},
watch
:
{
listenChange
(
val
)
{
if
(
val
.
qrCodeVisible
==
true
&&
val
.
verifyQRCodeFailsToOpen
==
true
)
{
this
.
verifyQRCodeIsInvalid
()
}
else
{
clearInterval
(
this
.
qrCodeInterval
)
}
}
}
}
}
}
}
...
@@ -154,7 +202,7 @@ export default {
...
@@ -154,7 +202,7 @@ export default {
color
:
#5850ff
;
color
:
#5850ff
;
border
:
1px
solid
#5850ff
;
border
:
1px
solid
#5850ff
;
}
}
.qrIMGbox
{
.qrIMGbox
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
...
@@ -163,6 +211,24 @@ export default {
...
@@ -163,6 +211,24 @@ export default {
height
:
150px
;
height
:
150px
;
}
}
}
}
/
deep
/
.loginStatus
{
display
:
flex
;
align-items
:
center
;
.cycle
{
margin-right
:
8px
;
width
:
6px
;
height
:
6px
;
display
:
inline-block
;
border-radius
:
50%
;
}
}
.staffName
{
display
:
flex
;
align-items
:
center
;
.entmicroName
{
font-size
:
12px
;
color
:
#fb8f28
;
}
}
}
}
</
style
>
</
style
>
src/views/wechatGroup/addWechatGroup.vue
View file @
3104fa2
...
@@ -9,25 +9,12 @@
...
@@ -9,25 +9,12 @@
<el-form-item
label=
"群发名称:"
prop=
"groupName"
>
<el-form-item
label=
"群发名称:"
prop=
"groupName"
>
<el-input
size=
"small"
v-model=
"basicForm.groupName"
></el-input>
<el-input
size=
"small"
v-model=
"basicForm.groupName"
></el-input>
</el-form-item>
</el-form-item>
<!--
<el-form-item
label=
"选择门店:"
>
-->
<el-form-item
label=
"选择门店:"
prop=
"selectStore"
>
<!--
<el-select-->
<!--
<SearchDropDown
:label=
"'msgMerchantName'"
:value=
"'msgMerchantId'"
></SearchDropDown>
-->
<!-- clearable-->
<el-select
ref=
"selectLabel"
clearable
filterable
remote
:remote-method=
"remoteMethod"
v-el-select-loadmore=
"loadmore"
v-model=
"basicForm.selectStore"
placeholder=
"请选择门店"
@
change=
"selectChange"
@
clear=
"clearDrop"
>
<!-- filterable-->
<el-option
v-for=
"(item, i) in dataItems"
:key=
"i"
:label=
"item.msgMerchantName"
:value=
"item.msgMerchantId"
></el-option>
<!-- remote-->
</el-select>
<!-- :remote-method="remoteMethod"-->
</el-form-item>
<!-- 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-form-item
label=
"选择客户:"
prop=
"selectType"
>
<el-radio-group
@
change=
"radioChange"
v-model=
"basicForm.selectType"
>
<el-radio-group
@
change=
"radioChange"
v-model=
"basicForm.selectType"
>
<el-radio
:label=
"1"
>
标签筛选
</el-radio>
<el-radio
:label=
"1"
>
标签筛选
</el-radio>
...
@@ -39,9 +26,11 @@
...
@@ -39,9 +26,11 @@
<i
class=
"el-icon-plus"
></i>
<i
class=
"el-icon-plus"
></i>
选择标签
选择标签
</el-button>
</el-button>
<div
class=
"selectLen"
v-show=
"taggingList.length != 0"
>
(已选
<div
class=
"selectLen"
v-show=
"taggingList.length != 0"
>
<span
class=
"num"
>
{{
taggingList
.
length
}}
</span>
(已选
个标签)
</div>
<span
class=
"num"
>
{{
taggingList
.
length
}}
</span>
个标签)
</div>
</div>
</div>
<div
v-show=
"tagging.length != 0"
:key=
"key"
class=
"el-input-tag input-tag-wrapper"
>
<div
v-show=
"tagging.length != 0"
:key=
"key"
class=
"el-input-tag input-tag-wrapper"
>
<span
v-for=
"(tag, idx) in tagging"
:key=
"idx"
>
<span
v-for=
"(tag, idx) in tagging"
:key=
"idx"
>
...
@@ -70,17 +59,13 @@
...
@@ -70,17 +59,13 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<!-- 编辑入群欢迎语 -->
<!-- 编辑入群欢迎语 -->
<div
class=
"title"
>
编辑群发内容
</div>
<div
class=
"group-content"
>
<div
class=
"group-content"
>
<el-form
:model=
"basicForm"
:rules=
"basicRules"
ref=
"groupForm"
label-width=
"154px"
>
<el-form
:model=
"basicForm"
:rules=
"basicRules"
ref=
"groupForm"
label-width=
"154px"
>
<el-form-item
prop=
"
attachm
entList"
>
<el-form-item
prop=
"
cont
entList"
>
<label
slot=
"label"
class=
"required"
>
群发内容:
</label>
<label
slot=
"label"
class=
"required"
>
群发内容:
</label>
<GLEditor
ref=
"welcome"
:form=
"'customer'"
style=
"line-height: 12px;"
:btnList=
"btnList"
></GLEditor>
<GLEditor
ref=
"welcome"
:form=
"'customer'"
style=
"line-height: 12px;"
:btnList=
"btnList"
></GLEditor>
<div
v-show=
"attachmentShow"
class=
"el-form-item__error"
>
{{
attachmentText
}}
</div>
<div
v-show=
"attachmentShow"
class=
"el-form-item__error"
>
{{
attachmentText
}}
</div>
</el-form-item>
</el-form-item>
<div
class=
"transform-text"
>
<span>
每位客户每天可接收1条群发消息,超过接收上限的客户将无法再收到群发消息。
</span>
</div>
</el-form>
</el-form>
</div>
</div>
</div>
</div>
...
@@ -104,37 +89,18 @@ const combineType = {
...
@@ -104,37 +89,18 @@ const combineType = {
import
emoji
from
'@/utils/emo'
import
emoji
from
'@/utils/emo'
import
SelectCrowd
from
'./components/selectCrowd.vue'
import
SelectCrowd
from
'./components/selectCrowd.vue'
import
SelectLabel
from
'./components/SelectLabel.vue'
import
SelectLabel
from
'./components/SelectLabel.vue'
// import SearchDropDown from './components/searchDropDown/index'
import
*
as
dayjs
from
'dayjs'
import
*
as
dayjs
from
'dayjs'
export
default
{
export
default
{
components
:
{
components
:
{
SelectLabel
,
SelectLabel
,
SelectCrowd
SelectCrowd
// SearchDropDown
},
},
data
()
{
data
()
{
const
validatorUser
=
(
rule
,
value
,
callback
)
=>
{
const
userList
=
this
.
basicForm
.
userList
if
(
userList
&&
userList
.
length
!=
0
)
{
callback
()
}
else
{
callback
(
new
Error
(
'请选择群发账号'
))
}
}
const
validatorAttachment
=
(
rule
,
value
,
callback
)
=>
{
const
previewList
=
this
.
$refs
.
welcome
.
previewList
if
(
previewList
.
length
!=
0
)
{
this
.
basicForm
.
attachmentList
=
previewList
}
if
(
this
.
basicForm
.
attachmentList
)
{
if
(
this
.
basicForm
.
attachmentList
.
length
>
9
)
{
callback
(
new
Error
(
'附件不可超过9个'
))
}
else
{
callback
()
}
}
else
{
callback
(
new
Error
(
'请输入群发内容'
))
}
}
return
{
return
{
msgMerchantName
:
''
,
// 新建按钮加载
// 新建按钮加载
addLoading
:
false
,
addLoading
:
false
,
// 标签/人群筛选数组
// 标签/人群筛选数组
...
@@ -222,15 +188,13 @@ export default {
...
@@ -222,15 +188,13 @@ export default {
}
}
]
]
},
},
{
// {
name
:
'素材'
,
// name: '素材',
type
:
'material'
,
// type: 'material',
funName
:
'material'
,
// funName: 'material',
groupListApi
:
this
.
$apis
.
welcomeword
.
getGroupListApi
,
// groupListApi: this.$apis.welcomeword.getGroupListApi,
materialListApi
:
this
.
$apis
.
welcomeword
.
getMaterialListApi
// materialListApi: this.$apis.welcomeword.getMaterialListApi
// pdfNo: 1
// },
// videoNo: 1
},
{
{
name
:
'模板'
,
name
:
'模板'
,
type
:
'message'
,
type
:
'message'
,
...
@@ -245,15 +209,15 @@ export default {
...
@@ -245,15 +209,15 @@ export default {
attachmentShow
:
false
,
attachmentShow
:
false
,
attachmentText
:
''
,
attachmentText
:
''
,
basicRules
:
{
basicRules
:
{
groupName
:[{
required
:
true
,
message
:
'请选择群发名称'
,
trigger
:
'blur'
}],
groupName
:
[{
required
:
true
,
message
:
'请选择群发名称'
,
trigger
:
'blur'
}],
selectStore
:[{
required
:
true
,
message
:
'请选择门店'
,
trigger
:
'change'
}],
selectStore
:
[{
required
:
true
,
message
:
'请选择门店'
,
trigger
:
'change'
}],
userList
:
[{
validator
:
validatorUser
,
trigger
:
'change'
}],
selectType
:
[{
required
:
true
,
message
:
'请选择客户类型'
,
trigger
:
'change'
}]
selectType
:
[{
required
:
true
,
message
:
'请选择客户类型'
,
trigger
:
'change'
}],
},
},
basicForm
:
{
basicForm
:
{
groupName
:
''
,
groupName
:
''
,
selectStore
:
''
,
selectStore
:
''
,
selectType
:
1
,
selectType
:
1
,
crowdList
:
[]
},
},
groupList
:
[],
groupList
:
[],
selectData
:
[],
selectData
:
[],
...
@@ -267,6 +231,12 @@ export default {
...
@@ -267,6 +231,12 @@ export default {
footerWidth
:
500
,
footerWidth
:
500
,
viewLoading
:
false
,
viewLoading
:
false
,
isSelectCrowd
:
false
,
isSelectCrowd
:
false
,
pageData
:
{
//懒加载相关参数,这里代表从第一条数据开始加载,一次加载40项
pageNum
:
1
,
pageSize
:
40
},
dataItems
:
[]
}
}
},
},
watch
:
{
watch
:
{
...
@@ -293,8 +263,80 @@ export default {
...
@@ -293,8 +263,80 @@ export default {
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
this
.
boxHeight
=
clientHeight
-
200
this
.
boxHeight
=
clientHeight
-
200
this
.
loadUpData
(
this
.
pageData
,
''
)
},
directives
:
{
/** 下拉框懒加载 */
'el-select-loadmore'
:
{
bind
(
el
,
binding
)
{
const
SELECTWRAP_DOM
=
el
.
querySelector
(
'.el-select-dropdown .el-select-dropdown__wrap'
)
SELECTWRAP_DOM
.
addEventListener
(
'scroll'
,
function
()
{
const
condition
=
this
.
scrollHeight
-
this
.
scrollTop
<=
this
.
clientHeight
if
(
condition
)
{
binding
.
value
()
}
})
}
}
},
},
methods
:
{
methods
:
{
clearDrop
(){
this
.
pageData
=
{
pageNum
:
1
,
pageSize
:
40
}
this
.
searchContentStorage
=
''
this
.
dataItems
=
[]
this
.
loadUpData
(
this
.
pageData
,
''
)
},
loadmore
()
{
this
.
pageData
.
pageNum
++
let
acquireCount
=
this
.
pageData
.
pageNum
*
this
.
pageData
.
pageSize
if
(
acquireCount
-
this
.
totalNum
>=
this
.
pageData
.
pageSize
)
{
return
}
if
(
this
.
searchContentStorage
)
{
this
.
loadUpData
(
this
.
pageData
,
this
.
searchContentStorage
)
}
else
{
this
.
loadUpData
(
this
.
pageData
,
''
)
//类似于分页查询
}
},
async
loadUpData
(
pageData
,
searchVal
)
{
let
params
=
{
...
pageData
,
merchantName
:
searchVal
}
await
this
.
$apis
.
wechatGroup
.
getStoreList
(
params
).
then
(
res
=>
{
this
.
totalNum
=
res
.
count
this
.
arrBack
=
res
.
data
})
this
.
dataItems
=
[...
this
.
dataItems
,
...
this
.
arrBack
]
},
async
remoteMethod
(
searchValue
)
{
if
(
searchValue
!==
''
)
{
this
.
searchContentStorage
=
searchValue
;(
this
.
pageData
=
{
pageNum
:
1
,
pageSize
:
40
}),
(
this
.
dataItems
=
[])
this
.
timer
=
setTimeout
(()
=>
{
this
.
loadUpData
(
this
.
pageData
,
searchValue
)
},
300
)
}
else
{
this
.
dataItems
=
[]
this
.
loadUpData
(
{
pageNum
:
1
,
pageSize
:
40
},
''
)
}
},
selectChange
(
val
)
{
this
.
msgMerchantName
=
val
&&
this
.
dataItems
.
find
(
item
=>
item
.
msgMerchantId
==
val
).
msgMerchantName
},
// 返回
// 返回
handleCancel
()
{
handleCancel
()
{
if
(
this
.
editStatus
||
this
.
$refs
.
welcome
.
previewList
.
length
>
0
)
{
if
(
this
.
editStatus
||
this
.
$refs
.
welcome
.
previewList
.
length
>
0
)
{
...
@@ -313,27 +355,41 @@ export default {
...
@@ -313,27 +355,41 @@ export default {
},
},
// 打开标签筛选弹框
// 打开标签筛选弹框
openLabel
()
{
openLabel
()
{
//
if (!this.basicForm.selectStore) {
if
(
!
this
.
basicForm
.
selectStore
)
{
//
this.$message({
this
.
$message
({
//
type: 'error',
type
:
'error'
,
//
message: '请先选择门店'
message
:
'请先选择门店'
//
})
})
//
return
return
//
}
}
this
.
dialogVisible
=
!
this
.
dialogVisible
this
.
dialogVisible
=
!
this
.
dialogVisible
this
.
$refs
.
selectLabel
.
init
(
this
.
tagging
)
this
.
$refs
.
selectLabel
.
init
(
this
.
tagging
)
},
},
// 提交
// 提交
handleSubmit
()
{
async
handleSubmit
()
{
this
.
$refs
.
basicForm
.
validate
(
valid
=>
{
this
.
$refs
.
basicForm
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
basicForm
.
selectType
==
'1'
&&
!
this
.
taggingList
.
length
)
{
this
.
$message
({
type
:
'error'
,
message
:
'请选择标签'
})
return
}
if
(
this
.
basicForm
.
selectType
==
2
&&
!
this
.
basicForm
.
crowdList
.
length
)
{
this
.
$message
({
type
:
'error'
,
message
:
'请选择人群'
})
return
}
this
.
attachmentShow
=
true
this
.
attachmentShow
=
true
const
previewList
=
this
.
$refs
.
welcome
.
previewList
const
previewList
=
this
.
$refs
.
welcome
.
previewList
if
(
previewList
.
length
!=
0
)
{
if
(
previewList
.
length
!=
0
)
{
this
.
basicForm
.
attachm
entList
=
previewList
this
.
basicForm
.
cont
entList
=
previewList
}
}
if
(
this
.
basicForm
.
attachmentList
&&
this
.
basicForm
.
attachmentList
.
length
&&
this
.
basicForm
.
attachmentList
[
0
].
attType
==
1
&&
this
.
basicForm
.
attachm
entList
[
0
].
attContent
!=
''
)
{
if
(
this
.
basicForm
.
contentList
&&
this
.
basicForm
.
contentList
.
length
&&
this
.
basicForm
.
contentList
[
0
].
attType
==
1
&&
this
.
basicForm
.
cont
entList
[
0
].
attContent
!=
''
)
{
if
(
this
.
basicForm
.
attachm
entList
.
length
>
9
)
{
if
(
this
.
basicForm
.
cont
entList
.
length
>
9
)
{
return
(
this
.
attachmentText
=
'附件不可超过9个'
)
return
(
this
.
attachmentText
=
'附件不可超过9个'
)
}
else
{
}
else
{
this
.
attachmentText
=
''
this
.
attachmentText
=
''
...
@@ -342,19 +398,12 @@ export default {
...
@@ -342,19 +398,12 @@ export default {
}
else
{
}
else
{
return
(
this
.
attachmentText
=
'请输入群发内容'
)
return
(
this
.
attachmentText
=
'请输入群发内容'
)
}
}
console
.
log
(
this
.
basicForm
)
if
(
this
.
basicForm
.
selectType
==
2
&&
!
this
.
basicForm
.
crowdList
.
length
)
{
return
this
.
$message
({
type
:
'error'
,
message
:
'请选择人群'
})
}
this
.
$refs
.
groupForm
.
validate
(
async
v
=>
{
this
.
$refs
.
groupForm
.
validate
(
async
v
=>
{
if
(
v
)
{
if
(
v
)
{
const
params
=
this
.
get
SiftMembers
()
const
params
=
this
.
get
BaseInfo
()
params
.
type
=
1
params
.
type
=
1
const
previewList
=
this
.
$common
?
this
.
$common
.
utils
.
deepClone
(
this
.
$refs
.
welcome
.
previewList
)
:
this
.
$refs
.
welcome
.
previewList
const
previewList
=
this
.
$common
?
this
.
$common
.
utils
.
deepClone
(
this
.
$refs
.
welcome
.
previewList
)
:
this
.
$refs
.
welcome
.
previewList
const
attachm
entList
=
previewList
.
map
(
item
=>
{
const
cont
entList
=
previewList
.
map
(
item
=>
{
if
(
item
.
attType
==
1
)
{
if
(
item
.
attType
==
1
)
{
const
list
=
emoji
.
flat
(
Infinity
)
const
list
=
emoji
.
flat
(
Infinity
)
const
cutImg
=
item
.
attContent
.
replaceAll
(
'<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/'
,
''
)
const
cutImg
=
item
.
attContent
.
replaceAll
(
'<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/'
,
''
)
...
@@ -372,38 +421,24 @@ export default {
...
@@ -372,38 +421,24 @@ export default {
}
}
return
item
return
item
})
})
params
.
attachmentList
=
attachmentList
params
.
contentList
=
contentList
const
countParams
=
this
.
getSiftMembers
()
this
.
addLoading
=
true
if
(
countParams
)
{
await
this
.
$apis
.
wechatGroup
.
atchmessagingCreate
(
params
).
then
(
res
=>
{
this
.
addLoading
=
true
if
(
res
.
code
==
0
)
{
this
.
$apis
.
wechatGroup
this
.
$message
({
.
atchmessagingCreate
(
params
).
then
(
res
=>
{
type
:
'success'
,
if
(
res
.
code
==
'-1'
)
{
message
:
'操作成功!'
this
.
$message
({
})
type
:
'error'
,
// this.$tracker.track(Object.assign({}, { pageName: '群发助手', name: '新建客户群发', params }))
message
:
res
.
message
}
else
{
})
this
.
$message
({
}
else
if
(
res
.
code
==
0
)
{
type
:
'error'
,
this
.
$message
({
message
:
res
.
message
type
:
'success'
,
})
message
:
'操作成功!'
}
})
this
.
addLoading
=
false
this
.
$tracker
.
track
(
Object
.
assign
({},
{
pageName
:
'群发助手'
,
name
:
'新建客户群发'
,
params
}))
this
.
$router
.
push
(
'/wechatGroup/index'
)
}
else
{
})
this
.
$message
({
type
:
'error'
,
message
:
res
.
message
})
}
this
.
addLoading
=
false
this
.
$router
.
push
(
'/wechatGroup/index'
)
})
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
'客户数不可为0!'
})
}
}
}
})
})
}
}
...
@@ -429,7 +464,6 @@ export default {
...
@@ -429,7 +464,6 @@ export default {
},
},
// 删除标签筛选标签
// 删除标签筛选标签
removeTag
(
tag
,
idx1
,
idx
)
{
removeTag
(
tag
,
idx1
,
idx
)
{
console
.
log
(
tag
,
'tag'
)
tag
.
labelList
.
splice
(
idx1
,
1
)
tag
.
labelList
.
splice
(
idx1
,
1
)
if
(
tag
.
labelList
.
length
==
0
)
{
if
(
tag
.
labelList
.
length
==
0
)
{
this
.
tagging
.
splice
(
idx
,
1
)
this
.
tagging
.
splice
(
idx
,
1
)
...
@@ -452,7 +486,7 @@ export default {
...
@@ -452,7 +486,7 @@ export default {
// 删除人群筛选标签
// 删除人群筛选标签
removeCrowd
(
item
,
index
)
{
removeCrowd
(
item
,
index
)
{
this
.
basicForm
.
crowdList
.
splice
(
index
,
1
)
this
.
basicForm
.
crowdList
.
splice
(
index
,
1
)
//
this.getCrowdData(this.basicForm.crowdList)
this
.
getCrowdData
(
this
.
basicForm
.
crowdList
)
if
(
!
this
.
basicForm
.
crowdList
.
length
)
{
if
(
!
this
.
basicForm
.
crowdList
.
length
)
{
this
.
basicForm
.
userList
=
[]
this
.
basicForm
.
userList
=
[]
this
.
selectData
=
this
.
basicForm
.
userList
this
.
selectData
=
this
.
basicForm
.
userList
...
@@ -461,67 +495,46 @@ export default {
...
@@ -461,67 +495,46 @@ export default {
}
}
this
.
key
=
new
Date
()
this
.
key
=
new
Date
()
},
},
// 获取所在群聊信息
getBaseInfo
()
{
getGroupList
()
{
let
params
=
{
if
(
this
.
basicForm
.
userList
&&
this
.
basicForm
.
userList
.
length
!=
0
)
{
customerType
:
this
.
basicForm
.
selectType
,
const
staffIds
=
this
.
basicForm
.
userList
.
map
(
item
=>
item
.
staffId
)
msgName
:
this
.
basicForm
.
groupName
,
this
.
$apis
.
customerTransform
.
groupList
({
staffIds
}).
then
(
res
=>
{
msgMerchantId
:
this
.
basicForm
.
selectStore
,
this
.
groupList
=
res
msgMerchantName
:
this
.
msgMerchantName
})
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
'请选择群发账号'
})
}
}
},
if
(
params
.
customerType
==
1
)
{
// 获取选择客户筛选信息
params
.
combineType
=
combineType
.
label
getSiftMembers
()
{
params
.
labelList
=
this
.
taggingList
const
params
=
{
}
else
if
(
params
.
customerType
==
2
)
{
selectType
:
this
.
basicForm
.
selectType
params
.
crowdList
=
this
.
basicForm
.
crowdList
}
if
(
params
.
selectType
==
1
)
{
console
.
log
(
'111'
)
}
else
if
(
params
.
selectType
==
2
)
{
params
.
crowdCondition
=
this
.
basicForm
.
crowdList
params
.
combineType
=
combineType
.
crowd
params
.
combineType
=
combineType
.
crowd
}
}
if
(
this
.
basicForm
.
userList
&&
this
.
basicForm
.
userList
.
length
)
{
params
.
userList
=
this
.
basicForm
.
userList
.
map
(
item
=>
{
return
{
staffId
:
item
.
staffId
}
})
}
return
params
return
params
},
},
// 查看群发人数
// 查看群发人数
viewMembers
()
{
viewMembers
()
{
if
(
!
this
.
basicForm
.
userList
||
this
.
basicForm
.
userList
.
length
==
0
)
{
if
(
!
this
.
basicForm
.
groupName
)
{
if
(
this
.
basicForm
.
selectType
==
2
)
{
return
this
.
$message
({
this
.
$message
({
type
:
'error'
,
type
:
'error'
,
message
:
'请选择群发名称'
message
:
'请选择人群'
})
})
}
}
else
{
if
(
this
.
basicForm
.
selectType
==
'1'
&&
!
this
.
taggingList
.
length
)
{
if
(
this
.
basicForm
.
crowdList
&&
this
.
basicForm
.
userList
.
length
==
0
)
{
return
this
.
$message
({
this
.
$message
({
type
:
'error'
,
type
:
'error'
,
message
:
'请选择标签'
message
:
'群发账号人数为0'
})
})
}
}
else
{
if
(
this
.
basicForm
.
selectType
==
2
&&
!
this
.
basicForm
.
crowdList
.
length
)
{
this
.
$message
({
return
this
.
$message
({
type
:
'error'
,
type
:
'error'
,
message
:
'请选择群发账号'
message
:
'请选择人群'
})
})
}
}
return
}
}
const
params
=
this
.
get
SiftMembers
()
const
params
=
this
.
get
BaseInfo
()
this
.
viewLoading
=
true
this
.
viewLoading
=
true
this
.
$apis
.
wechatGroup
this
.
$apis
.
wechatGroup
.
atchmessagingCustomercount
(
params
)
.
b
atchmessagingCustomercount
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
||
res
==
0
)
{
if
(
res
||
res
==
0
)
{
this
.
isUpdate
=
false
this
.
isUpdate
=
false
...
@@ -556,32 +569,20 @@ export default {
...
@@ -556,32 +569,20 @@ export default {
this
.
$refs
.
selectCrowd
.
init
(
this
.
basicForm
.
crowdList
)
this
.
$refs
.
selectCrowd
.
init
(
this
.
basicForm
.
crowdList
)
},
},
// 获取人群数据(根据人群筛选获取群发账号人群数据)
// 获取人群数据(根据人群筛选获取群发账号人群数据)
// getCrowdData(val) {
getCrowdData
(
val
)
{
// if (val.length) {
if
(
val
.
length
)
{
// this.isSelectCrowd = true
this
.
isSelectCrowd
=
true
// this.basicForm.crowdList = val
this
.
basicForm
.
crowdList
=
val
// const params = {
}
else
{
// combineType: combineType.crowd,
this
.
basicForm
.
userList
=
[]
// crowdCondition: val
this
.
basicForm
.
crowdList
=
[]
// }
this
.
selectData
=
[]
// this.$apis.customerTransform.followerEcho(params).then(res => {
this
.
isSelectCrowd
=
false
// console.log(res)
this
.
isUpdate
=
true
// this.$set(this.basicForm, 'userList', res)
this
.
editStatus
=
true
// this.selectData = this.basicForm.userList
this
.
key
=
new
Date
()
// this.key = new Date()
}
// this.isUpdate = true
}
// this.editStatus = true
// })
// } else {
// this.basicForm.userList = []
// this.basicForm.crowdList = []
// this.selectData = []
// this.isSelectCrowd = false
// this.isUpdate = true
// this.editStatus = true
// this.key = new Date()
// }
// },
}
}
}
}
</
script
>
</
script
>
...
@@ -653,14 +654,14 @@ export default {
...
@@ -653,14 +654,14 @@ export default {
.basic-form
{
.basic-form
{
padding
:
32px
0
20px
20px
;
padding
:
32px
0
20px
20px
;
.selectedLabel{
.selectedLabel
{
display
:
flex
;
display
:
flex
;
.selectLen{
.selectLen
{
margin-left
:
20px
;
margin-left
:
20px
;
font-size
:
14px
;
font-size
:
14px
;
color
:
#666666
;
color
:
#666666
;
.num{
.num
{
color
:
#5850
FF
;
color
:
#5850
ff
;
}
}
}
}
}
}
...
@@ -680,33 +681,6 @@ export default {
...
@@ -680,33 +681,6 @@ export default {
}
}
}
}
.transform-text
{
display
:
flex
;
//
align-items
:
center
;
justify-self
:
center
;
color
:
#000
;
font-size
:
14px
;
padding
:
10px
16px
;
background-color
:
rgba
(
230
,
233
,
255
,
0.49
);
border
:
1px
solid
rgba
(
88
,
80
,
255
,
0.49
);
border-radius
:
4px
;
line-height
:
20px
;
margin-left
:
154px
;
min-width
:
488px
;
max-width
:
844px
;
width
:
auto
;
box-sizing
:
border-box
;
.tips-icon
{
display
:
flex
;
align-items
:
center
;
height
:
20px
;
img
{
width
:
14px
;
height
:
14px
;
margin-right
:
8px
;
}
}
}
.footer-panel
{
.footer-panel
{
display
:
flex
;
display
:
flex
;
...
@@ -821,7 +795,7 @@ export default {
...
@@ -821,7 +795,7 @@ export default {
}
}
.group-content
{
.group-content
{
padding
:
22px
0
20px
0
;
padding
:
0
0
20px
0
;
}
}
.tips-text
{
.tips-text
{
...
...
src/views/wechatGroup/components/searchDropDown/api.js
0 → 100644
View file @
3104fa2
import
{
http
}
from
'@/main'
const
URL
=
'rop-scrm-entmicro/router'
const
getStoreList
=
params
=>
{
params
.
method
=
'entmicro.api.wechatcloudcontrol.batchmessaging.create.merchant'
return
http
({
url
:
URL
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
getStoreList
}
src/views/wechatGroup/components/searchDropDown/index.vue
0 → 100644
View file @
3104fa2
<
template
>
<el-select
ref=
"selectRef"
clearable
filterable
remote
:remote-method=
"remoteMethod"
v-el-select-loadmore=
"loadmore"
v-model=
"inputVal"
placeholder=
"请选择门店"
@
change=
"selectChange"
>
<el-option
v-for=
"(item, i) in dataItems"
:key=
"i"
:label=
"item[label]"
:value=
"item[value]"
></el-option>
</el-select>
</
template
>
<
script
>
import
{
getStoreList
}
from
'./api'
export
default
{
name
:
'SearchDropDown'
,
props
:
[
'inputBoxSearchValue'
,
'label'
,
'value'
],
data
()
{
return
{
searchContentStorage
:
''
,
inputVal
:
''
,
dataItems
:
[],
arrBack
:[],
totalNum
:
''
,
pageData
:
{
//懒加载相关参数,这里代表从第一条数据开始加载,一次加载40项
pageNum
:
1
,
pageSize
:
10
}
}
},
directives
:
{
/** 下拉框懒加载 */
'el-select-loadmore'
:
{
bind
(
el
,
binding
)
{
const
SELECTWRAP_DOM
=
el
.
querySelector
(
'.el-select-dropdown .el-select-dropdown__wrap'
)
SELECTWRAP_DOM
.
addEventListener
(
'scroll'
,
function
()
{
const
condition
=
this
.
scrollHeight
-
this
.
scrollTop
<=
this
.
clientHeight
if
(
condition
)
{
binding
.
value
()
}
})
}
}
},
mounted
()
{
this
.
loadUpData
(
this
.
pageData
)
},
watch
:
{
// 'inputVal'(newVal, oldVal) {
// console.log(newVal,oldVal)
// // if (oldVal !== newVal) {
// // this.dataItems = []
// // this.loadUpData({
// // pageNum: 1,
// // pageSize: 10
// // },newVal)
// // }
// }
'inputVal'
:
{
handler
(
val
)
{
console
.
log
(
val
)
if
(
!
val
)
{
this
.
dataItems
=
[]
this
.
loadUpData
({
pageNum
:
1
,
pageSize
:
10
})
}
}
}
},
methods
:
{
async
loadUpData
(
pageData
,
searchVal
)
{
let
params
=
{
...
pageData
,
merchantName
:
searchVal
}
await
this
.
$apis
.
wechatGroup
.
getStoreList
(
params
).
then
(
res
=>
{
this
.
totalNum
=
res
.
count
this
.
arrBack
=
res
.
data
})
this
.
dataItems
=
[...
this
.
dataItems
,...
this
.
arrBack
]
},
loadmore
()
{
this
.
pageData
.
pageNum
++
let
acquireCount
=
this
.
pageData
.
pageNum
*
this
.
pageData
.
pageSize
if
(
acquireCount
-
this
.
totalNum
>=
this
.
pageData
.
pageSize
){
return
}
if
(
this
.
searchContentStorage
)
{
this
.
loadUpData
(
this
.
pageData
,
this
.
searchContentStorage
)
}
else
{
this
.
loadUpData
(
this
.
pageData
,
''
)
//类似于分页查询
}
},
// 远程搜索
async
remoteMethod
(
searchValue
)
{
console
.
log
(
this
.
inputVal
)
if
(
searchValue
!==
''
)
{
this
.
searchContentStorage
=
searchValue
this
.
dataItems
=
[]
this
.
timer
=
setTimeout
(()
=>
{
this
.
loadUpData
(
this
.
pageData
,
searchValue
)
},
300
)
}
else
{
this
.
dataItems
=
[]
this
.
loadUpData
({
pageNum
:
1
,
pageSize
:
10
},
''
)
}
},
// 根据所选商户获取品牌和地址
async
selectChange
(
label
)
{
if
(
label
)
{
let
obj
=
this
.
dataItems
.
filter
(
el
=>
{
return
el
[
'incomingDisplayLabel'
]
==
label
})
}
}
}
}
</
script
>
<
style
scoped
></
style
>
src/views/wechatGroup/index.vue
View file @
3104fa2
...
@@ -7,14 +7,22 @@
...
@@ -7,14 +7,22 @@
</el-button>
</el-button>
</div>
</div>
<div
class=
"container"
>
<div
class=
"container"
>
<GLCombiForm
:formObj=
"searchForm"
:rowNumber=
"1"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
>
<GLCombiForm
:formObj=
"searchForm"
:rowNumber=
"1"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<div
slot=
"optionBtns"
>
<GLTable
ref=
"activeTable"
:noDataImg=
"url"
:getListApi=
"getListApi"
:searchForm=
"searchFormTable"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
class=
"sendRecord"
@
click=
"traceRecord"
>
发送记录
</div>
<div
slot=
"optionBtns"
slot-scope=
"scope"
>
<div
v-if=
"scope.scope.sendState == '1'"
>
<span
class=
"sendRecord"
@
click=
"traceRecord(scope.scope)"
>
发送记录
</span>
</div>
</div>
<div
slot=
"sendState"
slot-scope=
"scope"
>
<div
class=
"loginStatus"
>
<span
class=
"cycle"
:style=
"
{ background: scope.scope.sendState == '1' ? '#2CCA74' : scope.scope.sendState == '2' ? '#EB4E4E' : scope.scope.sendState == '0' ? '#FDB757' : '' }">
</span>
{{
scope
.
scope
.
sendState
==
'1'
?
'已完成'
:
scope
.
scope
.
sendState
==
'2'
?
'发送失败'
:
scope
.
scope
.
sendState
==
'0'
?
'发送中'
:
''
}}
</div>
</div>
</div>
</GLCombiForm>
</GLTable>
<GLTable
ref=
"groupTable"
:noDataImg=
"url"
:getListApi=
"getListApi"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
@
setTableFinishFun=
"setTableFinishFun"
></GLTable>
</div>
</div>
<el-drawer
size=
"
4
0%"
title=
"发送记录"
:visible
.
sync=
"sendRecordDrawer.isVisible"
:direction=
"sendRecordDrawer.direction"
>
<el-drawer
size=
"
5
0%"
title=
"发送记录"
:visible
.
sync=
"sendRecordDrawer.isVisible"
:direction=
"sendRecordDrawer.direction"
>
<div
class=
"horizon"
></div>
<div
class=
"horizon"
></div>
<div
class=
"sendRecordDrawerbox"
>
<div
class=
"sendRecordDrawerbox"
>
<div
v-for=
"(item, index) in sendRecordDrawer.traceFailandSuccess"
:key=
"index"
class=
"itemContent"
>
<div
v-for=
"(item, index) in sendRecordDrawer.traceFailandSuccess"
:key=
"index"
class=
"itemContent"
>
...
@@ -24,7 +32,14 @@
...
@@ -24,7 +32,14 @@
</div>
</div>
</div>
</div>
</div>
</div>
<GLTable
ref=
"sendRecordDrawer.ref"
:noDataImg=
"url"
:getListApi=
"sendRecordDrawer.getListApi"
:searchForm=
"sendRecordDrawer.searchForm"
:tableParams=
"sendRecordDrawer.tableParams"
:pageConf=
"sendRecordDrawer.pageConf"
></GLTable>
<GLTable
ref=
"sendRecordDrawerRef"
:noDataImg=
"url"
:getListApi=
"sendRecordDrawer.getListApi"
:searchForm=
"sendRecordDrawer.searchForm"
:tableParams=
"sendRecordDrawer.tableParams"
:pageConf=
"sendRecordDrawer.pageConf"
>
<div
slot=
"sendResult"
slot-scope=
"scope"
>
<div
class=
"loginStatus"
>
<span
class=
"cycle"
:style=
"
{ background: scope.scope.sendResult == true ? '#2CCA74' : scope.scope.sendResult == false ? '#EB4E4E' : '' }">
</span>
{{
scope
.
scope
.
sendResult
==
true
?
'成功'
:
scope
.
scope
.
sendResult
==
false
?
'失败'
:
''
}}
</div>
</div>
</GLTable>
</el-drawer>
</el-drawer>
</div>
</div>
</
template
>
</
template
>
...
@@ -43,73 +58,78 @@ export default {
...
@@ -43,73 +58,78 @@ export default {
{
{
title
:
'发送成功'
,
title
:
'发送成功'
,
id
:
'1'
,
id
:
'1'
,
num
:
22
,
num
:
''
,
color
:
'#2CCA74'
color
:
'#2CCA74'
},
},
{
{
title
:
'发送失败'
,
title
:
'发送失败'
,
id
:
'2'
,
id
:
'2'
,
num
:
4
,
num
:
''
,
color
:
'#EB4E4E '
color
:
'#EB4E4E '
}
}
],
],
ref
:
'sendRecordDrawerRef'
,
searchForm
:
{
getListApi
:
''
,
msgId
:
''
searchForm
:
''
,
}
,
tableParams
:
{
tableParams
:
{
listName
:
'
list
'
,
listName
:
'
data
'
,
tableColumns
:
[
tableColumns
:
[
{
{
label
:
'客户'
,
label
:
'客户'
,
prop
:
'
send
Name'
prop
:
'
customer
Name'
},
},
{
{
label
:
'发送时间'
,
label
:
'发送时间'
,
prop
:
'sen
aStor
e'
prop
:
'sen
dTim
e'
},
},
{
{
label
:
'发送结果'
,
label
:
'发送结果'
,
prop
:
'customerNum'
prop
:
'sendResult'
,
addHtml
:
'sendResult'
}
}
]
]
},
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
}
getListApi
:
this
.
$apis
.
wechatGroup
.
recordSend
,
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
}
searchForm
:
{
sendName
:
''
,
sendTime
:
''
,
store
:
''
},
},
searchForm
:
{},
searchFormData
:
[
searchFormData
:
[
{
{
label
:
'群发名称'
,
label
:
'群发名称'
,
name
:
'm
essagin
gName'
,
name
:
'm
s
gName'
,
type
:
'input'
,
type
:
'input'
,
isClear
:
true
isClear
:
true
},
},
{
{
label
:
'群发时间'
,
label
:
'群发时间'
,
name
:
'
sendTim
e'
,
name
:
'
daterang
e'
,
type
:
'datePicker'
,
type
:
'datePicker'
,
isClear
:
true
isClear
:
true
,
valueFormat
:
'yyyy-MM-dd'
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
||
time
.
getTime
()
<
new
Date
(
'2017-12-31'
).
getTime
()
}
}
},
},
{
{
label
:
'群发门店'
,
label
:
'群发门店'
,
name
:
'merchantName'
,
name
:
'm
sgM
erchantName'
,
type
:
'input'
,
type
:
'input'
,
isClear
:
true
isClear
:
true
}
}
],
],
searchFormTable
:
{},
tableParams
:
{
tableParams
:
{
listName
:
'
list
'
,
listName
:
'
data
'
,
tableColumns
:
[
tableColumns
:
[
{
{
label
:
'群发名称'
,
label
:
'群发名称'
,
prop
:
'm
essagin
gName'
prop
:
'm
s
gName'
},
},
{
{
label
:
'群发门店'
,
label
:
'群发门店'
,
prop
:
'm
essagin
gMerchant'
prop
:
'm
s
gMerchant'
},
},
{
{
label
:
'客户数'
,
label
:
'客户数'
,
...
@@ -117,7 +137,10 @@ export default {
...
@@ -117,7 +137,10 @@ export default {
},
},
{
{
label
:
'标签/人群'
,
label
:
'标签/人群'
,
prop
:
'labelCrowdName'
prop
:
'labelCrowdName'
,
width
:
170
,
// addHtml: 'labelCrowdName',
line
:
1
},
},
{
{
label
:
'创建时间'
,
label
:
'创建时间'
,
...
@@ -125,7 +148,8 @@ export default {
...
@@ -125,7 +148,8 @@ export default {
},
},
{
{
label
:
'发送状态'
,
label
:
'发送状态'
,
prop
:
'sendState'
prop
:
'sendState'
,
addHtml
:
'sendState'
},
},
{
{
label
:
'发送成功'
,
label
:
'发送成功'
,
...
@@ -140,13 +164,13 @@ export default {
...
@@ -140,13 +164,13 @@ export default {
{
{
label
:
'操作'
,
label
:
'操作'
,
prop
:
'optionBtns'
,
prop
:
'optionBtns'
,
width
:
'
66
px'
,
width
:
'
100
px'
,
addHtml
:
'optionBtns'
,
addHtml
:
'optionBtns'
,
fixed
:
'right'
fixed
:
'right'
}
}
]
]
},
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'
total
'
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'
count
'
},
getListApi
:
this
.
$apis
.
wechatGroup
.
batchmessagingRecord
getListApi
:
this
.
$apis
.
wechatGroup
.
batchmessagingRecord
}
}
},
},
...
@@ -156,13 +180,26 @@ export default {
...
@@ -156,13 +180,26 @@ export default {
},
},
// 重置搜索框搜索
// 重置搜索框搜索
handleReset
()
{
handleReset
()
{
this
.
searchForm
=
{
this
.
searchForm
=
{}
isBuyPermit
:
''
,
merchantId
:
''
,
merchantName
:
''
}
this
.
handleSearch
()
this
.
handleSearch
()
},
},
getParams
()
{
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
params
.
daterange
)
{
params
.
startTime
=
this
.
searchForm
.
daterange
[
0
]
params
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
}
else
{
if
(
params
.
startTime
)
delete
params
.
startTime
&&
delete
params
.
endTime
}
delete
params
.
daterange
return
params
},
beforeSearchFn
()
{
return
new
Promise
(
async
resolve
=>
{
this
.
searchFormTable
=
this
.
getParams
()
resolve
()
})
},
setTableFinishFun
()
{
setTableFinishFun
()
{
//接收到的数据为空
//接收到的数据为空
this
.
$refs
.
activeTable
.
data
.
length
?
(
this
.
$refs
.
activeTable
.
tableHeightValues
=
''
)
:
this
.
$refs
.
activeTable
.
setTableHeightFun
()
this
.
$refs
.
activeTable
.
data
.
length
?
(
this
.
$refs
.
activeTable
.
tableHeightValues
=
''
)
:
this
.
$refs
.
activeTable
.
setTableHeightFun
()
...
@@ -171,14 +208,32 @@ export default {
...
@@ -171,14 +208,32 @@ export default {
addSendGroup
()
{
addSendGroup
()
{
this
.
$router
.
push
(
'/wechatGroup/addWechatGroup'
)
this
.
$router
.
push
(
'/wechatGroup/addWechatGroup'
)
},
},
traceRecord
()
{
async
traceRecord
(
scope
)
{
const
{
msgId
,
successCompletion
,
failCompletion
}
=
scope
this
.
sendRecordDrawer
.
traceFailandSuccess
[
0
].
num
=
successCompletion
this
.
sendRecordDrawer
.
traceFailandSuccess
[
1
].
num
=
failCompletion
this
.
sendRecordDrawer
.
searchForm
.
msgId
=
msgId
this
.
sendRecordDrawer
.
isVisible
=
true
this
.
sendRecordDrawer
.
isVisible
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
sendRecordDrawerRef
.
refreshTable
()
})
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.loginStatus
{
display
:
flex
;
align-items
:
center
;
.cycle
{
margin-right
:
8px
;
width
:
6px
;
height
:
6px
;
display
:
inline-block
;
border-radius
:
50%
;
}
}
.createANewGroupBtn
{
.createANewGroupBtn
{
margin-bottom
:
16px
;
margin-bottom
:
16px
;
}
}
...
@@ -202,6 +257,18 @@ export default {
...
@@ -202,6 +257,18 @@ export default {
}
}
.sendRecord
{
.sendRecord
{
color
:
#5850ff
;
color
:
#5850ff
;
cursor
:
pointer
;
}
/
deep
/
.loginStatus
{
display
:
flex
;
align-items
:
center
;
.cycle
{
margin-right
:
8px
;
width
:
6px
;
height
:
6px
;
display
:
inline-block
;
border-radius
:
50%
;
}
}
}
}
}
.horizon
{
.horizon
{
...
@@ -212,9 +279,9 @@ export default {
...
@@ -212,9 +279,9 @@ export default {
.sendRecordDrawerbox
{
.sendRecordDrawerbox
{
padding
:
20px
;
padding
:
20px
;
display
:
flex
;
display
:
flex
;
justify-content
:
space-
around
;
justify-content
:
space-
between
;
.itemContent
{
.itemContent
{
width
:
334px
;
width
:
46%
;
padding
:
8px
0
8px
20px
;
padding
:
8px
0
8px
20px
;
border
:
1px
solid
#e8e8ea
;
border
:
1px
solid
#e8e8ea
;
}
}
...
...
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