duy 2 лет назад
Родитель
Сommit
556351241c
2 измененных файлов с 19 добавлено и 2 удалено
  1. 1 1
      src/api/modules/archiveFile/archiveFileAuto.js
  2. 18 1
      src/views/file/records.vue

+ 1 - 1
src/api/modules/archiveFile/archiveFileAuto.js

@@ -22,7 +22,7 @@ export default {
     //批量修改
     async batchUpdateSort(form, msg = true) {
       return httpApi({
-          url: '/api/blade-archive/archiveFile/batchUpdateSort',
+          url: '/api/blade-archive/archiveFileAuto/batchSortSave',
           method: 'post',
           data: form,
       }, msg)

+ 18 - 1
src/views/file/records.vue

@@ -924,7 +924,7 @@ const sortModalSave = async () => {
         element.autoFileSort = index + 1
     })
 
-    await batchEditSaveApi(rows)
+    await batchUpdateSortApi(rows)
 
     sortModal.value = false
 }
@@ -1168,6 +1168,23 @@ const batchEditClick = () => {
 
 //确认编辑上传保存
 const batchEditSaveApi = async (rows) => {
+    uploadSaveLoading.value = true
+    const { error, code } = await archiveFileApi.batchUploadSave({
+        list: rows,
+    }, false)
+    //判断状态
+    uploadSaveLoading.value = false
+    if (!error && code === 200) {
+        window.$message?.success('保存成功')
+        batchUploadCancel()
+        getTableData()
+    } else {
+        window.$message?.error('保存失败')
+    }
+}
+
+//确认排序
+const batchUpdateSortApi = async (rows) => {
     uploadSaveLoading.value = true
     const { error, code } = await archiveFileApi.batchUpdateSort({
         list: rows,