Jelajahi Sumber

测试档案调整里的卷内文件编辑

ZaiZai 2 tahun lalu
induk
melakukan
6407f02089
2 mengubah file dengan 27 tambahan dan 1 penghapusan
  1. 8 0
      src/api/modules/archiveConfig/tuning.js
  2. 19 1
      src/views/archives/tuning.vue

+ 8 - 0
src/api/modules/archiveConfig/tuning.js

@@ -81,4 +81,12 @@ async splitArchive(form, msg = true) {
             params: form
         }, msg);
     },
+    //编辑卷内文件/
+    async archiveFileBatchUpdate(form, msg = true) {
+        return httpApi({
+            url: '/api/blade-archive/archiveFile/batchUpdate',
+            method: 'post',
+            data: form
+        }, msg);
+    },
 }

+ 19 - 1
src/views/archives/tuning.vue

@@ -740,6 +740,24 @@ const batchUploadSaveApi = async (rows) => {
         window.$message?.error('保存失败')
     }
 }
+
+//确认上传保存
+const archiveFileBatchUpdate = async (rows) => {
+    uploadSaveLoading.value = true
+    const {error, code} = await tuningApi.archiveFileBatchUpdate({
+        list: rows
+    }, false)
+    //判断状态
+    uploadSaveLoading.value = false
+    if (!error && code === 200) {
+        window.$message?.success('保存成功')
+        batchUploadCancel()
+        getTableData()
+    } else {
+        window.$message?.error('保存失败')
+    }
+}
+
 //批量新增编辑保存
 const batchUploadSave = async () => {
     const rows = tableUploadData.value
@@ -762,7 +780,7 @@ const batchUploadSave = async () => {
                     element.endDate = dates ? dates[1] : null
                     element.autoFileSort = index + 1
                 })
-                await batchUploadSaveApi(rows)
+                await archiveFileBatchUpdate(rows)
             } else {
                 await batchUploadSaveApi(rows)
             }