Browse Source

非结构化数据分类统计

tengmingxue 1 year ago
parent
commit
d29e817aa0

+ 20 - 3
src/api/interface/interface.ts

@@ -39,8 +39,10 @@ enum Api {
     GetSupportModule = '/datasearch-center/space/getSRResourceGroup',
     //(12)获取Iserver统计数据
     GetIserverUseCountByType = '/external-service-center/IServer/getIServerCountData',
-    //(13)
+    //(13)获取接口非结构化存储文件个数,文件总容量
     GetDataStoreData = '/interface-center/monitor/getDataStoreData',
+    //(14)分组统计文件资源大小(GB)
+    getDRResourceFileSize = '/datasearch-center/space/getDRResourceFileSize'
 }
 
 /**
@@ -334,7 +336,7 @@ export function DataStoreGroupByStatistics(params) {
                 if (r.resp_code == 0 && r.datas && r.datas.length) {
                     resolve(r.datas);
                 } else {
-                    resolve();
+                    resolve([]);
                 }
             })
     })
@@ -343,7 +345,6 @@ export function DataStoreGroupByStatistics(params) {
 /**
  * @description
 */
-
 export function QueryDataStoreData(params) {
     return new Promise<void>((resolve) => {
         defHttp.get({ url: Api.GetDataStoreData, params })
@@ -356,4 +357,20 @@ export function QueryDataStoreData(params) {
             })
     })
 }
+/**
+ * @description 分组统计文件资源大小(GB)
+*/
+export function QueryDRResourceFileSize(params) {
+    return new Promise<void>((resolve) => {
+        defHttp.get({ url: Api.getDRResourceFileSize, params })
+            .then((r) => {
+                if (r.resp_code == 0 && r.datas && r.datas.length) {
+                    resolve(r.datas);
+                } else {
+                    resolve();
+                }
+            })
+    })
+}
+
 

+ 5 - 4
src/views/dashboard/workbench/component/UnstructuredStatistic.vue

@@ -2,7 +2,7 @@
  * @Author: tengmingxue 1473375109@qq.com
  * @Date: 2023-09-13 10:06:22
  * @LastEditors: tengmingxue 1473375109@qq.com
- * @LastEditTime: 2024-02-29 20:41:28
+ * @LastEditTime: 2024-02-29 21:21:09
  * @FilePath: \xld-gis-admin\src\views\dashboard\workbench\component\TopCardStatistic.vue
  * @Description: 统计卡片
 -->
@@ -312,7 +312,7 @@
 </template>
     <script lang="ts">
 import { defineComponent, onMounted, toRefs, onUnmounted, nextTick, reactive } from 'vue';
-import { DataStoreGroupByStatistics,QueryDataStoreData } from '/@/api/interface/interface';
+import { DataStoreGroupByStatistics,QueryDataStoreData,QueryDRResourceFileSize } from '/@/api/interface/interface';
 
 export default defineComponent({
   name: 'UnstructuredStatistic',
@@ -347,8 +347,9 @@ export default defineComponent({
       }
       console.log('文件数据统计', res, data.file);
       const result = await QueryDataStoreData({})
-      console.log('文件数据',result)
-      debugger
+      console.log('非结构化数据统计',result)
+      const res2 = await QueryDRResourceFileSize({})
+      console.log('非结构化数据分类统计',res2)
     };
     onMounted(() => {
       queryData();