diff --git a/jero-web/src/views/documentTool/documentComparison/comparisonOfTerms.vue b/jero-web/src/views/documentTool/documentComparison/comparisonOfTerms.vue index 1826865..0c559a0 100644 --- a/jero-web/src/views/documentTool/documentComparison/comparisonOfTerms.vue +++ b/jero-web/src/views/documentTool/documentComparison/comparisonOfTerms.vue @@ -18,7 +18,7 @@ @@ -35,9 +35,17 @@
{{ leftData.title }} + 相似度: + {{similarityDegree}} + ({{textContent}}) +
@@ -64,7 +72,7 @@ @@ -81,9 +89,17 @@
{{ rightData.title }} + 相似度: + {{similarityDegree}} + ({{textContent}}) +
@@ -132,7 +148,9 @@ export default { textRight: '', textLeft: '', textLeftId: '', - textRightId: '' + textRightId: '', + similarityDegree: '', + textContent: '' } }, mounted () { @@ -149,6 +167,9 @@ export default { if (node.children && node.children.length > 0) { return } + this.leftTreeSelectedKeys = [node.id] + this.similarityDegree = '' + this.textContent = '' this.leftData = node this.getLeftDocumentSplitView() }, @@ -183,6 +204,9 @@ export default { if (node.children && node.children.length > 0) { return } + this.rightTreeSelectedKeys = [node.id] + this.similarityDegree = '' + this.textContent = '' this.rightData = node this.getRightDocumentSplitView() }, @@ -248,6 +272,15 @@ export default { this.loading = true clauseComparisonEvent(query).then((res) => { if (res.success) { + this.similarityDegree = res.result.similarityDegree + '%' + if (parseFloat(res.result.similarityDegree) < parseFloat('75%')) { + this.textContent = '不相似' + } else if (parseFloat(res.result.similarityDegree) >= parseFloat('75%') && parseFloat(res.result.similarityDegree) !== parseFloat('100%')) { + this.textContent = '相似' + } else if (parseFloat(res.result.similarityDegree) === parseFloat('100%')) { + this.textContent = '相同' + } + } else { } this.loading = false @@ -540,7 +573,7 @@ export default { .standard-name > span { font-size: 16px; font-family: PingFang SC-Semibold, PingFang SC, sans-serif; - font-weight: 600; + font-weight: 500; color: #1D2129; flex: 1; width: 0;