Commit 5d9f30a0 by 前端

校验调整

1 parent 018dd975
......@@ -303,7 +303,7 @@ export default {
data() {
// 奖励积分校验规则
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) {
callback(new Error('奖励积分不能为空'))
} else if (!reg.test(value)) {
......@@ -829,14 +829,35 @@ export default {
},
// 奖励模式切换
rewardTypeChange(itm) {
itm.rewardCount = ''
itm.triggerValue = ''
console.log(itm)
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) {
itm.repeatCount = ''
itm.triggerValue = ''
console.log(itm)
if (itm.rewardCount == 2) {
this.$nextTick(() => {
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() {
......@@ -920,7 +941,7 @@ export default {
console.log(res)
if (res && res.code == 0) {
this.$root.to([
'任务中心(自测)',
'任务中心',
'任务平台',
'任务管理',
'任务模板管理',
......@@ -1013,7 +1034,7 @@ export default {
width: 475px;
}
.el-form-item {
margin-bottom: 10px;
margin-bottom: 15px;
}
.footer-close {
text-align: center;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!