Browse Source

附件资料库的对接

lipenghui 3 months ago
parent
commit
1dc21a06cf
3 changed files with 8 additions and 4 deletions
  1. 3 0
      src/api/pms/stat/index.ts
  2. 5 2
      src/views/Home/Index.vue
  3. 0 2
      src/views/pms/device/index.vue

+ 3 - 0
src/api/pms/stat/index.ts

@@ -83,4 +83,7 @@ export const IotStatApi = {
   getDeptCount: async (params: any) => {
     return await request.get({ url: `/rq/stat/home/dept` })
   },
+  getSafeCount: async (params: any) => {
+    return await request.get({ url: `/rq/stat/home/safe` })
+  },
 }

+ 5 - 2
src/views/Home/Index.vue

@@ -94,7 +94,7 @@
             {{ 4.8 }}
           </span>
             <span class="text-5xl font-bold text-gray-700" style="color: indianred">
-            {{ 10 }}
+            {{ safe }}
           </span>
           </div>
 
@@ -253,7 +253,7 @@ const messageStats = ref<IotStatisticsDeviceMessageSummaryRespVO>({
   upstreamCounts: {},
   downstreamCounts: {}
 })
-
+const safe = ref()
 /** 获取统计数据 */
 const getStats = async () => {
   // 获取基础统计数据
@@ -281,6 +281,9 @@ const getStats = async () => {
     typeData.value = res
     initCharts()
   })
+  IotStatApi.getSafeCount().then((res) => {
+    safe.value = res
+  })
   // IotStatApi.getInspectTodayStatus().then((res) => {
   //   todayStatus.value = res
   //   debugger

+ 0 - 2
src/views/pms/device/index.vue

@@ -343,8 +343,6 @@ const handleExport = async () => {
 const { wsCache } = useCache()
 /** 初始化 **/
 onMounted(() => {
-  const user = wsCache.get(CACHE_KEY.USER)
-  queryParams.deptId = user.user.deptId
   getList()
 })
 </script>