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 32d0e404
authored
Oct 18, 2021
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
群sop规则页面,执行群聊、执行时间、消息内容三个字段做必填校验
1 parent
cf27207e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
linkwe-ui/src/views/communityOperating/groupSOP/aev.vue
linkwe-ui/src/views/communityOperating/groupSOP/aev.vue
View file @
32d0e40
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<el-input
v-model=
"form.ruleName"
maxlength=
"30"
show-word-limit
placeholder=
"请输入"
clearable
/>
<el-input
v-model=
"form.ruleName"
maxlength=
"30"
show-word-limit
placeholder=
"请输入"
clearable
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"执行群聊"
>
<el-form-item
label=
"执行群聊"
prop=
"chatIdList"
>
<el-tag
size=
"medium"
v-for=
"(group, index) in customerGroups"
:key=
"index"
>
{{
group
.
groupName
}}
</el-tag>
<el-tag
size=
"medium"
v-for=
"(group, index) in customerGroups"
:key=
"index"
>
{{
group
.
groupName
}}
</el-tag>
<el-button
<el-button
type=
"primary"
type=
"primary"
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
></el-date-picker>
></el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item
label=
"消息内容"
>
<el-form-item
label=
"消息内容"
prop=
"content"
>
<div
class=
"content-left"
>
<div
class=
"content-left"
>
<el-button
class=
"create"
@
click=
"goRoute"
>
新建素材
</el-button>
<el-button
class=
"create"
@
click=
"goRoute"
>
新建素材
</el-button>
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
</el-button>
</el-button>
</div>
</div>
<div
v-for=
"url in form.picList"
:key=
"url"
class=
"image-wrapper"
>
<
!--
<
div
v-for=
"url in form.picList"
:key=
"url"
class=
"image-wrapper"
>
<el-image
:src=
"url"
fit=
"fit"
>
</el-image>
<el-image
:src=
"url"
fit=
"fit"
>
</el-image>
<el-button
icon=
"el-icon-close"
class=
"remove-btn"
size=
"mini"
@
click=
"removeImage(url)"
>
</el-button>
<el-button
icon=
"el-icon-close"
class=
"remove-btn"
size=
"mini"
@
click=
"removeImage(url)"
>
</el-button>
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
<upload
:fileUrl
.
sync=
"uploadImageUrl"
class=
"image-uploader"
>
<upload
:fileUrl
.
sync=
"uploadImageUrl"
class=
"image-uploader"
>
<i
class=
"el-icon-plus uploader-icon"
></i>
<i
class=
"el-icon-plus uploader-icon"
></i>
</upload>
</upload>
-->
</el-tab-pane>
</el-tab-pane>
<el-button
type=
"primary"
class=
"mt20"
@
click=
"dialogVisibleSelectMaterial = true"
>
从素材库选择
</el-button>
<el-button
type=
"primary"
class=
"mt20"
@
click=
"dialogVisibleSelectMaterial = true"
>
从素材库选择
</el-button>
...
@@ -194,10 +194,10 @@ export default {
...
@@ -194,10 +194,10 @@ export default {
ruleName
:
[{
required
:
true
,
message
:
'该项为必填项'
,
trigger
:
'blur'
}],
ruleName
:
[{
required
:
true
,
message
:
'该项为必填项'
,
trigger
:
'blur'
}],
title
:
[{
required
:
true
,
message
:
'该项为必填项'
,
trigger
:
'blur'
}],
title
:
[{
required
:
true
,
message
:
'该项为必填项'
,
trigger
:
'blur'
}],
chatIdList
:
[{
required
:
true
,
message
:
'该项为必填项'
,
trigger
:
'change'
}],
chatIdList
:
[{
required
:
true
,
message
:
'该项为必填项'
,
trigger
:
'change'
}],
startExeTime
:
[{
required
:
true
,
message
:
'该项为必填项'
,
trigger
:
'change'
}],
startExeTime
:
[{
type
:
'array'
,
required
:
true
,
message
:
'该项为必填项'
,
trigger
:
'change'
}],
content
:
[
content
:
[
// { required: true, message: '该项为必填项', trigger: 'change' },
// { required: true, message: '该项为必填项', trigger: 'change' },
{
validator
:
checkContent
,
trigger
:
'change'
}
{
required
:
true
,
validator
:
checkContent
,
trigger
:
'change'
}
]
]
})
})
}
}
...
@@ -210,6 +210,7 @@ export default {
...
@@ -210,6 +210,7 @@ export default {
this
.
form
.
stopExeTime
=
''
this
.
form
.
stopExeTime
=
''
}
else
{
}
else
{
;[
this
.
form
.
startExeTime
,
this
.
form
.
stopExeTime
]
=
dateRange
;[
this
.
form
.
startExeTime
,
this
.
form
.
stopExeTime
]
=
dateRange
// this.$nextTick(() => this.$refs.form.validateField('startExeTime'))
}
}
},
},
customerGroups
(
groups
)
{
customerGroups
(
groups
)
{
...
@@ -290,6 +291,14 @@ export default {
...
@@ -290,6 +291,14 @@ export default {
submit
()
{
submit
()
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
!
this
.
dateRange
.
length
)
{
this
.
msgError
(
'执行时间不能为空'
)
return
}
if
(
!
this
.
dateRange
.
length
)
{
this
.
msgError
(
'执行时间不能为空'
)
return
}
this
.
loading
=
true
this
.
loading
=
true
if
(
this
.
ruleId
)
{
if
(
this
.
ruleId
)
{
update
(
this
.
ruleId
,
this
.
form
)
update
(
this
.
ruleId
,
this
.
form
)
...
...
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