update 文档比对
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
<template>
|
||||
<internal-detail-page :title="$t('docTool.comparison.documentComparison')" :content-padding="0" :loading="loading">
|
||||
<internal-detail-page :title="$t('docTool.comparison.documentComparison')"
|
||||
:content-padding="0"
|
||||
:loading="loading"
|
||||
need-custom-back-func
|
||||
@back="handleBack">
|
||||
<template v-slot:titleRightCustom>
|
||||
<!--查看比对结果-->
|
||||
<a-button class="header-btn" type="primary" icon="eye" ghost @click="viewTheComparisonResultsClick">
|
||||
@@ -95,9 +99,9 @@
|
||||
</div>
|
||||
|
||||
<div class="submit-button">
|
||||
<a-button style="margin-right: 10px" type="primary" @click="consistentAssessmentClick()">{{ $t('docTool.comparison.consistentAssessment') }}
|
||||
<a-button style="margin-right: 10px" type="primary" @click="consistentAssessmentClick">{{ $t('docTool.comparison.consistentAssessment') }}
|
||||
</a-button>
|
||||
<a-button type="primary" @click="submit()">{{ $t('preservation') }}</a-button>
|
||||
<a-button type="primary" @click="submit">{{ $t('preservation') }}</a-button>
|
||||
</div>
|
||||
|
||||
<comparison-add-full-comment ref="comparisonAddFullComment"></comparison-add-full-comment>
|
||||
@@ -105,10 +109,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { postAction, getAction } from '../../../api/manage.js'
|
||||
// 添加全文评论弹框
|
||||
import ComparisonAddFullComment from './modules/ComparisonAddFullComment.vue'
|
||||
import InternalDetailPage from '../../../components/InternalDetailPage.vue'
|
||||
import { docComparsionConsistentAndSave, getComparisonDetail, clauseComparison } from '../../../api/documentToolApi.js'
|
||||
|
||||
export default {
|
||||
name: 'DocumentDataComparison',
|
||||
@@ -122,7 +126,8 @@ export default {
|
||||
resultData: {},
|
||||
isMatching: true, // 自动匹配是否开启
|
||||
dataLeft: {},
|
||||
dataRight: {}
|
||||
dataRight: {},
|
||||
pageFrom: null
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
@@ -130,11 +135,6 @@ export default {
|
||||
document.title = this.$t('docTool.comparison.documentComparison') + ' - ' + this.$t('edit')
|
||||
},
|
||||
methods: {
|
||||
goBack () {
|
||||
this.$router.push({
|
||||
path: '/documentTool/documentComparison'
|
||||
})
|
||||
},
|
||||
// 文档对比的一致按钮点击
|
||||
consistentAssessmentClick () {
|
||||
if (!this.dataLeft.id && !this.dataRight.id) {
|
||||
@@ -148,7 +148,7 @@ export default {
|
||||
comment: '一致'
|
||||
}
|
||||
this.loading = true
|
||||
postAction('/compare/sarFileCompareItemComment/add', query).then((res) => {
|
||||
docComparsionConsistentAndSave(query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.formInline = {}
|
||||
@@ -195,7 +195,7 @@ export default {
|
||||
comment: this.formInline.comment
|
||||
}
|
||||
this.loading = true
|
||||
postAction('/compare/sarFileCompareItemComment/add', query).then((res) => {
|
||||
docComparsionConsistentAndSave(query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.formInline = {}
|
||||
@@ -234,21 +234,20 @@ export default {
|
||||
},
|
||||
// 查看对比结果按钮点击
|
||||
viewTheComparisonResultsClick () {
|
||||
const newUrl = this.$router.resolve({
|
||||
path: '/comparisonResults',
|
||||
this.$router.push({
|
||||
path: '/documentTool/ComparisonResults',
|
||||
query: {
|
||||
id: this.$route.query.id,
|
||||
isDisplay: 2
|
||||
}
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
},
|
||||
// 添加全文评论按钮点击
|
||||
addFullTextCommentClick () {
|
||||
const query = {
|
||||
id: this.$route.query.id
|
||||
}
|
||||
postAction('/compare/sarFileCompareInfo/getComparisonDetail', query).then((res) => {
|
||||
getComparisonDetail(query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$refs.comparisonAddFullComment.open(res.result.comments || '')
|
||||
}
|
||||
@@ -265,7 +264,7 @@ export default {
|
||||
id: this.$route.query.id
|
||||
}
|
||||
this.loading = true
|
||||
postAction('/compare/sarFileCompareInfo/getComparisonDetail', query).then((res) => {
|
||||
getComparisonDetail(query).then((res) => {
|
||||
if (res.success) {
|
||||
this.resultData = res.result || {}
|
||||
} else {
|
||||
@@ -350,7 +349,7 @@ export default {
|
||||
rightId: this.dataRight.id
|
||||
}
|
||||
this.loadingText = true
|
||||
getAction('/compare/sarFileCompareItem/clauseComparison', query).then((res) => {
|
||||
clauseComparison(query).then((res) => {
|
||||
if (res.success) {
|
||||
this.loadingText = false
|
||||
this.resultData.textLeft[this.dataLeft.numIndex].itemsText = res.result[0]
|
||||
@@ -391,6 +390,11 @@ export default {
|
||||
return
|
||||
}
|
||||
}
|
||||
},
|
||||
handleBack () {
|
||||
this.$router.push({
|
||||
path: '/documentTool/documentComparison'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user