Commit 25e44be7 by 前端

bug修复

1 parent 08c91b69
...@@ -241,7 +241,9 @@ ...@@ -241,7 +241,9 @@
" "
style="margin-left: 8px" style="margin-left: 8px"
v-model="itm.repeatFlag" v-model="itm.repeatFlag"
@change="repeatChange(itm, itm.repeatFlag)" @change="
repeatChange(index, itm, itm.repeatFlag, index1)
"
>不限制</el-checkbox >不限制</el-checkbox
> >
</el-form-item> </el-form-item>
...@@ -732,6 +734,7 @@ export default { ...@@ -732,6 +734,7 @@ export default {
// task -- 具体哪个任务 // task -- 具体哪个任务
// taskIndex -- 具体任务索引 // taskIndex -- 具体任务索引
this.taskList[dateTaskIndex].missionList.splice(taskIndex, 1) this.taskList[dateTaskIndex].missionList.splice(taskIndex, 1)
this.$refs['taskForm'][dateTaskIndex].clearValidate()
}, },
handleBlur(dateTask) { handleBlur(dateTask) {
if (dateTask.repeatCount) { if (dateTask.repeatCount) {
...@@ -739,11 +742,17 @@ export default { ...@@ -739,11 +742,17 @@ export default {
} }
}, },
// 重复次数选择框改变 // 重复次数选择框改变
repeatChange(dateTask, type) { repeatChange(listindex, dateTask, type, taskIndex) {
// dateTask.repeatFlag = !dateTask.repeatFlag // dateTask.repeatFlag = !dateTask.repeatFlag
// this.$nextTick(() => { // this.$nextTick(() => {
if (type) { if (type) {
dateTask.repeatCount = -1 // dateTask.repeatCount = -1
// 去除校验
this.$refs['taskForm'][listindex].fields.map((i) => {
if (i.prop === 'missionList.' + taskIndex + '.repeatCount') {
i.clearValidate()
}
})
} else { } else {
// this.$nextTick(() => { // this.$nextTick(() => {
// dateTask.repeatCount = '' // dateTask.repeatCount = ''
...@@ -905,6 +914,15 @@ export default { ...@@ -905,6 +914,15 @@ export default {
}, },
// 提交任务 // 提交任务
submitTask() { submitTask() {
// 遍历重复次数
this.taskList.map((item) => {
item.missionList.map((itm) => {
// itm.repeatCount = itm.repeatCount ? itm.repeatCount : -1
if (itm.repeatCount || itm.repeatFlag) {
itm.repeatCount = itm.repeatCount ? itm.repeatCount : -1
}
})
})
try { try {
this.basicFormValidate() this.basicFormValidate()
} catch (err) { } catch (err) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!