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