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 60e9b545
authored
Feb 06, 2023
by
徐忆琳
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'xuyl_dev_sop' into 'v3.5.0'
更新二月版本sop代码 See merge request
!421
2 parents
5a6604a8
f50dabef
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
98 additions
and
126 deletions
src/views/sop/editSop.vue
src/views/sop/editSop/baseInfo.vue
src/views/sop/editSop/components/EnterprisePreview/index.vue
src/views/sop/editSop/components/FriendGroupPreview/index.vue
src/views/sop/editSop/editEvent.vue
src/views/sop/sopList.vue
src/views/sop/editSop.vue
View file @
60e9b54
...
...
@@ -66,6 +66,7 @@ export default {
},
jumpEvent
(
obj
)
{
console
.
log
(
obj
)
this
.
$set
(
this
.
eventObj
,
'addOrEdit'
,
obj
.
addOrEdit
)
this
.
$set
(
this
.
eventObj
,
'info'
,
obj
.
info
)
this
.
parentCustomerObj
=
obj
.
parentCustomerObj
...
...
src/views/sop/editSop/baseInfo.vue
View file @
60e9b54
...
...
@@ -197,7 +197,7 @@
content=
"请先完善sop名称和营销对象"
placement=
"top"
>
<div>
<el-button
class=
"default-blue-btn newBtnSty"
v-if=
"new Date(item.eventStartDate) > new Date()"
v-if=
"new Date(item.eventStartDate) > new Date()
|| !item.eventStartDate
"
:disabled=
"!editForm.customerInfoList.length || !editForm.sopName"
:size=
"size"
@
click=
"handleEventEdit('edit', item, index)"
>
编辑
</el-button>
...
...
@@ -567,62 +567,16 @@ export default {
getInfo
()
{
this
.
$apis
.
sop
.
getSopInfoDetailApi
({
sopId
:
this
.
routeInfo
.
id
}).
then
(
res
=>
{
if
(
this
.
routeInfo
.
addOrEdit
==
'copy'
)
{
this
.
copyForm
=
res
this
.
copyForm
.
eventList
.
forEach
(
item
=>
{
res
.
eventList
&&
res
.
eventList
.
map
(
item
=>
{
item
.
eventStartDate
=
''
item
.
eventTime
=
''
if
(
item
.
object
)
{
item
.
object
.
objectId
=
item
.
objectId
item
.
object
.
objectType
=
item
.
objectType
item
.
object
.
objectName
=
item
.
objectName
item
.
object
.
additionalType
=
item
.
additionalType
}
// if (item.additionalType == 4) {
// // attType (1文本,2图片,3视频,4链接,5小程序,6附件,7活动)
// // attContent 附件内容
// // 文字
// let txtObj = item.object.attachmentList.find(k => k.attType == 1)
// item.object.showTxtContent = txtObj ? txtObj.attContent : ''
// // 图片
// let imgList = item.object.attachmentList.filter(k => k.attType == 2)
// item.object.showImgContent = imgList || []
// // 视频
// let videoList = item.object.attachmentList.filter(k => k.attType == 3)
// item.object.showVideoContent = videoList || []
// }
})
this
.
editForm
.
eventList
=
this
.
copyForm
.
eventList
this
.
$nextTick
(()
=>
{
this
.
editStatus
=
false
})
this
.
editForm
.
eventList
=
res
.
eventList
}
else
{
this
.
editForm
=
res
this
.
currentCustomerIdx
=
this
.
customerDataList
.
findIndex
(
item
=>
item
.
confId
==
this
.
editForm
.
customerOptType
)
this
.
recoverCustomerList
()
this
.
editForm
.
customerOptUpdate
=
this
.
editForm
.
customerOptUpdate
+
''
//
// this.editForm.eventList.forEach(item => {
// console.log(item.object)
// if (item.object) {
// item.object.objectId = item.objectId
// item.object.objectType = item.objectType
// item.object.objectName = item.objectName
// item.object.additionalType = item.additionalType
// }
// if (item.additionalType == 4) {
// // attType (1文本,2图片,3视频,4链接,5小程序,6附件,7活动)
// // attContent 附件内容
// // 文字
// let txtObj = item.object.attachmentList.find(k => k.attType == 1)
// item.object.showTxtContent = txtObj ? txtObj.attContent : ''
// // // 图片
// let imgList = item.object.attachmentList.filter(k => k.attType == 2)
// item.object.showImgContent = imgList || []
// // // 视频
// let videoList = item.object.attachmentList.filter(k => k.attType == 3)
// item.object.showVideoContent = videoList || []
// }
// })
this
.
editDisabled
=
new
Date
(
this
.
editForm
.
startDate
)
<
new
Date
()
this
.
editDisabled
&&
this
.
judgeDisable
()
this
.
$nextTick
(()
=>
{
...
...
@@ -1045,6 +999,13 @@ export default {
// 这边走的是新增
params
.
eventList
=
[]
this
.
editForm
.
eventList
.
forEach
((
item
,
index
)
=>
{
if
(
!
item
.
eventStartDate
||
!
item
.
eventTime
){
this
.
$message
({
message
:
'请选择营销事件的营销时间'
,
type
:
'error'
})
return
}
params
.
eventList
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
item
)))
params
.
eventList
[
index
].
resourceList
=
[]
if
(
item
.
object
&&
item
.
object
.
length
<=
2
)
{
...
...
src/views/sop/editSop/components/EnterprisePreview/index.vue
View file @
60e9b54
...
...
@@ -2,8 +2,11 @@
<div
class=
"img-bg"
>
<div
class=
"preview-content"
>
<div
class=
"preview-time"
>
{{
currentTime
}}
</div>
<div
:class=
"
{'preview-info':true,'isMargin':previewList
&&
previewList[2]
&&
previewList[2].attType == 6
&&
item.attType ==6}" v-for="item in previewList" :key="item.id">
<img
class=
"avatar"
src=
"@/assets/guestCustom/default-customer.png"
v-if=
"!(hasSixType && hasSevenType) || item.attType !== 7"
alt
/>
<div
:class=
"
{'preview-info':true,'isMargin':(previewList
&&
previewList[2]
&&
previewList[2].attType == 6
&&
item.attType ==6) || previewList
&&
previewList[1]
&&
previewList[0].attType == 7
&&
previewList[1].attType ==6
&&
item.attType ==6}"
v-for="item in previewList" :key="item.id">
<img
class=
"avatar"
src=
"@/assets/guestCustom/default-customer.png"
v-if=
"!(hasSixType && hasSevenType) || item.attType !== 7"
alt
/>
<template
v-if=
"item.attType == 1"
>
<div
class=
"preview-text text"
v-html=
"item.attContent"
></div>
</
template
>
...
...
@@ -156,9 +159,10 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
.isMargin
{
.isMargin
{
margin-top
:
-20px
;
}
.img-bg
{
position
:
relative
;
width
:
290px
;
...
...
src/views/sop/editSop/components/FriendGroupPreview/index.vue
View file @
60e9b54
...
...
@@ -2,73 +2,48 @@
<div
class=
"img-bg"
>
<div
class=
"preview-content"
>
<div
class=
"preview-info"
v-show=
"previewListFilter.length"
>
<img
class=
"avatar"
src=
"@/assets/guestCustom/default-customer.png"
alt
/>
<template
v-if=
"previewListFilter && previewListFilter.length
<
= 3"
>
<img
class=
"avatar"
src=
"@/assets/guestCustom/default-customer.png"
alt
/>
<template>
<div
class=
"preview-box"
v-for=
"item in previewListFilter"
:key=
"item.id"
>
<div
class=
"preview-box-desc"
>
<template
v-if=
"item.attType == 1"
>
<div
class=
"preview-text text"
v-html=
"item.attContent"
></div>
</
template
>
<
template
v-else-if=
"item.attType == 7"
>
<div
class=
"preview-text preview-link"
>
<img
src=
"@/assets/guestCustom/preview-link.png"
alt
/>
<div>
{{
item
.
attContent
.
marketingName
}}
</div>
</div>
</
template
>
<
template
v-else-if=
"item.attType == 6"
>
<div
class=
"preview-text preview-link"
>
<img
src=
"@/assets/guestCustom/preview-link.png"
alt
/>
<div>
{{
JSON
.
parse
(
item
.
attContent
).
fileName
}}
</div>
</div>
</
template
>
<
template
v-else-if=
"item.attType == 2"
v-for=
"(imgItem, index) in item.attContent"
>
<el-image
style=
"width: 52px; height: 52px"
class=
"img-list"
:src=
"imgItem"
fit=
"fit"
:key=
"index"
:preview-src-list=
"item.attContent"
></el-image>
</
template
>
<
template
v-else-if=
"item.attType == 3"
>
<!--
<el-image
style=
"width: 100px"
:src=
"item.attContent"
fit=
"contain"
></el-image>
-->
<div
class=
"video-panel"
>
<video
id=
"video"
width=
"100%"
height=
"100%"
preload
loop
muted
>
<source
:src=
"item.attContent"
type=
"video/mp4"
/>
</video>
<i
class=
"el-icon-video-play"
@
click=
"
videoShow = true
videoUrl = item.attContent
"
></i>
</div>
</
template
>
</div>
</div>
</template>
<
template
v-else
>
<div
class=
"preview-box"
v-for=
"item in previewListFilter"
:key=
"item.id"
>
<div
class=
"preview-box-desc"
>
<template
v-if=
"item.attType == 1"
>
<div
class=
"preview-text text"
v-html=
"item.attContent"
></div>
</
template
>
<!-- <template v-else-if="item.attType == 7">-->
<!-- <div class="preview-text preview-link">-->
<!-- <img src="@/assets/guestCustom/preview-link.png" alt />-->
<!-- <div>{{item.attContent.marketingName }}</div>-->
<!-- </div>-->
<!-- </template>-->
<
template
v-else-if=
"item.attType == 6"
>
<div
class=
"preview-text preview-link"
>
<img
src=
"@/assets/guestCustom/preview-link.png"
alt
/>
<div>
{{
JSON
.
parse
(
item
.
attContent
).
fileName
}}
</div>
</div>
<
template
v-else-if=
"hasSixType || hasSevenType"
>
<template
v-if=
"hasSixType && hasSevenType"
>
<template
v-if=
"item.attType == 6"
>
<div
class=
"preview-text preview-link"
>
<img
src=
"@/assets/guestCustom/preview-link.png"
alt
/>
<div>
{{
JSON
.
parse
(
item
.
attContent
).
fileName
}}
</div>
</div>
</
template
>
</template>
<
template
v-else
>
<template
v-if=
"item.attType == 7"
>
<div
class=
"preview-text preview-link"
>
<img
src=
"@/assets/guestCustom/preview-link.png"
alt
/>
<div>
{{
item
.
attContent
.
marketingName
}}
</div>
</div>
</
template
>
<
template
v-if=
"item.attType == 6"
>
<div
class=
"preview-text preview-link"
>
<img
src=
"@/assets/guestCustom/preview-link.png"
alt
/>
<div>
{{
JSON
.
parse
(
item
.
attContent
).
fileName
}}
</div>
</div>
</
template
>
</template>
</template>
<
template
v-else-if=
"item.attType == 2"
v-for=
"(imgItem, index) in item.attContent"
>
<el-image
style=
"width: 52px; height: 52px"
class=
"img-list"
:src=
"imgItem"
fit=
"fit"
:key=
"index"
:preview-src-list=
"item.attContent"
></el-image>
<el-image
style=
"width: 52px; height: 52px"
class=
"img-list"
:src=
"imgItem"
fit=
"fit"
:key=
"index"
:preview-src-list=
"item.attContent"
></el-image>
</
template
>
<
template
v-else-if=
"item.attType == 3"
>
<!--
<el-image
style=
"width: 100px"
:src=
"item.attContent"
fit=
"contain"
></el-image>
-->
<div
class=
"video-panel"
>
<video
id=
"video"
width=
"100%"
height=
"100%"
preload
loop
muted
>
<source
:src=
"item.attContent"
type=
"video/mp4"
/>
<source
:src=
"item.attContent"
type=
"video/mp4"
/>
</video>
<i
class=
"el-icon-video-play"
...
...
@@ -105,27 +80,31 @@ const ATT_TYPE = {
ACTIVITY
:
7
}
import
emoji
from
'@/utils/emo'
export
default
{
name
:
'Preview'
,
props
:
{
previewView
:
Array
},
props
:
{
previewView
:
Array
},
data
()
{
return
{
videoShow
:
false
,
previewList
:
[],
previewListFilter
:
[],
videoUrl
:
''
videoUrl
:
''
,
hasSixType
:
false
,
hasSevenType
:
false
}
},
watch
:
{
previewView
:
{
handler
(
val
)
{
const
previewVal
=
this
.
$common
.
utils
.
deepClone
(
val
).
filter
(
item
=>
item
)
console
.
log
(
previewVal
)
this
.
hasSixType
=
previewVal
.
some
(
item
=>
item
.
attType
==
6
)
this
.
hasSevenType
=
previewVal
.
some
(
item
=>
item
.
attType
==
7
)
this
.
previewListFilter
=
[]
for
(
let
i
in
previewVal
)
{
if
(
previewVal
[
i
].
attType
==
1
)
{
const
attContent
=
previewVal
[
i
].
attContent
const
htm
=
attContent
.
replace
(
/
\[[\u
4E00-
\u
9FA56
]{1,4}
]/gi
,
function
(
res
)
{
const
htm
=
attContent
.
replace
(
/
\[[\u
4E00-
\u
9FA56
]{1,4}
]/gi
,
function
(
res
)
{
let
word
=
res
.
replace
(
/
\[
|
\]
/gi
,
''
)
const
list
=
emoji
.
flat
(
Infinity
)
let
index
=
parseInt
(
list
.
indexOf
(
word
))
+
1
...
...
@@ -171,12 +150,14 @@ export default {
.img-list
{
margin-right
:
3px
;
}
.img-bg
{
position
:
relative
;
width
:
290px
;
height
:
566px
;
background-image
:
url(../../../../../assets/guestCustom/friend-bg.png)
;
background-size
:
100%
;
.preview-content
{
position
:
absolute
;
width
:
250px
;
...
...
@@ -191,9 +172,11 @@ export default {
text-align
:
center
;
margin-bottom
:
15px
;
}
.preview-info
{
padding
:
0
0px
20px
9px
;
position
:
relative
;
.avatar
{
position
:
absolute
;
top
:
0px
;
...
...
@@ -202,10 +185,12 @@ export default {
height
:
26px
;
margin-right
:
8px
;
}
.preview-box
{
margin-left
:
30px
;
width
:
180px
;
}
.preview-operation
{
float
:
right
;
margin-right
:
30px
;
...
...
@@ -219,6 +204,7 @@ export default {
font-weight
:
400
;
color
:
#556993
;
}
.video-panel
{
width
:
100%
;
height
:
102px
;
...
...
@@ -226,9 +212,11 @@ export default {
align-items
:
center
;
justify-content
:
center
;
position
:
relative
;
video
{
position
:
absolute
;
}
i
{
z-index
:
10
;
font-size
:
20px
;
...
...
@@ -236,6 +224,7 @@ export default {
cursor
:
pointer
;
}
}
.preview-text
{
font-size
:
14px
;
position
:
relative
;
...
...
@@ -245,29 +234,34 @@ export default {
word-wrap
:
break-word
;
word-break
:
break-all
;
line-height
:
20px
;
/deep/
img
{
width
:
20px
;
height
:
20px
;
vertical-align
:
middle
;
}
}
.text
{
width
:
100%
;
font-size
:
12px
;
padding
:
0px
;
margin-bottom
:
6px
;
}
.preview-link
{
padding
:
6px
0px
;
font-size
:
12px
;
background
:
#f7f7f7
;
display
:
flex
;
align-items
:
center
;
img
{
margin
:
0px
12px
0px
5px
;
width
:
24px
;
height
:
24px
;
}
div
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
...
...
@@ -277,6 +271,7 @@ export default {
-webkit-box-orient
:
vertical
;
}
}
.preview-text
::before
{
content
:
''
;
position
:
absolute
;
...
...
@@ -287,12 +282,14 @@ export default {
border-color
:
transparent
#fff
transparent
transparent
;
//
background-color
:
cornflowerblue
;
}
.preview-applet
{
img
{
width
:
20px
;
height
:
20px
;
margin-right
:
4px
;
}
&
-title
{
display
:
flex
;
align-self
:
center
;
...
...
@@ -300,6 +297,7 @@ export default {
margin-bottom
:
5px
;
}
}
.preview-activity
{
width
:
160px
;
//
height
:
184px
;
...
...
@@ -307,6 +305,7 @@ export default {
border-radius
:
4px
;
border
:
1px
solid
#dce1e5
;
padding
:
7px
7px
0
;
.activity-name
{
font-size
:
12px
;
color
:
#333
;
...
...
@@ -316,10 +315,12 @@ export default {
overflow
:
hidden
;
white-space
:
nowrap
;
}
.applet-logo
{
width
:
95px
;
height
:
24px
;
}
.activity-footer
{
margin-top
:
4px
;
border-top
:
1px
solid
#edeff3
;
...
...
@@ -328,6 +329,7 @@ export default {
}
}
}
.video-dialog
{
z-index
:
2001
;
position
:
fixed
;
...
...
@@ -337,6 +339,7 @@ export default {
left
:
0
;
overflow
:
auto
;
background
:
rgba
(
$
color
:
#000000
,
$
alpha
:
0.5
);
&-panel
{
background
:
#000000
;
position
:
absolute
;
...
...
@@ -348,10 +351,12 @@ export default {
box-sizing
:
border-box
;
padding
:
10px
20px
20px
;
overflow
:
hidden
;
.video-close
{
display
:
flex
;
justify-content
:
flex-end
;
height
:
40px
;
i
{
cursor
:
pointer
;
font-size
:
25px
;
...
...
src/views/sop/editSop/editEvent.vue
View file @
60e9b54
...
...
@@ -61,7 +61,7 @@
<div
class=
"marketingContent"
>
<div
class=
"group-content"
>
<el-form
:model=
"editForm"
:rules=
"editRule"
ref=
"groupForm"
label-width=
"154px"
>
<el-form-item
class=
"attachment-panel"
>
<el-form-item
class=
"attachment-panel"
>
<label
slot=
"label"
class=
"required"
><span
style=
"color:red;margin-right: 3px"
>
*
</span>
营销内容:
</label>
<GLEditor
ref=
"welcome"
:form=
"'object'"
style=
"line-height: 12px;width:650px"
:btnList=
"btnList"
@
previewWord=
"previewForm"
></GLEditor>
...
...
@@ -71,7 +71,7 @@
</div>
<div
class=
"preview"
>
<Preview
:previewVal=
"previewList"
v-if=
"editForm.pushChannelType == 1"
></Preview>
<!--
<MessagePreview
:previewView=
"previewList"
v-if=
"editForm.pushChannelType == 2"
></MessagePreview>
-->
<!--
<MessagePreview
:previewView=
"previewList"
v-if=
"editForm.pushChannelType == 2"
></MessagePreview>
-->
<FriendGroupPreview
:previewView=
"previewList"
v-if=
"editForm.pushChannelType == 3"
></FriendGroupPreview>
</div>
</div>
...
...
@@ -722,13 +722,14 @@ export default {
let
backupContent
=
typeof
(
this
.
editForm
.
backupContent
)
==
'string'
?
JSON
.
parse
(
this
.
editForm
.
backupContent
)
:
this
.
editForm
.
backupContent
if
(
backupContent
)
{
const
previewList
=
backupContent
.
map
(
item
=>
{
if
(
item
.
attType
==
7
)
item
.
attContent
=
JSON
.
parse
(
item
.
attContent
)
// JSON.parse(item.attContent)
if
(
item
.
attType
==
7
)
item
.
attContent
=
typeof
(
item
.
attContent
)
==
'string'
?
JSON
.
parse
(
item
.
attContent
)
:
item
.
attContent
return
item
})
this
.
$refs
.
welcome
.
updateList
(
previewList
)
}
else
if
(
this
.
editForm
.
object
&&
this
.
editForm
.
object
.
length
!=
0
)
{
const
previewList
=
JSON
.
parse
(
this
.
editForm
.
backupContent
).
map
(
item
=>
{
if
(
item
.
attType
==
7
)
item
.
attContent
=
JSON
.
parse
(
item
.
attContent
)
if
(
item
.
attType
==
7
)
item
.
attContent
=
typeof
(
item
.
attContent
)
==
'string'
?
JSON
.
parse
(
item
.
attContent
)
:
item
.
attContent
return
item
})
this
.
$refs
.
welcome
.
updateList
(
previewList
)
...
...
@@ -744,7 +745,7 @@ export default {
handleMarketingContent
()
{
let
params
=
{}
const
previewList
=
this
.
$common
?
this
.
$common
.
utils
.
deepClone
(
this
.
$refs
.
welcome
.
previewList
)
:
this
.
$refs
.
welcome
.
previewList
if
((
previewList
[
0
]
&&
previewList
[
0
].
attType
==
1
&&
previewList
[
0
].
attContent
==
''
)
||
!
previewList
.
length
||
(
previewList
[
0
]
&&
previewList
[
0
].
attType
!==
1
))
{
if
((
previewList
[
0
]
&&
previewList
[
0
].
attType
==
1
&&
previewList
[
0
].
attContent
==
''
)
||
!
previewList
.
length
||
(
previewList
[
0
]
&&
previewList
[
0
].
attType
!==
1
))
{
this
.
hasEventContentDisplaySpecial
=
true
}
else
{
this
.
hasEventContentDisplaySpecial
=
false
...
...
src/views/sop/sopList.vue
View file @
60e9b54
...
...
@@ -92,16 +92,16 @@ export default {
// click: row => this.handleEdit('look', row)
// }
// },
//
{
//
type: 'el-button',
//
name: '复制',
//
attrs: {
//
type: 'text'
//
},
//
listeners: {
//
click: row => this.handleEdit('copy', row)
//
}
//
},
{
type
:
'el-button'
,
name
:
'复制'
,
attrs
:
{
type
:
'text'
},
listeners
:
{
click
:
row
=>
this
.
handleEdit
(
'copy'
,
row
)
}
},
{
type
:
'el-button'
,
name
:
'编辑'
,
...
...
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