Bläddra i källkod

更新案卷四要素

duy 3 månader sedan
förälder
incheckning
6b4afb582b
2 ändrade filer med 41 tillägg och 1 borttagningar
  1. 9 0
      src/api/modules/archiveConfig/tuning.js
  2. 32 1
      src/views/archives/manage/tuning.vue

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

@@ -121,4 +121,13 @@ async splitArchive(form, msg = true) {
             data: form,
         }, msg)
     },
+    //更新案卷四要素
+    
+    async updateArchiveFour(form, msg = true) {
+        return HcApi({
+            url: '/api/blade-archive/archivesauto/reBuildArchiveFrontPdfs',
+            method: 'get',
+            params: form,
+        }, msg)
+        },
 }

+ 32 - 1
src/views/archives/manage/tuning.vue

@@ -32,6 +32,11 @@
                         档号整理
                     </el-button>
                 </HcTooltip>
+                <HcTooltip keys="archives_tuning_update_four">
+                    <el-button :loading="refreshFileFourLoading" hc-btn @click="refreshFileFourClick">
+                        更新案卷四要素
+                    </el-button>
+                </HcTooltip>
                 <HcTooltip keys="archives_tuning_btn_lock">
                     <el-button :disabled="tableCheckedKeys.length <= 0" :loading="lockLoad" hc-btn @click="lockarchives">档案锁定</el-button>
                 </HcTooltip>
@@ -230,7 +235,7 @@
 import { onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
 import HcTree from '~src/components/tree/hc-tree.vue'
-import { deepClone, getArrValue } from 'js-fast-way'
+import { arrToId, deepClone, getArrValue } from 'js-fast-way'
 import { rowsToId, rowsToIdNumArr } from '~uti/tools'
 
 import tuningApi from '~api/archiveConfig/tuning.js'
@@ -924,6 +929,32 @@ const refreshFileNumberClick = async () => {
     } else {
         window.$message?.warning(msg)
     }
+}
+//更新案卷四要素
+const refreshFileFourLoading = ref(false)
+const refreshFileFourClick = async ()=>{
+    if (tableCheckedKeys.value.length === 0) {
+        window.$message?.warning('请选择需要更新的案卷')
+        return
+    }
+    refreshFileFourLoading.value = true
+    const rows = tableCheckedKeys.value
+    let ids = ''
+    ids = arrToId(rows)
+    const { error, code, data, msg } = await tuningApi.updateArchiveFour({
+        projectId: projectId.value,
+     
+        archiveIds:ids,
+    })
+    refreshFileFourLoading.value = false
+    if (!error && code === 200) {
+        window.$message?.success(msg)
+        getTableData()
+    } else {
+        window.$message?.warning(msg)
+    }
+
+
 }
 </script>