feat: 微调设备状态模块样式,首页接口容错处理,梳理api文档资源

main
donghao 1 month ago
parent c70c88468a
commit 0cad00f421

@ -1,4 +1,4 @@
# .env.production
NODE_ENV = production
VITE_APP_ENV = production
VITE_APP_BASE_API = https://api.production.com
VITE_APP_BASE_API = http://127.0.0.1:8000

@ -53,7 +53,7 @@
```
![alt text](微信图片_20250306134728.png)
![alt text](localFiles/微信图片_20250306134728.png)
# 检测总量汇总接口文档
@ -117,7 +117,7 @@
"errorMessage": ""
}
```
![alt text](1741680039157.png)
![alt text](localFiles/1741680039157.png)
# 设备信息接口文档
## 1. 接口基本信息
@ -181,7 +181,7 @@
"errorMessage": ""
}
```
![alt text](1741680066982.png)
![alt text](localFiles/1741680066982.png)
# 车体检测问题分布接口文档
## 1. 接口基本信息
@ -294,7 +294,7 @@
"errorMessage": ""
}
```
![alt text](1741680094060.png)
![alt text](localFiles/1741680094060.png)
# 实时监控画面接口文档
## 1. 接口基本信息
@ -334,4 +334,4 @@
"errorMessage": ""
}
```
![alt text](1741680112113.png)
![alt text](localFiles/1741680112113.png)

@ -73,7 +73,7 @@
"errorMessage": ""
}
```
![alt text](image-1.png)
![alt text](localFiles/image-1.png)
## 二、设备历史视频列表接口
### 2.1 接口基本信息
@ -131,7 +131,7 @@
"errorMessage": ""
}
```
![alt text](image-2.png)
![alt text](localFiles/image-2.png)
# 撑杆监测模块Pole Monitor接口文档
@ -217,7 +217,7 @@
"errorMessage": ""
}
```
![alt text](image-3.png)
![alt text](localFiles/image-3.png)
## 二、撑杆监测详情接口
### 2.1 接口基本信息
@ -300,7 +300,7 @@
"errorMessage": ""
}
```
![alt text](image-4.png)
![alt text](localFiles/image-4.png)
# 外观监测模块Appearance Monitor接口文档
## 一、外观监测分页列表接口
@ -386,7 +386,7 @@
"errorMessage": ""
}
```
![alt text](image-5.png)
![alt text](localFiles/image-5.png)
# 外观监测模块Appearance Monitor接口文档
@ -472,4 +472,4 @@
"errorMessage": ""
}
```
![alt text](image-6.png)
![alt text](localFiles/image-6.png)

@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-03-06 17:57:05
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-03-12 19:16:05
* @LastEditTime: 2025-03-18 11:08:34
* @FilePath: \5G-Loading-Bay-Web\index.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@ -13,11 +13,11 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>监控平台</title>
<script src="/public/adapter.min.js"></script>
<script src="/public/webrtcstreamer.js"></script>
</head>
<body>
<script type="module" src="/adapter.min.js"></script>
<script type="module" src="/webrtcstreamer.js"></script>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>

Before

Width:  |  Height:  |  Size: 551 KiB

After

Width:  |  Height:  |  Size: 551 KiB

Before

Width:  |  Height:  |  Size: 478 KiB

After

Width:  |  Height:  |  Size: 478 KiB

Before

Width:  |  Height:  |  Size: 591 KiB

After

Width:  |  Height:  |  Size: 591 KiB

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

Before

Width:  |  Height:  |  Size: 699 KiB

After

Width:  |  Height:  |  Size: 699 KiB

Before

Width:  |  Height:  |  Size: 2.7 MiB

After

Width:  |  Height:  |  Size: 2.7 MiB

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

Before

Width:  |  Height:  |  Size: 991 KiB

After

Width:  |  Height:  |  Size: 991 KiB

Before

Width:  |  Height:  |  Size: 398 KiB

After

Width:  |  Height:  |  Size: 398 KiB

@ -4,18 +4,17 @@
border: none !important;
background-color: transparent;
}
/* 去掉表头下边框 */
.el-table__header-wrapper thead th {
border-bottom: none !important;
border: none !important;
}
/* 去掉单元格边框 */
.el-table td,
.el-table th.is-leaf {
border-bottom: none !important;
border: none !important;
}
/* 去掉纵向分割线 */
.el-table--border::after,
@ -33,6 +32,7 @@
.el-table th {
border-right: none !important;
border: none !important;
border-collapse: collapse !important;
}
.el-scrollbar__view {
@ -47,19 +47,35 @@
cursor: pointer;
.el-table__body {
background: transparent;
border-collapse: collapse !important;
border: none !important;
tr {
color: #fff;
background: transparent;
&:hover td {
background-color: transparent;
background: transparent !important;
}
&:hover {
color: #37DBFF;
background: linear-gradient( 90deg, rgba(30,54,88,0) 0%, #0C4FAD 53%, rgba(65,117,190,0) 100%);
}
&.selected-row{
color: #37DBFF;
background: linear-gradient( 90deg, rgba(30,54,88,0) 0%, #0C4FAD 53%, rgba(65,117,190,0) 100%);
color: #37dbff;
background: linear-gradient(
90deg,
rgba(30, 54, 88, 0) 0%,
#0c4fad 53%,
rgba(65, 117, 190, 0) 100%
);
}
&.selected-row {
color: #37dbff;
background: linear-gradient(
90deg,
rgba(30, 54, 88, 0) 0%,
#0c4fad 53%,
rgba(65, 117, 190, 0) 100%
);
// border-top: 1px solid;
// border-bottom: 1px solid;
// border-image: linear-gradient(90deg, rgba(12, 24, 64, 0), rgba(69, 174, 250, 1), rgba(102, 102, 102, 0));
}
}
}
@ -75,7 +91,7 @@
}
}
}
.fixed_pagination{
.fixed_pagination {
padding: 12px 20px 0;
}
/* full_table */
@ -86,6 +102,7 @@
.baseTable_box {
cursor: default;
.el-table__body {
border: none !important;
background: linear-gradient(90deg, #082050 0%, #02102a 100%);
tr {
color: #fff;
@ -96,8 +113,12 @@
&:nth-child(even) {
background: linear-gradient(90deg, #102d65 0%, #081736 100%);
}
&:hover {
border: none !important;
}
&:hover td {
background-color: transparent;
}
}
}
@ -113,7 +134,7 @@
}
}
}
.fixed_pagination{
.fixed_pagination {
padding: 28px 20px;
}
}

@ -2,17 +2,17 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-03-06 13:53:22
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-03-10 09:59:29
* @LastEditTime: 2025-03-18 10:59:08
* @FilePath: \vite-ai\data-dashboard\src\router\index.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { createRouter, createWebHistory } from "vue-router";
import { createRouter, createWebHashHistory } from "vue-router";
import { useUserStore } from "@/stores/user";
import { dashboardRoutes } from "./dashboard";
import { buildHierarchyTree } from "@/utils/tree";
const router = createRouter({
history: createWebHistory(),
history: createWebHashHistory (),
routes: [
{
path: "/login",
@ -34,7 +34,6 @@ const router = createRouter({
router.beforeEach((to) => {
const userStore = useUserStore();
if (to.meta.requiresAuth && !userStore.token) {
return "/login";
}

@ -10,7 +10,8 @@
</template>
<template #extra>
<div>
<el-button type="primary" class="month-btn" @click="getList('month')" :class="{ 'active-btn': activeBtn === 'month' }">
<el-button type="primary" class="month-btn" @click="getList('month')"
:class="{ 'active-btn': activeBtn === 'month' }">
</el-button>
<el-button class="week-btn" @click="getList('week')" :class="{ 'active-btn': activeBtn === 'week' }">
@ -21,12 +22,7 @@
</ContentHeader>
</div>
<div class="chart-container chart-container-bar">
<BarChart
:xData="xData"
:legendArr="legendArr"
:datas="datas"
:colorArr="colorArr"
/>
<BarChart :xData="xData" :legendArr="legendArr" :datas="datas" :colorArr="colorArr" />
</div>
</div>
<!-- 设备信息 -->
@ -51,15 +47,15 @@
</div>
<div class="device-list">
<div class="device-card">
<div class="mb-3">车体检测设备: {{ carDevice.total }}</div>
<div class="mb-3">车体检测设备: {{ carDevice?.total || 0 }}</div>
<DeviceStatus :deviceStatus="carDevice" />
</div>
<div class="device-card">
<div class="mb-3">撑杆检测设备: {{ poleDevice.total }}</div>
<div class="mb-3">撑杆检测设备: {{ poleDevice?.total || 0 }}</div>
<DeviceStatus :deviceStatus="poleDevice" />
</div>
<div class="device-card">
<div class="mb-3">钩机检测设备: {{ excavatorDevice.total }}</div>
<div class="mb-3">钩机检测设备: {{ excavatorDevice?.total || 0 }}</div>
<DeviceStatus :deviceStatus="excavatorDevice" />
</div>
</div>
@ -95,17 +91,14 @@
</ContentHeader>
</div>
<div class="chart-container chart-pie-bg">
<PieChart
:data="carFaultTotal"
:colors="[
<PieChart :data="carFaultTotal" :colors="[
'#FF7C09',
'#0032FF',
'#04FFF2',
'#D19EFF',
'#FF0103',
'#9EFFF3',
]"
/>
]" />
</div>
</li>
<li>
@ -133,10 +126,7 @@
</ContentHeader>
</div>
<div class="chart-container chart-pie-bg">
<PieChartSmall
:data="poleFaultTotal"
:colors="['#9DFFF3', '#FFA179']"
/>
<PieChartSmall :data="poleFaultTotal" :colors="['#9DFFF3', '#FFA179']" />
</div>
</li>
</ul>
@ -154,11 +144,11 @@
</div>
<div class="monitor-images">
<div class="monitor-images-left">
<img :src="imageFault[0]?.url" alt="监控画面" />
<img :src="imageFault[0]?.url" />
<div class="fault-info">{{ imageFault[0]?.fault_type }}</div>
</div>
<div class="monitor-images-right">
<img :src="imageFault[1]?.url" alt="监控画面" />
<img :src="imageFault[1]?.url"/>
<div class="fault-info">{{ imageFault[1]?.fault_type }}</div>
</div>
</div>
@ -174,7 +164,8 @@ import BarChart from "./components/BarChart.vue";
import PieChart from "./components/PieChart.vue";
import PieChartSmall from "./components/PieChartSmall.vue";
import DeviceStatus from "./components/DeviceStatus.vue";
import { getDataOverviewApi,getDeviceInfowApi,getRecordFaultApi,getRealTimeApi } from '@/api/dashboard';
import { getDataOverviewApi, getDeviceInfowApi, getRecordFaultApi, getRealTimeApi } from '@/api/dashboard';
import { isSuccessApi } from "@/utils/forApi";
defineOptions({
name: "DataOverviewWrap"
@ -206,53 +197,63 @@ const carFaultTotal = ref([]);
const poleFaultTotal = ref([]);
const imageFault = ref([]);
const activeBtn = ref("month");
const getList = async (dateType:string = "month") => {
const getList = async (dateType: string = "month") => {
activeBtn.value = dateType
const res = await getDataOverviewApi({ dateType })
const { data } = await res
if (isSuccessApi(res)) {
const { data } = res
datas.value[0] = data.appearance
datas.value[1] = data.pole
if(dateType === "month") {
xData.value = data.dateArr.map((item:any) => {if(dateType === 'month') {
return item+'月'
if (dateType === "month") {
xData.value = data.dateArr.map((item: any) => {
if (dateType === 'month') {
return item + '月'
}
})
}else {
xData.value = ["周一","周二","周三","周四","周五","周六","周日"]
} else {
xData.value = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"]
}
// console.log(data, 'getList_data')
}
};
const getDeviceInfo = async () => {
try {
const res = await getDeviceInfowApi();
if (isSuccessApi(res)) {
const { data } = res;
deviceTotal.value = data.deviceTotal;
carDevice.value = data.appearance;
poleDevice.value = data.pole;
excavatorDevice.value = data.excavator;
// deviceStatus.value = data
}
} catch (error) {
console.error('获取设备信息出错:', error);
}
}
const getPoleFault = async () => {
try {
const res = await getRecordFaultApi({dateType: 'month',value: searchForm.pole,type:"pole"});
const res = await getRecordFaultApi({ dateType: 'month', value: searchForm.pole, type: "pole" });
if (isSuccessApi(res)) {
const { data } = res;
poleFaultTotal.value = data;
// deviceStatus.value = data
console.log(data);
}
} catch (error) {
console.error('获取设备信息出错:', error);
}
}
const getCarFault = async () => {
try {
const res = await getRecordFaultApi({dateType: 'month',value: searchForm.car,type:"appearance"});
const res = await getRecordFaultApi({ dateType: 'month', value: searchForm.car, type: "appearance" });
if (isSuccessApi(res)) {
const { data } = res;
carFaultTotal.value = data;
// deviceStatus.value = data
console.log(data);
}
} catch (error) {
console.error('获取设备信息出错:', error);
}
@ -260,11 +261,13 @@ const getCarFault = async () => {
const getRealTime = async () => {
try {
const res = await getRealTimeApi({deviceType: ''});
const res = await getRealTimeApi({ deviceType: '' });
if (isSuccessApi(res)) {
const { data } = res;
imageFault.value = data;
// deviceStatus.value = data
console.log(data);
}
} catch (error) {
console.error('获取设备信息出错:', error);
}

@ -1,9 +1,13 @@
.device-status-content-box{
.device-status-wrap{
height: 813px;
background-image: url("@/assets/common/device_status_bg_line.png");
background-size: 100% 100%;
background-position: bottom;
background-repeat: no-repeat;
}
.device-status-content-box{
.el-scrollbar__view {
background: transparent !important;
height: 600px;

@ -1,5 +1,6 @@
<template>
<div class="bg_basic_content">
<div class="device-status-wrap">
<div class="device-status-header mt-[32px]">
<ContentHeader bgLayout="1855">
<template #title>
@ -47,6 +48,7 @@
<HistoryVideoModal ref="historyModalRef" v-model:value="isHistoryOpen" :info="currentRow"
:historyVideos="historyVideos" @close="isHistoryOpen = false" />
</div>
</div>
</template>

@ -215,8 +215,9 @@ defineExpose({ loadData })
width: 100%;
display: flex;
flex: 1;
// border-radius: 2px;
border: none;
border-radius: 2px;
// border: none;
border: 1px solid rgba(8, 139, 214, 0.4);
@ -224,7 +225,7 @@ defineExpose({ loadData })
width: 100%;
&.is-focused {
// border: 1px solid rgba(8, 139, 214, 0.4);
box-shadow: none;
}

Loading…
Cancel
Save