From fa9d1991996831b30aa66ba75561ecf7e908d3d5 Mon Sep 17 00:00:00 2001
From: xuhuajiao <13476289682@163.com>
Date: Wed, 17 Aug 2022 11:08:01 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A1=A3=E6=A1=88-=E4=B8=8A=E4=BC=A0=E9=99=84?=
=?UTF-8?q?=E4=BB=B6-=E6=8E=92=E5=BA=8F=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../archivesList/module/uploadFile/index.vue | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/views/archivesManage/archivesList/module/uploadFile/index.vue b/src/views/archivesManage/archivesList/module/uploadFile/index.vue
index 6ebf46d..defc00f 100644
--- a/src/views/archivesManage/archivesList/module/uploadFile/index.vue
+++ b/src/views/archivesManage/archivesList/module/uploadFile/index.vue
@@ -7,7 +7,7 @@
删除
- 排序
+ 排序
@@ -62,7 +62,7 @@
提示:请通过拖动鼠标来调整当前顺序
-
+
@@ -126,6 +126,7 @@ export default {
tableData: [], // 附件list
selections: [], // table - 选中的
showCoverVisible: false, // 查看大图dialog
+ sortTableData: [], // 排序data
sortVisible: false, // 排序dialog
deleteVisible: false, // 删除附件 dialog
deleteData: [], // 删除选中的data
@@ -283,13 +284,17 @@ export default {
},
// 排序
opened() {
- this.rowDrop('file-sort', 'tableData')
+ this.rowDrop('file-sort', 'sortTableData')
+ },
+ showSort() {
+ this.sortVisible = true
+ this.sortTableData = JSON.parse(JSON.stringify(this.tableData))
},
// 排序 - 保存
handleSort() {
const ids = []
const sequences = []
- this.tableData.map((value, index) => {
+ this.sortTableData.map((value, index) => {
ids.push(value.id)
sequences.push(index + 1)
})
@@ -301,6 +306,8 @@ export default {
FetchFileSort(params).then((res) => {
this.sortVisible = false
this.$message.success('附件排序成功!')
+ this.crud.refresh()
+ this.getFileList()
})
},
// table