|
|
@@ -1,67 +1,60 @@
|
|
|
<template>
|
|
|
- <!-- <a-row :gutter="[8, 8]" justify="space-between" >
|
|
|
- <a-col :lg="5" :sm="1" :md="3" v-for="item in state.statsSource" :key="item.key">
|
|
|
- <a-card style="width: 300px" :title="item.name" >
|
|
|
- <div style="font-size: 18px;" >{{item.value}}</div>
|
|
|
- </a-card>
|
|
|
- </a-col>
|
|
|
- </a-row> -->
|
|
|
<a-row :gutter="[8, 8]">
|
|
|
- <a-col :xl="12" :xs="24" :md="24" >
|
|
|
+ <a-col :xl="24" :xs="24" :md="24" >
|
|
|
<a-card>
|
|
|
- <template #title >
|
|
|
- <upload-outlined /> 数据监控
|
|
|
- </template>
|
|
|
- <a-row style="width: 100%;" >
|
|
|
- <a-col :span="8" >
|
|
|
- <div class="statis-item" >
|
|
|
- <div>{{state.statsSource.transportSuccessCounter?.value}}</div>
|
|
|
- <div><check-circle-two-tone two-tone-color="#52c41a" /> {{state.statsSource.transportSuccessCounter?.name}}</div>
|
|
|
- </div>
|
|
|
- </a-col>
|
|
|
- <a-col :span="8" >
|
|
|
- <div class="statis-item" >
|
|
|
- <div>{{state.statsSource.transportFailCounter?.value}}</div>
|
|
|
- <div> <close-circle-two-tone two-tone-color="#eb2f96" /> {{ state.statsSource.transportFailCounter?.name }}</div>
|
|
|
- </div>
|
|
|
- </a-col>
|
|
|
- <a-col :span="8">
|
|
|
- <div class="statis-item" >
|
|
|
- <div>{{state.statsSource.transportTotalCounter?.value}}</div>
|
|
|
- <div><pie-chart-two-tone /> {{state.statsSource.transportTotalCounter?.name}}</div>
|
|
|
- </div>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
+ <template #title >
|
|
|
+ <upload-outlined /> 数据监控
|
|
|
+ </template>
|
|
|
+ <a-row style="width: 100%;" >
|
|
|
+ <a-col :span="8" >
|
|
|
+ <div class="statis-item" >
|
|
|
+ <div class="count" >{{state.statsSource.transportSuccessCounter?.value}}</div>
|
|
|
+ <div><check-circle-two-tone two-tone-color="#52c41a" /> {{state.statsSource.transportSuccessCounter?.name}}</div>
|
|
|
+ </div>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="8" >
|
|
|
+ <div class="statis-item" >
|
|
|
+ <div class="count" >{{state.statsSource.transportFailCounter?.value}}</div>
|
|
|
+ <div> <close-circle-two-tone two-tone-color="#eb2f96" /> {{ state.statsSource.transportFailCounter?.name }}</div>
|
|
|
+ </div>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="8">
|
|
|
+ <div class="statis-item" >
|
|
|
+ <div class="count" >{{state.statsSource.transportTotalCounter?.value}}</div>
|
|
|
+ <div><pie-chart-two-tone /> {{state.statsSource.transportTotalCounter?.name}}</div>
|
|
|
+ </div>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
</a-card>
|
|
|
</a-col>
|
|
|
- <a-col :xl="12" :xs="24" :md="24" >
|
|
|
+ <a-col :xl="24" :xs="24" :md="24" >
|
|
|
<a-card>
|
|
|
- <template #title >
|
|
|
- <pull-request-outlined color="#eb2f96" />设备请求
|
|
|
- </template>
|
|
|
- <a-row>
|
|
|
- <a-col :span="8" >
|
|
|
- <div class="statis-item" >
|
|
|
- <div>{{state.statsSource.transportReqSuccessCounter?.value}}</div>
|
|
|
- <div> <check-circle-two-tone two-tone-color="#52c41a"/> {{ state.statsSource.transportReqSuccessCounter?.name }}</div>
|
|
|
- </div>
|
|
|
- </a-col>
|
|
|
- <a-col :span="8" >
|
|
|
- <div class="statis-item" >
|
|
|
- <div>{{state.statsSource.transportReqFailCounter?.value}}</div>
|
|
|
- <div> <close-circle-two-tone two-tone-color="#eb2f96" /> {{ state.statsSource.transportReqFailCounter?.name }}</div>
|
|
|
- </div>
|
|
|
- </a-col>
|
|
|
- <a-col :span="8" >
|
|
|
- <div class="statis-item" >
|
|
|
- <div>{{state.statsSource.transportReqFailCounter?.value}}</div>
|
|
|
- <div><pie-chart-two-tone /> {{state.statsSource.transportReqFailCounter?.name}}</div>
|
|
|
- </div>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
+ <template #title >
|
|
|
+ <pull-request-outlined color="#eb2f96" />设备请求
|
|
|
+ </template>
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="8" >
|
|
|
+ <div class="statis-item" >
|
|
|
+ <div class="count" >{{state.statsSource.transportReqSuccessCounter?.value}}</div>
|
|
|
+ <div> <check-circle-two-tone two-tone-color="#52c41a"/> {{ state.statsSource.transportReqSuccessCounter?.name }}</div>
|
|
|
+ </div>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="8" >
|
|
|
+ <div class="statis-item" >
|
|
|
+ <div class="count" >{{state.statsSource.transportReqFailCounter?.value}}</div>
|
|
|
+ <div> <close-circle-two-tone two-tone-color="#eb2f96" /> {{ state.statsSource.transportReqFailCounter?.name }}</div>
|
|
|
+ </div>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="8" >
|
|
|
+ <div class="statis-item" >
|
|
|
+ <div class="count" >{{state.statsSource.transportReqFailCounter?.value}}</div>
|
|
|
+ <div><pie-chart-two-tone /> {{state.statsSource.transportReqFailCounter?.name}}</div>
|
|
|
+ </div>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
</a-card>
|
|
|
</a-col>
|
|
|
- <a-col :xl="12" :xs="24" :md="24" >
|
|
|
+ <a-col :xl="24" :xs="24" :md="24" >
|
|
|
<a-card>
|
|
|
<template #title >
|
|
|
<video-camera-add-outlined /> 发送到设备
|
|
|
@@ -69,19 +62,19 @@
|
|
|
<a-row>
|
|
|
<a-col :span="8" >
|
|
|
<div class="statis-item" >
|
|
|
- <div>{{ state.statsSource.toTransportSuccessCounter?.value }}</div>
|
|
|
+ <div class="count" >{{ state.statsSource.toTransportSuccessCounter?.value }}</div>
|
|
|
<div> <check-circle-two-tone two-tone-color="#52c41a"/> {{ state.statsSource.toTransportSuccessCounter?.name }}</div>
|
|
|
</div>
|
|
|
</a-col>
|
|
|
<a-col :span="8" >
|
|
|
<div class="statis-item" >
|
|
|
- <div>{{ state.statsSource.toTransportFailCounter?.value }}</div>
|
|
|
+ <div class="count" >{{ state.statsSource.toTransportFailCounter?.value }}</div>
|
|
|
<div> <close-circle-two-tone two-tone-color="#eb2f96" /> {{ state.statsSource.toTransportFailCounter?.name }}</div>
|
|
|
</div>
|
|
|
</a-col>
|
|
|
<a-col :span="8" >
|
|
|
<div class="statis-item" >
|
|
|
- <div>{{ state.statsSource.toTransportTotalCounter?.value }}</div>
|
|
|
+ <div class="count" >{{ state.statsSource.toTransportTotalCounter?.value }}</div>
|
|
|
<div><pie-chart-two-tone /> {{state.statsSource.toTransportTotalCounter?.name}}</div>
|
|
|
</div>
|
|
|
</a-col>
|
|
|
@@ -89,10 +82,6 @@
|
|
|
</a-card>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
-<!-- <check-circle-outlined /> -->
|
|
|
-<!-- <close-circle-outlined /> -->
|
|
|
-<!-- <pie-chart-outlined /> -->
|
|
|
-<!-- <check-circle-two-tone /> -->
|
|
|
</template>
|
|
|
<script lang='ts' setup >
|
|
|
import { DevOpsController } from '@/controller/iot/devOps'
|
|
|
@@ -101,7 +90,6 @@ import {
|
|
|
UploadOutlined, PullRequestOutlined, VideoCameraAddOutlined,
|
|
|
CheckCircleTwoTone, CloseCircleTwoTone, PieChartTwoTone
|
|
|
} from '@ant-design/icons-vue'
|
|
|
-// {key: string, name: string, value: string}[]
|
|
|
|
|
|
const state = reactive < {
|
|
|
statsSource: Partial<Record<IOT.API.DEVOPS.statsType, {
|
|
|
@@ -126,14 +114,6 @@ const getStats = async () => {
|
|
|
})
|
|
|
|
|
|
state.statsSource = obj
|
|
|
- // state.statsSource = data.map(item => {
|
|
|
- // return {
|
|
|
- // key: item.label,
|
|
|
- // name: DevOpsController.statsMap.get(item.label)?.name,
|
|
|
- // value: item.dataValue
|
|
|
- // }
|
|
|
- // })
|
|
|
- console.log()
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
|
@@ -148,4 +128,9 @@ onMounted(() => {
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
}
|
|
|
+
|
|
|
+.count {
|
|
|
+ font-size: 40px;
|
|
|
+}
|
|
|
+
|
|
|
</style>
|