From 936613a1ca25187fcf2c436d6385403ba88ba2c4 Mon Sep 17 00:00:00 2001 From: danshihao Date: Mon, 12 Aug 2024 18:10:53 +0800 Subject: [PATCH] =?UTF-8?q?[update=2088204]=20=E6=8B=86=E5=88=86=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E7=BC=96=E8=BE=91-=E6=9D=A1=E6=AC=BE=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E4=B8=A2=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../documentSplit/modules/SplitAddForm.vue | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/views/documentTool/documentSplit/modules/SplitAddForm.vue b/src/views/documentTool/documentSplit/modules/SplitAddForm.vue index b02eab6..4f674d8 100644 --- a/src/views/documentTool/documentSplit/modules/SplitAddForm.vue +++ b/src/views/documentTool/documentSplit/modules/SplitAddForm.vue @@ -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) + } }, /** * 表格编辑