Ver código fonte

编辑卷内文件更改接口

duy 5 dias atrás
pai
commit
c36c4c656a

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

@@ -89,7 +89,7 @@ async splitArchive(form, msg = true) {
             params: form,
         }, msg)
     },
-    //编辑卷内文件/
+    //编辑卷内文件/排序
     async archiveFileBatchUpdate(form, msg = true) {
         return HcApi({
             url: '/api/blade-archive/archiveFile/batchUpdate',
@@ -97,6 +97,13 @@ async splitArchive(form, msg = true) {
             data: form,
         }, msg)
     },
+    async batchUpdateInfo(form, msg = true) {
+        return HcApi({
+            url: '/api/blade-archive/archiveFile/batchUpdateInfo',
+            method: 'post',
+            data: form,
+        }, msg)
+    },
     //获取文件元数据信息/
     async getMetadataFileByid(form, msg = true) {
         return HcApi({

+ 6 - 6
src/views/archives/manage/tuning.vue

@@ -1188,12 +1188,12 @@ const batchUploadSaveApi = async (rows) => {
 }
 
 //确认上传保存
-const archiveFileBatchUpdate = async (rows) => {
+const archiveFileBatchUpdate = async (rows, type) => {
     uploadSaveLoading.value = true
-    const { error, code } = await tuningApi.archiveFileBatchUpdate({
-        list: rows,
-    }, false)
-    //判断状态
+    const apiMethod = type === 2 ? tuningApi.batchUpdateInfo : tuningApi.archiveFileBatchUpdate
+    
+    const { error, code } = await apiMethod({ list: rows }, false)
+    
     uploadSaveLoading.value = false
     if (!error && code === 200) {
         window.$message?.success('保存成功')
@@ -1226,7 +1226,7 @@ const batchUploadSave = async () => {
                     element.endDate = dates ? dates[1] : null
                     element.autoFileSort = index + 1
                 })
-                await archiveFileBatchUpdate(rows)
+                await archiveFileBatchUpdate(rows, editType.value)
             } else {
                 await batchUploadSaveApi(rows)
             }