Browse Source

批量认证接口

duy 1 year ago
parent
commit
94e95f0b21

+ 9 - 0
src/api/modules/tasks/flow.js

@@ -65,4 +65,13 @@ export default {
             data: form,
         }, msg)
     },
+    //批量认证
+    async batchCertification(form, msg = true) {
+        return httpApi({
+            url: '/api/blade-archive/archiveTask/batchCertification',
+            method: 'post',
+            params: form,
+        }, msg)
+    },
+
 }

+ 7 - 6
src/views/file/collection.vue

@@ -442,6 +442,7 @@ import notableform from '~src/assets/view/notableform.svg'
 import { rowsToId } from '~uti/tools'
 import { delMessageV2 } from '~com/message/index.js'
 import archiveFileApi from '~api/archiveFile/archiveFile'
+import tasksFlowApi from '~api/tasks/flow'
 import { arrKeySort, arrToId, deepClone, getArrValue, getObjVal } from 'js-fast-way'
 import { getTokenHeader } from '~src/api/request/header'
 import tasksApi from '~api/tasks/data'
@@ -1517,7 +1518,7 @@ const certificationModalClick = () => {
     CertIds.value = rowsToId(rows)
     CertPdf.value = rows[0]?.pdfFileUrl || ''
     showCertificationModal.value = true
-    /*const result = rows.every(({isCertification})=> {
+    const result = rows.every(({ isCertification })=> {
         return isCertification === 0
     })
     if (result) {
@@ -1527,7 +1528,7 @@ const certificationModalClick = () => {
         showCertificationModal.value = true
     } else {
         window.$message?.warning('已认证的文件不能再认证')
-    }*/
+    }
 }
 
 //认证行被点击
@@ -1549,9 +1550,9 @@ const CertRowClick2 = ({ pdfFileUrl }) => {
 //确认认证
 const CertLoading = ref(false)
 const CertClick = async () => {
-    /*CertLoading.value = true
-    const {error, code} = await projectScanningApi.batchCertification({
-        ids: CertIds.value
+    CertLoading.value = true
+    const { error, code } = await tasksFlowApi.batchCertification({
+        ids: CertIds.value,
     }, false)
     //判断状态
     CertLoading.value = false
@@ -1561,7 +1562,7 @@ const CertClick = async () => {
         getTableData()
     } else {
         window.$message?.error('认证失败')
-    }*/
+    }
 }
 
 //名称被点击

+ 1 - 1
src/views/file/components/HcReport.vue

@@ -52,7 +52,7 @@
 <script setup>
 import { ref, watch } from 'vue'
 import tasksFlowApi from '~api/tasks/flow'
-import { arrIndex, arrToId, arrToKey, formValidate } from 'js-fast-way'
+import { arrIndex, arrToKey, formValidate } from 'js-fast-way'
 import HcTasksUserVue from './hc-tasks-user/index.vue'
 import { useAppStore } from '~src/store'