From 974c82b5df3822bd497dd4e96a2bfe578af4adb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=99=E6=88=91?= <2731628804@qq.com> Date: Mon, 20 Apr 2026 19:53:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=9A=8F=E6=89=8B=E6=8B=8D?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/login/index.vue | 1 + src/pages/my/index.vue | 12 +- src/pages/newHome/index.vue | 83 ++- src/pages/sspReport/index.vue | 928 ++++++++++++++++++++++++++++++++++ src/router/index.js | 5 + 5 files changed, 1020 insertions(+), 9 deletions(-) create mode 100644 src/pages/sspReport/index.vue diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index ceb4e2f..873e253 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -185,6 +185,7 @@ const onSubmit = (e) => { function _getUserInfo() { getUserOrFjInfo({}).then((res) => { store.commit("userStatus", res); + window.localStorage.setItem('userInfo', JSON.stringify(res)); setTimeout(() => { isLoading.value = false; router.replace("/Home"); diff --git a/src/pages/my/index.vue b/src/pages/my/index.vue index 24bd3d6..a821bac 100644 --- a/src/pages/my/index.vue +++ b/src/pages/my/index.vue @@ -4,14 +4,14 @@
- {{ userNameChar }} + {{ userInfo.nickName?userInfo.nickName?.charAt(0):"" }}
-

{{ userInfo.userName || '张警官' }}

-

{{ userInfo.deptName || '交警支队一大队' }}

+

{{ userInfo.nickName || '未登录' }}

+

{{ userInfo.departName || '' }}

民警 - 工号: JC2024001 + 工号: {{ userInfo.workNo || '-' }}
@@ -108,8 +108,8 @@ const router = useRouter(); // 用户信息 const userInfo = ref({}); const userNameChar = computed(() => { - const name = userInfo.value.userName || '张'; - return name.charAt(0); + const name = userInfo.value?.userName; + return name ? name.charAt(0) : '?'; }); // 预警语音开关 diff --git a/src/pages/newHome/index.vue b/src/pages/newHome/index.vue index c64bc48..bdd0644 100644 --- a/src/pages/newHome/index.vue +++ b/src/pages/newHome/index.vue @@ -49,10 +49,21 @@
+ +
+
+ +
+
+
随手拍
+
随时随地上报违规
+
+
+
-

最新预警

+

拦截预警

查看全部 > @@ -130,6 +141,9 @@ const userNameChar = computed(() => { return name.charAt(0); }); +// 随手拍待处理数量 +const sspPendingCount = ref(12); + // 当前位置 const currentLocation = ref(""); @@ -137,7 +151,7 @@ const currentLocation = ref(""); const functionCards = [ { icon: "warning", - label: "路况预警", + label: "路况任务", subtitle: "应急处理数据信息", count: 236, countLabel: "未执行", @@ -146,7 +160,7 @@ const functionCards = [ }, { icon: "todo-list", - label: "违章预警", + label: "违规任务", subtitle: "违章车辆数据信息", count: 128, countLabel: "未执行", @@ -335,6 +349,11 @@ function onLoad() { }, 500); } +// 跳转到随手拍上报页面 +function goToReport() { + router.push("/ssp-report"); +} + // 跳转到预警列表 function goToAlertList() { router.push("/traffic-alerts"); @@ -427,6 +446,64 @@ function handleAlertClick(alert) { padding: 16px; } +.ssp-section { + margin: 12px 16px; + background: linear-gradient(135deg, #34c759, #28a745); + border-radius: 12px; + padding: 16px; + display: flex; + justify-content: center; + align-items: center; + gap: 14px; + box-shadow: 0 2px 12px rgba(40, 167, 69, 0.3); + cursor: pointer; + + &:active { + transform: scale(0.98); + } +} + +.ssp-icon { + .ssp-icon-inner { + font-size: 24px; + color: white; + } +} + +.ssp-content { + display: flex; + align-items: center; + gap: 8px; + + .ssp-title { + color: white; + font-size: 17px; + font-weight: 600; + } + + .ssp-desc { + color: rgba(255, 255, 255, 0.85); + font-size: 14px; + } +} + +.ssp-badge { + background: #fff; + border-radius: 50%; + min-width: 22px; + height: 22px; + padding: 0 6px; + display: flex; + align-items: center; + justify-content: center; + + .ssp-badge-num { + color: #34c759; + font-size: 12px; + font-weight: 600; + } +} + .card-item { position: relative; border-radius: 20px; diff --git a/src/pages/sspReport/index.vue b/src/pages/sspReport/index.vue new file mode 100644 index 0000000..7c173f7 --- /dev/null +++ b/src/pages/sspReport/index.vue @@ -0,0 +1,928 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index 6ccb23e..55b2b5c 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -588,6 +588,11 @@ const routes = [ name: "dataReport", component: () => import("../pages/dataReport/index.vue"), }, + { + path: "/ssp-report", + name: "ssp-report", + component: () => import("../pages/sspReport/index.vue"), + }, ]; const router = createRouter({ history: createWebHashHistory(),