From 59ed913bae0a2447cff05a04863feb90809a8f4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=9C=84?= Date: Thu, 31 Aug 2023 17:14:47 +0800 Subject: [PATCH] =?UTF-8?q?fix=20JTable=E6=8B=96=E6=8B=BD=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/standardRegulationLibraryApi.js | 15 ++++++++++++++- src/components/jero/JTable.vue | 6 +++++- .../overseasStandard/OverseasStandardList.vue | 16 +++++++++------- .../modules/OverseasStandardModal.vue | 13 ++++++++----- src/views/user/Login.vue | 14 -------------- 5 files changed, 36 insertions(+), 28 deletions(-) diff --git a/src/api/standardRegulationLibraryApi.js b/src/api/standardRegulationLibraryApi.js index 19c94289..195d6c9d 100644 --- a/src/api/standardRegulationLibraryApi.js +++ b/src/api/standardRegulationLibraryApi.js @@ -9,9 +9,22 @@ const getDomesticStandardDocumentInfo = (params) => getAction('/laws/standard/do // 国内法规标准-获取表头信息 const getDomesticStandardTableHeader = (params) => getAction('/laws/standard/domestic/getCommonHeader', params) +// 海外标准-获取查询条件 +const getOverseasStandardSearchForm = (params) => getAction('/laws/standard/overseas/getQueryCondition', params) +// 海外标准-获取表单 +const getOverseasStandardForm = (params) => getAction('/laws/standard/overseas/getFormModel', params) +// 海外标准-获取信息 +const getOverseasStandardDocumentInfo = (params) => getAction('/laws/standard/overseas/getByIdAndModule', params) +// 海外标准-获取表头信息 +const getOverseasStandardTableHeader = (params) => getAction('/laws/standard/overseas/getCommonHeader', params) + export { getDomesticStandardSearchForm, getDomesticStandardFormModal, getDomesticStandardDocumentInfo, - getDomesticStandardTableHeader + getDomesticStandardTableHeader, + getOverseasStandardSearchForm, + getOverseasStandardForm, + getOverseasStandardDocumentInfo, + getOverseasStandardTableHeader } diff --git a/src/components/jero/JTable.vue b/src/components/jero/JTable.vue index 609512bf..97bac347 100644 --- a/src/components/jero/JTable.vue +++ b/src/components/jero/JTable.vue @@ -325,8 +325,12 @@ export default { } else { this.selfScroll = scroll } + // 解决拖拽重置其他单元格宽度的问题 + const colIndex = this.resultColumns.findIndex(tt => getKey(tt) === key) + const nowResultColumns = cloneDeep(this.resultColumns) + nowResultColumns.splice(colIndex, 1, col) // 修改列宽后,更新表格字段 - this.setResultColumns(columns) + this.setResultColumns(nowResultColumns) } // 停止拖拽监听 const onDragstop = () => { diff --git a/src/views/standardRegulationLibrary/overseasStandard/OverseasStandardList.vue b/src/views/standardRegulationLibrary/overseasStandard/OverseasStandardList.vue index af0b3455..cf7123d1 100644 --- a/src/views/standardRegulationLibrary/overseasStandard/OverseasStandardList.vue +++ b/src/views/standardRegulationLibrary/overseasStandard/OverseasStandardList.vue @@ -43,7 +43,7 @@
- +
@@ -119,6 +119,7 @@ import JTable from '../../../components/jero/JTable.vue' import Search from '../../../components/customField/Search.vue' import { ConfigurableTableMixin } from '../../../mixins/ConfigurableTableMixin' import OverseasStandardModal from './modules/OverseasStandardModal.vue' +import { getOverseasStandardTableHeader, getOverseasStandardSearchForm } from '../../../api/standardRegulationLibraryApi' const apiTreeData = [ { @@ -176,12 +177,13 @@ export default { has: '' } ], - url: { - tableHeader: '/laws/standard/overseas/getCommonHeader', - getSearchList: '/laws/standard/overseas/getQueryCondition', - list: '/laws/standard/overseas/getCommonHeader', - delete: '/laws/standard/overseas/deleteByIdsAndModule' - } + getTableHeaderFunc: getOverseasStandardTableHeader, + getSearchFunc: getOverseasStandardSearchForm, + url: + { + list: '/laws/standard/overseas/getCommonHeader', + delete: '/laws/standard/overseas/deleteByIdsAndModule' + } } }, created () { diff --git a/src/views/standardRegulationLibrary/overseasStandard/modules/OverseasStandardModal.vue b/src/views/standardRegulationLibrary/overseasStandard/modules/OverseasStandardModal.vue index 9e09efbf..855c11a9 100644 --- a/src/views/standardRegulationLibrary/overseasStandard/modules/OverseasStandardModal.vue +++ b/src/views/standardRegulationLibrary/overseasStandard/modules/OverseasStandardModal.vue @@ -7,11 +7,13 @@ @close="handleCancel" :visible="visible" :maskClosable="false" - style="height: 100%;overflow: auto;" - > + style="height: 100%;overflow: auto;">
- +