Просмотр исходного кода

立即更新立卷接口对接

duy 2 лет назад
Родитель
Сommit
67f851254c
2 измененных файлов с 24 добавлено и 2 удалено
  1. 8 1
      src/api/modules/archiveConfig/tuning.js
  2. 16 1
      src/views/archives/rolling.vue

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

@@ -65,5 +65,12 @@ async splitArchive(form, msg = true) {
         params: form
     }, msg);
   }, 
-
+  //立即更新立卷/blade-archive/archivesauto/archiveAutoMethod
+  async archiveAutoMethod(form, msg = true) {
+    return httpApi({
+        url: '/api/blade-archive/archivesauto/archiveAutoMethod',
+        method: 'post',
+        params: form
+    }, msg);
+  },
 }

+ 16 - 1
src/views/archives/rolling.vue

@@ -28,7 +28,7 @@
                 </template> -->
                 <template  #extra>
                     <HcTooltip keys="archives_rolling_btn_update">
-                        <el-button type="primary" hc-btn>
+                        <el-button type="primary" hc-btn @click="updateArchive" :loading="updateArchiveLoad">
                             <HcIcon name="git-pull-request"/>
                             <span>立即更新立卷</span>
                         </el-button>
@@ -219,6 +219,21 @@ const viewPdf=async(id)=>{
         window.$message?.warning(msg)
     }
 }
+//更新立卷
+const updateArchiveLoad=ref(false)
+const updateArchive=async()=>{
+    updateArchiveLoad.value=true
+    const { error, code, data,msg } = await tuningApi.archiveAutoMethod({
+        projectId:projectId.value
+    })
+    updateArchiveLoad.value=false
+    if (!error && code === 200) {
+        window.$message?.success(msg)
+       
+    } else {
+        window.$message?.warning(msg)
+    }
+}
 </script>
 
 <style lang="scss" scoped>