update 文档比对
This commit is contained in:
+127
-131
@@ -1,167 +1,148 @@
|
||||
<template>
|
||||
<a-spin :spinning="loading">
|
||||
<div class="doc-detail-wrap">
|
||||
<div class="doc-detail-header">
|
||||
<div class="doc-detail-title">
|
||||
<span style="line-height: 66px;display: inline-block;float: left" @click="goBack">
|
||||
<a-icon type="arrow-left" style="margin-right: 6px;"/>
|
||||
</span>
|
||||
<span> {{$t('docTool.comparison.comparisonResults')}}</span>
|
||||
</div>
|
||||
<div class="doc-detail-right">
|
||||
<div @click="viewVarianceAssessmentClick"
|
||||
class="operator-text-text"
|
||||
:class="{'operator-text-text-text': isVarianceOne}"
|
||||
:title="$t('docTool.comparison.viewVarianceAssessment')">
|
||||
<a-icon type="eye"/>
|
||||
{{$t('docTool.comparison.viewVarianceAssessment')}}
|
||||
<internal-detail-page :loading="loading" :title="$t('docTool.comparison.comparisonResults')" :content-padding="0">
|
||||
<template #titleRightCustom>
|
||||
<!--查看差异项-->
|
||||
<a-button type="primary" ghost class="header-btn" icon="eye" @click="viewVarianceAssessmentClick">
|
||||
{{ $t('docTool.comparison.viewVarianceAssessment') }}
|
||||
</a-button>
|
||||
<!--查看一致项-->
|
||||
<a-button type="primary" ghost class="header-btn" icon="eye" @click="viewConsistentAssessmentClick">
|
||||
{{ $t('docTool.comparison.viewConsistentAssessment') }}
|
||||
</a-button>
|
||||
<!--查看全部-->
|
||||
<a-button type="primary" ghost class="header-btn" icon="eye" @click="viewAllClick">
|
||||
{{ $t('docTool.comparison.viewAll') }}
|
||||
</a-button>
|
||||
<!--导出对比报告-->
|
||||
<a-button type="primary" ghost class="header-btn" icon="export" @click="exportComparisonReportClick">
|
||||
{{ $t('docTool.comparison.exportComparisonReport') }}
|
||||
</a-button>
|
||||
<!--评论-->
|
||||
<a-button type="primary" ghost class="header-btn" icon="message" @click="commentClick">
|
||||
{{ $t('docTool.comparison.comment') }}
|
||||
</a-button>
|
||||
</template>
|
||||
|
||||
<div class="detail-content">
|
||||
<div class="detail-content-header">
|
||||
<a-checkbox @change="onChange" :indeterminate="indeterminate" :checked="checkAll" style="margin-left: 20px;float: left"></a-checkbox>
|
||||
<div class="detail-content-header-content">
|
||||
<div class="detail-content-header-content-left"
|
||||
:title="resultData.serialNumberLeft + resultData.fileNameLeft"
|
||||
:class="{'detail-content-header-content-left-active': isDisplay}">
|
||||
{{ $t('docTool.comparison.selectedStandard') }}:{{ resultData.serialNumberLeft }}
|
||||
<span style="cursor: pointer"
|
||||
@click="fileClick(resultData.fileNameLeft,resultData.fileIdLeft)">{{ resultData.fileNameLeft }}</span>
|
||||
</div>
|
||||
<div @click="viewConsistentAssessmentClick" class="operator-text-text"
|
||||
:class="{'operator-text-text-text': isVarianceTwo}"
|
||||
:title="$t('docTool.comparison.viewConsistentAssessment')">
|
||||
<a-icon type="eye"/>
|
||||
{{$t('docTool.comparison.viewConsistentAssessment')}}
|
||||
<div class="detail-content-header-content-content"
|
||||
:title="resultData.serialNumberRight + resultData.fileNameRight"
|
||||
:class="{'detail-content-header-content-left-active':isDisplay}">
|
||||
{{ $t('docTool.comparison.selectedStandard') }}:{{ resultData.serialNumberRight }}
|
||||
<span style="cursor: pointer"
|
||||
@click="fileClick(resultData.fileNameRight,resultData.fileIdRight)">{{ resultData.fileNameRight }}</span>
|
||||
</div>
|
||||
<div @click="viewAllClick" class="operator-text-text"
|
||||
:class="{'operator-text-text-text': isVarianceThe}"
|
||||
:title="$t('docTool.comparison.viewAll')">
|
||||
<a-icon type="eye"/>
|
||||
{{$t('docTool.comparison.viewAll')}}
|
||||
<div class="detail-content-header-content-rightOne"
|
||||
:class="{'detail-content-header-content-rightOne-active':isDisplay}"
|
||||
:title="$t('docTool.comparison.comparisonDifferenceComment')">
|
||||
{{ $t('docTool.comparison.comparisonDifferenceComment') }}
|
||||
</div>
|
||||
<div @click="exportComparisonReportClick" class="operator-text-text"
|
||||
:title="$t('docTool.comparison.exportComparisonReport')">
|
||||
<a-icon type="export" :rotate="-90"/>
|
||||
{{$t('docTool.comparison.exportComparisonReport')}}
|
||||
</div>
|
||||
<div @click="commentClick" class="operator-text-text"
|
||||
:title="$t('docTool.comparison.comment')">
|
||||
<a-icon type="message"/>
|
||||
{{$t('docTool.comparison.comment')}}
|
||||
<div class="detail-content-header-content-right" v-if="!isDisplay">
|
||||
{{ $t('operation') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="">
|
||||
<div class="detail-content">
|
||||
<div class="detail-content-header" style="margin-bottom: 20px">
|
||||
<a-checkbox @change="onChange" :indeterminate="indeterminate" :checked="checkAll"
|
||||
style="margin-left: 20px;float: left"></a-checkbox>
|
||||
<div class="detail-content-header-content">
|
||||
<div class="detail-content-header-content-left"
|
||||
:title="resultData.serialNumberLeft + resultData.fileNameLeft"
|
||||
:class="{'detail-content-header-content-left-active': isDisplay}">
|
||||
{{$t('docTool.comparison.selectedStandard')}}:{{resultData.serialNumberLeft}}
|
||||
<span style="cursor: pointer"
|
||||
@click="fileClick(resultData.fileNameLeft,resultData.fileIdLeft)">{{resultData.fileNameLeft}}</span>
|
||||
</div>
|
||||
<div class="detail-content-header-content-content"
|
||||
:title="resultData.serialNumberRight + resultData.fileNameRight"
|
||||
:class="{'detail-content-header-content-left-active':isDisplay}">
|
||||
{{$t('docTool.comparison.selectedStandard')}}:{{resultData.serialNumberRight}}
|
||||
<span style="cursor: pointer"
|
||||
@click="fileClick(resultData.fileNameRight,resultData.fileIdRight)">{{resultData.fileNameRight}}</span>
|
||||
</div>
|
||||
<div class="detail-content-header-content-rightOne"
|
||||
:class="{'detail-content-header-content-rightOne-active':isDisplay}"
|
||||
:title="$t('docTool.comparison.comparisonDifferenceComment')">
|
||||
{{$t('docTool.comparison.comparisonDifferenceComment')}}
|
||||
</div>
|
||||
<div class="detail-content-header-content-right" v-if="!isDisplay">
|
||||
{{$t('operation')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a-checkbox-group @change="checkboxChange" v-model="checkboxList"
|
||||
style="width: 100%;height: calc(100vh - 300px)">
|
||||
<div class="detail-content-content" v-for="(item,index) in resultData.resList" :key="index">
|
||||
<a-checkbox :value="item.id" class="detail-checkbox"></a-checkbox>
|
||||
<div class="detail-content-content-text"
|
||||
:class="{'detail-content-content-text-color':checkboxList.join(',').includes(item.id)}">
|
||||
<div class="detail-content-content-text-left"
|
||||
:class="{'detail-content-content-text-dis':isDisplay}">
|
||||
<div class="detail-content-left">
|
||||
<div class="detail-content-left-top">
|
||||
<span>{{item.itemsNumLeft}}</span>
|
||||
<span style="margin-left: 10px">{{item.itemsNameLeft}}</span>
|
||||
</div>
|
||||
<div class="detail-content-left-button" v-html="item.itemsTextLeft"></div>
|
||||
</div>
|
||||
<div class="detail-content-right">
|
||||
<div class="detail-content-left-top">
|
||||
<span>{{item.itemsNumRight}}</span>
|
||||
<span style="margin-left: 10px">{{item.itemsNameRight}}</span>
|
||||
</div>
|
||||
<div class="detail-content-left-button" v-html="item.itemsTextRight"></div>
|
||||
</div>
|
||||
<div class="detail-content-right-one">
|
||||
<div class="detail-content-left-button">
|
||||
{{item.comment}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="detail-content-bottom"-->
|
||||
<!-- :class="{'detail-content-bottom-color':checkboxList.join(',').includes(item.id)}">-->
|
||||
<!-- <div class="detail-content-bottom-left"-->
|
||||
<!-- :class="{'detail-content-bottom-left-text':language == 'en-us' ? true:false}"-->
|
||||
<!-- :title="$t('docTool.comparison.comparisonDifferenceComment')">-->
|
||||
<!-- <a-icon type="message"/>-->
|
||||
<!-- {{$t('docTool.comparison.comparisonDifferenceComment')}}:-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="detail-content-bottom-right"-->
|
||||
<!-- :class="{'detail-content-bottom-right-text':language == 'en-us' ? true:false}">-->
|
||||
<!-- {{item.comment}}-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="detail-content-content-text-right" v-if="!isDisplay">
|
||||
<span class="text-button-one">
|
||||
<a class="text-button" @click="comparaEdit(item)">{{$t('edit')}}</a>
|
||||
<a class="text-button" @click="comparaDelete(item)">{{$t('delete')}}</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-checkbox-group>
|
||||
<div class="detail-content-content">
|
||||
<a-checkbox @change="fullCheckboxChange" v-model="fullCheckbox" class="detail-checkbox">
|
||||
</a-checkbox>
|
||||
<div class="detail-content-content-text" :class="{'detail-content-content-text-color':fullCheckbox}">
|
||||
<div class="scroll-content">
|
||||
<a-checkbox-group @change="checkboxChange" v-model="checkboxList">
|
||||
<div class="detail-content-content" v-for="(item,index) in resultData.resList" :key="index">
|
||||
<a-checkbox :value="item.id" class="detail-checkbox"></a-checkbox>
|
||||
<div class="detail-content-content-text"
|
||||
:class="{'detail-content-content-text-color':checkboxList.join(',').includes(item.id)}">
|
||||
<div class="detail-content-content-text-left"
|
||||
:class="{'detail-content-content-text-dis':isDisplay}">
|
||||
<div class="detail-content-content-text-left-text" :title="resultData.comments">
|
||||
<span>{{$t('docTool.comparison.fullTextComments')}}:</span> {{resultData.comments}}
|
||||
<div class="detail-content-left">
|
||||
<div class="detail-content-left-top">
|
||||
<span>{{ item.itemsNumLeft }}</span>
|
||||
<span style="margin-left: 10px">{{ item.itemsNameLeft }}</span>
|
||||
</div>
|
||||
<div class="detail-content-left-button" v-html="item.itemsTextLeft"></div>
|
||||
</div>
|
||||
<div class="detail-content-right">
|
||||
<div class="detail-content-left-top">
|
||||
<span>{{ item.itemsNumRight }}</span>
|
||||
<span style="margin-left: 10px">{{ item.itemsNameRight }}</span>
|
||||
</div>
|
||||
<div class="detail-content-left-button" v-html="item.itemsTextRight"></div>
|
||||
</div>
|
||||
<div class="detail-content-right-one">
|
||||
<div class="detail-content-left-button">
|
||||
{{ item.comment }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="detail-content-bottom"-->
|
||||
<!-- :class="{'detail-content-bottom-color':checkboxList.join(',').includes(item.id)}">-->
|
||||
<!-- <div class="detail-content-bottom-left"-->
|
||||
<!-- :class="{'detail-content-bottom-left-text':language == 'en-us' ? true:false}"-->
|
||||
<!-- :title="$t('docTool.comparison.comparisonDifferenceComment')">-->
|
||||
<!-- <a-icon type="message"/>-->
|
||||
<!-- {{$t('docTool.comparison.comparisonDifferenceComment')}}:-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="detail-content-bottom-right"-->
|
||||
<!-- :class="{'detail-content-bottom-right-text':language == 'en-us' ? true:false}">-->
|
||||
<!-- {{item.comment}}-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="detail-content-content-text-right" v-if="!isDisplay">
|
||||
<span class="text-button-one">
|
||||
<a class="text-button" @click="fullTextEdit">{{$t('edit')}}</a>
|
||||
<!-- <a class="text-button">{{$t('delete')}}</a>-->
|
||||
<a class="text-button" @click="comparaEdit(item)">{{ $t('edit') }}</a>
|
||||
<a class="text-button" @click="comparaDelete(item)">{{ $t('delete') }}</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-checkbox-group>
|
||||
</div>
|
||||
<div class="detail-content-content">
|
||||
<a-checkbox @change="fullCheckboxChange" v-model="fullCheckbox" class="detail-checkbox">
|
||||
</a-checkbox>
|
||||
<div class="detail-content-content-text" :class="{'detail-content-content-text-color':fullCheckbox}">
|
||||
<div class="detail-content-content-text-left"
|
||||
:class="{'detail-content-content-text-dis':isDisplay}">
|
||||
<div class="detail-content-content-text-left-text" :title="resultData.comments">
|
||||
<span>{{ $t('docTool.comparison.fullTextComments') }}:</span> {{ resultData.comments }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-content-text-right" v-if="!isDisplay">
|
||||
<span class="text-button-one">
|
||||
<a class="text-button" @click="fullTextEdit">{{ $t('edit') }}</a>
|
||||
<!-- <a class="text-button">{{$t('delete')}}</a>-->
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<commentList ref="commentListRef"/>
|
||||
<commentList ref="commentListRef" />
|
||||
<comparison-result-edit-modal ref="comparisonResultEditModal" @ok="getData"></comparison-result-edit-modal>
|
||||
<div id="images">
|
||||
<div class="image" v-viewer="{movable: false}">
|
||||
<img v-show="image" :src="imageUrl">
|
||||
</div>
|
||||
</div>
|
||||
</a-spin>
|
||||
</internal-detail-page>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, downloadFile, deleteAction, getFileAccessHttpUrl } from '@/api/manage'
|
||||
import { previewPdf } from '@/utils/previewPdf'
|
||||
import { getAction, downloadFile, deleteAction, getFileAccessHttpUrl } from '../../../api/manage.js'
|
||||
import { previewPdf } from '../../../utils/previewPdf.js'
|
||||
import { Base64 } from 'js-base64'
|
||||
import { mapGetters } from 'vuex'
|
||||
import CommentList from './CommentList'
|
||||
import ComparisonResultEditModal from './ComparisonResultEditModal'
|
||||
import CommentList from '../modules/CommentList.vue'
|
||||
import ComparisonResultEditModal from '../modules/ComparisonResultEditModal.vue'
|
||||
import InternalDetailPage from '../../../components/InternalDetailPage.vue'
|
||||
|
||||
export default {
|
||||
name: 'ComparisonResults',
|
||||
components: { CommentList, ComparisonResultEditModal },
|
||||
components: { CommentList, ComparisonResultEditModal, InternalDetailPage },
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
@@ -380,6 +361,7 @@ export default {
|
||||
line-height: 68px;
|
||||
}
|
||||
}
|
||||
|
||||
.doc-detail-right {
|
||||
width: 600px;
|
||||
line-height: 68px;
|
||||
@@ -409,13 +391,19 @@ export default {
|
||||
padding: 24px 32px 0 32px;
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
margin-top: 68px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.scroll-content {
|
||||
height: calc(100% - 76px - 71px - 24px);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.detail-content-header {
|
||||
width: 100%;
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.detail-content-header-content {
|
||||
@@ -724,4 +712,12 @@ export default {
|
||||
.operator-text-text-text {
|
||||
color: #00B3BE !important;
|
||||
}
|
||||
|
||||
.header-btn {
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
.header-btn:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -34,11 +34,14 @@
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<!--发起对比-->
|
||||
<!-- v-has="'documentComparison:Initiate'"-->
|
||||
<a-button icon="block" type="primary" ghost @click="initiatingProcessClick">{{ $t('docTool.comparison.initiateComparison') }}
|
||||
</a-button>
|
||||
<!--批量删除-->
|
||||
<!-- v-has="'documentComparison:batchDelete'"-->
|
||||
<a-button type="primary" icon="delete" ghost @click="batchDel" v-has="'split:sarFileSplitInfo:deleteBatch'">{{ $t('batchDelete') }}</a-button>
|
||||
<a-button type="primary" icon="delete" ghost @click="batchDelete" v-has="'split:sarFileSplitInfo:deleteBatch'">{{ $t('batchDelete') }}
|
||||
</a-button>
|
||||
</div>
|
||||
<div>
|
||||
<j-table
|
||||
@@ -55,11 +58,23 @@
|
||||
:operation-list="operationList"
|
||||
@change="handleTableChange"
|
||||
@operationClick="operationClick">
|
||||
<template v-slot:serialNumberRight="{text,record}">
|
||||
<a @click="serialNumberRightClick(record)" :title="text">{{ text }}</a>
|
||||
|
||||
<!--旧文本跳转标准详情-->
|
||||
<template v-slot:oldTextDetail="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="toDetailPage('old', record)">{{ text }}</div>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<template v-slot:serialNumberLeft="{text,record}">
|
||||
<a @click="serialNumberLeftClick(record)" :title="text">{{ text }}</a>
|
||||
|
||||
<!--新文本跳转标准详情-->
|
||||
<template v-slot:newTextDetail="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="toDetailPage('new', record)">{{ text }}</div>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</j-table>
|
||||
</div>
|
||||
@@ -67,11 +82,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { postAction, deleteAction } from '../../../api/manage.js'
|
||||
import '../../../assets/less/common.less'
|
||||
import { postAction } from '../../../api/manage.js'
|
||||
import { mapGetters } from 'vuex'
|
||||
import JDictSelectTag from '../../../components/dict/JDictSelectTag.vue'
|
||||
import JTable from '../../../components/jero/JTable.vue'
|
||||
import { JeroListMixin } from '../../../mixins/JeroListMixin.js'
|
||||
import { StandardSource } from '../../../enums/commonEnums.js'
|
||||
import { withdrawPublication } from '../../../api/documentToolApi.js'
|
||||
|
||||
export default {
|
||||
name: 'DocumentComparison',
|
||||
@@ -89,68 +107,70 @@ export default {
|
||||
downLoadImgUrl: window._CONFIG.domianWebImgURL + '/sys/common/download',
|
||||
userInfoQuery: {},
|
||||
columns: [
|
||||
// 旧文档文本号
|
||||
{
|
||||
title: this.$t('number') + ' 1',
|
||||
title: this.$t('docTool.comparison.oldDocumentTextNumber'),
|
||||
dataIndex: 'serialNumberLeft',
|
||||
width: 170,
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'serialNumberLeft' }
|
||||
scopedSlots: { customRender: 'oldTextDetail' }
|
||||
},
|
||||
// 旧文档文本名称
|
||||
{
|
||||
title: this.$t('title') + ' 1',
|
||||
title: this.$t('docTool.comparison.oldDocumentTextName'),
|
||||
dataIndex: 'titleLeft',
|
||||
width: 170,
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'serialNumberLeft' }
|
||||
scopedSlots: { customRender: 'oldTextDetail' }
|
||||
},
|
||||
// 旧文本状态
|
||||
{
|
||||
title: this.$t('docTool.comparison.textStatus') + ' 1',
|
||||
title: this.$t('docTool.comparison.oldTextState'),
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
dataIndex: 'fileTypeLeft'
|
||||
},
|
||||
// 新文档文本号
|
||||
{
|
||||
title: this.$t('number') + ' 2',
|
||||
title: this.$t('docTool.comparison.newDocumentTextNumber'),
|
||||
dataIndex: 'serialNumberRight',
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'serialNumberRight' },
|
||||
width: 170
|
||||
width: 170,
|
||||
scopedSlots: { customRender: 'newTextDetail' }
|
||||
},
|
||||
// 新文档文本名称
|
||||
{
|
||||
title: this.$t('title') + ' 2',
|
||||
title: this.$t('docTool.comparison.newDocumentTextName'),
|
||||
dataIndex: 'titleRight',
|
||||
scopedSlots: { customRender: 'serialNumberRight' },
|
||||
ellipsis: true,
|
||||
width: 170
|
||||
width: 170,
|
||||
scopedSlots: { customRender: 'newTextDetail' }
|
||||
},
|
||||
// 新文本状态
|
||||
{
|
||||
title: this.$t('docTool.comparison.textStatus') + ' 2',
|
||||
title: this.$t('docTool.comparison.newTextState'),
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
dataIndex: 'fileTypeRight'
|
||||
},
|
||||
// 发布情况
|
||||
{
|
||||
title: this.$t('docTool.comparison.releaseSituation'),
|
||||
width: 170,
|
||||
ellipsis: true,
|
||||
dataIndex: 'releaseStateTitle'
|
||||
},
|
||||
// 创建人
|
||||
{
|
||||
title: this.$t('creator'),
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
dataIndex: 'createBy'
|
||||
},
|
||||
// 备注
|
||||
{
|
||||
title: this.$t('remarks'),
|
||||
ellipsis: true,
|
||||
width: 270,
|
||||
dataIndex: 'remark'
|
||||
},
|
||||
// 操作
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
fixed: 'right',
|
||||
width: 310,
|
||||
width: 250,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
@@ -222,40 +242,37 @@ export default {
|
||||
this.loadData(1)
|
||||
},
|
||||
methods: {
|
||||
getList () {
|
||||
this.dataSource = [{ id: 1, serialNumberLeft: '11' }]
|
||||
},
|
||||
batchDelete () {
|
||||
if (this.selectedRowKeys.length > 0) {
|
||||
this.$confirm({
|
||||
content: this.$t('confirmBatchDeletion'),
|
||||
onOk: () => {
|
||||
const idList = []
|
||||
const selectionRows = JSON.parse(JSON.stringify(this.selectionRows))
|
||||
for (let i = 0; i < selectionRows.length; i++) {
|
||||
if (selectionRows[i].createBy === this.userInfo.username &&
|
||||
selectionRows[i].releaseState === 'draft') {
|
||||
idList.push(selectionRows[i].id)
|
||||
}
|
||||
}
|
||||
if (idList.length > 0) {
|
||||
deleteAction(this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.selectedRowKeys = []
|
||||
this.getList()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('doNotHavePermissionDeleteData'))
|
||||
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
return
|
||||
}
|
||||
this.$confirm({
|
||||
content: this.$t('confirmBatchDeletion'),
|
||||
onOk: () => {
|
||||
const idList = []
|
||||
const selectionRows = JSON.parse(JSON.stringify(this.selectionRows))
|
||||
for (let i = 0; i < selectionRows.length; i++) {
|
||||
if (selectionRows[i].createBy === this.userInfo.username &&
|
||||
selectionRows[i].releaseState === 'draft') {
|
||||
idList.push(selectionRows[i].id)
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
if (idList.length > 0) {
|
||||
postAction(this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.selectedRowKeys = []
|
||||
this.loadData(1)
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('doNotHavePermissionDeleteData'))
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 对比结果按钮点击
|
||||
comparisonResultsClick (item) {
|
||||
@@ -264,14 +281,13 @@ export default {
|
||||
} else {
|
||||
item.isDisplay = 1
|
||||
}
|
||||
const newUrl = this.$router.resolve({
|
||||
path: '/comparisonResults',
|
||||
this.$router.push({
|
||||
path: '/documentTool/ComparisonResults',
|
||||
query: {
|
||||
id: item.id,
|
||||
isDisplay: item.isDisplay
|
||||
}
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
},
|
||||
// 撤回按钮点击
|
||||
subscribe (record) {
|
||||
@@ -288,17 +304,21 @@ export default {
|
||||
releaseState: releaseState,
|
||||
id: record.id
|
||||
}
|
||||
postAction('/compare/sarFileCompareInfo/changeState', query).then((res) => {
|
||||
withdrawPublication(query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.getList()
|
||||
this.$message.success(res.message)
|
||||
this.loadData(1)
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 编辑
|
||||
* @param row
|
||||
*/
|
||||
edit (row) {
|
||||
this.$router.push({
|
||||
path: '/documentTool/DocumentDataComparison',
|
||||
@@ -307,55 +327,72 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 发起对比按钮点击
|
||||
/**
|
||||
* 发起比对
|
||||
*/
|
||||
initiatingProcessClick () {
|
||||
this.$router.push({
|
||||
path: '/documentTool/InitiateComparison'
|
||||
})
|
||||
// let newUrl = this.$router.resolve({
|
||||
// path: '/initiateDocumentComparison'
|
||||
// })
|
||||
// window.open(newUrl.href, '_blank')
|
||||
},
|
||||
deleteData (val) {
|
||||
this.$confirm({
|
||||
content: this.$t('confirmDeletion'),
|
||||
onOk: () => {
|
||||
deleteAction(this.url.deleteBatch, { ids: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.getList()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 跳转标准详情
|
||||
* @param type
|
||||
* @param record
|
||||
*/
|
||||
toDetailPage (type, record) {
|
||||
let standardId, standardNumber, standardSource, path, query
|
||||
// 判断是新旧那个标准点击的,取字段
|
||||
if (type === 'old') {
|
||||
standardId = record.standardIdLeft
|
||||
standardNumber = record.serialNumberLeft
|
||||
standardSource = record.standardSourceLeft
|
||||
}
|
||||
if (type === 'new') {
|
||||
standardId = record.standardIdRight
|
||||
standardNumber = record.serialNumberRight
|
||||
standardSource = record.standardSourceRight
|
||||
}
|
||||
// 根据来源跳转不同的详情页
|
||||
switch (standardSource) {
|
||||
// 国内
|
||||
case StandardSource.DOMESTIC.value:
|
||||
path = '/standardRegulationLibrary/DomesticStandardDetail'
|
||||
query = {
|
||||
id: standardId,
|
||||
type: standardSource,
|
||||
standardNumber: standardNumber
|
||||
}
|
||||
break
|
||||
// 企标
|
||||
case StandardSource.OVERSEAS.value:
|
||||
path = ''
|
||||
query = {
|
||||
id: standardId,
|
||||
type: standardSource,
|
||||
standardNumber: standardNumber
|
||||
}
|
||||
break
|
||||
// 海外
|
||||
case StandardSource.ENTERPRISE.value:
|
||||
path = '/enterpriseStandardLibrary/enterpriseStandardDetail'
|
||||
query = {
|
||||
id: standardId
|
||||
}
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
if (!path) {
|
||||
return
|
||||
}
|
||||
this.$openPageNewSheet({
|
||||
path, query
|
||||
})
|
||||
},
|
||||
// 编号2和标题2列的点击事件
|
||||
serialNumberRightClick (row) {
|
||||
const newUrl = this.$router.resolve({
|
||||
path: '/documentManage/library/detail',
|
||||
query: {
|
||||
id: row.fileKeyRight
|
||||
}
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
},
|
||||
// 编号1列和标题1列的点击事件
|
||||
serialNumberLeftClick (row) {
|
||||
const newUrl = this.$router.resolve({
|
||||
path: '/documentManage/library/detail',
|
||||
query: {
|
||||
id: row.fileKeyLeft
|
||||
}
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~../../../assets/less/common.less';
|
||||
</style>
|
||||
|
||||
@@ -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'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="detail-content-box">
|
||||
<div class="detail-content-left">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQueryLeft">
|
||||
<a-row :gutter="24">
|
||||
<a-row>
|
||||
<a-col :md="8" :sm="8">
|
||||
<a-form-item :label="$t('number')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input :placeholder="$t('pleaseEnter')+$t('number')"
|
||||
@@ -54,7 +54,7 @@
|
||||
</div>
|
||||
<div class="detail-content-right">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQueryRight">
|
||||
<a-row :gutter="24">
|
||||
<a-row>
|
||||
<a-col :md="8" :sm="8">
|
||||
<a-form-item :label="$t('number')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input :placeholder="$t('pleaseEnter')+$t('number')"
|
||||
@@ -134,12 +134,12 @@
|
||||
|
||||
<script>
|
||||
import JTable from '../../../components/jero/JTable.vue'
|
||||
import { getAction, downloadFile, getFileAccessHttpUrl } from '../../../api/manage.js'
|
||||
import { downloadFile, getFileAccessHttpUrl } from '../../../api/manage.js'
|
||||
import { previewPdf } from '../../../utils/previewPdf.js'
|
||||
import { Base64 } from 'js-base64'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
import InternalDetailPage from '../../../components/InternalDetailPage.vue'
|
||||
import { getInitComparsionPageData, submitInitComparsion } from '../../../api/documentToolApi.js'
|
||||
|
||||
export default {
|
||||
name: 'InitiateComparison',
|
||||
@@ -151,7 +151,7 @@ export default {
|
||||
span: 6
|
||||
},
|
||||
wrapperCol: {
|
||||
span: 14
|
||||
span: 18
|
||||
},
|
||||
loadingLeft: false,
|
||||
queryParamLeft: {},
|
||||
@@ -273,10 +273,6 @@ export default {
|
||||
width: 79
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: '/split/sarFileSplitInfo/page',
|
||||
add: '/compare/sarFileCompareInfo/fullTextComparison'
|
||||
},
|
||||
image: false,
|
||||
imageUrl: ''
|
||||
}
|
||||
@@ -342,38 +338,36 @@ export default {
|
||||
this.getListRight()
|
||||
},
|
||||
submit () {
|
||||
this.$router.push({
|
||||
path: '/documentTool/DocumentDataComparison'
|
||||
if (!this.selectedRowsRight[0] || !this.selectedRowsLeft[0]) {
|
||||
this.$message.warning(this.$t('pleaseSelectTheDataCompared'))
|
||||
return
|
||||
}
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
const query = {
|
||||
leftStandard: this.selectedRowsLeft[0].id,
|
||||
rightStandard: this.selectedRowsRight[0].id,
|
||||
remark: this.formInline.remark
|
||||
}
|
||||
submitInitComparsion(query).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(res)
|
||||
this.loading = false
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.$router.push({
|
||||
path: '/documentTool/DocumentDataComparison',
|
||||
query: {
|
||||
id: res.result
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
// if (!this.selectedRowsRight[0] || !this.selectedRowsLeft[0]) {
|
||||
// this.$message.warning(this.$t('pleaseSelectTheDataCompared'))
|
||||
// return
|
||||
// }
|
||||
// this.$refs.ruleForm.validate(valid => {
|
||||
// if (valid) {
|
||||
// this.loading = true
|
||||
// const query = {
|
||||
// leftStandard: this.selectedRowsLeft[0].id,
|
||||
// rightStandard: this.selectedRowsRight[0].id,
|
||||
// remark: this.formInline.remark
|
||||
// }
|
||||
// postAction(this.url.add, query).then((res) => {
|
||||
// if (res.success) {
|
||||
// this.loading = false
|
||||
// this.$message.success(this.$t('operationSuccessful'))
|
||||
// this.$router.push({
|
||||
// path: '/documentDataComparison',
|
||||
// query: {
|
||||
// id: res.result
|
||||
// }
|
||||
// })
|
||||
// } else {
|
||||
// this.loading = false
|
||||
// this.$message.warning(this.$t('operationFailed'))
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
},
|
||||
getListLeft () {
|
||||
const queryParam = JSON.parse(JSON.stringify(this.queryParamLeft))
|
||||
@@ -389,7 +383,7 @@ export default {
|
||||
...queryParam
|
||||
}
|
||||
this.loadingLeft = true
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
getInitComparsionPageData(query).then((res) => {
|
||||
if (res.success) {
|
||||
if (res.result.current > 1 && res.result.records.length === 0) {
|
||||
this.ipaginationLeft.current = 1
|
||||
@@ -447,7 +441,7 @@ export default {
|
||||
...queryParam
|
||||
}
|
||||
this.loadingRight = true
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
getInitComparsionPageData(query).then((res) => {
|
||||
if (res.success) {
|
||||
if (res.result.current > 1 && res.result.records.length === 0) {
|
||||
this.pageNoRight = 1
|
||||
|
||||
@@ -5,25 +5,22 @@
|
||||
:visible="visible"
|
||||
:confirm-loading="confirmLoading"
|
||||
:maskClosable="false"
|
||||
@cancel="visible = false"
|
||||
>
|
||||
@cancel="visible = false">
|
||||
|
||||
<template slot="footer">
|
||||
<a-button type="primary" :loading="confirmLoading" @click="fullTextCommentsSubmit">
|
||||
{{$t('submit')}}
|
||||
{{ $t('submit') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<a-form-model :model="formInlineText" class="formAdd" :rules="rulesText" ref="ruleFormText">
|
||||
<div class="box-title-text-remarks">
|
||||
<div class="title-text-remarks" :title="$t('docTool.comparison.fullTextComments')">
|
||||
<span>{{$t('docTool.comparison.fullTextComments')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" style="width: calc(100% - 113px)" prop="comment">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+' '+$t('docTool.comparison.fullTextComments')"
|
||||
v-model.trim="formInlineText.comment"
|
||||
:maxLength="500"
|
||||
:rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item prop="comment"
|
||||
:labelCol="labelCol" :wrapperCol="wrapperCol"
|
||||
:label="$t('docTool.comparison.fullTextComments')">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+' '+$t('docTool.comparison.fullTextComments')"
|
||||
v-model.trim="formInlineText.comment"
|
||||
:maxLength="500"
|
||||
:rows="4" />
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
</template>
|
||||
@@ -38,12 +35,19 @@ export default {
|
||||
visible: false, // 全文评论弹框是否显示
|
||||
confirmLoading: false,
|
||||
formInlineText: {},
|
||||
rulesText: {}
|
||||
rulesText: {},
|
||||
labelCol: {
|
||||
span: 5
|
||||
},
|
||||
wrapperCol: {
|
||||
span: 18
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open (comments) {
|
||||
this.formInlineText.comment = comments
|
||||
this.visible = true
|
||||
},
|
||||
// 添加全文评论弹框的提交按钮
|
||||
fullTextCommentsSubmit () {
|
||||
@@ -67,7 +71,7 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user