Bladeren bron

首页mttr

lipenghui 1 maand geleden
bovenliggende
commit
d41f04fb32
3 gewijzigde bestanden met toevoegingen van 10 en 3 verwijderingen
  1. 3 0
      src/api/pms/stat/index.ts
  2. 2 2
      src/components/SummaryCard/index.vue
  3. 5 1
      src/views/Home/Index.vue

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

@@ -110,6 +110,9 @@ export const IotStatApi = {
   getSafeCount: async () => {
     return await request.get({ url: `/rq/stat/home/safe` })
   },
+  getMttr: async () => {
+    return await request.get({ url: `/rq/stat/mttr` })
+  },
   getMaterial: async () => {
     return await request.get({ url: `/pms/iot-outbound/materials/top` })
   },

+ 2 - 2
src/components/SummaryCard/index.vue

@@ -1,10 +1,10 @@
 <template>
   <div class="flex flex-row items-center gap-3 rounded bg-[var(--el-bg-color-overlay)] p-4" style="background-color: rgba(0, 0, 0, 0.3);">
     <div
-      class="h-12 w-12 flex flex-shrink-0 items-center justify-center rounded-1"
+      class="h-9 w-9 flex flex-shrink-0 items-center justify-center rounded-1"
       :class="`${iconColor} ${iconBgColor}`"
     >
-      <Icon :icon="icon" class="!text-6" />
+      <Icon :icon="icon" class="!text-5" />
     </div>
     <div class="flex flex-col gap-1">
       <div class="flex items-center gap-1 text-gray-500">

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

@@ -168,7 +168,7 @@
             <!--            <span class="text-gray-500 text-base font-medium">平均解决时间</span>-->
             <!--            <Icon icon="ep:menu" class="text-[32px] text-blue-400" />-->
             <span class="text-5xl font-bold text-gray-700" style="color: lightseagreen">
-              {{ 4.8 }}
+              {{ mttr+'h' }}
             </span>
             <span class="text-5xl font-bold text-gray-700" style="color: indianred">
               {{ safe }}
@@ -340,6 +340,7 @@ const messageStats = ref<IotStatisticsDeviceMessageSummaryRespVO>({
   upstreamCounts: {},
   downstreamCounts: {}
 })
+const mttr = ref()
 const safe = ref()
 /** 获取统计数据 */
 const getStats = async () => {
@@ -371,6 +372,9 @@ const getStats = async () => {
   IotStatApi.getSafeCount().then((res) => {
     safe.value = res
   })
+  IotStatApi.getMttr().then((res) => {
+    mttr.value = res
+  })
   IotStatApi.getOrderSeven('156').then((res) => {
     orderSevenData.value = res
     initQxChart()