From 9d98404e711df80eac6e6b9f48f6a72c0495b137 Mon Sep 17 00:00:00 2001 From: donghao Date: Wed, 18 Jun 2025 11:06:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8C=89=E4=B8=9A=E5=8A=A1=E8=A6=81?= =?UTF-8?q?=E6=B1=82=E5=BE=AE=E8=B0=83=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/index.ts | 10 +- src/utils/forFiles.ts | 13 +++ src/views/dataView/DataOverview.vue | 96 ++++++++++++++----- .../dataView/components/Type1ObjectDetect.vue | 96 +++++++++++++------ .../components/Type2LicensePlateRecog.vue | 70 +++++++++----- .../dataView/components/Type3TargetRecog.vue | 59 +++++------- .../components/Type4AudioDetection.vue | 40 ++++++-- src/views/dataView/hooks/useAllData.ts | 1 + 8 files changed, 262 insertions(+), 123 deletions(-) create mode 100644 src/utils/forFiles.ts diff --git a/src/config/index.ts b/src/config/index.ts index 445e1b5..a300ee9 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -1,8 +1,16 @@ +/* + * @Author: donghao donghao@supervision.ltd + * @Date: 2025-06-10 17:36:23 + * @LastEditors: donghao donghao@supervision.ltd + * @LastEditTime: 2025-06-16 11:29:01 + * @FilePath: \Web-Traffic-Police\src\config\index.ts + * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + */ const env = import.meta.env export const config = { apiHost: 'http://192.168.10.103:8888', // 接口地址 - apiMapTimeout: 600_000, // 接口轮询时间 + apiMapTimeout: 60_000, // 接口轮询时间 env: env.VITE_APP_ENV, baseURL: env.VITE_APP_BASE_API, timeout: 10000, diff --git a/src/utils/forFiles.ts b/src/utils/forFiles.ts new file mode 100644 index 0000000..379131c --- /dev/null +++ b/src/utils/forFiles.ts @@ -0,0 +1,13 @@ +/* + * @Author: donghao donghao@supervision.ltd + * @Date: 2025-06-16 15:41:45 + * @LastEditors: donghao donghao@supervision.ltd + * @LastEditTime: 2025-06-16 15:43:58 + * @FilePath: \Web-Traffic-Police\src\utils\forFiles.ts + * @Description: 文件工具函数 + */ +export function fetchFileNameByPath(path) { + const lastSlash = path.lastIndexOf("/"); + if (lastSlash === -1) return path; // 如果没有斜杠,返回整个路径 + return path.substring(lastSlash + 1); +} diff --git a/src/views/dataView/DataOverview.vue b/src/views/dataView/DataOverview.vue index a04c8df..35f2cb6 100644 --- a/src/views/dataView/DataOverview.vue +++ b/src/views/dataView/DataOverview.vue @@ -1,23 +1,24 @@ @@ -95,28 +116,55 @@ onUnmounted(() => {