Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 e69f43eb
authored
Mar 10, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
更新欢迎语组件,筛选条件过滤,更换压缩接口
1 parent
e6b4d12b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
123 additions
and
68 deletions
package-lock.json
package.json
src/api/modules/common.js
src/views/friendGroup/friendGroupAdd.vue
package-lock.json
View file @
e69f43e
...
...
@@ -14466,9 +14466,9 @@
}
},
"word-edit"
:
{
"version"
:
"1.0.
8
"
,
"resolved"
:
"https://registry.npmmirror.com/word-edit/-/word-edit-1.0.
8
.tgz"
,
"integrity"
:
"sha512-
MyEkcrUkZFEO5JQyXXUX0Azi4uWZ45nzwhkcdyML/CGWhZxtGGBbE/p3hgVKxVp6Q2GKMwtdIOvX+WAghmnDlA
=="
,
"version"
:
"1.0.
9
"
,
"resolved"
:
"https://registry.npmmirror.com/word-edit/-/word-edit-1.0.
9
.tgz"
,
"integrity"
:
"sha512-
TIoRTWu6TL5RwGSVU5t6mMnjCekX42QQlP91r7PPQpoQCgtGt8sWx7p6/BoqdiwNOxB4Loyh0xLKW+LEeO5zPQ
=="
,
"requires"
:
{
"@amap/amap-jsapi-loader"
:
"^1.0.1"
,
"core-js"
:
"^3.6.5"
,
...
...
package.json
View file @
e69f43e
...
...
@@ -23,7 +23,7 @@
"vuedraggable"
:
"^2.24.3"
,
"vuex"
:
"^3.1.2"
,
"wangeditor"
:
"^4.7.12"
,
"word-edit"
:
"^1.0.
8
"
"word-edit"
:
"^1.0.
9
"
},
"devDependencies"
:
{
"@vue/cli-plugin-babel"
:
"^4.1.0"
,
...
...
src/api/modules/common.js
View file @
e69f43e
...
...
@@ -117,6 +117,28 @@ const pictureUpload = params => {
})
}
const
compressPicture
=
params
=>
{
// params.method = '/video/compression/upload'
// params.sessionId = session
return
http
({
url
:
'/rpc-scrm-entmicro-container/picture/compression/upload'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
compressVideo
=
params
=>
{
// params.method = '/video/compression/upload'
// params.sessionId = session
return
http
({
url
:
'/rpc-scrm-entmicro-container/video/compression/upload'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
querylabeltree
=
params
=>
{
params
.
method
=
'scrm.api.datahub.labelgroup.queryLabelTree'
// params.sessionId = session
...
...
@@ -184,4 +206,4 @@ const getCrowdfundingOrderConfig = (params = {}) => {
})
}
export
default
{
getMerchantGoodsListApi
,
getGoodsListApi
,
uploadImgApi
,
uploadMusicApi
,
uploadVideoApi
,
uploadFundingVideoApi
,
getMerchantList
,
getSimpleMerchantList
,
getZoneListApi
,
getClassifyListApi
,
pictureUpload
,
querylabeltree
,
getCrowdTreeListApi
,
getStaffFollowerListApi
,
getMerchantInfoApi
,
getSuperMerchantApi
,
getCrowdfundingOrderConfig
}
export
default
{
getMerchantGoodsListApi
,
getGoodsListApi
,
uploadImgApi
,
uploadMusicApi
,
uploadVideoApi
,
uploadFundingVideoApi
,
getMerchantList
,
getSimpleMerchantList
,
getZoneListApi
,
getClassifyListApi
,
pictureUpload
,
querylabeltree
,
getCrowdTreeListApi
,
getStaffFollowerListApi
,
getMerchantInfoApi
,
getSuperMerchantApi
,
getCrowdfundingOrderConfig
,
compressPicture
,
compressVideo
}
src/views/friendGroup/friendGroupAdd.vue
View file @
e69f43e
...
...
@@ -26,27 +26,31 @@
</el-tag>
</div>
</div>
<div
class=
"filter-footer"
>
<!--
<span>
将消息发送给客户符合条件的客户
</span>
-->
<div
class=
"filter-number"
>
查看客户数
<el-button
type=
"text"
v-show=
"isUpdate"
:loading=
"viewLoading"
@
click=
"viewMembers"
>
查看
</el-button>
<!--
<span
v-show=
"isUpdate"
@
click=
"viewMembers"
>
查看
</span>
-->
<span
v-show=
"!isUpdate"
>
{{
groupNumber
}}
</span>
</div>
</div>
</el-form-item>
<el-form-item
label=
"可见的客户:"
prop=
"visibleCustomer"
>
<el-radio-group
v-model=
"basicForm.visibleCustomer"
>
<el-radio
:label=
"1"
>
全部客户
</el-radio>
<el-radio
:label=
"2"
>
筛选客户
</el-radio>
</el-radio-group>
<div
v-show=
"basicForm.visibleCustomer =='1'"
>
<div
class=
"filter-footer"
>
<!--
<span>
将消息发送给客户符合条件的客户
</span>
-->
<div
class=
"filter-number"
>
查看客户数
<el-button
type=
"text"
v-show=
"isUpdate"
:loading=
"viewLoading"
@
click=
"viewMembers('all')"
>
查看
</el-button>
<span
v-show=
"!isUpdate"
>
{{
groupNumber
}}
</span>
</div>
</div>
</div>
<div
v-show=
"basicForm.visibleCustomer =='2'"
>
<el-button
v-show=
"customerDataList.length == 0 ||customerDataList.every(item => item.labelList.length == 0)"
class=
"screeningCustomers default-blue-btn el-icon-plus m-t-10"
size=
"small"
@
click=
"
handleSelectCustomer
()"
>
去选择
@
click=
"
viewMembers
()"
>
去选择
</el-button>
<div
v-show=
"customerDataList.length != 0 && customerDataList.some(item => item.labelList.length !== 0)"
>
...
...
@@ -201,7 +205,7 @@ export default {
// limitWidth: 10000, //限制单张图片宽度
// limitHeight: 10000,//限制单张图片高度
Isdraggable
:
true
,
//图片拖拽
uploadApi
:
this
.
$apis
.
common
.
pictureUpload
uploadApi
:
this
.
$apis
.
common
.
compressPicture
},
{
name
:
'视频'
,
...
...
@@ -213,13 +217,14 @@ export default {
// limitWidth: 1280, //限制视频宽度
// limitHeight: 720, //限制视频高度
limitTime
:
30
,
//限制视频时长
uploadApi
:
this
.
$apis
.
common
.
pictureUpload
uploadApi
:
this
.
$apis
.
common
.
compressVideo
},
{
name
:
'链接'
,
type
:
'postLink'
,
funName
:
'postLink'
,
togetherItem
:
[
ATT_TYPE
.
TEXT
],
limitOrNot
:
true
,
uploadApi
:
this
.
$apis
.
common
.
pictureUpload
}
],
...
...
@@ -275,7 +280,8 @@ export default {
customerDataList
:
[],
isTagVisible
:
false
,
estimatedNumberOfPeople
:
''
,
customerLoading
:
false
customerLoading
:
false
,
whetherToSelectMembers
:
true
,
}
},
watch
:
{
...
...
@@ -300,50 +306,85 @@ export default {
mounted
()
{
},
methods
:
{
getCustomerByTagList
()
{
var
params
=
{
combineType
:
2
,
pageSize
:
1
,
pageNum
:
1
,
tagLists
:
[]
getCustomerByTagList
(
type
)
{
let
params
=
{}
if
(
type
==
'all'
)
{
this
.
viewLoading
=
true
}
this
.
customerDataList
&&
this
.
customerDataList
.
forEach
(
item
=>
{
item
.
labelList
.
length
&&
item
.
labelList
.
forEach
(
subItem
=>
{
params
.
tagLists
.
push
({
groupId
:
item
.
labelGroup
.
id
,
groupName
:
item
.
labelGroup
.
name
,
groupType
:
item
.
labelType
,
labelId
:
subItem
.
id
,
labelName
:
subItem
.
name
if
(
type
==
'filtrate'
)
{
params
=
{
selectType
:
2
,
condition
:
{
labelList
:
[]
}
}
this
.
customerDataList
&&
this
.
customerDataList
.
forEach
(
item
=>
{
item
.
labelList
.
length
&&
item
.
labelList
.
forEach
(
subItem
=>
{
params
.
condition
.
labelList
.
push
({
groupId
:
item
.
labelGroup
.
id
,
groupName
:
item
.
labelGroup
.
name
,
groupType
:
item
.
labelType
,
labelId
:
subItem
.
id
,
labelName
:
subItem
.
name
})
})
})
}
const
userList
=
this
.
basicForm
.
userList
.
map
(
item
=>
{
return
{
staffId
:
item
.
staffId
,
staffName
:
item
.
staffName
,
masterStatus
:
item
.
masterStatus
,
follow
:
item
.
follow
}
})
this
.
$apis
.
sop
.
getCustomerByTagListApi
(
params
).
then
(
res
=>
{
this
.
estimatedNumberOfPeople
=
res
.
count
this
.
customerLoading
=
false
})
params
.
userList
=
userList
this
.
$apis
.
friendGroup
.
momentCount
(
params
)
.
then
(
res
=>
{
if
(
this
.
basicForm
.
visibleCustomer
==
1
)
{
this
.
viewLoading
=
false
this
.
groupNumber
=
res
this
.
isUpdate
=
false
}
else
{
this
.
estimatedNumberOfPeople
=
res
this
.
customerLoading
=
false
}
})
.
catch
(
err
=>
{
this
.
viewLoading
=
false
this
.
groupNumber
=
0
})
},
handleDeleteCustomer
(
idx
,
pIdx
)
{
this
.
customerDataList
[
pIdx
].
labelList
.
splice
(
idx
,
1
)
this
.
customerLoading
=
true
this
.
getCustomerByTagList
()
this
.
getCustomerByTagList
(
'filtrate'
)
},
handleResetCustomer
()
{
this
.
customerDataList
=
[]
this
.
customerLoading
=
false
this
.
estimatedNumberOfPeople
=
''
},
handleDialogConfirm
(
val
)
{
this
.
customerDataList
=
val
this
.
customerLoading
=
true
this
.
getCustomerByTagList
()
this
.
getCustomerByTagList
(
'filtrate'
)
},
handleSelectCustomer
()
{
this
.
isTagVisible
=
!
this
.
isTagVisible
this
.
$refs
.
selectTagForm
.
init
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
customerDataList
)))
},
previewForm
(
val
)
{
// this.previewView = val
...
...
@@ -351,9 +392,11 @@ export default {
if
(
value
[
0
]
&&
!
value
[
0
].
attContent
)
value
.
splice
(
0
,
1
)
this
.
previewView
=
value
},
openMembers
()
{
this
.
membersVisible
=
!
this
.
membersVisible
},
handleCancel
()
{
if
(
this
.
editStatus
||
this
.
$refs
.
welcome
.
previewList
.
length
>
0
)
{
this
.
$confirm
(
'当前有内容信息未保存,是否继续返回?'
,
'提示'
,
{
...
...
@@ -379,33 +422,10 @@ export default {
})
return
}
this
.
viewLoading
=
true
const
userList
=
this
.
basicForm
.
userList
.
map
(
item
=>
{
return
{
staffId
:
item
.
staffId
,
staffName
:
item
.
staffName
,
masterStatus
:
item
.
masterStatus
,
follow
:
item
.
follow
}
})
let
params
=
{
userList
}
this
.
$apis
.
friendGroup
.
momentCount
(
params
)
.
then
(
res
=>
{
this
.
viewLoading
=
false
this
.
groupNumber
=
res
this
.
isUpdate
=
false
})
.
catch
(
err
=>
{
this
.
viewLoading
=
false
this
.
groupNumber
=
0
})
this
.
basicForm
.
visibleCustomer
==
2
?
this
.
handleSelectCustomer
()
:
this
.
getCustomerByTagList
(
'all'
)
},
// 成员弹窗
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
)
...
...
@@ -489,12 +509,25 @@ export default {
// 对链接字段做处理
attachmentList
.
forEach
(
item
=>
{
if
(
item
.
attType
==
4
){
item
.
attContent
=
JSON
.
stringify
(
item
.
attContent
)
if
(
item
.
attType
==
4
)
{
item
.
attContent
=
JSON
.
stringify
(
item
.
attContent
)
}
})
params
.
attachmentList
=
attachmentList
// 筛选客户
if
(
this
.
basicForm
.
visibleCustomer
)
{
params
.
tagList
=
[]
this
.
customerDataList
&&
this
.
customerDataList
.
forEach
(
item
=>
{
item
.
labelList
.
length
&&
item
.
labelList
.
forEach
(
subItem
=>
{
params
.
tagList
.
push
(
subItem
.
id
,
)
})
})
}
if
(
params
.
sendType
==
2
)
{
params
.
sendTimeStr
=
this
.
basicForm
.
sendTime
+
' '
+
this
.
basicForm
.
sendDate
}
...
...
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