From bfc81e9a466334c3fb31887fb7c4bcaee12eeb82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Tue, 27 Feb 2024 15:37:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=9D=A1=E6=AC=BE=E6=AF=94?= =?UTF-8?q?=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../documentComparison/comparisonOfTerms.vue | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/jero-web/src/views/documentTool/documentComparison/comparisonOfTerms.vue b/jero-web/src/views/documentTool/documentComparison/comparisonOfTerms.vue index f393e69..1826865 100644 --- a/jero-web/src/views/documentTool/documentComparison/comparisonOfTerms.vue +++ b/jero-web/src/views/documentTool/documentComparison/comparisonOfTerms.vue @@ -130,7 +130,9 @@ export default { leftData: {}, rightData: {}, textRight: '', - textLeft: '' + textLeft: '', + textLeftId: '', + textRightId: '' } }, mounted () { @@ -144,7 +146,7 @@ export default { // 左侧树选择 onSelectLeft (selectedKeys, exports) { const node = exports.node.$vnode.data.props.dataRef - if (!node.pid) { + if (node.children && node.children.length > 0) { return } this.leftData = node @@ -161,13 +163,16 @@ export default { this.loading = true documentSplitView(query).then((res) => { if (res.success) { - if (res.result.records && res.result.records.length > 0){ + if (res.result.records && res.result.records.length > 0) { this.textLeft = res.result.records[0].item_content + this.textLeftId = res.result.records[0].id } else { this.textLeft = '' + this.textLeftId = '' } } else { this.textLeft = '' + this.textLeftId = '' } this.loading = false }) @@ -175,7 +180,7 @@ export default { // 右侧树选择 onSelectRight (selectedKeys, exports) { const node = exports.node.$vnode.data.props.dataRef - if (!node.pid) { + if (node.children && node.children.length > 0) { return } this.rightData = node @@ -193,13 +198,16 @@ export default { this.loading = true documentSplitView(query).then((res) => { if (res.success) { - if (res.result.records && res.result.records.length > 0){ + if (res.result.records && res.result.records.length > 0) { this.textRight = res.result.records[0].item_content + this.textRightId = res.result.records[0].id } else { this.textRight = '' + this.textRightId = '' } } else { this.textRight = '' + this.textRightId = '' } this.loading = false }) @@ -227,20 +235,22 @@ export default { }) }, comparisonClick () { - if (!this.leftData.id) { + if (!this.textLeftId) { this.$message.warning('请选择左侧条款') - } else if (!this.rightData.id) { + } else if (!this.textRightId) { this.$message.warning('请选择右侧条款') } else { const query = { - oldItemId: this.leftData.id, - newItemId: this.rightData.id, + oldItemId: this.textLeftId, + newItemId: this.textRightId, standHisId: this.$route.query.id } + this.loading = true clauseComparisonEvent(query).then((res) => { if (res.success) { } + this.loading = false }) } }