Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 4c66c408
authored
Mar 31, 2022
by
姜鹏凯
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
模板调整
1 parent
3d2dc566
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
116 additions
and
222 deletions
linkwe-pc/src/components/WelcomeContent.vue
linkwe-pc/src/components/WelcomeContent.vue
View file @
4c66c40
...
@@ -5,13 +5,10 @@
...
@@ -5,13 +5,10 @@
<el-form
label-width=
"110px"
label-position=
"right"
>
<el-form
label-width=
"110px"
label-position=
"right"
>
<div
class=
"g-card g-pad20"
>
<div
class=
"g-card g-pad20"
>
<el-form-item
label=
"使用员工"
required
v-if=
"showMember"
>
<el-form-item
label=
"使用员工"
required
v-if=
"showMember"
>
<el-tag
sizi=
"mini"
v-for=
"(unit, key) in form.users"
:key=
"key"
>
{{
<el-tag
sizi=
"mini"
v-for=
"(unit, key) in form.users"
:key=
"key"
>
{{
unit
.
userName
}}
unit
.
userName
</el-tag>
}}
</el-tag>
<div>
<div>
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"onSelectUser"
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"onSelectUser"
>
选择员工
</el-button>
>
选择员工
</el-button
>
</div>
</div>
<div
class=
"sub-des"
>
<div
class=
"sub-des"
>
一个员工被设置多个欢迎语时,以最新设置或修改的为准,如果通过活码添加,则只推送活码欢迎语
一个员工被设置多个欢迎语时,以最新设置或修改的为准,如果通过活码添加,则只推送活码欢迎语
...
@@ -19,40 +16,14 @@
...
@@ -19,40 +16,14 @@
</el-form-item>
</el-form-item>
<!-- 欢迎语 -->
<!-- 欢迎语 -->
<div
class=
"my-cord"
>
<div
class=
"my-cord"
>
<div
<div
v-if=
"showTemplate"
class=
"operation"
@
click=
"getWelList(), (dialogVisibleSelectWel = true)"
>
v-if=
"showTemplate"
<img
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从模板库中选择
class=
"operation"
@
click=
"getWelList(), (dialogVisibleSelectWel = true)"
>
<img
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从模板库中选择
</div>
</div>
<div
v-if=
"!showTemplate"
class=
"operation"
@
click=
"onChooseMaterialWel()"
>
<div
v-if=
"!showTemplate"
class=
"operation"
@
click=
"onChooseMaterialWel()"
>
<img
<img
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从素材中选择
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从素材中选择
</div>
</div>
<el-form-item
<el-form-item
:label=
"isgroup ? '消息内容' : '欢迎语'"
required
style=
"width: 50%; margin-bottom: 0"
:error=
"welcomeMsgError"
>
:label=
"isgroup ? '消息内容' : '欢迎语'"
<el-input
ref=
"msgTextarea"
type=
"textarea"
v-model=
"form.welcomeMsg"
maxlength=
"2000"
show-word-limit
placeholder=
"请输入"
:autosize=
"
{ minRows: 5, maxRows: 20 }" clearable />
required
style=
"width: 50%; margin-bottom: 0"
:error=
"welcomeMsgError"
>
<el-input
ref=
"msgTextarea"
type=
"textarea"
v-model=
"form.welcomeMsg"
maxlength=
"2000"
show-word-limit
placeholder=
"请输入"
:autosize=
"
{ minRows: 5, maxRows: 20 }"
clearable
/>
</el-form-item>
</el-form-item>
<el-form-item
style=
"margin-bottom: 0"
v-if=
"!isgroup"
>
<el-form-item
style=
"margin-bottom: 0"
v-if=
"!isgroup"
>
<el-checkbox
@
change=
"onInsert"
>
插入客户昵称
</el-checkbox>
<el-checkbox
@
change=
"onInsert"
>
插入客户昵称
</el-checkbox>
...
@@ -65,54 +36,25 @@
...
@@ -65,54 +36,25 @@
<!-- 文本 -->
<!-- 文本 -->
<div
class=
"my-cord"
v-if=
"item.msgType == '4'"
>
<div
class=
"my-cord"
v-if=
"item.msgType == '4'"
>
<div
class=
"operation"
>
<div
class=
"operation"
>
<div
<div
v-if=
"showMorMaterial"
class=
"algin"
@
click=
"onChooseMaterial(item.msgType, index)"
>
v-if=
"showMorMaterial"
<img
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从素材中选择
class=
"algin"
@
click=
"onChooseMaterial(item.msgType, index)"
>
<img
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从素材中选择
</div>
</div>
<div
class=
"algin"
@
click=
"onRemoveMaterial(index)"
>
<div
class=
"algin"
@
click=
"onRemoveMaterial(index)"
>
<img
<img
style=
"margin-right: 3px; height: 12px; width: 12px"
:src=
"require('@/assets/drainageCode/delete.png')"
alt=
""
/>
删除
style=
"margin-right: 3px; height: 12px; width: 12px"
:src=
"require('@/assets/drainageCode/delete.png')"
alt=
""
/>
删除
</div>
</div>
</div>
</div>
<el-form-item
<el-form-item
label=
"文本"
required
style=
"width: 50%; margin-bottom: 0"
:error=
"item.contentError"
>
label=
"文本"
required
style=
"width: 50%; margin-bottom: 0"
:error=
"item.contentError"
>
<el-input
type=
"text"
v-model=
"item.content"
maxlength=
"200"
placeholder=
"请输入"
/>
<el-input
type=
"text"
v-model=
"item.content"
maxlength=
"200"
placeholder=
"请输入"
/>
</el-form-item>
</el-form-item>
</div>
</div>
<!-- 图片上传 -->
<!-- 图片上传 -->
<div
class=
"my-cord"
v-else-if=
"item.msgType == '0'"
>
<div
class=
"my-cord"
v-else-if=
"item.msgType == '0'"
>
<div
class=
"operation"
>
<div
class=
"operation"
>
<div
<div
v-if=
"showMorMaterial"
class=
"algin"
@
click=
"onChooseMaterial(item.msgType, index)"
>
v-if=
"showMorMaterial"
<img
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从素材中选择
class=
"algin"
@
click=
"onChooseMaterial(item.msgType, index)"
>
<img
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从素材中选择
</div>
</div>
<div
class=
"algin"
@
click=
"onRemoveMaterial(index)"
>
<div
class=
"algin"
@
click=
"onRemoveMaterial(index)"
>
<img
<img
style=
"margin-right: 3px; height: 12px; width: 12px"
:src=
"require('@/assets/drainageCode/delete.png')"
alt=
""
/>
删除
style=
"margin-right: 3px; height: 12px; width: 12px"
:src=
"require('@/assets/drainageCode/delete.png')"
alt=
""
/>
删除
</div>
</div>
</div>
</div>
<el-form-item
label=
"图片上传"
required
:error=
"item.materialUrlError"
>
<el-form-item
label=
"图片上传"
required
:error=
"item.materialUrlError"
>
...
@@ -122,45 +64,17 @@
...
@@ -122,45 +64,17 @@
<!-- 图文 -->
<!-- 图文 -->
<div
class=
"my-cord"
v-else-if=
"item.msgType == '8'"
>
<div
class=
"my-cord"
v-else-if=
"item.msgType == '8'"
>
<div
class=
"operation"
>
<div
class=
"operation"
>
<div
<div
v-if=
"showMorMaterial"
class=
"algin"
@
click=
"onChooseMaterial(item.msgType, index)"
>
v-if=
"showMorMaterial"
<img
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从素材中选择
class=
"algin"
@
click=
"onChooseMaterial(item.msgType, index)"
>
<img
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从素材中选择
</div>
</div>
<div
class=
"algin"
@
click=
"onRemoveMaterial(index)"
>
<div
class=
"algin"
@
click=
"onRemoveMaterial(index)"
>
<img
<img
style=
"margin-right: 3px; height: 12px; width: 12px"
:src=
"require('@/assets/drainageCode/delete.png')"
alt=
""
/>
删除
style=
"margin-right: 3px; height: 12px; width: 12px"
:src=
"require('@/assets/drainageCode/delete.png')"
alt=
""
/>
删除
</div>
</div>
</div>
</div>
<el-form-item
<el-form-item
label=
"图文标题"
style=
"width: 50%"
required
:error=
"item.materialNameError"
>
label=
"图文标题"
<el-input
v-model=
"item.materialName"
placeholder=
"请输入图文标题"
maxlength=
"64"
show-word-limit
clearable
></el-input>
style=
"width: 50%"
required
:error=
"item.materialNameError"
>
<el-input
v-model=
"item.materialName"
placeholder=
"请输入图文标题"
maxlength=
"64"
show-word-limit
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"图文链接"
style=
"width: 50%"
required
:error=
"item.materialUrlError"
>
label=
"图文链接"
style=
"width: 50%"
required
:error=
"item.materialUrlError"
>
<el-input
v-model=
"item.materialUrl"
placeholder=
"请输入图文链接"
></el-input>
<el-input
v-model=
"item.materialUrl"
placeholder=
"请输入图文链接"
></el-input>
<div
class=
"sub-des"
>
仅支持公众号图文链接,且必须以 http://或 https://开头
</div>
<div
class=
"sub-des"
>
仅支持公众号图文链接,且必须以 http://或 https://开头
</div>
</el-form-item>
</el-form-item>
...
@@ -168,54 +82,21 @@
...
@@ -168,54 +82,21 @@
<!-- 小程序 -->
<!-- 小程序 -->
<div
class=
"my-cord"
v-else-if=
"item.msgType == '9'"
>
<div
class=
"my-cord"
v-else-if=
"item.msgType == '9'"
>
<div
class=
"operation"
>
<div
class=
"operation"
>
<div
<div
v-if=
"showMorMaterial"
class=
"algin"
@
click=
"onChooseMaterial(item.msgType, index)"
>
v-if=
"showMorMaterial"
<img
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从素材中选择
class=
"algin"
@
click=
"onChooseMaterial(item.msgType, index)"
>
<img
style=
"margin-right: 3px"
:src=
"require('@/assets/drainageCode/code-add.png')"
alt=
""
/>
从素材中选择
</div>
</div>
<div
class=
"algin"
@
click=
"onRemoveMaterial(index)"
>
<div
class=
"algin"
@
click=
"onRemoveMaterial(index)"
>
<img
<img
style=
"margin-right: 3px; height: 12px; width: 12px"
:src=
"require('@/assets/drainageCode/delete.png')"
alt=
""
/>
删除
style=
"margin-right: 3px; height: 12px; width: 12px"
:src=
"require('@/assets/drainageCode/delete.png')"
alt=
""
/>
删除
</div>
</div>
</div>
</div>
<el-form-item
<el-form-item
label=
"小程序标题"
style=
"width: 50%"
required
:error=
"item.materialNameError"
>
label=
"小程序标题"
<el-input
v-model=
"item.materialName"
placeholder=
"请输入小程序标题"
maxlength=
"64"
show-word-limit
clearable
></el-input>
style=
"width: 50%"
required
:error=
"item.materialNameError"
>
<el-input
v-model=
"item.materialName"
placeholder=
"请输入小程序标题"
maxlength=
"64"
show-word-limit
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"小程序AppID"
style=
"width: 50%"
required
:error=
"item.digestError"
>
label=
"小程序AppID"
style=
"width: 50%"
required
:error=
"item.digestError"
>
<el-input
v-model=
"item.digest"
placeholder=
"请输入小程序AppID"
></el-input>
<el-input
v-model=
"item.digest"
placeholder=
"请输入小程序AppID"
></el-input>
<div
class=
"sub-des"
>
必须是审核通过,正常发布,且关联到企业的小程序应用
</div>
<div
class=
"sub-des"
>
必须是审核通过,正常发布,且关联到企业的小程序应用
</div>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"小程序路径"
style=
"width: 50%"
required
:error=
"item.materialUrlError"
>
label=
"小程序路径"
style=
"width: 50%"
required
:error=
"item.materialUrlError"
>
<el-input
v-model=
"item.materialUrl"
placeholder=
"请输入小程序路径"
></el-input>
<el-input
v-model=
"item.materialUrl"
placeholder=
"请输入小程序路径"
></el-input>
<div
class=
"sub-des"
>
必须以 html 作为后缀
</div>
<div
class=
"sub-des"
>
必须以 html 作为后缀
</div>
</el-form-item>
</el-form-item>
...
@@ -226,17 +107,10 @@
...
@@ -226,17 +107,10 @@
</div>
</div>
<!-- 添加附件 -->
<!-- 添加附件 -->
<div
<div
class=
"g-card g-pad20 add-continue"
v-show=
"form.materialMsgList.length
<
= 8
&&
showMore()">
class=
"g-card g-pad20 add-continue"
v-show=
"form.materialMsgList.length
<
= 8
&&
showMore()"
>
<el-dropdown
style=
"margin-left: 10px"
@
command=
"onInsertMaterial"
>
<el-dropdown
style=
"margin-left: 10px"
@
command=
"onInsertMaterial"
>
<div
style=
"display: flex; align-items: center"
>
<div
style=
"display: flex; align-items: center"
>
<img
<img
style=
"margin-right: 5px"
:src=
"require('@/assets/drainageCode/plus-circle.png')"
alt=
""
/>
继续添加附件
style=
"margin-right: 5px"
:src=
"require('@/assets/drainageCode/plus-circle.png')"
alt=
""
/>
继续添加附件
</div>
</div>
<el-dropdown-menu
slot=
"dropdown"
trigger=
"click"
>
<el-dropdown-menu
slot=
"dropdown"
trigger=
"click"
>
<!--
<el-dropdown-item
:command=
"4"
>
<!--
<el-dropdown-item
:command=
"4"
>
...
@@ -266,39 +140,19 @@
...
@@ -266,39 +140,19 @@
</div>
</div>
</el-col>
</el-col>
</el-row>
</el-row>
<SelectMaterial
<SelectMaterial
:visible
.
sync=
"dialogVisibleSelectMaterial"
:type=
"materialType"
@
success=
"submitSelectMaterial"
></SelectMaterial>
:visible
.
sync=
"dialogVisibleSelectMaterial"
<SelectMaterial
:visible
.
sync=
"dialogVisibleSelectMaterialWel"
type=
"4"
@
success=
"submitSelectMaterialWel"
></SelectMaterial>
:type=
"materialType"
@
success=
"submitSelectMaterial"
></SelectMaterial>
<SelectMaterial
:visible
.
sync=
"dialogVisibleSelectMaterialWel"
type=
"4"
@
success=
"submitSelectMaterialWel"
></SelectMaterial>
<el-dialog
key=
"a"
title=
"选择欢迎语"
:visible
.
sync=
"dialogVisibleSelectWel"
width=
"500"
>
<el-dialog
key=
"a"
title=
"选择欢迎语"
:visible
.
sync=
"dialogVisibleSelectWel"
width=
"500"
>
<div>
<div>
<el-input
class=
"welcome-input"
placeholder=
"请输入关键字"
v-model=
"welQuery.welcomeMsg"
>
<el-input
class=
"welcome-input"
placeholder=
"请输入关键字"
v-model=
"welQuery.welcomeMsg"
>
<el-button
slot=
"append"
@
click=
"getWelList"
>
查询
</el-button>
<el-button
slot=
"append"
@
click=
"getWelList"
>
查询
</el-button>
</el-input>
</el-input>
<el-table
<el-table
ref=
"table"
v-loading=
"welLoading"
:data=
"welList"
:max-height=
"300"
:show-header=
"false"
highlight-current-row
@
current-change=
"(val) => (welSelected = val)"
>
ref=
"table"
v-loading=
"welLoading"
:data=
"welList"
:max-height=
"300"
:show-header=
"false"
highlight-current-row
@
current-change=
"(val) => (welSelected = val)"
>
<el-table-column
property=
"welcomeMsg"
show-overflow-tooltip
></el-table-column>
<el-table-column
property=
"welcomeMsg"
show-overflow-tooltip
></el-table-column>
<el-table-column
width=
"60"
>
<el-table-column
width=
"60"
>
<template
slot-scope=
"
{ row }">
<template
slot-scope=
"
{ row }">
<i
<i
v-if=
"welSelected.id === row.id"
class=
"el-icon-check"
style=
"color: rgb(65, 133, 244); font-size: 25px"
></i>
v-if=
"welSelected.id === row.id"
class=
"el-icon-check"
style=
"color: rgb(65, 133, 244); font-size: 25px"
></i>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -308,22 +162,17 @@
...
@@ -308,22 +162,17 @@
<el-button
type=
"primary"
@
click=
"selectWelcome"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"selectWelcome"
>
确 定
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<SelectUser
<SelectUser
:defaultValues=
"selectedUserList"
:visible
.
sync=
"dialogVisibleSelectUser"
title=
"选择使用员工"
@
success=
"selectedUser"
></SelectUser>
:defaultValues=
"selectedUserList"
:visible
.
sync=
"dialogVisibleSelectUser"
title=
"选择使用员工"
@
success=
"selectedUser"
></SelectUser>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
SelectMaterial
from
'@/components/SelectMaterial'
import
SelectMaterial
from
'@/components/SelectMaterial'
import
SelectUser
from
'@/components/SelectUser'
import
SelectUser
from
'@/components/SelectUser'
import
{
getList
}
from
'@/api/drainageCode/welcome'
import
{
getList
}
from
'@/api/drainageCode/welcome'
import
PreviewClient
from
'@/components/previewInMobileClient.vue'
import
PreviewClient
from
'@/components/previewInMobileClient.vue'
import
upload
from
'@/components/Upload'
import
upload
from
'@/components/Upload'
const
materialField
=
{
const
materialField
=
{
audioTime
:
''
,
// 音频时长
audioTime
:
''
,
// 音频时长
content
:
''
,
// 内容 小程序路径
content
:
''
,
// 内容 小程序路径
coverUrl
:
''
,
// 封面图
coverUrl
:
''
,
// 封面图
...
@@ -334,8 +183,8 @@ const materialField = {
...
@@ -334,8 +183,8 @@ const materialField = {
materialUrlError
:
''
,
materialUrlError
:
''
,
materialNameError
:
''
,
materialNameError
:
''
,
coverUrlError
:
''
coverUrlError
:
''
}
}
export
default
{
export
default
{
name
:
'welcome-detail'
,
name
:
'welcome-detail'
,
components
:
{
components
:
{
SelectMaterial
,
SelectMaterial
,
...
@@ -386,13 +235,13 @@ export default {
...
@@ -386,13 +235,13 @@ export default {
}
}
},
},
watch
:
{
watch
:
{
baseData
(
val
)
{
baseData
(
val
)
{
if
(
val
.
welcomeMsg
)
{
if
(
val
.
welcomeMsg
)
{
this
.
form
=
val
this
.
form
=
val
}
}
}
}
},
},
data
()
{
data
()
{
return
{
return
{
form
:
{
form
:
{
welcomeMsg
:
''
,
welcomeMsg
:
''
,
...
@@ -418,13 +267,13 @@ export default {
...
@@ -418,13 +267,13 @@ export default {
strTemplate2
:
'#客户昵称#'
strTemplate2
:
'#客户昵称#'
}
}
},
},
mounted
()
{
mounted
()
{
if
(
this
.
baseData
.
welcomeMsg
)
{
if
(
this
.
baseData
.
welcomeMsg
)
{
this
.
form
=
this
.
baseData
this
.
form
=
this
.
baseData
}
}
},
},
methods
:
{
methods
:
{
showType
(
type
)
{
showType
(
type
)
{
let
exit
=
true
let
exit
=
true
if
(
this
.
isSingle
)
{
if
(
this
.
isSingle
)
{
this
.
form
.
materialMsgList
.
forEach
((
dd
)
=>
{
this
.
form
.
materialMsgList
.
forEach
((
dd
)
=>
{
...
@@ -435,7 +284,7 @@ export default {
...
@@ -435,7 +284,7 @@ export default {
}
}
return
exit
return
exit
},
},
showMore
()
{
showMore
()
{
let
exit
=
true
let
exit
=
true
if
(
this
.
isSingle
)
{
if
(
this
.
isSingle
)
{
if
(
this
.
form
.
materialMsgList
.
length
===
1
)
{
if
(
this
.
form
.
materialMsgList
.
length
===
1
)
{
...
@@ -444,7 +293,7 @@ export default {
...
@@ -444,7 +293,7 @@ export default {
}
}
return
exit
return
exit
},
},
onSelectUser
()
{
onSelectUser
()
{
this
.
selectedUserList
=
[]
this
.
selectedUserList
=
[]
let
arr
=
[]
let
arr
=
[]
if
(
this
.
form
.
userIds
)
{
if
(
this
.
form
.
userIds
)
{
...
@@ -458,7 +307,7 @@ export default {
...
@@ -458,7 +307,7 @@ export default {
this
.
selectedUserList
=
arr
this
.
selectedUserList
=
arr
this
.
dialogVisibleSelectUser
=
true
this
.
dialogVisibleSelectUser
=
true
},
},
selectedUser
(
users
)
{
selectedUser
(
users
)
{
const
selectedUserList
=
users
.
map
((
d
)
=>
{
const
selectedUserList
=
users
.
map
((
d
)
=>
{
return
{
return
{
userId
:
d
.
id
||
d
.
userId
,
userId
:
d
.
id
||
d
.
userId
,
...
@@ -468,7 +317,7 @@ export default {
...
@@ -468,7 +317,7 @@ export default {
this
.
form
.
users
=
selectedUserList
this
.
form
.
users
=
selectedUserList
},
},
// 插入客户昵称
// 插入客户昵称
onInsert
(
val
)
{
onInsert
(
val
)
{
const
$textarea
=
this
.
$refs
.
msgTextarea
.
$el
.
children
[
0
]
const
$textarea
=
this
.
$refs
.
msgTextarea
.
$el
.
children
[
0
]
const
msg
=
this
.
form
.
welcomeMsg
const
msg
=
this
.
form
.
welcomeMsg
if
(
val
)
{
if
(
val
)
{
...
@@ -485,38 +334,38 @@ export default {
...
@@ -485,38 +334,38 @@ export default {
:
msg
.
replace
(
/
\#
客户昵称
\#
/
,
''
)
:
msg
.
replace
(
/
\#
客户昵称
\#
/
,
''
)
}
}
},
},
onChooseMaterial
(
materialType
,
rowIndex
)
{
onChooseMaterial
(
materialType
,
rowIndex
)
{
this
.
materialType
=
materialType
this
.
materialType
=
materialType
this
.
rowIndex
=
rowIndex
this
.
rowIndex
=
rowIndex
this
.
dialogVisibleSelectMaterial
=
true
this
.
dialogVisibleSelectMaterial
=
true
},
},
submitSelectMaterial
(
data
)
{
submitSelectMaterial
(
data
)
{
this
.
form
.
materialMsgList
.
splice
(
this
.
form
.
materialMsgList
.
splice
(
this
.
rowIndex
,
this
.
rowIndex
,
1
,
1
,
Object
.
assign
({},
this
.
form
.
materialMsgList
[
this
.
rowIndex
],
data
)
Object
.
assign
({},
this
.
form
.
materialMsgList
[
this
.
rowIndex
],
data
)
)
)
},
},
onChooseMaterialWel
()
{
onChooseMaterialWel
()
{
this
.
dialogVisibleSelectMaterialWel
=
true
this
.
dialogVisibleSelectMaterialWel
=
true
},
},
submitSelectMaterialWel
(
data
)
{
submitSelectMaterialWel
(
data
)
{
this
.
form
.
welcomeMsg
=
data
.
content
this
.
form
.
welcomeMsg
=
data
.
content
},
},
onInsertMaterial
(
e
)
{
onInsertMaterial
(
e
)
{
this
.
form
.
materialMsgList
.
push
({
this
.
form
.
materialMsgList
.
push
({
msgType
:
e
,
msgType
:
e
,
...
materialField
...
materialField
})
})
},
},
onRemoveMaterial
(
index
)
{
onRemoveMaterial
(
index
)
{
this
.
form
.
materialMsgList
.
splice
(
index
,
1
)
this
.
form
.
materialMsgList
.
splice
(
index
,
1
)
},
},
// 上一步
// 上一步
onBackStep
()
{
onBackStep
()
{
this
.
$emit
(
'update'
)
this
.
$emit
(
'update'
)
},
},
validateMaterial
()
{
validateMaterial
()
{
let
materialList
=
this
.
form
.
materialMsgList
let
materialList
=
this
.
form
.
materialMsgList
const
validateFields
=
{
const
validateFields
=
{
...
@@ -585,7 +434,7 @@ export default {
...
@@ -585,7 +434,7 @@ export default {
})
})
},
},
/** 获取欢迎语列表 */
/** 获取欢迎语列表 */
getWelList
()
{
getWelList
()
{
this
.
welLoading
=
true
this
.
welLoading
=
true
getList
(
this
.
welQuery
).
then
(({
rows
})
=>
{
getList
(
this
.
welQuery
).
then
(({
rows
})
=>
{
this
.
welList
=
rows
this
.
welList
=
rows
...
@@ -593,12 +442,57 @@ export default {
...
@@ -593,12 +442,57 @@ export default {
this
.
welLoading
=
false
this
.
welLoading
=
false
})
})
},
},
// 欢迎语确认按钮
// 欢迎语确认按钮
selectWelcome
()
{
selectWelcome
()
{
console
.
log
(
this
.
welSelected
)
this
.
form
.
welcomeMsg
=
this
.
welSelected
.
welcomeMsg
this
.
form
.
welcomeMsg
=
this
.
welSelected
.
welcomeMsg
this
.
getData
()
this
.
dialogVisibleSelectWel
=
false
this
.
dialogVisibleSelectWel
=
false
},
},
submit
()
{
getData
()
{
this
.
form
.
materialMsgList
=
[]
let
img
=
[]
let
imgText
=
[]
let
applet
=
[]
if
(
this
.
welSelected
.
picUrl
)
{
this
.
welSelected
.
picUrl
.
split
(
','
).
forEach
(
dd
=>
{
let
obj
=
{
materialUrl
:
dd
,
msgType
:
'0'
,
}
img
.
push
(
obj
)
})
}
if
(
this
.
welSelected
.
imageText
&&
this
.
welSelected
.
imageText
.
length
)
{
this
.
welSelected
.
imageText
.
forEach
(
dd
=>
{
let
obj
=
{
materialName
:
dd
.
imageTextTile
,
materialUrl
:
dd
.
imageTextUrl
,
msgType
:
'8'
}
imgText
.
push
(
obj
)
})
}
if
(
this
.
welSelected
.
applet
&&
this
.
welSelected
.
applet
.
length
)
{
this
.
welSelected
.
applet
.
forEach
(
cc
=>
{
let
obj
=
{
materialName
:
cc
.
appTile
,
digest
:
cc
.
appId
,
materialUrl
:
cc
.
appPath
,
coverUrl
:
cc
.
appPic
,
msgType
:
'9'
}
applet
.
push
(
obj
)
})
}
this
.
form
.
materialMsgList
.
push
(...
img
)
this
.
form
.
materialMsgList
.
push
(...
imgText
)
this
.
form
.
materialMsgList
.
push
(...
applet
)
this
.
$forceUpdate
()
// })
},
submit
()
{
if
(
!
this
.
form
.
welcomeMsg
)
{
if
(
!
this
.
form
.
welcomeMsg
)
{
this
.
welcomeMsgError
=
'请输入欢迎语'
this
.
welcomeMsgError
=
'请输入欢迎语'
return
return
...
@@ -632,11 +526,11 @@ export default {
...
@@ -632,11 +526,11 @@ export default {
}
}
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
::v-deep
.image-uploader
{
::v-deep
.image-uploader
{
.uploader-icon
{
.uploader-icon
{
width
:
120px
;
width
:
120px
;
height
:
114px
;
height
:
114px
;
...
@@ -646,15 +540,15 @@ export default {
...
@@ -646,15 +540,15 @@ export default {
width
:
100px
;
width
:
100px
;
height
:
94px
;
height
:
94px
;
}
}
}
}
.sub-des
{
.sub-des
{
font-size
:
12px
;
font-size
:
12px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
font-weight
:
400
;
color
:
#999999
;
color
:
#999999
;
}
}
.add-continue
{
.add-continue
{
cursor
:
pointer
;
cursor
:
pointer
;
font-size
:
14px
;
font-size
:
14px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
...
@@ -667,9 +561,9 @@ export default {
...
@@ -667,9 +561,9 @@ export default {
&:hover
{
&:hover
{
opacity
:
0.8
;
opacity
:
0.8
;
}
}
}
}
.my-cord
{
.my-cord
{
position
:
relative
;
position
:
relative
;
.operation
{
.operation
{
...
@@ -695,5 +589,5 @@ export default {
...
@@ -695,5 +589,5 @@ export default {
opacity
:
0.8
;
opacity
:
0.8
;
}
}
}
}
}
}
</
style
>
</
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