diff --git a/.env.development b/.env.development
new file mode 100644
index 0000000..0799751
--- /dev/null
+++ b/.env.development
@@ -0,0 +1,22 @@
+# 开发配置文件
+
+# 应用工作空间名称
+VITE_APP_WORKSPACE=ops
+
+# 应用标题
+VITE_APP_TITLE=标准管理系统
+VITE_APP_DESCRIPTION="default standard template"
+
+# API 基础URL
+VITE_API_BASE_URL=https://ops-api.apinb.com
+
+
+
+# 应用版本
+VITE_APP_VERSION=1.0.0
+
+# 是否启用调试模式
+VITE_DEBUG=true
+
+# 主题配置
+VITE_DEFAULT_LANGUAGE=cn
diff --git a/.env.production b/.env.production
new file mode 100644
index 0000000..8f9f8ee
--- /dev/null
+++ b/.env.production
@@ -0,0 +1,19 @@
+# 生产环境变量
+
+# 应用工作空间名称
+VITE_APP_WORKSPACE=ops
+
+VITE_APP_TITLE=标准管理系统
+VITE_APP_DESCRIPTION="default standard template"
+
+# API 基础URL
+VITE_API_BASE_URL=https://ops-api.apinb.com
+
+# 应用版本
+VITE_APP_VERSION=1.0.0
+
+# 是否启用调试模式
+VITE_DEBUG=false
+
+# 主题配置
+VITE_DEFAULT_LANGUAGE=cn
diff --git a/index.html b/index.html
index f80f809..22d57fa 100644
--- a/index.html
+++ b/index.html
@@ -4,7 +4,7 @@
-
Vue Admin Arco - 开箱即用的中台前端/设计解决方案
+ 智能运维管理系统
diff --git a/package.json b/package.json
index 92b7fdb..023091c 100644
--- a/package.json
+++ b/package.json
@@ -18,6 +18,7 @@
},
"dependencies": {
"@arco-design/web-vue": "^2.57.0",
+ "@tabler/icons-vue": "^3.40.0",
"@vueuse/core": "^14.2.1",
"axios": "^1.13.6",
"dayjs": "^1.11.19",
@@ -28,6 +29,7 @@
"pinia": "^3.0.4",
"query-string": "^9.3.1",
"sortablejs": "^1.15.7",
+ "uuid": "^13.0.0",
"vue": "^3.5.29",
"vue-echarts": "^8.0.1",
"vue-i18n": "^11.2.8",
diff --git a/src/api/module/factor.ts b/src/api/module/factor.ts
new file mode 100644
index 0000000..22cee22
--- /dev/null
+++ b/src/api/module/factor.ts
@@ -0,0 +1,35 @@
+import { request } from "@/api/request";
+
+/** 批次列表 */
+export const fetchLoanBatch = (data: { page: number, size: number }) => request.post("/factor/v1/fetch/loan_batch", data);
+
+/** 上报列表 */
+export const fetchTransferWatch = (data: { page: number, size: number }) => request.post("/factor/v1/fetch/transfer_watch", data);
+
+/** 回盘列表 */
+export const fetchTransferDown = (data: { page: number, size: number }) => request.post("/factor/v1/fetch/transfer_down", data);
+
+/** 放款数据列表 */
+export const fetchDataFile = (data: { page: number, size: number }) => request.post("/factor/v1/fetch/data_file", data);
+
+/** 回盘数据列表 */
+export const fetchDataReply = (data: { page: number, size: number }) => request.post("/factor/v1/fetch/data_reply", data);
+
+/** 贷款支付数据列表 */
+export const fetchLoanPayment = (data: { page: number, size: number, status?: number }) => request.post("/factor/v1/fetch/loan_payment", data);
+
+/** 获取日报数据 */
+export const fetchOverviewReports = (data: { page: number, size: number }) => request.post("/factor/v1/reports/overview", data);
+
+/** 获取日报数据 */
+export const fetchDailyReports = (data: { page: number, size: number }) => request.post("/factor/v1/reports/days", data);
+
+/** 获取周报数据 */
+export const fetchWeeklyReports = (data: { page: number, size: number }) => request.post("/factor/v1/reports/weeks", data);
+
+/** 获取月报数据 */
+export const fetchMonthlyReports = (data: { page: number, size: number }) => request.post("/factor/v1/reports/months", data);
+
+
+/** 获取批次详情 */
+export const getLoanBatchDetail = (data: { batch_id: number }) => request.post(`/factor/v1/get/batch`,data);
\ No newline at end of file
diff --git a/src/api/module/pmn.ts b/src/api/module/pmn.ts
new file mode 100644
index 0000000..575bf80
--- /dev/null
+++ b/src/api/module/pmn.ts
@@ -0,0 +1,39 @@
+import { request } from "@/api/request";
+
+export interface MenuItem {
+ id?: number;
+ identity?: string;
+ code?: string;
+ description?: string;
+ menu_icon?: string;
+ menu_path?: string;
+ parent_id?: number | null;
+ title?: string;
+ title_en?: string;
+ type?: number;
+ sort_key?: number;
+ order?: number; // 排序字段(用于本地排序)
+ app_id?: number;
+ created_at?: string;
+ children?: MenuItem[];
+ is_web_page?: boolean; // 是否为网页
+ web_url?: string; // 嵌入的网页URL
+}
+
+/** 获取菜单 */
+export const fetchMenu = (data: { page: number, size: number }) => request.post("/rbac2/v1/pmn/fetch", data, { needWorkspace: true });
+/** 创建菜单 */
+export const createMenu = (data: MenuItem) => request.post("/rbac2/v1/pmn/create", data, { needWorkspace: true });
+/** 修改菜单 */
+export const modifyMenu = (data: MenuItem) => request.post("/rbac2/v1/pmn/modify", data, { needWorkspace: true });
+/** 删除菜单 */
+export const deleteMenu = (data: { id: MenuItem['id'] }) => request.post("/rbac2/v1/pmn/del", data, { needWorkspace: true });
+/** 更新菜单排序 */
+export const updateMenuOrder = (data: { pmn_id: number, sort_key: number }[]) =>
+ request.post("/rbac2/v1/pmn/sort", data);
+
+/** 用户-给指定用户设置权限 */
+export const userPmn = (data: { code: string; list: { id: number, pmn_id: number }[] }) => request.post("/rbac2/v1/pmn/user_pmn", data, { needWorkspace: true });
+
+/** 用户-给指定用户设置权限 */
+export const userSetPmn = (data: { list: { id: number, pmn_id: number }[] }) => request.post("/rbac2/v1/pmn/user/set_pmn", data, { needWorkspace: true });
diff --git a/src/api/module/report.ts b/src/api/module/report.ts
new file mode 100644
index 0000000..d75ee83
--- /dev/null
+++ b/src/api/module/report.ts
@@ -0,0 +1,35 @@
+import { request } from "@/api/request";
+
+
+/** 获取报表 */
+export const fetchReports = (data: { page: number, size: number, keyword?: string }) => request.get("/api/v1/report/basics", { params: data });
+
+/** 创建报表任务 */
+export const fetchReportNewTask = (keyName:string,data: any) => request.post("/api/v1/report/task/new/"+keyName, data);
+
+/** 获取报表基础信息详情 */
+export const fetchReportBasicInfo = (id: string) => request.get(`/api/v1/report/basics/${id}`);
+
+/** 获取指定报表的调度列表 */
+export const fetchReportSchedules = (report_basic_id: string) => request.get(`/api/v1/report/schedules/${report_basic_id}`);
+
+/** 批量创建报表调度 */
+export const fetchReportSchedulesBatch = (data: any) => request.post("/api/v1/report/schedules/batch", data);
+
+/** 获取指定报表的历史记录列表 */
+export const fetchReportHistories = (report_basic_id: string) => request.get(`/api/v1/report/histories/${report_basic_id}?status=2`);
+
+/** 获取报表历史记录列表 */
+export const fetchReportHistoriesList = (data: { page: number, size: number, keyword?: string }) => request.get("/api/v1/report/histories", { params: data });
+
+/** 获取邮件推送记录列表 */
+export enum PushStatus {
+ /** 发送成功 */
+ Success = 1,
+ /** 发送失败 */
+ Failed = 2
+}
+export const fetchReportPushesList = (data: { page: number, size: number, keyword?: string, status?: PushStatus }) => request.get("/api/v1/report/pushes", { params: data });
+
+/** 重新发送邮件 */
+export const fetchReportPushesResend = (id: number) => request.post(`/api/v1/report/pushes/${id}`);
diff --git a/src/api/module/user.ts b/src/api/module/user.ts
new file mode 100644
index 0000000..0cd83d7
--- /dev/null
+++ b/src/api/module/user.ts
@@ -0,0 +1,41 @@
+import { request } from "@/api/request";
+import { LoginRequest, UserItem } from "../types";
+
+/** 登录 */
+export const login = (data: LoginRequest) => request.post("/rbac2/v1/login", data);
+/** 登出 */
+export const logout = () => request.post("/rbac2/v1/logout");
+/** 获取菜单列表 */
+export const getMenuList = () => request.post("/rbac2/v1/user/menu");
+/** 创建用户 */
+export const createUser = (data: UserItem) => request.post("/rbac2/v1/user/create", data, { needWorkspace: true });
+/** 获取用户详情 */
+export const getUserDetail = (data: UserItem) => request.post("/rbac2/v1/user/detail", data);
+/** 获取用户列表 */
+export const fetchUserList = (data: { page: number, size: number, keyword?: string }) => request.post("/rbac2/v1/user/fetch", data);
+/** 修改用户 */
+export const modifyUser = (data: UserItem) => request.post("/rbac2/v1/user/modify", data);
+/** 删除用户 */
+export const deleteUser = (data: { id: UserItem['id'] }) => request.post("/rbac2/v1/user/del", data);
+/** 获取所有权限【树形】 */
+export const getUserPmnTree = (data: { id: UserItem['id'] }) => request.post("/rbac2/v1/user/pmn_tree", data);
+
+/** 用户-获取所有权限【平面】 */
+export const userPmn = (data: { id: UserItem['id'], workspace: string }) => request.post("/rbac2/v1/user/pmn", data, { needWorkspace: true });
+/** 用户-给指定用户设置权限 */
+export const userSetPmn = (data: { list: { id: number, pmn_id: number }[] }) => request.post("/rbac2/v1/user/set_pmn", data, { needWorkspace: true });
+
+/** 用户-给指定用户编辑权限 */
+export const userModifyPmn = (data: { id: UserItem['id'], list: number[] }) => request.post("/rbac2/v1/user/modify_pmn", data, { needWorkspace: true });
+
+/** 重置密码(短信) */
+export const resetUserPassword = (data: {
+ /** 账号 */
+ account: string;
+ /** 验证码 */
+ code: string;
+ /** 密码 */
+ password: string;
+ /** 手机号 */
+ phone: string;
+}) => request.post("/rbac2/v1/reset", data);
diff --git a/src/api/request.ts b/src/api/request.ts
new file mode 100644
index 0000000..15a48ac
--- /dev/null
+++ b/src/api/request.ts
@@ -0,0 +1,91 @@
+import axios, {
+ AxiosInstance,
+ AxiosRequestConfig,
+ AxiosResponse,
+ InternalAxiosRequestConfig
+ } from "axios";
+ import { v4 as uuidv4 } from 'uuid';
+ import SafeStorage, { AppStorageKey } from "@/utils/safeStorage";
+
+ console.log('import.meta.env.VITE_API_BASE_UR:', import.meta.env.VITE_API_BASE_URL)
+ // 1. 创建axios实例
+ const instance: AxiosInstance = axios.create({
+ baseURL: import.meta.env.VITE_API_BASE_URL,
+ timeout: 10000,
+ headers: {
+ "Content-Type": "application/json",
+ "Workspace": import.meta.env.VITE_APP_WORKSPACE,
+ "Request-Id": uuidv4(),
+ },
+ });
+
+ // 2. 请求拦截器
+ instance.interceptors.request.use(
+ (config: InternalAxiosRequestConfig) => {
+ // 添加认证token(示例)
+ const token = SafeStorage.get(AppStorageKey.TOKEN);
+ if (token) {
+ config.headers.Authorization = token as string;
+ }
+ return config;
+ },
+ (error) => Promise.reject(error)
+ );
+
+ // 3. 响应拦截器
+ instance.interceptors.response.use(
+ (response: AxiosResponse) => {
+ // 统一处理响应数据格式[2](@ref)
+ if (response.data.status === 401) {
+ // token过期处理
+ SafeStorage.clearAppStorage();
+ window.location.href = "/auth/login";
+ }
+ return response.data; // 直接返回核心数据[1](@ref)
+ },
+ (error) => {
+ if (error?.response?.data?.error === 'Token has expired') {
+ // token过期处理
+ SafeStorage.clearAppStorage();
+ window.location.href = "/auth/login";
+ }
+ // 统一错误处理
+ console.error("API Error:", error.message);
+ return Promise.reject(error);
+ }
+ );
+
+ // 4. 封装核心请求方法
+ interface RequestConfig extends AxiosRequestConfig {
+ data?: unknown;
+ needWorkspace?: boolean;
+ }
+
+export const request = {
+ get(url: string, config?: RequestConfig): Promise {
+ return instance.get(url, config);
+ },
+ post(url: string, data = {}, config?: RequestConfig): Promise {
+ let params: any
+ if (config?.needWorkspace) {
+ params = { workspace: import.meta.env.VITE_APP_WORKSPACE, ...data };
+ } else {
+ params = data;
+ }
+ return instance.post(url, params, config);
+ },
+ put(url: string, data = {}, config?: RequestConfig): Promise {
+ let params: any
+ if (config?.needWorkspace) {
+ params = { workspace: import.meta.env.VITE_APP_WORKSPACE, ...data };
+ } else {
+ params = data;
+ }
+ return instance.put(url, params, config);
+ },
+ delete(url: string, config?: RequestConfig): Promise {
+ return instance.delete(url, config);
+ }
+};
+
+export default instance;
\ No newline at end of file
diff --git a/src/api/types.ts b/src/api/types.ts
new file mode 100644
index 0000000..ea4bbd0
--- /dev/null
+++ b/src/api/types.ts
@@ -0,0 +1,39 @@
+/** 登录请求参数 */
+export interface LoginRequest {
+ /** 账号 */
+ account: string
+ /** 密码 */
+ password: string
+}
+
+/** 登录表单数据 */
+export interface LoginData {
+ account: string
+ password: string
+}
+
+/** 用户信息 */
+export interface UserItem {
+ id?: number
+ username?: string
+ nickname?: string
+ email?: string
+ phone?: string
+ avatar?: string
+ status?: number
+ created_at?: string
+ updated_at?: string
+}
+
+/** 登录响应 */
+export interface LoginResponse {
+ token: string
+ user?: UserItem
+}
+
+/** 通用响应结构 */
+export interface ApiResponse {
+ status: number
+ data: T
+ message?: string
+}
diff --git a/src/api/user.ts b/src/api/user.ts
deleted file mode 100644
index c37bdfd..0000000
--- a/src/api/user.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { UserState } from '@/store/modules/user/types'
-import axios from 'axios'
-import type { RouteRecordNormalized } from 'vue-router'
-
-export interface LoginData {
- username: string
- password: string
-}
-
-export interface LoginRes {
- token: string
-}
-export function login(data: LoginData) {
- return axios.post('/api/user/login', data)
-}
-
-export function logout() {
- return axios.post('/api/user/logout')
-}
-
-export function getUserInfo() {
- return axios.post('/api/user/info')
-}
-
-export function getMenuList() {
- return axios.post('/api/user/menu')
-}
diff --git a/src/components/data-table/index.vue b/src/components/data-table/index.vue
new file mode 100644
index 0000000..d14b927
--- /dev/null
+++ b/src/components/data-table/index.vue
@@ -0,0 +1,299 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ downloadButtonText }}
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.title === '#' ? '序列号' : item.title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/index.ts b/src/components/index.ts
index 35266ba..c44a072 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -5,6 +5,9 @@ import { CanvasRenderer } from 'echarts/renderers'
import { App } from 'vue'
import Breadcrumb from './breadcrumb/index.vue'
import Chart from './chart/index.vue'
+import SearchForm from './search-form/index.vue'
+import DataTable from './data-table/index.vue'
+import SearchTable from './search-table/index.vue'
// Manually introduce ECharts modules to reduce packing size
@@ -25,5 +28,8 @@ export default {
install(Vue: App) {
Vue.component('Chart', Chart)
Vue.component('Breadcrumb', Breadcrumb)
+ Vue.component('SearchForm', SearchForm)
+ Vue.component('DataTable', DataTable)
+ Vue.component('SearchTable', SearchTable)
},
}
diff --git a/src/components/menu/index.vue b/src/components/menu/index.vue
index 4cbd243..ca57b1f 100644
--- a/src/components/menu/index.vue
+++ b/src/components/menu/index.vue
@@ -8,6 +8,7 @@ import { useI18n } from 'vue-i18n'
import type { RouteMeta } from 'vue-router'
import { RouteRecordRaw, useRoute, useRouter } from 'vue-router'
import useMenuTree from './use-menu-tree'
+import { COMMON_ICONS } from '@/views/ops/pages/system-settings/menu-management/menuIcons'
export default defineComponent({
emit: ['collapse'],
@@ -85,12 +86,28 @@ export default defineComponent({
if (appStore.device === 'desktop') appStore.updateSettings({ menuCollapse: val })
}
+ // 获取图标组件 - 支持 Arco Design 图标和 @tabler/icons-vue
+ const getIconComponent = (iconName: string) => {
+ if (!iconName) return null
+
+ // 检查是否是 Tabler 图标(不以 'icon-' 开头)
+ if (!iconName.startsWith('icon-')) {
+ const IconComponent = COMMON_ICONS[iconName]
+ if (IconComponent) {
+ return () => h(IconComponent, { size: 18 })
+ }
+ }
+
+ // 回退到 Arco Design 图标
+ return () => h(compile(`<${iconName}/>`))
+ }
+
const renderSubMenu = () => {
function travel(_route: RouteRecordRaw[], nodes = []) {
if (_route) {
_route.forEach((element) => {
// This is demo, modify nodes as needed
- const icon = element?.meta?.icon ? () => h(compile(`<${element?.meta?.icon}/>`)) : null
+ const icon = element?.meta?.icon ? getIconComponent(element?.meta?.icon as string) : null
const node =
element?.children && element?.children.length !== 0 ? (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ searchButtonText }}
+
+
+
+
+
+ {{ resetButtonText }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/search-form/types.ts b/src/components/search-form/types.ts
new file mode 100644
index 0000000..eb01163
--- /dev/null
+++ b/src/components/search-form/types.ts
@@ -0,0 +1,10 @@
+import type { SelectOptionData } from '@arco-design/web-vue/es/select/interface'
+
+export interface FormItem {
+ field: string
+ label: string
+ type: 'input' | 'select' | 'dateRange' | 'slot'
+ span?: number
+ placeholder?: string
+ options?: SelectOptionData[]
+}
diff --git a/src/components/search-table/index.vue b/src/components/search-table/index.vue
new file mode 100644
index 0000000..cb8cd70
--- /dev/null
+++ b/src/components/search-table/index.vue
@@ -0,0 +1,217 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/config/settings.json b/src/config/settings.json
index f665513..f942563 100644
--- a/src/config/settings.json
+++ b/src/config/settings.json
@@ -12,6 +12,6 @@
"globalSettings": false,
"device": "desktop",
"tabBar": true,
- "menuFromServer": false,
+ "menuFromServer": true,
"serverMenu": []
}
diff --git a/src/locale/en-US.ts b/src/locale/en-US.ts
index 3dfbb25..af64022 100644
--- a/src/locale/en-US.ts
+++ b/src/locale/en-US.ts
@@ -5,7 +5,6 @@ import localeWorkplace from '@/views/dashboard/workplace/locale/en-US'
/** simple */
import localeMonitor from '@/views/dashboard/monitor/locale/en-US'
-import localeCardList from '@/views/list/card/locale/en-US'
import localeSearchTable from '@/views/list/search-table/locale/en-US'
import localeBasicProfile from '@/views/profile/basic/locale/en-US'
@@ -17,8 +16,6 @@ import locale403 from '@/views/exception/403/locale/en-US'
import locale404 from '@/views/exception/404/locale/en-US'
import locale500 from '@/views/exception/500/locale/en-US'
-import localeUserInfo from '@/views/user/info/locale/en-US'
-import localeUserSetting from '@/views/user/setting/locale/en-US'
/** simple end */
import localeSettings from './en-US/settings'
@@ -28,6 +25,57 @@ export default {
'menu.server.workplace': 'Workplace-Server',
'menu.server.monitor': 'Monitor-Server',
'menu.list': 'List',
+ 'menu.ops': 'Operations',
+ 'menu.ops.systemSettings': 'System Settings',
+ 'menu.ops.systemSettings.menuManagement': 'Menu Management',
+ 'menu.ops.systemSettings.systemLogs': 'System Logs',
+ 'menu.management': 'Menu Management',
+ 'menu.addRoot': 'Add Root Menu',
+ 'menu.tip': 'Click a menu item to edit, hover to show action buttons',
+ 'menu.empty': 'No menu data',
+ 'menu.selectTip': 'Please select a menu item from the left to edit',
+ 'menu.group': 'Group',
+ 'menu.addChild': 'Add Child Menu',
+ 'menu.delete': 'Delete',
+ 'menu.edit': 'Edit',
+ 'menu.addChildFor': 'Add child for',
+ 'menu.add': 'Add',
+ 'menu.details': 'Details',
+ 'menu.parent': 'Parent Menu',
+ 'menu.deleteConfirm': 'Delete Confirmation',
+ 'menu.deleteConfirmText': 'Are you sure you want to delete menu "{name}"?',
+ 'menu.deleteChildrenWarning': 'Warning: This menu has child menus, they will also be deleted!',
+ 'menu.deleteSuccess': 'Deleted successfully',
+ 'menu.saveSuccess': 'Saved successfully',
+ 'menu.basicInfo': 'Basic Information',
+ 'menu.code': 'Menu Code',
+ 'menu.codeRequired': 'Please enter menu code',
+ 'menu.codePlaceholder': 'Enter menu code, e.g.: dashboard',
+ 'menu.type': 'Menu Type',
+ 'menu.submenu': 'Submenu',
+ 'menu.rootMenu': 'Root Menu',
+ 'menu.title': 'Menu Title',
+ 'menu.titleRequired': 'Please enter menu title',
+ 'menu.titlePlaceholder': 'Enter Chinese title',
+ 'menu.titleEn': 'English Title',
+ 'menu.titleEnRequired': 'Please enter English title',
+ 'menu.titleEnPlaceholder': 'Enter English title',
+ 'menu.path': 'Menu Path',
+ 'menu.pathRequired': 'Please enter menu path',
+ 'menu.pathPlaceholder': 'Enter menu path, e.g.: /dashboard',
+ 'menu.icon': 'Menu Icon',
+ 'menu.iconRequired': 'Please select menu icon',
+ 'menu.iconPlaceholder': 'Click to select icon',
+ 'menu.description': 'Description',
+ 'menu.descriptionPlaceholder': 'Enter menu description',
+ 'menu.webConfig': 'Web Page Configuration',
+ 'menu.isWebPage': 'Is Embedded Web Page',
+ 'menu.webUrl': 'Web URL',
+ 'menu.webUrlPlaceholder': 'Enter the URL to embed',
+ 'menu.save': 'Save',
+ 'menu.cancel': 'Cancel',
+ 'menu.selectIcon': 'Select Icon',
+ 'menu.iconSearch': 'Search icon',
'menu.result': 'Result',
'menu.exception': 'Exception',
'menu.profile': 'Profile',
@@ -44,14 +92,11 @@ export default {
/** simple */
...localeMonitor,
...localeSearchTable,
- ...localeCardList,
...localeBasicProfile,
...localeDataAnalysis,
...localeMultiDAnalysis,
...locale403,
...locale404,
...locale500,
- ...localeUserInfo,
- ...localeUserSetting,
/** simple end */
}
diff --git a/src/locale/zh-CN.ts b/src/locale/zh-CN.ts
index 402a62c..0af213f 100644
--- a/src/locale/zh-CN.ts
+++ b/src/locale/zh-CN.ts
@@ -5,7 +5,6 @@ import localeWorkplace from '@/views/dashboard/workplace/locale/zh-CN'
/** simple */
import localeMonitor from '@/views/dashboard/monitor/locale/zh-CN'
-import localeCardList from '@/views/list/card/locale/zh-CN'
import localeSearchTable from '@/views/list/search-table/locale/zh-CN'
import localeBasicProfile from '@/views/profile/basic/locale/zh-CN'
@@ -17,8 +16,6 @@ import locale403 from '@/views/exception/403/locale/zh-CN'
import locale404 from '@/views/exception/404/locale/zh-CN'
import locale500 from '@/views/exception/500/locale/zh-CN'
-import localeUserInfo from '@/views/user/info/locale/zh-CN'
-import localeUserSetting from '@/views/user/setting/locale/zh-CN'
/** simple end */
import localeSettings from './zh-CN/settings'
@@ -28,6 +25,57 @@ export default {
'menu.server.workplace': '工作台-服务端',
'menu.server.monitor': '实时监控-服务端',
'menu.list': '列表页',
+ 'menu.ops': '运维管理',
+ 'menu.ops.systemSettings': '系统设置',
+ 'menu.ops.systemSettings.menuManagement': '菜单管理',
+ 'menu.ops.systemSettings.systemLogs': '系统日志',
+ 'menu.management': '菜单管理',
+ 'menu.addRoot': '添加根菜单',
+ 'menu.tip': '点击菜单项可编辑,悬停显示操作按钮',
+ 'menu.empty': '暂无菜单数据',
+ 'menu.selectTip': '请从左侧选择一个菜单项进行编辑',
+ 'menu.group': '分组',
+ 'menu.addChild': '添加子菜单',
+ 'menu.delete': '删除',
+ 'menu.edit': '编辑',
+ 'menu.addChildFor': '为',
+ 'menu.add': '添加',
+ 'menu.details': '详情',
+ 'menu.parent': '父菜单',
+ 'menu.deleteConfirm': '删除确认',
+ 'menu.deleteConfirmText': '确定要删除菜单 "{name}" 吗?',
+ 'menu.deleteChildrenWarning': '注意:该菜单下有子菜单,删除后子菜单也会被删除!',
+ 'menu.deleteSuccess': '删除成功',
+ 'menu.saveSuccess': '保存成功',
+ 'menu.basicInfo': '基本信息',
+ 'menu.code': '菜单编码',
+ 'menu.codeRequired': '请输入菜单编码',
+ 'menu.codePlaceholder': '请输入菜单编码,如:dashboard',
+ 'menu.type': '菜单类型',
+ 'menu.submenu': '子菜单',
+ 'menu.rootMenu': '根菜单',
+ 'menu.title': '菜单标题',
+ 'menu.titleRequired': '请输入菜单标题',
+ 'menu.titlePlaceholder': '请输入中文标题',
+ 'menu.titleEn': '英文标题',
+ 'menu.titleEnRequired': '请输入英文标题',
+ 'menu.titleEnPlaceholder': '请输入英文标题',
+ 'menu.path': '菜单路径',
+ 'menu.pathRequired': '请输入菜单路径',
+ 'menu.pathPlaceholder': '请输入菜单路径,如:/dashboard',
+ 'menu.icon': '菜单图标',
+ 'menu.iconRequired': '请选择菜单图标',
+ 'menu.iconPlaceholder': '点击选择图标',
+ 'menu.description': '描述',
+ 'menu.descriptionPlaceholder': '请输入菜单描述',
+ 'menu.webConfig': '网页嵌入配置',
+ 'menu.isWebPage': '是否为嵌入网页',
+ 'menu.webUrl': '网页地址',
+ 'menu.webUrlPlaceholder': '请输入要嵌入的网页URL',
+ 'menu.save': '保存',
+ 'menu.cancel': '取消',
+ 'menu.selectIcon': '选择图标',
+ 'menu.iconSearch': '搜索图标',
'menu.result': '结果页',
'menu.exception': '异常页',
'menu.profile': '详情页',
@@ -44,14 +92,11 @@ export default {
/** simple */
...localeMonitor,
...localeSearchTable,
- ...localeCardList,
...localeBasicProfile,
...localeDataAnalysis,
...localeMultiDAnalysis,
...locale403,
...locale404,
...locale500,
- ...localeUserInfo,
- ...localeUserSetting,
/** simple end */
}
diff --git a/src/mock/index.ts b/src/mock/index.ts
index d0789aa..99ca290 100644
--- a/src/mock/index.ts
+++ b/src/mock/index.ts
@@ -7,7 +7,6 @@ import '@/views/dashboard/workplace/mock'
/** simple */
import '@/views/dashboard/monitor/mock'
-import '@/views/list/card/mock'
import '@/views/list/search-table/mock'
import '@/views/profile/basic/mock'
@@ -15,8 +14,6 @@ import '@/views/profile/basic/mock'
import '@/views/visualization/data-analysis/mock'
import '@/views/visualization/multi-dimension-data-analysis/mock'
-import '@/views/user/info/mock'
-import '@/views/user/setting/mock'
/** simple end */
Mock.setup({
diff --git a/src/router/local-menu-flat.ts b/src/router/local-menu-flat.ts
new file mode 100644
index 0000000..a1928d8
--- /dev/null
+++ b/src/router/local-menu-flat.ts
@@ -0,0 +1,932 @@
+import type { MenuItem } from '@/api/module/pmn'
+
+// 本地菜单数据(扁平格式)- 接口未准备好时使用
+// 这是从 fetchMenu 接口返回的原始扁平数据格式
+export const localMenuFlatItems: MenuItem[] = [
+ {
+ id: 8,
+ identity: '019b591d-0064-7dcc-9c78-59b5f4aa31a7',
+ title: '系统概况',
+ title_en: 'Home',
+ code: 'ops:系统概况',
+ description: '首页菜单',
+ app_id: 2,
+ menu_path: '/overview',
+ menu_icon: 'Home',
+ type: 1,
+ sort_key: 1,
+ created_at: '2025-12-26T13:23:51.54067+08:00',
+ },
+ {
+ id: 13,
+ identity: '019b591d-00c3-7955-aa1b-80b5a0c8d6bd',
+ title: '可视化大屏管理',
+ title_en: 'Visual Dashboard Management',
+ code: 'ops:可视化大屏管理',
+ description: '可视化大屏管理菜单',
+ app_id: 2,
+ menu_path: '/visual/',
+ menu_icon: 'Virus',
+ type: 1,
+ sort_key: 2,
+ created_at: '2025-12-26T13:23:51.62748+08:00',
+ },
+ {
+ id: 14,
+ identity: '019b591d-00dc-7486-aa93-51e798d3253a',
+ title: '大屏管理',
+ title_en: 'My Components',
+ code: 'ops:可视化大屏管理:我的组件',
+ description: '可视化大屏管理 - 我的组件',
+ app_id: 2,
+ parent_id: 13,
+ menu_path: '/visual/component',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 3,
+ is_web_page: true,
+ web_url: 'https://ops.apinb.com/view/#/project/items',
+ created_at: '2025-12-26T13:23:51.644296+08:00',
+ },
+ {
+ id: 85,
+ identity: '019bf309-a961-7bba-a03d-83eb78a82437',
+ title: '已发布大屏列表',
+ title_en: 'View Publish',
+ code: '已发布大屏列表',
+ app_id: 2,
+ parent_id: 13,
+ menu_path: '/visual/view-publish',
+ type: 1,
+ sort_key: 4,
+ is_web_page: true,
+ web_url: 'https://ops.apinb.com/view/#/project/management',
+ created_at: '2026-01-25T10:44:15.33024+08:00',
+ },
+ {
+ id: 16,
+ identity: '019b591d-00f4-73a0-bbdb-aa7da79ed390',
+ title: '服务器及PC管理',
+ title_en: '服务器及pc管理',
+ code: 'ops:服务器及pc管理',
+ description: '服务器及PC管理菜单',
+ app_id: 2,
+ menu_path: '/dc/',
+ menu_icon: 'Building',
+ type: 1,
+ sort_key: 5,
+ created_at: '2025-12-26T13:23:51.675908+08:00',
+ },
+ {
+ id: 18,
+ identity: '019b591d-011a-7dca-b85c-4802ad0e5d05',
+ title: '办公PC管理',
+ title_en: '办公pc管理',
+ code: 'ops:服务器及pc管理:办公pc管理',
+ description: '服务器及PC管理 - 办公PC管理',
+ app_id: 2,
+ parent_id: 16,
+ menu_path: '/dc/pc',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 6,
+ created_at: '2025-12-26T13:23:51.706903+08:00',
+ },
+ {
+ id: 17,
+ identity: '019b591d-010b-790f-adbc-401ee42c20ae',
+ title: '服务器管理',
+ title_en: '服务器管理',
+ code: 'ops:服务器及pc管理:服务器管理',
+ description: '服务器及PC管理 - 服务器管理',
+ app_id: 2,
+ parent_id: 16,
+ menu_path: '/dc/server',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 7,
+ created_at: '2025-12-26T13:23:51.691593+08:00',
+ },
+ {
+ id: 19,
+ identity: '019b591d-0122-7959-a3c3-f5226d0bf278',
+ title: '集群采集控制中心',
+ title_en: 'Cluster Collection Control Center',
+ code: 'ops:集群采集控制中心',
+ description: '集群采集控制中心菜单',
+ app_id: 2,
+ menu_path: '/dc/',
+ menu_icon: 'Adjustments',
+ type: 1,
+ sort_key: 8,
+ created_at: '2025-12-26T13:23:51.715137+08:00',
+ },
+ {
+ id: 20,
+ identity: '019b591d-013a-7c89-be2d-5f03e5d7c5da',
+ title: '数据库采集管理',
+ title_en: 'Database Collection Management',
+ code: 'ops:集群采集控制中心:数据库采集管理',
+ description: '集群采集控制中心 - 数据库采集管理',
+ app_id: 2,
+ parent_id: 19,
+ menu_path: '/dc/database',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 9,
+ created_at: '2025-12-26T13:23:51.738821+08:00',
+ },
+ {
+ id: 21,
+ identity: '019b591d-014a-710a-8b3f-30713e516d70',
+ title: '中间件采集管理',
+ title_en: 'Middleware Collection Management',
+ code: 'ops:集群采集控制中心:中间件采集管理',
+ description: '集群采集控制中心 - 中间件采集管理',
+ app_id: 2,
+ parent_id: 19,
+ menu_path: '/dc/middleware',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 10,
+ created_at: '2025-12-26T13:23:51.754068+08:00',
+ },
+ {
+ id: 22,
+ identity: '019b591d-0159-7e46-a5e0-fb69c6b62a25',
+ title: '网络设备采集管理',
+ title_en: 'Network Device Collection Management',
+ code: 'ops:集群采集控制中心:网络设备采集管理',
+ description: '集群采集控制中心 - 网络设备采集管理',
+ app_id: 2,
+ parent_id: 19,
+ menu_path: '/dc/network',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 11,
+ created_at: '2025-12-26T13:23:51.769935+08:00',
+ },
+ {
+ id: 23,
+ identity: '019b591d-0160-736e-a42d-180fef3fb3be',
+ title: '综合监控',
+ title_en: 'Comprehensive Monitoring',
+ code: 'ops:综合监控',
+ description: '综合监控菜单',
+ app_id: 2,
+ menu_path: '/monitor/',
+ menu_icon: 'Desktop',
+ type: 1,
+ sort_key: 12,
+ created_at: '2025-12-26T13:23:51.77834+08:00',
+ },
+ {
+ id: 31,
+ identity: '019b591d-01e3-7adc-b10f-26550a6e3700',
+ title: '日志监控',
+ title_en: 'Log Monitoring',
+ code: 'ops:综合监控:日志监控',
+ description: '综合监控 - 日志监控',
+ app_id: 2,
+ parent_id: 23,
+ menu_path: '/monitor/log',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 13,
+ created_at: '2025-12-26T13:23:51.907711+08:00',
+ },
+ {
+ id: 30,
+ identity: '019b591d-01d4-78b0-89ea-a6ba12914379',
+ title: '虚拟化监控',
+ title_en: 'Virtualization Monitoring',
+ code: 'ops:综合监控:虚拟化监控',
+ description: '综合监控 - 虚拟化监控',
+ app_id: 2,
+ parent_id: 23,
+ menu_path: '/monitor/virtualization',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 14,
+ created_at: '2025-12-26T13:23:51.892569+08:00',
+ },
+ {
+ id: 27,
+ identity: '019b591d-01a5-776f-ac4b-3cd896dd3f48',
+ title: '存储设备监控',
+ title_en: 'Storage Device Monitoring',
+ code: 'ops:综合监控:存储设备监控',
+ description: '综合监控 - 存储设备监控',
+ app_id: 2,
+ parent_id: 23,
+ menu_path: '/monitor/storage',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 15,
+ created_at: '2025-12-26T13:23:51.845487+08:00',
+ },
+ {
+ id: 25,
+ identity: '019b591d-0187-7a06-888f-0e924c11544c',
+ title: '网络设备监控',
+ title_en: 'Network Device Monitoring',
+ code: 'ops:综合监控:网络设备监控',
+ description: '综合监控 - 网络设备监控',
+ app_id: 2,
+ parent_id: 23,
+ menu_path: '/monitor/network',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 16,
+ created_at: '2025-12-26T13:23:51.815656+08:00',
+ },
+ {
+ id: 33,
+ identity: '019b591d-0202-7c99-b768-68f674b1daaa',
+ title: '电力/UPS/空调/温湿度',
+ title_en: 'Power/UPS/AC/Temperature',
+ code: 'ops:综合监控:电力_ups_空调_温湿度',
+ description: '综合监控 - 电力/UPS/空调/温湿度',
+ app_id: 2,
+ parent_id: 23,
+ menu_path: '/monitor/power',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 17,
+ created_at: '2025-12-26T13:23:51.938825+08:00',
+ },
+ {
+ id: 32,
+ identity: '019b591d-01f3-7698-9aad-9f9dbb3be203',
+ title: 'URL监控',
+ title_en: 'URL Monitoring',
+ code: 'ops:综合监控:url监控',
+ description: '综合监控 - URL监控',
+ app_id: 2,
+ parent_id: 23,
+ menu_path: '/monitor/url',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 18,
+ created_at: '2025-12-26T13:23:51.923432+08:00',
+ },
+ {
+ id: 34,
+ identity: '019b591d-0210-7e32-ad40-ebbf2f48282f',
+ title: '消防/门禁/漏水/有害气体',
+ title_en: 'Fire/Access/Leakage/Gas',
+ code: 'ops:综合监控:消防_门禁_漏水_有害气体',
+ description: '综合监控 - 消防/门禁/漏水/有害气体',
+ app_id: 2,
+ parent_id: 23,
+ menu_path: '/monitor/guard',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 19,
+ created_at: '2025-12-26T13:23:51.95293+08:00',
+ },
+ {
+ id: 26,
+ identity: '019b591d-0194-7bde-8437-1cd85a507548',
+ title: '安全设备监控',
+ title_en: 'Security Device Monitoring',
+ code: 'ops:综合监控:安全设备监控',
+ description: '综合监控 - 安全设备监控',
+ app_id: 2,
+ parent_id: 23,
+ menu_path: '/monitor/security',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 20,
+ created_at: '2025-12-26T13:23:51.828777+08:00',
+ },
+ {
+ id: 35,
+ identity: '019b591d-021a-74a3-8092-c15b990f3c7e',
+ title: '网络架构管理',
+ title_en: 'Network Architecture Management',
+ code: 'ops:网络架构管理',
+ description: '网络架构管理菜单',
+ app_id: 2,
+ menu_path: '/netarch/',
+ menu_icon: 'Laptop',
+ type: 1,
+ sort_key: 21,
+ created_at: '2025-12-26T13:23:51.969818+08:00',
+ },
+ {
+ id: 83,
+ identity: '019b8e92-3714-7376-936c-570b015b653b',
+ title: '自动感知拓扑图',
+ title_en: 'Auto Topo',
+ code: 'AutoTopo',
+ app_id: 2,
+ parent_id: 35,
+ menu_path: '/netarch/auto-topo',
+ type: 1,
+ sort_key: 22,
+ created_at: '2026-01-05T22:31:45.684645+08:00',
+ },
+ {
+ id: 36,
+ identity: '019b591d-0231-7667-a9fc-cfeb05da5aab',
+ title: '拓扑管理',
+ title_en: 'Topology Management',
+ code: 'ops:网络架构管理:拓扑管理',
+ description: '网络架构管理 - 拓扑管理',
+ app_id: 2,
+ parent_id: 35,
+ menu_path: '/netarch/topo-group',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 23,
+ created_at: '2025-12-26T13:23:51.985419+08:00',
+ },
+ {
+ id: 37,
+ identity: '019b591d-0240-7d6d-90b8-a0a6303665dc',
+ title: '流量分析管理',
+ title_en: 'Traffic Analysis Management',
+ code: 'ops:网络架构管理:流量分析管理',
+ description: '网络架构管理 - 流量分析管理',
+ app_id: 2,
+ parent_id: 35,
+ menu_path: '/netarch/traffic',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 24,
+ created_at: '2025-12-26T13:23:52.000879+08:00',
+ },
+ {
+ id: 38,
+ identity: '019b591d-024c-7564-942d-cf33e0ed6204',
+ title: 'IP地址管理',
+ title_en: 'IP Address Management',
+ code: 'ops:网络架构管理:ip地址管理',
+ description: '网络架构管理 - IP地址管理',
+ app_id: 2,
+ parent_id: 35,
+ menu_path: '/netarch/ip',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 25,
+ created_at: '2025-12-26T13:23:52.012353+08:00',
+ },
+ {
+ id: 39,
+ identity: '019b591d-0258-7316-9b58-d664678bb3af',
+ title: '告警管理',
+ title_en: 'Alert Management',
+ code: 'ops:告警管理',
+ description: '告警管理菜单',
+ app_id: 2,
+ menu_path: '/alert/',
+ menu_icon: 'ShieldLock',
+ type: 1,
+ sort_key: 26,
+ created_at: '2025-12-26T13:23:52.032311+08:00',
+ },
+ {
+ id: 45,
+ identity: '019b591d-02be-713f-91fe-5f5d668380c8',
+ title: '告警策略管理',
+ title_en: 'Alert Policy Management',
+ code: 'ops:告警管理:告警策略管理',
+ description: '告警管理 - 告警策略管理',
+ app_id: 2,
+ parent_id: 39,
+ menu_path: '/alert/setting',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 27,
+ created_at: '2025-12-26T13:23:52.126081+08:00',
+ },
+ {
+ id: 43,
+ identity: '019b591d-029e-7c52-ac1d-d94263e00f8e',
+ title: '告警受理处理',
+ title_en: 'Alert Handling',
+ code: 'ops:告警管理:告警受理处理',
+ description: '告警管理 - 告警受理处理',
+ app_id: 2,
+ parent_id: 39,
+ menu_path: '/alert/tackle',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 28,
+ created_at: '2025-12-26T13:23:52.094807+08:00',
+ },
+ {
+ id: 44,
+ identity: '019b591d-02ae-7587-9e11-7c3d395ea256',
+ title: '告警历史',
+ title_en: 'Alert History',
+ code: 'ops:告警管理:告警历史',
+ description: '告警管理 - 告警历史',
+ app_id: 2,
+ parent_id: 39,
+ menu_path: '/alert/history',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 29,
+ created_at: '2025-12-26T13:23:52.110362+08:00',
+ },
+ {
+ id: 40,
+ identity: '019b591d-026f-785d-b473-ac804133e251',
+ title: '告警模版',
+ title_en: 'Alert Template',
+ code: 'ops:告警管理:告警模版',
+ description: '告警管理 - 告警模版',
+ app_id: 2,
+ parent_id: 39,
+ menu_path: '/alert/template',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 30,
+ created_at: '2025-12-26T13:23:52.047548+08:00',
+ },
+ {
+ id: 41,
+ identity: '019b591d-027d-7eae-b9b9-23fd1b7ece75',
+ title: '告警通知设置',
+ title_en: 'Alert Notification Settings',
+ code: 'ops:告警管理:告警通知设置',
+ description: '告警管理 - 告警通知设置',
+ app_id: 2,
+ parent_id: 39,
+ menu_path: '/alert/notice',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 31,
+ created_at: '2025-12-26T13:23:52.061962+08:00',
+ },
+ {
+ id: 42,
+ identity: '019b591d-028e-7bb4-acf3-8bcb0c5b4b75',
+ title: '告警级别管理',
+ title_en: 'Alert Level Management',
+ code: 'ops:告警管理:告警级别管理',
+ description: '告警管理 - 告警级别管理',
+ app_id: 2,
+ parent_id: 39,
+ menu_path: '/alert/level',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 32,
+ created_at: '2025-12-26T13:23:52.078767+08:00',
+ },
+ {
+ id: 46,
+ identity: '019b591d-02c5-7ba6-ac39-847b5bbdc9c6',
+ title: '工单管理',
+ title_en: 'Ticket Management',
+ code: 'ops:工单管理',
+ description: '工单管理菜单',
+ app_id: 2,
+ menu_path: '/feedback/',
+ menu_icon: 'Layout',
+ type: 1,
+ sort_key: 33,
+ created_at: '2025-12-26T13:23:52.142086+08:00',
+ },
+ {
+ id: 48,
+ identity: '019b591d-02ec-7e47-adab-c1968a136eae',
+ title: '所有工单',
+ title_en: 'All Tickets',
+ code: 'ops:工单管理:所有工单',
+ description: '工单管理 - 所有工单',
+ app_id: 2,
+ parent_id: 46,
+ menu_path: '/feedback/all',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 34,
+ created_at: '2025-12-26T13:23:52.172935+08:00',
+ },
+ {
+ id: 47,
+ identity: '019b591d-02dd-75c9-b365-097ef1d5bca3',
+ title: '我的工单',
+ title_en: 'Pending Tickets',
+ code: 'ops:工单管理:待处理工单',
+ description: '工单管理 - 待处理工单',
+ app_id: 2,
+ parent_id: 46,
+ menu_path: '/feedback/undo',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 35,
+ created_at: '2025-12-26T13:23:52.157379+08:00',
+ },
+ {
+ id: 49,
+ identity: '019b591d-02f4-7781-8ef4-3993952290d3',
+ title: '数据中心管理',
+ title_en: 'Data Center Management',
+ code: 'ops:数据中心管理',
+ description: '数据中心管理菜单',
+ app_id: 2,
+ menu_path: '/datacenter/',
+ menu_icon: 'Storage',
+ type: 1,
+ sort_key: 36,
+ created_at: '2025-12-26T13:23:52.189288+08:00',
+ },
+ {
+ id: 52,
+ identity: '019b591d-0324-7b16-be4a-d0256a4a66a9',
+ title: '机柜管理',
+ title_en: 'Rack Management',
+ code: 'ops:数据中心管理:机柜管理',
+ description: '数据中心管理 - 机柜管理',
+ app_id: 2,
+ parent_id: 49,
+ menu_path: '/datacenter/rack',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 37,
+ created_at: '2025-12-26T13:23:52.228726+08:00',
+ },
+ {
+ id: 50,
+ identity: '019b591d-0305-75ac-89be-d0c5dd863383',
+ title: '数据中心',
+ title_en: 'Data Center',
+ code: 'ops:数据中心管理:数据中心',
+ description: '数据中心管理 - 数据中心',
+ app_id: 2,
+ parent_id: 49,
+ menu_path: '/datacenter/house',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 38,
+ created_at: '2025-12-26T13:23:52.197371+08:00',
+ },
+ {
+ id: 51,
+ identity: '019b591d-031c-726e-a7ac-0dff6f236d6c',
+ title: '楼层管理',
+ title_en: 'Floor Management',
+ code: 'ops:数据中心管理:楼层管理',
+ description: '数据中心管理 - 楼层管理',
+ app_id: 2,
+ parent_id: 49,
+ menu_path: '/datacenter/floor',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 39,
+ created_at: '2025-12-26T13:23:52.220159+08:00',
+ },
+ {
+ id: 54,
+ identity: '019b591d-0343-7ce7-91bd-d82497ea0a11',
+ title: '资产管理',
+ title_en: 'Asset Management',
+ code: 'ops:资产管理',
+ description: '资产管理菜单',
+ app_id: 2,
+ menu_path: '/assets/',
+ menu_icon: 'Social',
+ type: 1,
+ sort_key: 40,
+ created_at: '2025-12-26T13:23:52.268069+08:00',
+ },
+ {
+ id: 56,
+ identity: '019b591d-036b-7cb0-8678-4e1a7c73442f',
+ title: '设备分类管理',
+ title_en: 'Device Category Management',
+ code: 'ops:资产管理:设备分类管理',
+ description: '资产管理 - 设备分类管理',
+ app_id: 2,
+ parent_id: 54,
+ menu_path: '/assets/classify',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 41,
+ created_at: '2025-12-26T13:23:52.299831+08:00',
+ },
+ {
+ id: 57,
+ identity: '019b591d-037b-7248-8227-2ae17b0210fb',
+ title: '设备管理',
+ title_en: 'Device Management',
+ code: 'ops:资产管理:设备管理',
+ description: '资产管理 - 设备管理',
+ app_id: 2,
+ parent_id: 54,
+ menu_path: '/assets/device',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 42,
+ created_at: '2025-12-26T13:23:52.315149+08:00',
+ },
+ {
+ id: 55,
+ identity: '019b591d-035b-766f-9acf-a8e8dbcc5882',
+ title: '供应商管理',
+ title_en: 'Supplier Management',
+ code: 'ops:资产管理:供应商管理',
+ description: '资产管理 - 供应商管理',
+ app_id: 2,
+ parent_id: 54,
+ menu_path: '/assets/supplier',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 43,
+ created_at: '2025-12-26T13:23:52.283421+08:00',
+ },
+ {
+ id: 63,
+ identity: '019b591d-03d1-74e6-9547-a4321b0c0328',
+ title: '知识库管理',
+ title_en: 'Knowledge Base Management',
+ code: 'ops:知识库管理',
+ description: '知识库管理菜单',
+ app_id: 2,
+ menu_path: '/kb/',
+ menu_icon: 'FilePdf',
+ type: 1,
+ sort_key: 44,
+ created_at: '2025-12-26T13:23:52.40915+08:00',
+ },
+ {
+ id: 65,
+ identity: '019b591d-03f8-78a9-ba28-c41ff1873569',
+ title: '知识管理',
+ title_en: 'Knowledge Base',
+ code: 'ops:知识库管理:知识库',
+ description: '知识库管理 - 知识库',
+ app_id: 2,
+ parent_id: 63,
+ menu_path: '/kb/items',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 45,
+ created_at: '2025-12-26T13:23:52.440567+08:00',
+ },
+ {
+ id: 64,
+ identity: '019b591d-03e8-7d4b-b8cf-7a5142320c61',
+ title: '标签管理',
+ title_en: 'Tag Management',
+ code: 'ops:知识库管理:标签管理',
+ description: '知识库管理 - 标签管理',
+ app_id: 2,
+ parent_id: 63,
+ menu_path: '/kb/tags',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 46,
+ created_at: '2025-12-26T13:23:52.424871+08:00',
+ },
+ {
+ id: 67,
+ identity: '019b591d-0410-7c89-a545-98ca76421c41',
+ title: '我的审核',
+ title_en: 'Review',
+ code: 'ops:知识库管理:审核',
+ description: '知识库管理 - 审核',
+ app_id: 2,
+ parent_id: 63,
+ menu_path: '/kb/review',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 47,
+ created_at: '2025-12-26T13:23:52.464821+08:00',
+ },
+ {
+ id: 68,
+ identity: '019b591d-0427-7292-b964-ea747ac59748',
+ title: '我的收藏',
+ title_en: 'My Favorites',
+ code: 'ops:知识库管理:我的收藏',
+ description: '知识库管理 - 我的收藏',
+ app_id: 2,
+ parent_id: 63,
+ menu_path: '/kb/favorite',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 48,
+ created_at: '2025-12-26T13:23:52.487168+08:00',
+ },
+ {
+ id: 66,
+ identity: '019b591d-0408-748f-a43e-3fc6aaabe397',
+ title: '回收站',
+ title_en: 'Recycle Bin',
+ code: 'ops:知识库管理:回收站',
+ description: '知识库管理 - 回收站',
+ app_id: 2,
+ parent_id: 63,
+ menu_path: '/kb/recycle',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 49,
+ created_at: '2025-12-26T13:23:52.456298+08:00',
+ },
+ {
+ id: 69,
+ identity: '019b591d-042e-7d67-98c6-432768a6fd97',
+ title: '报告管理',
+ title_en: 'Report Management',
+ code: 'ops:报告管理',
+ description: '报表管理菜单',
+ app_id: 2,
+ menu_path: '/report/',
+ menu_icon: 'Git',
+ type: 1,
+ sort_key: 50,
+ created_at: '2025-12-26T13:23:52.502439+08:00',
+ },
+ {
+ id: 73,
+ identity: '019b591d-0475-7b37-929a-2b652b7de8cd',
+ title: '服务器报告',
+ title_en: 'Server Report',
+ code: 'ops:报表管理:服务器报表',
+ description: '报表管理 - 服务器报表',
+ app_id: 2,
+ parent_id: 69,
+ menu_path: '/report/host',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 51,
+ created_at: '2025-12-26T13:23:52.565735+08:00',
+ },
+ {
+ id: 72,
+ identity: '019b591d-0465-769b-8eca-a3ed252243d8',
+ title: '故障报告',
+ title_en: 'Fault Report',
+ code: 'ops:报表管理:故障报告',
+ description: '报表管理 - 故障报告',
+ app_id: 2,
+ parent_id: 69,
+ menu_path: '/report/fault',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 52,
+ created_at: '2025-12-26T13:23:52.549432+08:00',
+ },
+ {
+ id: 74,
+ identity: '019b591d-0484-7ca3-8535-5d87dd16305a',
+ title: '网络设备报告',
+ title_en: 'Network Device Report',
+ code: 'ops:报表管理:网络设备报表',
+ description: '报表管理 - 网络设备报表',
+ app_id: 2,
+ parent_id: 69,
+ menu_path: '/report/device',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 53,
+ created_at: '2025-12-26T13:23:52.580828+08:00',
+ },
+ {
+ id: 71,
+ identity: '019b591d-0455-7a93-9386-7825fa1e2aee',
+ title: '流量统计报告',
+ title_en: 'Traffic Statistics',
+ code: 'ops:报表管理:流量统计',
+ description: '报表管理 - 流量统计',
+ app_id: 2,
+ parent_id: 69,
+ menu_path: '/report/traffic',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 54,
+ created_at: '2025-12-26T13:23:52.533693+08:00',
+ },
+ {
+ id: 75,
+ identity: '019b591d-0495-7891-8893-5f93b073c4ba',
+ title: '历史报告',
+ title_en: 'History Report',
+ code: 'ops:报表管理:历史报表',
+ description: '报表管理 - 历史报表',
+ app_id: 2,
+ parent_id: 69,
+ menu_path: '/report/history',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 55,
+ created_at: '2025-12-26T13:23:52.597561+08:00',
+ },
+ {
+ id: 70,
+ identity: '019b591d-0446-7270-b3a6-b0a0e4623962',
+ title: '统计报告',
+ title_en: 'Statistics Report',
+ code: 'ops:报表管理:统计报告',
+ description: '报表管理 - 统计报告',
+ app_id: 2,
+ parent_id: 69,
+ menu_path: '/report/statistics',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 56,
+ created_at: '2025-12-26T13:23:52.518159+08:00',
+ },
+ {
+ id: 78,
+ identity: '019b5dc5-d82f-7290-b805-f549db554120',
+ title: '系统设置',
+ title_en: 'System Settings',
+ code: 'system-settings',
+ app_id: 2,
+ menu_path: '/system-settings/',
+ menu_icon: 'Settings',
+ type: 1,
+ sort_key: 57,
+ created_at: '2025-12-27T11:06:45.679492+08:00',
+ },
+ {
+ id: 82,
+ identity: '019b5e13-a5c0-7be8-88ff-7cc000325fbe',
+ title: '系统监控',
+ title_en: 'System Monitoring',
+ code: 'SystemSettingsSystemMonitoring',
+ description: '系统监控',
+ app_id: 2,
+ parent_id: 78,
+ menu_path: '/system-settings/system-monitoring',
+ menu_icon: 'icon-file',
+ type: 1,
+ sort_key: 58,
+ created_at: '2025-12-27T12:31:44.577167+08:00',
+ },
+ {
+ id: 81,
+ identity: '019b5e13-019b-7e4c-9466-3173e25d8c57',
+ title: '系统日志',
+ title_en: 'System Logs',
+ code: 'SystemSettingsSystemLogs',
+ description: '系统日志',
+ app_id: 2,
+ parent_id: 78,
+ menu_path: '/system-settings/system-logs',
+ type: 1,
+ sort_key: 59,
+ created_at: '2025-12-27T12:31:02.556301+08:00',
+ },
+ {
+ id: 80,
+ identity: '019b5e12-8192-7d79-9dfc-b193e1ef53a0',
+ title: '用户管理',
+ title_en: 'Account Management',
+ code: 'SystemSettingsAccountManagement',
+ description: '用户管理',
+ app_id: 2,
+ parent_id: 78,
+ menu_path: '/system-settings/account-management',
+ type: 1,
+ sort_key: 60,
+ created_at: '2025-12-27T12:30:29.779261+08:00',
+ },
+ {
+ id: 79,
+ identity: '019b5e12-0315-7d3a-b85c-1a0a557d6853',
+ title: '菜单设置',
+ title_en: 'Menu Management',
+ code: 'SystemSettingsMenuManagement',
+ description: '菜单设置',
+ app_id: 2,
+ parent_id: 78,
+ menu_path: '/system-settings/menu-management',
+ type: 1,
+ sort_key: 61,
+ created_at: '2025-12-27T12:29:57.398258+08:00',
+ },
+ {
+ id: 84,
+ identity: '019be0c6-2c0c-7c15-b003-9b9b4384f422',
+ title: '许可授权中心',
+ title_en: 'LicenseCenter',
+ code: 'LicenseCenter',
+ app_id: 2,
+ parent_id: 78,
+ menu_path: '/system-settings/license-center',
+ type: 1,
+ sort_key: 62,
+ created_at: '2026-01-21T21:37:22.445144+08:00',
+ },
+ {
+ id: 86,
+ identity: '019cc7bf-9bd4-78ed-bbcb-c5169236ca72',
+ title: '帮助中心',
+ title_en: 'Help Center',
+ code: 'ops:帮助中心',
+ app_id: 2,
+ menu_path: '/help',
+ menu_icon: 'icon-bulb',
+ type: 1,
+ sort_key: 63,
+ created_at: '2026-03-07T18:02:29.205051+08:00',
+ },
+]
+
+export default localMenuFlatItems
diff --git a/src/router/local-menu-items.ts b/src/router/local-menu-items.ts
new file mode 100644
index 0000000..ada5899
--- /dev/null
+++ b/src/router/local-menu-items.ts
@@ -0,0 +1,1006 @@
+import type { MenuItem } from '@/api/module/pmn'
+
+// 本地菜单数据 - 接口未准备好时使用
+// 这是从 fetchMenu 接口返回的原始数据格式
+export const localMenuItems: MenuItem[] = [
+ {
+ id: 8,
+ identity: '019b591d-0064-7dcc-9c78-59b5f4aa31a7',
+ title: '系统概况',
+ title_en: 'Home',
+ code: 'ops:系统概况',
+ description: '首页菜单',
+ app_id: 2,
+ menu_path: '/overview',
+ menu_icon: 'Home',
+ type: 1,
+ created_at: '2025-12-26T13:23:51.54067+08:00',
+ children: [],
+ },
+ {
+ id: 13,
+ identity: '019b591d-00c3-7955-aa1b-80b5a0c8d6bd',
+ title: '可视化大屏管理',
+ title_en: 'Visual Dashboard Management',
+ code: 'ops:可视化大屏管理',
+ description: '可视化大屏管理菜单',
+ app_id: 2,
+ menu_path: '/visual/',
+ menu_icon: 'Virus',
+ type: 1,
+ sort_key: 1,
+ created_at: '2025-12-26T13:23:51.62748+08:00',
+ children: [
+ {
+ id: 14,
+ identity: '019b591d-00dc-7486-aa93-51e798d3253a',
+ title: '大屏管理',
+ title_en: 'My Components',
+ code: 'ops:可视化大屏管理:我的组件',
+ description: '可视化大屏管理 - 我的组件',
+ app_id: 2,
+ parent_id: 13,
+ menu_path: '/visual/component',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 2,
+ is_web_page: true,
+ web_url: 'https://ops.apinb.com/view/#/project/items',
+ created_at: '2025-12-26T13:23:51.644296+08:00',
+ children: [],
+ },
+ {
+ id: 85,
+ identity: '019bf309-a961-7bba-a03d-83eb78a82437',
+ title: '已发布大屏列表',
+ title_en: 'View Publish',
+ code: '已发布大屏列表',
+ app_id: 2,
+ parent_id: 13,
+ menu_path: '/visual/view-publish',
+ type: 1,
+ sort_key: 2,
+ is_web_page: true,
+ web_url: 'https://ops.apinb.com/view/#/project/management',
+ created_at: '2026-01-25T10:44:15.33024+08:00',
+ children: [],
+ },
+ ],
+ },
+ {
+ id: 16,
+ identity: '019b591d-00f4-73a0-bbdb-aa7da79ed390',
+ title: '服务器及PC管理',
+ title_en: '服务器及pc管理',
+ code: 'ops:服务器及pc管理',
+ description: '服务器及PC管理菜单',
+ app_id: 2,
+ menu_path: '/dc/',
+ menu_icon: 'Building',
+ type: 1,
+ sort_key: 2,
+ created_at: '2025-12-26T13:23:51.675908+08:00',
+ children: [
+ {
+ id: 18,
+ identity: '019b591d-011a-7dca-b85c-4802ad0e5d05',
+ title: '办公PC管理',
+ title_en: '办公pc管理',
+ code: 'ops:服务器及pc管理:办公pc管理',
+ description: '服务器及PC管理 - 办公PC管理',
+ app_id: 2,
+ parent_id: 16,
+ menu_path: '/dc/pc',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 3,
+ created_at: '2025-12-26T13:23:51.706903+08:00',
+ children: [],
+ },
+ {
+ id: 17,
+ identity: '019b591d-010b-790f-adbc-401ee42c20ae',
+ title: '服务器管理',
+ title_en: '服务器管理',
+ code: 'ops:服务器及pc管理:服务器管理',
+ description: '服务器及PC管理 - 服务器管理',
+ app_id: 2,
+ parent_id: 16,
+ menu_path: '/dc/server',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 3,
+ created_at: '2025-12-26T13:23:51.691593+08:00',
+ children: [],
+ },
+ ],
+ },
+ {
+ id: 19,
+ identity: '019b591d-0122-7959-a3c3-f5226d0bf278',
+ title: '集群采集控制中心',
+ title_en: 'Cluster Collection Control Center',
+ code: 'ops:集群采集控制中心',
+ description: '集群采集控制中心菜单',
+ app_id: 2,
+ menu_path: '/dc/',
+ menu_icon: 'Adjustments',
+ type: 1,
+ sort_key: 3,
+ created_at: '2025-12-26T13:23:51.715137+08:00',
+ children: [
+ {
+ id: 20,
+ identity: '019b591d-013a-7c89-be2d-5f03e5d7c5da',
+ title: '数据库采集管理',
+ title_en: 'Database Collection Management',
+ code: 'ops:集群采集控制中心:数据库采集管理',
+ description: '集群采集控制中心 - 数据库采集管理',
+ app_id: 2,
+ parent_id: 19,
+ menu_path: '/dc/database',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 4,
+ created_at: '2025-12-26T13:23:51.738821+08:00',
+ children: [],
+ },
+ {
+ id: 21,
+ identity: '019b591d-014a-710a-8b3f-30713e516d70',
+ title: '中间件采集管理',
+ title_en: 'Middleware Collection Management',
+ code: 'ops:集群采集控制中心:中间件采集管理',
+ description: '集群采集控制中心 - 中间件采集管理',
+ app_id: 2,
+ parent_id: 19,
+ menu_path: '/dc/middleware',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 4,
+ created_at: '2025-12-26T13:23:51.754068+08:00',
+ children: [],
+ },
+ {
+ id: 22,
+ identity: '019b591d-0159-7e46-a5e0-fb69c6b62a25',
+ title: '网络设备采集管理',
+ title_en: 'Network Device Collection Management',
+ code: 'ops:集群采集控制中心:网络设备采集管理',
+ description: '集群采集控制中心 - 网络设备采集管理',
+ app_id: 2,
+ parent_id: 19,
+ menu_path: '/dc/network',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 4,
+ created_at: '2025-12-26T13:23:51.769935+08:00',
+ children: [],
+ },
+ ],
+ },
+ {
+ id: 23,
+ identity: '019b591d-0160-736e-a42d-180fef3fb3be',
+ title: '综合监控',
+ title_en: 'Comprehensive Monitoring',
+ code: 'ops:综合监控',
+ description: '综合监控菜单',
+ app_id: 2,
+ menu_path: '/monitor/',
+ menu_icon: 'Desktop',
+ type: 1,
+ sort_key: 4,
+ created_at: '2025-12-26T13:23:51.77834+08:00',
+ children: [
+ {
+ id: 31,
+ identity: '019b591d-01e3-7adc-b10f-26550a6e3700',
+ title: '日志监控',
+ title_en: 'Log Monitoring',
+ code: 'ops:综合监控:日志监控',
+ description: '综合监控 - 日志监控',
+ app_id: 2,
+ parent_id: 23,
+ menu_path: '/monitor/log',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 5,
+ created_at: '2025-12-26T13:23:51.907711+08:00',
+ children: [],
+ },
+ {
+ id: 30,
+ identity: '019b591d-01d4-78b0-89ea-a6ba12914379',
+ title: '虚拟化监控',
+ title_en: 'Virtualization Monitoring',
+ code: 'ops:综合监控:虚拟化监控',
+ description: '综合监控 - 虚拟化监控',
+ app_id: 2,
+ parent_id: 23,
+ menu_path: '/monitor/virtualization',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 5,
+ created_at: '2025-12-26T13:23:51.892569+08:00',
+ children: [],
+ },
+ {
+ id: 27,
+ identity: '019b591d-01a5-776f-ac4b-3cd896dd3f48',
+ title: '存储设备监控',
+ title_en: 'Storage Device Monitoring',
+ code: 'ops:综合监控:存储设备监控',
+ description: '综合监控 - 存储设备监控',
+ app_id: 2,
+ parent_id: 23,
+ menu_path: '/monitor/storage',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 5,
+ created_at: '2025-12-26T13:23:51.845487+08:00',
+ children: [],
+ },
+ {
+ id: 25,
+ identity: '019b591d-0187-7a06-888f-0e924c11544c',
+ title: '网络设备监控',
+ title_en: 'Network Device Monitoring',
+ code: 'ops:综合监控:网络设备监控',
+ description: '综合监控 - 网络设备监控',
+ app_id: 2,
+ parent_id: 23,
+ menu_path: '/monitor/network',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 5,
+ created_at: '2025-12-26T13:23:51.815656+08:00',
+ children: [],
+ },
+ {
+ id: 33,
+ identity: '019b591d-0202-7c99-b768-68f674b1daaa',
+ title: '电力/UPS/空调/温湿度',
+ title_en: 'Power/UPS/AC/Temperature',
+ code: 'ops:综合监控:电力_ups_空调_温湿度',
+ description: '综合监控 - 电力/UPS/空调/温湿度',
+ app_id: 2,
+ parent_id: 23,
+ menu_path: '/monitor/power',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 5,
+ created_at: '2025-12-26T13:23:51.938825+08:00',
+ children: [],
+ },
+ {
+ id: 32,
+ identity: '019b591d-01f3-7698-9aad-9f9dbb3be203',
+ title: 'URL监控',
+ title_en: 'URL Monitoring',
+ code: 'ops:综合监控:url监控',
+ description: '综合监控 - URL监控',
+ app_id: 2,
+ parent_id: 23,
+ menu_path: '/monitor/url',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 5,
+ created_at: '2025-12-26T13:23:51.923432+08:00',
+ children: [],
+ },
+ {
+ id: 34,
+ identity: '019b591d-0210-7e32-ad40-ebbf2f48282f',
+ title: '消防/门禁/漏水/有害气体',
+ title_en: 'Fire/Access/Leakage/Gas',
+ code: 'ops:综合监控:消防_门禁_漏水_有害气体',
+ description: '综合监控 - 消防/门禁/漏水/有害气体',
+ app_id: 2,
+ parent_id: 23,
+ menu_path: '/monitor/guard',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 5,
+ created_at: '2025-12-26T13:23:51.95293+08:00',
+ children: [],
+ },
+ {
+ id: 26,
+ identity: '019b591d-0194-7bde-8437-1cd85a507548',
+ title: '安全设备监控',
+ title_en: 'Security Device Monitoring',
+ code: 'ops:综合监控:安全设备监控',
+ description: '综合监控 - 安全设备监控',
+ app_id: 2,
+ parent_id: 23,
+ menu_path: '/monitor/security',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 5,
+ created_at: '2025-12-26T13:23:51.828777+08:00',
+ children: [],
+ },
+ ],
+ },
+ {
+ id: 35,
+ identity: '019b591d-021a-74a3-8092-c15b990f3c7e',
+ title: '网络架构管理',
+ title_en: 'Network Architecture Management',
+ code: 'ops:网络架构管理',
+ description: '网络架构管理菜单',
+ app_id: 2,
+ menu_path: '/netarch/',
+ menu_icon: 'Laptop',
+ type: 1,
+ sort_key: 5,
+ created_at: '2025-12-26T13:23:51.969818+08:00',
+ children: [
+ {
+ id: 83,
+ identity: '019b8e92-3714-7376-936c-570b015b653b',
+ title: '自动感知拓扑图',
+ title_en: 'Auto Topo',
+ code: 'AutoTopo',
+ app_id: 2,
+ parent_id: 35,
+ menu_path: '/netarch/auto-topo',
+ type: 1,
+ sort_key: 6,
+ created_at: '2026-01-05T22:31:45.684645+08:00',
+ children: [],
+ },
+ {
+ id: 36,
+ identity: '019b591d-0231-7667-a9fc-cfeb05da5aab',
+ title: '拓扑管理',
+ title_en: 'Topology Management',
+ code: 'ops:网络架构管理:拓扑管理',
+ description: '网络架构管理 - 拓扑管理',
+ app_id: 2,
+ parent_id: 35,
+ menu_path: '/netarch/topo-group',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 6,
+ created_at: '2025-12-26T13:23:51.985419+08:00',
+ children: [],
+ },
+ {
+ id: 37,
+ identity: '019b591d-0240-7d6d-90b8-a0a6303665dc',
+ title: '流量分析管理',
+ title_en: 'Traffic Analysis Management',
+ code: 'ops:网络架构管理:流量分析管理',
+ description: '网络架构管理 - 流量分析管理',
+ app_id: 2,
+ parent_id: 35,
+ menu_path: '/netarch/traffic',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 6,
+ created_at: '2025-12-26T13:23:52.000879+08:00',
+ children: [],
+ },
+ {
+ id: 38,
+ identity: '019b591d-024c-7564-942d-cf33e0ed6204',
+ title: 'IP地址管理',
+ title_en: 'IP Address Management',
+ code: 'ops:网络架构管理:ip地址管理',
+ description: '网络架构管理 - IP地址管理',
+ app_id: 2,
+ parent_id: 35,
+ menu_path: '/netarch/ip',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 6,
+ created_at: '2025-12-26T13:23:52.012353+08:00',
+ children: [],
+ },
+ ],
+ },
+ {
+ id: 39,
+ identity: '019b591d-0258-7316-9b58-d664678bb3af',
+ title: '告警管理',
+ title_en: 'Alert Management',
+ code: 'ops:告警管理',
+ description: '告警管理菜单',
+ app_id: 2,
+ menu_path: '/alert/',
+ menu_icon: 'ShieldLock',
+ type: 1,
+ sort_key: 6,
+ created_at: '2025-12-26T13:23:52.032311+08:00',
+ children: [
+ {
+ id: 45,
+ identity: '019b591d-02be-713f-91fe-5f5d668380c8',
+ title: '告警策略管理',
+ title_en: 'Alert Policy Management',
+ code: 'ops:告警管理:告警策略管理',
+ description: '告警管理 - 告警策略管理',
+ app_id: 2,
+ parent_id: 39,
+ menu_path: '/alert/setting',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 7,
+ created_at: '2025-12-26T13:23:52.126081+08:00',
+ children: [],
+ },
+ {
+ id: 43,
+ identity: '019b591d-029e-7c52-ac1d-d94263e00f8e',
+ title: '告警受理处理',
+ title_en: 'Alert Handling',
+ code: 'ops:告警管理:告警受理处理',
+ description: '告警管理 - 告警受理处理',
+ app_id: 2,
+ parent_id: 39,
+ menu_path: '/alert/tackle',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 7,
+ created_at: '2025-12-26T13:23:52.094807+08:00',
+ children: [],
+ },
+ {
+ id: 44,
+ identity: '019b591d-02ae-7587-9e11-7c3d395ea256',
+ title: '告警历史',
+ title_en: 'Alert History',
+ code: 'ops:告警管理:告警历史',
+ description: '告警管理 - 告警历史',
+ app_id: 2,
+ parent_id: 39,
+ menu_path: '/alert/history',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 7,
+ created_at: '2025-12-26T13:23:52.110362+08:00',
+ children: [],
+ },
+ {
+ id: 40,
+ identity: '019b591d-026f-785d-b473-ac804133e251',
+ title: '告警模版',
+ title_en: 'Alert Template',
+ code: 'ops:告警管理:告警模版',
+ description: '告警管理 - 告警模版',
+ app_id: 2,
+ parent_id: 39,
+ menu_path: '/alert/template',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 7,
+ created_at: '2025-12-26T13:23:52.047548+08:00',
+ children: [],
+ },
+ {
+ id: 41,
+ identity: '019b591d-027d-7eae-b9b9-23fd1b7ece75',
+ title: '告警通知设置',
+ title_en: 'Alert Notification Settings',
+ code: 'ops:告警管理:告警通知设置',
+ description: '告警管理 - 告警通知设置',
+ app_id: 2,
+ parent_id: 39,
+ menu_path: '/alert/notice',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 7,
+ created_at: '2025-12-26T13:23:52.061962+08:00',
+ children: [],
+ },
+ {
+ id: 42,
+ identity: '019b591d-028e-7bb4-acf3-8bcb0c5b4b75',
+ title: '告警级别管理',
+ title_en: 'Alert Level Management',
+ code: 'ops:告警管理:告警级别管理',
+ description: '告警管理 - 告警级别管理',
+ app_id: 2,
+ parent_id: 39,
+ menu_path: '/alert/level',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 7,
+ created_at: '2025-12-26T13:23:52.078767+08:00',
+ children: [],
+ },
+ ],
+ },
+ {
+ id: 46,
+ identity: '019b591d-02c5-7ba6-ac39-847b5bbdc9c6',
+ title: '工单管理',
+ title_en: 'Ticket Management',
+ code: 'ops:工单管理',
+ description: '工单管理菜单',
+ app_id: 2,
+ menu_path: '/feedback/',
+ menu_icon: 'Layout',
+ type: 1,
+ sort_key: 7,
+ created_at: '2025-12-26T13:23:52.142086+08:00',
+ children: [
+ {
+ id: 48,
+ identity: '019b591d-02ec-7e47-adab-c1968a136eae',
+ title: '所有工单',
+ title_en: 'All Tickets',
+ code: 'ops:工单管理:所有工单',
+ description: '工单管理 - 所有工单',
+ app_id: 2,
+ parent_id: 46,
+ menu_path: '/feedback/all',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 8,
+ created_at: '2025-12-26T13:23:52.172935+08:00',
+ children: [],
+ },
+ {
+ id: 47,
+ identity: '019b591d-02dd-75c9-b365-097ef1d5bca3',
+ title: '我的工单',
+ title_en: 'Pending Tickets',
+ code: 'ops:工单管理:待处理工单',
+ description: '工单管理 - 待处理工单',
+ app_id: 2,
+ parent_id: 46,
+ menu_path: '/feedback/undo',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 8,
+ created_at: '2025-12-26T13:23:52.157379+08:00',
+ children: [],
+ },
+ ],
+ },
+ {
+ id: 49,
+ identity: '019b591d-02f4-7781-8ef4-3993952290d3',
+ title: '数据中心管理',
+ title_en: 'Data Center Management',
+ code: 'ops:数据中心管理',
+ description: '数据中心管理菜单',
+ app_id: 2,
+ menu_path: '/datacenter/',
+ menu_icon: 'Storage',
+ type: 1,
+ sort_key: 8,
+ created_at: '2025-12-26T13:23:52.189288+08:00',
+ children: [
+ {
+ id: 52,
+ identity: '019b591d-0324-7b16-be4a-d0256a4a66a9',
+ title: '机柜管理',
+ title_en: 'Rack Management',
+ code: 'ops:数据中心管理:机柜管理',
+ description: '数据中心管理 - 机柜管理',
+ app_id: 2,
+ parent_id: 49,
+ menu_path: '/datacenter/rack',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 9,
+ created_at: '2025-12-26T13:23:52.228726+08:00',
+ children: [],
+ },
+ {
+ id: 50,
+ identity: '019b591d-0305-75ac-89be-d0c5dd863383',
+ title: '数据中心',
+ title_en: 'Data Center',
+ code: 'ops:数据中心管理:数据中心',
+ description: '数据中心管理 - 数据中心',
+ app_id: 2,
+ parent_id: 49,
+ menu_path: '/datacenter/house',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 9,
+ created_at: '2025-12-26T13:23:52.197371+08:00',
+ children: [],
+ },
+ {
+ id: 51,
+ identity: '019b591d-031c-726e-a7ac-0dff6f236d6c',
+ title: '楼层管理',
+ title_en: 'Floor Management',
+ code: 'ops:数据中心管理:楼层管理',
+ description: '数据中心管理 - 楼层管理',
+ app_id: 2,
+ parent_id: 49,
+ menu_path: '/datacenter/floor',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 9,
+ created_at: '2025-12-26T13:23:52.220159+08:00',
+ children: [],
+ },
+ ],
+ },
+ {
+ id: 54,
+ identity: '019b591d-0343-7ce7-91bd-d82497ea0a11',
+ title: '资产管理',
+ title_en: 'Asset Management',
+ code: 'ops:资产管理',
+ description: '资产管理菜单',
+ app_id: 2,
+ menu_path: '/assets/',
+ menu_icon: 'Social',
+ type: 1,
+ sort_key: 9,
+ created_at: '2025-12-26T13:23:52.268069+08:00',
+ children: [
+ {
+ id: 56,
+ identity: '019b591d-036b-7cb0-8678-4e1a7c73442f',
+ title: '设备分类管理',
+ title_en: 'Device Category Management',
+ code: 'ops:资产管理:设备分类管理',
+ description: '资产管理 - 设备分类管理',
+ app_id: 2,
+ parent_id: 54,
+ menu_path: '/assets/classify',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 10,
+ created_at: '2025-12-26T13:23:52.299831+08:00',
+ children: [],
+ },
+ {
+ id: 57,
+ identity: '019b591d-037b-7248-8227-2ae17b0210fb',
+ title: '设备管理',
+ title_en: 'Device Management',
+ code: 'ops:资产管理:设备管理',
+ description: '资产管理 - 设备管理',
+ app_id: 2,
+ parent_id: 54,
+ menu_path: '/assets/device',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 10,
+ created_at: '2025-12-26T13:23:52.315149+08:00',
+ children: [],
+ },
+ {
+ id: 55,
+ identity: '019b591d-035b-766f-9acf-a8e8dbcc5882',
+ title: '供应商管理',
+ title_en: 'Supplier Management',
+ code: 'ops:资产管理:供应商管理',
+ description: '资产管理 - 供应商管理',
+ app_id: 2,
+ parent_id: 54,
+ menu_path: '/assets/supplier',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 10,
+ created_at: '2025-12-26T13:23:52.283421+08:00',
+ children: [],
+ },
+ ],
+ },
+ {
+ id: 63,
+ identity: '019b591d-03d1-74e6-9547-a4321b0c0328',
+ title: '知识库管理',
+ title_en: 'Knowledge Base Management',
+ code: 'ops:知识库管理',
+ description: '知识库管理菜单',
+ app_id: 2,
+ menu_path: '/kb/',
+ menu_icon: 'FilePdf',
+ type: 1,
+ sort_key: 10,
+ created_at: '2025-12-26T13:23:52.40915+08:00',
+ children: [
+ {
+ id: 65,
+ identity: '019b591d-03f8-78a9-ba28-c41ff1873569',
+ title: '知识管理',
+ title_en: 'Knowledge Base',
+ code: 'ops:知识库管理:知识库',
+ description: '知识库管理 - 知识库',
+ app_id: 2,
+ parent_id: 63,
+ menu_path: '/kb/items',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 11,
+ created_at: '2025-12-26T13:23:52.440567+08:00',
+ children: [],
+ },
+ {
+ id: 64,
+ identity: '019b591d-03e8-7d4b-b8cf-7a5142320c61',
+ title: '标签管理',
+ title_en: 'Tag Management',
+ code: 'ops:知识库管理:标签管理',
+ description: '知识库管理 - 标签管理',
+ app_id: 2,
+ parent_id: 63,
+ menu_path: '/kb/tags',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 11,
+ created_at: '2025-12-26T13:23:52.424871+08:00',
+ children: [],
+ },
+ {
+ id: 67,
+ identity: '019b591d-0410-7c89-a545-98ca76421c41',
+ title: '我的审核',
+ title_en: 'Review',
+ code: 'ops:知识库管理:审核',
+ description: '知识库管理 - 审核',
+ app_id: 2,
+ parent_id: 63,
+ menu_path: '/kb/review',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 11,
+ created_at: '2025-12-26T13:23:52.464821+08:00',
+ children: [],
+ },
+ {
+ id: 68,
+ identity: '019b591d-0427-7292-b964-ea747ac59748',
+ title: '我的收藏',
+ title_en: 'My Favorites',
+ code: 'ops:知识库管理:我的收藏',
+ description: '知识库管理 - 我的收藏',
+ app_id: 2,
+ parent_id: 63,
+ menu_path: '/kb/favorite',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 11,
+ created_at: '2025-12-26T13:23:52.487168+08:00',
+ children: [],
+ },
+ {
+ id: 66,
+ identity: '019b591d-0408-748f-a43e-3fc6aaabe397',
+ title: '回收站',
+ title_en: 'Recycle Bin',
+ code: 'ops:知识库管理:回收站',
+ description: '知识库管理 - 回收站',
+ app_id: 2,
+ parent_id: 63,
+ menu_path: '/kb/recycle',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 11,
+ created_at: '2025-12-26T13:23:52.456298+08:00',
+ children: [],
+ },
+ ],
+ },
+ {
+ id: 69,
+ identity: '019b591d-042e-7d67-98c6-432768a6fd97',
+ title: '报告管理',
+ title_en: 'Report Management',
+ code: 'ops:报告管理',
+ description: '报表管理菜单',
+ app_id: 2,
+ menu_path: '/report/',
+ menu_icon: 'Git',
+ type: 1,
+ sort_key: 11,
+ created_at: '2025-12-26T13:23:52.502439+08:00',
+ children: [
+ {
+ id: 73,
+ identity: '019b591d-0475-7b37-929a-2b652b7de8cd',
+ title: '服务器报告',
+ title_en: 'Server Report',
+ code: 'ops:报表管理:服务器报表',
+ description: '报表管理 - 服务器报表',
+ app_id: 2,
+ parent_id: 69,
+ menu_path: '/report/host',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 12,
+ created_at: '2025-12-26T13:23:52.565735+08:00',
+ children: [],
+ },
+ {
+ id: 72,
+ identity: '019b591d-0465-769b-8eca-a3ed252243d8',
+ title: '故障报告',
+ title_en: 'Fault Report',
+ code: 'ops:报表管理:故障报告',
+ description: '报表管理 - 故障报告',
+ app_id: 2,
+ parent_id: 69,
+ menu_path: '/report/fault',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 12,
+ created_at: '2025-12-26T13:23:52.549432+08:00',
+ children: [],
+ },
+ {
+ id: 74,
+ identity: '019b591d-0484-7ca3-8535-5d87dd16305a',
+ title: '网络设备报告',
+ title_en: 'Network Device Report',
+ code: 'ops:报表管理:网络设备报表',
+ description: '报表管理 - 网络设备报表',
+ app_id: 2,
+ parent_id: 69,
+ menu_path: '/report/device',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 12,
+ created_at: '2025-12-26T13:23:52.580828+08:00',
+ children: [],
+ },
+ {
+ id: 71,
+ identity: '019b591d-0455-7a93-9386-7825fa1e2aee',
+ title: '流量统计报告',
+ title_en: 'Traffic Statistics',
+ code: 'ops:报表管理:流量统计',
+ description: '报表管理 - 流量统计',
+ app_id: 2,
+ parent_id: 69,
+ menu_path: '/report/traffic',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 12,
+ created_at: '2025-12-26T13:23:52.533693+08:00',
+ children: [],
+ },
+ {
+ id: 75,
+ identity: '019b591d-0495-7891-8893-5f93b073c4ba',
+ title: '历史报告',
+ title_en: 'History Report',
+ code: 'ops:报表管理:历史报表',
+ description: '报表管理 - 历史报表',
+ app_id: 2,
+ parent_id: 69,
+ menu_path: '/report/history',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 12,
+ created_at: '2025-12-26T13:23:52.597561+08:00',
+ children: [],
+ },
+ {
+ id: 70,
+ identity: '019b591d-0446-7270-b3a6-b0a0e4623962',
+ title: '统计报告',
+ title_en: 'Statistics Report',
+ code: 'ops:报表管理:统计报告',
+ description: '报表管理 - 统计报告',
+ app_id: 2,
+ parent_id: 69,
+ menu_path: '/report/statistics',
+ menu_icon: 'appstore',
+ type: 1,
+ sort_key: 12,
+ created_at: '2025-12-26T13:23:52.518159+08:00',
+ children: [],
+ },
+ ],
+ },
+ {
+ id: 78,
+ identity: '019b5dc5-d82f-7290-b805-f549db554120',
+ title: '系统设置',
+ title_en: 'System Settings',
+ code: 'system-settings',
+ app_id: 2,
+ menu_path: '/system-settings/',
+ menu_icon: 'Settings',
+ type: 1,
+ sort_key: 12,
+ created_at: '2025-12-27T11:06:45.679492+08:00',
+ children: [
+ {
+ id: 82,
+ identity: '019b5e13-a5c0-7be8-88ff-7cc000325fbe',
+ title: '系统监控',
+ title_en: 'System Monitoring',
+ code: 'SystemSettingsSystemMonitoring',
+ description: '系统监控',
+ app_id: 2,
+ parent_id: 78,
+ menu_path: '/system-settings/system-monitoring',
+ menu_icon: 'icon-file',
+ type: 1,
+ sort_key: 13,
+ created_at: '2025-12-27T12:31:44.577167+08:00',
+ children: [],
+ },
+ {
+ id: 81,
+ identity: '019b5e13-019b-7e4c-9466-3173e25d8c57',
+ title: '系统日志',
+ title_en: 'System Logs',
+ code: 'SystemSettingsSystemLogs',
+ description: '系统日志',
+ app_id: 2,
+ parent_id: 78,
+ menu_path: '/system-settings/system-logs',
+ type: 1,
+ sort_key: 13,
+ created_at: '2025-12-27T12:31:02.556301+08:00',
+ children: [],
+ },
+ {
+ id: 80,
+ identity: '019b5e12-8192-7d79-9dfc-b193e1ef53a0',
+ title: '用户管理',
+ title_en: 'Account Management',
+ code: 'SystemSettingsAccountManagement',
+ description: '用户管理',
+ app_id: 2,
+ parent_id: 78,
+ menu_path: '/system-settings/account-management',
+ type: 1,
+ sort_key: 13,
+ created_at: '2025-12-27T12:30:29.779261+08:00',
+ children: [],
+ },
+ {
+ id: 79,
+ identity: '019b5e12-0315-7d3a-b85c-1a0a557d6853',
+ title: '菜单设置',
+ title_en: 'Menu Management',
+ code: 'SystemSettingsMenuManagement',
+ description: '菜单设置',
+ app_id: 2,
+ parent_id: 78,
+ menu_path: '/system-settings/menu-management',
+ type: 1,
+ sort_key: 13,
+ created_at: '2025-12-27T12:29:57.398258+08:00',
+ children: [],
+ },
+ {
+ id: 84,
+ identity: '019be0c6-2c0c-7c15-b003-9b9b4384f422',
+ title: '许可授权中心',
+ title_en: 'LicenseCenter',
+ code: 'LicenseCenter',
+ app_id: 2,
+ parent_id: 78,
+ menu_path: '/system-settings/license-center',
+ type: 1,
+ sort_key: 13,
+ created_at: '2026-01-21T21:37:22.445144+08:00',
+ children: [],
+ },
+ ],
+ },
+ {
+ id: 86,
+ identity: '019cc7bf-9bd4-78ed-bbcb-c5169236ca72',
+ title: '帮助中心',
+ title_en: 'Help Center',
+ code: 'ops:帮助中心',
+ app_id: 2,
+ menu_path: '/help',
+ menu_icon: 'icon-bulb',
+ type: 1,
+ sort_key: 13,
+ created_at: '2026-03-07T18:02:29.205051+08:00',
+ children: [],
+ },
+]
+
+export default localMenuItems
diff --git a/src/router/menu-data.ts b/src/router/menu-data.ts
new file mode 100644
index 0000000..d58b197
--- /dev/null
+++ b/src/router/menu-data.ts
@@ -0,0 +1,736 @@
+import { DEFAULT_LAYOUT } from './routes/base'
+import type { AppRouteRecordRaw } from './routes/types'
+
+// 本地菜单数据 - 接口未准备好时使用
+export const localMenuData: AppRouteRecordRaw[] = [{
+ path: '/dashboard',
+ name: 'dashboard',
+ component: DEFAULT_LAYOUT,
+ meta: {
+ locale: '仪表盘',
+ requiresAuth: true,
+ icon: 'icon-dashboard',
+ order: 0,
+ },
+ children: [
+ {
+ path: 'workplace',
+ name: 'Workplace',
+ component: () => import('@/views/dashboard/workplace/index.vue'),
+ meta: {
+ locale: 'menu.dashboard.workplace',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ /** simple */
+ {
+ path: 'monitor',
+ name: 'Monitor',
+ component: () => import('@/views/dashboard/monitor/index.vue'),
+ meta: {
+ locale: 'menu.dashboard.monitor',
+ requiresAuth: true,
+ roles: ['admin'],
+ },
+ },
+ /** simple end */
+ ],
+},
+ {
+ path: '/overview',
+ name: 'Overview',
+ component: DEFAULT_LAYOUT,
+ meta: {
+ locale: '系统概况',
+ requiresAuth: true,
+ icon: 'icon-home',
+ order: 1,
+ hideChildrenInMenu: true,
+ },
+ children: [
+ {
+ path: '',
+ name: 'OverviewIndex',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '系统概况',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ ],
+ },
+ {
+ path: '/visual',
+ name: 'VisualDashboard',
+ component: DEFAULT_LAYOUT,
+ meta: {
+ locale: '可视化大屏管理',
+ requiresAuth: true,
+ icon: 'icon-apps',
+ order: 2,
+ },
+ children: [
+ {
+ path: 'component',
+ name: 'VisualComponent',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '大屏管理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'view-publish',
+ name: 'ViewPublish',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '已发布大屏列表',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ ],
+ },
+ {
+ path: '/dc',
+ name: 'DataCenter',
+ component: DEFAULT_LAYOUT,
+ meta: {
+ locale: '服务器及PC管理',
+ requiresAuth: true,
+ icon: 'icon-storage',
+ order: 3,
+ },
+ children: [
+ {
+ path: 'pc',
+ name: 'OfficePC',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '办公PC管理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'server',
+ name: 'ServerManagement',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '服务器管理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ ],
+ },
+ {
+ path: '/dc/cluster',
+ name: 'ClusterCollection',
+ component: DEFAULT_LAYOUT,
+ meta: {
+ locale: '集群采集控制中心',
+ requiresAuth: true,
+ icon: 'icon-settings',
+ order: 4,
+ },
+ children: [
+ {
+ path: 'database',
+ name: 'DatabaseCollection',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '数据库采集管理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'middleware',
+ name: 'MiddlewareCollection',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '中间件采集管理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'network',
+ name: 'NetworkDeviceCollection',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '网络设备采集管理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ ],
+ },
+ {
+ path: '/monitor',
+ name: 'Monitor',
+ component: DEFAULT_LAYOUT,
+ meta: {
+ locale: '综合监控',
+ requiresAuth: true,
+ icon: 'icon-desktop',
+ order: 5,
+ },
+ children: [
+ {
+ path: 'log',
+ name: 'LogMonitor',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '日志监控',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'virtualization',
+ name: 'VirtualizationMonitor',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '虚拟化监控',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'storage',
+ name: 'StorageMonitor',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '存储设备监控',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'network',
+ name: 'NetworkMonitor',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '网络设备监控',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'power',
+ name: 'PowerMonitor',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '电力/UPS/空调/温湿度',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'url',
+ name: 'URLMonitor',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: 'URL监控',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'guard',
+ name: 'GuardMonitor',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '消防/门禁/漏水/有害气体',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'security',
+ name: 'SecurityMonitor',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '安全设备监控',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ ],
+ },
+ {
+ path: '/netarch',
+ name: 'NetworkArchitecture',
+ component: DEFAULT_LAYOUT,
+ meta: {
+ locale: '网络架构管理',
+ requiresAuth: true,
+ icon: 'icon-nav',
+ order: 6,
+ },
+ children: [
+ {
+ path: 'auto-topo',
+ name: 'AutoTopo',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '自动感知拓扑图',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'topo-group',
+ name: 'TopoGroup',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '拓扑管理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'traffic',
+ name: 'TrafficAnalysis',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '流量分析管理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'ip',
+ name: 'IPAddress',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: 'IP地址管理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ ],
+ },
+ {
+ path: '/alert',
+ name: 'Alert',
+ component: DEFAULT_LAYOUT,
+ meta: {
+ locale: '告警管理',
+ requiresAuth: true,
+ icon: 'icon-bulb',
+ order: 7,
+ },
+ children: [
+ {
+ path: 'setting',
+ name: 'AlertSetting',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '告警策略管理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'tackle',
+ name: 'AlertTackle',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '告警受理处理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'history',
+ name: 'AlertHistory',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '告警历史',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'template',
+ name: 'AlertTemplate',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '告警模版',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'notice',
+ name: 'AlertNotice',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '告警通知设置',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'level',
+ name: 'AlertLevel',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '告警级别管理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ ],
+ },
+ {
+ path: '/feedback',
+ name: 'Feedback',
+ component: DEFAULT_LAYOUT,
+ meta: {
+ locale: '工单管理',
+ requiresAuth: true,
+ icon: 'icon-list',
+ order: 8,
+ },
+ children: [
+ {
+ path: 'all',
+ name: 'AllTickets',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '所有工单',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'undo',
+ name: 'PendingTickets',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '我的工单',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ ],
+ },
+ {
+ path: '/datacenter',
+ name: 'DataCenterManagement',
+ component: DEFAULT_LAYOUT,
+ meta: {
+ locale: '数据中心管理',
+ requiresAuth: true,
+ icon: 'icon-drive-file',
+ order: 9,
+ },
+ children: [
+ {
+ path: 'rack',
+ name: 'RackManagement',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '机柜管理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'house',
+ name: 'DataCenterHouse',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '数据中心',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'floor',
+ name: 'FloorManagement',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '楼层管理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ ],
+ },
+ {
+ path: '/assets',
+ name: 'Assets',
+ component: DEFAULT_LAYOUT,
+ meta: {
+ locale: '资产管理',
+ requiresAuth: true,
+ icon: 'icon-apps',
+ order: 10,
+ },
+ children: [
+ {
+ path: 'classify',
+ name: 'AssetClassify',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '设备分类管理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'device',
+ name: 'AssetDevice',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '设备管理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'supplier',
+ name: 'AssetSupplier',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '供应商管理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ ],
+ },
+ {
+ path: '/kb',
+ name: 'KnowledgeBase',
+ component: DEFAULT_LAYOUT,
+ meta: {
+ locale: '知识库管理',
+ requiresAuth: true,
+ icon: 'icon-file',
+ order: 11,
+ },
+ children: [
+ {
+ path: 'items',
+ name: 'KnowledgeItems',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '知识管理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'tags',
+ name: 'KnowledgeTags',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '标签管理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'review',
+ name: 'KnowledgeReview',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '我的审核',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'favorite',
+ name: 'KnowledgeFavorite',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '我的收藏',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'recycle',
+ name: 'KnowledgeRecycle',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '回收站',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ ],
+ },
+ {
+ path: '/report',
+ name: 'Report',
+ component: DEFAULT_LAYOUT,
+ meta: {
+ locale: '报告管理',
+ requiresAuth: true,
+ icon: 'icon-nav',
+ order: 12,
+ },
+ children: [
+ {
+ path: 'host',
+ name: 'ServerReport',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '服务器报告',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'fault',
+ name: 'FaultReport',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '故障报告',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'device',
+ name: 'DeviceReport',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '网络设备报告',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'traffic',
+ name: 'TrafficReport',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '流量统计报告',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'history',
+ name: 'HistoryReport',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '历史报告',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'statistics',
+ name: 'StatisticsReport',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '统计报告',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ ],
+ },
+ {
+ path: '/system-settings',
+ name: 'SystemSettings',
+ component: DEFAULT_LAYOUT,
+ meta: {
+ locale: '系统设置',
+ requiresAuth: true,
+ icon: 'icon-settings',
+ order: 13,
+ },
+ children: [
+ {
+ path: 'system-monitoring',
+ name: 'SystemMonitoring',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '系统监控',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'system-logs',
+ name: 'SystemLogs',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '系统日志',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'account-management',
+ name: 'AccountManagement',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '用户管理',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'menu-management',
+ name: 'MenuManagement',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '菜单设置',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'license-center',
+ name: 'LicenseCenter',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '许可授权中心',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ ],
+ },
+ {
+ path: '/help',
+ name: 'HelpCenter',
+ component: DEFAULT_LAYOUT,
+ meta: {
+ locale: '帮助中心',
+ requiresAuth: true,
+ icon: 'icon-bulb',
+ order: 14,
+ hideChildrenInMenu: true,
+ },
+ children: [
+ {
+ path: '',
+ name: 'HelpCenterIndex',
+ component: () => import('@/views/redirect/index.vue'),
+ meta: {
+ locale: '帮助中心',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ ],
+ },
+]
+
+export default localMenuData
diff --git a/src/router/routes/modules/dashboard.ts b/src/router/routes/modules/dashboard.ts
index ea32bbb..a28142a 100644
--- a/src/router/routes/modules/dashboard.ts
+++ b/src/router/routes/modules/dashboard.ts
@@ -6,7 +6,7 @@ const DASHBOARD: AppRouteRecordRaw = {
name: 'dashboard',
component: DEFAULT_LAYOUT,
meta: {
- locale: 'menu.dashboard',
+ locale: '仪表盘',
requiresAuth: true,
icon: 'icon-dashboard',
order: 0,
diff --git a/src/router/routes/modules/list.ts b/src/router/routes/modules/list.ts
index 65c546d..a62a7bd 100644
--- a/src/router/routes/modules/list.ts
+++ b/src/router/routes/modules/list.ts
@@ -13,21 +13,11 @@ const LIST: AppRouteRecordRaw = {
},
children: [
{
- path: 'search-table', // The midline path complies with SEO specifications
- name: 'SearchTable',
- component: () => import('@/views/list/search-table/index.vue'),
+ path: 'search-table-demo',
+ name: 'SearchTableDemo',
+ component: () => import('@/views/list/search-table/demo.vue'),
meta: {
- locale: 'menu.list.searchTable',
- requiresAuth: true,
- roles: ['*'],
- },
- },
- {
- path: 'card',
- name: 'Card',
- component: () => import('@/views/list/card/index.vue'),
- meta: {
- locale: 'menu.list.cardList',
+ locale: '公共组件Demo',
requiresAuth: true,
roles: ['*'],
},
diff --git a/src/router/routes/modules/ops.ts b/src/router/routes/modules/ops.ts
new file mode 100644
index 0000000..efdadcd
--- /dev/null
+++ b/src/router/routes/modules/ops.ts
@@ -0,0 +1,38 @@
+import { DEFAULT_LAYOUT } from '../base'
+import { AppRouteRecordRaw } from '../types'
+
+const OPS: AppRouteRecordRaw = {
+ path: '/ops',
+ name: 'ops',
+ component: DEFAULT_LAYOUT,
+ meta: {
+ locale: 'menu.ops',
+ requiresAuth: true,
+ icon: 'icon-settings',
+ order: 3,
+ },
+ children: [
+ {
+ path: 'menu-management',
+ name: 'MenuManagement',
+ component: () => import('@/views/ops/pages/system-settings/menu-management/index.vue'),
+ meta: {
+ locale: 'menu.ops.systemSettings.menuManagement',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ {
+ path: 'system-logs',
+ name: 'SystemLogs',
+ component: () => import('@/views/ops/pages/system-settings/system-logs/index.vue'),
+ meta: {
+ locale: 'menu.ops.systemSettings.systemLogs',
+ requiresAuth: true,
+ roles: ['*'],
+ },
+ },
+ ],
+}
+
+export default OPS
diff --git a/src/router/routes/modules/user.ts b/src/router/routes/modules/user.ts
deleted file mode 100644
index cbb0a06..0000000
--- a/src/router/routes/modules/user.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import { DEFAULT_LAYOUT } from '../base'
-import { AppRouteRecordRaw } from '../types'
-
-const USER: AppRouteRecordRaw = {
- path: '/user',
- name: 'user',
- component: DEFAULT_LAYOUT,
- meta: {
- locale: 'menu.user',
- icon: 'icon-user',
- requiresAuth: true,
- order: 7,
- },
- children: [
- {
- path: 'info',
- name: 'Info',
- component: () => import('@/views/user/info/index.vue'),
- meta: {
- locale: 'menu.user.info',
- requiresAuth: true,
- roles: ['*'],
- },
- },
- {
- path: 'setting',
- name: 'Setting',
- component: () => import('@/views/user/setting/index.vue'),
- meta: {
- locale: 'menu.user.setting',
- requiresAuth: true,
- roles: ['*'],
- },
- },
- ],
-}
-
-export default USER
diff --git a/src/store/modules/app/index.ts b/src/store/modules/app/index.ts
index c3a3685..8c8cc3b 100644
--- a/src/store/modules/app/index.ts
+++ b/src/store/modules/app/index.ts
@@ -3,9 +3,13 @@ import { Notification } from '@arco-design/web-vue'
import type { NotificationReturn } from '@arco-design/web-vue/es/notification/interface'
import type { RouteRecordNormalized } from 'vue-router'
import defaultSettings from '@/config/settings.json'
-import { getMenuList } from '@/api/user'
+import { userPmn } from '@/api/module/user'
+import { localMenuData } from '@/router/menu-data'
+import { buildTree } from '@/utils/tree'
+import SafeStorage, { AppStorageKey } from "@/utils/safeStorage";
import { AppState } from './types'
+
const useAppStore = defineStore('app', {
state: (): AppState => ({ ...defaultSettings }),
@@ -45,27 +49,24 @@ const useAppStore = defineStore('app', {
this.hideMenu = value
},
async fetchServerMenuConfig() {
+ const userInfo = SafeStorage.get(AppStorageKey.USER_INFO) as any
let notifyInstance: NotificationReturn | null = null
try {
- notifyInstance = Notification.info({
- id: 'menuNotice', // Keep the instance id the same
- content: 'loading',
- closable: true,
- })
- const { data } = await getMenuList()
- this.serverMenu = data
- notifyInstance = Notification.success({
- id: 'menuNotice',
- content: 'success',
- closable: true,
- })
+ // 使用本地菜单数据(接口未准备好)
+ // TODO: 接口准备好后,取消下面的注释,使用真实接口数据
+ const res = await userPmn({ id: userInfo.user_id, workspace: import.meta.env.VITE_APP_WORKSPACE })
+ console.log('res', res)
+ if (res.code === 0 && res?.details?.length) {
+ console.log('buildTree', buildTree(res.details[0].permissions))
+ }
+ // this.serverMenu = data
+
+ // 使用本地数据
+ this.serverMenu = localMenuData as unknown as RouteRecordNormalized[]
+
} catch (error) {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
- notifyInstance = Notification.error({
- id: 'menuNotice',
- content: 'error',
- closable: true,
- })
+
}
},
clearServerMenu() {
diff --git a/src/store/modules/user/index.ts b/src/store/modules/user/index.ts
index bbf25ae..39dc655 100644
--- a/src/store/modules/user/index.ts
+++ b/src/store/modules/user/index.ts
@@ -1,7 +1,10 @@
-import { LoginData, getUserInfo, login as userLogin, logout as userLogout } from '@/api/user'
+import { login, logout } from '@/api/module/user'
+import { LoginData } from '@/api/types'
+import { request } from '@/api/request'
import { clearToken, setToken } from '@/utils/auth'
import { removeRouteListener } from '@/utils/route-listener'
import { defineStore } from 'pinia'
+import SafeStorage, { AppStorageKey } from "@/utils/safeStorage";
import useAppStore from '../app'
import { UserState } from './types'
@@ -23,6 +26,7 @@ const useUserStore = defineStore('user', {
accountId: undefined,
certification: undefined,
role: '',
+ userInfo: SafeStorage.get(AppStorageKey.USER_INFO)
}),
getters: {
@@ -50,16 +54,22 @@ const useUserStore = defineStore('user', {
// Get user's information
async info() {
- const res = await getUserInfo()
-
- this.setInfo(res.data)
+ // const res = await request.post('/rbac2/v1/user/info') as any
+ // request 拦截器已经返回 response.data,所以 res 就是用户信息
+ // this.setInfo(res.data || res)
},
// Login
async login(loginForm: LoginData) {
try {
- const res = await userLogin(loginForm)
- setToken(res.data.token)
+ const { code, details } = await login(loginForm as any) as any
+ if (code === 0 && details?.token) {
+ setToken(details.token)
+ SafeStorage.set(AppStorageKey.USER_INFO, details)
+ this.userInfo = details
+ } else {
+ throw new Error('登录失败:未获取到 token')
+ }
} catch (err) {
clearToken()
throw err
@@ -71,11 +81,12 @@ const useUserStore = defineStore('user', {
clearToken()
removeRouteListener()
appStore.clearServerMenu()
+ SafeStorage.clearAppStorage()
},
// Logout
async logout() {
try {
- await userLogout()
+ // await logout()
} finally {
this.logoutCallBack()
}
diff --git a/src/store/modules/user/types.ts b/src/store/modules/user/types.ts
index 97cee61..0f6ab34 100644
--- a/src/store/modules/user/types.ts
+++ b/src/store/modules/user/types.ts
@@ -16,4 +16,5 @@ export interface UserState {
accountId?: string
certification?: number
role: RoleType
+ userInfo?: any
}
diff --git a/src/utils/auth.ts b/src/utils/auth.ts
index 2b6aee0..94eb52f 100644
--- a/src/utils/auth.ts
+++ b/src/utils/auth.ts
@@ -1,19 +1,15 @@
-const TOKEN_KEY = 'token'
+import SafeStorage, { AppStorageKey } from "@/utils/safeStorage";
-const isLogin = () => {
- return !!localStorage.getItem(TOKEN_KEY)
-}
+const isLogin = () => !!SafeStorage.get(AppStorageKey.TOKEN)
-const getToken = () => {
- return localStorage.getItem(TOKEN_KEY)
-}
+const getToken = () => SafeStorage.get(AppStorageKey.TOKEN)
const setToken = (token: string) => {
- localStorage.setItem(TOKEN_KEY, token)
+ SafeStorage.set(AppStorageKey.TOKEN, token)
}
const clearToken = () => {
- localStorage.removeItem(TOKEN_KEY)
+ SafeStorage.remove(AppStorageKey.TOKEN)
}
export { clearToken, getToken, isLogin, setToken }
diff --git a/src/utils/safeStorage.ts b/src/utils/safeStorage.ts
new file mode 100644
index 0000000..54843f1
--- /dev/null
+++ b/src/utils/safeStorage.ts
@@ -0,0 +1,158 @@
+/**
+ * 类型安全的 localStorage 封装,具备严格的 key 管理
+ */
+
+// 1. 定义应用程序使用的存储键名(防止使用任意字符串作为 key)
+export enum AppStorageKey {
+ PASSPORT_DATA = 'passportData',
+ PASSPORT_TOKEN = 'passportToken',
+ MENU_DATA = 'menuData', // 全部的菜单数据
+ SLIDER_MENU = 'sliderMenu', // 侧边栏菜单数据
+ USER_INFO = 'userInfo',
+ TOKEN = 'token',
+ MODE = 'mode', // 日间夜间模式
+ }
+
+ // 2. 存储值类型定义(用于内部处理)
+ type StorageValue = {
+ __data: T; // 实际存储的数据
+ __expiry?: number; // 可选的过期时间戳
+ };
+
+ // 3. 主存储类
+ class SafeStorage {
+ /**
+ * 存储数据(自动处理 JSON 序列化)
+ * @param key 预定义的存储键
+ * @param value 要存储的值(支持所有 JSON 安全类型)
+ * @param ttl 可选的时间有效期(毫秒)
+ */
+ static set(key: AppStorageKey, value: T, ttl?: number): void {
+ if (typeof window === "undefined") return;
+
+ try {
+ // 创建存储对象(包含数据值和过期时间)
+ const storageValue: StorageValue = {
+ __data: value,
+ };
+
+ // 设置过期时间(如果提供)
+ if (ttl !== undefined && ttl > 0) {
+ storageValue.__expiry = Date.now() + ttl;
+ }
+
+ // 自动序列化并存储
+ localStorage.setItem(key, JSON.stringify(storageValue));
+ } catch (error) {
+ console.error(`[存储] 保存失败 (key: ${key})`, error);
+ this.handleStorageError(key, error);
+ }
+ }
+
+ /**
+ * 获取数据(自动反序列化并检查过期)
+ * @param key 预定义的存储键
+ * @returns 存储的值或 null(如果不存在或过期)
+ */
+ static get(key: AppStorageKey): T | null {
+ if (typeof window === "undefined") return null;
+
+ try {
+ // 获取原始数据
+ const rawData = localStorage.getItem(key);
+ if (!rawData) return null;
+
+ // 解析为内部存储结构
+ const storageValue = JSON.parse(rawData) as StorageValue;
+
+ // 检查是否过期
+ if (this.isExpired(storageValue)) {
+ this.remove(key);
+ return null;
+ }
+
+ // 返回实际数据
+ return storageValue.__data;
+ } catch (error) {
+ console.error(`[存储] 解析失败 (key: ${key})`, error);
+ this.remove(key); // 移除无效数据
+ return null;
+ }
+ }
+
+ /**
+ * 删除指定存储项
+ * @param key 要删除的存储键
+ */
+ static remove(key: AppStorageKey): void {
+ if (typeof window === "undefined") return;
+ localStorage.removeItem(key);
+ }
+
+ /**
+ * 清除应用相关的所有存储
+ */
+ static clearAppStorage(): void {
+ if (typeof window === "undefined") return;
+
+ // 遍历所有预定义的 key 进行删除
+ Object.values(AppStorageKey).forEach(key => {
+ localStorage.removeItem(key);
+ });
+ }
+
+ // ----------------------------- 私有辅助方法 -----------------------------
+
+ /**
+ * 检查存储值是否过期
+ */
+ private static isExpired(value: StorageValue): boolean {
+ return value.__expiry !== undefined && Date.now() > value.__expiry;
+ }
+
+ /**
+ * 处理存储错误(配额不足等)
+ */
+ private static handleStorageError(key: AppStorageKey, error: unknown): void {
+ // 处理存储空间不足错误
+ if (error instanceof DOMException && error.name === 'QuotaExceededError') {
+ console.warn('存储空间不足,尝试清理过期数据');
+ this.clearExpiredItems();
+
+ // 尝试重新存储(最多尝试一次)
+ try {
+ const raw = localStorage.getItem(key);
+ if (raw) {
+ const value = JSON.parse(raw) as StorageValue;
+ if (!this.isExpired(value)) {
+ localStorage.setItem(key, raw);
+ return;
+ }
+ }
+ } catch (retryError) {
+ console.error('重试存储失败', retryError);
+ }
+ }
+ }
+
+ /**
+ * 清理所有过期的存储项
+ */
+ private static clearExpiredItems(): void {
+ Object.values(AppStorageKey).forEach(key => {
+ try {
+ const raw = localStorage.getItem(key);
+ if (raw) {
+ const value = JSON.parse(raw) as StorageValue;
+ if (this.isExpired(value)) {
+ localStorage.removeItem(key);
+ }
+ }
+ } catch (e) {
+ // 忽略无效数据
+ }
+ });
+ }
+ }
+
+ export default SafeStorage;
\ No newline at end of file
diff --git a/src/utils/tree.ts b/src/utils/tree.ts
new file mode 100644
index 0000000..5733be8
--- /dev/null
+++ b/src/utils/tree.ts
@@ -0,0 +1,223 @@
+/**
+ * 树结构相关工具函数
+ */
+
+/**
+ * 树节点基础接口
+ */
+export interface TreeNodeBase {
+ id?: number | string
+ parent_id?: number | string | null
+ children?: TreeNodeBase[]
+ [key: string]: any
+}
+
+/**
+ * 构建树结构的选项
+ */
+export interface BuildTreeOptions {
+ /** ID 字段名,默认 'id' */
+ idKey?: keyof T
+ /** 父ID 字段名,默认 'parent_id' */
+ parentKey?: keyof T
+ /** 子节点字段名,默认 'children' */
+ childrenKey?: string
+ /** 排序字段名,可选 */
+ orderKey?: keyof T
+}
+
+/**
+ * 构建树结构的结果
+ */
+export interface BuildTreeResult {
+ /** 根节点列表 */
+ rootItems: T[]
+ /** 节点映射表 (id -> node) */
+ itemMap: Map
+}
+
+/**
+ * 将扁平数组构建为树状结构
+ * @param items 扁平数组
+ * @param options 构建选项
+ * @returns 包含根节点列表和节点映射的对象
+ */
+export function buildTree(
+ items: T[],
+ options: BuildTreeOptions = {}
+): BuildTreeResult {
+ const {
+ idKey = 'id' as keyof T,
+ parentKey = 'parent_id' as keyof T,
+ childrenKey = 'children',
+ orderKey,
+ } = options
+
+ const itemMap = new Map()
+ const rootItems: T[] = []
+
+ // 创建节点映射
+ items.forEach((item) => {
+ const id = item[idKey]
+ if (id !== undefined && id !== null) {
+ // 创建带有空 children 数组的节点副本
+ itemMap.set(id as number | string, {
+ ...item,
+ [childrenKey]: []
+ } as T)
+ }
+ })
+
+ // 构建树结构
+ itemMap.forEach((item) => {
+ const parentId = item[parentKey]
+ if (parentId && itemMap.has(parentId as number | string)) {
+ const parent = itemMap.get(parentId as number | string)!
+ const parentChildren = parent[childrenKey] as T[]
+ parentChildren.push(item)
+ } else {
+ rootItems.push(item)
+ }
+ })
+
+ // 排序函数
+ if (orderKey) {
+ const sortByOrder = (a: T, b: T) => {
+ const orderA = (a[orderKey] as number) || 0
+ const orderB = (b[orderKey] as number) || 0
+ return orderA - orderB
+ }
+
+ rootItems.sort(sortByOrder)
+ itemMap.forEach((item) => {
+ const children = item[childrenKey] as T[]
+ if (children && children.length > 0) {
+ children.sort(sortByOrder)
+ }
+ })
+ }
+
+ return { rootItems, itemMap }
+}
+
+/**
+ * 递归遍历树节点
+ * @param nodes 节点列表
+ * @param callback 回调函数
+ * @param childrenKey 子节点字段名
+ */
+export function traverseTree(
+ nodes: T[],
+ callback: (node: T, depth: number, parent: T | null) => void | boolean,
+ childrenKey: string = 'children',
+ depth: number = 0,
+ parent: T | null = null
+): void {
+ for (const node of nodes) {
+ const result = callback(node, depth, parent)
+ // 如果回调返回 false,停止遍历
+ if (result === false) return
+
+ const children = node[childrenKey] as T[]
+ if (children && children.length > 0) {
+ traverseTree(children, callback, childrenKey, depth + 1, node)
+ }
+ }
+}
+
+/**
+ * 在树中查找节点
+ * @param nodes 节点列表
+ * @param predicate 判断条件
+ * @param childrenKey 子节点字段名
+ * @returns 找到的节点或 null
+ */
+export function findInTree(
+ nodes: T[],
+ predicate: (node: T) => boolean,
+ childrenKey: string = 'children'
+): T | null {
+ for (const node of nodes) {
+ if (predicate(node)) {
+ return node
+ }
+ const children = node[childrenKey] as T[]
+ if (children && children.length > 0) {
+ const found = findInTree(children, predicate, childrenKey)
+ if (found) return found
+ }
+ }
+ return null
+}
+
+/**
+ * 获取节点的所有父节点路径
+ * @param nodeId 目标节点ID
+ * @param itemMap 节点映射表
+ * @param parentKey 父ID字段名
+ * @returns 从根到目标节点的路径(不包含目标节点本身)
+ */
+export function getAncestors(
+ nodeId: number | string,
+ itemMap: Map,
+ parentKey: keyof T = 'parent_id' as keyof T
+): T[] {
+ const ancestors: T[] = []
+ let current = itemMap.get(nodeId)
+
+ while (current) {
+ const parentId = current[parentKey]
+ if (parentId && itemMap.has(parentId as number | string)) {
+ const parent = itemMap.get(parentId as number | string)!
+ ancestors.unshift(parent)
+ current = parent
+ } else {
+ break
+ }
+ }
+
+ return ancestors
+}
+
+/**
+ * 获取节点的所有子孙节点
+ * @param node 目标节点
+ * @param childrenKey 子节点字段名
+ * @returns 所有子孙节点(扁平数组)
+ */
+export function getDescendants(
+ node: T,
+ childrenKey: string = 'children'
+): T[] {
+ const descendants: T[] = []
+ const children = node[childrenKey] as T[]
+
+ if (children && children.length > 0) {
+ for (const child of children) {
+ descendants.push(child)
+ descendants.push(...getDescendants(child, childrenKey))
+ }
+ }
+
+ return descendants
+}
+
+/**
+ * 将树结构扁平化为数组
+ * @param nodes 节点列表
+ * @param childrenKey 子节点字段名
+ * @returns 扁平化后的数组(移除 children 属性)
+ */
+export function flattenTree(
+ nodes: T[],
+ childrenKey: string = 'children'
+): Omit[] {
+ const result: Omit[] = []
+
+ traverseTree(nodes, (node) => {
+ const { [childrenKey]: _, ...rest } = node
+ result.push(rest as Omit)
+ }, childrenKey)
+
+ return result
+}
diff --git a/src/views/list/card/components/card-wrap.vue b/src/views/list/card/components/card-wrap.vue
deleted file mode 100644
index 9140606..0000000
--- a/src/views/list/card/components/card-wrap.vue
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ title }}
-
-
-
-
-
-
- {{ tagText }}
-
-
-
-
-
- {{ expiresTagText }}
-
-
-
-
- {{ description }}
-
-
-
-
-
-
-
-
-
- {{ expiresText }}
-
-
-
-
- {{ closeTxt }}
-
-
- {{ openTxt }}
-
-
-
-
-
-
- {{ closeTxt }}
-
-
- {{ openTxt }}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/list/card/components/quality-inspection.vue b/src/views/list/card/components/quality-inspection.vue
deleted file mode 100644
index 7e53650..0000000
--- a/src/views/list/card/components/quality-inspection.vue
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
- {{ $t('cardList.tab.title.content') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/list/card/components/rules-preset.vue b/src/views/list/card/components/rules-preset.vue
deleted file mode 100644
index 7300700..0000000
--- a/src/views/list/card/components/rules-preset.vue
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
- {{ $t('cardList.tab.title.preset') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/list/card/components/the-service.vue b/src/views/list/card/components/the-service.vue
deleted file mode 100644
index 96c194c..0000000
--- a/src/views/list/card/components/the-service.vue
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
- {{ $t('cardList.tab.title.service') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/list/card/index.vue b/src/views/list/card/index.vue
deleted file mode 100644
index 47e4421..0000000
--- a/src/views/list/card/index.vue
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/list/card/locale/en-US.ts b/src/views/list/card/locale/en-US.ts
deleted file mode 100644
index dfaa2f8..0000000
--- a/src/views/list/card/locale/en-US.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-export default {
- 'menu.list.cardList': 'Card List',
- 'cardList.tab.title.all': 'All',
- 'cardList.tab.title.content': 'Quality Inspection',
- 'cardList.tab.title.service': 'The service',
- 'cardList.tab.title.preset': 'Rules Preset',
- 'cardList.searchInput.placeholder': 'Search',
- 'cardList.enable': 'Enable',
- 'cardList.disable': 'Disable',
- 'cardList.content.delete': 'Delete',
- 'cardList.content.inspection': 'Inspection',
- 'cardList.content.action': 'Click Create Qc Content queue',
- 'cardList.service.open': 'Open',
- 'cardList.service.cancel': 'Cancel',
- 'cardList.service.renew': 'Contract of service',
- 'cardList.service.tag': 'Opened',
- 'cardList.service.expiresTag': 'Expired',
- 'cardList.preset.tag': 'Enable',
-}
diff --git a/src/views/list/card/locale/zh-CN.ts b/src/views/list/card/locale/zh-CN.ts
deleted file mode 100644
index 8a71558..0000000
--- a/src/views/list/card/locale/zh-CN.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-export default {
- 'menu.list.cardList': '卡片列表',
- 'cardList.tab.title.all': '全部',
- 'cardList.tab.title.content': '内容质检',
- 'cardList.tab.title.service': '开通服务',
- 'cardList.tab.title.preset': '规则预置',
- 'cardList.searchInput.placeholder': '搜索',
- // 'cardList.statistic.enable': '已启用',
- // 'cardList.statistic.disable': '未启用',
- 'cardList.content.delete': '删除',
- 'cardList.content.inspection': '质检',
- 'cardList.content.action': '点击创建质检内容队列',
- 'cardList.service.open': '开通服务',
- 'cardList.service.cancel': '取消服务',
- 'cardList.service.renew': '续约服务',
- 'cardList.service.tag': '已开通',
- 'cardList.service.expiresTag': '已过期',
- 'cardList.preset.tag': '已启用',
-}
diff --git a/src/views/list/card/mock.ts b/src/views/list/card/mock.ts
deleted file mode 100644
index e4c1065..0000000
--- a/src/views/list/card/mock.ts
+++ /dev/null
@@ -1,179 +0,0 @@
-import Mock from 'mockjs'
-import setupMock, { successResponseWrap } from '@/utils/setup-mock'
-import { ServiceRecord } from '@/api/list'
-
-const qualityInspectionList: ServiceRecord[] = [
- {
- id: 1,
- name: 'quality',
- title: '视频类-历史导入',
- description: '2021-10-12 00:00:00',
- data: [
- {
- label: '待质检数',
- value: '120',
- },
- {
- label: '积压时长',
- value: '60s',
- },
- {
- label: '待抽检数',
- value: '0',
- },
- ],
- },
- {
- id: 2,
- name: 'quality',
- title: '图文类-图片版权',
- description: '2021-12-11 18:30:00',
- data: [
- {
- label: '待质检数',
- value: '120',
- },
- {
- label: '积压时长',
- value: '60s',
- },
- {
- label: '待抽检数',
- value: '0',
- },
- ],
- },
- {
- id: 3,
- name: 'quality',
- title: '图文类-高清图片',
- description: '2021-10-15 08:10:00',
- data: [
- {
- label: '待质检数',
- value: '120',
- },
- {
- label: '积压时长',
- value: '60s',
- },
- {
- label: '待抽检数',
- value: '0',
- },
- ],
- },
-]
-const theServiceList: ServiceRecord[] = [
- {
- id: 1,
- icon: 'code',
- title: '漏斗分析',
- description: '用户行为分析之漏斗分析模型是企业实现精细化运营、进行用户行为分析的重要数据分析模型。',
- enable: true,
- actionType: 'button',
- },
- {
- id: 2,
- icon: 'edit',
- title: '用户分布',
- description: '快速诊断用户人群,地域细分情况,了解数据分布的集中度,以及主要的数据分布的区间段是什么。',
- enable: true,
- actionType: 'button',
- expires: true,
- },
- {
- id: 3,
- icon: 'user',
- title: '资源分发',
- description: '移动端动态化资源分发解决方案。提供稳定大流量服务支持、灵活定制的分发圈选规则,通过离线化预加载。',
- enable: false,
- actionType: 'button',
- },
- {
- id: 4,
- icon: 'user',
- title: '用户画像分析',
- description: '用户画像就是将典型用户信息标签化,根据用户特征、业务场景和用户行为等信息,构建一个标签化的用户模型。',
- enable: true,
- actionType: 'button',
- },
-]
-const rulesPresetList: ServiceRecord[] = [
- {
- id: 1,
- title: '内容屏蔽规则',
- description: '用户在执行特定的内容分发任务时,可使用内容屏蔽规则根据特定标签,过滤内容集合。',
- enable: true,
- actionType: 'switch',
- },
- {
- id: 2,
- title: '内容置顶规则',
- description: '该规则支持用户在执行特定内容分发任务时,对固定的几条内容置顶。',
- enable: true,
- actionType: 'switch',
- },
- {
- id: 3,
- title: '内容加权规则',
- description: '选定内容加权规则后可自定义从不同内容集合获取内容的概率。',
- enable: false,
- actionType: 'switch',
- },
- {
- id: 4,
- title: '内容分发规则',
- description: '内容分发时,对某些内容需要固定在C端展示的位置。',
- enable: true,
- actionType: 'switch',
- },
- {
- id: 5,
- title: '违禁内容识别',
- description: '精准识别赌博、刀枪、毒品、造假、贩假等违规物品和违规行为。',
- enable: false,
- actionType: 'switch',
- },
- {
- id: 6,
- title: '多语言文字符号识别',
- description: '精准识别英语、维语、藏语、蒙古语、朝鲜语等多种语言以及emoji表情形态的语义识别。',
- enable: false,
- actionType: 'switch',
- },
-]
-
-setupMock({
- setup() {
- // Quality Inspection
- Mock.mock(new RegExp('/api/list/quality-inspection'), () => {
- return successResponseWrap(
- qualityInspectionList.map((_, index) => ({
- ...qualityInspectionList[index % qualityInspectionList.length],
- id: Mock.Random.guid(),
- }))
- )
- })
-
- // the service
- Mock.mock(new RegExp('/api/list/the-service'), () => {
- return successResponseWrap(
- theServiceList.map((_, index) => ({
- ...theServiceList[index % theServiceList.length],
- id: Mock.Random.guid(),
- }))
- )
- })
-
- // rules preset
- Mock.mock(new RegExp('/api/list/rules-preset'), () => {
- return successResponseWrap(
- rulesPresetList.map((_, index) => ({
- ...rulesPresetList[index % rulesPresetList.length],
- id: Mock.Random.guid(),
- }))
- )
- })
- },
-})
diff --git a/src/views/list/search-table/demo.vue b/src/views/list/search-table/demo.vue
new file mode 100644
index 0000000..5f40418
--- /dev/null
+++ b/src/views/list/search-table/demo.vue
@@ -0,0 +1,326 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 新增
+
+
+
+
+
+ 批量删除
+
+
+
+
+
+ {{ rowIndex + 1 + (pagination.current - 1) * pagination.pageSize }}
+
+
+
+
+
+ {{ record.status === 'active' ? '启用' : '禁用' }}
+
+
+
+
+
+
+ {{ record.name.charAt(0) }}
+
+
+
+
+
+
+
+ 查看
+
+
+ 编辑
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/list/search-table/index.vue b/src/views/list/search-table/index.vue
index adcb5fa..40ad6d2 100644
--- a/src/views/list/search-table/index.vue
+++ b/src/views/list/search-table/index.vue
@@ -1,198 +1,95 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('searchTable.form.search') }}
+
+
+
+
+
+
+
+ {{ $t('searchTable.operation.create') }}
+
+
+
+
+ {{ $t('searchTable.operation.import') }}
-
-
-
-
- {{ $t('searchTable.form.reset') }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('searchTable.operation.create') }}
-
-
-
-
- {{ $t('searchTable.operation.import') }}
-
-
-
-
-
-
-
-
-
-
- {{ $t('searchTable.operation.download') }}
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.title === '#' ? '序列号' : item.title }}
-
-
-
-
-
-
-
-
-
-
- {{ rowIndex + 1 + (pagination.current - 1) * pagination.pageSize }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t(`searchTable.form.contentType.${record.contentType}`) }}
-
-
-
- {{ $t(`searchTable.form.filterType.${record.filterType}`) }}
-
-
-
-
- {{ $t(`searchTable.form.status.${record.status}`) }}
-
-
-
- {{ $t('searchTable.columns.operations.view') }}
-
-
-
-
+
+
+
+
+
+
+ {{ rowIndex + 1 + (pagination.current - 1) * pagination.pageSize }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t(`searchTable.form.contentType.${record.contentType}`) }}
+
+
+
+ {{ $t(`searchTable.form.filterType.${record.filterType}`) }}
+
+
+
+
+ {{ $t(`searchTable.form.status.${record.status}`) }}
+
+
+
+ {{ $t('searchTable.columns.operations.view') }}
+
+
+
+
+
+
+
diff --git a/src/views/ops/pages/system-settings/menu-management/components/MenuTree.vue b/src/views/ops/pages/system-settings/menu-management/components/MenuTree.vue
new file mode 100644
index 0000000..f63ffb3
--- /dev/null
+++ b/src/views/ops/pages/system-settings/menu-management/components/MenuTree.vue
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ops/pages/system-settings/menu-management/components/MenuTreeItem.vue b/src/views/ops/pages/system-settings/menu-management/components/MenuTreeItem.vue
new file mode 100644
index 0000000..b4d82d0
--- /dev/null
+++ b/src/views/ops/pages/system-settings/menu-management/components/MenuTreeItem.vue
@@ -0,0 +1,274 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ops/pages/system-settings/menu-management/index.vue b/src/views/ops/pages/system-settings/menu-management/index.vue
new file mode 100644
index 0000000..f1531f9
--- /dev/null
+++ b/src/views/ops/pages/system-settings/menu-management/index.vue
@@ -0,0 +1,463 @@
+
+
+
+
+
+
+
+ 确定要删除菜单 "{{ nodeToDelete?.title }}" 吗?
+
+ 注意:该菜单下有子菜单,删除后子菜单也会被删除!
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ops/pages/system-settings/menu-management/menuIcons.ts b/src/views/ops/pages/system-settings/menu-management/menuIcons.ts
new file mode 100644
index 0000000..694ee73
--- /dev/null
+++ b/src/views/ops/pages/system-settings/menu-management/menuIcons.ts
@@ -0,0 +1,296 @@
+// 菜单图标集合 - 使用 @tabler/icons-vue
+import type { Component } from 'vue';
+import {
+ IconDashboard, IconHome, IconSettings, IconUser, IconUsers, IconUserCircle,
+ IconBuilding, IconFileText, IconCoin, IconChartBar, IconChartPie, IconList,
+ IconShield, IconWorld, IconLanguage, IconHelp, IconInfoCircle, IconFolder,
+ IconDatabase, IconMenu, IconCircle, IconSearch, IconFolderOff,
+ IconAlertTriangle,
+ // Business & Finance
+ Icon2fa, IconAbacus, IconAccessPoint, IconActivity, IconAd, IconAdjustments,
+ IconAlarm, IconAlertOctagon, IconAnalyze, IconAward, IconBarcode, IconBuildingBank,
+ IconCalculator, IconCalendar, IconCash, IconChartInfographic, IconCreditCard,
+ // Communication & Social
+ IconMail, IconMessage, IconMessages, IconPhone, IconShare, IconSocial,
+ IconBrandFacebook, IconBrandTwitter, IconBrandLinkedin, IconBrandInstagram,
+ IconBrandWhatsapp, IconBrandTelegram, IconBrandSkype, IconBrandZoom,
+ // Development & Technology
+ IconCode, IconBraces, IconBug, IconDeviceDesktop,
+ IconDeviceLaptop, IconDeviceMobile, IconDeviceTablet, IconGitBranch, IconTerminal,
+ IconServer, IconWifi, IconBrandGithub, IconBrandVscode, IconBrandDocker,
+ IconCloud,
+ // Documents & Files
+ IconFile, IconFiles, IconFileZip, IconFile3d,
+ IconFileDownload, IconFileUpload, IconFolderPlus, IconBook,
+ IconBooks, IconBookmark, IconClipboard, IconNotes, IconPrinter,
+ // Interface Elements
+ IconCheckbox, IconForms, IconLayout,
+ IconMenu2, IconRadio, IconSelect, IconSwitch, IconTable,
+ IconToggleLeft, IconToggleRight, IconWindowMaximize,
+ // Media & Entertainment
+ IconCamera, IconPhoto, IconVideo, IconMusic, IconPlayerPlay, IconPlayerPause,
+ IconPlayerStop, IconMovie, IconMicrophone, IconVolume, IconHeadphones,
+ IconBrush, IconPalette, IconPencil, IconPaint, IconColorPicker,
+ // Navigation & Maps
+ IconMap, IconMapPin, IconCompass, IconDirection, IconGps, IconLocation,
+ IconNavigation, IconRoute, IconRoad, IconTrain, IconPlane, IconCar,
+ IconBike, IconWalk, IconRun, IconSwimming,
+ // Shopping & E-commerce
+ IconShoppingCart, IconShoppingBag, IconBasket, IconGift, IconDiscount,
+ IconTag, IconTags, IconReceipt, IconTruck, IconPackage, IconBox,
+ // Weather & Nature
+ IconSun, IconMoon, IconCloudRain, IconCloudSnow, IconWind,
+ IconTemperature, IconUmbrella, IconPlant, IconTree, IconLeaf, IconFlower,
+ // Additional UI Elements
+ IconEdit, IconCopy, IconArrowBack, IconArrowForward, IconRefresh, IconRotate,
+ IconZoomIn, IconZoomOut, IconFilter, IconSortAscending,
+ IconSortDescending, IconColumns, IconLayoutGrid,
+ // Security & Access
+ IconLock, IconKey, IconPassword, IconFingerprint, IconShieldLock,
+ IconCertificate, IconId, IconBadge,
+ // Time & Date
+ IconClock, IconCalendarEvent, IconCalendarTime, IconCalendarStats,
+ IconHourglass, IconHistory, IconTimeline, IconAlarmPlus,
+ // Health & Medical
+ IconHeartbeat, IconStethoscope, IconPill, IconVirus, IconVaccine,
+ IconEmergencyBed, IconAmbulance, IconMedicalCross, IconDna,
+ // Analytics & Data
+ IconChartArea, IconChartArrows, IconChartCandle,
+ IconChartLine, IconPresentationAnalytics,
+ IconReportAnalytics, IconTrendingUp, IconTrendingDown,
+ IconSend, IconUpload, IconPlug, IconNotebook, IconTools, IconPoint,
+} from '@tabler/icons-vue';
+
+// 预选图标列表
+export const COMMON_ICONS: Record = {
+ // 常用图标
+ Dashboard: IconDashboard,
+ Home: IconHome,
+ Settings: IconSettings,
+ AccountCircle: IconUserCircle,
+ People: IconUsers,
+ Person: IconUser,
+ Groups: IconUsers,
+ Store: IconBuilding,
+ Description: IconFileText,
+ AttachMoney: IconCoin,
+ BarChart: IconChartBar,
+ Insights: IconChartPie,
+ Security: IconShield,
+ Public: IconWorld,
+ Language: IconLanguage,
+ Help: IconHelp,
+ Folder: IconFolder,
+ Storage: IconDatabase,
+ Menu: IconMenu,
+ Link: IconCircle,
+ Search: IconSearch,
+ List: IconList,
+ Building: IconBuilding,
+ World: IconWorld,
+ Coin: IconCoin,
+ Users: IconUsers,
+ // Business & Finance
+ TwoFactor: Icon2fa,
+ Abacus: IconAbacus,
+ AccessPoint: IconAccessPoint,
+ Activity: IconActivity,
+ Advertisement: IconAd,
+ Adjustments: IconAdjustments,
+ Alarm: IconAlarm,
+ AlertOctagon: IconAlertOctagon,
+ Analyze: IconAnalyze,
+ Award: IconAward,
+ Barcode: IconBarcode,
+ Bank: IconBuildingBank,
+ Calculator: IconCalculator,
+ Calendar: IconCalendar,
+ Cash: IconCash,
+ CreditCard: IconCreditCard,
+ // Communication & Social
+ Mail: IconMail,
+ Message: IconMessage,
+ Messages: IconMessages,
+ Phone: IconPhone,
+ Share: IconShare,
+ Social: IconSocial,
+ Facebook: IconBrandFacebook,
+ Twitter: IconBrandTwitter,
+ LinkedIn: IconBrandLinkedin,
+ Instagram: IconBrandInstagram,
+ WhatsApp: IconBrandWhatsapp,
+ Telegram: IconBrandTelegram,
+ Skype: IconBrandSkype,
+ Zoom: IconBrandZoom,
+ // Development & Technology
+ Code: IconCode,
+ Braces: IconBraces,
+ Bug: IconBug,
+ Cloud: IconCloud,
+ Desktop: IconDeviceDesktop,
+ Laptop: IconDeviceLaptop,
+ Mobile: IconDeviceMobile,
+ Tablet: IconDeviceTablet,
+ Git: IconGitBranch,
+ Terminal: IconTerminal,
+ Server: IconServer,
+ Wifi: IconWifi,
+ Github: IconBrandGithub,
+ VSCode: IconBrandVscode,
+ Docker: IconBrandDocker,
+ // Documents & Files
+ File: IconFile,
+ Files: IconFiles,
+ FileZip: IconFileZip,
+ FilePdf: IconFile3d,
+ FileDownload: IconFileDownload,
+ FileUpload: IconFileUpload,
+ FolderPlus: IconFolderPlus,
+ Book: IconBook,
+ Books: IconBooks,
+ Bookmark: IconBookmark,
+ Clipboard: IconClipboard,
+ Notes: IconNotes,
+ Printer: IconPrinter,
+ // Interface Elements
+ Checkbox: IconCheckbox,
+ Forms: IconForms,
+ Layout: IconLayout,
+ Menu2: IconMenu2,
+ Radio: IconRadio,
+ Select: IconSelect,
+ Switch: IconSwitch,
+ Table: IconTable,
+ ToggleLeft: IconToggleLeft,
+ ToggleRight: IconToggleRight,
+ WindowMaximize: IconWindowMaximize,
+ // Media & Entertainment
+ Camera: IconCamera,
+ Photo: IconPhoto,
+ Video: IconVideo,
+ Music: IconMusic,
+ Play: IconPlayerPlay,
+ Pause: IconPlayerPause,
+ Stop: IconPlayerStop,
+ Movie: IconMovie,
+ Microphone: IconMicrophone,
+ Volume: IconVolume,
+ Headphones: IconHeadphones,
+ Brush: IconBrush,
+ Palette: IconPalette,
+ Pencil: IconPencil,
+ Paint: IconPaint,
+ ColorPicker: IconColorPicker,
+ // Navigation & Maps
+ Map: IconMap,
+ MapPin: IconMapPin,
+ Compass: IconCompass,
+ Direction: IconDirection,
+ GPS: IconGps,
+ Location: IconLocation,
+ Navigation: IconNavigation,
+ Route: IconRoute,
+ Road: IconRoad,
+ Train: IconTrain,
+ Plane: IconPlane,
+ Car: IconCar,
+ Bike: IconBike,
+ Walk: IconWalk,
+ Run: IconRun,
+ Swimming: IconSwimming,
+ // Shopping & E-commerce
+ ShoppingCart: IconShoppingCart,
+ ShoppingBag: IconShoppingBag,
+ Basket: IconBasket,
+ Gift: IconGift,
+ Discount: IconDiscount,
+ Tag: IconTag,
+ Tags: IconTags,
+ Receipt: IconReceipt,
+ Truck: IconTruck,
+ Package: IconPackage,
+ Box: IconBox,
+ // Weather & Nature
+ Sun: IconSun,
+ Moon: IconMoon,
+ CloudRain: IconCloudRain,
+ CloudSnow: IconCloudSnow,
+ Wind: IconWind,
+ Temperature: IconTemperature,
+ Umbrella: IconUmbrella,
+ Plant: IconPlant,
+ Tree: IconTree,
+ Leaf: IconLeaf,
+ Flower: IconFlower,
+ // Additional UI Elements
+ Edit: IconEdit,
+ Copy: IconCopy,
+ Undo: IconArrowBack,
+ Redo: IconArrowForward,
+ Refresh: IconRefresh,
+ Rotate: IconRotate,
+ ZoomIn: IconZoomIn,
+ ZoomOut: IconZoomOut,
+ Filter: IconFilter,
+ Sort: IconSortAscending,
+ SortAscending: IconSortAscending,
+ SortDescending: IconSortDescending,
+ Columns: IconColumns,
+ Grid: IconLayoutGrid,
+ // Security & Access
+ Lock: IconLock,
+ Key: IconKey,
+ Password: IconPassword,
+ Fingerprint: IconFingerprint,
+ ShieldLock: IconShieldLock,
+ Certificate: IconCertificate,
+ ID: IconId,
+ Badge: IconBadge,
+ // Time & Date
+ Clock: IconClock,
+ CalendarEvent: IconCalendarEvent,
+ CalendarTime: IconCalendarTime,
+ CalendarStats: IconCalendarStats,
+ Hourglass: IconHourglass,
+ History: IconHistory,
+ Timeline: IconTimeline,
+ AlarmPlus: IconAlarmPlus,
+ // Health & Medical
+ Heartbeat: IconHeartbeat,
+ Stethoscope: IconStethoscope,
+ Pill: IconPill,
+ Virus: IconVirus,
+ Vaccine: IconVaccine,
+ EmergencyBed: IconEmergencyBed,
+ Ambulance: IconAmbulance,
+ MedicalCross: IconMedicalCross,
+ DNA: IconDna,
+ // Analytics & Data
+ ChartArea: IconChartArea,
+ ChartArrows: IconChartArrows,
+ ChartCandle: IconChartCandle,
+ ChartInfographic: IconChartInfographic,
+ ChartLine: IconChartLine,
+ PresentationAnalytics: IconPresentationAnalytics,
+ ReportAnalytics: IconReportAnalytics,
+ TrendingUp: IconTrendingUp,
+ TrendingDown: IconTrendingDown,
+ Send: IconSend,
+ InfoCircle: IconInfoCircle,
+ Upload: IconUpload,
+ Plug: IconPlug,
+ Notebook: IconNotebook,
+ Tools: IconTools,
+ Point: IconPoint,
+};
+
+// 导出图标名称列表
+export const iconNames = Object.keys(COMMON_ICONS);
+
+// 导出类型
+export type IconName = keyof typeof COMMON_ICONS;
+
+// 获取图标组件
+export const getIconComponent = (iconName: string) => {
+ return COMMON_ICONS[iconName];
+};
diff --git a/src/views/ops/pages/system-settings/menu-management/types.ts b/src/views/ops/pages/system-settings/menu-management/types.ts
new file mode 100644
index 0000000..6d32bb2
--- /dev/null
+++ b/src/views/ops/pages/system-settings/menu-management/types.ts
@@ -0,0 +1,14 @@
+// 从API导入类型
+import type { MenuItem as MenuItemType } from '@/api/module/pmn'
+
+// 菜单路由请求接口
+export interface MenuRouteRequest extends MenuItemType {}
+
+// 菜单节点类型
+export interface MenuNode extends MenuRouteRequest {
+ id: number
+ children: MenuNode[]
+}
+
+// 图标名称类型
+export type IconName = string
diff --git a/src/views/ops/pages/system-settings/system-logs/index.vue b/src/views/ops/pages/system-settings/system-logs/index.vue
new file mode 100644
index 0000000..a77ca18
--- /dev/null
+++ b/src/views/ops/pages/system-settings/system-logs/index.vue
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+ {{ record.level }}
+
+
+
+
+ {{ rowIndex + 1 + (pagination.current - 1) * pagination.pageSize }}
+
+
+
+
+
+ 查看
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/user/info/components/latest-activity.vue b/src/views/user/info/components/latest-activity.vue
deleted file mode 100644
index 3456dd0..0000000
--- a/src/views/user/info/components/latest-activity.vue
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
- {{ $t('userInfo.viewAll') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/user/info/components/latest-notification.vue b/src/views/user/info/components/latest-notification.vue
deleted file mode 100644
index efa2593..0000000
--- a/src/views/user/info/components/latest-notification.vue
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
- {{ $t('userInfo.nodata') }}
-
-
-
-
-
-
-
-
diff --git a/src/views/user/info/components/my-project.vue b/src/views/user/info/components/my-project.vue
deleted file mode 100644
index fa308d7..0000000
--- a/src/views/user/info/components/my-project.vue
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
- {{ $t('userInfo.showMore') }}
-
-
-
-
-
-
-
-
- {{ project.name }}
-
- {{ project.description }}
-
-
-
- {{ project.contributors }}
-
-
-
-
- 等{{ project.peopleNumber }}人
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/user/info/components/my-team.vue b/src/views/user/info/components/my-team.vue
deleted file mode 100644
index 4679f59..0000000
--- a/src/views/user/info/components/my-team.vue
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 共{{ team.peopleNumber }}人
-
-
-
-
-
-
-
-
-
diff --git a/src/views/user/info/components/user-info-header.vue b/src/views/user/info/components/user-info-header.vue
deleted file mode 100644
index 022f9e9..0000000
--- a/src/views/user/info/components/user-info-header.vue
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/views/user/info/index.vue b/src/views/user/info/index.vue
deleted file mode 100644
index f7dea77..0000000
--- a/src/views/user/info/index.vue
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/user/info/locale/en-US.ts b/src/views/user/info/locale/en-US.ts
deleted file mode 100644
index c83a83e..0000000
--- a/src/views/user/info/locale/en-US.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-export default {
- 'menu.user.info': 'User Info',
- 'userInfo.editUserInfo': 'Edit Info',
- 'userInfo.tab.title.overview': 'Overview',
- 'userInfo.tab.title.project': 'Project',
- 'userInfo.tab.title.team': 'My Team',
- 'userInfo.title.latestActivity': 'Latest Activity',
- 'userInfo.title.latestNotification': 'In-site Notification',
- 'userInfo.title.myProject': 'My Project',
- 'userInfo.showMore': 'Show More',
- 'userInfo.viewAll': 'View All',
- 'userInfo.nodata': 'No Data',
- 'userInfo.visits.unit': 'times',
- 'userInfo.visits.lastMonth': 'Last Month',
-}
diff --git a/src/views/user/info/locale/zh-CN.ts b/src/views/user/info/locale/zh-CN.ts
deleted file mode 100644
index 69b6b4e..0000000
--- a/src/views/user/info/locale/zh-CN.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-export default {
- 'menu.user.info': '用户信息',
- 'userInfo.editUserInfo': '编辑信息',
- 'userInfo.tab.title.overview': '总览',
- 'userInfo.tab.title.project': '项目',
- 'userInfo.tab.title.team': '我的团队',
- 'userInfo.title.latestActivity': '最新动态',
- 'userInfo.title.latestNotification': '站内通知',
- 'userInfo.title.myProject': '我的项目',
- 'userInfo.showMore': '查看更多',
- 'userInfo.viewAll': '查看全部',
- 'userInfo.nodata': '暂无数据',
- 'userInfo.visits.unit': '人次',
- 'userInfo.visits.lastMonth': '较上月',
-}
diff --git a/src/views/user/info/mock.ts b/src/views/user/info/mock.ts
deleted file mode 100644
index f38e690..0000000
--- a/src/views/user/info/mock.ts
+++ /dev/null
@@ -1,152 +0,0 @@
-import Mock from 'mockjs'
-import setupMock, { successResponseWrap } from '@/utils/setup-mock'
-
-setupMock({
- setup() {
- // 最新项目
- Mock.mock(new RegExp('/api/user/my-project/list'), () => {
- const contributors = [
- {
- name: '秦臻宇',
- email: 'qingzhenyu@arco.design',
- avatar: '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/a8c8cdb109cb051163646151a4a5083b.png~tplv-uwbnlip3yd-webp.webp',
- },
- {
- name: '于涛',
- email: 'yuebao@arco.design',
- avatar: '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/a8c8cdb109cb051163646151a4a5083b.png~tplv-uwbnlip3yd-webp.webp',
- },
- {
- name: '宁波',
- email: 'ningbo@arco.design',
- avatar: '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp',
- },
- {
- name: '郑曦月',
- email: 'zhengxiyue@arco.design',
- avatar: '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/8361eeb82904210b4f55fab888fe8416.png~tplv-uwbnlip3yd-webp.webp',
- },
- {
- name: '宁波',
- email: 'ningbo@arco.design',
- avatar: '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp',
- },
- ]
- const units = [
- {
- name: '企业级产品设计系统',
- description: 'System',
- },
- {
- name: '智能应用',
- description: 'The Volcano Engine',
- },
- {
- name: 'OCR文本识别',
- description: 'OCR text recognition',
- },
- {
- name: '内容资源管理',
- description: 'Content resource management ',
- },
- {
- name: '今日头条内容管理',
- description: 'Toutiao content management',
- },
- {
- name: '智能机器人',
- description: 'Intelligent Robot Project',
- },
- ]
- return successResponseWrap(
- new Array(6).fill(null).map((_item, index) => ({
- id: index,
- name: units[index].name,
- description: units[index].description,
- peopleNumber: Mock.Random.natural(10, 1000),
- contributors,
- }))
- )
- })
-
- // 最新动态
- Mock.mock(new RegExp('/api/user/latest-activity'), () => {
- return successResponseWrap(
- new Array(7).fill(null).map((_item, index) => ({
- id: index,
- title: '发布了项目',
- description: '企业级产品设计系统',
- avatar: '//lf1-xgcdn-tos.pstatp.com/obj/vcloud/vadmin/start.8e0e4855ee346a46ccff8ff3e24db27b.png',
- }))
- )
- })
-
- // 访问量
- Mock.mock(new RegExp('/api/user/visits'), () => {
- return successResponseWrap([
- {
- name: '主页访问量',
- visits: 5670,
- growth: 206.32,
- },
- {
- name: '项目访问量',
- visits: 5670,
- growth: 206.32,
- },
- ])
- })
-
- // 项目和团队列表
- Mock.mock(new RegExp('/api/user/project-and-team/list'), () => {
- return successResponseWrap([
- {
- id: 1,
- content: '他创建的项目',
- },
- {
- id: 2,
- content: '他参与的项目',
- },
- {
- id: 3,
- content: '他创建的团队',
- },
- {
- id: 4,
- content: '他加入的团队',
- },
- ])
- })
-
- // 团队列表
- Mock.mock(new RegExp('/api/user/my-team/list'), () => {
- return successResponseWrap([
- {
- id: 1,
- avatar: '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/a8c8cdb109cb051163646151a4a5083b.png~tplv-uwbnlip3yd-webp.webp',
- name: '火智能应用团队',
- peopleNumber: Mock.Random.natural(10, 100),
- },
- {
- id: 2,
- avatar: '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp',
- name: '企业级产品设计团队',
- peopleNumber: Mock.Random.natural(5000, 6000),
- },
- {
- id: 3,
- avatar: '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp',
- name: '前端/UE小分队',
- peopleNumber: Mock.Random.natural(10, 5000),
- },
- {
- id: 4,
- avatar: '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/8361eeb82904210b4f55fab888fe8416.png~tplv-uwbnlip3yd-webp.webp',
- name: '内容识别插件小分队',
- peopleNumber: Mock.Random.natural(10, 100),
- },
- ])
- })
- },
-})
diff --git a/src/views/user/setting/components/basic-information.vue b/src/views/user/setting/components/basic-information.vue
deleted file mode 100644
index 9f10fdc..0000000
--- a/src/views/user/setting/components/basic-information.vue
+++ /dev/null
@@ -1,135 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- 中国
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('userSetting.save') }}
-
-
- {{ $t('userSetting.reset') }}
-
-
-
-
-
-
-
-
-
diff --git a/src/views/user/setting/components/certification-records.vue b/src/views/user/setting/components/certification-records.vue
deleted file mode 100644
index 25c7397..0000000
--- a/src/views/user/setting/components/certification-records.vue
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
-
- {{ $t('userSetting.certification.cell.certificationType') }}
-
-
-
-
-
-
-
- {{ $t('userSetting.certification.cell.auditing') }}
-
-
-
- {{ $t('userSetting.certification.cell.pass') }}
-
-
-
-
-
-
-
-
- {{ $t('userSetting.certification.button.check') }}
-
-
- {{ $t('userSetting.certification.button.withdraw') }}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/user/setting/components/certification.vue b/src/views/user/setting/components/certification.vue
deleted file mode 100644
index a2a5732..0000000
--- a/src/views/user/setting/components/certification.vue
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/user/setting/components/enterprise-certification.vue b/src/views/user/setting/components/enterprise-certification.vue
deleted file mode 100644
index b59ebc1..0000000
--- a/src/views/user/setting/components/enterprise-certification.vue
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
- {{ $t('userSetting.certification.extra.enterprise') }}
-
-
- {{ $t(label) }} :
-
- 已认证
- {{ value }}
-
-
-
-
-
-
-
-
diff --git a/src/views/user/setting/components/security-settings.vue b/src/views/user/setting/components/security-settings.vue
deleted file mode 100644
index 3809cf0..0000000
--- a/src/views/user/setting/components/security-settings.vue
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
-
-
- {{ $t('userSetting.SecuritySettings.form.label.password') }}
-
-
-
-
-
- {{ $t('userSetting.SecuritySettings.placeholder.password') }}
-
-
-
-
- {{ $t('userSetting.SecuritySettings.button.update') }}
-
-
-
-
-
-
-
-
-
- {{ $t('userSetting.SecuritySettings.form.label.securityQuestion') }}
-
-
-
-
-
- {{ $t('userSetting.SecuritySettings.placeholder.securityQuestion') }}
-
-
-
-
- {{ $t('userSetting.SecuritySettings.button.settings') }}
-
-
-
-
-
-
-
-
-
- {{ $t('userSetting.SecuritySettings.form.label.phone') }}
-
-
-
-
-
-
- {{ $t('userSetting.SecuritySettings.button.update') }}
-
-
-
-
-
-
-
-
-
- {{ $t('userSetting.SecuritySettings.form.label.email') }}
-
-
-
-
-
- {{ $t('userSetting.SecuritySettings.placeholder.email') }}
-
-
-
-
- {{ $t('userSetting.SecuritySettings.button.update') }}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/user/setting/components/user-panel.vue b/src/views/user/setting/components/user-panel.vue
deleted file mode 100644
index b468a3a..0000000
--- a/src/views/user/setting/components/user-panel.vue
+++ /dev/null
@@ -1,140 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t(label) }} :
-
- 已认证
- {{ value }}
-
-
-
-
-
-
-
-
-
diff --git a/src/views/user/setting/index.vue b/src/views/user/setting/index.vue
deleted file mode 100644
index 5311dc2..0000000
--- a/src/views/user/setting/index.vue
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/user/setting/locale/en-US.ts b/src/views/user/setting/locale/en-US.ts
deleted file mode 100644
index e22fb14..0000000
--- a/src/views/user/setting/locale/en-US.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-export default {
- 'menu.user.setting': 'User Setting',
- 'userSetting.menu.title.info': 'Personal Information',
- 'userSetting.menu.title.account': 'Account Setting',
- 'userSetting.menu.title.password': 'Password',
- 'userSetting.menu.title.message': 'Message Notification',
- 'userSetting.menu.title.result': 'Result',
- 'userSetting.menu.title.data': 'Export Data',
- 'userSetting.saveSuccess': 'Save Success',
- 'userSetting.title.basicInfo': 'Basic Information',
- 'userSetting.title.socialInfo': 'Social Information',
- 'userSetting.label.avatar': 'Avatar',
- 'userSetting.label.name': 'User Name',
- 'userSetting.label.location': 'Office Location',
- 'userSetting.label.introduction': 'Introduction',
- 'userSetting.label.personalWebsite': 'Website',
- 'userSetting.save': 'Save',
- 'userSetting.cancel': 'Cancel',
- 'userSetting.reset': 'Reset',
- // new
- 'userSetting.label.certification': 'Certification',
- 'userSetting.label.phone': 'Phone',
- 'userSetting.label.accountId': 'Account Id',
- 'userSetting.label.registrationDate': 'Registration Date',
- 'userSetting.tab.basicInformation': 'Basic Information',
- 'userSetting.tab.securitySettings': 'Security Settings',
- 'userSetting.tab.certification': 'Certification',
- 'userSetting.basicInfo.form.label.email': 'Email',
- 'userSetting.basicInfo.placeholder.email': `Please enter your email address, such as xxx{'@'}bytedance.com`,
- 'userSetting.form.error.email.required': 'Please enter email address',
- 'userSetting.basicInfo.form.label.nickname': 'Nickname',
- 'userSetting.basicInfo.placeholder.nickname': 'Please enter nickname',
- 'userSetting.form.error.nickname.required': 'Please enter nickname',
- 'userSetting.basicInfo.form.label.countryRegion': 'Country/region',
- 'userSetting.basicInfo.placeholder.countryRegion': 'Please select country/region',
- 'userSetting.form.error.countryRegion.required': 'Please select country/region',
- 'userSetting.basicInfo.form.label.area': 'Area',
- 'userSetting.basicInfo.placeholder.area': 'Please select area',
- 'userSetting.form.error.area.required': 'Please Select a area',
- 'userSetting.basicInfo.form.label.address': 'Address',
- 'userSetting.basicInfo.placeholder.address': 'Please enter address',
- 'userSetting.basicInfo.form.label.profile': 'Personal profile',
- 'userSetting.basicInfo.placeholder.profile': 'Please enter your profile, no more than 200 words',
- 'userSetting.form.error.profile.maxLength': 'No more than 200 words',
- 'userSetting.SecuritySettings.form.label.password': 'Login Password',
- 'userSetting.SecuritySettings.placeholder.password':
- 'Has been set. The password must contain at least six letters, digits, and special characters except Spaces. The password must contain both uppercase and lowercase letters.',
- 'userSetting.SecuritySettings.form.label.securityQuestion': 'Security Question',
- 'userSetting.SecuritySettings.placeholder.securityQuestion':
- 'You have not set the password protection question. The password protection question can effectively protect the account security.',
- 'userSetting.SecuritySettings.form.label.phone': 'Phone',
- // 'userSetting.SecuritySettings.placeholder.phone': '已绑定:150******50',
- 'userSetting.SecuritySettings.form.label.email': 'Email',
- 'userSetting.SecuritySettings.placeholder.email':
- 'You have not set a mailbox yet. The mailbox binding can be used to retrieve passwords and receive notifications.',
- 'userSetting.SecuritySettings.button.settings': 'Settings',
- 'userSetting.SecuritySettings.button.update': 'Update',
- 'userSetting.certification.title.enterprise': 'Enterprise Real Name Authentication',
- 'userSetting.certification.extra.enterprise': 'Modifying an Authentication Body',
- 'userSetting.certification.label.accountType': 'Account Type',
- 'userSetting.certification.label.status': 'status',
- 'userSetting.certification.label.time': 'time',
- 'userSetting.certification.label.legalPerson': 'Legal Person Name',
- 'userSetting.certification.label.certificateType': 'Types of legal person documents',
- 'userSetting.certification.label.authenticationNumber': 'Legal person certification number',
- 'userSetting.certification.label.enterpriseName': 'Enterprise Name',
- 'userSetting.certification.label.enterpriseCertificateType': 'Types of corporate certificates',
- 'userSetting.certification.label.organizationCode': 'Organization Code',
- 'userSetting.certification.title.record': 'Certification Records',
- 'userSetting.certification.columns.certificationType': 'Certification Type',
- 'userSetting.certification.cell.certificationType': 'Enterprise certificate Certification',
- 'userSetting.certification.columns.certificationContent': 'Certification Content',
- 'userSetting.certification.columns.status': 'Status',
- 'userSetting.certification.cell.pass': 'Pass',
- 'userSetting.certification.cell.auditing': 'Auditing',
- 'userSetting.certification.columns.time': 'Time',
- 'userSetting.certification.columns.operation': 'Operation',
- 'userSetting.certification.button.check': 'Check',
- 'userSetting.certification.button.withdraw': 'Withdraw',
-}
diff --git a/src/views/user/setting/locale/zh-CN.ts b/src/views/user/setting/locale/zh-CN.ts
deleted file mode 100644
index 354715e..0000000
--- a/src/views/user/setting/locale/zh-CN.ts
+++ /dev/null
@@ -1,78 +0,0 @@
-export default {
- 'menu.user.setting': '用户设置',
- 'userSetting.menu.title.info': '个人信息',
- 'userSetting.menu.title.account': '账号设置',
- 'userSetting.menu.title.password': '密码',
- 'userSetting.menu.title.message': '消息通知',
- 'userSetting.menu.title.result': '结果页',
- 'userSetting.menu.title.data': '导出数据',
- 'userSetting.saveSuccess': '保存成功',
- 'userSetting.title.basicInfo': '基本信息',
- 'userSetting.title.socialInfo': '社交信息',
- 'userSetting.label.avatar': '头像',
- 'userSetting.label.name': '用户名',
- 'userSetting.label.location': '办公地点',
- 'userSetting.label.introduction': '个人简介',
- 'userSetting.label.personalWebsite': '个人网站',
- 'userSetting.save': '保存',
- 'userSetting.cancel': '取消',
- 'userSetting.reset': '重置',
- // new
- 'userSetting.label.certification': '实名认证',
- 'userSetting.label.phone': '手机号码',
- 'userSetting.label.accountId': '账号ID',
- 'userSetting.label.registrationDate': '注册时间',
- 'userSetting.tab.basicInformation': '基础信息',
- 'userSetting.tab.securitySettings': '安全设置',
- 'userSetting.tab.certification': '实名认证',
- 'userSetting.basicInfo.form.label.email': '邮箱',
- 'userSetting.basicInfo.placeholder.email': `请输入邮箱地址,如xxx{'@'}bytedance.com`,
- 'userSetting.form.error.email.required': '请输入邮箱',
- 'userSetting.basicInfo.form.label.nickname': '昵称',
- 'userSetting.basicInfo.placeholder.nickname': '请输入您的昵称',
- 'userSetting.form.error.nickname.required': '请输入昵称',
- 'userSetting.basicInfo.form.label.countryRegion': '国家/地区',
- 'userSetting.basicInfo.placeholder.countryRegion': '请选择',
- 'userSetting.form.error.countryRegion.required': '请选择国家/地区',
- 'userSetting.basicInfo.form.label.area': '所在区域',
- 'userSetting.basicInfo.placeholder.area': '请选择',
- 'userSetting.form.error.area.required': '请选择所在区域',
- 'userSetting.basicInfo.form.label.address': '具体地址',
- 'userSetting.basicInfo.placeholder.address': '请输入您的地址',
- 'userSetting.basicInfo.form.label.profile': '个人简介',
- 'userSetting.basicInfo.placeholder.profile': '请输入您的个人简介,最多不超过200字。',
- 'userSetting.form.error.profile.maxLength': '最多不超过200字',
- 'userSetting.SecuritySettings.form.label.password': '登录密码',
- 'userSetting.SecuritySettings.placeholder.password':
- '已设置。密码至少6位字符,支持数字、字母和除空格外的特殊字符,且必须同时包含数字和大小写字母。',
- 'userSetting.SecuritySettings.form.label.securityQuestion': '密保问题',
- 'userSetting.SecuritySettings.placeholder.securityQuestion': '您暂未设置密保问题,密保问题可以有效的保护账号的安全。',
- 'userSetting.SecuritySettings.form.label.phone': '安全手机',
- // 'userSetting.SecuritySettings.placeholder.phone': '已绑定:150******50',
- 'userSetting.SecuritySettings.form.label.email': '安全邮箱',
- 'userSetting.SecuritySettings.placeholder.email': '您暂未设置邮箱,绑定邮箱可以用来找回密码、接收通知等。',
- 'userSetting.SecuritySettings.button.settings': '设置',
- 'userSetting.SecuritySettings.button.update': '修改',
- 'userSetting.certification.title.enterprise': '企业实名认证',
- 'userSetting.certification.extra.enterprise': '修改认证主体',
- 'userSetting.certification.label.accountType': '账号类型',
- 'userSetting.certification.label.status': '认证状态',
- 'userSetting.certification.label.time': '认证时间',
- 'userSetting.certification.label.legalPerson': '法人姓名',
- 'userSetting.certification.label.certificateType': '法人证件类型',
- 'userSetting.certification.label.authenticationNumber': '法人认证号码',
- 'userSetting.certification.label.enterpriseName': '企业名称',
- 'userSetting.certification.label.enterpriseCertificateType': '企业证件类型',
- 'userSetting.certification.label.organizationCode': '组织机构代码',
- 'userSetting.certification.title.record': '认证记录',
- 'userSetting.certification.columns.certificationType': '认证类型',
- 'userSetting.certification.cell.certificationType': '企业证件认证',
- 'userSetting.certification.columns.certificationContent': '认证内容',
- 'userSetting.certification.columns.status': '当前状态',
- 'userSetting.certification.cell.pass': '已通过',
- 'userSetting.certification.cell.auditing': '审核中',
- 'userSetting.certification.columns.time': '创建时间',
- 'userSetting.certification.columns.operation': '操作',
- 'userSetting.certification.button.check': '查看',
- 'userSetting.certification.button.withdraw': '撤回',
-}
diff --git a/src/views/user/setting/mock.ts b/src/views/user/setting/mock.ts
deleted file mode 100644
index 325ce47..0000000
--- a/src/views/user/setting/mock.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-import Mock from 'mockjs'
-import setupMock, { successResponseWrap } from '@/utils/setup-mock'
-
-setupMock({
- setup() {
- Mock.mock(new RegExp('/api/user/save-info'), () => {
- return successResponseWrap('ok')
- })
- Mock.mock(new RegExp('/api/user/certification'), () => {
- return successResponseWrap({
- enterpriseInfo: {
- accountType: '企业账号',
- status: 0,
- time: '2018-10-22 14:53:12',
- legalPerson: '李**',
- certificateType: '中国身份证',
- authenticationNumber: '130************123',
- enterpriseName: '低调有实力的企业',
- enterpriseCertificateType: '企业营业执照',
- organizationCode: '7*******9',
- },
- record: [
- {
- certificationType: 1,
- certificationContent: '企业实名认证,法人姓名:李**',
- status: 0,
- time: '2021-02-28 10:30:50',
- },
- {
- certificationType: 1,
- certificationContent: '企业实名认证,法人姓名:李**',
- status: 1,
- time: '2020-05-13 08:00:00',
- },
- ],
- })
- })
- Mock.mock(new RegExp('/api/user/upload'), () => {
- return successResponseWrap('ok')
- })
- },
-})