update 文档对比

This commit is contained in:
赵霄
2023-09-20 11:26:34 +08:00
parent fbe03c0564
commit 4601acb8b2
6 changed files with 72 additions and 67 deletions
+7 -1
View File
@@ -28,6 +28,10 @@ const deleteComparisonResult = (params) => postAction('/compare/sarFileCompareIt
const getComparisonResultDetail = (params) => getAction('/compare/sarFileCompareItemComment/queryCompareResult', params)
// 文档对比-编辑对比评论
const editComparisonComment = (params) => postAction('/compare/sarFileCompareItemComment/edit', params)
// 文档对比-对比结果-评论-发表/回复评论
const addComment = (params) => postAction('/compare/sarFileCompareResComment/add', params)
// 文档对比-对比结果-评论-评论列表
const getCommentList = (params) => getAction('/compare/sarFileCompareResComment/queryListByInfoId', params)
export {
// 文档拆分
@@ -47,5 +51,7 @@ export {
addFullTextComment,
deleteComparisonResult,
getComparisonResultDetail,
editComparisonComment
editComparisonComment,
addComment,
getCommentList
}
@@ -121,7 +121,8 @@
</div>
</div>
</div>
<commentList ref="commentListRef" />
<!--评论-->
<comment-list ref="commentListRef" />
<!--编辑对比评论-->
<comparison-result-edit-modal ref="comparisonResultEditModal" @ok="getData" />
<div id="images">
@@ -137,7 +138,7 @@ import { getAction, downloadFile, getFileAccessHttpUrl } from '../../../api/mana
import { previewPdf } from '../../../utils/previewPdf.js'
import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
import CommentList from '../modules/CommentList.vue'
import CommentList from './modules/CommentList.vue'
import ComparisonResultEditModal from './modules/ComparisonResultEditModal.vue'
import InternalDetailPage from '../../../components/InternalDetailPage.vue'
import { deleteComparisonResult, getComparisonResultDetail } from '../../../api/documentToolApi.js'
@@ -27,7 +27,7 @@
</a-form-item>
</a-col>
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery">{{ $t('query') }}</a-button>
<a-button type="primary" @click="searchQuery" v-has="'documentComparison:search'">{{ $t('query') }}</a-button>
<a-button style="margin-left: 8px" @click="searchReset">{{ $t('reset') }}</a-button>
</div>
</a-row>
@@ -35,12 +35,11 @@
</div>
<div class="table-operator">
<!--发起对比-->
<!-- v-has="'documentComparison:Initiate'"-->
<a-button icon="block" type="primary" ghost @click="initiatingProcessClick">{{ $t('docTool.comparison.initiateComparison') }}
<a-button icon="block" type="primary" ghost @click="initiatingProcessClick" v-has="'documentComparison:initiateComparison'">
{{ $t('docTool.comparison.initiateComparison') }}
</a-button>
<!--批量删除-->
<!-- v-has="'documentComparison:batchDelete'"-->
<a-button type="primary" icon="delete" ghost @click="batchDelete" v-has="'split:sarFileSplitInfo:deleteBatch'">{{ $t('batchDelete') }}
<a-button type="primary" icon="delete" ghost @click="batchDelete" v-has="'documentComparison:deleteBatch'">{{ $t('batchDelete') }}
</a-button>
</div>
<div>
@@ -100,6 +99,7 @@ export default {
// url传参严格按照当前命名
url: {
list: '/compare/sarFileCompareInfo/page',
delete: '/compare/sarFileCompareInfo/delete',
deleteBatch: '/compare/sarFileCompareInfo/deleteBatch'
},
loading: false,
@@ -179,13 +179,13 @@ export default {
{
text: this.$t('docTool.comparison.comparisonResults'),
clickEvent: 'comparisonResultsClick',
has: 'domesticStandard:collection'
has: 'documentComparison:comparisonResults'
},
// 发布
{
text: this.$t('release'),
clickEvent: 'subscribe',
has: 'domesticStandard:collection',
has: 'documentComparison:publishWithdraw',
show: (record) => {
return (record.createBy === this.userInfo.username || this.administrators) && (!record.releaseState || record.releaseState === 'draft')
}
@@ -194,7 +194,7 @@ export default {
{
text: this.$t('withdraw'),
clickEvent: 'subscribe',
has: 'domesticStandard:collection',
has: 'documentComparison:publishWithdraw',
show: (record) => {
return (record.createBy === this.userInfo.username || this.administrators) && !(!record.releaseState || record.releaseState === 'draft')
}
@@ -203,7 +203,7 @@ export default {
{
text: this.$t('edit'),
clickEvent: 'edit',
has: 'domesticStandard:collection',
has: 'documentComparison:edit',
show: (record) => {
return (record.createBy === this.userInfo.username || this.administrators) && record.releaseState === 'draft'
}
@@ -211,8 +211,8 @@ export default {
// 删除
{
text: this.$t('delete'),
clickEvent: 'comparisonResultsClick',
has: 'domesticStandard:collection',
clickEvent: 'handleDelete',
has: 'documentComparison:delete',
show: (record) => {
return (record.createBy === this.userInfo.username || this.administrators) && record.releaseState === 'draft'
}
@@ -1,7 +1,7 @@
<template>
<div>
<a-drawer
:title="$t('comment')"
:title="$t('docTool.comparison.comment')"
:maskClosable="false"
:width="482"
placement="right"
@@ -13,9 +13,10 @@
@search="allowClearChange"
:placeholder="$t('pleaseEnter')+$t('docTool.comparison.comment')"
v-model="commentContent"></a-input-search>
<a-button @click="submitQuery" style="margin-right: 8px;" type="primary">{{$t('query')}}</a-button>
<a-button @click="submitQuery" style="margin-right: 8px;" type="primary">{{ $t('query') }}</a-button>
<!--发表评论-->
<a-button @click="handleSubmit" :title="$t('docTool.comparison.publishComment')" type="primary">
{{$t('docTool.comparison.publishComment')}}
{{ $t('docTool.comparison.publishComment') }}
</a-button>
</div>
<div class="comment-box" v-if="dataList && dataList.length > 0">
@@ -23,48 +24,49 @@
<!-- <div class="title-text">{{$t('record')+(index + 1)}}</div>-->
<div class="box-content">
<div class="img-box">
<img src="../../../assets/image/daiban.png" class="img" alt="">
<img src="../../../../assets/image/daiban.png" class="img" alt="">
</div>
<div class="box-text">
<span class="box-text-name">{{item.name}}</span>
<span class="box-text-time">{{item.createTime}}</span>
<span class="box-text-name">{{ item.name }}</span>
<span class="box-text-time">{{ item.createTime }}</span>
</div>
<div class="box-text-text">
{{item.content}}
{{ item.content }}
</div>
<div class="box-icon" @click="messageClick(item)">
<a-icon type="message"/>
<a-icon type="message" />
</div>
</div>
<div class="inside-box" v-if="item.resComVoList && item.resComVoList.length > 0">
<div class="box-content-inside" v-for="(val,indexOne) in item.resComVoList" :key="indexOne">
<div class="img-box">
<img src="../../../assets/image/daiban.png" class="img" alt="">
<img src="../../../../assets/image/daiban.png" class="img" alt="">
</div>
<div class="box-text">
<span class="box-text-name">{{val.name}}</span>
<span class="box-text-time">{{val.createTime}}</span>
<span class="box-text-name">{{ val.name }}</span>
<span class="box-text-time">{{ val.createTime }}</span>
</div>
<div class="box-text-text">
{{val.content}}
{{ val.content }}
</div>
<div class="box-icon" @click="messageClick(item)">
<a-icon type="message"/>
<a-icon type="message" />
</div>
</div>
</div>
</div>
</div>
<div class="comment-box-text" v-else>{{$t('docTool.comparison.noComment')}}</div>
<div class="comment-box-text" v-else>{{ $t('docTool.comparison.noComment') }}</div>
</a-drawer>
<comparison-add-reply-comment ref="comparisonAddReplyComment"></comparison-add-reply-comment>
<!--发表评论-->
<comparison-add-reply-comment ref="comparisonAddReplyComment" @ok="getList" />
</div>
</template>
<script>
import { getAction } from '@/api/manage'
import { getCommentList } from '../../../../api/documentToolApi.js'
//
import ComparisonAddReplyComment from './ComparisonAddReplyComment'
import ComparisonAddReplyComment from './ComparisonAddReplyComment.vue'
export default {
name: 'CommentList',
@@ -74,12 +76,7 @@ export default {
visible: false,
dataList: [],
commentContent: '',
loading: false,
url: {
list: '/compare/sarFileCompareResComment/queryListByInfoId',
add: '/compare/sarFileCompareResComment/add',
edit: '/compare/sarFileCompareResComment/edit'
}
loading: false
}
},
methods: {
@@ -103,7 +100,7 @@ export default {
},
getList () {
this.loading = true
getAction(this.url.list, {
getCommentList({
id: this.$route.query.id,
str: this.commentContent
}).then((res) => {
@@ -298,6 +295,7 @@ export default {
white-space: nowrap;
margin-top: 4px;
}
.box-input-search {
/deep/ .ant-input-search-icon {
display: none;
@@ -14,7 +14,7 @@
<div class="box-title-text">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="title">{{title}}</span>
<span class="title-text-text" :title="title">{{ title }}</span>
</div>
<a-form-model-item v-if="title === $t('docTool.comparison.replyToComments')" class="item-model" :prop="'replyContent'">
<a-textarea
@@ -30,7 +30,7 @@
:disabled="false"
:maxLength="500"
v-model.trim="formInline.commentContent"
:autoSize="{ minRows: 2, maxRows: 6 }"/>
:autoSize="{ minRows: 2, maxRows: 6 }" />
</a-form-model-item>
</div>
</a-col>
@@ -40,7 +40,7 @@
</template>
<script>
import { postAction } from '@/api/manage'
import { addComment } from '../../../../api/documentToolApi.js'
export default {
name: 'ComparisonAddReplyComment',
@@ -76,19 +76,13 @@ export default {
handleOkComment () {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let url = ''
let query = {}
let Action
if (this.title === this.$t('docTool.comparison.publishComment')) {
url = this.url.add
Action = postAction
query = {
comment: this.formInline.commentContent,
infoId: this.$route.query.id
}
} else if (this.title === this.$t('docTool.comparison.replyToComments')) {
Action = postAction
url = this.url.add
query = {
comment: this.formInline.replyContent,
parentId: this.formInline.projectCommentId,
@@ -96,11 +90,11 @@ export default {
}
}
this.confirmLoading = true
Action(url, query).then((res) => {
addComment(query).then((res) => {
if (res.success) {
this.$message.success(this.$t('operationSuccessful'))
this.visible = false
this.getList()
this.$emit('ok')
} else {
this.$message.warning(this.$t('operationFailed'))
}
@@ -118,5 +112,5 @@ export default {
</script>
<style scoped lang="less">
@import'~@assets/less/common.less';
@import '~../../../../assets/less/common.less';
</style>
+23 -17
View File
@@ -18,7 +18,7 @@
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i>已选择&nbsp;<a style="font-weight: 600">{{
selectedRowKeys.length }}</a>&nbsp;&nbsp;
selectedRowKeys.length }}</a>&nbsp;&nbsp;
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
@@ -36,10 +36,10 @@
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">
更多 <a-icon type="down"/>
更多 <a-icon type="down" />
</a>
<a-menu slot="overlay">
<a-menu-item>
@@ -61,13 +61,12 @@
</a-dropdown>
</span>
<!-- 字符串超长截取省略号显示 -->
<span slot="url" slot-scope="text">
<j-ellipsis :value="text" :length="25"/>
</span>
<!-- 字符串超长截取省略号显示-->
<span slot="component" slot-scope="text">
<j-ellipsis :value="text"/>
</span>
<template slot="text" slot-scope="text">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
</a-tooltip>
</template>
</a-table>
</div>
@@ -94,11 +93,13 @@ const columns = [
}, {
title: '菜单英文名称',
dataIndex: 'englishName',
key: 'englishName'
key: 'englishName',
scopedSlots: { customRender: 'text' }
}, {
title: '菜单类型',
dataIndex: 'menuType',
key: 'menuType',
width: 90,
customRender: function (text) {
if ((text + '') === '0') {
return '菜单'
@@ -109,7 +110,8 @@ const columns = [
} else {
return text
}
}
},
scopedSlots: { customRender: 'text' }
}, /* {
title: '权限编码',
dataIndex: 'perms',
@@ -117,24 +119,28 @@ const columns = [
}, */{
title: 'icon',
dataIndex: 'icon',
key: 'icon'
key: 'icon',
width: 120,
scopedSlots: { customRender: 'text' }
},
{
title: '组件',
dataIndex: 'component',
key: 'component',
scopedSlots: { customRender: 'component' }
scopedSlots: { customRender: 'text' }
},
{
title: '路径',
dataIndex: 'url',
key: 'url',
scopedSlots: { customRender: 'url' }
scopedSlots: { customRender: 'text' }
},
{
title: '排序',
dataIndex: 'sortNo',
key: 'sortNo'
key: 'sortNo',
width: 60,
scopedSlots: { customRender: 'text' }
},
{
title: '操作',
@@ -195,5 +201,5 @@ export default {
}
</script>
<style scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
</style>