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 a457fe13
authored
Mar 18, 2022
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
sop朋友圈
1 parent
7bcfa5ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
67 deletions
src/api/modules/sop.js
src/views/sop/editSop/components/materialModel.vue
src/views/sop/editSop/components/nicknameModel.vue
src/api/modules/sop.js
View file @
a457fe1
...
...
@@ -169,4 +169,15 @@ const getMaterialListApi = params => {
})
}
export
default
{
getCustomerByTagListApi
,
getSopInfoListApi
,
getSopBaseInfoApi
,
getEventListApi
,
getSopCustomerStatisticsListApi
,
getSopStaffTaskListApi
,
parseEventCountApi
,
deleteSopEventApi
,
endSopEventApi
,
batchEditSopEventApi
,
insertOrUpdateSopApi
,
getSopInfoDetailApi
,
getGroupListApi
,
getMaterialListApi
}
// 朋友圈模板
const
getMomentListApi
=
params
=>
{
params
.
method
=
'marketing.api.moment.page'
return
http
({
url
:
'rop-scrm-marketing/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
getCustomerByTagListApi
,
getSopInfoListApi
,
getSopBaseInfoApi
,
getEventListApi
,
getSopCustomerStatisticsListApi
,
getSopStaffTaskListApi
,
parseEventCountApi
,
deleteSopEventApi
,
endSopEventApi
,
batchEditSopEventApi
,
insertOrUpdateSopApi
,
getSopInfoDetailApi
,
getGroupListApi
,
getMaterialListApi
,
getMomentListApi
}
src/views/sop/editSop/components/materialModel.vue
View file @
a457fe1
...
...
@@ -148,7 +148,7 @@ export default {
},
handleSelectItem
(
item
)
{
this
.
selectItem
=
item
console
.
log
(
this
.
selectItem
)
//
console.log(this.selectItem)
},
getModelList
()
{
var
params
=
{
...
...
src/views/sop/editSop/components/nicknameModel.vue
View file @
a457fe1
<!-- 朋友圈模板弹窗 -->
<
template
>
<glsx-dialog
title=
"选择朋友圈模板"
:isVisible
.
sync=
"isNicknameVisible"
width=
"
70%
"
@
confirmDialog=
"handleNicknameConfirm"
@
closeDialog=
"handleNicknameClose"
class=
"relateStore"
>
<glsx-dialog
title=
"选择朋友圈模板"
:isVisible
.
sync=
"isNicknameVisible"
width=
"
1088px
"
@
confirmDialog=
"handleNicknameConfirm"
@
closeDialog=
"handleNicknameClose"
class=
"relateStore"
>
<div
class=
"model-panel"
>
<div
class=
"model-panel-tab"
>
<label>
活动类型:
</label>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
type=
"card"
>
<el-tab-pane
label=
"单图文"
name=
"3"
></el-tab-pane>
<el-tab-pane
label=
"多图文"
name=
"4"
></el-tab-pane>
<el-tab-pane
label=
"文字+视频"
name=
"2"
></el-tab-pane>
<el-tab-pane
label=
"文字"
name=
"5"
></el-tab-pane>
<!-- 0-纯文字,1-单图+文,2-多图+文,3-视频+文,4-链接+文 -->
<el-tab-pane
label=
"单图文"
name=
"1"
></el-tab-pane>
<el-tab-pane
label=
"多图文"
name=
"2"
></el-tab-pane>
<el-tab-pane
label=
"文字+视频"
name=
"3"
></el-tab-pane>
<el-tab-pane
label=
"文字"
name=
"0"
></el-tab-pane>
<el-tab-pane
label=
"链接+文"
name=
"4"
></el-tab-pane>
</el-tabs>
</div>
<div
class=
"model-item-panel"
v-if=
"modelList.length > 0"
v-loading=
"loading"
>
<div
class=
"model-item"
:class=
"
{ checked: selectItem
== item
}" v-for="(item, index) in modelList" :key="index" @click="handleSelectItem(item)">
<div
class=
"model-item-title"
:title=
"item.equityName"
v-show=
"activeName == 3"
>
{{
item
.
equityName
}}
</div>
<div
class=
"model-item"
:class=
"
{ checked: selectItem
.id == item.id
}" v-for="(item, index) in modelList" :key="index" @click="handleSelectItem(item)">
<
!--
<
div
class=
"model-item-title"
:title=
"item.equityName"
v-show=
"activeName == 3"
>
{{
item
.
equityName
}}
</div>
<div
class=
"model-item-title"
:title=
"item.couponName"
v-show=
"activeName == 2"
>
{{
item
.
couponName
}}
</div>
<div
class=
"model-item-title"
:title=
"item.couponName"
v-show=
"activeName == 6"
>
{{
item
.
equityName
}}
</div>
<div
class=
"model-item-title"
:title=
"item.packageName"
v-show=
"activeName == 4"
>
{{
item
.
packageName
}}
</div>
...
...
@@ -56,14 +58,14 @@
<div
class=
"model-item-content model-item-contents"
v-show=
"activeName == 2"
>
数量:
<span>
{{
item
.
residueAmount
}}
</span>
</div>
</div>
-->
</div>
</div>
<div
class=
"model-item-empty"
v-else
v-loading=
"loading"
>
<img
src=
"@/assets/empty.png"
/>
<div
class=
"empty-item"
>
暂无数据
</div>
</div>
<el-pagination
v-if=
"activeName != 3"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"pageNum"
:page-sizes=
"[12, 24, 36, 48]"
:page-size=
"pageSize"
:total=
"tableTotal"
layout=
"total, sizes, prev, pager, next, jumper"
></el-pagination>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"pageNum"
:page-sizes=
"[12, 24, 36, 48]"
:page-size=
"pageSize"
:total=
"tableTotal"
layout=
"total, sizes, prev, pager, next, jumper"
></el-pagination>
</div>
</glsx-dialog>
</
template
>
...
...
@@ -101,27 +103,12 @@ export default {
// selectedData: [],
// selectingData: [],
// needTip: ['editProduct'],
activeName
:
'1'
,
modelList
:
[],
// 分页
total
:
0
,
pageNum
:
1
,
pageSize
:
20
,
baseData
:
{
groupList
:
[],
businessTypeList
:
[
{
confId
:
1
,
confName
:
'PDF'
},
{
confId
:
2
,
confName
:
'自定义链接'
},
{
confId
:
3
,
confName
:
'图文'
}
]
}
pageSize
:
12
,
tableTotal
:
0
}
},
...
...
@@ -153,50 +140,38 @@ export default {
glsxDialog
},
created
()
{
this
.
getBaseData
()
},
mounted
()
{
// this.selectedData = this.storeSelected
// this.selectedData.forEach(item => {
// item.merchantNo = item.merchantId ? (item.merchantId + '') : item.merchantNo
// })
// this.getSelectingList()
this
.
getModelList
()
},
methods
:
{
getBaseData
()
{
this
.
$apis
.
sop
.
getGroupListApi
({}).
then
(
res
=>
{
console
.
log
(
res
)
this
.
baseData
.
groupList
=
res
this
.
getOptionsList
(
'searchFormData'
)
handleClick
()
{
this
.
pageNum
=
1
this
.
getModelList
()
},
getModelList
()
{
var
params
=
{
materialType
:
this
.
activeName
,
pageNum
:
this
.
pageNum
,
pageSize
:
this
.
pageSize
}
this
.
$apis
.
sop
.
getMomentListApi
(
params
).
then
(
res
=>
{
this
.
modelList
=
res
.
data
this
.
tableTotal
=
res
.
count
})
},
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
if
(
refreshSigle
)
{
var
item
=
this
[
formName
].
find
(
k
=>
k
.
name
==
refreshSigle
)
var
index
=
this
[
formName
].
findIndex
(
k
=>
k
.
name
==
refreshSigle
)
this
.
$set
(
this
[
formName
][
index
],
'optionList'
,
this
.
$common
.
utils
.
deepClone
(
this
.
baseData
[
item
.
optionsName
]))
if
(
hasAll
&&
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
[
formName
][
index
].
optionLabel
]
!==
'全部'
)
{
const
temp
=
{}
temp
[
this
[
formName
][
index
].
optionId
]
=
''
temp
[
this
[
formName
][
index
].
optionLabel
]
=
'全部'
this
[
formName
][
index
].
optionList
.
unshift
(
temp
)
}
}
else
{
this
[
formName
].
forEach
((
item
,
index
)
=>
{
if
(
item
.
type
===
'select'
&&
this
.
baseData
[
item
.
optionsName
].
length
)
{
this
.
$set
(
this
[
formName
][
index
],
'optionList'
,
this
.
$common
.
utils
.
deepClone
(
this
.
baseData
[
item
.
optionsName
]))
if
(
hasAll
&&
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
[
formName
][
index
].
optionLabel
]
!==
'全部'
)
{
const
temp
=
{}
temp
[
this
[
formName
][
index
].
optionId
]
=
''
temp
[
this
[
formName
][
index
].
optionLabel
]
=
'全部'
this
[
formName
][
index
].
optionList
.
unshift
(
temp
)
}
}
})
}
handleSizeChange
(
val
)
{
this
.
pageSize
=
val
this
.
getModelList
()
},
handleCurrentChange
(
val
)
{
this
.
pageNum
=
val
this
.
getModelList
()
},
// selectable(row, index) {
// var isSelect = row.hasOwnProperty('beServed') ? !row.beServed : true
...
...
@@ -245,10 +220,6 @@ export default {
// this.selectedData = this.selectedData.filter(item => item.merchantNo !== row.merchantNo)
// this.recoverySelection()
// },
handleCurrentChange
(
val
)
{
this
.
pageNum
=
val
// this.getSelectingList()
},
handleNicknameConfirm
()
{
this
.
$emit
(
'handleNicknameConfirm'
,
this
.
selectedData
)
},
...
...
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