[update 88204] 拆分详情编辑-条款内容丢失

This commit is contained in:
danshihao
2024-08-12 18:10:53 +08:00
parent ed2d429b8f
commit 936613a1ca
@@ -504,8 +504,6 @@ export default {
},
// 增加条款内容成功
handleAddOk (type, content) {
const headerArr = this.contentList.splice(0, this.addIndex + 1)
const footerArr = this.contentList.splice(-this.addIndex)
const insertArr = []
switch (type) {
case TypeOfClauseItem.TEXT.value:
@@ -531,16 +529,6 @@ export default {
})
})
}
// if (content.file.response.result && content.file.response.result.url) {
// console.log(content.file.response.result.id)
// insertArr[0] = {
// id: '',
// uuid: randomUUID(),
// type: TypeOfClauseItem.IMG.value,
// itemContent: content.file.response.result.url,
// thumbUrl: window._CONFIG.domianURL + '/sys/split/file/getImage?fileName=' + content.file.response.result.fileName
// }
// }
break
case TypeOfClauseItem.TABLE.value:
insertArr[0] = {
@@ -550,7 +538,11 @@ export default {
itemContent: content[0]
}
}
this.contentList = [...headerArr, ...insertArr, ...footerArr]
if (this.addIndex !== -1) {
this.contentList.splice(this.addIndex + 1, 0, ...insertArr)
} else {
this.contentList.push(...insertArr)
}
},
/**
* 表格编辑