[update 标准解读] 增加原文选项(隐藏译文)
This commit is contained in:
@@ -514,6 +514,7 @@ module.exports = {
|
|||||||
dataType: 'Data Type',
|
dataType: 'Data Type',
|
||||||
split: 'Split',
|
split: 'Split',
|
||||||
article: 'Article',
|
article: 'Article',
|
||||||
|
originalText: 'Original Text',
|
||||||
clauseLabel: 'Article label',
|
clauseLabel: 'Article label',
|
||||||
splitResultFile: 'Split Result File',
|
splitResultFile: 'Split Result File',
|
||||||
splitImportResultTip: 'Upload the split result file in accordance with the relevant format requirements, please ',
|
splitImportResultTip: 'Upload the split result file in accordance with the relevant format requirements, please ',
|
||||||
|
|||||||
@@ -515,6 +515,7 @@ module.exports = {
|
|||||||
split: '拆分',
|
split: '拆分',
|
||||||
article: '条文',
|
article: '条文',
|
||||||
clauseLabel: '条文标签',
|
clauseLabel: '条文标签',
|
||||||
|
originalText: '原文',
|
||||||
splitResultFile: '拆分结果文件',
|
splitResultFile: '拆分结果文件',
|
||||||
splitImportResultTip: '上传拆分结果文件需遵循相关格式要求,具体要求请',
|
splitImportResultTip: '上传拆分结果文件需遵循相关格式要求,具体要求请',
|
||||||
clickToView: '点击查看',
|
clickToView: '点击查看',
|
||||||
|
|||||||
@@ -109,7 +109,8 @@
|
|||||||
<!--内容和译文-->
|
<!--内容和译文-->
|
||||||
<div class="content-and-translation" :class="{'hide-translation': isContainerExpand}">
|
<div class="content-and-translation" :class="{'hide-translation': isContainerExpand}">
|
||||||
<!--标准内容-->
|
<!--标准内容-->
|
||||||
<div class="sheet-container part-ml" ref="sheetContainerRef">
|
<div class="sheet-container part-ml" ref="sheetContainerRef"
|
||||||
|
:style="showClauseLabel === showClauseLabelEnums.hideTranslation ? 'width: 100%' : ''">
|
||||||
<!--标准名称-->
|
<!--标准名称-->
|
||||||
<div class="standard-name">
|
<div class="standard-name">
|
||||||
<a-tooltip placement="topLeft">
|
<a-tooltip placement="topLeft">
|
||||||
@@ -140,7 +141,8 @@
|
|||||||
<!-- @dragstop="(...args) => onDragstop('sheetContainerRef', ...args)"></vue-draggable-resizable>-->
|
<!-- @dragstop="(...args) => onDragstop('sheetContainerRef', ...args)"></vue-draggable-resizable>-->
|
||||||
</div>
|
</div>
|
||||||
<!--译文-->
|
<!--译文-->
|
||||||
<div class="translation-text part-ml part-common" ref="translationRef" :class="{'hide-translation-text': isContainerExpand}">
|
<div v-if="showClauseLabel !== showClauseLabelEnums.hideTranslation" class="translation-text part-ml part-common" ref="translationRef"
|
||||||
|
:class="{'hide-translation-text': isContainerExpand}">
|
||||||
<div class="part-title">{{ $t('standardRegulationLibrary.translation') }}</div>
|
<div class="part-title">{{ $t('standardRegulationLibrary.translation') }}</div>
|
||||||
<div class="standard-content translation-content">
|
<div class="standard-content translation-content">
|
||||||
<div class="clause-content-item" v-if="Object.keys(clauseLabelInfo).length">
|
<div class="clause-content-item" v-if="Object.keys(clauseLabelInfo).length">
|
||||||
@@ -157,7 +159,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--条文标签-->
|
<!--条文标签-->
|
||||||
<div class="clause-label part-ml part-common" ref="clauseLabelRef" :class="{'hide-clause-label': !showClauseLabel || isContainerExpand}">
|
<div class="clause-label part-ml part-common" ref="clauseLabelRef"
|
||||||
|
:class="{'hide-clause-label': (showClauseLabel === showClauseLabelEnums.hideClauseLable) || isContainerExpand}">
|
||||||
<div class="part-title">{{ $t('standardRegulationLibrary.clauseLabel') }}</div>
|
<div class="part-title">{{ $t('standardRegulationLibrary.clauseLabel') }}</div>
|
||||||
<div class="has-title-part-content">
|
<div class="has-title-part-content">
|
||||||
<template v-for="clause in clauseField">
|
<template v-for="clause in clauseField">
|
||||||
@@ -187,8 +190,8 @@
|
|||||||
<a-tooltip placement="left">
|
<a-tooltip placement="left">
|
||||||
<template #title>{{ $t('docTool.split.article') }}</template>
|
<template #title>{{ $t('docTool.split.article') }}</template>
|
||||||
<div class="clause-label-change-item"
|
<div class="clause-label-change-item"
|
||||||
:class="{'clause-label-change-item-selected': !showClauseLabel}"
|
:class="{'clause-label-change-item-selected': showClauseLabel === showClauseLabelEnums.hideClauseLable}"
|
||||||
@click="handleClauseChange(false)">
|
@click="handleClauseChange(1)">
|
||||||
<i class="iconfont icon-ios-list-box" />
|
<i class="iconfont icon-ios-list-box" />
|
||||||
<span v-show="isClauseLabelExpand">{{ $t('docTool.split.article') }}</span>
|
<span v-show="isClauseLabelExpand">{{ $t('docTool.split.article') }}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -197,12 +200,22 @@
|
|||||||
<a-tooltip placement="left">
|
<a-tooltip placement="left">
|
||||||
<template #title>{{ $t('docTool.split.clauseLabel') }}</template>
|
<template #title>{{ $t('docTool.split.clauseLabel') }}</template>
|
||||||
<div class="clause-label-change-item"
|
<div class="clause-label-change-item"
|
||||||
:class="{'clause-label-change-item-selected': showClauseLabel}"
|
:class="{'clause-label-change-item-selected': showClauseLabel === showClauseLabelEnums.showAll}"
|
||||||
@click="handleClauseChange(true)">
|
@click="handleClauseChange(2)">
|
||||||
<i class="iconfont icon-biaoqian-mianxing" />
|
<i class="iconfont icon-biaoqian-mianxing" />
|
||||||
<span v-show="isClauseLabelExpand">{{ $t('docTool.split.clauseLabel') }}</span>
|
<span v-show="isClauseLabelExpand">{{ $t('docTool.split.clauseLabel') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
|
<!--展示译文-->
|
||||||
|
<a-tooltip placement="left">
|
||||||
|
<template #title>{{ $t('docTool.split.originalText') }}</template>
|
||||||
|
<div class="clause-label-change-item"
|
||||||
|
:class="{'clause-label-change-item-selected': showClauseLabel === showClauseLabelEnums.hideTranslation}"
|
||||||
|
@click="handleClauseChange(3)">
|
||||||
|
<a-icon style="color: #0064FA" type="file-text" theme="filled" />
|
||||||
|
<span v-show="isClauseLabelExpand">{{ $t('docTool.split.originalText') }}</span>
|
||||||
|
</div>
|
||||||
|
</a-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<!--查看上传文件-->
|
<!--查看上传文件-->
|
||||||
<upload-file ref="uploadFile" :return-url="false" disabled />
|
<upload-file ref="uploadFile" :return-url="false" disabled />
|
||||||
@@ -218,15 +231,13 @@ import {
|
|||||||
previewDocSplit
|
previewDocSplit
|
||||||
} from '@api/documentToolApi'
|
} from '@api/documentToolApi'
|
||||||
import { FieldType } from '@/enums/commonEnums'
|
import { FieldType } from '@/enums/commonEnums'
|
||||||
import VueDraggableResizable from 'vue-draggable-resizable'
|
|
||||||
import { queryDepartTreeList } from '@api/api'
|
import { queryDepartTreeList } from '@api/api'
|
||||||
import UploadFile from '@comp/UploadFile'
|
import UploadFile from '@comp/UploadFile'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandardResolutionSheet',
|
name: 'StandardResolutionSheet',
|
||||||
components: {
|
components: {
|
||||||
UploadFile,
|
UploadFile
|
||||||
VueDraggableResizable
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
// 是否文档拆分处查看
|
// 是否文档拆分处查看
|
||||||
@@ -249,7 +260,12 @@ export default {
|
|||||||
queryParam: {},
|
queryParam: {},
|
||||||
systemPartList: [], // 涉及系统部件下拉
|
systemPartList: [], // 涉及系统部件下拉
|
||||||
categoryTreeList: [], // 组织机构下拉框数据
|
categoryTreeList: [], // 组织机构下拉框数据
|
||||||
showClauseLabel: true, // 是否展示条文标签
|
showClauseLabel: 2, // 是否展示条文标签 (1 隐藏条文标签 2 全部显示 3 隐藏译文)
|
||||||
|
showClauseLabelEnums: {
|
||||||
|
hideClauseLable: 1,
|
||||||
|
showAll: 2,
|
||||||
|
hideTranslation: 3
|
||||||
|
},
|
||||||
// 条文标签字段
|
// 条文标签字段
|
||||||
clauseField: [],
|
clauseField: [],
|
||||||
// 目录数据
|
// 目录数据
|
||||||
@@ -475,7 +491,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 条文标签切换
|
* 条文标签切换
|
||||||
* @param flag
|
* @param flag - 1 隐藏条文标签 2 全部显示 3 隐藏译文
|
||||||
*/
|
*/
|
||||||
handleClauseChange (flag) {
|
handleClauseChange (flag) {
|
||||||
// const beforeFlag = this.showClauseLabel
|
// const beforeFlag = this.showClauseLabel
|
||||||
@@ -537,7 +553,7 @@ export default {
|
|||||||
.standard-catalogue {
|
.standard-catalogue {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
transition: width .2s linear;
|
transition: width .2s linear, min-width .2s linear;
|
||||||
|
|
||||||
/deep/ .ant-tree li .ant-tree-node-content-wrapper {
|
/deep/ .ant-tree li .ant-tree-node-content-wrapper {
|
||||||
max-width: calc(100% - 24px);
|
max-width: calc(100% - 24px);
|
||||||
@@ -575,10 +591,12 @@ export default {
|
|||||||
|
|
||||||
.expand-catalogue {
|
.expand-catalogue {
|
||||||
width: 280px;
|
width: 280px;
|
||||||
|
min-width: 280px;
|
||||||
}
|
}
|
||||||
// 拖拽会设置行内样式,这里要覆盖行内样式
|
// 拖拽会设置行内样式,这里要覆盖行内样式
|
||||||
.no-expand-catalogue {
|
.no-expand-catalogue {
|
||||||
width: 0 !important;
|
width: 0 !important;
|
||||||
|
min-width: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 内容和译文为了平分宽度
|
// 内容和译文为了平分宽度
|
||||||
@@ -596,12 +614,12 @@ export default {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
//width: 0;
|
//width: 0;
|
||||||
transition: width .2s linear;
|
transition: width .2s linear, min-width .2s linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
.translation-text {
|
.translation-text {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
transition: width .2s linear;
|
transition: width .2s linear, min-width .2s linear;
|
||||||
position: relative;
|
position: relative;
|
||||||
//width: 280px;
|
//width: 280px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -623,7 +641,7 @@ export default {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
//overflow: hidden;
|
//overflow: hidden;
|
||||||
transition: width .2s linear;
|
transition: width .2s linear, min-width .2s linear;
|
||||||
|
|
||||||
.clause-item {
|
.clause-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -661,10 +679,11 @@ export default {
|
|||||||
|
|
||||||
.clause-label-change {
|
.clause-label-change {
|
||||||
width: 130px;
|
width: 130px;
|
||||||
|
min-width: 130px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding-top: 40px;
|
padding-top: 40px;
|
||||||
position: relative;
|
position: relative;
|
||||||
transition: width .2s linear;
|
transition: width .2s linear, min-width .2s linear;
|
||||||
|
|
||||||
&-item {
|
&-item {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@@ -754,6 +773,7 @@ export default {
|
|||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
|
||||||
&-title {
|
&-title {
|
||||||
|
word-break: break-all;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-family: PingFang SC-Medium, PingFang SC, sans-serif;
|
font-family: PingFang SC-Medium, PingFang SC, sans-serif;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@@ -762,6 +782,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&-content {
|
&-content {
|
||||||
|
word-break: break-all;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-family: PingFang SC-Regular, PingFang SC, sans-serif;
|
font-family: PingFang SC-Regular, PingFang SC, sans-serif;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|||||||
Reference in New Issue
Block a user