Przeglądaj źródła

feat: 添加交通安全菜单

wyf 8 miesięcy temu
rodzic
commit
3b929020a1

Plik diff jest za duży
+ 14 - 0
src/assets/svg/traffic-accident.svg


Plik diff jest za duży
+ 14 - 0
src/assets/svg/traffic-regulation.svg


Plik diff jest za duży
+ 14 - 0
src/assets/svg/traffic-vehicle.svg


Plik diff jest za duży
+ 14 - 0
src/assets/svg/traffic-violation.svg


+ 1 - 1
src/constant/nav.ts

@@ -25,7 +25,7 @@ export const NAV_LIST = [
   },
   },
   {
   {
     name: '交通安全',
     name: '交通安全',
-    path: '',
+    path: '/traffic',
     meta: {
     meta: {
       title: '交通安全',
       title: '交通安全',
     },
     },

+ 8 - 1
src/router/full-routes.ts

@@ -8,7 +8,13 @@ import { AppRouteRecordRaw } from './types';
 import { getTreeItem } from '@/utils';
 import { getTreeItem } from '@/utils';
 import { cloneDeep } from 'lodash-es';
 import { cloneDeep } from 'lodash-es';
 import { PageEnum } from '@/enums/pageEnum';
 import { PageEnum } from '@/enums/pageEnum';
-import { disasterPreventionRoute, emergencyManagementRoute, platformRoutes, largeScreenRoutes } from './routers';
+import {
+  disasterPreventionRoute,
+  emergencyManagementRoute,
+  platformRoutes,
+  largeScreenRoutes,
+  trafficRoutes,
+} from './routers';
 
 
 type RouteRecordString = Omit<AppRouteRecordRaw, 'component'> & { component?: string };
 type RouteRecordString = Omit<AppRouteRecordRaw, 'component'> & { component?: string };
 
 
@@ -37,6 +43,7 @@ export const fullRoutes: AppRouteRecordRaw[] = [
   emergencyManagementRoute,
   emergencyManagementRoute,
   platformRoutes,
   platformRoutes,
   largeScreenRoutes,
   largeScreenRoutes,
+  trafficRoutes,
 ] as const;
 ] as const;
 
 
 /**
 /**

+ 4 - 0
src/router/router-icons.ts

@@ -71,4 +71,8 @@ export const constantRouterIcon = {
   EmergencyResponseIcon: renderSvg('emergency-response'),
   EmergencyResponseIcon: renderSvg('emergency-response'),
   EmergencyDrillIcon: renderSvg('emergency-drill'),
   EmergencyDrillIcon: renderSvg('emergency-drill'),
   EmergencyPlanIcon: renderSvg('emergency-plan'),
   EmergencyPlanIcon: renderSvg('emergency-plan'),
+  TrafficRegulationIcon: renderSvg('traffic-regulation'),
+  TrafficViolationIcon: renderSvg('traffic-violation'),
+  TrafficAccidentIcon: renderSvg('traffic-accident'),
+  TrafficVehicleIcon: renderSvg('traffic-vehicle'),
 };
 };

+ 9 - 1
src/router/routers/index.ts

@@ -3,5 +3,13 @@ import disasterPreventionRoute from './disaster';
 import emergencyManagementRoute from './emergency';
 import emergencyManagementRoute from './emergency';
 import exceptionRouters from './exception';
 import exceptionRouters from './exception';
 import largeScreenRoutes from './large-screen';
 import largeScreenRoutes from './large-screen';
+import trafficRoutes from './traffic';
 
 
-export { platformRoutes, disasterPreventionRoute, emergencyManagementRoute, exceptionRouters, largeScreenRoutes };
+export {
+  platformRoutes,
+  disasterPreventionRoute,
+  emergencyManagementRoute,
+  exceptionRouters,
+  largeScreenRoutes,
+  trafficRoutes,
+};

+ 154 - 0
src/router/routers/traffic.ts

@@ -0,0 +1,154 @@
+import { id } from 'element-plus/es/locale';
+
+const trafficRoutes = {
+  id: 4000,
+  parentId: -1,
+  name: 'Traffic',
+  path: '/traffic',
+  component: 'MENU_LAYOUT',
+  meta: {
+    title: '交通安全',
+    icon: 'CameraOutlined',
+    isRoot: false,
+    hidden: false,
+    noCache: false,
+  },
+  children: [
+    {
+      id: 4001,
+      parentId: 4000,
+      name: 'traffic-overview',
+      path: 'overview',
+      component: '/traffic/overview/Overview',
+      redirect: '',
+      meta: {
+        title: '总览',
+        icon: 'OverviewIcon',
+        isRoot: false,
+        hidden: false,
+        noCache: false,
+      },
+    },
+    {
+      id: 4002,
+      parentId: 4000,
+      name: 'traffic-regulation',
+      path: 'regulation',
+      component: '/traffic/regulation/Regulation',
+      redirect: '',
+      meta: {
+        title: '管理规定与通知',
+        icon: 'TrafficRegulationIcon',
+        isRoot: false,
+        hidden: false,
+        noCache: false,
+      },
+    },
+    {
+      id: 4003,
+      parentId: 4000,
+      name: 'traffic-regulation-item',
+      path: 'regulation-item',
+      component: '/traffic/regulation-item/RegulationItem',
+      redirect: '',
+      meta: {
+        title: '管理规定与通知详情',
+        activeMenu: '/traffic/regulation',
+        isRoot: false,
+        hidden: true,
+        noCache: false,
+      },
+    },
+    {
+      id: 4004,
+      parentId: 4000,
+      name: 'traffic-violation',
+      path: 'violation',
+      redirect: '',
+      meta: {
+        title: '交通违规管理',
+        icon: 'TrafficViolationIcon',
+        isRoot: false,
+        hidden: false,
+        noCache: false,
+      },
+      children: [
+        {
+          id: 400401,
+          parentId: 4004,
+          name: 'traffic-violation-act',
+          path: 'act',
+          redirect: '',
+          component: '/traffic/violation/act/Act',
+          meta: {
+            title: '违规行为',
+            isRoot: false,
+            hidden: false,
+            noCache: false,
+          },
+        },
+        {
+          id: 400402,
+          parentId: 4004,
+          name: 'traffic-violation-act-item',
+          path: 'act-item',
+
+          component: '/traffic/violation/act-item/ActItem',
+          meta: {
+            activeMenu: '/traffic/violation/act',
+            title: '违规行为详情',
+            isRoot: false,
+            hidden: true,
+            noCache: false,
+          },
+        },
+        {
+          id: 400403,
+          parentId: 4004,
+          name: 'traffic-violation-notice',
+          path: 'notice',
+
+          component: '/traffic/violation/notice/Notice',
+          meta: {
+            title: '违规通知',
+            isRoot: false,
+            hidden: false,
+            noCache: false,
+          },
+        },
+      ],
+    },
+    {
+      id: 4005,
+      parentId: 4000,
+      name: 'traffic-accident',
+      path: 'accident',
+      component: '/traffic/accidents/Accident',
+      redirect: '',
+      meta: {
+        title: '交通事故管理',
+        icon: 'TrafficAccidentIcon',
+        isRoot: false,
+        hidden: false,
+        noCache: false,
+      },
+    },
+    {
+      id: 4006,
+      parentId: 4000,
+      name: 'traffic-vehicle',
+      path: 'vehicle',
+      component: '/traffic/vehicle/Vehicle',
+      redirect: '',
+      meta: {
+        title: '车辆信息管理',
+        icon: 'TrafficVehicleIcon',
+        isRoot: false,
+        hidden: true,
+        noCache: false,
+      },
+    },
+  ],
+};
+
+export default trafficRoutes;

+ 7 - 0
src/views/traffic/Accident/Accident.vue

@@ -0,0 +1,7 @@
+<template>
+  <div> </div>
+</template>
+
+<script setup lang="ts"></script>
+
+<style scoped></style>

+ 7 - 0
src/views/traffic/overview/Overview.vue

@@ -0,0 +1,7 @@
+<template>
+  <div> </div>
+</template>
+
+<script setup lang="ts"></script>
+
+<style scoped></style>

+ 7 - 0
src/views/traffic/regulation/Regulation.vue

@@ -0,0 +1,7 @@
+<template>
+  <div> </div>
+</template>
+
+<script setup lang="ts"></script>
+
+<style scoped></style>

+ 7 - 0
src/views/traffic/regulation/RegulationItem.vue

@@ -0,0 +1,7 @@
+<template>
+  <div> </div>
+</template>
+
+<script setup lang="ts"></script>
+
+<style scoped></style>

+ 7 - 0
src/views/traffic/vehicle/Vehicle.vue

@@ -0,0 +1,7 @@
+<template>
+  <div> </div>
+</template>
+
+<script setup lang="ts"></script>
+
+<style scoped></style>

+ 7 - 0
src/views/traffic/violation/act/Act.vue

@@ -0,0 +1,7 @@
+<template>
+  <div> </div>
+</template>
+
+<script setup lang="ts"></script>
+
+<style scoped></style>

+ 7 - 0
src/views/traffic/violation/act/ActItem.vue

@@ -0,0 +1,7 @@
+<template>
+  <div> </div>
+</template>
+
+<script setup lang="ts"></script>
+
+<style scoped></style>

+ 7 - 0
src/views/traffic/violation/notice/Notice.vue

@@ -0,0 +1,7 @@
+<template>
+  <div> </div>
+</template>
+
+<script setup lang="ts"></script>
+
+<style scoped></style>