Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-task
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 568320bc
authored
Oct 25, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'kyq_dev' into 'v2.12.0'
校验调整 See merge request
!30
2 parents
8cadd020
5d9f30a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
8 deletions
src/views/task/addTask/index.vue
src/views/task/addTask/index.vue
View file @
568320b
...
@@ -303,7 +303,7 @@ export default {
...
@@ -303,7 +303,7 @@ export default {
data
()
{
data
()
{
// 奖励积分校验规则
// 奖励积分校验规则
const
validateAwardIntegral
=
(
rule
,
value
,
callback
)
=>
{
const
validateAwardIntegral
=
(
rule
,
value
,
callback
)
=>
{
let
reg
=
/
(
^
[
0-9
]{1}[
0-9
]
*$
)
|
(
^
[
0-9
]
*
\.[
0-9
]{2}
$
)
/
let
reg
=
/
(
^
[
0-9
]{1}[
0-9
]
*$
)
|
(
^
[
0-9
]
*
\.[
0-9
]{
0,
2}
$
)
/
if
(
!
value
)
{
if
(
!
value
)
{
callback
(
new
Error
(
'奖励积分不能为空'
))
callback
(
new
Error
(
'奖励积分不能为空'
))
}
else
if
(
!
reg
.
test
(
value
))
{
}
else
if
(
!
reg
.
test
(
value
))
{
...
@@ -829,14 +829,35 @@ export default {
...
@@ -829,14 +829,35 @@ export default {
},
},
// 奖励模式切换
// 奖励模式切换
rewardTypeChange
(
itm
)
{
rewardTypeChange
(
itm
)
{
itm
.
rewardCount
=
''
console
.
log
(
itm
)
itm
.
triggerValue
=
''
if
(
itm
.
rewardType
==
2
)
{
this
.
$nextTick
(()
=>
{
this
.
$set
(
itm
,
'triggerValue'
,
0
)
// itm.triggerValue = ''
})
}
else
{
this
.
$nextTick
(()
=>
{
this
.
$set
(
itm
,
'rewardCount'
,
'1'
)
// itm.rewardCount = ''
})
}
},
},
// 奖励次数切换
// 奖励次数切换
rewardCountChange
(
itm
)
{
rewardCountChange
(
itm
)
{
itm
.
repeatCount
=
''
if
(
itm
.
rewardCount
==
2
)
{
itm
.
triggerValue
=
''
this
.
$nextTick
(()
=>
{
console
.
log
(
itm
)
this
.
$set
(
itm
,
'repeatCount'
,
0
)
this
.
$set
(
itm
,
'triggerValue'
,
0
)
// itm.repeatCount = ''
// itm.triggerValue = ''
})
}
else
{
this
.
$nextTick
(()
=>
{
this
.
$set
(
itm
,
'triggerValue'
,
0
)
// itm.triggerValue = ''
})
}
},
},
// 基础信息表单验证
// 基础信息表单验证
basicFormValidate
()
{
basicFormValidate
()
{
...
@@ -920,7 +941,7 @@ export default {
...
@@ -920,7 +941,7 @@ export default {
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
&&
res
.
code
==
0
)
{
if
(
res
&&
res
.
code
==
0
)
{
this
.
$root
.
to
([
this
.
$root
.
to
([
'任务中心
(自测)
'
,
'任务中心'
,
'任务平台'
,
'任务平台'
,
'任务管理'
,
'任务管理'
,
'任务模板管理'
,
'任务模板管理'
,
...
@@ -1013,7 +1034,7 @@ export default {
...
@@ -1013,7 +1034,7 @@ export default {
width
:
475px
;
width
:
475px
;
}
}
.el-form-item
{
.el-form-item
{
margin-bottom
:
1
0
px
;
margin-bottom
:
1
5
px
;
}
}
.footer-close
{
.footer-close
{
text-align
:
center
;
text-align
:
center
;
...
...
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