From 0cad00f4211e962df0de1cb877ebabf112075c4b Mon Sep 17 00:00:00 2001 From: donghao Date: Tue, 18 Mar 2025 11:13:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BE=AE=E8=B0=83=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=A8=A1=E5=9D=97=E6=A0=B7=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=8E=A5=E5=8F=A3=E5=AE=B9=E9=94=99=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E6=A2=B3=E7=90=86api=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 2 +- api.md | 10 +- dashboard.md | 12 +- index.html | 8 +- .../1741680039157.png | Bin .../1741680066982.png | Bin .../1741680094060.png | Bin .../1741680112113.png | Bin image-1.png => localFiles/image-1.png | Bin image-2.png => localFiles/image-2.png | Bin image-3.png => localFiles/image-3.png | Bin image-4.png => localFiles/image-4.png | Bin image-5.png => localFiles/image-5.png | Bin image-6.png => localFiles/image-6.png | Bin image.png => localFiles/image.png | Bin .../微信图片_20250306134728.png | Bin src/components/CustomTable/src/baseTable.scss | 41 +++- src/router/index.ts | 7 +- src/views/dashboard/DataOverview.vue | 183 +++++++++--------- src/views/dashboard/DeviceStatus.scss | 6 +- src/views/dashboard/DeviceStatus.vue | 88 +++++---- .../components/HistoryVideoModal.vue | 7 +- 22 files changed, 197 insertions(+), 167 deletions(-) rename 1741680039157.png => localFiles/1741680039157.png (100%) rename 1741680066982.png => localFiles/1741680066982.png (100%) rename 1741680094060.png => localFiles/1741680094060.png (100%) rename 1741680112113.png => localFiles/1741680112113.png (100%) rename image-1.png => localFiles/image-1.png (100%) rename image-2.png => localFiles/image-2.png (100%) rename image-3.png => localFiles/image-3.png (100%) rename image-4.png => localFiles/image-4.png (100%) rename image-5.png => localFiles/image-5.png (100%) rename image-6.png => localFiles/image-6.png (100%) rename image.png => localFiles/image.png (100%) rename 微信图片_20250306134728.png => localFiles/微信图片_20250306134728.png (100%) diff --git a/.env.production b/.env.production index e382553..9a88038 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,4 @@ # .env.production NODE_ENV = production VITE_APP_ENV = production -VITE_APP_BASE_API = https://api.production.com \ No newline at end of file +VITE_APP_BASE_API = http://127.0.0.1:8000 \ No newline at end of file diff --git a/api.md b/api.md index 1279e5b..140b471 100644 --- a/api.md +++ b/api.md @@ -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) diff --git a/dashboard.md b/dashboard.md index b76f490..4902ed8 100644 --- a/dashboard.md +++ b/dashboard.md @@ -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) diff --git a/index.html b/index.html index 93f5343..29daaaa 100644 --- a/index.html +++ b/index.html @@ -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 @@ 监控平台 - - - + + +
diff --git a/1741680039157.png b/localFiles/1741680039157.png similarity index 100% rename from 1741680039157.png rename to localFiles/1741680039157.png diff --git a/1741680066982.png b/localFiles/1741680066982.png similarity index 100% rename from 1741680066982.png rename to localFiles/1741680066982.png diff --git a/1741680094060.png b/localFiles/1741680094060.png similarity index 100% rename from 1741680094060.png rename to localFiles/1741680094060.png diff --git a/1741680112113.png b/localFiles/1741680112113.png similarity index 100% rename from 1741680112113.png rename to localFiles/1741680112113.png diff --git a/image-1.png b/localFiles/image-1.png similarity index 100% rename from image-1.png rename to localFiles/image-1.png diff --git a/image-2.png b/localFiles/image-2.png similarity index 100% rename from image-2.png rename to localFiles/image-2.png diff --git a/image-3.png b/localFiles/image-3.png similarity index 100% rename from image-3.png rename to localFiles/image-3.png diff --git a/image-4.png b/localFiles/image-4.png similarity index 100% rename from image-4.png rename to localFiles/image-4.png diff --git a/image-5.png b/localFiles/image-5.png similarity index 100% rename from image-5.png rename to localFiles/image-5.png diff --git a/image-6.png b/localFiles/image-6.png similarity index 100% rename from image-6.png rename to localFiles/image-6.png diff --git a/image.png b/localFiles/image.png similarity index 100% rename from image.png rename to localFiles/image.png diff --git a/微信图片_20250306134728.png b/localFiles/微信图片_20250306134728.png similarity index 100% rename from 微信图片_20250306134728.png rename to localFiles/微信图片_20250306134728.png diff --git a/src/components/CustomTable/src/baseTable.scss b/src/components/CustomTable/src/baseTable.scss index e914794..ef18e1b 100644 --- a/src/components/CustomTable/src/baseTable.scss +++ b/src/components/CustomTable/src/baseTable.scss @@ -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%); + 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%); + &.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; } } diff --git a/src/router/index.ts b/src/router/index.ts index 46bd994..a3e3cf8 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -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"; } diff --git a/src/views/dashboard/DataOverview.vue b/src/views/dashboard/DataOverview.vue index bc43f6b..46c7117 100644 --- a/src/views/dashboard/DataOverview.vue +++ b/src/views/dashboard/DataOverview.vue @@ -10,23 +10,19 @@
- +
@@ -51,15 +47,15 @@
-
车体检测设备: {{ carDevice.total }}
+
车体检测设备: {{ carDevice?.total || 0 }}
-
撑杆检测设备: {{ poleDevice.total }}
+
撑杆检测设备: {{ poleDevice?.total || 0 }}
-
钩机检测设备: {{ excavatorDevice.total }}
+
钩机检测设备: {{ excavatorDevice?.total || 0 }}
@@ -77,35 +73,32 @@
- +
  • @@ -117,26 +110,23 @@
    - +
  • @@ -154,11 +144,11 @@
    - 监控画面 +
    {{ imageFault[0]?.fault_type }}
    - 监控画面 +
    {{ imageFault[1]?.fault_type }}
    @@ -174,10 +164,11 @@ 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" + name: "DataOverviewWrap" }); const xData = ref(["1月", "2月", "3月", "4月", "5月"]); const legendArr = ["车体检测", "撑杆检测"]; @@ -190,13 +181,13 @@ const colorArr = [ ["#FFDA8D", "#FFAC06"], ]; const deviceStatus = ref({ - onlineCount: 50, - errorCount: 10, - outlineCount: 10 + onlineCount: 50, + errorCount: 10, + outlineCount: 10 }); const searchForm = reactive({ - car: "1", - pole: "1", + car: "1", + pole: "1", }); const deviceTotal = ref(0); const carDevice = ref({}); @@ -206,53 +197,63 @@ const carFaultTotal = ref([]); const poleFaultTotal = ref([]); const imageFault = ref([]); const activeBtn = ref("month"); -const getList = async (dateType:string = "month") => { - activeBtn.value = dateType - const res = await getDataOverviewApi({ dateType }) - const { data } = await res +const getList = async (dateType: string = "month") => { + activeBtn.value = dateType + const res = await getDataOverviewApi({ dateType }) + 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(); - const { data } = res; - deviceTotal.value = data.deviceTotal; - carDevice.value = data.appearance; - poleDevice.value = data.pole; - excavatorDevice.value = data.excavator; - // deviceStatus.value = data + 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 { data } = res; - poleFaultTotal.value = data; - // deviceStatus.value = data - console.log(data); + 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 { data } = res; - carFaultTotal.value = data; - // deviceStatus.value = data - console.log(data); + 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 { data } = res; - imageFault.value = data; - // deviceStatus.value = data - console.log(data); + 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); } diff --git a/src/views/dashboard/DeviceStatus.scss b/src/views/dashboard/DeviceStatus.scss index 6410675..90d236d 100644 --- a/src/views/dashboard/DeviceStatus.scss +++ b/src/views/dashboard/DeviceStatus.scss @@ -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; diff --git a/src/views/dashboard/DeviceStatus.vue b/src/views/dashboard/DeviceStatus.vue index 275e2f5..f498b45 100644 --- a/src/views/dashboard/DeviceStatus.vue +++ b/src/views/dashboard/DeviceStatus.vue @@ -1,51 +1,53 @@ diff --git a/src/views/dashboard/components/HistoryVideoModal.vue b/src/views/dashboard/components/HistoryVideoModal.vue index b696812..96d6c85 100644 --- a/src/views/dashboard/components/HistoryVideoModal.vue +++ b/src/views/dashboard/components/HistoryVideoModal.vue @@ -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; }