Преглед изворни кода

feat(views): 添加日志中心模块的页面及路由

wangcong пре 1 месец
родитељ
комит
10320f7558
3 измењених фајлова са 38 додато и 0 уклоњено
  1. 5 0
      src/i18n/locales/zh.json
  2. 21 0
      src/router/index.ts
  3. 12 0
      src/views/log-center/LogCenter.vue

+ 5 - 0
src/i18n/locales/zh.json

@@ -299,6 +299,10 @@
   "hvacHome": {},
   "keywordLibrary": {},
   "largeScreen": {},
+  "logCenter": {
+    "operationLogs": "操作日志",
+    "smartControlLogs": "智控日志"
+  },
   "navigation": {
     "alarmManage": "报警管理",
     "algorithmManage": "算法管理",
@@ -315,6 +319,7 @@
     "hvacHome": "首页",
     "keywordLibrary": "关键词词库",
     "largeScreen": "大屏",
+    "logCenter": "日志中心",
     "organizationManage": "组织管理",
     "protocolManage": "协议管理",
     "roleManage": "角色管理",

+ 21 - 0
src/router/index.ts

@@ -272,6 +272,27 @@ const opsCenterRoutes: Readonly<RouteRecordRaw[]> = [
       },
     ],
   },
+  {
+    path: '/log-center',
+    redirect: '/log-center/index',
+    component: HvacLayout,
+    meta: {
+      title: 'logCenter',
+      icon: 'calendar',
+      hideSubMenu: true,
+      requiresAuth: true,
+    },
+    children: [
+      {
+        path: 'index',
+        name: 'logCenter',
+        component: () => import('@/views/log-center/LogCenter.vue'),
+        meta: {
+          requiresAuth: true,
+        },
+      },
+    ],
+  },
 ];
 
 const routes: Readonly<RouteRecordRaw[]> = [

+ 12 - 0
src/views/log-center/LogCenter.vue

@@ -0,0 +1,12 @@
+<script setup lang="ts">
+import { ref } from 'vue';
+
+const activeKey = ref('smartControlLogs');
+</script>
+
+<template>
+  <ATabs class="button-tabs-compact" v-model:active-key="activeKey" type="card">
+    <ATabPane key="smartControlLogs" :tab="$t('logCenter.smartControlLogs')"> 智控日志 </ATabPane>
+    <ATabPane key="operationLogs" :tab="$t('logCenter.operationLogs')"> 操作日志 </ATabPane>
+  </ATabs>
+</template>