From a126b41e829ecbd6e993c72957f47dcbe9622898 Mon Sep 17 00:00:00 2001 From: danshihao Date: Mon, 1 Jul 2024 16:24:10 +0800 Subject: [PATCH] =?UTF-8?q?[update=20=E6=8B=86=E5=88=86]=20=E6=8B=86?= =?UTF-8?q?=E5=88=86=E6=9F=A5=E7=9C=8B=E9=A1=B5=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/StandardResolutionSheet.vue | 234 ++++++++++-------- src/views/dashboard/search/AdvancedSearch.vue | 26 +- .../documentSplit/StandardSplitSheet.vue | 2 +- 3 files changed, 145 insertions(+), 117 deletions(-) diff --git a/src/components/StandardResolutionSheet.vue b/src/components/StandardResolutionSheet.vue index 52667fe..17662ca 100644 --- a/src/components/StandardResolutionSheet.vue +++ b/src/components/StandardResolutionSheet.vue @@ -3,7 +3,7 @@
- + @@ -72,7 +72,7 @@
-
@@ -89,60 +89,63 @@
- + + + +
- -
- -
- - - {{ spiltInfo.serialNumber }}《{{ spiltInfo.fileName }}》 - - - {{ isContainerExpand ? $t('putAway') : $t('open') }} - -
- -
-
-
{{ clause.item_num }} {{ clause.item_title }}
-
+ +
+ +
+ +
+ + + {{ spiltInfo.serialNumber }}《{{ spiltInfo.fileName }}》 + + + {{ isContainerExpand ? $t('putAway') : $t('open') }} +
-
- -
- -
-
{{ $t('standardRegulationLibrary.translation') }}
-
-
-
{{ clauseLabelInfo.item_num }} {{ clauseLabelInfo.item_title }}
-
+ +
+
+
{{ clause.item_num }} {{ clause.item_title }}
+
+
- + + + + +
+ +
+
{{ $t('standardRegulationLibrary.translation') }}
+
+
+
{{ clauseLabelInfo.item_num }} {{ clauseLabelInfo.item_title }}
+
+
+ +
+ + + +
-
-
+
{{ $t('standardRegulationLibrary.clauseLabel') }}
- + + + +
- - - - - - - - - - - - - - - - - - - - - - - - - +
+
+ +
+ + + +
+ + {{ $t('docTool.split.article') }} +
+
+ + + +
+ + {{ $t('docTool.split.clauseLabel') }} +
+
+
@@ -242,14 +245,14 @@ export default { standardCatalogueRefX: 280, // 标准目录默认宽度 sheetContainerRefX: 0, // 标准内容默认宽度 clauseLabelRefX: 360, // 条文标签默认宽度 - translationRefX: 280 // 译文部分默认宽度 + translationRefX: 0 // 译文部分默认宽度 } }, mounted () { this.getSysCategoryTree() // 容器实际剩余宽度 = 右侧内容宽度 - 内容中的间距 - const boxWidth = this.$refs.sheetBoxRef.getBoundingClientRect().width - this.$refs.translationRef.getBoundingClientRect().width - (16 * 4) - this.sheetContainerRefX = boxWidth - this.standardCatalogueRefX - this.clauseLabelRefX + // const boxWidth = this.$refs.sheetBoxRef.getBoundingClientRect().width - this.$refs.clauseLabelChangeRef.getBoundingClientRect().width - (16 * 4) + // this.sheetContainerRefX = boxWidth - this.standardCatalogueRefX - this.clauseLabelRefX }, methods: { // 查看文件 @@ -323,7 +326,7 @@ export default { }) }, initDetailInfo (queryParams) { - this.loading = true + // this.loading = true const params = Object.assign({}, this.queryParams, queryParams) if (this.horizontalOverstep) { params.horizontalOverstep = true @@ -383,28 +386,29 @@ export default { */ handleContainerExpand () { this.isContainerExpand = !this.isContainerExpand - if (this.isContainerExpand) { - // 展开主要内容前:主要内容宽 = 当前宽度 + 条文标签宽度(未隐藏时) + 标准目录宽度(未隐藏时) - this.sheetContainerRefX = this.sheetContainerRefX + (this.showClauseLabel ? this.clauseLabelRefX : 0) + (this.isCatalogueExpand ? this.standardCatalogueRefX : 0) + this.translationRefX - this.isCatalogueExpand = false - } else { - // 收起主要内容前:主要内容宽 = 当前宽度 - 条文标签宽度(隐藏时) - 标准目录宽度(隐藏时) - this.sheetContainerRefX = this.sheetContainerRefX - (this.showClauseLabel ? this.clauseLabelRefX : 0) - (!this.isCatalogueExpand ? this.standardCatalogueRefX : 0) - this.translationRefX - this.isCatalogueExpand = true - } + this.isCatalogueExpand = !this.isContainerExpand + // if (this.isContainerExpand) { + // // 展开主要内容前:主要内容宽 = 当前宽度 + 条文标签宽度(未隐藏时) + 标准目录宽度(未隐藏时) + // this.sheetContainerRefX = this.sheetContainerRefX + (this.showClauseLabel ? this.clauseLabelRefX : 0) + (this.isCatalogueExpand ? this.standardCatalogueRefX : 0) + this.translationRefX + // this.isCatalogueExpand = false + // } else { + // // 收起主要内容前:主要内容宽 = 当前宽度 - 条文标签宽度(隐藏时) - 标准目录宽度(隐藏时) + // this.sheetContainerRefX = this.sheetContainerRefX - (this.showClauseLabel ? this.clauseLabelRefX : 0) - (!this.isCatalogueExpand ? this.standardCatalogueRefX : 0) - this.translationRefX + // this.isCatalogueExpand = true + // } }, /** * 条文标签切换 * @param flag */ handleClauseChange (flag) { - const beforeFlag = this.showClauseLabel + // const beforeFlag = this.showClauseLabel this.showClauseLabel = flag // 如果值改变了,就进行宽度调整 - if (beforeFlag !== flag) { - // 主要内容宽 = 当前宽度 +(收起)|-(展开) 条文标签宽度 - this.sheetContainerRefX = this.sheetContainerRefX + (this.clauseLabelRefX * (this.showClauseLabel ? -1 : 1)) - } + // if (beforeFlag !== flag) { + // // 主要内容宽 = 当前宽度 +(收起)|-(展开) 条文标签宽度 + // this.sheetContainerRefX = this.sheetContainerRefX + (this.clauseLabelRefX * (this.showClauseLabel ? -1 : 1)) + // } }, /** * 展开或收起条文/条文标签面板 @@ -413,8 +417,8 @@ export default { this.isClauseLabelExpand = !this.isClauseLabelExpand // TODO 右侧切换条文和条文标签折叠宽度有改的话,需要修改这里的差值 // 根据展开或收起,给主要内容减少或增加宽度 - const diff = Math.abs(130 - 45) - this.sheetContainerRefX = this.sheetContainerRefX + (diff * (this.isClauseLabelExpand ? -1 : 1)) + // const diff = Math.abs(130 - 45) + // this.sheetContainerRefX = this.sheetContainerRefX + (diff * (this.isClauseLabelExpand ? -1 : 1)) }, /** * 展开或收起标准目录 @@ -422,7 +426,7 @@ export default { expandCatalogue () { this.isCatalogueExpand = !this.isCatalogueExpand // 主要内容宽 = 当前宽度 +(收起)|-(展开) 标准目录宽度 - this.sheetContainerRefX = this.sheetContainerRefX + (this.standardCatalogueRefX * (this.isCatalogueExpand ? -1 : 1)) + // this.sheetContainerRefX = this.sheetContainerRefX + (this.standardCatalogueRefX * (this.isCatalogueExpand ? -1 : 1)) } } } @@ -440,8 +444,8 @@ export default { // 禁止flex自动扩充或收缩,拖拽必须要绝对单位 & > div { - flex-grow: 0; - flex-shrink: 0; + //flex-grow: 0; + //flex-shrink: 0; } } @@ -501,23 +505,41 @@ export default { width: 0 !important; } +// 内容和译文为了平分宽度 +.content-and-translation { + display: flex; + flex: auto; + + &.hide-translation .sheet-container { + width: 100%; + } +} + .sheet-container { position: relative; height: 100%; - width: 100%; - //flex: 1; + width: 50%; //width: 0; transition: width .2s linear; } .translation-text { + width: 50%; + transition: width .2s linear; position: relative; - width: 280px; + //width: 280px; height: 100%; } .translation-content { height: calc(100% - 40px); } + +.hide-translation-text { + width: 0 !important; + overflow: hidden; + margin-left: 0; +} + .clause-label { position: relative; width: 400px; @@ -589,7 +611,7 @@ export default { } &-item-selected { - background: #FAE6E5; + background: rgba(0, 100, 250, 0.12); } } diff --git a/src/views/dashboard/search/AdvancedSearch.vue b/src/views/dashboard/search/AdvancedSearch.vue index 4063710..943ea9c 100644 --- a/src/views/dashboard/search/AdvancedSearch.vue +++ b/src/views/dashboard/search/AdvancedSearch.vue @@ -188,7 +188,13 @@
{{ global.emptyLine }}
- + +
@@ -348,7 +354,7 @@ export default { align: 'center', width: 180, dataIndex: 'item_content', - scopedSlots: { customRender: 'text' } + scopedSlots: { customRender: 'item_content' } }, { // 适用零部件 title: this.$t('dashboard.advancedSearch.applicableComponents'), @@ -389,56 +395,56 @@ export default { title: this.$t('dashboard.advancedSearch.responsibleDepartment'), align: 'center', width: 180, - dataIndex: 'responsible_department', + dataIndex: 'responsible_department_dictText', scopedSlots: { customRender: 'text' } }, { // 责任部门专业模块 title: this.$t('dashboard.advancedSearch.responsibleDepartmentModule'), align: 'center', width: 180, - dataIndex: 'responsible_module', + dataIndex: 'responsible_module_dictText', scopedSlots: { customRender: 'text' } }, { // 关联部门 title: this.$t('dashboard.advancedSearch.relatedDepartments'), align: 'center', width: 180, - dataIndex: 'related_department', + dataIndex: 'related_department_dictText', scopedSlots: { customRender: 'text' } }, { // 关联部门专业模块 title: this.$t('dashboard.advancedSearch.relatedDepartmentModule'), align: 'center', width: 180, - dataIndex: 'related_module', + dataIndex: 'related_module_dictText', scopedSlots: { customRender: 'text' } }, { // 适用车型 title: this.$t('dashboard.advancedSearch.applications'), align: 'center', width: 180, - dataIndex: 'applications', + dataIndex: 'applications_dictText', scopedSlots: { customRender: 'text' } }, { // 动力类型 title: this.$t('dashboard.advancedSearch.powerType'), align: 'center', width: 180, - dataIndex: 'power_type', + dataIndex: 'power_type_dictText', scopedSlots: { customRender: 'text' } }, { // 专业领域 title: this.$t('dashboard.advancedSearch.professionalField'), align: 'center', width: 180, - dataIndex: 'domain_area', + dataIndex: 'domain_area_dictText', scopedSlots: { customRender: 'text' } }, { // 配置需求 title: this.$t('dashboard.advancedSearch.configurationRequirements'), align: 'center', width: 180, - dataIndex: 'configuration_requirements', + dataIndex: 'configuration_requirements_dictText', scopedSlots: { customRender: 'text' } } ], diff --git a/src/views/documentTool/documentSplit/StandardSplitSheet.vue b/src/views/documentTool/documentSplit/StandardSplitSheet.vue index 8d7d906..1c1d12b 100644 --- a/src/views/documentTool/documentSplit/StandardSplitSheet.vue +++ b/src/views/documentTool/documentSplit/StandardSplitSheet.vue @@ -24,7 +24,7 @@ export default {