update 文档对比

This commit is contained in:
赵霄
2023-09-20 09:38:51 +08:00
parent aab24bc7e7
commit 02385bd805
6 changed files with 58 additions and 56 deletions
+4 -2
View File
@@ -1,5 +1,4 @@
// 本地工具-即文档功能对应的接口 // 本地工具-即文档功能对应的接口
import { getAction, postAction } from './manage' import { getAction, postAction } from './manage'
// 文档拆分-发布 // 文档拆分-发布
@@ -21,6 +20,8 @@ const docComparsionConsistentAndSave = (params) => postAction('/compare/sarFileC
const getComparisonDetail = (params) => postAction('/compare/sarFileCompareInfo/getComparisonDetail', params) const getComparisonDetail = (params) => postAction('/compare/sarFileCompareInfo/getComparisonDetail', params)
// 文档对比-文档对比-自动匹配 // 文档对比-文档对比-自动匹配
const clauseComparison = (params) => getAction('/compare/sarFileCompareItem/clauseComparison', params) const clauseComparison = (params) => getAction('/compare/sarFileCompareItem/clauseComparison', params)
// 文档对比-添加全文评论
const addFullTextComment = (params) => postAction('/compare/sarFileCompareInfo/editComments', params)
export { export {
// 文档拆分 // 文档拆分
@@ -36,5 +37,6 @@ export {
submitInitComparsion, submitInitComparsion,
docComparsionConsistentAndSave, docComparsionConsistentAndSave,
getComparisonDetail, getComparisonDetail,
clauseComparison clauseComparison,
addFullTextComment
} }
@@ -137,7 +137,7 @@ import { previewPdf } from '../../../utils/previewPdf.js'
import { Base64 } from 'js-base64' import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import CommentList from '../modules/CommentList.vue' import CommentList from '../modules/CommentList.vue'
import ComparisonResultEditModal from '../modules/ComparisonResultEditModal.vue' import ComparisonResultEditModal from './modules/ComparisonResultEditModal.vue'
import InternalDetailPage from '../../../components/InternalDetailPage.vue' import InternalDetailPage from '../../../components/InternalDetailPage.vue'
export default { export default {
@@ -167,7 +167,7 @@ export default {
} }
}, },
mounted () { mounted () {
if (this.$route.query.isDisplay === 2) { if (this.$route.query.isDisplay === '2') {
this.isDisplay = false this.isDisplay = false
} else { } else {
this.isDisplay = true this.isDisplay = true
@@ -99,12 +99,15 @@
</div> </div>
<div class="submit-button"> <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>
<!--保存-->
<a-button type="primary" @click="submit">{{ $t('preservation') }}</a-button> <a-button type="primary" @click="submit">{{ $t('preservation') }}</a-button>
</div> </div>
<comparison-add-full-comment ref="comparisonAddFullComment"></comparison-add-full-comment> <!--全文评论-->
<comparison-add-full-comment ref="comparisonAddFullComment" />
</internal-detail-page> </internal-detail-page>
</template> </template>
@@ -112,7 +112,7 @@
</div> </div>
<a-form-model-item class="item-model" prop="remark"> <a-form-model-item class="item-model" prop="remark">
<a-textarea :placeholder="$t('pleaseEnter')+$t('docTool.comparison.remarkInfo')" <a-textarea :placeholder="$t('pleaseEnter')+$t('docTool.comparison.remarkInfo')"
:maxLength="300" :maxLength="500"
v-model="formInline.remark" v-model="formInline.remark"
:rows="4" /> :rows="4" />
</a-form-model-item> </a-form-model-item>
@@ -200,77 +200,67 @@ export default {
columns: [ columns: [
{ {
title: this.$t('number'), title: this.$t('number'),
align: 'left', width: 30,
width: 70,
customRender: function (t, r, index) { customRender: function (t, r, index) {
return parseInt(index) + 1 return parseInt(index) + 1
} }
}, },
{ {
title: this.$t('number'), title: this.$t('number'),
align: 'left',
ellipsis: true, ellipsis: true,
dataIndex: 'serialNumber', dataIndex: 'serialNumber',
width: 79 width: 100
}, },
{ {
title: this.$t('title'), title: this.$t('title'),
align: 'left',
ellipsis: true, ellipsis: true,
dataIndex: 'title', dataIndex: 'title',
width: 79 width: 100
}, },
{ {
title: this.$t('docTool.comparison.textStatus'), title: this.$t('docTool.comparison.textStatus'),
align: 'left',
ellipsis: true, ellipsis: true,
dataIndex: 'fileType', dataIndex: 'fileType',
width: 79 width: 100
}, },
{ {
title: this.$t('fileName'), title: this.$t('fileName'),
align: 'left',
ellipsis: true, ellipsis: true,
dataIndex: 'fileName', dataIndex: 'fileName',
width: 79 width: 100
} }
], ],
tableColumns: [ tableColumns: [
{ {
title: this.$t('number'), title: this.$t('number'),
align: 'left', width: 30,
width: 70,
customRender: function (t, r, index) { customRender: function (t, r, index) {
return parseInt(index) + 1 return parseInt(index) + 1
} }
}, },
{ {
title: this.$t('number'), title: this.$t('number'),
align: 'left',
ellipsis: true, ellipsis: true,
dataIndex: 'serialNumber', dataIndex: 'serialNumber',
width: 79 width: 100
}, },
{ {
title: this.$t('title'), title: this.$t('title'),
align: 'left',
ellipsis: true, ellipsis: true,
dataIndex: 'title', dataIndex: 'title',
width: 79 width: 100
}, },
{ {
title: this.$t('docTool.comparison.textStatus'), title: this.$t('docTool.comparison.textStatus'),
align: 'left',
ellipsis: true, ellipsis: true,
dataIndex: 'fileType', dataIndex: 'fileType',
width: 79 width: 100
}, },
{ {
title: this.$t('fileName'), title: this.$t('fileName'),
align: 'left',
ellipsis: true, ellipsis: true,
dataIndex: 'fileName', dataIndex: 'fileName',
width: 79 width: 100
} }
], ],
image: false, image: false,
@@ -26,7 +26,7 @@
</template> </template>
<script> <script>
import { putAction } from '../../../../api/manage.js' import { addFullTextComment } from '../../../../api/documentToolApi.js'
export default { export default {
name: 'ComparisonAddFullComment', name: 'ComparisonAddFullComment',
@@ -59,7 +59,7 @@ export default {
id: this.$route.query.id, id: this.$route.query.id,
comments: formInlineText.comment comments: formInlineText.comment
} }
putAction('/compare/sarFileCompareInfo/editComments', query).then((res) => { addFullTextComment(query).then((res) => {
if (res.success) { if (res.success) {
this.$message.success(this.$t('operationSuccessful')) this.$message.success(this.$t('operationSuccessful'))
this.visible = false this.visible = false
@@ -9,41 +9,42 @@
> >
<template slot="footer"> <template slot="footer">
<a-button key="back" @click="visible = false"> <a-button key="back" @click="visible = false">
{{$t('cancel')}} {{ $t('cancel') }}
</a-button> </a-button>
<a-button type="primary" :loading="confirmLoading" @click="fullTextCommentsSubmit"> <a-button type="primary" :loading="confirmLoading" @click="fullTextCommentsSubmit">
{{$t('submit')}} {{ $t('submit') }}
</a-button> </a-button>
</template> </template>
<a-form-model :model="formInlineText" class="formAdd" :rules="rulesText" ref="ruleFormText"> <a-form-model :model="formInlineText" class="formAdd" :rules="rulesText" ref="ruleFormText">
<div class="box-title-text" v-if="title === $t('docTool.comparison.fullTextComments')"> <a-form-model-item class="item-model"
<div class="title-text" :title="$t('docTool.comparison.fullTextComments')"> prop="comment"
<span class="title-text-text">{{$t('docTool.comparison.fullTextComments')}}</span> v-if="title === $t('docTool.comparison.fullTextComments')"
</div> :labelCol="labelCol"
<a-form-model-item class="item-model" style="width: calc(100% - 113px)" prop="comment"> :wrapperCol="wrapperCol"
<a-textarea :placeholder="$t('pleaseEnter') + $t('docTool.comparison.fullTextComments')" :label="$t('docTool.comparison.fullTextComments')">
v-model.trim="formInlineText.comment" <a-textarea :placeholder="$t('pleaseEnter') + $t('docTool.comparison.fullTextComments')"
:maxLength="500" v-model.trim="formInlineText.comment"
:rows="4"/> :maxLength="500"
</a-form-model-item> :rows="4" />
</div> </a-form-model-item>
<div class="box-title-text" v-if="title === $t('docTool.comparison.comparativeComments')"> <a-form-model-item class="item-model"
<div class="title-text" :title="$t('docTool.comparison.comparativeComments')"> prop="comment"
<span class="title-text-text">{{$t('docTool.comparison.comparativeComments')}}</span> v-if="title === $t('docTool.comparison.comparativeComments')"
</div> :labelCol="labelCol"
<a-form-model-item class="item-model" style="width: calc(100% - 113px)" prop="comment"> :wrapperCol="wrapperCol"
<a-textarea :placeholder="$t('pleaseEnter')+$t('docTool.comparison.comparativeComments')" :label="$t('docTool.comparison.comparativeComments')">
v-model.trim="formInlineText.comment" <a-textarea :placeholder="$t('pleaseEnter')+$t('docTool.comparison.comparativeComments')"
:maxLength="500" v-model.trim="formInlineText.comment"
:rows="4"/> :maxLength="500"
</a-form-model-item> :rows="4" />
</div> </a-form-model-item>
</a-form-model> </a-form-model>
</a-modal> </a-modal>
</template> </template>
<script> <script>
import { putAction } from '@/api/manage' import { putAction } from '../../../../api/manage.js'
import { addFullTextComment } from '../../../../api/documentToolApi.js'
export default { export default {
name: 'ComparisonResultEditModal', name: 'ComparisonResultEditModal',
@@ -53,7 +54,13 @@ export default {
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
formInlineText: {}, formInlineText: {},
rulesText: {} rulesText: {},
labelCol: {
span: 5
},
wrapperCol: {
span: 18
}
} }
}, },
methods: { methods: {
@@ -86,7 +93,7 @@ export default {
id: this.$route.query.id, id: this.$route.query.id,
comments: this.formInlineText.comment comments: this.formInlineText.comment
} }
putAction('/compare/sarFileCompareInfo/editComments', query).then((res) => { addFullTextComment(query).then((res) => {
if (res.success) { if (res.success) {
this.$message.success(this.$t('operationSuccessful')) this.$message.success(this.$t('operationSuccessful'))
this.visible = false this.visible = false
@@ -123,5 +130,5 @@ export default {
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
@import'~@assets/less/common.less'; @import '~../../../../assets/less/common.less';
</style> </style>