分割标记与表格问题进行绑定

main
wangxiaoshuang 2026-05-20 09:12:19 +08:00
parent efc3b03392
commit db3f7b4cde
2 changed files with 14 additions and 4 deletions

View File

@ -647,7 +647,7 @@ export default {
let res = await submitTableQuestion(params)
if (res.IsSuccess) {
this.QuestionsForm.RowId = res.Result.RowId
obj.rowId = res.Result.RowId
// obj.rowId = res.Result.RowId
data.RowId = res.Result.RowId
this.AnswersList.push(this.QuestionsForm)
this.$emit('setFormItemData', { key: this.question.Id, val: this.AnswersList, question: this.question })
@ -1375,7 +1375,7 @@ export default {
//
this.$set(this.questionForm, obj.question.Id, null)
}
if (obj.question.IsTableQuestion && obj.operateStateEnum === 4) {
if (obj.question.IsTableQuestion && (obj.operateStateEnum === 4 || obj.operateStateEnum === 24)) {
//
this.$set(this.QuestionsForm, obj.question.Id, null)
} else if (obj.question.IsTableQuestion && obj.operateStateEnum === 7 && this.question.Id === obj.question.ParentQsId) {

View File

@ -545,7 +545,16 @@ export default {
const { question } = obj
let confirm = await this.$confirm(this.$t('segment:confirm:sureDelete'))
if (!confirm) return false
this.$set(this.questionForm, question.Id, '')
if (this.isTableQuestion) {
this.questionForm[question.ParentQsId].some((item, index) => {
if (item.RowId === question.RowId) {
this.$set(this.questionForm[question.ParentQsId][index], question.Id, '')
}
return item.RowId === question.RowId
})
} else {
this.$set(this.questionForm, question.Id, '')
}
let o = {
Answer: '',
SegmentId: null,
@ -1555,4 +1564,5 @@ export default {
// min-height:400px;
// color: #ddd;
// }</style>
// }
</style>