Commit 568320bc by 匡雅琴

Merge branch 'kyq_dev' into 'v2.12.0'

校验调整

See merge request !30
2 parents 8cadd020 5d9f30a0
...@@ -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: 10px; margin-bottom: 15px;
} }
.footer-close { .footer-close {
text-align: center; text-align: center;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!