xto-fronted 0.4.112 → 0.4.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.vue.d.ts +2 -0
- package/dist/api/auth.d.ts +8 -0
- package/dist/api/index.d.ts +6 -0
- package/dist/api/index.js +26 -0
- package/dist/api/system.d.ts +16 -0
- package/dist/api/user.d.ts +13 -0
- package/dist/api.d.ts +2 -0
- package/dist/components/Layout/Footer.vue.d.ts +2 -0
- package/dist/components/Layout/Header.vue.d.ts +5 -0
- package/dist/components/Layout/MixTopMenu.vue.d.ts +10 -0
- package/dist/components/Layout/Sidebar.vue.d.ts +13 -0
- package/dist/components/Layout/SidebarMenuItem.vue.d.ts +5 -0
- package/dist/components/Layout/Tabs.vue.d.ts +2 -0
- package/dist/components/Layout/TopMenu.vue.d.ts +10 -0
- package/dist/components/Layout/index.vue.d.ts +7 -0
- package/dist/composables/useApp.d.ts +30 -0
- package/dist/composables/useAuth.d.ts +6 -0
- package/dist/composables/useForm.d.ts +20 -0
- package/dist/composables/useI18n.d.ts +30 -0
- package/dist/composables/useTable.d.ts +29 -0
- package/dist/directives/permission.d.ts +4 -0
- package/dist/enums/index.d.ts +32 -0
- package/dist/index-11ZvkUE8.js +641 -0
- package/dist/index-BVEs9eIP.js +3171 -0
- package/dist/index-BuVnk-Ka.js +189 -0
- package/dist/index-CPUyTvNq.js +479 -0
- package/dist/index-CaIet-zn.js +515 -0
- package/dist/index.d.ts +63 -0
- package/dist/index.js +99 -0
- package/dist/main.d.ts +0 -0
- package/dist/router/dynamicRoutes.d.ts +30 -0
- package/dist/router/guards.d.ts +17 -0
- package/dist/router/index.d.ts +6 -0
- package/dist/router/layoutRoute.d.ts +23 -0
- package/dist/router/staticRoutes.d.ts +2 -0
- package/dist/stores/app.d.ts +99 -0
- package/dist/stores/auth.d.ts +41 -0
- package/dist/stores/index.d.ts +10 -0
- package/dist/stores/locale.d.ts +42 -0
- package/dist/stores/menu.d.ts +83 -0
- package/dist/stores/user.d.ts +101 -0
- package/dist/style.css +1 -0
- package/dist/user-ChcAx-5W.js +1186 -0
- package/dist/utils/auth.d.ts +27 -0
- package/dist/utils/config.d.ts +51 -0
- package/dist/utils/permission.d.ts +17 -0
- package/dist/utils/request.d.ts +34 -0
- package/dist/utils/storage.d.ts +24 -0
- package/dist/views/dashboard/index.vue.d.ts +2 -0
- package/dist/views/error/403.vue.d.ts +2 -0
- package/dist/views/error/404.vue.d.ts +2 -0
- package/dist/views/login/index.vue.d.ts +4 -0
- package/dist/views/system/menu/index.vue.d.ts +4 -0
- package/dist/views/system/role/index.vue.d.ts +4 -0
- package/dist/views/system/user/index.vue.d.ts +4 -0
- package/package.json +1 -1
- package/dist/assets/404-Cw_4ZCL6.css +0 -1
- package/dist/assets/404-G0TYnM2t.js +0 -1
- package/dist/assets/_plugin-vue_export-helper-DlAUqK2U.js +0 -1
- package/dist/assets/index-8nuVIlbv.css +0 -1
- package/dist/assets/index-BRR97dc6.js +0 -1
- package/dist/assets/index-BlRslYYI.css +0 -1
- package/dist/assets/index-Br0rA9ST.js +0 -1
- package/dist/assets/index-BudArKxR.css +0 -1
- package/dist/assets/index-CEwTCJMr.js +0 -1
- package/dist/assets/index-CFhWBbxk.css +0 -1
- package/dist/assets/index-Cm58iTuj.js +0 -1
- package/dist/assets/index-Cno3g_Ca.js +0 -1
- package/dist/assets/index-Cpew6d-v.css +0 -1
- package/dist/assets/index-D1AzIZb6.js +0 -1
- package/dist/assets/index-DCn9x-He.js +0 -2
- package/dist/assets/index-Dk64JJvN.js +0 -1
- package/dist/assets/index-rQHcgyhm.css +0 -1
- package/dist/assets/index-vfvEFrCH.css +0 -1
- package/dist/assets/vendor-CWD9azq9.js +0 -16
- package/dist/assets/vue-vendor-gcK82_Kd.js +0 -29
- package/dist/assets/xto-base-CL2NKZJJ.css +0 -1
- package/dist/assets/xto-base-wYW0Uxvr.js +0 -1
- package/dist/assets/xto-business--V1F5Gwb.css +0 -1
- package/dist/assets/xto-core-DtPNWVUu.js +0 -1
- package/dist/assets/xto-data-2diO2SyB.js +0 -1
- package/dist/assets/xto-data-Bi03KULC.css +0 -1
- package/dist/assets/xto-feedback-BOOXC1Ev.js +0 -1
- package/dist/assets/xto-feedback-Bxx38c3P.css +0 -1
- package/dist/assets/xto-form-BBugNbnQ.js +0 -1
- package/dist/assets/xto-form-Cu6q3VLG.css +0 -1
- package/dist/assets/xto-layout-BDD6sSlM.css +0 -1
- package/dist/assets/xto-navigation-D_LFy9y9.js +0 -1
- package/dist/assets/xto-navigation-XfpyMpEo.css +0 -1
- package/dist/index.html +0 -28
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token 管理
|
|
3
|
+
*/
|
|
4
|
+
export interface TokenInfo {
|
|
5
|
+
access_token: string;
|
|
6
|
+
token_type: string;
|
|
7
|
+
refresh_token: string;
|
|
8
|
+
expires_time: number;
|
|
9
|
+
refresh_time: number;
|
|
10
|
+
code?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const getToken: () => string | null;
|
|
13
|
+
export declare const setToken: (token: string) => void;
|
|
14
|
+
export declare const getTokenType: () => string | null;
|
|
15
|
+
export declare const setTokenType: (tokenType: string) => void;
|
|
16
|
+
export declare const getRefreshToken: () => string | null;
|
|
17
|
+
export declare const setRefreshToken: (refreshToken: string) => void;
|
|
18
|
+
export declare const getTokenExpire: () => number | null;
|
|
19
|
+
export declare const setTokenExpire: (expireTime: number) => void;
|
|
20
|
+
export declare const getRefreshTime: () => number | null;
|
|
21
|
+
export declare const setRefreshTime: (refreshTime: number) => void;
|
|
22
|
+
export declare const getCode: () => string | null;
|
|
23
|
+
export declare const setCode: (code: string) => void;
|
|
24
|
+
export declare const setTokenInfo: (info: TokenInfo) => void;
|
|
25
|
+
export declare const clearToken: () => void;
|
|
26
|
+
export declare const isTokenExpired: () => boolean;
|
|
27
|
+
export declare const hasToken: () => boolean;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 应用配置(动态设置,避免 import.meta.env 静态替换)
|
|
3
|
+
*
|
|
4
|
+
* 支持两种配置方式:
|
|
5
|
+
* 1. 环境变量:开发环境使用 import.meta.env
|
|
6
|
+
* 2. 运行时配置:生产环境从 config.json 加载(支持 Nacos 动态配置)
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* 加载运行时配置
|
|
10
|
+
* 仅在生产部署环境加载 config.json,开发环境自动跳过
|
|
11
|
+
*
|
|
12
|
+
* 注意:不能使用 import.meta.env.PROD 判断,因为作为 npm 库构建时
|
|
13
|
+
* Vite 会将 import.meta.env.PROD 静态替换为 true,导致开发环境也会尝试加载
|
|
14
|
+
* 改用 window.location 协议判断:file:// 或 localhost 开发服务器视为开发环境
|
|
15
|
+
*
|
|
16
|
+
* @param basePath 应用基础路径,如 '/admin' 或 '/sea'
|
|
17
|
+
*/
|
|
18
|
+
export declare function loadRuntimeConfig(basePath?: string): Promise<Record<string, string>>;
|
|
19
|
+
/**
|
|
20
|
+
* 初始化应用配置
|
|
21
|
+
* 在项目入口文件(main.ts)中调用此函数设置配置
|
|
22
|
+
*/
|
|
23
|
+
export declare function initAppConfig(config: {
|
|
24
|
+
appId?: string;
|
|
25
|
+
clientId?: string;
|
|
26
|
+
apiBaseUrl?: string;
|
|
27
|
+
basePath?: string;
|
|
28
|
+
}): void;
|
|
29
|
+
/**
|
|
30
|
+
* 获取 AppId
|
|
31
|
+
* 优先级:运行时配置 > 动态配置 > 环境变量
|
|
32
|
+
*/
|
|
33
|
+
export declare function getAppId(): string;
|
|
34
|
+
/**
|
|
35
|
+
* 获取 ClientId
|
|
36
|
+
*/
|
|
37
|
+
export declare function getClientId(): string;
|
|
38
|
+
/**
|
|
39
|
+
* 获取 API 基础路径
|
|
40
|
+
*/
|
|
41
|
+
export declare function getApiBaseUrl(): string;
|
|
42
|
+
/**
|
|
43
|
+
* 获取应用基础路径(用于路由 base)
|
|
44
|
+
*/
|
|
45
|
+
export declare function getBasePath(): string;
|
|
46
|
+
export declare const appConfig: {
|
|
47
|
+
appId: import('vue').Ref<string, string>;
|
|
48
|
+
clientId: import('vue').Ref<string, string>;
|
|
49
|
+
apiBaseUrl: import('vue').Ref<string, string>;
|
|
50
|
+
basePath: import('vue').Ref<string, string>;
|
|
51
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 权限工具函数
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* 检查是否有权限
|
|
6
|
+
* @param permission 权限标识(菜单 code)
|
|
7
|
+
*/
|
|
8
|
+
export declare function hasPermission(permission: string | string[]): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* 检查是否有角色
|
|
11
|
+
* @param _role 角色标识(暂不使用)
|
|
12
|
+
*/
|
|
13
|
+
export declare function hasRole(_role: string | string[]): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 检查是否是管理员
|
|
16
|
+
*/
|
|
17
|
+
export declare function isAdmin(): boolean;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
2
|
+
export interface ApiResponse<T = unknown> {
|
|
3
|
+
code: number;
|
|
4
|
+
data: T;
|
|
5
|
+
message: string;
|
|
6
|
+
}
|
|
7
|
+
export interface PageParams {
|
|
8
|
+
pageNo: number;
|
|
9
|
+
pageSize: number;
|
|
10
|
+
}
|
|
11
|
+
export interface PageResponse<T> {
|
|
12
|
+
records: T[];
|
|
13
|
+
total: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 设置运行时 API 基础 URL
|
|
17
|
+
* 用于 Nacos 动态配置场景
|
|
18
|
+
*/
|
|
19
|
+
export declare function setApiBaseUrl(url: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* 设置运行时 base 路径
|
|
22
|
+
* 用于登录过期时正确跳转到登录页
|
|
23
|
+
*/
|
|
24
|
+
export declare function setBasePath(base: string): void;
|
|
25
|
+
declare const request: AxiosInstance;
|
|
26
|
+
export declare const http: {
|
|
27
|
+
get<T = unknown>(url: string, config?: AxiosRequestConfig): Promise<T>;
|
|
28
|
+
post<T = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig): Promise<T>;
|
|
29
|
+
put<T = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig): Promise<T>;
|
|
30
|
+
patch<T = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig): Promise<T>;
|
|
31
|
+
delete<T = unknown>(url: string, config?: AxiosRequestConfig): Promise<T>;
|
|
32
|
+
download(url: string, config?: AxiosRequestConfig): Promise<Blob>;
|
|
33
|
+
};
|
|
34
|
+
export default request;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 本地存储封装
|
|
3
|
+
*/
|
|
4
|
+
interface StorageWrapper {
|
|
5
|
+
get<T>(key: string): T | null;
|
|
6
|
+
set(key: string, value: unknown): void;
|
|
7
|
+
remove(key: string): void;
|
|
8
|
+
clear(): void;
|
|
9
|
+
}
|
|
10
|
+
export declare const localStorageUtil: StorageWrapper;
|
|
11
|
+
export declare const sessionStorageUtil: StorageWrapper;
|
|
12
|
+
export declare const local: {
|
|
13
|
+
get: <T>(key: string) => T | null;
|
|
14
|
+
set: (key: string, value: unknown) => void;
|
|
15
|
+
remove: (key: string) => void;
|
|
16
|
+
clear: () => void;
|
|
17
|
+
};
|
|
18
|
+
export declare const session: {
|
|
19
|
+
get: <T>(key: string) => T | null;
|
|
20
|
+
set: (key: string, value: unknown) => void;
|
|
21
|
+
remove: (key: string) => void;
|
|
22
|
+
clear: () => void;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
2
|
+
formRef: any;
|
|
3
|
+
}, HTMLDivElement>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
2
|
+
formRef: any;
|
|
3
|
+
}, HTMLDivElement>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
2
|
+
formRef: any;
|
|
3
|
+
}, HTMLDivElement>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
2
|
+
formRef: any;
|
|
3
|
+
}, HTMLDivElement>;
|
|
4
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.error-page[data-v-1b083153]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:var(--bg-color-page);position:relative;overflow:hidden}.error-container[data-v-1b083153]{position:relative;z-index:2;max-width:600px;padding:40px}.error-bg[data-v-1b083153]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;overflow:hidden}.error-bg .bg-circle[data-v-1b083153]{position:absolute;border-radius:50%;opacity:.1}.error-bg .bg-circle.circle-1[data-v-1b083153]{width:400px;height:400px;top:-100px;right:-100px;background:var(--color-primary)}.error-bg .bg-circle.circle-2[data-v-1b083153]{width:300px;height:300px;bottom:-50px;left:-50px;background:var(--color-info)}.error-bg .bg-circle.circle-3[data-v-1b083153]{width:200px;height:200px;top:50%;left:50%;transform:translate(-50%,-50%);background:var(--color-primary-light-3)}.error-content[data-v-1b083153]{text-align:center}.error-code[data-v-1b083153]{display:flex;justify-content:center;align-items:center;gap:8px;margin-bottom:32px}.error-code .code-digit[data-v-1b083153]{font-size:80px;font-weight:700;color:var(--color-text-primary);line-height:1}.error-code .code-zero[data-v-1b083153]{position:relative;width:80px;height:80px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--color-primary) 0%,var(--color-primary-light-1) 100%);border-radius:50%}.error-code .code-zero .zero-inner[data-v-1b083153]{font-size:48px;font-weight:700;color:#fff}.error-illustration[data-v-1b083153]{width:200px;height:120px;margin:0 auto 24px}.error-title[data-v-1b083153]{font-size:24px;font-weight:600;color:var(--color-text-primary);margin-bottom:12px}.error-desc[data-v-1b083153]{font-size:14px;color:var(--color-text-secondary);margin-bottom:32px}.error-actions[data-v-1b083153]{display:flex;justify-content:center;gap:16px;margin-bottom:32px}.error-actions[data-v-1b083153] .x-button{padding:12px 24px;border-radius:8px}.error-actions[data-v-1b083153] .x-button svg{width:18px;height:18px;margin-right:8px}.error-tip[data-v-1b083153]{padding:20px;background:var(--color-fill-light);border-radius:var(--border-radius-large)}.error-tip p[data-v-1b083153]{font-size:14px;font-weight:500;color:var(--color-text-primary);margin-bottom:12px}.error-tip ul[data-v-1b083153]{list-style:none;padding:0;margin:0}.error-tip ul li[data-v-1b083153]{font-size:13px;color:var(--color-text-secondary);position:relative;padding:4px 0 4px 16px}.error-tip ul li[data-v-1b083153]:before{content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);width:6px;height:6px;background:var(--color-primary);border-radius:50%;opacity:.6}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as n,o as c,c as v,a as r,P as p,z as a,C as o,u as e,Q as b,i}from"./vue-vendor-gcK82_Kd.js";import{M as l}from"./xto-base-wYW0Uxvr.js";import{_ as x}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./xto-core-DtPNWVUu.js";const g={class:"error-page"},k={class:"error-container"},u={class:"error-content"},f={class:"error-actions"},w=n({__name:"404",setup(y){const s=b(),d=()=>{s.push("/")};return(m,t)=>(c(),v("div",g,[r("div",k,[t[7]||(t[7]=r("div",{class:"error-bg"},[r("div",{class:"bg-circle circle-1"}),r("div",{class:"bg-circle circle-2"}),r("div",{class:"bg-circle circle-3"})],-1)),r("div",u,[t[5]||(t[5]=p('<div class="error-code" data-v-1b083153><span class="code-digit" data-v-1b083153>4</span><span class="code-zero" data-v-1b083153><span class="zero-inner" data-v-1b083153>0</span></span><span class="code-digit" data-v-1b083153>4</span></div><div class="error-illustration" data-v-1b083153><svg viewBox="0 0 200 120" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-1b083153><rect x="40" y="20" width="120" height="80" rx="8" fill="var(--color-fill)" stroke="var(--color-border)" stroke-width="2" data-v-1b083153></rect><rect x="50" y="30" width="100" height="60" rx="4" fill="var(--bg-color)" data-v-1b083153></rect><line x1="60" y1="45" x2="140" y2="45" stroke="var(--color-border-light)" stroke-width="2" data-v-1b083153></line><line x1="60" y1="55" x2="120" y2="55" stroke="var(--color-border-light)" stroke-width="2" data-v-1b083153></line><line x1="60" y1="65" x2="100" y2="65" stroke="var(--color-border-light)" stroke-width="2" data-v-1b083153></line><text x="100" y="75" text-anchor="middle" fill="var(--color-primary)" font-size="24" font-weight="600" data-v-1b083153>?</text><circle cx="150" cy="35" r="12" stroke="var(--color-primary)" stroke-width="2" fill="none" data-v-1b083153></circle><line x1="158" y1="43" x2="168" y2="53" stroke="var(--color-primary)" stroke-width="2" stroke-linecap="round" data-v-1b083153></line></svg></div><h1 class="error-title" data-v-1b083153>页面不存在</h1><p class="error-desc" data-v-1b083153>抱歉,您访问的页面不存在或已被删除</p>',4)),r("div",f,[a(e(l),{type:"primary",size:"large",onClick:d},{icon:o(()=>[...t[1]||(t[1]=[r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[r("path",{d:"M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"}),r("polyline",{points:"9,22 9,12 15,12 15,22"})],-1)])]),default:o(()=>[t[2]||(t[2]=i(" 返回首页 ",-1))]),_:1}),a(e(l),{size:"large",onClick:t[0]||(t[0]=h=>e(s).go(-1))},{icon:o(()=>[...t[3]||(t[3]=[r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[r("path",{d:"M19 12H5M12 19l-7-7 7-7"})],-1)])]),default:o(()=>[t[4]||(t[4]=i(" 返回上一页 ",-1))]),_:1})]),t[6]||(t[6]=r("div",{class:"error-tip"},[r("p",null,"您可以尝试:"),r("ul",null,[r("li",null,"检查您输入的网址是否正确"),r("li",null,"返回首页重新浏览"),r("li",null,"联系管理员反馈问题")])],-1))])])]))}}),M=x(w,[["__scopeId","data-v-1b083153"]]);export{M as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const s=(t,r)=>{const o=t.__vccOpts||t;for(const[c,e]of r)o[c]=e;return o};export{s as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.login-page[data-v-ef91e533]{width:100%;min-height:100vh;display:flex;background:var(--bg-color-page)}.login-brand[data-v-ef91e533]{flex:1;position:relative;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#002c8c,#0958d9,#1677ff);overflow:hidden}@media (max-width: 992px){.login-brand[data-v-ef91e533]{display:none}}.login-brand .brand-content[data-v-ef91e533]{position:relative;z-index:2;padding:60px;max-width:520px;color:#fff}.login-brand .brand-logo[data-v-ef91e533]{display:flex;align-items:center;gap:12px;margin-bottom:48px}.login-brand .brand-logo .logo-icon[data-v-ef91e533]{width:48px;height:48px;color:#fff}.login-brand .brand-logo .logo-text[data-v-ef91e533]{font-size:28px;font-weight:700;letter-spacing:2px}.login-brand .brand-slogan[data-v-ef91e533]{margin-bottom:48px}.login-brand .brand-slogan h1[data-v-ef91e533]{font-size:32px;font-weight:600;line-height:1.3;margin-bottom:12px}.login-brand .brand-slogan p[data-v-ef91e533]{font-size:16px;opacity:.8;line-height:1.6}.login-brand .brand-features[data-v-ef91e533]{display:flex;flex-direction:column;gap:24px}.login-brand .brand-features .feature-item[data-v-ef91e533]{display:flex;align-items:flex-start;gap:16px;padding:16px;background:#ffffff1a;border-radius:var(--border-radius-large);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transition:all .3s ease}.login-brand .brand-features .feature-item[data-v-ef91e533]:hover{background:#ffffff26;transform:translate(8px)}.login-brand .brand-features .feature-icon[data-v-ef91e533]{width:40px;height:40px;display:flex;align-items:center;justify-content:center;background:#fff3;border-radius:var(--border-radius-base);flex-shrink:0}.login-brand .brand-features .feature-icon svg[data-v-ef91e533]{width:20px;height:20px}.login-brand .brand-features .feature-text h4[data-v-ef91e533]{font-size:15px;font-weight:600;margin-bottom:4px}.login-brand .brand-features .feature-text p[data-v-ef91e533]{font-size:13px;opacity:.8}.login-brand .brand-decoration[data-v-ef91e533]{position:absolute;bottom:60px;left:60px;right:60px;display:flex;align-items:center;gap:16px}.login-brand .brand-decoration .decoration-line[data-v-ef91e533]{flex:1;height:1px;background:linear-gradient(90deg,rgba(255,255,255,.3),transparent)}.login-brand .brand-decoration .decoration-dots[data-v-ef91e533]{display:flex;gap:8px}.login-brand .brand-decoration .decoration-dots span[data-v-ef91e533]{width:6px;height:6px;background:#ffffff80;border-radius:50%}.login-brand .brand-bg[data-v-ef91e533]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;overflow:hidden}.login-brand .brand-bg .bg-grid[data-v-ef91e533]{position:absolute;top:0;right:0;bottom:0;left:0;background-image:linear-gradient(rgba(255,255,255,.03) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.03) 1px,transparent 1px);background-size:60px 60px}.login-brand .brand-bg .bg-glow[data-v-ef91e533]{position:absolute;top:-20%;right:-10%;width:60%;height:60%;background:radial-gradient(circle,rgba(255,255,255,.1) 0%,transparent 70%);animation:glow-pulse-ef91e533 8s ease-in-out infinite}.login-brand .brand-bg .bg-pattern[data-v-ef91e533]{position:absolute;bottom:-10%;left:-10%;width:40%;height:40%;background:radial-gradient(circle,rgba(255,255,255,.08) 0%,transparent 60%)}@keyframes glow-pulse-ef91e533{0%,to{opacity:.6;transform:scale(1)}50%{opacity:1;transform:scale(1.1)}}.login-form-section[data-v-ef91e533]{width:500px;min-height:100vh;display:flex;flex-direction:column;justify-content:center;padding:60px 80px;background:var(--bg-color)}@media (max-width: 768px){.login-form-section[data-v-ef91e533]{width:100%;padding:40px 24px}}.login-form-section .form-container[data-v-ef91e533]{width:100%;max-width:360px;margin:0 auto}.login-form-section .form-header[data-v-ef91e533]{margin-bottom:40px}.login-form-section .form-header h2[data-v-ef91e533]{font-size:28px;font-weight:600;color:var(--color-text-primary);margin-bottom:8px}.login-form-section .form-header p[data-v-ef91e533]{font-size:14px;color:var(--color-text-secondary)}.login-form-section .login-form .input-wrapper[data-v-ef91e533]{margin-bottom:4px}.login-form-section .login-form .input-label[data-v-ef91e533]{display:block;font-size:14px;font-weight:500;color:var(--color-text-regular);margin-bottom:8px}.login-form-section .login-form[data-v-ef91e533] .x-form-item{margin-bottom:24px}.login-form-section .login-form[data-v-ef91e533] .x-input{--x-input-border-radius: 8px}.login-form-section .login-form[data-v-ef91e533] .x-input__prefix{margin-right:12px;color:var(--color-text-placeholder)}.login-form-section .form-options[data-v-ef91e533]{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.login-form-section .form-options .forgot-link[data-v-ef91e533]{font-size:14px;color:var(--color-primary);text-decoration:none;transition:color .2s}.login-form-section .form-options .forgot-link[data-v-ef91e533]:hover{color:var(--color-primary-dark-1)}.login-form-section .login-btn[data-v-ef91e533]{width:100%;height:44px;font-size:16px;font-weight:500;border-radius:8px;letter-spacing:4px;transition:all .3s ease}.login-form-section .login-btn[data-v-ef91e533]:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 4px 12px #1677ff66}.login-form-section .login-btn[data-v-ef91e533]:active:not(:disabled){transform:translateY(0)}.login-form-section .form-footer[data-v-ef91e533]{margin-top:32px;padding-top:24px;border-top:1px solid var(--color-border-lighter);text-align:center}.login-form-section .form-footer p[data-v-ef91e533]{font-size:13px;color:var(--color-text-placeholder);margin-bottom:16px}.login-form-section .form-footer .social-login[data-v-ef91e533]{display:flex;justify-content:center;gap:16px}.login-form-section .form-footer .social-btn[data-v-ef91e533]{width:44px;height:44px;display:flex;align-items:center;justify-content:center;background:var(--color-fill);border:none;border-radius:50%;cursor:pointer;transition:all .2s ease;color:var(--color-text-secondary)}.login-form-section .form-footer .social-btn svg[data-v-ef91e533]{width:20px;height:20px}.login-form-section .form-footer .social-btn[data-v-ef91e533]:hover{background:var(--color-primary-light-6);color:var(--color-primary);transform:translateY(-2px)}.login-form-section .copyright[data-v-ef91e533]{margin-top:48px;text-align:center}.login-form-section .copyright p[data-v-ef91e533]{font-size:12px;color:var(--color-text-placeholder)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var l=(a=>(a[a.ENABLED=1]="ENABLED",a[a.DISABLED=0]="DISABLED",a))(l||{}),E=(a=>(a[a.DIRECTORY=0]="DIRECTORY",a[a.MENU=1]="MENU",a[a.BUTTON=2]="BUTTON",a))(E||{});const D=[{label:"启用",value:1},{label:"禁用",value:0}],r=[{label:"目录",value:0},{label:"菜单",value:1},{label:"按钮",value:2}];export{E as M,l as S,D as a,r as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.dashboard[data-v-545d4c27]{padding:24px;background:var(--bg-color-page);min-height:100%}.stats-section[data-v-545d4c27]{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;margin-bottom:24px}@media (max-width: 1200px){.stats-section[data-v-545d4c27]{grid-template-columns:repeat(2,1fr)}}@media (max-width: 768px){.stats-section[data-v-545d4c27]{grid-template-columns:1fr}}.stat-card[data-v-545d4c27]{position:relative;display:flex;align-items:flex-start;gap:16px;padding:20px;background:var(--bg-color);border-radius:var(--border-radius-large);box-shadow:var(--box-shadow-card);transition:all .3s ease;overflow:hidden}.stat-card[data-v-545d4c27]:hover{box-shadow:var(--box-shadow-card-hover);transform:translateY(-4px)}.stat-card:hover .stat-decoration[data-v-545d4c27]{opacity:1}.stat-card .stat-icon[data-v-545d4c27]{width:52px;height:52px;display:flex;align-items:center;justify-content:center;border-radius:var(--border-radius-large);flex-shrink:0}.stat-card .stat-icon span[data-v-545d4c27]{font-size:26px}.stat-card .stat-content[data-v-545d4c27]{flex:1;min-width:0}.stat-card .stat-title[data-v-545d4c27]{font-size:14px;color:var(--color-text-secondary);margin-bottom:8px}.stat-card .stat-value[data-v-545d4c27]{font-size:28px;font-weight:600;line-height:1.2;margin-bottom:8px}.stat-card .stat-trend[data-v-545d4c27]{display:inline-flex;align-items:center;gap:4px;font-size:12px;padding:2px 8px;border-radius:12px}.stat-card .stat-trend svg[data-v-545d4c27]{width:14px;height:14px}.stat-card .stat-trend.up[data-v-545d4c27]{color:var(--color-success);background:var(--color-success-lighter)}.stat-card .stat-trend.down[data-v-545d4c27]{color:var(--color-danger);background:var(--color-danger-lighter)}.stat-card .stat-decoration[data-v-545d4c27]{position:absolute;top:0;right:0;width:100px;height:100px;border-radius:50%;opacity:0;transition:opacity .3s ease}.main-section[data-v-545d4c27]{display:grid;grid-template-columns:repeat(2,1fr);gap:24px;margin-bottom:24px}@media (max-width: 992px){.main-section[data-v-545d4c27]{grid-template-columns:1fr}}.section-header[data-v-545d4c27]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.section-header h3[data-v-545d4c27]{font-size:16px;font-weight:600;color:var(--color-text-primary)}.section-header .section-badge[data-v-545d4c27]{font-size:12px;color:var(--color-text-placeholder);background:var(--color-fill);padding:4px 10px;border-radius:12px}.section-header .section-link[data-v-545d4c27]{font-size:14px;color:var(--color-primary);text-decoration:none;transition:color .2s}.section-header .section-link[data-v-545d4c27]:hover{color:var(--color-primary-dark-1)}.quick-section[data-v-545d4c27]{background:var(--bg-color);border-radius:var(--border-radius-large);padding:20px;box-shadow:var(--box-shadow-card)}.quick-grid[data-v-545d4c27]{display:flex;flex-direction:column;gap:12px}.quick-card[data-v-545d4c27]{display:flex;align-items:center;gap:16px;padding:16px;background:var(--color-fill-light);border-radius:var(--border-radius-base);text-decoration:none;transition:all .2s ease}.quick-card[data-v-545d4c27]:hover{background:var(--color-primary-light-6);transform:translate(4px)}.quick-card:hover .quick-arrow[data-v-545d4c27]{color:var(--color-primary);transform:translate(4px)}.quick-card .quick-icon[data-v-545d4c27]{width:44px;height:44px;display:flex;align-items:center;justify-content:center;background:var(--bg-color);border-radius:var(--border-radius-base);font-size:22px;flex-shrink:0}.quick-card .quick-info[data-v-545d4c27]{flex:1;min-width:0}.quick-card .quick-title[data-v-545d4c27]{font-size:15px;font-weight:500;color:var(--color-text-primary);margin-bottom:4px}.quick-card .quick-desc[data-v-545d4c27]{font-size:13px;color:var(--color-text-secondary)}.quick-card .quick-arrow[data-v-545d4c27]{width:24px;height:24px;display:flex;align-items:center;justify-content:center;color:var(--color-text-placeholder);transition:all .2s ease}.quick-card .quick-arrow svg[data-v-545d4c27]{width:16px;height:16px}.activity-section[data-v-545d4c27]{background:var(--bg-color);border-radius:var(--border-radius-large);padding:20px;box-shadow:var(--box-shadow-card)}.activity-list[data-v-545d4c27]{display:flex;flex-direction:column}.activity-item[data-v-545d4c27]{display:flex;align-items:flex-start;gap:12px;padding:14px 0;border-bottom:1px solid var(--color-border-lighter);position:relative}.activity-item[data-v-545d4c27]:last-child{border-bottom:none}.activity-avatar[data-v-545d4c27]{width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:50%;font-size:14px;font-weight:500;flex-shrink:0}.activity-avatar.success[data-v-545d4c27]{background:var(--color-success-lighter);color:var(--color-success)}.activity-avatar.warning[data-v-545d4c27]{background:var(--color-warning-lighter);color:var(--color-warning)}.activity-avatar.info[data-v-545d4c27]{background:var(--color-info-lighter);color:var(--color-info)}.activity-avatar.danger[data-v-545d4c27]{background:var(--color-danger-lighter);color:var(--color-danger)}.activity-avatar.primary[data-v-545d4c27]{background:var(--color-primary-light-6);color:var(--color-primary)}.activity-content[data-v-545d4c27]{flex:1;min-width:0}.activity-main[data-v-545d4c27]{margin-bottom:4px}.activity-user[data-v-545d4c27]{font-size:14px;font-weight:500;color:var(--color-text-primary);margin-right:8px}.activity-action[data-v-545d4c27]{font-size:14px;color:var(--color-text-secondary)}.activity-time[data-v-545d4c27]{font-size:12px;color:var(--color-text-placeholder)}.activity-dot[data-v-545d4c27]{position:absolute;left:-20px;top:50%;transform:translateY(-50%);width:8px;height:8px;border-radius:50%;opacity:.6}.activity-dot.success[data-v-545d4c27]{background:var(--color-success)}.activity-dot.warning[data-v-545d4c27]{background:var(--color-warning)}.activity-dot.info[data-v-545d4c27]{background:var(--color-info)}.activity-dot.danger[data-v-545d4c27]{background:var(--color-danger)}.activity-dot.primary[data-v-545d4c27]{background:var(--color-primary)}.system-section[data-v-545d4c27]{background:var(--bg-color);border-radius:var(--border-radius-large);padding:20px;box-shadow:var(--box-shadow-card)}.system-grid[data-v-545d4c27]{display:grid;grid-template-columns:1fr 1.5fr;gap:24px}@media (max-width: 768px){.system-grid[data-v-545d4c27]{grid-template-columns:1fr}}.system-info-list[data-v-545d4c27]{display:flex;flex-direction:column;gap:12px}.info-item[data-v-545d4c27]{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:var(--color-fill-light);border-radius:var(--border-radius-base)}.info-item .info-label[data-v-545d4c27]{font-size:14px;color:var(--color-text-secondary)}.info-item .info-value[data-v-545d4c27]{font-size:14px;font-weight:500;color:var(--color-text-primary)}.system-status[data-v-545d4c27]{display:flex;flex-direction:column;gap:16px}.status-item .status-header[data-v-545d4c27]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.status-item .status-label[data-v-545d4c27]{font-size:14px;color:var(--color-text-secondary)}.status-item .status-value[data-v-545d4c27]{font-size:14px;font-weight:500;color:var(--color-text-primary)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as R,q as K,o as f,c as y,a as e,z as a,C as o,u as t,j as u,F as A,A as w,k as h,e as P,I as N,S as Z,i as m,f as G,n as J}from"./vue-vendor-gcK82_Kd.js";import{t as S,n as c,j as x,o as Q,Z as U}from"./xto-form-BBugNbnQ.js";import{E as W,L as X}from"./xto-data-2diO2SyB.js";import{r as Y,h as ee,x as C}from"./xto-feedback-BOOXC1Ev.js";import{M as g,g as L}from"./xto-base-wYW0Uxvr.js";import{S as d,a as se}from"./index-BRR97dc6.js";import{_ as te}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./xto-core-DtPNWVUu.js";const le={class:"user-page"},ae={class:"search-section"},oe={class:"table-section"},ne={class:"table-toolbar"},ie={class:"toolbar-left"},de={class:"toolbar-right"},re={class:"table-count"},ue={class:"table-wrapper"},me={class:"data-table"},ce={key:0},pe={key:1},ve={class:"col-id"},fe={class:"id-badge"},he={class:"col-user"},ge={class:"user-info"},ke={class:"user-avatar"},_e={class:"user-detail"},ye={class:"user-nickname"},xe={class:"user-username"},Ve={class:"col-contact"},Ee={class:"contact-info"},be={class:"contact-email"},Be={class:"contact-phone"},Ce={class:"col-roles"},Le={class:"role-tags"},De={class:"col-status"},ze={class:"status-switch"},Ae={class:"col-time"},we={class:"time-text"},Ne={class:"col-actions"},Se={class:"pagination-wrapper"},Ue={class:"status-field"},Me={class:"status-label"},Te=R({__name:"index",setup(Ie){const M=[{id:1,username:"admin",nickname:"管理员",email:"admin@example.com",phone:"13800138001",status:d.ENABLED,roles:["admin"],createTime:"2024-01-01 10:00:00"},{id:2,username:"zhangsan",nickname:"张三",email:"zhangsan@example.com",phone:"13800138002",status:d.ENABLED,roles:["editor"],createTime:"2024-01-02 10:00:00"},{id:3,username:"lisi",nickname:"李四",email:"lisi@example.com",phone:"13800138003",status:d.DISABLED,roles:["viewer"],createTime:"2024-01-03 10:00:00"},{id:4,username:"wangwu",nickname:"王五",email:"wangwu@example.com",phone:"13800138004",status:d.ENABLED,roles:["editor"],createTime:"2024-01-04 10:00:00"},{id:5,username:"zhaoliu",nickname:"赵六",email:"zhaoliu@example.com",phone:"13800138005",status:d.ENABLED,roles:["viewer"],createTime:"2024-01-05 10:00:00"}],E=h(!1),b=h([]),B=h(0),k=h(1),V=h(10),r=N({keyword:"",status:void 0}),_=h(!1),T=P(()=>n.id?"编辑用户":"新增用户"),n=N({id:0,username:"",nickname:"",email:"",phone:"",status:d.ENABLED,roles:[]}),I={username:[{required:!0,message:"请输入用户名",trigger:"blur"}],nickname:[{required:!0,message:"请输入昵称",trigger:"blur"}],email:[{required:!0,message:"请输入邮箱",trigger:"blur"},{type:"email",message:"请输入正确的邮箱格式",trigger:"blur"}]},D=h(),p=()=>{E.value=!0,setTimeout(()=>{let i=[...M];r.keyword&&(i=i.filter(s=>s.username.includes(r.keyword)||s.nickname.includes(r.keyword))),r.status!==void 0&&(i=i.filter(s=>s.status===r.status)),B.value=i.length,b.value=i.slice((k.value-1)*V.value,k.value*V.value),E.value=!1},300)},z=()=>{k.value=1,p()},j=()=>{r.keyword="",r.status=void 0,k.value=1,p()},H=()=>{Object.assign(n,{id:0,username:"",nickname:"",email:"",phone:"",status:d.ENABLED,roles:[]}),_.value=!0},$=i=>{Object.assign(n,i),_.value=!0},q=i=>{C.success("删除成功"),p()},F=async()=>{var i;try{await((i=D.value)==null?void 0:i.validate()),C.success(n.id?"编辑成功":"新增成功"),_.value=!1,p()}catch(s){console.error(s)}},O=i=>{C.success(`已${i.status===d.ENABLED?"启用":"禁用"}用户 ${i.username}`)};return K(()=>{p()}),(i,s)=>(f(),y("div",le,[e("div",ae,[a(t(S),{model:r,inline:"",class:"search-form"},{default:o(()=>[a(t(c),{label:"关键词"},{default:o(()=>[a(t(x),{modelValue:r.keyword,"onUpdate:modelValue":s[0]||(s[0]=l=>r.keyword=l),placeholder:"用户名/昵称",clearable:"",onKeyup:Z(z,["enter"])},null,8,["modelValue"])]),_:1}),a(t(c),{label:"状态"},{default:o(()=>[a(t(Q),{modelValue:r.status,"onUpdate:modelValue":s[1]||(s[1]=l=>r.status=l),options:t(se),placeholder:"请选择",clearable:""},null,8,["modelValue","options"])]),_:1}),a(t(c),null,{default:o(()=>[a(t(L),null,{default:o(()=>[a(t(g),{type:"primary",onClick:z},{icon:o(()=>[...s[11]||(s[11]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("circle",{cx:"11",cy:"11",r:"8"}),e("path",{d:"M21 21l-4.35-4.35"})],-1)])]),default:o(()=>[s[12]||(s[12]=m(" 搜索 ",-1))]),_:1}),a(t(g),{onClick:j},{icon:o(()=>[...s[13]||(s[13]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M3 12a9 9 0 109-9 9.75 9.75 0 00-6.74 2.74L3 8"}),e("path",{d:"M3 3v5h5"})],-1)])]),default:o(()=>[s[14]||(s[14]=m(" 重置 ",-1))]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),e("div",oe,[e("div",ne,[e("div",ie,[a(t(g),{type:"primary",onClick:H},{icon:o(()=>[...s[15]||(s[15]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1)])]),default:o(()=>[s[16]||(s[16]=m(" 新增用户 ",-1))]),_:1})]),e("div",de,[e("span",re,"共 "+u(B.value)+" 条数据",1)])]),e("div",ue,[e("table",me,[s[23]||(s[23]=e("thead",null,[e("tr",null,[e("th",{class:"col-id"},"ID"),e("th",{class:"col-user"},"用户信息"),e("th",{class:"col-contact"},"联系方式"),e("th",{class:"col-roles"},"角色"),e("th",{class:"col-status"},"状态"),e("th",{class:"col-time"},"创建时间"),e("th",{class:"col-actions"},"操作")])],-1)),e("tbody",null,[E.value?(f(),y("tr",ce,[...s[17]||(s[17]=[e("td",{colspan:"7",class:"loading-cell"},[e("div",{class:"loading-content"},[e("div",{class:"loading-spinner"}),e("span",null,"加载中...")])],-1)])])):b.value.length===0?(f(),y("tr",pe,[...s[18]||(s[18]=[e("td",{colspan:"7",class:"empty-cell"},[e("div",{class:"empty-content"},[e("svg",{viewBox:"0 0 64 41",fill:"none"},[e("g",{transform:"translate(0 1)"},[e("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),e("g",{stroke:"var(--color-text-placeholder)","stroke-width":"2"},[e("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),e("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35H11.95C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:"var(--color-fill)"})])])]),e("span",null,"暂无数据")])],-1)])])):(f(!0),y(A,{key:2},w(b.value,l=>(f(),y("tr",{key:l.id,class:"data-row"},[e("td",ve,[e("span",fe,u(l.id),1)]),e("td",he,[e("div",ge,[e("div",ke,u(l.nickname.charAt(0)),1),e("div",_e,[e("span",ye,u(l.nickname),1),e("span",xe,"@"+u(l.username),1)])])]),e("td",Ve,[e("div",Ee,[e("span",be,u(l.email),1),e("span",Be,u(l.phone),1)])]),e("td",Ce,[e("div",Le,[(f(!0),y(A,null,w(l.roles,v=>(f(),G(t(X),{key:v,size:"small",type:v==="admin"?"primary":"info"},{default:o(()=>[m(u(v),1)]),_:2},1032,["type"]))),128))])]),e("td",De,[e("div",ze,[a(t(U),{"model-value":l.status===t(d).ENABLED,"onUpdate:modelValue":v=>{l.status=v?t(d).ENABLED:t(d).DISABLED,O(l)}},null,8,["model-value","onUpdate:modelValue"]),e("span",{class:J(["status-text",{enabled:l.status===t(d).ENABLED}])},u(l.status===t(d).ENABLED?"已启用":"已禁用"),3)])]),e("td",Ae,[e("span",we,u(l.createTime),1)]),e("td",Ne,[a(t(L),{class:"action-buttons"},{default:o(()=>[a(t(g),{type:"primary",link:"",size:"small",onClick:v=>$(l)},{icon:o(()=>[...s[19]||(s[19]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"}),e("path",{d:"M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"})],-1)])]),default:o(()=>[s[20]||(s[20]=m(" 编辑 ",-1))]),_:1},8,["onClick"]),a(t(ee),{title:"确定删除该用户吗?",onConfirm:v=>q(l.id)},{default:o(()=>[a(t(g),{type:"danger",link:"",size:"small"},{icon:o(()=>[...s[21]||(s[21]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("polyline",{points:"3,6 5,6 21,6"}),e("path",{d:"M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"}),e("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),e("line",{x1:"14",y1:"11",x2:"14",y2:"17"})],-1)])]),default:o(()=>[s[22]||(s[22]=m(" 删除 ",-1))]),_:1})]),_:1},8,["onConfirm"])]),_:2},1024)])]))),128))])])]),e("div",Se,[a(t(W),{"current-page":k.value,"onUpdate:currentPage":s[2]||(s[2]=l=>k.value=l),"page-size":V.value,"onUpdate:pageSize":s[3]||(s[3]=l=>V.value=l),total:B.value,"page-sizes":[10,20,50,100],layout:"total, sizes, prev, pager, next",onCurrentChange:p,onSizeChange:p},null,8,["current-page","page-size","total"])])]),a(t(Y),{modelValue:_.value,"onUpdate:modelValue":s[10]||(s[10]=l=>_.value=l),title:T.value,width:"520px",class:"user-modal"},{footer:o(()=>[a(t(L),null,{default:o(()=>[a(t(g),{onClick:s[9]||(s[9]=l=>_.value=!1)},{default:o(()=>[...s[24]||(s[24]=[m("取消",-1)])]),_:1}),a(t(g),{type:"primary",onClick:F},{default:o(()=>[...s[25]||(s[25]=[m("确定",-1)])]),_:1})]),_:1})]),default:o(()=>[a(t(S),{ref_key:"formRef",ref:D,model:n,rules:I,"label-width":"80px",class:"user-form"},{default:o(()=>[a(t(c),{label:"用户名",prop:"username"},{default:o(()=>[a(t(x),{modelValue:n.username,"onUpdate:modelValue":s[4]||(s[4]=l=>n.username=l),placeholder:"请输入用户名"},null,8,["modelValue"])]),_:1}),a(t(c),{label:"昵称",prop:"nickname"},{default:o(()=>[a(t(x),{modelValue:n.nickname,"onUpdate:modelValue":s[5]||(s[5]=l=>n.nickname=l),placeholder:"请输入昵称"},null,8,["modelValue"])]),_:1}),a(t(c),{label:"邮箱",prop:"email"},{default:o(()=>[a(t(x),{modelValue:n.email,"onUpdate:modelValue":s[6]||(s[6]=l=>n.email=l),placeholder:"请输入邮箱"},null,8,["modelValue"])]),_:1}),a(t(c),{label:"手机号",prop:"phone"},{default:o(()=>[a(t(x),{modelValue:n.phone,"onUpdate:modelValue":s[7]||(s[7]=l=>n.phone=l),placeholder:"请输入手机号"},null,8,["modelValue"])]),_:1}),a(t(c),{label:"状态"},{default:o(()=>[e("div",Ue,[a(t(U),{modelValue:n.status,"onUpdate:modelValue":s[8]||(s[8]=l=>n.status=l),"active-value":t(d).ENABLED,"inactive-value":t(d).DISABLED},null,8,["modelValue","active-value","inactive-value"]),e("span",Me,u(n.status===t(d).ENABLED?"启用":"禁用"),1)])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"])]))}}),Pe=te(Te,[["__scopeId","data-v-5d3ed390"]]);export{Pe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.user-page[data-v-5d3ed390]{padding:24px;background:var(--bg-color-page);min-height:100%}.search-section[data-v-5d3ed390]{background:var(--bg-color);border-radius:var(--border-radius-large);padding:20px 24px;margin-bottom:16px;box-shadow:var(--box-shadow-card)}.search-section .search-form[data-v-5d3ed390]{display:flex;flex-wrap:wrap;gap:16px}.search-section .search-form[data-v-5d3ed390] .x-form-item{margin-bottom:0}.search-section .search-form[data-v-5d3ed390] .x-input,.search-section .search-form[data-v-5d3ed390] .x-select{width:200px}.table-section[data-v-5d3ed390]{background:var(--bg-color);border-radius:var(--border-radius-large);box-shadow:var(--box-shadow-card);overflow:hidden}.table-toolbar[data-v-5d3ed390]{display:flex;justify-content:space-between;align-items:center;padding:16px 24px;border-bottom:1px solid var(--color-border-lighter)}.table-toolbar .toolbar-left[data-v-5d3ed390]{display:flex;gap:12px}.table-toolbar .table-count[data-v-5d3ed390]{font-size:14px;color:var(--color-text-secondary)}.table-wrapper[data-v-5d3ed390]{overflow-x:auto}.data-table[data-v-5d3ed390]{width:100%;border-collapse:collapse}.data-table th[data-v-5d3ed390],.data-table td[data-v-5d3ed390]{padding:14px 16px;text-align:left;border-bottom:1px solid var(--color-border-lighter)}.data-table th[data-v-5d3ed390]{font-size:14px;font-weight:500;color:var(--color-text-secondary);background:var(--color-fill-light);white-space:nowrap}.data-table .data-row[data-v-5d3ed390]{transition:background-color .2s}.data-table .data-row[data-v-5d3ed390]:hover{background:var(--color-primary-light-6)}.data-table td[data-v-5d3ed390]{vertical-align:middle}.data-table .loading-cell[data-v-5d3ed390],.data-table .empty-cell[data-v-5d3ed390]{padding:60px 20px}.data-table .loading-content[data-v-5d3ed390],.data-table .empty-content[data-v-5d3ed390]{display:flex;flex-direction:column;align-items:center;gap:16px;color:var(--color-text-placeholder)}.data-table .loading-content svg[data-v-5d3ed390],.data-table .empty-content svg[data-v-5d3ed390]{width:64px;height:41px}.data-table .loading-spinner[data-v-5d3ed390]{width:32px;height:32px;border:3px solid var(--color-border-lighter);border-top-color:var(--color-primary);border-radius:50%;animation:spin-5d3ed390 .8s linear infinite}@keyframes spin-5d3ed390{to{transform:rotate(360deg)}}.col-id[data-v-5d3ed390]{width:80px}.id-badge[data-v-5d3ed390]{display:inline-block;min-width:32px;padding:4px 10px;background:var(--color-fill);border-radius:12px;font-size:12px;font-weight:500;color:var(--color-text-secondary);text-align:center}.col-user[data-v-5d3ed390]{min-width:180px}.user-info[data-v-5d3ed390]{display:flex;align-items:center;gap:12px}.user-avatar[data-v-5d3ed390]{width:40px;height:40px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--color-primary) 0%,var(--color-primary-light-1) 100%);border-radius:50%;font-size:16px;font-weight:500;color:#fff;flex-shrink:0}.user-detail[data-v-5d3ed390]{display:flex;flex-direction:column;gap:2px}.user-nickname[data-v-5d3ed390]{font-size:14px;font-weight:500;color:var(--color-text-primary)}.user-username[data-v-5d3ed390]{font-size:12px;color:var(--color-text-placeholder)}.col-contact[data-v-5d3ed390]{min-width:180px}.contact-info[data-v-5d3ed390]{display:flex;flex-direction:column;gap:4px}.contact-email[data-v-5d3ed390],.contact-phone[data-v-5d3ed390]{font-size:13px;color:var(--color-text-regular)}.contact-phone[data-v-5d3ed390]{color:var(--color-text-secondary)}.col-roles[data-v-5d3ed390]{min-width:100px}.role-tags[data-v-5d3ed390]{display:flex;gap:6px}.col-status[data-v-5d3ed390]{min-width:120px}.status-switch[data-v-5d3ed390]{display:flex;align-items:center;gap:8px}.status-text[data-v-5d3ed390]{font-size:13px;color:var(--color-text-secondary)}.status-text.enabled[data-v-5d3ed390]{color:var(--color-success)}.col-time[data-v-5d3ed390]{min-width:160px}.time-text[data-v-5d3ed390]{font-size:13px;color:var(--color-text-secondary)}.col-actions[data-v-5d3ed390]{min-width:140px}.action-buttons[data-v-5d3ed390] .x-button{padding:4px 8px}.action-buttons[data-v-5d3ed390] .x-button svg{width:14px;height:14px;margin-right:4px}.pagination-wrapper[data-v-5d3ed390]{display:flex;justify-content:flex-end;padding:16px 24px;border-top:1px solid var(--color-border-lighter)}.user-form[data-v-5d3ed390]{padding:16px 0}.user-form .status-field[data-v-5d3ed390]{display:flex;align-items:center;gap:12px}.user-form .status-label[data-v-5d3ed390]{font-size:14px;color:var(--color-text-secondary)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as d}from"./xto-data-2diO2SyB.js";import{d as g,o as i,c as o,a as s,F as l,A as n,z as r,u,k as c,h as b,b as v,j as a,n as p,f as w,C as U}from"./vue-vendor-gcK82_Kd.js";import{_ as q}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./xto-core-DtPNWVUu.js";const x={class:"dashboard"},C={class:"stats-section"},B={class:"stat-content"},M={class:"stat-title"},I={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},V={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},z={class:"main-section"},D={class:"quick-section"},L={class:"quick-grid"},S={class:"quick-icon"},$={class:"quick-info"},F={class:"quick-title"},N={class:"quick-desc"},j={class:"activity-section"},A={class:"activity-list"},E={class:"activity-content"},O={class:"activity-main"},P={class:"activity-user"},T={class:"activity-action"},X={class:"activity-time"},G={class:"system-section"},H={class:"system-grid"},J={class:"system-info-list"},K={class:"info-label"},Q={class:"info-value"},R={class:"system-status"},W={class:"status-item"},Y={class:"status-item"},Z={class:"status-item"},ss=g({__name:"index",setup(ts){const _=c([{title:"用户总数",value:1234,icon:"👥",color:"#1677ff",trend:"+12.5%",trendUp:!0},{title:"今日访问",value:567,icon:"👀",color:"#52c41a",trend:"+8.2%",trendUp:!0},{title:"订单数量",value:890,icon:"📦",color:"#faad14",trend:"-3.1%",trendUp:!1},{title:"销售金额",value:123456,icon:"💰",color:"#ff4d4f",trend:"+15.8%",trendUp:!0}]),m=c([{user:"张三",action:"登录系统",time:"2分钟前",type:"success",avatar:"张"},{user:"李四",action:"修改了用户信息",time:"5分钟前",type:"warning",avatar:"李"},{user:"王五",action:"创建了新订单",time:"10分钟前",type:"info",avatar:"王"},{user:"赵六",action:"删除了测试数据",time:"30分钟前",type:"danger",avatar:"赵"},{user:"钱七",action:"更新了系统配置",time:"1小时前",type:"primary",avatar:"钱"}]),h=c([{title:"用户管理",path:"/system/user",icon:"👤",desc:"管理系统用户"},{title:"角色管理",path:"/system/role",icon:"👥",desc:"角色权限配置"},{title:"菜单管理",path:"/system/menu",icon:"📋",desc:"菜单路由管理"},{title:"系统设置",path:"/system",icon:"⚙️",desc:"系统参数配置"}]),y=c([{label:"系统版本",value:"v1.0.0"},{label:"Vue 版本",value:"3.4.21"},{label:"构建工具",value:"Vite 5"},{label:"UI 组件库",value:"XTO UI"}]);return(es,e)=>{const f=b("router-link");return i(),o("div",x,[s("div",C,[(i(!0),o(l,null,n(_.value,t=>(i(),o("div",{key:t.title,class:"stat-card"},[s("div",{class:"stat-icon",style:v({background:`linear-gradient(135deg, ${t.color}20 0%, ${t.color}10 100%)`})},[s("span",null,a(t.icon),1)],4),s("div",B,[s("div",M,a(t.title),1),s("div",{class:"stat-value",style:v({color:t.color})},a(t.value.toLocaleString()),5),s("div",{class:p(["stat-trend",{up:t.trendUp,down:!t.trendUp}])},[t.trendUp?(i(),o("svg",I,[...e[0]||(e[0]=[s("path",{d:"M7 17l5-5 5 5M7 7l5 5 5-5"},null,-1)])])):(i(),o("svg",V,[...e[1]||(e[1]=[s("path",{d:"M7 7l5 5 5-5M7 17l5-5 5 5"},null,-1)])])),s("span",null,a(t.trend),1)],2)]),s("div",{class:"stat-decoration",style:v({background:`linear-gradient(135deg, ${t.color}08 0%, transparent 100%)`})},null,4)]))),128))]),s("div",z,[s("div",D,[e[3]||(e[3]=s("div",{class:"section-header"},[s("h3",null,"快捷入口"),s("span",{class:"section-badge"},"4 个入口")],-1)),s("div",L,[(i(!0),o(l,null,n(h.value,t=>(i(),w(f,{key:t.path,to:t.path,class:"quick-card"},{default:U(()=>[s("div",S,a(t.icon),1),s("div",$,[s("div",F,a(t.title),1),s("div",N,a(t.desc),1)]),e[2]||(e[2]=s("div",{class:"quick-arrow"},[s("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[s("path",{d:"M9 18l6-6-6-6"})])],-1))]),_:2},1032,["to"]))),128))])]),s("div",j,[e[4]||(e[4]=s("div",{class:"section-header"},[s("h3",null,"最近活动"),s("a",{href:"#",class:"section-link"},"查看全部")],-1)),s("div",A,[(i(!0),o(l,null,n(m.value,(t,k)=>(i(),o("div",{key:k,class:"activity-item"},[s("div",{class:p(["activity-avatar",t.type])},a(t.avatar),3),s("div",E,[s("div",O,[s("span",P,a(t.user),1),s("span",T,a(t.action),1)]),s("div",X,a(t.time),1)]),s("div",{class:p(["activity-dot",t.type])},null,2)]))),128))])])]),s("div",G,[e[8]||(e[8]=s("div",{class:"section-header"},[s("h3",null,"系统信息")],-1)),s("div",H,[s("div",J,[(i(!0),o(l,null,n(y.value,t=>(i(),o("div",{key:t.label,class:"info-item"},[s("span",K,a(t.label),1),s("span",Q,a(t.value),1)]))),128))]),s("div",R,[s("div",W,[e[5]||(e[5]=s("div",{class:"status-header"},[s("span",{class:"status-label"},"服务器状态"),s("span",{class:"status-value"},"75%")],-1)),r(u(d),{percentage:75,status:"success"})]),s("div",Y,[e[6]||(e[6]=s("div",{class:"status-header"},[s("span",{class:"status-label"},"内存使用"),s("span",{class:"status-value"},"45%")],-1)),r(u(d),{percentage:45})]),s("div",Z,[e[7]||(e[7]=s("div",{class:"status-header"},[s("span",{class:"status-label"},"CPU 使用率"),s("span",{class:"status-value"},"32%")],-1)),r(u(d),{percentage:32})])])])])])}}}),ns=q(ss,[["__scopeId","data-v-545d4c27"]]);export{ns as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.role-page[data-v-de354764]{padding:24px;background:var(--bg-color-page);min-height:100%}.search-section[data-v-de354764]{background:var(--bg-color);border-radius:var(--border-radius-large);padding:20px 24px;margin-bottom:16px;box-shadow:var(--box-shadow-card)}.search-section .search-form[data-v-de354764]{display:flex;flex-wrap:wrap;gap:16px}.search-section .search-form[data-v-de354764] .x-form-item{margin-bottom:0}.search-section .search-form[data-v-de354764] .x-input,.search-section .search-form[data-v-de354764] .x-select{width:200px}.table-section[data-v-de354764]{background:var(--bg-color);border-radius:var(--border-radius-large);box-shadow:var(--box-shadow-card);overflow:hidden}.table-toolbar[data-v-de354764]{display:flex;justify-content:space-between;align-items:center;padding:16px 24px;border-bottom:1px solid var(--color-border-lighter)}.table-toolbar .toolbar-left[data-v-de354764]{display:flex;gap:12px}.table-toolbar .table-count[data-v-de354764]{font-size:14px;color:var(--color-text-secondary)}.table-wrapper[data-v-de354764]{overflow-x:auto}.data-table[data-v-de354764]{width:100%;border-collapse:collapse}.data-table th[data-v-de354764],.data-table td[data-v-de354764]{padding:14px 16px;text-align:left;border-bottom:1px solid var(--color-border-lighter)}.data-table th[data-v-de354764]{font-size:14px;font-weight:500;color:var(--color-text-secondary);background:var(--color-fill-light);white-space:nowrap}.data-table .data-row[data-v-de354764]{transition:background-color .2s}.data-table .data-row[data-v-de354764]:hover{background:var(--color-primary-light-6)}.data-table td[data-v-de354764]{vertical-align:middle}.data-table .loading-cell[data-v-de354764],.data-table .empty-cell[data-v-de354764]{padding:60px 20px}.data-table .loading-content[data-v-de354764],.data-table .empty-content[data-v-de354764]{display:flex;flex-direction:column;align-items:center;gap:16px;color:var(--color-text-placeholder)}.data-table .loading-content svg[data-v-de354764],.data-table .empty-content svg[data-v-de354764]{width:64px;height:41px}.data-table .loading-spinner[data-v-de354764]{width:32px;height:32px;border:3px solid var(--color-border-lighter);border-top-color:var(--color-primary);border-radius:50%;animation:spin-de354764 .8s linear infinite}@keyframes spin-de354764{to{transform:rotate(360deg)}}.col-id[data-v-de354764]{width:80px}.id-badge[data-v-de354764]{display:inline-block;min-width:32px;padding:4px 10px;background:var(--color-fill);border-radius:12px;font-size:12px;font-weight:500;color:var(--color-text-secondary);text-align:center}.col-name[data-v-de354764]{min-width:120px}.role-name[data-v-de354764]{font-size:14px;font-weight:500;color:var(--color-text-primary)}.col-code[data-v-de354764]{min-width:100px}.col-desc[data-v-de354764]{min-width:150px}.desc-text[data-v-de354764]{font-size:14px;color:var(--color-text-secondary)}.col-status[data-v-de354764]{min-width:120px}.status-switch[data-v-de354764]{display:flex;align-items:center;gap:8px}.status-text[data-v-de354764]{font-size:13px;color:var(--color-text-secondary)}.status-text.enabled[data-v-de354764]{color:var(--color-success)}.col-time[data-v-de354764]{min-width:160px}.time-text[data-v-de354764]{font-size:13px;color:var(--color-text-secondary)}.col-actions[data-v-de354764]{min-width:140px}.action-buttons[data-v-de354764] .x-button{padding:4px 8px}.action-buttons[data-v-de354764] .x-button svg{width:14px;height:14px;margin-right:4px}.pagination-wrapper[data-v-de354764]{display:flex;justify-content:flex-end;padding:16px 24px;border-top:1px solid var(--color-border-lighter)}.role-form[data-v-de354764]{padding:16px 0}.role-form .status-field[data-v-de354764]{display:flex;align-items:center;gap:12px}.role-form .status-label[data-v-de354764]{font-size:14px;color:var(--color-text-secondary)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as $,n as p,j as _,o as O,G as j,Z as C}from"./xto-form-BBugNbnQ.js";import{L as V}from"./xto-data-2diO2SyB.js";import{r as H,x as q}from"./xto-feedback-BOOXC1Ev.js";import{M as h,g as A}from"./xto-base-wYW0Uxvr.js";import{S as r,M as c,b as Y}from"./index-BRR97dc6.js";import{d as F,q as G,o as f,c as v,a as e,z as o,C as a,u as s,j as d,F as M,A as U,k as E,e as Z,I as J,i as m,g as K}from"./vue-vendor-gcK82_Kd.js";import{_ as P}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./xto-core-DtPNWVUu.js";const Q={class:"menu-page"},W={class:"table-section"},X={class:"table-toolbar"},ee={class:"toolbar-left"},te={class:"toolbar-right"},se={class:"table-count"},le={class:"table-wrapper"},oe={class:"data-table"},ae={key:0},ne={key:1},de={class:"data-row tree-row--level-0"},ie={class:"col-name"},re={class:"menu-info"},ue={class:"menu-icon-wrapper"},pe=["onClick"],ce={class:"col-icon"},me={class:"icon-text"},fe={class:"col-path"},ve={class:"path-code"},ye={class:"col-type"},_e={class:"col-sort"},he={class:"sort-badge"},ke={class:"col-status"},ge={class:"col-actions"},be={class:"col-name"},Ve={class:"menu-info"},Ee={class:"menu-icon-wrapper"},xe=["onClick"],Ce={class:"col-icon"},Ae={class:"icon-text"},Me={class:"col-path"},Ne={class:"path-code"},we={class:"col-type"},Le={class:"col-sort"},Be={class:"sort-badge"},De={class:"col-status"},Ue={class:"col-actions"},Ie={class:"form-grid"},Te={class:"status-field"},ze={class:"status-label"},Re={class:"status-field"},Se={class:"status-label"},$e={class:"status-field"},Oe={class:"status-label"},je=F({__name:"index",setup(He){const I=[{id:1,parentId:null,name:"Dashboard",path:"/dashboard",component:"dashboard/index",redirect:"",icon:"dashboard",title:"仪表盘",type:c.MENU,sort:1,status:r.ENABLED,hidden:!1,keepAlive:!0},{id:2,parentId:null,name:"System",path:"/system",component:"",redirect:"/system/user",icon:"setting",title:"系统管理",type:c.DIRECTORY,sort:2,status:r.ENABLED,hidden:!1,keepAlive:!1,children:[{id:21,parentId:2,name:"SystemUser",path:"/system/user",component:"system/user/index",redirect:"",icon:"user",title:"用户管理",type:c.MENU,sort:1,status:r.ENABLED,hidden:!1,keepAlive:!0},{id:22,parentId:2,name:"SystemRole",path:"/system/role",component:"system/role/index",redirect:"",icon:"role",title:"角色管理",type:c.MENU,sort:2,status:r.ENABLED,hidden:!1,keepAlive:!0},{id:23,parentId:2,name:"SystemMenu",path:"/system/menu",component:"system/menu/index",redirect:"",icon:"menu",title:"菜单管理",type:c.MENU,sort:3,status:r.ENABLED,hidden:!1,keepAlive:!0}]}],x=E(!1),k=E([]),y=E(!1),T=Z(()=>n.id?"编辑菜单":"新增菜单"),n=J({id:0,parentId:null,name:"",path:"",component:"",redirect:"",icon:"",title:"",type:c.MENU,sort:0,status:r.ENABLED,hidden:!1,keepAlive:!0}),z={name:[{required:!0,message:"请输入菜单名称",trigger:"blur"}],path:[{required:!0,message:"请输入路由路径",trigger:"blur"}],title:[{required:!0,message:"请输入菜单标题",trigger:"blur"}]},N=E(),w=()=>{x.value=!0,setTimeout(()=>{k.value=I,x.value=!1},300)},L=(u=null)=>{Object.assign(n,{id:0,parentId:u,name:"",path:"",component:"",redirect:"",icon:"",title:"",type:c.MENU,sort:0,status:r.ENABLED,hidden:!1,keepAlive:!0}),y.value=!0},g=u=>{Object.assign(n,u),y.value=!0},R=async()=>{var u;try{await((u=N.value)==null?void 0:u.validate()),q.success(n.id?"编辑成功":"新增成功"),y.value=!1,w()}catch(t){console.error(t)}},b=u=>({dashboard:"📊",system:"⚙️",user:"👤",role:"👥",menu:"📋",setting:"🔧"})[u||""]||"📄",B=u=>{switch(u){case c.DIRECTORY:return"primary";case c.MENU:return"success";default:return"warning"}},D=u=>{switch(u){case c.DIRECTORY:return"目录";case c.MENU:return"菜单";default:return"按钮"}};return G(()=>{w()}),(u,t)=>(f(),v("div",Q,[e("div",W,[e("div",X,[e("div",ee,[o(s(h),{type:"primary",onClick:t[0]||(t[0]=l=>L())},{icon:a(()=>[...t[14]||(t[14]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1)])]),default:a(()=>[t[15]||(t[15]=m(" 新增菜单 ",-1))]),_:1})]),e("div",te,[e("span",se,"共 "+d(k.value.length)+" 个菜单",1)])]),e("div",le,[e("table",oe,[t[26]||(t[26]=e("thead",null,[e("tr",null,[e("th",{class:"col-name"},"菜单名称"),e("th",{class:"col-icon"},"图标"),e("th",{class:"col-path"},"路由路径"),e("th",{class:"col-type"},"类型"),e("th",{class:"col-sort"},"排序"),e("th",{class:"col-status"},"状态"),e("th",{class:"col-actions"},"操作")])],-1)),e("tbody",null,[x.value?(f(),v("tr",ae,[...t[16]||(t[16]=[e("td",{colspan:"7",class:"loading-cell"},[e("div",{class:"loading-content"},[e("div",{class:"loading-spinner"}),e("span",null,"加载中...")])],-1)])])):k.value.length===0?(f(),v("tr",ne,[...t[17]||(t[17]=[e("td",{colspan:"7",class:"empty-cell"},[e("div",{class:"empty-content"},[e("svg",{viewBox:"0 0 64 41",fill:"none"},[e("g",{transform:"translate(0 1)"},[e("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),e("g",{stroke:"var(--color-text-placeholder)","stroke-width":"2"},[e("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),e("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35H11.95C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:"var(--color-fill)"})])])]),e("span",null,"暂无数据")])],-1)])])):(f(!0),v(M,{key:2},U(k.value,l=>(f(),v(M,{key:l.id},[e("tr",de,[e("td",ie,[e("div",re,[e("span",ue,d(b(l.icon)),1),e("span",{class:"menu-title",onClick:i=>g(l)},d(l.title),9,pe)])]),e("td",ce,[e("span",me,d(b(l.icon)),1)]),e("td",fe,[e("code",ve,d(l.path),1)]),e("td",ye,[o(s(V),{type:B(l.type),size:"small"},{default:a(()=>[m(d(D(l.type)),1)]),_:2},1032,["type"])]),e("td",_e,[e("span",he,d(l.sort),1)]),e("td",ke,[o(s(V),{type:l.status===s(r).ENABLED?"success":"danger",size:"small"},{default:a(()=>[m(d(l.status===s(r).ENABLED?"启用":"禁用"),1)]),_:2},1032,["type"])]),e("td",ge,[o(s(A),{class:"action-buttons"},{default:a(()=>[o(s(h),{type:"primary",link:"",size:"small",onClick:i=>L(l.id)},{icon:a(()=>[...t[18]||(t[18]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1)])]),default:a(()=>[t[19]||(t[19]=m(" 新增 ",-1))]),_:1},8,["onClick"]),o(s(h),{type:"primary",link:"",size:"small",onClick:i=>g(l)},{icon:a(()=>[...t[20]||(t[20]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"}),e("path",{d:"M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"})],-1)])]),default:a(()=>[t[21]||(t[21]=m(" 编辑 ",-1))]),_:1},8,["onClick"])]),_:2},1024)])]),l.children?(f(!0),v(M,{key:0},U(l.children,i=>(f(),v("tr",{key:i.id,class:"data-row tree-row--level-1"},[e("td",be,[e("div",Ve,[t[22]||(t[22]=e("span",{class:"tree-indent"},null,-1)),t[23]||(t[23]=e("span",{class:"tree-line"},null,-1)),e("span",Ee,d(b(i.icon)),1),e("span",{class:"menu-title",onClick:S=>g(i)},d(i.title),9,xe)])]),e("td",Ce,[e("span",Ae,d(b(i.icon)),1)]),e("td",Me,[e("code",Ne,d(i.path),1)]),e("td",we,[o(s(V),{type:B(i.type),size:"small"},{default:a(()=>[m(d(D(i.type)),1)]),_:2},1032,["type"])]),e("td",Le,[e("span",Be,d(i.sort),1)]),e("td",De,[o(s(V),{type:i.status===s(r).ENABLED?"success":"danger",size:"small"},{default:a(()=>[m(d(i.status===s(r).ENABLED?"启用":"禁用"),1)]),_:2},1032,["type"])]),e("td",Ue,[o(s(A),{class:"action-buttons"},{default:a(()=>[o(s(h),{type:"primary",link:"",size:"small",onClick:S=>g(i)},{icon:a(()=>[...t[24]||(t[24]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"}),e("path",{d:"M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"})],-1)])]),default:a(()=>[t[25]||(t[25]=m(" 编辑 ",-1))]),_:1},8,["onClick"])]),_:2},1024)])]))),128)):K("",!0)],64))),128))])])])]),o(s(H),{modelValue:y.value,"onUpdate:modelValue":t[13]||(t[13]=l=>y.value=l),title:T.value,width:"600px",class:"menu-modal"},{footer:a(()=>[o(s(A),null,{default:a(()=>[o(s(h),{onClick:t[12]||(t[12]=l=>y.value=!1)},{default:a(()=>[...t[27]||(t[27]=[m("取消",-1)])]),_:1}),o(s(h),{type:"primary",onClick:R},{default:a(()=>[...t[28]||(t[28]=[m("确定",-1)])]),_:1})]),_:1})]),default:a(()=>[o(s($),{ref_key:"formRef",ref:N,model:n,rules:z,"label-width":"80px",class:"menu-form"},{default:a(()=>[e("div",Ie,[o(s(p),{label:"上级菜单",class:"form-item-full"},{default:a(()=>[o(s(_),{modelValue:n.parentId,"onUpdate:modelValue":t[1]||(t[1]=l=>n.parentId=l),placeholder:"上级菜单ID",disabled:""},null,8,["modelValue"])]),_:1}),o(s(p),{label:"菜单类型"},{default:a(()=>[o(s(O),{modelValue:n.type,"onUpdate:modelValue":t[2]||(t[2]=l=>n.type=l),options:s(Y)},null,8,["modelValue","options"])]),_:1}),o(s(p),{label:"排序"},{default:a(()=>[o(s(j),{modelValue:n.sort,"onUpdate:modelValue":t[3]||(t[3]=l=>n.sort=l),min:0},null,8,["modelValue"])]),_:1}),o(s(p),{label:"菜单名称",prop:"name"},{default:a(()=>[o(s(_),{modelValue:n.name,"onUpdate:modelValue":t[4]||(t[4]=l=>n.name=l),placeholder:"请输入菜单名称(路由name)"},null,8,["modelValue"])]),_:1}),o(s(p),{label:"菜单标题",prop:"title"},{default:a(()=>[o(s(_),{modelValue:n.title,"onUpdate:modelValue":t[5]||(t[5]=l=>n.title=l),placeholder:"请输入菜单标题"},null,8,["modelValue"])]),_:1}),o(s(p),{label:"路由路径",prop:"path",class:"form-item-full"},{default:a(()=>[o(s(_),{modelValue:n.path,"onUpdate:modelValue":t[6]||(t[6]=l=>n.path=l),placeholder:"请输入路由路径"},null,8,["modelValue"])]),_:1}),o(s(p),{label:"组件路径",class:"form-item-full"},{default:a(()=>[o(s(_),{modelValue:n.component,"onUpdate:modelValue":t[7]||(t[7]=l=>n.component=l),placeholder:"请输入组件路径"},null,8,["modelValue"])]),_:1}),o(s(p),{label:"图标"},{default:a(()=>[o(s(_),{modelValue:n.icon,"onUpdate:modelValue":t[8]||(t[8]=l=>n.icon=l),placeholder:"请输入图标名称"},null,8,["modelValue"])]),_:1}),o(s(p),{label:"状态"},{default:a(()=>[e("div",Te,[o(s(C),{modelValue:n.status,"onUpdate:modelValue":t[9]||(t[9]=l=>n.status=l),"active-value":s(r).ENABLED,"inactive-value":s(r).DISABLED},null,8,["modelValue","active-value","inactive-value"]),e("span",ze,d(n.status===s(r).ENABLED?"启用":"禁用"),1)])]),_:1}),o(s(p),{label:"隐藏"},{default:a(()=>[e("div",Re,[o(s(C),{modelValue:n.hidden,"onUpdate:modelValue":t[10]||(t[10]=l=>n.hidden=l)},null,8,["modelValue"]),e("span",Se,d(n.hidden?"隐藏":"显示"),1)])]),_:1}),o(s(p),{label:"缓存"},{default:a(()=>[e("div",$e,[o(s(C),{modelValue:n.keepAlive,"onUpdate:modelValue":t[11]||(t[11]=l=>n.keepAlive=l)},null,8,["modelValue"]),e("span",Oe,d(n.keepAlive?"开启":"关闭"),1)])]),_:1})])]),_:1},8,["model"])]),_:1},8,["modelValue","title"])]))}}),Qe=P(je,[["__scopeId","data-v-e7cc9235"]]);export{Qe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as B,o as m,c as g,P as z,a as r,z as i,C as f,u as n,I as T,k as h,Q as M,R,S as I,i as j}from"./vue-vendor-gcK82_Kd.js";import{n as C,M as L}from"./xto-base-wYW0Uxvr.js";import{t as S,n as w,j as V,l as N}from"./xto-form-BBugNbnQ.js";import{x as l}from"./xto-feedback-BOOXC1Ev.js";import{J as P,a as q}from"./vendor-CWD9azq9.js";import{g as E,a as O,c as b,b as U,d as A,s as D}from"./index-DCn9x-He.js";import{_ as J}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./xto-core-DtPNWVUu.js";import"./xto-data-2diO2SyB.js";import"./xto-navigation-D_LFy9y9.js";/* empty css *//* empty css */const K=P({storeAsString:!0});function k(){const s="/";return(s.endsWith("/")?s:s+"/")+"login"}const X=()=>{const s=q.create({timeout:3e4,headers:{"Content-Type":"application/json"},transformResponse:[e=>{if(typeof e=="string")try{return K.parse(e)}catch{return e}return e}]});return s.interceptors.request.use(e=>{const a="/api";e.baseURL||(e.baseURL=a);const d=E(),c=O()||"Bearer";return d&&(e.headers.Authorization=`${c} ${d}`),e},e=>Promise.reject(e)),s.interceptors.response.use(e=>{const{data:a}=e;return a.code===200||a.code===0?a.data:a.code===9121?(l.error("登录已过期,请重新登录"),b(),window.location.href=k(),Promise.reject(new Error(a.message||"EXPIRED OR INVALID TOKEN"))):(l.error(a.message||"请求失败"),Promise.reject(new Error(a.message||"请求失败")))},e=>{var d,c;const{response:a}=e;if(a){const{data:o}=a;if((o==null?void 0:o.code)===9121)return l.error("登录已过期,请重新登录"),b(),window.location.href=k(),Promise.reject(e);switch(a.status){case 401:l.error("登录已过期,请重新登录"),b(),window.location.href=k();break;case 403:l.error("没有权限访问");break;case 404:l.error("请求资源不存在");break;case 500:l.error(((d=a.data)==null?void 0:d.message)||"服务器错误");break;default:l.error(((c=a.data)==null?void 0:c.message)||"请求失败")}}else l.error("网络连接失败");return Promise.reject(e)}),s},u=X(),$={get(s,e){return u.get(s,e)},post(s,e,a){return u.post(s,e,a)},put(s,e,a){return u.put(s,e,a)},patch(s,e,a){return u.patch(s,e,a)},delete(s,e){return u.delete(s,e)},download(s,e){return u.get(s,{...e,responseType:"blob"})}};function H(s){return $.post("/user/v1.0/login/by-domain",s)}const Q={class:"login-page"},W={class:"login-form-section"},F={class:"form-container"},G={class:"input-wrapper"},Y={class:"input-wrapper"},Z={class:"form-options"},ee={key:0},te={key:1},ae=B({__name:"index",setup(s){const e=M(),a=R(),d=h(!1),c=h(!1),o=T({uid:"",password:""}),_={uid:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:6,message:"密码长度至少6位",trigger:"blur"}]},x=h(),y=async()=>{var p;try{await((p=x.value)==null?void 0:p.validate()),d.value=!0;const t=await H({appId:A(),clientId:U(),uid:o.uid,password:o.password,code:!0});D(t),l.success("登录成功");const v=a.query.redirect;v?e.push(v):e.push({name:"Dashboard"})}catch(t){console.error("登录失败:",t)}finally{d.value=!1}};return(p,t)=>(m(),g("div",Q,[t[10]||(t[10]=z('<div class="login-brand" data-v-ef91e533><div class="brand-content" data-v-ef91e533><div class="brand-logo" data-v-ef91e533><div class="logo-icon" data-v-ef91e533><svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-ef91e533><rect width="48" height="48" rx="12" fill="currentColor" data-v-ef91e533></rect><path d="M14 24L20 30L34 16" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" data-v-ef91e533></path></svg></div><span class="logo-text" data-v-ef91e533>XTO</span></div><div class="brand-slogan" data-v-ef91e533><h1 data-v-ef91e533>企业级后台管理解决方案</h1><p data-v-ef91e533>开箱即用的中后台前端/设计解决方案</p></div><div class="brand-features" data-v-ef91e533><div class="feature-item" data-v-ef91e533><div class="feature-icon" data-v-ef91e533><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-ef91e533><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" data-v-ef91e533></path></svg></div><div class="feature-text" data-v-ef91e533><h4 data-v-ef91e533>高性能</h4><p data-v-ef91e533>极致的渲染性能与响应速度</p></div></div><div class="feature-item" data-v-ef91e533><div class="feature-icon" data-v-ef91e533><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-ef91e533><rect x="3" y="3" width="18" height="18" rx="2" data-v-ef91e533></rect><path d="M9 9h6M9 12h6M9 15h4" data-v-ef91e533></path></svg></div><div class="feature-text" data-v-ef91e533><h4 data-v-ef91e533>丰富组件</h4><p data-v-ef91e533>60+ 高质量业务组件</p></div></div><div class="feature-item" data-v-ef91e533><div class="feature-icon" data-v-ef91e533><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-ef91e533><circle cx="12" cy="12" r="10" data-v-ef91e533></circle><path d="M12 6v6l4 2" data-v-ef91e533></path></svg></div><div class="feature-text" data-v-ef91e533><h4 data-v-ef91e533>持续更新</h4><p data-v-ef91e533>活跃的社区与快速迭代</p></div></div></div><div class="brand-decoration" data-v-ef91e533><div class="decoration-line" data-v-ef91e533></div><div class="decoration-dots" data-v-ef91e533><span data-v-ef91e533></span><span data-v-ef91e533></span><span data-v-ef91e533></span></div></div></div><div class="brand-bg" data-v-ef91e533><div class="bg-grid" data-v-ef91e533></div><div class="bg-glow" data-v-ef91e533></div><div class="bg-pattern" data-v-ef91e533></div></div></div>',1)),r("div",W,[r("div",F,[t[7]||(t[7]=r("div",{class:"form-header"},[r("h2",null,"欢迎登录"),r("p",null,"请输入您的账户信息")],-1)),i(n(S),{ref_key:"formRef",ref:x,model:o,rules:_,class:"login-form","label-width":"0"},{default:f(()=>[i(n(w),{prop:"uid"},{default:f(()=>[r("div",G,[t[3]||(t[3]=r("label",{class:"input-label"},"用户名",-1)),i(n(V),{modelValue:o.uid,"onUpdate:modelValue":t[0]||(t[0]=v=>o.uid=v),placeholder:"请输入用户名",size:"large"},{prefix:f(()=>[i(n(C),{name:"user",size:18})]),_:1},8,["modelValue"])])]),_:1}),i(n(w),{prop:"password"},{default:f(()=>[r("div",Y,[t[4]||(t[4]=r("label",{class:"input-label"},"密码",-1)),i(n(V),{modelValue:o.password,"onUpdate:modelValue":t[1]||(t[1]=v=>o.password=v),type:"password",placeholder:"请输入密码",size:"large","show-password":"",onKeyup:I(y,["enter"])},{prefix:f(()=>[i(n(C),{name:"lock",size:18})]),_:1},8,["modelValue"])])]),_:1}),r("div",Z,[i(n(N),{modelValue:c.value,"onUpdate:modelValue":t[2]||(t[2]=v=>c.value=v)},{default:f(()=>[...t[5]||(t[5]=[j("记住我",-1)])]),_:1},8,["modelValue"]),t[6]||(t[6]=r("a",{href:"#",class:"forgot-link"},"忘记密码?",-1))]),i(n(w),null,{default:f(()=>[i(n(L),{type:"primary",size:"large",loading:d.value,class:"login-btn",onClick:y},{default:f(()=>[d.value?(m(),g("span",te,"登录中...")):(m(),g("span",ee,"登 录"))]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"]),t[8]||(t[8]=z('<div class="form-footer" data-v-ef91e533><p data-v-ef91e533>其他登录方式</p><div class="social-login" data-v-ef91e533><button class="social-btn" title="企业微信" data-v-ef91e533><svg viewBox="0 0 24 24" fill="currentColor" data-v-ef91e533><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z" data-v-ef91e533></path></svg></button><button class="social-btn" title="钉钉" data-v-ef91e533><svg viewBox="0 0 24 24" fill="currentColor" data-v-ef91e533><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.64 6.8c-.15 1.58-.8 5.42-1.13 7.19-.14.75-.42 1-.68 1.03-.58.05-1.02-.38-1.58-.75-.88-.58-1.38-.94-2.23-1.5-.99-.65-.35-1.01.22-1.59.15-.15 2.71-2.48 2.76-2.69a.2.2 0 00-.05-.18c-.06-.05-.14-.03-.21-.02-.09.02-1.49.95-4.22 2.79-.4.27-.76.41-1.08.4-.36-.01-1.04-.2-1.55-.37-.63-.2-1.12-.31-1.08-.66.02-.18.27-.36.74-.55 2.92-1.27 4.86-2.11 5.83-2.51 2.78-1.16 3.35-1.36 3.73-1.36.08 0 .27.02.39.12.1.08.13.19.14.27-.01.06.01.24 0 .38z" data-v-ef91e533></path></svg></button><button class="social-btn" title="飞书" data-v-ef91e533><svg viewBox="0 0 24 24" fill="currentColor" data-v-ef91e533><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" data-v-ef91e533></path></svg></button></div></div>',1))]),t[9]||(t[9]=r("div",{class:"copyright"},[r("p",null,"© 2024 XTO Team. All rights reserved.")],-1))])]))}}),me=J(ae,[["__scopeId","data-v-ef91e533"]]);export{me as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.app{width:100%;height:100%;background-color:var(--bg-color-page);transition:background-color .3s var(--transition-easing);font-family:var(--font-family);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--color-border-light);border-radius:4px;transition:background .2s}::-webkit-scrollbar-thumb:hover{background:var(--color-border)}::selection{background:var(--color-primary-light-5);color:var(--color-primary-dark-2)}:root{--color-primary: #1677ff;--color-primary-light-1: #4096ff;--color-primary-light-2: #69b1ff;--color-primary-light-3: #91caff;--color-primary-light-4: #bae0ff;--color-primary-light-5: #e6f4ff;--color-primary-light-6: #f0f8ff;--color-primary-dark-1: #0958d9;--color-primary-dark-2: #003eb3;--color-primary-dark-3: #002c8c;--color-success: #52c41a;--color-success-light: #b7eb8f;--color-success-lighter: #f6ffed;--color-success-dark: #389e0d;--color-warning: #faad14;--color-warning-light: #ffe58f;--color-warning-lighter: #fffbe6;--color-warning-dark: #d48806;--color-danger: #ff4d4f;--color-danger-light: #ffa39e;--color-danger-lighter: #fff2f0;--color-danger-dark: #cf1322;--color-info: #1677ff;--color-info-light: #91caff;--color-info-lighter: #e6f4ff;--color-info-dark: #0958d9;--color-text-primary: #1f1f1f;--color-text-regular: #424242;--color-text-secondary: #757575;--color-text-placeholder: #9e9e9e;--color-text-disabled: #bdbdbd;--color-border: #d9d9d9;--color-border-light: #e8e8e8;--color-border-lighter: #f0f0f0;--color-border-extra-light: #f5f5f5;--color-border-dark: #bfbfbf;--color-fill: #f5f5f5;--color-fill-light: #fafafa;--color-fill-lighter: #ffffff;--color-fill-blank: #ffffff;--color-fill-dark: #e8e8e8;--bg-color: #ffffff;--bg-color-page: #f0f2f5;--bg-color-component: #ffffff;--bg-color-overlay: #ffffff;--bg-color-spotlight: #e6f4ff;--box-shadow: 0 6px 16px 0 rgba(0, 0, 0, .08), 0 3px 6px -4px rgba(0, 0, 0, .12), 0 9px 28px 8px rgba(0, 0, 0, .05);--box-shadow-light: 0 1px 2px 0 rgba(0, 0, 0, .03), 0 1px 6px -1px rgba(0, 0, 0, .02), 0 2px 4px 0 rgba(0, 0, 0, .02);--box-shadow-lighter: 0 1px 4px rgba(0, 0, 0, .04);--box-shadow-dark: 0 6px 16px -8px rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03);--box-shadow-card: 0 1px 10px -6px rgba(0, 0, 0, .1);--box-shadow-card-hover: 0 6px 16px -8px rgba(0, 0, 0, .12);--font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";--font-family-code: "IBM Plex Mono", "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;--font-size-base: 14px;--font-size-small: 12px;--font-size-large: 16px;--font-size-extra-large: 20px;--font-size-title: 24px;--font-size-hero: 38px;--font-line-height: 1.5714285714285714;--border-radius-base: 6px;--border-radius-small: 4px;--border-radius-large: 8px;--border-radius-extra-large: 12px;--border-radius-round: 24px;--border-radius-circle: 50%;--spacing-xs: 4px;--spacing-sm: 8px;--spacing-md: 16px;--spacing-lg: 24px;--spacing-xl: 32px;--spacing-xxl: 48px;--component-size-large: 40px;--component-size-default: 32px;--component-size-small: 24px;--transition-duration: .2s;--transition-duration-fast: .1s;--transition-duration-slow: .3s;--transition-easing: cubic-bezier(.645, .045, .355, 1);--transition-easing-bounce: cubic-bezier(.68, -.55, .265, 1.55);--z-index-dropdown: 1000;--z-index-sticky: 1020;--z-index-fixed: 1030;--z-index-modal-backdrop: 1040;--z-index-modal: 1050;--z-index-popover: 1060;--z-index-tooltip: 1070;--sidebar-width: 220px;--sidebar-collapsed-width: 64px;--header-height: 56px;--tabs-height: 40px;--footer-height: 32px;--gradient-primary: linear-gradient(135deg, #1677ff 0%, #4096ff 100%);--gradient-hero: linear-gradient(135deg, #002c8c 0%, #1677ff 50%, #4096ff 100%);--gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .8) 100%);--gradient-mask: linear-gradient(180deg, rgba(0, 44, 140, .03) 0%, rgba(0, 0, 0, 0) 100%)}.dark{--color-text-primary: #ffffff;--color-text-regular: #e0e0e0;--color-text-secondary: #a6a6a6;--color-text-placeholder: #737373;--color-text-disabled: #5c5c5c;--color-border: #434343;--color-border-light: #363636;--color-border-lighter: #2a2a2a;--color-border-extra-light: #1f1f1f;--color-border-dark: #5c5c5c;--color-fill: #262626;--color-fill-light: #1f1f1f;--color-fill-lighter: #141414;--color-fill-blank: #141414;--color-fill-dark: #363636;--bg-color: #141414;--bg-color-page: #0a0a0a;--bg-color-component: #1f1f1f;--bg-color-overlay: #1f1f1f;--bg-color-spotlight: #111d2c;--box-shadow: 0 6px 16px 0 rgba(0, 0, 0, .32), 0 3px 6px -4px rgba(0, 0, 0, .48), 0 9px 28px 8px rgba(0, 0, 0, .2);--box-shadow-light: 0 1px 2px 0 rgba(0, 0, 0, .16), 0 1px 6px -1px rgba(0, 0, 0, .12), 0 2px 4px 0 rgba(0, 0, 0, .08);--box-shadow-card: 0 1px 10px -6px rgba(0, 0, 0, .32);--box-shadow-card-hover: 0 6px 16px -8px rgba(0, 0, 0, .48);--gradient-primary: linear-gradient(135deg, #1677ff 0%, #4096ff 100%);--gradient-hero: linear-gradient(135deg, #002c8c 0%, #0958d9 50%, #1677ff 100%);--gradient-card: linear-gradient(180deg, rgba(20, 20, 20, 0) 0%, rgba(20, 20, 20, .8) 100%)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html{width:100%;height:100%;font-size:var(--font-size-base);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{width:100%;height:100%;font-family:var(--font-family);font-size:var(--font-size-base);line-height:1.5;color:var(--color-text-primary);background-color:var(--bg-color-page)}#app{width:100%;height:100%}a{color:var(--color-primary);text-decoration:none;cursor:pointer;transition:color var(--transition-duration-fast)}a:hover{color:var(--color-primary-light-3)}ul,ol{list-style:none}img{max-width:100%;height:auto;vertical-align:middle}button{cursor:pointer;font-family:inherit;font-size:inherit;border:none;background:none;outline:none}button:disabled{cursor:not-allowed}input,textarea,select{font-family:inherit;font-size:inherit;outline:none}table{border-collapse:collapse;border-spacing:0}h1,h2,h3,h4,h5,h6{margin:0;font-weight:500;color:var(--color-text-primary)}p{margin:0}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background-color:var(--color-fill-light);border-radius:3px}::-webkit-scrollbar-thumb{background-color:var(--color-border);border-radius:3px}::-webkit-scrollbar-thumb:hover{background-color:var(--color-text-secondary)}::selection{background-color:var(--color-primary-light-8);color:var(--color-primary)}.fade-enter-active,.fade-leave-active{transition:opacity var(--transition-duration)}.fade-enter-from,.fade-leave-to{opacity:0}.fade-scale-enter-active,.fade-scale-leave-active{transition:all var(--transition-duration)}.fade-scale-enter-from,.fade-scale-leave-to{opacity:0;transform:scale(.9)}.fade-transform-enter-active,.fade-transform-leave-active{transition:all var(--transition-duration-fast)}.fade-transform-enter-from{opacity:0;transform:translate(-10px)}.fade-transform-leave-to{opacity:0;transform:translate(10px)}.slide-down-enter-active,.slide-down-leave-active{transition:all var(--transition-duration)}.slide-down-enter-from,.slide-down-leave-to{opacity:0;transform:translateY(-20px)}.slide-up-enter-active,.slide-up-leave-active{transition:all var(--transition-duration)}.slide-up-enter-from,.slide-up-leave-to{opacity:0;transform:translateY(20px)}.slide-left-enter-active,.slide-left-leave-active{transition:all var(--transition-duration)}.slide-left-enter-from,.slide-left-leave-to{opacity:0;transform:translate(20px)}.slide-right-enter-active,.slide-right-leave-active{transition:all var(--transition-duration)}.slide-right-enter-from,.slide-right-leave-to{opacity:0;transform:translate(-20px)}.zoom-enter-active,.zoom-leave-active{transition:all var(--transition-duration)}.zoom-enter-from,.zoom-leave-to{opacity:0;transform:scale(.5)}.list-enter-active,.list-leave-active{transition:all var(--transition-duration)}.list-enter-from,.list-leave-to{opacity:0;transform:translateY(30px)}.collapse-transition{transition:width var(--transition-duration),padding var(--transition-duration)}.dark .sidebar,.dark .layout__aside{background-color:#1d1e1f}.dark .sidebar{border-right:1px solid #363637}.dark .sidebar__search-results{background-color:#1d1e1f;border-color:#363637}.dark .sidebar__search-item:hover{background-color:#262727}.dark .sidebar__search-item-title{color:#cfd3dc}.dark .sidebar__search-item-parent{color:#a3a6ad}.dark .sidebar__logo{border-bottom-color:#363637}.dark .sidebar__user{border-top-color:#363637}.dark .sidebar__user-name{color:#cfd3dc}.dark .sidebar__user-role{color:#a3a6ad}.dark .x-menu{background-color:#1d1e1f!important;border-color:#363637;color:#cfd3dc}.dark .x-menu.x-menu--vertical{border-right-color:#363637}.dark .x-menu.x-menu--horizontal{border-bottom-color:#363637;background-color:#1d1e1f!important}.dark .x-menu-item{color:#cfd3dc!important;background-color:transparent!important}.dark .x-menu-item:hover{background-color:#262727!important}.dark .x-menu-item.is-active{color:#409eff!important;background-color:#409eff1a!important}.dark .x-menu-item.is-active:before{background-color:#409eff}.dark .x-menu-item.is-horizontal:hover{background-color:transparent!important}.dark .x-menu-item.is-horizontal.is-active{background-color:transparent!important;border-bottom-color:#409eff}.dark .x-sub-menu__title{color:#cfd3dc!important;background-color:transparent!important}.dark .x-sub-menu__title:hover{background-color:#262727!important}.dark .x-sub-menu__menu{background-color:#1d1e1f!important;border:1px solid #363637;box-shadow:0 2px 12px #00000080}.dark .x-sub-menu__menu .x-menu-item{background-color:transparent!important;color:#cfd3dc!important}.dark .x-sub-menu__menu .x-menu-item:hover{background-color:#262727!important}.dark .x-sub-menu__menu .x-menu-item.is-active{color:#409eff!important;background-color:#409eff1a!important}.dark .x-sub-menu__arrow{color:#a3a6ad}.dark .x-sub-menu.is-active>.x-sub-menu__title{color:#409eff!important}.dark .x-sub-menu--horizontal .x-sub-menu__title:hover{background-color:transparent!important}.dark .x-sub-menu--horizontal .x-sub-menu__menu{background-color:#1d1e1f!important;border:1px solid #363637}.dark .x-sub-menu.is-collapse>.x-sub-menu__menu{background-color:#1d1e1f!important;border:1px solid #363637}.dark .header{background-color:#1d1e1f;border-bottom-color:#363637}.dark .header__collapse{color:#cfd3dc}.dark .header__breadcrumb{color:#a3a6ad}.dark .header__user-name{color:#cfd3dc}.dark .header__user-arrow{color:#a3a6ad}.dark .header__action:hover,.dark .header__user-trigger:hover{background-color:#262727}.dark .header__dropdown{background-color:#1d1e1f;border:1px solid #363637;box-shadow:0 2px 12px #00000080}.dark .header__dropdown-name{color:#e5eaf3}.dark .header__dropdown-role{color:#a3a6ad}.dark .header__dropdown-divider{background-color:#363637}.dark .header__dropdown-item{color:#cfd3dc}.dark .header__dropdown-item:hover{background-color:#262727;color:#e5eaf3}.dark .top-menu{background-color:#1d1e1f}.dark .top-menu__menu{background-color:#1d1e1f!important}.dark .top-menu__menu-char{background-color:#409eff33;color:#79bbff}.dark .top-menu__action{color:#cfd3dc}.dark .top-menu__action:hover{background-color:#262727;color:#409eff}.dark .top-menu__user-trigger:hover{background-color:#262727}.dark .top-menu__user-name{color:#cfd3dc}.dark .top-menu__user-arrow{color:#a3a6ad}.dark .top-menu__dropdown{background-color:#1d1e1f;border:1px solid #363637;box-shadow:0 2px 12px #00000080}.dark .top-menu__dropdown-name{color:#e5eaf3}.dark .top-menu__dropdown-role{color:#a3a6ad}.dark .top-menu__dropdown-divider{background-color:#363637}.dark .top-menu__dropdown-item{color:#cfd3dc}.dark .top-menu__dropdown-item:hover{background-color:#262727;color:#e5eaf3}.dark .x-button.x-button--default{background-color:#1d1e1f;border-color:#4c4d4f;color:#cfd3dc}.dark .x-button.x-button--default:hover{border-color:#409eff;color:#409eff}.dark .x-button.x-button--text{color:#409eff}.dark .x-form-item__label{color:#cfd3dc}.dark .x-form-item__error{color:#f56c6c}.dark .x-input{background-color:#1d1e1f;border-color:#4c4d4f}.dark .x-input.is-focus{border-color:#409eff}.dark .x-input .x-input__inner{background-color:transparent;color:#e5eaf3}.dark .x-input .x-input__inner::placeholder{color:#6c6e72}.dark .x-input .x-input__suffix,.dark .x-input .x-input__prefix{color:#a3a6ad}.dark .x-select{background-color:#1d1e1f;border-color:#4c4d4f}.dark .x-card{background-color:#1d1e1f;border-color:#363637}.dark .x-card__header{border-bottom-color:#363637;color:#e5eaf3}.dark .data-table th{background-color:#262727;color:#cfd3dc;border-bottom-color:#363637}.dark .data-table td{border-bottom-color:#363637;color:#cfd3dc}.dark .data-table tr:hover td{background-color:#262727}.dark .x-modal__wrapper{background-color:#000000b3}.dark .x-modal__container{background-color:#1d1e1f;border:1px solid #363637}.dark .x-modal__header{border-bottom-color:#363637;color:#e5eaf3}.dark .x-modal__footer{border-top-color:#363637}.dark .x-message{background-color:#1d1e1f;border:1px solid #363637}.dark .x-tag.x-tag--primary{background-color:#409eff33;color:#79bbff;border-color:#409eff4d}.dark .x-tag.x-tag--success{background-color:#67c23a33;color:#95d475;border-color:#67c23a4d}.dark .x-tag.x-tag--warning{background-color:#e6a23c33;color:#eebe77;border-color:#e6a23c4d}.dark .x-tag.x-tag--danger{background-color:#f56c6c33;color:#fab6b6;border-color:#f56c6c4d}.dark .x-tag.x-tag--info{background-color:#90939933;color:#c0c4cc;border-color:#9093994d}.dark .x-switch{background-color:#4c4d4f}.dark .x-switch.is-checked{background-color:#409eff}.dark .x-pagination{color:#cfd3dc}.dark .x-pagination__item{background-color:#1d1e1f;border-color:#4c4d4f;color:#cfd3dc}.dark .x-pagination__item:hover{color:#409eff}.dark .x-pagination__item.is-active{background-color:#409eff;border-color:#409eff;color:#fff}.dark .login{background:linear-gradient(135deg,#1a1a2e,#16213e)}.dark .login__container{background-color:#1d1e1f;border:1px solid #363637}.dark .login__title{color:#409eff}.dark .login__subtitle{color:#a3a6ad}.dark .login__footer{color:#6c6e72}.dark .stat-card__title{color:#a3a6ad}.dark .quick-link{background-color:#262727}.dark .quick-link:hover{background-color:#409eff1a}.dark .quick-link__title{color:#cfd3dc}.dark .activity-item{border-bottom-color:#363637}.dark .activity-item__action{color:#cfd3dc}.dark .search-card,.dark .table-card,.dark .x-popconfirm{background-color:#1d1e1f;border:1px solid #363637}.dark .x-drawer{background-color:#1d1e1f}.dark .x-drawer__header{background-color:#1d1e1f;border-bottom-color:#363637;color:#e5eaf3}.dark .x-drawer__body{background-color:#1d1e1f;color:#cfd3dc}.dark .x-drawer__footer{background-color:#1d1e1f;border-top-color:#363637}.dark .settings-drawer .settings-title{color:#e5eaf3}.dark .settings-drawer .settings-section{background-color:transparent}.dark .settings-drawer .layout-option{border-color:#4c4d4f;background-color:transparent}.dark .settings-drawer .layout-option:hover{border-color:#409eff}.dark .settings-drawer .layout-option.is-active{border-color:#409eff;background-color:#409eff1a}.dark .settings-drawer .layout-option__label,.dark .settings-drawer .settings-switch-item span{color:#cfd3dc}.dark .mix-top-menu{background-color:#1d1e1f;border-bottom-color:#363637}.dark .mix-top-menu__logo-text{color:#409eff}.dark .mix-top-menu__menu{background-color:#1d1e1f!important}.dark .mix-top-menu__menu-char{color:#79bbff;background-color:#409eff33}.dark .mix-top-menu__action{color:#cfd3dc}.dark .mix-top-menu__action:hover{background-color:#262727;color:#409eff}.dark .mix-top-menu__user-trigger:hover{background-color:#262727}.dark .mix-top-menu__user-name{color:#cfd3dc}.dark .mix-top-menu__user-arrow{color:#a3a6ad}.dark .mix-top-menu__dropdown{background-color:#1d1e1f;border:1px solid #363637;box-shadow:0 2px 12px #00000080}.dark .mix-top-menu__dropdown-name{color:#e5eaf3}.dark .mix-top-menu__dropdown-role{color:#a3a6ad}.dark .mix-top-menu__dropdown-divider{background-color:#363637}.dark .mix-top-menu__dropdown-item{color:#cfd3dc}.dark .mix-top-menu__dropdown-item:hover{background-color:#262727;color:#e5eaf3}.text-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.text-ellipsis-3{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.flex{display:flex}.flex-center{display:flex;align-items:center;justify-content:center}.flex-between{display:flex;align-items:center;justify-content:space-between}.flex-start{display:flex;align-items:center;justify-content:flex-start}.flex-end{display:flex;align-items:center;justify-content:flex-end}.flex-wrap{flex-wrap:wrap}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.flex-col{display:flex;flex-direction:column}.flex-col-center{display:flex;flex-direction:column;align-items:center}.gap-4{gap:4px}.gap-8{gap:8px}.gap-12{gap:12px}.gap-16{gap:16px}.gap-20{gap:20px}.gap-24{gap:24px}.gap-32{gap:32px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-primary{color:var(--color-primary)}.text-success{color:var(--color-success)}.text-warning{color:var(--color-warning)}.text-danger{color:var(--color-danger)}.text-info{color:var(--color-info)}.text-secondary{color:var(--color-text-secondary)}.text-placeholder{color:var(--color-text-placeholder)}.bg-primary{background-color:var(--color-primary)}.bg-success{background-color:var(--color-success)}.bg-warning{background-color:var(--color-warning)}.bg-danger{background-color:var(--color-danger)}.bg-page{background-color:var(--bg-color-page)}.bg-card{background-color:var(--bg-color)}.mt-4{margin-top:4px}.mt-8{margin-top:8px}.mt-12{margin-top:12px}.mt-16{margin-top:16px}.mt-20{margin-top:20px}.mt-24{margin-top:24px}.mt-32{margin-top:32px}.mb-4{margin-bottom:4px}.mb-8{margin-bottom:8px}.mb-12{margin-bottom:12px}.mb-16{margin-bottom:16px}.mb-20{margin-bottom:20px}.mb-24{margin-bottom:24px}.mb-32{margin-bottom:32px}.ml-4{margin-left:4px}.ml-8{margin-left:8px}.ml-12{margin-left:12px}.ml-16{margin-left:16px}.mr-4{margin-right:4px}.mr-8{margin-right:8px}.mr-12{margin-right:12px}.mr-16{margin-right:16px}.p-4{padding:4px}.p-8{padding:8px}.p-12{padding:12px}.p-16{padding:16px}.p-20{padding:20px}.p-24{padding:24px}.p-32{padding:32px}.px-4{padding-left:4px;padding-right:4px}.px-8{padding-left:8px;padding-right:8px}.px-12{padding-left:12px;padding-right:12px}.px-16{padding-left:16px;padding-right:16px}.px-24{padding-left:24px;padding-right:24px}.py-4{padding-top:4px;padding-bottom:4px}.py-8{padding-top:8px;padding-bottom:8px}.py-12{padding-top:12px;padding-bottom:12px}.py-16{padding-top:16px;padding-bottom:16px}.py-24{padding-top:24px;padding-bottom:24px}.card{background-color:var(--bg-color);border-radius:var(--border-radius-large);box-shadow:var(--box-shadow-card);padding:var(--spacing-lg);transition:box-shadow .3s ease}.card:hover{box-shadow:var(--box-shadow-card-hover)}.card-flat{background-color:var(--bg-color);border-radius:var(--border-radius-large);padding:var(--spacing-lg);border:1px solid var(--color-border-lighter)}.page-container{padding:12px;min-height:100%;background:var(--bg-color-page)}.search-bar{display:flex;flex-wrap:wrap;gap:var(--spacing-md);margin-bottom:12px;padding:12px;background:var(--bg-color);border-radius:var(--border-radius-large);box-shadow:var(--box-shadow-card)}.toolbar{display:flex;align-items:center;justify-content:space-between;padding:12px;border-bottom:1px solid var(--color-border-lighter)}.toolbar-left,.toolbar-right{display:flex;align-items:center;gap:var(--spacing-sm)}.table-container{background-color:var(--bg-color);border-radius:var(--border-radius-large);box-shadow:var(--box-shadow-card);overflow:hidden}.pagination-container{display:flex;justify-content:flex-end;padding:12px;border-top:1px solid var(--color-border-lighter)}.badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;font-size:12px;font-weight:500;border-radius:10px;background:var(--color-fill);color:var(--color-text-secondary)}.badge-primary{background:var(--color-primary-light-6);color:var(--color-primary)}.badge-success{background:var(--color-success-lighter);color:var(--color-success)}.badge-warning{background:var(--color-warning-lighter);color:var(--color-warning)}.badge-danger{background:var(--color-danger-lighter);color:var(--color-danger)}.divider{height:1px;background:var(--color-border-lighter);margin:var(--spacing-md) 0}.divider-vertical{width:1px;height:100%;background:var(--color-border-lighter);margin:0 var(--spacing-md)}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:var(--color-text-placeholder)}.empty-state .empty-icon{width:64px;height:64px;margin-bottom:16px;opacity:.5}.empty-state .empty-text{font-size:14px}.loading-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px}.loading-state .loading-spinner{width:32px;height:32px;border:3px solid var(--color-border-lighter);border-top-color:var(--color-primary);border-radius:50%;animation:spin .8s linear infinite}.loading-state .loading-text{margin-top:16px;font-size:14px;color:var(--color-text-secondary)}@keyframes spin{to{transform:rotate(360deg)}}.link{color:var(--color-primary);text-decoration:none;transition:color .2s ease}.link:hover{color:var(--color-primary-dark-1)}.link-underline{color:var(--color-primary);text-decoration:underline;text-underline-offset:2px}.link-underline:hover{color:var(--color-primary-dark-1)}.x-menu-item.is-active{color:var(--color-primary)!important;background-color:var(--color-primary-light-9)!important;position:relative}.x-menu-item.is-active:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background-color:var(--color-primary);border-radius:0 2px 2px 0}.x-sub-menu__menu .x-menu-item.is-active{color:var(--color-primary)!important;background-color:var(--color-primary-light-9)!important;position:relative}.x-sub-menu__menu .x-menu-item.is-active:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background-color:var(--color-primary);border-radius:0 2px 2px 0}html.grey-mode{filter:grayscale(100%);-webkit-filter:grayscale(100%)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as q,q as F,o as _,c as k,a as e,z as a,C as o,u as s,j as u,F as O,A as K,k as m,e as P,I as A,S as Z,i as c,n as G}from"./vue-vendor-gcK82_Kd.js";import{t as z,n as v,j as x,o as J,Z as N}from"./xto-form-BBugNbnQ.js";import{E as Q,L as W}from"./xto-data-2diO2SyB.js";import{r as X,h as Y,x as B}from"./xto-feedback-BOOXC1Ev.js";import{M as f,g as L}from"./xto-base-wYW0Uxvr.js";import{S as i,a as ee}from"./index-BRR97dc6.js";import{_ as te}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./xto-core-DtPNWVUu.js";const se={class:"role-page"},le={class:"search-section"},ae={class:"table-section"},oe={class:"table-toolbar"},ne={class:"toolbar-left"},de={class:"toolbar-right"},ie={class:"table-count"},re={class:"table-wrapper"},ue={class:"data-table"},ce={key:0},pe={key:1},me={class:"col-id"},ve={class:"id-badge"},fe={class:"col-name"},ge={class:"role-name"},ye={class:"col-code"},_e={class:"col-desc"},ke={class:"desc-text"},he={class:"col-status"},xe={class:"status-switch"},Ve={class:"col-time"},Ee={class:"time-text"},be={class:"col-actions"},Ce={class:"pagination-wrapper"},Be={class:"status-field"},Le={class:"status-label"},De=q({__name:"index",setup(we){const S=[{id:1,name:"超级管理员",code:"admin",description:"拥有所有权限",status:i.ENABLED,permissions:["*"],createTime:"2024-01-01 10:00:00"},{id:2,name:"编辑",code:"editor",description:"内容编辑权限",status:i.ENABLED,permissions:["user:read","user:write"],createTime:"2024-01-02 10:00:00"},{id:3,name:"访客",code:"viewer",description:"只读权限",status:i.ENABLED,permissions:["user:read"],createTime:"2024-01-03 10:00:00"}],V=m(!1),E=m([]),b=m(0),g=m(1),h=m(10),r=A({keyword:"",status:void 0}),y=m(!1),M=P(()=>d.id?"编辑角色":"新增角色"),d=A({id:0,name:"",code:"",description:"",status:i.ENABLED,permissions:[]}),U={name:[{required:!0,message:"请输入角色名称",trigger:"blur"}],code:[{required:!0,message:"请输入角色编码",trigger:"blur"}]},D=m(),p=()=>{V.value=!0,setTimeout(()=>{let n=[...S];r.keyword&&(n=n.filter(t=>t.name.includes(r.keyword)||t.code.includes(r.keyword))),r.status!==void 0&&(n=n.filter(t=>t.status===r.status)),b.value=n.length,E.value=n.slice((g.value-1)*h.value,g.value*h.value),V.value=!1},300)},w=()=>{g.value=1,p()},T=()=>{r.keyword="",r.status=void 0,g.value=1,p()},j=()=>{Object.assign(d,{id:0,name:"",code:"",description:"",status:i.ENABLED,permissions:[]}),y.value=!0},H=n=>{Object.assign(d,n),y.value=!0},I=n=>{B.success("删除成功"),p()},R=async()=>{var n;try{await((n=D.value)==null?void 0:n.validate()),B.success(d.id?"编辑成功":"新增成功"),y.value=!1,p()}catch(t){console.error(t)}},$=n=>{B.success(`已${n.status===i.ENABLED?"启用":"禁用"}角色 ${n.name}`)};return F(()=>{p()}),(n,t)=>(_(),k("div",se,[e("div",le,[a(s(z),{model:r,inline:"",class:"search-form"},{default:o(()=>[a(s(v),{label:"关键词"},{default:o(()=>[a(s(x),{modelValue:r.keyword,"onUpdate:modelValue":t[0]||(t[0]=l=>r.keyword=l),placeholder:"角色名称/编码",clearable:"",onKeyup:Z(w,["enter"])},null,8,["modelValue"])]),_:1}),a(s(v),{label:"状态"},{default:o(()=>[a(s(J),{modelValue:r.status,"onUpdate:modelValue":t[1]||(t[1]=l=>r.status=l),options:s(ee),placeholder:"请选择",clearable:""},null,8,["modelValue","options"])]),_:1}),a(s(v),null,{default:o(()=>[a(s(L),null,{default:o(()=>[a(s(f),{type:"primary",onClick:w},{icon:o(()=>[...t[10]||(t[10]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("circle",{cx:"11",cy:"11",r:"8"}),e("path",{d:"M21 21l-4.35-4.35"})],-1)])]),default:o(()=>[t[11]||(t[11]=c(" 搜索 ",-1))]),_:1}),a(s(f),{onClick:T},{icon:o(()=>[...t[12]||(t[12]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M3 12a9 9 0 109-9 9.75 9.75 0 00-6.74 2.74L3 8"}),e("path",{d:"M3 3v5h5"})],-1)])]),default:o(()=>[t[13]||(t[13]=c(" 重置 ",-1))]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),e("div",ae,[e("div",oe,[e("div",ne,[a(s(f),{type:"primary",onClick:j},{icon:o(()=>[...t[14]||(t[14]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1)])]),default:o(()=>[t[15]||(t[15]=c(" 新增角色 ",-1))]),_:1})]),e("div",de,[e("span",ie,"共 "+u(b.value)+" 条数据",1)])]),e("div",re,[e("table",ue,[t[22]||(t[22]=e("thead",null,[e("tr",null,[e("th",{class:"col-id"},"ID"),e("th",{class:"col-name"},"角色名称"),e("th",{class:"col-code"},"角色编码"),e("th",{class:"col-desc"},"描述"),e("th",{class:"col-status"},"状态"),e("th",{class:"col-time"},"创建时间"),e("th",{class:"col-actions"},"操作")])],-1)),e("tbody",null,[V.value?(_(),k("tr",ce,[...t[16]||(t[16]=[e("td",{colspan:"7",class:"loading-cell"},[e("div",{class:"loading-content"},[e("div",{class:"loading-spinner"}),e("span",null,"加载中...")])],-1)])])):E.value.length===0?(_(),k("tr",pe,[...t[17]||(t[17]=[e("td",{colspan:"7",class:"empty-cell"},[e("div",{class:"empty-content"},[e("svg",{viewBox:"0 0 64 41",fill:"none"},[e("g",{transform:"translate(0 1)"},[e("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),e("g",{stroke:"var(--color-text-placeholder)","stroke-width":"2"},[e("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),e("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35H11.95C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:"var(--color-fill)"})])])]),e("span",null,"暂无数据")])],-1)])])):(_(!0),k(O,{key:2},K(E.value,l=>(_(),k("tr",{key:l.id,class:"data-row"},[e("td",me,[e("span",ve,u(l.id),1)]),e("td",fe,[e("span",ge,u(l.name),1)]),e("td",ye,[a(s(W),{type:"primary",size:"small"},{default:o(()=>[c(u(l.code),1)]),_:2},1024)]),e("td",_e,[e("span",ke,u(l.description),1)]),e("td",he,[e("div",xe,[a(s(N),{"model-value":l.status===s(i).ENABLED,"onUpdate:modelValue":C=>{l.status=C?s(i).ENABLED:s(i).DISABLED,$(l)}},null,8,["model-value","onUpdate:modelValue"]),e("span",{class:G(["status-text",{enabled:l.status===s(i).ENABLED}])},u(l.status===s(i).ENABLED?"已启用":"已禁用"),3)])]),e("td",Ve,[e("span",Ee,u(l.createTime),1)]),e("td",be,[a(s(L),{class:"action-buttons"},{default:o(()=>[a(s(f),{type:"primary",link:"",size:"small",onClick:C=>H(l)},{icon:o(()=>[...t[18]||(t[18]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"}),e("path",{d:"M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"})],-1)])]),default:o(()=>[t[19]||(t[19]=c(" 编辑 ",-1))]),_:1},8,["onClick"]),a(s(Y),{title:"确定删除该角色吗?",onConfirm:C=>I(l.id)},{default:o(()=>[a(s(f),{type:"danger",link:"",size:"small"},{icon:o(()=>[...t[20]||(t[20]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("polyline",{points:"3,6 5,6 21,6"}),e("path",{d:"M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"}),e("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),e("line",{x1:"14",y1:"11",x2:"14",y2:"17"})],-1)])]),default:o(()=>[t[21]||(t[21]=c(" 删除 ",-1))]),_:1})]),_:1},8,["onConfirm"])]),_:2},1024)])]))),128))])])]),e("div",Ce,[a(s(Q),{"current-page":g.value,"onUpdate:currentPage":t[2]||(t[2]=l=>g.value=l),"page-size":h.value,"onUpdate:pageSize":t[3]||(t[3]=l=>h.value=l),total:b.value,"page-sizes":[10,20,50,100],layout:"total, sizes, prev, pager, next",onCurrentChange:p,onSizeChange:p},null,8,["current-page","page-size","total"])])]),a(s(X),{modelValue:y.value,"onUpdate:modelValue":t[9]||(t[9]=l=>y.value=l),title:M.value,width:"520px",class:"role-modal"},{footer:o(()=>[a(s(L),null,{default:o(()=>[a(s(f),{onClick:t[8]||(t[8]=l=>y.value=!1)},{default:o(()=>[...t[23]||(t[23]=[c("取消",-1)])]),_:1}),a(s(f),{type:"primary",onClick:R},{default:o(()=>[...t[24]||(t[24]=[c("确定",-1)])]),_:1})]),_:1})]),default:o(()=>[a(s(z),{ref_key:"formRef",ref:D,model:d,rules:U,"label-width":"80px",class:"role-form"},{default:o(()=>[a(s(v),{label:"角色名称",prop:"name"},{default:o(()=>[a(s(x),{modelValue:d.name,"onUpdate:modelValue":t[4]||(t[4]=l=>d.name=l),placeholder:"请输入角色名称"},null,8,["modelValue"])]),_:1}),a(s(v),{label:"角色编码",prop:"code"},{default:o(()=>[a(s(x),{modelValue:d.code,"onUpdate:modelValue":t[5]||(t[5]=l=>d.code=l),placeholder:"请输入角色编码"},null,8,["modelValue"])]),_:1}),a(s(v),{label:"描述"},{default:o(()=>[a(s(x),{modelValue:d.description,"onUpdate:modelValue":t[6]||(t[6]=l=>d.description=l),placeholder:"请输入描述"},null,8,["modelValue"])]),_:1}),a(s(v),{label:"状态"},{default:o(()=>[e("div",Be,[a(s(N),{modelValue:d.status,"onUpdate:modelValue":t[7]||(t[7]=l=>d.status=l),"active-value":s(i).ENABLED,"inactive-value":s(i).DISABLED},null,8,["modelValue","active-value","inactive-value"]),e("span",Le,u(d.status===s(i).ENABLED?"启用":"禁用"),1)])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"])]))}}),He=te(De,[["__scopeId","data-v-de354764"]]);export{He as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Cno3g_Ca.js","assets/vue-vendor-gcK82_Kd.js","assets/xto-base-wYW0Uxvr.js","assets/xto-core-DtPNWVUu.js","assets/xto-base-CL2NKZJJ.css","assets/xto-form-BBugNbnQ.js","assets/xto-form-Cu6q3VLG.css","assets/xto-feedback-BOOXC1Ev.js","assets/xto-feedback-Bxx38c3P.css","assets/vendor-CWD9azq9.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/xto-data-2diO2SyB.js","assets/xto-data-Bi03KULC.css","assets/xto-navigation-D_LFy9y9.js","assets/xto-navigation-XfpyMpEo.css","assets/index-8nuVIlbv.css","assets/xto-layout-BDD6sSlM.css","assets/xto-business--V1F5Gwb.css","assets/index-Dk64JJvN.js","assets/index-rQHcgyhm.css","assets/index-CEwTCJMr.js","assets/index-BlRslYYI.css","assets/index-Br0rA9ST.js","assets/index-BRR97dc6.js","assets/index-BudArKxR.css","assets/index-D1AzIZb6.js","assets/index-CFhWBbxk.css","assets/index-Cm58iTuj.js","assets/index-vfvEFrCH.css","assets/404-G0TYnM2t.js","assets/404-Cw_4ZCL6.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{L as k,k as c,w as se,e as m,d as oe,c as re,z as ne,n as ae,u as ue,h as ie,o as ce,M as le,N as me,J as de,O as pe}from"./vue-vendor-gcK82_Kd.js";import{_ as f}from"./xto-form-BBugNbnQ.js";import{f as fe}from"./xto-base-wYW0Uxvr.js";import{n as he}from"./xto-data-2diO2SyB.js";import"./xto-feedback-BOOXC1Ev.js";import"./xto-navigation-D_LFy9y9.js";/* empty css *//* empty css */import"./xto-core-DtPNWVUu.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))u(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&u(l)}).observe(document,{childList:!0,subtree:!0});function r(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function u(o){if(o.ep)return;o.ep=!0;const i=r(o);fetch(o.href,i)}})();const g="xto_",ve=e=>({get(s){const r=e.getItem(g+s);if(!r)return null;try{return JSON.parse(r)}catch{return r}},set(s,r){if(r==null){e.removeItem(g+s);return}const u=typeof r=="string"?r:JSON.stringify(r);e.setItem(g+s,u)},remove(s){e.removeItem(g+s)},clear(){Object.keys(e).forEach(r=>{r.startsWith(g)&&e.removeItem(r)})}}),I=ve(window.localStorage),t={get:I.get,set:I.set,remove:I.remove,clear:I.clear},w=k("app",()=>{const e=c(t.get("appName")||"XTO App"),s=c(t.get("indexPath")||"/dashboard"),r=c(t.get("loginPath")||"/login"),u=c(t.get("isDark")||!1),o=c(t.get("theme")||"light"),i=c(t.get("layout")||"sidebar"),l=c(t.get("isCollapsed")||!1),d=c(t.get("showTabs")??!0),h=c(t.get("showFooter")??!0),v=c(t.get("showBreadcrumb")??!0),_=c(t.get("primaryColor")||"#409eff"),p=c([]),n=c([]),K=m(()=>u.value?"dark":"light"),Y=a=>{e.value=a,t.set("appName",a)},B=a=>{s.value=a,t.set("indexPath",a)},F=a=>{r.value=a,t.set("loginPath",a)},H=()=>{u.value=!u.value,o.value=u.value?"dark":"light",E()},J=a=>{o.value=a,u.value=a==="dark",E()},E=()=>{const a=document.documentElement;u.value?a.classList.add("dark"):a.classList.remove("dark"),t.set("isDark",u.value),t.set("theme",o.value)},z=()=>{l.value=!l.value,t.set("isCollapsed",l.value)},W=a=>{i.value=a,t.set("layout",a)},X=()=>{d.value=!d.value,t.set("showTabs",d.value)},j=()=>{h.value=!h.value,t.set("showFooter",h.value)},q=()=>{v.value=!v.value,t.set("showBreadcrumb",v.value)},G=a=>{_.value=a,document.documentElement.style.setProperty("--color-primary",a),t.set("primaryColor",a)},Q=a=>{p.value.includes(a)||p.value.push(a)},Z=a=>{const S=p.value.indexOf(a);S>-1&&p.value.splice(S,1)},$=()=>{p.value=[]},ee=a=>{n.value=a},te=()=>{E(),_.value!=="#409eff"&&document.documentElement.style.setProperty("--color-primary",_.value)};return se(u,E),{appName:e,indexPath:s,loginPath:r,isDark:u,theme:o,layout:i,isCollapsed:l,showTabs:d,showFooter:h,showBreadcrumb:v,primaryColor:_,cachedViews:p,mixSubMenus:n,themeClass:K,setAppName:Y,setIndexPath:B,setLoginPath:F,toggleTheme:H,toggleCollapse:z,setTheme:J,setLayout:W,toggleTabs:X,toggleFooter:j,toggleBreadcrumb:q,setPrimaryColor:G,addCachedView:Q,removeCachedView:Z,clearCachedViews:$,setMixSubMenus:ee,initTheme:te}}),_e=oe({__name:"App",setup(e){const s=w();return(r,u)=>{const o=ie("router-view");return ce(),re("div",{class:ae(["app",{dark:ue(s).isDark}])},[ne(o)],2)}}}),ge=[{path:"/login",name:"Login",component:()=>f(()=>import("./index-Cno3g_Ca.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])),meta:{title:"登录",hidden:!0}}],ye={path:"/",name:"Layout",component:()=>f(()=>import("./index-Dk64JJvN.js"),__vite__mapDeps([18,1,13,3,14,2,4,10,7,8,5,6,11,12,19,16,17])),redirect:"/dashboard",children:[{path:"/dashboard",name:"Dashboard",component:()=>f(()=>import("./index-CEwTCJMr.js"),__vite__mapDeps([20,11,3,1,12,10,21])),meta:{title:"仪表盘",icon:"dashboard",keepAlive:!0,affix:!0}},{path:"/system/user",name:"SystemUser",component:()=>f(()=>import("./index-Br0rA9ST.js"),__vite__mapDeps([22,1,5,3,6,11,12,7,8,2,4,23,10,24])),meta:{title:"用户管理",icon:"user",keepAlive:!0}},{path:"/system/role",name:"SystemRole",component:()=>f(()=>import("./index-D1AzIZb6.js"),__vite__mapDeps([25,1,5,3,6,11,12,7,8,2,4,23,10,26])),meta:{title:"角色管理",icon:"role",keepAlive:!0}},{path:"/system/menu",name:"SystemMenu",component:()=>f(()=>import("./index-Cm58iTuj.js"),__vite__mapDeps([27,5,1,3,6,11,12,7,8,2,4,23,10,28])),meta:{title:"菜单管理",icon:"menu",keepAlive:!0}},{path:"/:pathMatch(.*)*",name:"CatchAll",component:()=>f(()=>import("./404-G0TYnM2t.js"),__vite__mapDeps([29,1,2,3,4,10,30])),meta:{title:"404",hidden:!0}}]},Ee=[{menuCode:"dashboard",menuName:"仪表盘",menuUrl:"/dashboard",icon:"dashboard",closable:!0,isDefault:!0,isOut:!1},{menuCode:"system",menuName:"系统管理",menuUrl:"/system",icon:"setting",closable:!1,isDefault:!1,isOut:!1,children:[{menuCode:"system_user",menuName:"用户管理",menuUrl:"/system/user",icon:"user",closable:!0,isDefault:!1,isOut:!1},{menuCode:"system_role",menuName:"角色管理",menuUrl:"/system/role",icon:"role",closable:!0,isDefault:!1,isOut:!1},{menuCode:"system_menu",menuName:"菜单管理",menuUrl:"/system/menu",icon:"menu",closable:!0,isDefault:!1,isOut:!1}]}],O="token",C="token_type",M="refresh_token",L="expires_time",x="refresh_time",R="code",Ie=()=>t.get(O),Te=e=>{t.set(O,e)},We=()=>t.get(C),Pe=e=>{t.set(C,e)},Ne=e=>{t.set(M,e)},be=()=>t.get(L),ke=e=>{t.set(L,e)},Oe=e=>{t.set(x,e)},Ce=e=>{t.set(R,e)},Xe=e=>{Te(e.access_token),Pe(e.token_type||"Bearer"),Ne(e.refresh_token),ke(e.expires_time),Oe(e.refresh_time),e.code&&Ce(e.code)},je=()=>{t.remove(O),t.remove(C),t.remove(M),t.remove(L),t.remove(x),t.remove(R)},Le=()=>{const e=be();return e?Date.now()>e:!0},Se=()=>!!Ie()&&!Le(),A=c(""),D=c("");let T={};function Ae(){if(A.value)return A.value;if(T.VITE_APP_ID)return T.VITE_APP_ID;try{return"your-app-id"}catch{return""}}function qe(){if(D.value)return D.value;if(T.VITE_APP_CLIENT_ID)return T.VITE_APP_CLIENT_ID;try{return"your-client-id"}catch{return""}}const P="user_info",De=k("user",()=>{const e=c(t.get(P)),s=m(()=>!!e.value),r=m(()=>{var n;return((n=e.value)==null?void 0:n.userId)||""}),u=m(()=>{var n;return((n=e.value)==null?void 0:n.userName)||""}),o=m(()=>{var n;return((n=e.value)==null?void 0:n.departmentName)||""}),i=m(()=>{var n;return((n=e.value)==null?void 0:n.roleName)||""}),l=m(()=>{var n;return((n=e.value)==null?void 0:n.email)||""}),d=m(()=>{var n;return((n=e.value)==null?void 0:n.mobilePhone)||""}),h=m(()=>{var n;return((n=e.value)==null?void 0:n.positionName)||""}),v=m(()=>{var n;return((n=e.value)==null?void 0:n.avatar)||""});return{userInfo:e,isLoggedIn:s,userId:r,userName:u,departmentName:o,roleName:i,email:l,mobilePhone:d,positionName:h,avatar:v,setUserInfo:n=>{e.value=n,t.set(P,n)},clearUserInfo:()=>{e.value=null,t.remove(P)}}}),N="menu_list",b="permission_list",we={menuCode:"home",menuName:"首页",menuUrl:"/dashboard",icon:"home",closable:!1,isDefault:!1,isOut:!1};function V(e){return e.filter(s=>s.type!==1).map(s=>({...s,children:s.children?V(s.children):void 0}))}function Me(e){const s=[];function r(u){u.forEach(o=>{o.type===1&&o.menuCode&&s.push(o.menuCode),o.children&&r(o.children)})}return r(e),s}const xe=k("menu",()=>{const e=c(t.get(N)||[]),s=c(t.get(b)||[]),r=m(()=>e.value.length>0);return{menuList:e,permissions:s,hasMenu:r,setMenuList:l=>{s.value=Me(l),t.set(b,s.value);const d=V(l);e.value=[we,...d],t.set(N,e.value)},clearMenu:()=>{e.value=[],s.value=[],t.remove(N),t.remove(b)},hasPermission:l=>Array.isArray(l)?l.some(d=>s.value.includes(d)):s.value.includes(l)}}),U=le({history:me(),routes:[...ge,ye],scrollBehavior:()=>({left:0,top:0})}),Re=["/login"];U.beforeEach(async(e,s,r)=>{const u=w();if(u.initTheme(),Se())if(e.path==="/login")r({path:"/"});else{const o=De();o.isLoggedIn||(o.setUserInfo({appId:Ae(),userId:"1",userName:"管理员",departmentName:"技术部",email:"admin@example.com",mobilePhone:"13800138000",positionName:"管理员",avatar:""}),xe().setMenuList(Ee)),e.name&&e.meta.keepAlive&&u.addCachedView(e.name),r()}else Re.includes(e.path)?r():r("/login")});const y=de(_e);y.component("x-loading",fe);y.component("TreeNode",he);y.use(pe());y.use(U);y.mount("#app");export{We as a,qe as b,je as c,Ae as d,De as e,w as f,Ie as g,Se as h,t as l,Xe as s,xe as u};
|