diff --git a/src/api/documentToolApi.js b/src/api/documentToolApi.js index 6a943121..5b603ff3 100644 --- a/src/api/documentToolApi.js +++ b/src/api/documentToolApi.js @@ -7,6 +7,8 @@ const releaseSplitStandard = (params) => postAction('', params) const getDocSplitTableHeader = (params) => getAction('', params) // 文档拆分详情-查询条件 const getDocSplitSearch = (params) => getAction('', params) +// 文档拆分-拆分已入库文本-拆分 +const addDocSplit = (params) => postAction('/split/sarFileSplitInfo/add', params) // 文档对比-发布/撤回 const withdrawPublication = (params) => postAction('/compare/sarFileCompareInfo/changeState', params) @@ -40,6 +42,7 @@ export { // 文档拆分-详情 getDocSplitTableHeader, getDocSplitSearch, + addDocSplit, // 文档比对 withdrawPublication, diff --git a/src/common/lang/en-us.js b/src/common/lang/en-us.js index 300c9411..b77c4c15 100644 --- a/src/common/lang/en-us.js +++ b/src/common/lang/en-us.js @@ -376,6 +376,10 @@ module.exports = { batchCopy: 'Batch copy', batchEdit: 'Batch edit', mergerClause: 'Merge Item', + dataType: 'Data type', + split: 'Split', + article: 'Article', + clauseLabel: 'Clause label', selectFileType: 'Please select a file type', onlyWord: 'Only word files can be imported', diff --git a/src/common/lang/zh-cn.js b/src/common/lang/zh-cn.js index c2dce774..ed05dfee 100644 --- a/src/common/lang/zh-cn.js +++ b/src/common/lang/zh-cn.js @@ -376,6 +376,10 @@ module.exports = { batchCopy: '批量复制', batchEdit: '批量编辑', mergerClause: '合并条款', + dataType: '资料类型', + split: '拆分', + article: '条文', + clauseLabel: '条文标签', selectFileType: '请选择文件类型', onlyWord: '只能导入word文件', diff --git a/src/components/StandardResolutionSheet.vue b/src/components/StandardResolutionSheet.vue index 060ddef9..6d97c10f 100644 --- a/src/components/StandardResolutionSheet.vue +++ b/src/components/StandardResolutionSheet.vue @@ -1,10 +1,18 @@ - - {{ showClauseLable ? $t('open') : $t('putAway') }} + + {{ isContainerExpand ? $t('putAway') : $t('open') }}
-
+
{{ $t('standardRegulationLibrary.clauseLabel') }}
@@ -36,17 +44,26 @@
-
+
+
+ +
-
- - 条文 -
+ + +
+ + {{ $t('docTool.split.article') }} +
+
-
- - 条文标签 -
+ + +
+ + {{ $t('docTool.split.clauseLabel') }} +
+
@@ -58,7 +75,8 @@ export default { name: 'StandardResolutionSheet', data () { return { - showClauseLable: true, // 是否展示条文标签 + showClauseLabel: true, // 是否展示条文标签 + // 条文标签字段 clauseField: [ // 条文号 { @@ -121,6 +139,7 @@ export default { fieldName: '' } ], + // 目录数据 treeData: [ { title: '0-0', @@ -147,15 +166,42 @@ export default { ] } ], - selectedTreeKeys: [] + selectedTreeKeys: [], + isClauseLabelExpand: true, // 条文/条文标签切换部分是否展开,控制是否只显示图标 + isCatalogueExpand: true, // 标准目录收起 + isContainerExpand: false, // 条文是否展开 + isInitPage: true // 是否初始化页面 } }, + mounted () { + this.$nextTick(() => { + this.isInitPage = false + }) + }, methods: { handleTreeSelected (selectedKeys) { this.selectedTreeKeys = selectedKeys }, + handleContainerExpand () { + this.isContainerExpand = !this.isContainerExpand + if (this.isContainerExpand) { + this.isCatalogueExpand = false + } else { + this.isCatalogueExpand = true + } + }, + /** + * + * @param flag + */ handleClauseChange (flag) { - this.showClauseLable = flag + this.showClauseLabel = flag + }, + expandClauseLabel () { + this.isClauseLabelExpand = !this.isClauseLabelExpand + }, + expandCatalogue () { + this.isCatalogueExpand = !this.isCatalogueExpand } } } @@ -180,8 +226,8 @@ export default { .standard-catalogue { height: 100%; - width: 15%; - min-width: 280px; + position: relative; + transition: width .2s linear; /deep/ .ant-tree li .ant-tree-node-content-wrapper.ant-tree-node-selected { background-color: transparent !important; @@ -189,27 +235,59 @@ export default { } } +.control-standard-catalogue-expand { + width: 12px; + height: 24px; + border-radius: 0 12px 12px 0; + background-color: @primary-color; + color: white; + position: absolute; + left: 100%; + top: calc(50% - 52px); + + .anticon { + position: absolute; + top: 50%; + left: -2px; + transform: translateY(-50%); + cursor: pointer; + } +} + +.expand-catalogue { + width: 280px; +} + +.no-expand-catalogue { + width: 0; +} + .sheet-container { height: 100%; flex: 1; width: 0; + transition: width .2s linear; } .clause-label { - width: 25%; - min-width: 400px; + width: 400px; height: 100%; + overflow: hidden; + transition: width .2s linear; .clause-item { display: flex; margin-bottom: 20px; label { - width: 12rem; + width: 7em; font-size: 14px; font-family: PingFang SC-Regular, PingFang SC, sans-serif; color: #86909C; margin-right: 20px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } span { @@ -222,14 +300,20 @@ export default { } } +.hide-clause-label { + width: 0; + margin-left: 0; +} + .clause-label-change { - width: 6%; - min-width: 130px; + width: 130px; height: 100%; - padding-top: 56px; + padding-top: 40px; + position: relative; + transition: width .2s linear; &-item { - height: 56px; + height: 40px; display: flex; align-items: center; padding: 0 16px; @@ -245,6 +329,8 @@ export default { span { margin-left: 8px; + white-space: nowrap; + overflow: hidden; } } @@ -253,33 +339,40 @@ export default { } } +.no-expand-clause-label { + width: 45px; + min-width: 45px; +} + .part-title { - height: 56px; + height: 40px; background: rgba(213, 44, 38, 0.12); border-radius: 8px 8px 0 0; - line-height: 56px; + line-height: 40px; padding: 0 24px; font-size: 16px; font-family: PingFang SC-Semibold, PingFang SC, sans-serif; font-weight: 600; color: #1D2129; + white-space: nowrap; + overflow: hidden; } .has-title-part-content { - height: calc(100% - 56px); + height: calc(100% - 40px); overflow: auto; padding: 24px; } .standard-name { - height: 56px; + height: 40px; background: #FFFFFF; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; - margin-bottom: 16px; + margin-bottom: 5px; } .standard-name > span { @@ -296,10 +389,32 @@ export default { } .standard-content { - height: calc(100% - 72px); + height: calc(100% - 45px); background: #FFFFFF; border-radius: 8px; overflow: auto; padding: 24px; } + +.control-clause-label-expand { + position: absolute; + width: 12px; + height: 24px; + background-color: @primary-color; + border-radius: 12px 0 0 12px; + left: -12px; + top: calc(50% - 52px); + color: white; + cursor: pointer; + + .anticon { + position: absolute; + top: 50%; + transform: translateY(-50%); + } +} + +/deep/ .ant-tree li span.ant-tree-switcher { + float: right; +} diff --git a/src/views/documentTool/documentComparison/DocumentComparison.vue b/src/views/documentTool/documentComparison/DocumentComparison.vue index c509def4..2b81ddbe 100644 --- a/src/views/documentTool/documentComparison/DocumentComparison.vue +++ b/src/views/documentTool/documentComparison/DocumentComparison.vue @@ -205,7 +205,8 @@ export default { clickEvent: 'edit', has: 'documentComparison:edit', show: (record) => { - return (record.createBy === this.userInfo.username || this.administrators) && record.releaseState === 'draft' + // return (record.createBy === this.userInfo.username || this.administrators) && record.releaseState === 'draft' + return true } }, // 删除 diff --git a/src/views/documentTool/documentComparison/DocumentDataComparison.vue b/src/views/documentTool/documentComparison/DocumentDataComparison.vue index 9466bf59..5f8eb17d 100644 --- a/src/views/documentTool/documentComparison/DocumentDataComparison.vue +++ b/src/views/documentTool/documentComparison/DocumentDataComparison.vue @@ -693,6 +693,7 @@ export default { overflow-y: auto; transition: all 1s; scroll-behavior: smooth; + flex: 1; } .detail-content-content-right-right-top { @@ -700,15 +701,11 @@ export default { overflow-y: auto; transition: all 1s; scroll-behavior: smooth; + flex: 1; .standard-name { margin-right: 0; } - - .detail-content-content-right-right { - margin-right: 0; - width: calc(100% - 10px); - } } .detail-content-content-right { @@ -717,14 +714,16 @@ export default { display: inline-block; margin: 0 10px 0 10px; overflow: auto; + background-color: white; } .detail-content-content-right-right { height: calc(100% - 25px - 40px); - width: calc(100% - 20px); + width: calc(100% - 10px); display: inline-block; - margin: 0 10px 0 10px; + margin-left: 10px; overflow: auto; + background-color: white; } .detail-content-content-right-data { @@ -838,10 +837,10 @@ export default { .standard-catalogue { height: calc(100% - 20px); - width: 15%; - min-width: 200px; + width: 200px; margin: 10px 10px 10px 0; position: relative; + transition: width .2s linear; /deep/ .ant-tree li .ant-tree-node-content-wrapper.ant-tree-node-selected { background-color: transparent !important; @@ -884,6 +883,8 @@ export default { font-family: PingFang SC-Semibold, PingFang SC, sans-serif; font-weight: 600; color: #1D2129; + white-space: nowrap; + overflow: hidden; } .has-title-part-content { diff --git a/src/views/documentTool/documentSplit/DocumentSplit.vue b/src/views/documentTool/documentSplit/DocumentSplit.vue index 4f1b59aa..67ce70e7 100644 --- a/src/views/documentTool/documentSplit/DocumentSplit.vue +++ b/src/views/documentTool/documentSplit/DocumentSplit.vue @@ -96,7 +96,7 @@ import '../../../assets/less/common.less' import JTable from '../../../components/jero/JTable.vue' // 拆分已入库文本弹框 -import SplitText from '../modules/SplitText.vue' +import SplitText from './modules/SplitText.vue' // 导入拆分结果弹框 import ImportResult from '../modules/ImportResult.vue' import { JeroListMixin } from '../../../mixins/JeroListMixin.js' @@ -137,25 +137,25 @@ export default { columns: [ // 标准号 { - dataIndex: '1', + dataIndex: 'serialNumber', title: this.$t('standardSelect.standardNumber'), width: 150 }, // 标准名称 { - dataIndex: '2', + dataIndex: 'title', title: this.$t('standardSelect.standardName'), width: 150 }, // 文件状态 { - dataIndex: '3', + dataIndex: 'fileType', title: this.$t('docTool.split.fileStatus'), width: 150 }, // 文件名称 { - dataIndex: '4', + dataIndex: 'fileName', title: this.$t('fileName'), width: 150 }, @@ -173,13 +173,13 @@ export default { }, // 拆分时间 { - dataIndex: '7', + dataIndex: 'createTime', title: this.$t('docTool.split.splitTime'), width: 150 }, // 拆分结果 { - dataIndex: '91', + dataIndex: 'splitResult', title: this.$t('docTool.split.splitResult'), sorter: true, width: 150 @@ -246,6 +246,11 @@ export default { } }) }, + handleDetail (record) { + this.$openPageNewSheet({ + path: '/documentTool/StandardSplitSheet' + }) + }, splitTextVisible (val, num) { if (num === 1) { this.$refs.tableData.$emit('searchGetData') diff --git a/src/views/documentTool/documentSplit/DocumentSplitDetail.vue b/src/views/documentTool/documentSplit/DocumentSplitDetail.vue index 78ece2b4..8df79acb 100644 --- a/src/views/documentTool/documentSplit/DocumentSplitDetail.vue +++ b/src/views/documentTool/documentSplit/DocumentSplitDetail.vue @@ -6,15 +6,14 @@