فهرست منبع

档案预警掉接口

duy 1 سال پیش
والد
کامیت
5457ccb967
2فایلهای تغییر یافته به همراه48 افزوده شده و 14 حذف شده
  1. 12 0
      src/api/modules/custody/early.js
  2. 36 14
      src/views/custody/components/tab-reform.vue

+ 12 - 0
src/api/modules/custody/early.js

@@ -0,0 +1,12 @@
+import { httpApi } from '../../request/httpApi'
+
+export default {
+  //档案预警-分页查询(需要整改的文件)
+  async warningPage(form, msg = true) {
+    return httpApi({
+        url: '/api/blade-archive/archivesauto/warningPage',
+        method: 'post',
+        data: form,
+    }, msg)
+},
+}

+ 36 - 14
src/views/custody/components/tab-reform.vue

@@ -20,6 +20,7 @@
 <script setup>
 import { nextTick, ref, watch } from 'vue'
 import archiveFileApi from '~api/archiveFile/archiveFile'
+import earlyApi from '~api/custody/early'
 import { getArrValue } from 'js-fast-way'
 
 //参数
@@ -119,26 +120,47 @@ const tableData = ref([])
 //获取数据
 const tableLoading = ref(false)
 const getTableData = async () => {
+    if (tabKey.value !== '1') {
         if (nodeData.value.id) {
             tableLoading.value = true
             const { error, code, data } = await archiveFileApi.getarchiveFilePage({
-            ...searchForm.value,
-            nodeIds: nodeData.value.id,
-            projectId: projectId.value,
-            contractId: contractId.value,
-            rectification:tabKey.value,
-        })
-        tableLoading.value = false
-        if (!error && code === 200) {
-            tableData.value = getArrValue(data['records'])
-            searchForm.value.total = data['total'] || 0
-        } else {
-            tableData.value = []
-            searchForm.value.total = 0
+                ...searchForm.value,
+                nodeIds: nodeData.value.id,
+                projectId: projectId.value,
+                contractId: contractId.value,
+                rectification:tabKey.value,
+            })
+            tableLoading.value = false
+            if (!error && code === 200) {
+                tableData.value = getArrValue(data['records'])
+                searchForm.value.total = data['total'] || 0
+            } else {
+                tableData.value = []
+                searchForm.value.total = 0
+            }
+        }
+    } else {
+        tableLoading.value = true
+            const { error, code, data } = await earlyApi.warningPage({
+                ...searchForm.value,
+                nodeIds: nodeData.value.id,
+                projectId: projectId.value,
+                contractId: contractId.value,
+                rectification:tabKey.value,
+            })
+            tableLoading.value = false
+            if (!error && code === 200) {
+                tableData.value = getArrValue(data['records'])
+                searchForm.value.total = data['total'] || 0
+            } else {
+                tableData.value = []
+                searchForm.value.total = 0
+            }
         }
     }
+        
+
 
-}
 // 暴露出去
 defineExpose({
     getTableData,