对接条款比对

This commit is contained in:
范强强
2024-02-27 16:01:02 +08:00
parent bfc81e9a46
commit d15d8871c9
@@ -18,7 +18,7 @@
<a-tree
class="draggable-tree"
:selected-keys="leftTreeSelectedKeys"
:replace-fields="{key: 'menuId'}"
:replace-fields="{key: 'id'}"
@select="onSelectLeft"
:tree-data="menuLeft">
<a-icon slot="switcherIcon" type="down" :style="{ fontSize: '12px', color: '#103770' }" />
@@ -35,9 +35,17 @@
<div class="standard-name">
<a-tooltip placement="topLeft">
<template #title>
{{ leftData.title }}
<span>{{ leftData.title }}</span>
<span v-if="similarityDegree">相似度
<span>{{similarityDegree}}</span>
<span>{{textContent}}</span>
</span>
</template>
<span>{{ leftData.title }}</span>
<span v-if="similarityDegree">相似度
<span style="color: red">{{similarityDegree}}</span>
<span>{{textContent}}</span>
</span>
</a-tooltip>
</div>
<div class="detail-content-left-scroll">
@@ -64,7 +72,7 @@
<a-tree
class="draggable-tree"
:selected-keys="rightTreeSelectedKeys"
:replace-fields="{key: 'menuId'}"
:replace-fields="{key: 'id'}"
@select="onSelectRight"
:tree-data="menuRight">
<a-icon slot="switcherIcon" type="down" :style="{ fontSize: '12px', color: '#103770' }" />
@@ -81,9 +89,17 @@
<div class="standard-name">
<a-tooltip placement="topLeft">
<template #title>
{{ rightData.title }}
<span>{{ rightData.title }}</span>
<span v-if="similarityDegree">相似度
<span>{{similarityDegree}}</span>
<span>{{textContent}}</span>
</span>
</template>
<span>{{ rightData.title }}</span>
<span v-if="similarityDegree">相似度
<span style="color: red">{{similarityDegree}}</span>
<span>{{textContent}}</span>
</span>
</a-tooltip>
</div>
<div class="detail-content-right-scroll">
@@ -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;