Compare commits

..

2 Commits

Author SHA1 Message Date
wangxiaoshuang 551620c3c3 1
continuous-integration/drone/push Build is passing Details
2025-06-19 17:44:31 +08:00
wangxiaoshuang 4540f39051 切换靶段时清空备注 2025-06-19 17:42:25 +08:00
2 changed files with 32 additions and 1 deletions

View File

@ -443,6 +443,17 @@ export default {
if (item.Type === 'number') { if (item.Type === 'number') {
this.limitBlur(item.Id, item.ValueType) this.limitBlur(item.Id, item.ValueType)
} }
if (question.Childrens.length > 0) {
this.resetChild(question.Childrens)
}
},
resetChild(obj) {
obj.forEach(i => {
this.resetData(i.Id)
if (i.Childrens && i.Childrens.length > 0) {
this.resetChild(i.Childrens)
}
})
}, },
limitBlur(qId, valueType) { limitBlur(qId, valueType) {
const value = this.questionForm[qId] const value = this.questionForm[qId]
@ -534,6 +545,9 @@ export default {
}, },
receiveMsg(event) { receiveMsg(event) {
}, },
resetData(v) {
this.questionForm[v] = null
},
resetFormItemData(v) { resetFormItemData(v) {
this.qsForm[v] = null this.qsForm[v] = null
}, },

View File

@ -434,8 +434,22 @@ export default {
setMeasuredData(measureData) { setMeasuredData(measureData) {
}, },
formItemChange() { formItemChange(val, question) {
this.formChanged = true this.formChanged = true
if (item.Type === 'number') {
this.limitBlur(item.Id, item.ValueType)
}
if (question.Childrens.length > 0) {
this.resetChild(question.Childrens)
}
},
resetChild(obj) {
obj.forEach(i => {
this.resetData(i.Id)
if (i.Childrens && i.Childrens.length > 0) {
this.resetChild(i.Childrens)
}
})
}, },
limitBlur(qId, valueType) { limitBlur(qId, valueType) {
const value = this.questionForm[qId] const value = this.questionForm[qId]
@ -524,6 +538,9 @@ export default {
}, },
receiveMsg(event) { receiveMsg(event) {
}, },
resetData(v) {
this.questionForm[v] = null
},
resetFormItemData(v) { resetFormItemData(v) {
this.qsForm[v] = null this.qsForm[v] = null
}, },