ecrf表单中分类问题bug修复

main
caiyiling 2025-03-10 16:10:41 +08:00
parent 33ac08f4e4
commit 381acf8d76
4 changed files with 86 additions and 72 deletions

View File

@ -743,6 +743,9 @@ export default {
}, },
formItemNumberChange(questionId, isTable) { formItemNumberChange(questionId, isTable) {
if (typeof isTable === 'object') {
this.$emit("setFormItemData", { key: isTable.Id, val: questionId, question: isTable });
} else {
if (isTable) { if (isTable) {
this.CalculationList.forEach((v, i) => { this.CalculationList.forEach((v, i) => {
var find = v.CalculateQuestionList.filter(o => { var find = v.CalculateQuestionList.filter(o => {
@ -770,6 +773,7 @@ export default {
} }
}) })
} }
}
// this.$emit('formItemNumberChange') // this.$emit('formItemNumberChange')
}, },
// formItemTableNumberChange() { // formItemTableNumberChange() {

View File

@ -472,6 +472,9 @@ export default {
} }
}, },
formItemNumberChange(questionId, isTable) { formItemNumberChange(questionId, isTable) {
if (typeof isTable === 'object') {
this.$emit("setFormItemData", { key: isTable.Id, val: questionId, question: isTable });
} else {
if (isTable) { if (isTable) {
this.calculationList.forEach((v, i) => { this.calculationList.forEach((v, i) => {
var find = v.CalculateQuestionList.filter(o => { var find = v.CalculateQuestionList.filter(o => {
@ -499,6 +502,7 @@ export default {
} }
}) })
} }
}
}, },
formItemChange(v, question) { formItemChange(v, question) {
if (question.Childrens.length > 0) { if (question.Childrens.length > 0) {

View File

@ -660,6 +660,9 @@ export default {
return num; return num;
}, },
formItemNumberChange(questionId, isTable) { formItemNumberChange(questionId, isTable) {
if (typeof isTable === 'object') {
this.$emit("setFormItemData", { key: isTable.Id, val: questionId, question: isTable });
} else {
if (isTable) { if (isTable) {
this.calculationList.forEach((v, i) => { this.calculationList.forEach((v, i) => {
var find = v.CalculateQuestionList.filter((o) => { var find = v.CalculateQuestionList.filter((o) => {
@ -687,6 +690,8 @@ export default {
} }
}); });
} }
}
// this.$emit('formItemNumberChange') // this.$emit('formItemNumberChange')
}, },
formItemTableNumberChange() { formItemTableNumberChange() {

View File

@ -167,6 +167,7 @@ export default {
// if (i.Type === 'number') { // if (i.Type === 'number') {
// this.$set(this.questionForm, i.Id, i.Answer) // this.$set(this.questionForm, i.Id, i.Answer)
// } // }
console.log('setChild')
if (i.Type === 'class') { if (i.Type === 'class') {
this.classArr.push({triggerId: i.ClassifyQuestionId, classId: i.Id, classifyAlgorithms: i.ClassifyAlgorithms, classifyType: i.ClassifyType}) this.classArr.push({triggerId: i.ClassifyQuestionId, classId: i.Id, classifyAlgorithms: i.ClassifyAlgorithms, classifyType: i.ClassifyType})
} }