From 8ce44b379888f6b23dc23df99295f0cc8b42c72f Mon Sep 17 00:00:00 2001 From: "wu.jian2" Date: Mon, 9 Oct 2023 15:21:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=8A=A9?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E8=BE=93=E5=87=BA=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E6=B2=A1=E6=9C=89=E6=8C=89=E7=85=A7=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E6=9D=A5=E8=BF=9B=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DataSetManagement/src/CustomEditForm.vue | 34 +++++++++++++++---- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/data-room-ui/packages/DataSetManagement/src/CustomEditForm.vue b/data-room-ui/packages/DataSetManagement/src/CustomEditForm.vue index 2d243450..8af93990 100644 --- a/data-room-ui/packages/DataSetManagement/src/CustomEditForm.vue +++ b/data-room-ui/packages/DataSetManagement/src/CustomEditForm.vue @@ -289,7 +289,7 @@
@@ -907,6 +907,22 @@ export default { tableColumnObject[item.fieldName] = '' }) return tableColumnObject + }, + // 输出字段根据orderNum排序 + sortedStructurePreviewList () { + const list = this.structurePreviewList + list.sort((a, b) => { + return a.orderNum - b.orderNum + }) + return list + }, + sortedTablePreviewList () { + const tableList = this.dataPreviewList[0] ? this.dataPreviewList[0] : this.noDataTableDisplayFields + const list = Object.keys(tableList) + list.sort((a, b) => { + return this.structurePreviewListCopy.findIndex(item => item.fieldName === a) - this.structurePreviewListCopy.findIndex(item => item.fieldName === b) + }) + return list } }, watch: { @@ -1262,6 +1278,9 @@ export default { }) } this.structurePreviewListCopy = cloneDeep(this.structurePreviewList) + this.structurePreviewListCopy = this.structurePreviewListCopy.sort((a, b) => { + return a.orderNum - b.orderNum + }) let paramsNameCheck = false this.dataForm.paramsList.forEach(param => { const checkList = this.structurePreviewList.filter(item => item.fieldName === param.name) @@ -1465,13 +1484,14 @@ export default { width: 100% !important; } -::v-deep .el-table__row{ +::v-deep .el-table__row { height: 58px; - .cell{ + + .cell { width: 100%; margin: 0 auto; position: absolute; - top:8px; + top: 8px; } }