xto-fronted 0.4.102 → 0.4.103
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/{index-3ekBp4iW.js → index-BlN5yXBT.js} +2 -2
- package/dist/{index-BKj-34y6.js → index-BsPaXQak.js} +2 -2
- package/dist/{index-CJSTBnGF.js → index-CNx4xpUG.js} +981 -971
- package/dist/{index-BK4Mut6H.js → index-DEChud2_.js} +2 -2
- package/dist/{index-B5DLfOYb.js → index-DdACCkye.js} +23 -23
- package/dist/index.js +1 -1
- package/dist/stores/app.d.ts +8 -2
- package/dist/stores/auth.d.ts +2 -2
- package/dist/style.css +1 -1
- package/package.json +94 -94
- package/src/App.vue +48 -48
- package/src/api/index.ts +7 -7
- package/src/assets/styles/_dark.scss +639 -639
- package/src/assets/styles/_root.scss +183 -183
- package/src/assets/styles/_variables.scss +69 -69
- package/src/assets/styles/index.scss +460 -460
- package/src/components/Layout/Header.vue +2 -2
- package/src/components/Layout/MixTopMenu.vue +1185 -1185
- package/src/components/Layout/Sidebar.vue +229 -229
- package/src/components/Layout/SidebarMenuItem.vue +163 -163
- package/src/components/Layout/TopMenu.vue +1177 -1177
- package/src/components/Layout/index.vue +199 -199
- package/src/composables/useI18n.ts +43 -43
- package/src/index.ts +114 -100
- package/src/router/layoutRoute.ts +70 -70
- package/src/stores/app.ts +9 -0
- package/src/stores/index.ts +15 -15
- package/src/stores/locale.ts +66 -66
- package/src/stores/user.ts +0 -2
- package/src/types/api.d.ts +0 -1
- package/src/types/json-bigint.d.ts +18 -18
- package/src/types/xto.d.ts +172 -172
- package/src/utils/request.ts +184 -184
- package/src/views/dashboard/index.vue +545 -545
- package/src/views/error/403.vue +251 -251
- package/src/views/error/404.vue +253 -253
- package/src/views/login/index.vue +586 -586
- package/src/views/system/menu/index.vue +690 -690
- package/src/views/system/role/index.vue +583 -583
- package/src/views/system/user/index.vue +655 -655
- package/vite.config.ts +139 -139
- package/dist/assets/404-C9Uh6Uu-.css +0 -1
- package/dist/assets/404-fVB40gfP.js +0 -1
- package/dist/assets/404-zjGLLssH.js +0 -1
- package/dist/assets/_plugin-vue_export-helper-DlAUqK2U.js +0 -1
- package/dist/assets/index-B2Y_ySNp.js +0 -2
- package/dist/assets/index-B5xc4gQB.css +0 -1
- package/dist/assets/index-B75sburk.js +0 -1
- package/dist/assets/index-BBdRdMfs.js +0 -1
- package/dist/assets/index-BDgOY6Rp.js +0 -1
- package/dist/assets/index-BIoRANs0.js +0 -1
- package/dist/assets/index-BRR97dc6.js +0 -1
- package/dist/assets/index-Bz0BgZQ1.js +0 -1
- package/dist/assets/index-CAdztNsv.css +0 -1
- package/dist/assets/index-CCXrcISf.css +0 -1
- package/dist/assets/index-CDPHn9Pd.js +0 -1
- package/dist/assets/index-CfpZmcpk.css +0 -1
- package/dist/assets/index-Cpew6d-v.css +0 -1
- package/dist/assets/index-CwJSA85U.js +0 -1
- package/dist/assets/index-CwRA10ac.js +0 -1
- package/dist/assets/index-D8NDxq9d.js +0 -1
- package/dist/assets/index-DEB6-Iv_.js +0 -2
- package/dist/assets/index-DM4Ezclc.css +0 -1
- package/dist/assets/index-DYv7nImj.css +0 -1
- package/dist/assets/index-Dm3Gq6SY.js +0 -1
- package/dist/assets/index-DxbgF-OR.js +0 -1
- package/dist/assets/index-RUdXk1fA.css +0 -1
- package/dist/assets/index-_xB0udHf.js +0 -1
- package/dist/assets/index-t-2Y0KhA.css +0 -1
- package/dist/assets/vendor-CUVPinTg.js +0 -13
- package/dist/assets/vue-vendor-Bpie-0gH.js +0 -29
- package/dist/assets/vue-vendor-DeJXJVbN.js +0 -29
- package/dist/assets/xto-base-C3XNcx7i.js +0 -1
- package/dist/assets/xto-base-CL2NKZJJ.css +0 -1
- package/dist/assets/xto-base-PwLGsxxb.js +0 -1
- package/dist/assets/xto-business--V1F5Gwb.css +0 -1
- package/dist/assets/xto-core-B1Ho_Ytu.js +0 -1
- package/dist/assets/xto-core-CtL4zKiV.js +0 -1
- package/dist/assets/xto-data-Coeo_ZYH.js +0 -1
- package/dist/assets/xto-data-MxZsiJgi.css +0 -1
- package/dist/assets/xto-data-bCXQa7fT.js +0 -1
- package/dist/assets/xto-feedback-Bxx38c3P.css +0 -1
- package/dist/assets/xto-feedback-CFysasJi.js +0 -1
- package/dist/assets/xto-feedback-CPydp0kn.js +0 -1
- package/dist/assets/xto-form-Cu6q3VLG.css +0 -1
- package/dist/assets/xto-form-DBlhgyXp.js +0 -1
- package/dist/assets/xto-form-bywohdAf.js +0 -1
- package/dist/assets/xto-layout-BDD6sSlM.css +0 -1
- package/dist/assets/xto-navigation-Bbdpine9.js +0 -1
- package/dist/assets/xto-navigation-I2o1CycT.js +0 -1
- package/dist/assets/xto-navigation-XfpyMpEo.css +0 -1
- package/dist/index-58aI1w0v.js +0 -515
- package/dist/index-A_B_Ap_A.js +0 -4240
- package/dist/index-B-lMqzxZ.js +0 -479
- package/dist/index-B6s_uLJE.js +0 -189
- package/dist/index-BAmYUT0G.js +0 -189
- package/dist/index-BJlOXgu5.js +0 -515
- package/dist/index-BMQao91y.js +0 -189
- package/dist/index-BRvi9qW-.js +0 -515
- package/dist/index-BVGW4DDQ.js +0 -189
- package/dist/index-BXg94yA2.js +0 -515
- package/dist/index-BYAkZ2gD.js +0 -641
- package/dist/index-BfXnrw05.js +0 -515
- package/dist/index-Bmb0rt9C.js +0 -641
- package/dist/index-Bmf0YbVq.js +0 -189
- package/dist/index-C1BnOFy7.js +0 -3145
- package/dist/index-C1j4f3mM.js +0 -479
- package/dist/index-C2-a5KSQ.js +0 -4233
- package/dist/index-C3K89jzC.js +0 -515
- package/dist/index-C92NkXAn.js +0 -479
- package/dist/index-CAHSv7LK.js +0 -4285
- package/dist/index-CVH7bDsl.js +0 -4285
- package/dist/index-Ccp6zfq-.js +0 -4290
- package/dist/index-CeZ0CSSs.js +0 -641
- package/dist/index-Cf8E7FM1.js +0 -4270
- package/dist/index-CgyQqbdx.js +0 -189
- package/dist/index-ChowNrlU.js +0 -641
- package/dist/index-CvQgEgUM.js +0 -641
- package/dist/index-D25KzR0I.js +0 -479
- package/dist/index-D4LWXVnG.js +0 -515
- package/dist/index-DCApv1oX.js +0 -641
- package/dist/index-DCBIjLHy.js +0 -515
- package/dist/index-DEYOivza.js +0 -641
- package/dist/index-DHH8Os_2.js +0 -189
- package/dist/index-DReodgBw.js +0 -4233
- package/dist/index-DTRJONCd.js +0 -515
- package/dist/index-DgffG7KK.js +0 -641
- package/dist/index-DjERNRXX.js +0 -515
- package/dist/index-DjXyzwL0.js +0 -479
- package/dist/index-DkOqM4e2.js +0 -3147
- package/dist/index-Ds8IV04t.js +0 -189
- package/dist/index-LSdsO2Ox.js +0 -479
- package/dist/index-UJixTdep.js +0 -479
- package/dist/index-WPRGF_GX.js +0 -189
- package/dist/index-WPWzllES.js +0 -641
- package/dist/index-Wl2Qg26t.js +0 -3147
- package/dist/index-dk0diNwi.js +0 -479
- package/dist/index-gBlRG4kk.js +0 -479
- package/dist/index-mVol7F2K.js +0 -479
- package/dist/index-xWU3J3OH.js +0 -641
- package/dist/index-zKJLxthI.js +0 -189
- package/dist/index.es.js +0 -95
- package/dist/index.html +0 -28
- package/dist/index.umd.js +0 -8
package/vite.config.ts
CHANGED
|
@@ -1,139 +1,139 @@
|
|
|
1
|
-
import { defineConfig, loadEnv } from 'vite'
|
|
2
|
-
import vue from '@vitejs/plugin-vue'
|
|
3
|
-
import dts from 'vite-plugin-dts'
|
|
4
|
-
import { resolve } from 'path'
|
|
5
|
-
|
|
6
|
-
export default defineConfig(({ mode }) => {
|
|
7
|
-
const env = loadEnv(mode, process.cwd())
|
|
8
|
-
const isLib = mode === 'lib'
|
|
9
|
-
|
|
10
|
-
return {
|
|
11
|
-
plugins: [
|
|
12
|
-
vue(),
|
|
13
|
-
...(isLib ? [dts({ insertTypesEntry: true, outDir: 'dist' })] : [])
|
|
14
|
-
],
|
|
15
|
-
resolve: {
|
|
16
|
-
alias: {
|
|
17
|
-
'@': resolve(__dirname, 'src'),
|
|
18
|
-
'@xto/base/es/style.css': resolve(__dirname, 'node_modules/@xto/base/es/style.css'),
|
|
19
|
-
'@xto/form/es/style.css': resolve(__dirname, 'node_modules/@xto/form/es/style.css'),
|
|
20
|
-
'@xto/data/es/style.css': resolve(__dirname, 'node_modules/@xto/data/es/style.css'),
|
|
21
|
-
'@xto/feedback/es/style.css': resolve(__dirname, 'node_modules/@xto/feedback/es/style.css'),
|
|
22
|
-
'@xto/navigation/es/style.css': resolve(__dirname, 'node_modules/@xto/navigation/es/style.css'),
|
|
23
|
-
'@xto/layout/es/style.css': resolve(__dirname, 'node_modules/@xto/layout/es/style.css'),
|
|
24
|
-
'@xto/business/es/style.css': resolve(__dirname, 'node_modules/@xto/business/es/style.css'),
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
// 开发模式优化
|
|
28
|
-
optimizeDeps: {
|
|
29
|
-
include: [
|
|
30
|
-
'vue',
|
|
31
|
-
'vue-router',
|
|
32
|
-
'pinia',
|
|
33
|
-
'axios'
|
|
34
|
-
],
|
|
35
|
-
exclude: [
|
|
36
|
-
'@xto/core',
|
|
37
|
-
'@xto/base',
|
|
38
|
-
'@xto/form',
|
|
39
|
-
'@xto/data',
|
|
40
|
-
'@xto/feedback',
|
|
41
|
-
'@xto/navigation',
|
|
42
|
-
'@xto/layout',
|
|
43
|
-
'@xto/business'
|
|
44
|
-
]
|
|
45
|
-
},
|
|
46
|
-
server: {
|
|
47
|
-
host: '0.0.0.0',
|
|
48
|
-
port: 3000,
|
|
49
|
-
open: true,
|
|
50
|
-
proxy: {
|
|
51
|
-
'/api': {
|
|
52
|
-
target: env.VITE_API_BASE_URL || 'http://localhost:8080',
|
|
53
|
-
changeOrigin: true,
|
|
54
|
-
rewrite: (path) => path.replace(/^\/api/, '')
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
build: {
|
|
59
|
-
outDir: 'dist',
|
|
60
|
-
sourcemap: false,
|
|
61
|
-
chunkSizeWarningLimit: 1500,
|
|
62
|
-
// 库模式配置 - 多入口构建
|
|
63
|
-
lib: isLib ? {
|
|
64
|
-
entry: {
|
|
65
|
-
index: resolve(__dirname, 'src/index.ts'),
|
|
66
|
-
api: resolve(__dirname, 'src/api/index.ts')
|
|
67
|
-
},
|
|
68
|
-
name: 'XtoFronted',
|
|
69
|
-
formats: ['es']
|
|
70
|
-
} : undefined,
|
|
71
|
-
rollupOptions: {
|
|
72
|
-
// 库模式下排除外部依赖
|
|
73
|
-
external: isLib ? [
|
|
74
|
-
'vue',
|
|
75
|
-
'vue-router',
|
|
76
|
-
'pinia',
|
|
77
|
-
'axios',
|
|
78
|
-
/^@xto\//
|
|
79
|
-
] : undefined,
|
|
80
|
-
output: isLib ? {
|
|
81
|
-
exports: 'named',
|
|
82
|
-
// 自定义输出文件名
|
|
83
|
-
entryFileNames: (chunkInfo) => {
|
|
84
|
-
if (chunkInfo.name === 'api') {
|
|
85
|
-
return 'api/index.js'
|
|
86
|
-
}
|
|
87
|
-
return 'index.js'
|
|
88
|
-
}
|
|
89
|
-
} : {
|
|
90
|
-
manualChunks(id) {
|
|
91
|
-
// Vue 全家桶单独打包
|
|
92
|
-
if (id.includes('node_modules/vue/') ||
|
|
93
|
-
id.includes('node_modules/@vue/') ||
|
|
94
|
-
id.includes('node_modules/vue-router/') ||
|
|
95
|
-
id.includes('node_modules/pinia/')) {
|
|
96
|
-
return 'vue-vendor'
|
|
97
|
-
}
|
|
98
|
-
// 组件库按包分割,实现按需加载
|
|
99
|
-
if (id.includes('@xto/core')) {
|
|
100
|
-
return 'xto-core'
|
|
101
|
-
}
|
|
102
|
-
if (id.includes('@xto/base')) {
|
|
103
|
-
return 'xto-base'
|
|
104
|
-
}
|
|
105
|
-
if (id.includes('@xto/form')) {
|
|
106
|
-
return 'xto-form'
|
|
107
|
-
}
|
|
108
|
-
if (id.includes('@xto/data')) {
|
|
109
|
-
return 'xto-data'
|
|
110
|
-
}
|
|
111
|
-
if (id.includes('@xto/feedback')) {
|
|
112
|
-
return 'xto-feedback'
|
|
113
|
-
}
|
|
114
|
-
if (id.includes('@xto/navigation')) {
|
|
115
|
-
return 'xto-navigation'
|
|
116
|
-
}
|
|
117
|
-
if (id.includes('@xto/layout')) {
|
|
118
|
-
return 'xto-layout'
|
|
119
|
-
}
|
|
120
|
-
if (id.includes('@xto/business')) {
|
|
121
|
-
return 'xto-business'
|
|
122
|
-
}
|
|
123
|
-
// 其他第三方库
|
|
124
|
-
if (id.includes('node_modules/')) {
|
|
125
|
-
return 'vendor'
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
css: {
|
|
132
|
-
preprocessorOptions: {
|
|
133
|
-
scss: {
|
|
134
|
-
api: 'modern-compiler'
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
})
|
|
1
|
+
import { defineConfig, loadEnv } from 'vite'
|
|
2
|
+
import vue from '@vitejs/plugin-vue'
|
|
3
|
+
import dts from 'vite-plugin-dts'
|
|
4
|
+
import { resolve } from 'path'
|
|
5
|
+
|
|
6
|
+
export default defineConfig(({ mode }) => {
|
|
7
|
+
const env = loadEnv(mode, process.cwd())
|
|
8
|
+
const isLib = mode === 'lib'
|
|
9
|
+
|
|
10
|
+
return {
|
|
11
|
+
plugins: [
|
|
12
|
+
vue(),
|
|
13
|
+
...(isLib ? [dts({ insertTypesEntry: true, outDir: 'dist' })] : [])
|
|
14
|
+
],
|
|
15
|
+
resolve: {
|
|
16
|
+
alias: {
|
|
17
|
+
'@': resolve(__dirname, 'src'),
|
|
18
|
+
'@xto/base/es/style.css': resolve(__dirname, 'node_modules/@xto/base/es/style.css'),
|
|
19
|
+
'@xto/form/es/style.css': resolve(__dirname, 'node_modules/@xto/form/es/style.css'),
|
|
20
|
+
'@xto/data/es/style.css': resolve(__dirname, 'node_modules/@xto/data/es/style.css'),
|
|
21
|
+
'@xto/feedback/es/style.css': resolve(__dirname, 'node_modules/@xto/feedback/es/style.css'),
|
|
22
|
+
'@xto/navigation/es/style.css': resolve(__dirname, 'node_modules/@xto/navigation/es/style.css'),
|
|
23
|
+
'@xto/layout/es/style.css': resolve(__dirname, 'node_modules/@xto/layout/es/style.css'),
|
|
24
|
+
'@xto/business/es/style.css': resolve(__dirname, 'node_modules/@xto/business/es/style.css'),
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
// 开发模式优化
|
|
28
|
+
optimizeDeps: {
|
|
29
|
+
include: [
|
|
30
|
+
'vue',
|
|
31
|
+
'vue-router',
|
|
32
|
+
'pinia',
|
|
33
|
+
'axios'
|
|
34
|
+
],
|
|
35
|
+
exclude: [
|
|
36
|
+
'@xto/core',
|
|
37
|
+
'@xto/base',
|
|
38
|
+
'@xto/form',
|
|
39
|
+
'@xto/data',
|
|
40
|
+
'@xto/feedback',
|
|
41
|
+
'@xto/navigation',
|
|
42
|
+
'@xto/layout',
|
|
43
|
+
'@xto/business'
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
server: {
|
|
47
|
+
host: '0.0.0.0',
|
|
48
|
+
port: 3000,
|
|
49
|
+
open: true,
|
|
50
|
+
proxy: {
|
|
51
|
+
'/api': {
|
|
52
|
+
target: env.VITE_API_BASE_URL || 'http://localhost:8080',
|
|
53
|
+
changeOrigin: true,
|
|
54
|
+
rewrite: (path) => path.replace(/^\/api/, '')
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
build: {
|
|
59
|
+
outDir: 'dist',
|
|
60
|
+
sourcemap: false,
|
|
61
|
+
chunkSizeWarningLimit: 1500,
|
|
62
|
+
// 库模式配置 - 多入口构建
|
|
63
|
+
lib: isLib ? {
|
|
64
|
+
entry: {
|
|
65
|
+
index: resolve(__dirname, 'src/index.ts'),
|
|
66
|
+
api: resolve(__dirname, 'src/api/index.ts')
|
|
67
|
+
},
|
|
68
|
+
name: 'XtoFronted',
|
|
69
|
+
formats: ['es']
|
|
70
|
+
} : undefined,
|
|
71
|
+
rollupOptions: {
|
|
72
|
+
// 库模式下排除外部依赖
|
|
73
|
+
external: isLib ? [
|
|
74
|
+
'vue',
|
|
75
|
+
'vue-router',
|
|
76
|
+
'pinia',
|
|
77
|
+
'axios',
|
|
78
|
+
/^@xto\//
|
|
79
|
+
] : undefined,
|
|
80
|
+
output: isLib ? {
|
|
81
|
+
exports: 'named',
|
|
82
|
+
// 自定义输出文件名
|
|
83
|
+
entryFileNames: (chunkInfo) => {
|
|
84
|
+
if (chunkInfo.name === 'api') {
|
|
85
|
+
return 'api/index.js'
|
|
86
|
+
}
|
|
87
|
+
return 'index.js'
|
|
88
|
+
}
|
|
89
|
+
} : {
|
|
90
|
+
manualChunks(id) {
|
|
91
|
+
// Vue 全家桶单独打包
|
|
92
|
+
if (id.includes('node_modules/vue/') ||
|
|
93
|
+
id.includes('node_modules/@vue/') ||
|
|
94
|
+
id.includes('node_modules/vue-router/') ||
|
|
95
|
+
id.includes('node_modules/pinia/')) {
|
|
96
|
+
return 'vue-vendor'
|
|
97
|
+
}
|
|
98
|
+
// 组件库按包分割,实现按需加载
|
|
99
|
+
if (id.includes('@xto/core')) {
|
|
100
|
+
return 'xto-core'
|
|
101
|
+
}
|
|
102
|
+
if (id.includes('@xto/base')) {
|
|
103
|
+
return 'xto-base'
|
|
104
|
+
}
|
|
105
|
+
if (id.includes('@xto/form')) {
|
|
106
|
+
return 'xto-form'
|
|
107
|
+
}
|
|
108
|
+
if (id.includes('@xto/data')) {
|
|
109
|
+
return 'xto-data'
|
|
110
|
+
}
|
|
111
|
+
if (id.includes('@xto/feedback')) {
|
|
112
|
+
return 'xto-feedback'
|
|
113
|
+
}
|
|
114
|
+
if (id.includes('@xto/navigation')) {
|
|
115
|
+
return 'xto-navigation'
|
|
116
|
+
}
|
|
117
|
+
if (id.includes('@xto/layout')) {
|
|
118
|
+
return 'xto-layout'
|
|
119
|
+
}
|
|
120
|
+
if (id.includes('@xto/business')) {
|
|
121
|
+
return 'xto-business'
|
|
122
|
+
}
|
|
123
|
+
// 其他第三方库
|
|
124
|
+
if (id.includes('node_modules/')) {
|
|
125
|
+
return 'vendor'
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
css: {
|
|
132
|
+
preprocessorOptions: {
|
|
133
|
+
scss: {
|
|
134
|
+
api: 'modern-compiler'
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
})
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.error-page[data-v-3a9e61ae]{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-3a9e61ae]{position:relative;z-index:2;max-width:600px;padding:40px}.error-bg[data-v-3a9e61ae]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;overflow:hidden}.error-bg .bg-circle[data-v-3a9e61ae]{position:absolute;border-radius:50%;opacity:.1}.error-bg .bg-circle.circle-1[data-v-3a9e61ae]{width:400px;height:400px;top:-100px;right:-100px;background:var(--color-primary)}.error-bg .bg-circle.circle-2[data-v-3a9e61ae]{width:300px;height:300px;bottom:-50px;left:-50px;background:var(--color-info)}.error-bg .bg-circle.circle-3[data-v-3a9e61ae]{width:200px;height:200px;top:50%;left:50%;transform:translate(-50%,-50%);background:var(--color-primary-light-3)}.error-content[data-v-3a9e61ae]{text-align:center}.error-code[data-v-3a9e61ae]{display:flex;justify-content:center;align-items:center;gap:8px;margin-bottom:32px}.error-code .code-digit[data-v-3a9e61ae]{font-size:80px;font-weight:700;color:var(--color-text-primary);line-height:1}.error-code .code-zero[data-v-3a9e61ae]{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-3a9e61ae]{font-size:48px;font-weight:700;color:#fff}.error-illustration[data-v-3a9e61ae]{width:200px;height:120px;margin:0 auto 24px}.error-title[data-v-3a9e61ae]{font-size:24px;font-weight:600;color:var(--color-text-primary);margin-bottom:12px}.error-desc[data-v-3a9e61ae]{font-size:14px;color:var(--color-text-secondary);margin-bottom:32px}.error-actions[data-v-3a9e61ae]{display:flex;justify-content:center;gap:16px;margin-bottom:32px}.error-actions[data-v-3a9e61ae] .x-button{padding:12px 24px;border-radius:8px}.error-actions[data-v-3a9e61ae] .x-button svg{width:18px;height:18px;margin-right:8px}.error-tip[data-v-3a9e61ae]{padding:20px;background:var(--color-fill-light);border-radius:var(--border-radius-large)}.error-tip p[data-v-3a9e61ae]{font-size:14px;font-weight:500;color:var(--color-text-primary);margin-bottom:12px}.error-tip ul[data-v-3a9e61ae]{list-style:none;padding:0;margin:0}.error-tip ul li[data-v-3a9e61ae]{font-size:13px;color:var(--color-text-secondary);position:relative;padding:4px 0 4px 16px}.error-tip ul li[data-v-3a9e61ae]: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 e,P as p,z as s,C as a,u as t,Q as x,i}from"./vue-vendor-Bpie-0gH.js";import{M as l}from"./xto-base-C3XNcx7i.js";import{_ as g}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./xto-core-B1Ho_Ytu.js";const k={class:"error-page"},u={class:"error-container"},f={class:"error-content"},w={class:"error-actions"},y=n({__name:"404",setup(m){const o=x(),d=()=>{o.push("/")};return(h,r)=>(c(),v("div",k,[e("div",u,[r[7]||(r[7]=e("div",{class:"error-bg"},[e("div",{class:"bg-circle circle-1"}),e("div",{class:"bg-circle circle-2"}),e("div",{class:"bg-circle circle-3"})],-1)),e("div",f,[r[5]||(r[5]=p('<div class="error-code" data-v-3a9e61ae><span class="code-digit" data-v-3a9e61ae>4</span><span class="code-zero" data-v-3a9e61ae><span class="zero-inner" data-v-3a9e61ae>0</span></span><span class="code-digit" data-v-3a9e61ae>4</span></div><div class="error-illustration" data-v-3a9e61ae><svg viewBox="0 0 200 120" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-3a9e61ae><rect x="40" y="20" width="120" height="80" rx="8" fill="var(--color-fill)" stroke="var(--color-border)" stroke-width="2" data-v-3a9e61ae></rect><rect x="50" y="30" width="100" height="60" rx="4" fill="var(--bg-color)" data-v-3a9e61ae></rect><line x1="60" y1="45" x2="140" y2="45" stroke="var(--color-border-light)" stroke-width="2" data-v-3a9e61ae></line><line x1="60" y1="55" x2="120" y2="55" stroke="var(--color-border-light)" stroke-width="2" data-v-3a9e61ae></line><line x1="60" y1="65" x2="100" y2="65" stroke="var(--color-border-light)" stroke-width="2" data-v-3a9e61ae></line><text x="100" y="75" text-anchor="middle" fill="var(--color-primary)" font-size="24" font-weight="600" data-v-3a9e61ae>?</text><circle cx="150" cy="35" r="12" stroke="var(--color-primary)" stroke-width="2" fill="none" data-v-3a9e61ae></circle><line x1="158" y1="43" x2="168" y2="53" stroke="var(--color-primary)" stroke-width="2" stroke-linecap="round" data-v-3a9e61ae></line></svg></div><h1 class="error-title" data-v-3a9e61ae>页面不存在</h1><p class="error-desc" data-v-3a9e61ae>抱歉,您访问的页面不存在或已被删除</p>',4)),e("div",w,[s(t(l),{type:"primary",size:"large",onClick:d},{icon:a(()=>[...r[1]||(r[1]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"}),e("polyline",{points:"9,22 9,12 15,12 15,22"})],-1)])]),default:a(()=>[r[2]||(r[2]=i(" 返回首页 ",-1))]),_:1}),s(t(l),{size:"large",onClick:r[0]||(r[0]=b=>t(o).go(-1))},{icon:a(()=>[...r[3]||(r[3]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M19 12H5M12 19l-7-7 7-7"})],-1)])]),default:a(()=>[r[4]||(r[4]=i(" 返回上一页 ",-1))]),_:1})]),r[6]||(r[6]=e("div",{class:"error-tip"},[e("p",null,"您可以尝试:"),e("ul",null,[e("li",null,"检查您输入的网址是否正确"),e("li",null,"返回首页重新浏览"),e("li",null,"联系管理员反馈问题")])],-1))])])]))}}),M=g(y,[["__scopeId","data-v-3a9e61ae"]]);export{M as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as n,o as c,c as v,a as e,P as p,z as s,C as a,u as t,Q as x,h as i}from"./vue-vendor-DeJXJVbN.js";import{M as l}from"./xto-base-PwLGsxxb.js";import{_ as g}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./xto-core-CtL4zKiV.js";const k={class:"error-page"},u={class:"error-container"},f={class:"error-content"},w={class:"error-actions"},y=n({__name:"404",setup(m){const o=x(),d=()=>{o.push("/")};return(h,r)=>(c(),v("div",k,[e("div",u,[r[7]||(r[7]=e("div",{class:"error-bg"},[e("div",{class:"bg-circle circle-1"}),e("div",{class:"bg-circle circle-2"}),e("div",{class:"bg-circle circle-3"})],-1)),e("div",f,[r[5]||(r[5]=p('<div class="error-code" data-v-3a9e61ae><span class="code-digit" data-v-3a9e61ae>4</span><span class="code-zero" data-v-3a9e61ae><span class="zero-inner" data-v-3a9e61ae>0</span></span><span class="code-digit" data-v-3a9e61ae>4</span></div><div class="error-illustration" data-v-3a9e61ae><svg viewBox="0 0 200 120" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-3a9e61ae><rect x="40" y="20" width="120" height="80" rx="8" fill="var(--color-fill)" stroke="var(--color-border)" stroke-width="2" data-v-3a9e61ae></rect><rect x="50" y="30" width="100" height="60" rx="4" fill="var(--bg-color)" data-v-3a9e61ae></rect><line x1="60" y1="45" x2="140" y2="45" stroke="var(--color-border-light)" stroke-width="2" data-v-3a9e61ae></line><line x1="60" y1="55" x2="120" y2="55" stroke="var(--color-border-light)" stroke-width="2" data-v-3a9e61ae></line><line x1="60" y1="65" x2="100" y2="65" stroke="var(--color-border-light)" stroke-width="2" data-v-3a9e61ae></line><text x="100" y="75" text-anchor="middle" fill="var(--color-primary)" font-size="24" font-weight="600" data-v-3a9e61ae>?</text><circle cx="150" cy="35" r="12" stroke="var(--color-primary)" stroke-width="2" fill="none" data-v-3a9e61ae></circle><line x1="158" y1="43" x2="168" y2="53" stroke="var(--color-primary)" stroke-width="2" stroke-linecap="round" data-v-3a9e61ae></line></svg></div><h1 class="error-title" data-v-3a9e61ae>页面不存在</h1><p class="error-desc" data-v-3a9e61ae>抱歉,您访问的页面不存在或已被删除</p>',4)),e("div",w,[s(t(l),{type:"primary",size:"large",onClick:d},{icon:a(()=>[...r[1]||(r[1]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"}),e("polyline",{points:"9,22 9,12 15,12 15,22"})],-1)])]),default:a(()=>[r[2]||(r[2]=i(" 返回首页 ",-1))]),_:1}),s(t(l),{size:"large",onClick:r[0]||(r[0]=b=>t(o).go(-1))},{icon:a(()=>[...r[3]||(r[3]=[e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M19 12H5M12 19l-7-7 7-7"})],-1)])]),default:a(()=>[r[4]||(r[4]=i(" 返回上一页 ",-1))]),_:1})]),r[6]||(r[6]=e("div",{class:"error-tip"},[e("p",null,"您可以尝试:"),e("ul",null,[e("li",null,"检查您输入的网址是否正确"),e("li",null,"返回首页重新浏览"),e("li",null,"联系管理员反馈问题")])],-1))])])]))}}),M=g(y,[["__scopeId","data-v-3a9e61ae"]]);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,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CDPHn9Pd.js","assets/vue-vendor-Bpie-0gH.js","assets/xto-base-C3XNcx7i.js","assets/xto-core-B1Ho_Ytu.js","assets/xto-base-CL2NKZJJ.css","assets/xto-form-DBlhgyXp.js","assets/xto-form-Cu6q3VLG.css","assets/xto-feedback-CFysasJi.js","assets/xto-feedback-Bxx38c3P.css","assets/vendor-CUVPinTg.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/xto-data-Coeo_ZYH.js","assets/xto-data-MxZsiJgi.css","assets/xto-navigation-I2o1CycT.js","assets/xto-navigation-XfpyMpEo.css","assets/index-CCXrcISf.css","assets/xto-layout-BDD6sSlM.css","assets/xto-business--V1F5Gwb.css","assets/index-DxbgF-OR.js","assets/index-RUdXk1fA.css","assets/index-B75sburk.js","assets/index-DM4Ezclc.css","assets/index-BBdRdMfs.js","assets/index-BRR97dc6.js","assets/index-DYv7nImj.css","assets/index-Dm3Gq6SY.js","assets/index-CAdztNsv.css","assets/index-_xB0udHf.js","assets/index-B5xc4gQB.css","assets/404-fVB40gfP.js","assets/404-C9Uh6Uu-.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{L as k,k as i,w as $,e as m,d as ee,c as te,z as se,n as oe,u as re,h as ne,o as ae,M as ue,N as ce,J as le,O as ie}from"./vue-vendor-Bpie-0gH.js";import{_ as f}from"./xto-form-DBlhgyXp.js";import{f as me}from"./xto-base-C3XNcx7i.js";import{n as de}from"./xto-data-Coeo_ZYH.js";import"./xto-feedback-CFysasJi.js";import"./xto-navigation-I2o1CycT.js";/* empty css *//* empty css */import"./xto-core-B1Ho_Ytu.js";(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))c(r);new MutationObserver(r=>{for(const u of r)if(u.type==="childList")for(const l of u.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&c(l)}).observe(document,{childList:!0,subtree:!0});function s(r){const u={};return r.integrity&&(u.integrity=r.integrity),r.referrerPolicy&&(u.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?u.credentials="include":r.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function c(r){if(r.ep)return;r.ep=!0;const u=s(r);fetch(r.href,u)}})();const _="xto_",pe=e=>({get(o){const s=e.getItem(_+o);if(!s)return null;try{return JSON.parse(s)}catch{return s}},set(o,s){if(s==null){e.removeItem(_+o);return}const c=typeof s=="string"?s:JSON.stringify(s);e.setItem(_+o,c)},remove(o){e.removeItem(_+o)},clear(){Object.keys(e).forEach(s=>{s.startsWith(_)&&e.removeItem(s)})}}),E=pe(window.localStorage),t={get:E.get,set:E.set,remove:E.remove,clear:E.clear},A=k("app",()=>{const e=i(t.get("appName")||"XTO App"),o=i(t.get("indexPath")||"/dashboard"),s=i(t.get("isDark")||!1),c=i(t.get("theme")||"light"),r=i(t.get("layout")||"sidebar"),u=i(t.get("isCollapsed")||!1),l=i(t.get("showTabs")??!0),d=i(t.get("showFooter")??!0),h=i(t.get("showBreadcrumb")??!0),v=i(t.get("primaryColor")||"#409eff"),p=i([]),T=i([]),n=m(()=>s.value?"dark":"light"),K=a=>{e.value=a,t.set("appName",a)},V=a=>{o.value=a,t.set("indexPath",a)},Y=()=>{s.value=!s.value,c.value=s.value?"dark":"light",y()},B=a=>{c.value=a,s.value=a==="dark",y()},y=()=>{const a=document.documentElement;s.value?a.classList.add("dark"):a.classList.remove("dark"),t.set("isDark",s.value),t.set("theme",c.value)},F=()=>{u.value=!u.value,t.set("isCollapsed",u.value)},H=a=>{r.value=a,t.set("layout",a)},J=()=>{l.value=!l.value,t.set("showTabs",l.value)},z=()=>{d.value=!d.value,t.set("showFooter",d.value)},W=()=>{h.value=!h.value,t.set("showBreadcrumb",h.value)},X=a=>{v.value=a,document.documentElement.style.setProperty("--color-primary",a),t.set("primaryColor",a)},j=a=>{p.value.includes(a)||p.value.push(a)},q=a=>{const L=p.value.indexOf(a);L>-1&&p.value.splice(L,1)},G=()=>{p.value=[]},Q=a=>{T.value=a},Z=()=>{y(),v.value!=="#409eff"&&document.documentElement.style.setProperty("--color-primary",v.value)};return $(s,y),{appName:e,indexPath:o,isDark:s,theme:c,layout:r,isCollapsed:u,showTabs:l,showFooter:d,showBreadcrumb:h,primaryColor:v,cachedViews:p,mixSubMenus:T,themeClass:n,setAppName:K,setIndexPath:V,toggleTheme:Y,toggleCollapse:F,setTheme:B,setLayout:H,toggleTabs:J,toggleFooter:z,toggleBreadcrumb:W,setPrimaryColor:X,addCachedView:j,removeCachedView:q,clearCachedViews:G,setMixSubMenus:Q,initTheme:Z}}),fe=ee({__name:"App",setup(e){const o=A();return(s,c)=>{const r=ne("router-view");return ae(),te("div",{class:oe(["app",{dark:re(o).isDark}])},[se(r)],2)}}}),he=[{path:"/login",name:"Login",component:()=>f(()=>import("./index-CDPHn9Pd.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}}],ve={path:"/",name:"Layout",component:()=>f(()=>import("./index-DxbgF-OR.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-B75sburk.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-BBdRdMfs.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-Dm3Gq6SY.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-_xB0udHf.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-fVB40gfP.js"),__vite__mapDeps([29,1,2,3,4,10,30])),meta:{title:"404",hidden:!0}}]},_e=[{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",P="token_type",D="refresh_token",C="expires_time",M="refresh_time",x="code",ge=()=>t.get(O),ye=e=>{t.set(O,e)},He=()=>t.get(P),Ee=e=>{t.set(P,e)},Te=e=>{t.set(D,e)},Ie=()=>t.get(C),be=e=>{t.set(C,e)},Ne=e=>{t.set(M,e)},ke=e=>{t.set(x,e)},Je=e=>{ye(e.access_token),Ee(e.token_type||"Bearer"),Te(e.refresh_token),be(e.expires_time),Ne(e.refresh_time),e.code&&ke(e.code)},ze=()=>{t.remove(O),t.remove(P),t.remove(D),t.remove(C),t.remove(M),t.remove(x)},Oe=()=>{const e=Ie();return e?Date.now()>e:!0},Pe=()=>!!ge()&&!Oe(),S=i(""),w=i("");function Ce(){if(S.value)return S.value;try{return"your-app-id"}catch{return""}}function We(){if(w.value)return w.value;try{return"your-client-id"}catch{return""}}const I="user_info",Le=k("user",()=>{const e=i(t.get(I)),o=m(()=>!!e.value),s=m(()=>{var n;return((n=e.value)==null?void 0:n.userId)||""}),c=m(()=>{var n;return((n=e.value)==null?void 0:n.userName)||""}),r=m(()=>{var n;return((n=e.value)==null?void 0:n.departmentName)||""}),u=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:o,userId:s,userName:c,departmentName:r,roleName:u,email:l,mobilePhone:d,positionName:h,avatar:v,setUserInfo:n=>{e.value=n,t.set(I,n)},clearUserInfo:()=>{e.value=null,t.remove(I)}}}),b="menu_list",N="permission_list",Se={menuCode:"home",menuName:"首页",menuUrl:"/dashboard",icon:"home",closable:!1,isDefault:!1,isOut:!1};function R(e){return e.filter(o=>o.type!==1).map(o=>({...o,children:o.children?R(o.children):void 0}))}function we(e){const o=[];function s(c){c.forEach(r=>{r.type===1&&r.menuCode&&o.push(r.menuCode),r.children&&s(r.children)})}return s(e),o}const Ae=k("menu",()=>{const e=i(t.get(b)||[]),o=i(t.get(N)||[]),s=m(()=>e.value.length>0);return{menuList:e,permissions:o,hasMenu:s,setMenuList:l=>{o.value=we(l),t.set(N,o.value);const d=R(l);e.value=[Se,...d],t.set(b,e.value)},clearMenu:()=>{e.value=[],o.value=[],t.remove(b),t.remove(N)},hasPermission:l=>Array.isArray(l)?l.some(d=>o.value.includes(d)):o.value.includes(l)}}),U=ue({history:ce(),routes:[...he,ve],scrollBehavior:()=>({left:0,top:0})}),De=["/login"];U.beforeEach(async(e,o,s)=>{const c=A();if(c.initTheme(),Pe())if(e.path==="/login")s({path:"/"});else{const r=Le();r.isLoggedIn||(r.setUserInfo({appId:Ce(),userId:"1",userName:"管理员",departmentName:"技术部",email:"admin@example.com",mobilePhone:"13800138000",positionName:"管理员",avatar:""}),Ae().setMenuList(_e)),e.name&&e.meta.keepAlive&&c.addCachedView(e.name),s()}else De.includes(e.path)?s():s("/login")});const g=le(fe);g.component("x-loading",me);g.component("TreeNode",de);g.use(ie());g.use(U);g.mount("#app");export{He as a,We as b,ze as c,Ce as d,Le as e,A as f,ge as g,Pe as h,t as l,Je as s,Ae as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.menu-page[data-v-fcdec27c]{padding:24px;background:var(--bg-color-page);min-height:100%}.table-section[data-v-fcdec27c]{background:var(--bg-color);border-radius:var(--border-radius-large);box-shadow:var(--box-shadow-card);overflow:hidden}.table-toolbar[data-v-fcdec27c]{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-fcdec27c]{display:flex;gap:12px}.table-toolbar .table-count[data-v-fcdec27c]{font-size:14px;color:var(--color-text-secondary)}.table-wrapper[data-v-fcdec27c]{overflow-x:auto}.data-table[data-v-fcdec27c]{width:100%;border-collapse:collapse}.data-table th[data-v-fcdec27c],.data-table td[data-v-fcdec27c]{padding:14px 16px;text-align:left;border-bottom:1px solid var(--color-border-lighter)}.data-table th[data-v-fcdec27c]{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-fcdec27c]{transition:background-color .2s}.data-table .data-row[data-v-fcdec27c]:hover{background:var(--color-primary-light-6)}.data-table td[data-v-fcdec27c]{vertical-align:middle}.data-table .loading-cell[data-v-fcdec27c],.data-table .empty-cell[data-v-fcdec27c]{padding:60px 20px}.data-table .loading-content[data-v-fcdec27c],.data-table .empty-content[data-v-fcdec27c]{display:flex;flex-direction:column;align-items:center;gap:16px;color:var(--color-text-placeholder)}.data-table .loading-content svg[data-v-fcdec27c],.data-table .empty-content svg[data-v-fcdec27c]{width:64px;height:41px}.data-table .loading-spinner[data-v-fcdec27c]{width:32px;height:32px;border:3px solid var(--color-border-lighter);border-top-color:var(--color-primary);border-radius:50%;animation:spin-fcdec27c .8s linear infinite}@keyframes spin-fcdec27c{to{transform:rotate(360deg)}}.tree-row--level-1 .col-name[data-v-fcdec27c]{padding-left:40px}.tree-indent[data-v-fcdec27c]{display:inline-block;width:24px}.tree-line[data-v-fcdec27c]{position:relative;display:inline-block;width:16px;height:1px;background:var(--color-border-light);margin-right:8px;vertical-align:middle}.col-name[data-v-fcdec27c]{min-width:200px}.menu-info[data-v-fcdec27c]{display:flex;align-items:center;gap:8px}.menu-icon-wrapper[data-v-fcdec27c]{width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:var(--color-fill-light);border-radius:6px;font-size:14px}.menu-title[data-v-fcdec27c]{font-size:14px;font-weight:500;color:var(--color-text-primary);cursor:pointer;transition:color .2s}.menu-title[data-v-fcdec27c]:hover{color:var(--color-primary)}.col-icon[data-v-fcdec27c]{width:80px}.icon-text[data-v-fcdec27c]{font-size:16px}.col-path[data-v-fcdec27c]{min-width:140px}.path-code[data-v-fcdec27c]{font-family:SF Mono,Monaco,Consolas,monospace;font-size:12px;padding:4px 8px;background:var(--color-fill-light);border-radius:4px;color:var(--color-text-secondary)}.col-type[data-v-fcdec27c]{width:80px}.col-sort[data-v-fcdec27c]{width:60px}.sort-badge[data-v-fcdec27c]{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;padding:0 8px;background:var(--color-fill);border-radius:12px;font-size:12px;color:var(--color-text-secondary)}.col-status[data-v-fcdec27c]{width:80px}.col-actions[data-v-fcdec27c]{min-width:140px}.action-buttons[data-v-fcdec27c] .x-button{padding:4px 8px}.action-buttons[data-v-fcdec27c] .x-button svg{width:14px;height:14px;margin-right:4px}.menu-form[data-v-fcdec27c]{padding:16px 0}.menu-form .form-grid[data-v-fcdec27c]{display:grid;grid-template-columns:repeat(2,1fr);gap:0 24px}.menu-form .form-item-full[data-v-fcdec27c]{grid-column:span 2}.menu-form .status-field[data-v-fcdec27c]{display:flex;align-items:center;gap:12px}.menu-form .status-label[data-v-fcdec27c]{font-size:14px;color:var(--color-text-secondary)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as d}from"./xto-data-Coeo_ZYH.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-Bpie-0gH.js";import{_ as q}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./xto-core-B1Ho_Ytu.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-fd54abc0"]]);export{ns as default};
|
|
@@ -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-Bpie-0gH.js";import{t as S,n as c,j as x,o as Q,Z as U}from"./xto-form-DBlhgyXp.js";import{E as W,L as X}from"./xto-data-Coeo_ZYH.js";import{r as Y,h as ee,g as C}from"./xto-feedback-CFysasJi.js";import{M as g,g as L}from"./xto-base-C3XNcx7i.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-B1Ho_Ytu.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"},be={class:"contact-info"},Ee={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"}],b=h(!1),E=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=()=>{b.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,E.value=i.slice((k.value-1)*V.value,k.value*V.value),b.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,[b.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)])])):E.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(E.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",be,[e("span",Ee,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-da50b35c"]]);export{Pe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as d}from"./xto-data-bCXQa7fT.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,j as b,b as v,i as a,n as p,f as w,C as U}from"./vue-vendor-DeJXJVbN.js";import{_ as q}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./xto-core-CtL4zKiV.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-fd54abc0"]]);export{ns as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as $,n as p,j as _,o as O,G as H,Z as C}from"./xto-form-bywohdAf.js";import{L as V}from"./xto-data-bCXQa7fT.js";import{r as j,g as q}from"./xto-feedback-CPydp0kn.js";import{M as h,g as A}from"./xto-base-PwLGsxxb.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,i as d,F as M,A as U,k as E,e as Z,I as J,h as m,g as K}from"./vue-vendor-DeJXJVbN.js";import{_ as P}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./xto-core-CtL4zKiV.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"},ge={class:"col-status"},ke={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"},He=F({__name:"index",setup(je){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),g=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(()=>{g.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},k=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(g.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)])])):g.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(g.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=>k(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",ge,[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",ke,[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=>k(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=>k(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=>k(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(j),{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(H),{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(He,[["__scopeId","data-v-fcdec27c"]]);export{Qe as default};
|
|
@@ -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
|
-
import{d as q,q as F,o as _,c as h,a as e,z as a,C as o,u as s,i as u,F as O,A as K,k as m,e as P,I as A,S as Z,h as c,n as G}from"./vue-vendor-DeJXJVbN.js";import{t as z,n as v,j as x,o as J,Z as N}from"./xto-form-bywohdAf.js";import{E as Q,L as W}from"./xto-data-bCXQa7fT.js";import{r as X,h as Y,g as B}from"./xto-feedback-CPydp0kn.js";import{M as f,g as L}from"./xto-base-PwLGsxxb.js";import{S as d,a as ee}from"./index-BRR97dc6.js";import{_ as te}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./xto-core-CtL4zKiV.js";const se={class:"role-page"},le={class:"search-section"},ae={class:"table-section"},oe={class:"table-toolbar"},ne={class:"toolbar-left"},ie={class:"toolbar-right"},de={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"},he={class:"desc-text"},ke={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:d.ENABLED,permissions:["*"],createTime:"2024-01-01 10:00:00"},{id:2,name:"编辑",code:"editor",description:"内容编辑权限",status:d.ENABLED,permissions:["user:read","user:write"],createTime:"2024-01-02 10:00:00"},{id:3,name:"访客",code:"viewer",description:"只读权限",status:d.ENABLED,permissions:["user:read"],createTime:"2024-01-03 10:00:00"}],V=m(!1),E=m([]),b=m(0),g=m(1),k=m(10),r=A({keyword:"",status:void 0}),y=m(!1),M=P(()=>i.id?"编辑角色":"新增角色"),i=A({id:0,name:"",code:"",description:"",status:d.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)*k.value,g.value*k.value),V.value=!1},300)},w=()=>{g.value=1,p()},T=()=>{r.keyword="",r.status=void 0,g.value=1,p()},H=()=>{Object.assign(i,{id:0,name:"",code:"",description:"",status:d.ENABLED,permissions:[]}),y.value=!0},I=n=>{Object.assign(i,n),y.value=!0},R=n=>{B.success("删除成功"),p()},$=async()=>{var n;try{await((n=D.value)==null?void 0:n.validate()),B.success(i.id?"编辑成功":"新增成功"),y.value=!1,p()}catch(t){console.error(t)}},j=n=>{B.success(`已${n.status===d.ENABLED?"启用":"禁用"}角色 ${n.name}`)};return F(()=>{p()}),(n,t)=>(_(),h("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:H},{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",ie,[e("span",de,"共 "+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?(_(),h("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?(_(),h("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),h(O,{key:2},K(E.value,l=>(_(),h("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",he,u(l.description),1)]),e("td",ke,[e("div",xe,[a(s(N),{"model-value":l.status===s(d).ENABLED,"onUpdate:modelValue":C=>{l.status=C?s(d).ENABLED:s(d).DISABLED,j(l)}},null,8,["model-value","onUpdate:modelValue"]),e("span",{class:G(["status-text",{enabled:l.status===s(d).ENABLED}])},u(l.status===s(d).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=>I(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=>R(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":k.value,"onUpdate:pageSize":t[3]||(t[3]=l=>k.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:$},{default:o(()=>[...t[24]||(t[24]=[c("确定",-1)])]),_:1})]),_:1})]),default:o(()=>[a(s(z),{ref_key:"formRef",ref:D,model:i,rules:U,"label-width":"80px",class:"role-form"},{default:o(()=>[a(s(v),{label:"角色名称",prop:"name"},{default:o(()=>[a(s(x),{modelValue:i.name,"onUpdate:modelValue":t[4]||(t[4]=l=>i.name=l),placeholder:"请输入角色名称"},null,8,["modelValue"])]),_:1}),a(s(v),{label:"角色编码",prop:"code"},{default:o(()=>[a(s(x),{modelValue:i.code,"onUpdate:modelValue":t[5]||(t[5]=l=>i.code=l),placeholder:"请输入角色编码"},null,8,["modelValue"])]),_:1}),a(s(v),{label:"描述"},{default:o(()=>[a(s(x),{modelValue:i.description,"onUpdate:modelValue":t[6]||(t[6]=l=>i.description=l),placeholder:"请输入描述"},null,8,["modelValue"])]),_:1}),a(s(v),{label:"状态"},{default:o(()=>[e("div",Be,[a(s(N),{modelValue:i.status,"onUpdate:modelValue":t[7]||(t[7]=l=>i.status=l),"active-value":s(d).ENABLED,"inactive-value":s(d).DISABLED},null,8,["modelValue","active-value","inactive-value"]),e("span",Le,u(i.status===s(d).ENABLED?"启用":"禁用"),1)])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"])]))}}),Ie=te(De,[["__scopeId","data-v-935244f1"]]);export{Ie as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.role-page[data-v-935244f1]{padding:24px;background:var(--bg-color-page);min-height:100%}.search-section[data-v-935244f1]{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-935244f1]{display:flex;flex-wrap:wrap;gap:16px}.search-section .search-form[data-v-935244f1] .x-form-item{margin-bottom:0}.search-section .search-form[data-v-935244f1] .x-input,.search-section .search-form[data-v-935244f1] .x-select{width:200px}.table-section[data-v-935244f1]{background:var(--bg-color);border-radius:var(--border-radius-large);box-shadow:var(--box-shadow-card);overflow:hidden}.table-toolbar[data-v-935244f1]{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-935244f1]{display:flex;gap:12px}.table-toolbar .table-count[data-v-935244f1]{font-size:14px;color:var(--color-text-secondary)}.table-wrapper[data-v-935244f1]{overflow-x:auto}.data-table[data-v-935244f1]{width:100%;border-collapse:collapse}.data-table th[data-v-935244f1],.data-table td[data-v-935244f1]{padding:14px 16px;text-align:left;border-bottom:1px solid var(--color-border-lighter)}.data-table th[data-v-935244f1]{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-935244f1]{transition:background-color .2s}.data-table .data-row[data-v-935244f1]:hover{background:var(--color-primary-light-6)}.data-table td[data-v-935244f1]{vertical-align:middle}.data-table .loading-cell[data-v-935244f1],.data-table .empty-cell[data-v-935244f1]{padding:60px 20px}.data-table .loading-content[data-v-935244f1],.data-table .empty-content[data-v-935244f1]{display:flex;flex-direction:column;align-items:center;gap:16px;color:var(--color-text-placeholder)}.data-table .loading-content svg[data-v-935244f1],.data-table .empty-content svg[data-v-935244f1]{width:64px;height:41px}.data-table .loading-spinner[data-v-935244f1]{width:32px;height:32px;border:3px solid var(--color-border-lighter);border-top-color:var(--color-primary);border-radius:50%;animation:spin-935244f1 .8s linear infinite}@keyframes spin-935244f1{to{transform:rotate(360deg)}}.col-id[data-v-935244f1]{width:80px}.id-badge[data-v-935244f1]{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-935244f1]{min-width:120px}.role-name[data-v-935244f1]{font-size:14px;font-weight:500;color:var(--color-text-primary)}.col-code[data-v-935244f1]{min-width:100px}.col-desc[data-v-935244f1]{min-width:150px}.desc-text[data-v-935244f1]{font-size:14px;color:var(--color-text-secondary)}.col-status[data-v-935244f1]{min-width:120px}.status-switch[data-v-935244f1]{display:flex;align-items:center;gap:8px}.status-text[data-v-935244f1]{font-size:13px;color:var(--color-text-secondary)}.status-text.enabled[data-v-935244f1]{color:var(--color-success)}.col-time[data-v-935244f1]{min-width:160px}.time-text[data-v-935244f1]{font-size:13px;color:var(--color-text-secondary)}.col-actions[data-v-935244f1]{min-width:140px}.action-buttons[data-v-935244f1] .x-button{padding:4px 8px}.action-buttons[data-v-935244f1] .x-button svg{width:14px;height:14px;margin-right:4px}.pagination-wrapper[data-v-935244f1]{display:flex;justify-content:flex-end;padding:16px 24px;border-top:1px solid var(--color-border-lighter)}.role-form[data-v-935244f1]{padding:16px 0}.role-form .status-field[data-v-935244f1]{display:flex;align-items:center;gap:12px}.role-form .status-label[data-v-935244f1]{font-size:14px;color:var(--color-text-secondary)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.login-page[data-v-15fc7de5]{width:100%;min-height:100vh;display:flex;background:var(--bg-color-page)}.login-brand[data-v-15fc7de5]{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-15fc7de5]{display:none}}.login-brand .brand-content[data-v-15fc7de5]{position:relative;z-index:2;padding:60px;max-width:520px;color:#fff}.login-brand .brand-logo[data-v-15fc7de5]{display:flex;align-items:center;gap:12px;margin-bottom:48px}.login-brand .brand-logo .logo-icon[data-v-15fc7de5]{width:48px;height:48px;color:#fff}.login-brand .brand-logo .logo-text[data-v-15fc7de5]{font-size:28px;font-weight:700;letter-spacing:2px}.login-brand .brand-slogan[data-v-15fc7de5]{margin-bottom:48px}.login-brand .brand-slogan h1[data-v-15fc7de5]{font-size:32px;font-weight:600;line-height:1.3;margin-bottom:12px}.login-brand .brand-slogan p[data-v-15fc7de5]{font-size:16px;opacity:.8;line-height:1.6}.login-brand .brand-features[data-v-15fc7de5]{display:flex;flex-direction:column;gap:24px}.login-brand .brand-features .feature-item[data-v-15fc7de5]{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-15fc7de5]:hover{background:#ffffff26;transform:translate(8px)}.login-brand .brand-features .feature-icon[data-v-15fc7de5]{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-15fc7de5]{width:20px;height:20px}.login-brand .brand-features .feature-text h4[data-v-15fc7de5]{font-size:15px;font-weight:600;margin-bottom:4px}.login-brand .brand-features .feature-text p[data-v-15fc7de5]{font-size:13px;opacity:.8}.login-brand .brand-decoration[data-v-15fc7de5]{position:absolute;bottom:60px;left:60px;right:60px;display:flex;align-items:center;gap:16px}.login-brand .brand-decoration .decoration-line[data-v-15fc7de5]{flex:1;height:1px;background:linear-gradient(90deg,rgba(255,255,255,.3),transparent)}.login-brand .brand-decoration .decoration-dots[data-v-15fc7de5]{display:flex;gap:8px}.login-brand .brand-decoration .decoration-dots span[data-v-15fc7de5]{width:6px;height:6px;background:#ffffff80;border-radius:50%}.login-brand .brand-bg[data-v-15fc7de5]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;overflow:hidden}.login-brand .brand-bg .bg-grid[data-v-15fc7de5]{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-15fc7de5]{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-15fc7de5 8s ease-in-out infinite}.login-brand .brand-bg .bg-pattern[data-v-15fc7de5]{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-15fc7de5{0%,to{opacity:.6;transform:scale(1)}50%{opacity:1;transform:scale(1.1)}}.login-form-section[data-v-15fc7de5]{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-15fc7de5]{width:100%;padding:40px 24px}}.login-form-section .form-container[data-v-15fc7de5]{width:100%;max-width:360px;margin:0 auto}.login-form-section .form-header[data-v-15fc7de5]{margin-bottom:40px}.login-form-section .form-header h2[data-v-15fc7de5]{font-size:28px;font-weight:600;color:var(--color-text-primary);margin-bottom:8px}.login-form-section .form-header p[data-v-15fc7de5]{font-size:14px;color:var(--color-text-secondary)}.login-form-section .login-form .input-wrapper[data-v-15fc7de5]{margin-bottom:4px}.login-form-section .login-form .input-label[data-v-15fc7de5]{display:block;font-size:14px;font-weight:500;color:var(--color-text-regular);margin-bottom:8px}.login-form-section .login-form[data-v-15fc7de5] .x-form-item{margin-bottom:24px}.login-form-section .login-form[data-v-15fc7de5] .x-input{--x-input-border-radius: 8px}.login-form-section .login-form[data-v-15fc7de5] .x-input__prefix{margin-right:12px;color:var(--color-text-placeholder)}.login-form-section .form-options[data-v-15fc7de5]{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.login-form-section .form-options .forgot-link[data-v-15fc7de5]{font-size:14px;color:var(--color-primary);text-decoration:none;transition:color .2s}.login-form-section .form-options .forgot-link[data-v-15fc7de5]:hover{color:var(--color-primary-dark-1)}.login-form-section .login-btn[data-v-15fc7de5]{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-15fc7de5]:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 4px 12px #1677ff66}.login-form-section .login-btn[data-v-15fc7de5]:active:not(:disabled){transform:translateY(0)}.login-form-section .form-footer[data-v-15fc7de5]{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-15fc7de5]{font-size:13px;color:var(--color-text-placeholder);margin-bottom:16px}.login-form-section .form-footer .social-login[data-v-15fc7de5]{display:flex;justify-content:center;gap:16px}.login-form-section .form-footer .social-btn[data-v-15fc7de5]{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-15fc7de5]{width:20px;height:20px}.login-form-section .form-footer .social-btn[data-v-15fc7de5]:hover{background:var(--color-primary-light-6);color:var(--color-primary);transform:translateY(-2px)}.login-form-section .copyright[data-v-15fc7de5]{margin-top:48px;text-align:center}.login-form-section .copyright p[data-v-15fc7de5]{font-size:12px;color:var(--color-text-placeholder)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as _,o as g,c as m,P as y,a as r,z as o,C as c,u as i,I as B,k as h,Q as T,R as M,S as R,i as I}from"./vue-vendor-Bpie-0gH.js";import{n as z,M as j}from"./xto-base-C3XNcx7i.js";import{t as S,n as w,j as C,l as L}from"./xto-form-DBlhgyXp.js";import{g as n}from"./xto-feedback-CFysasJi.js";import{J as N,a as P}from"./vendor-CUVPinTg.js";import{g as q,a as E,c as b,b as O,d as U,s as A}from"./index-B2Y_ySNp.js";import{_ as D}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./xto-core-B1Ho_Ytu.js";import"./xto-data-Coeo_ZYH.js";import"./xto-navigation-I2o1CycT.js";/* empty css *//* empty css */const J=N({storeAsString:!0}),K=()=>{const s=P.create({timeout:3e4,headers:{"Content-Type":"application/json"},transformResponse:[e=>{if(typeof e=="string")try{return J.parse(e)}catch{return e}return e}]});return s.interceptors.request.use(e=>{const a="/api";e.baseURL||(e.baseURL=a);const d=q(),l=E()||"Bearer";return d&&(e.headers.Authorization=`${l} ${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?(n.error("登录已过期,请重新登录"),b(),window.location.href="/login",Promise.reject(new Error(a.message||"EXPIRED OR INVALID TOKEN"))):(n.error(a.message||"请求失败"),Promise.reject(new Error(a.message||"请求失败")))},e=>{var d;const{response:a}=e;if(a){const{data:l}=a;if((l==null?void 0:l.code)===9121)return n.error("登录已过期,请重新登录"),b(),window.location.href="/login",Promise.reject(e);switch(a.status){case 401:n.error("登录已过期,请重新登录"),b(),window.location.href="/login";break;case 403:n.error("没有权限访问");break;case 404:n.error("请求资源不存在");break;case 500:n.error("服务器错误");break;default:n.error(((d=a.data)==null?void 0:d.message)||"请求失败")}}else n.error("网络连接失败");return Promise.reject(e)}),s},p=K(),X={get(s,e){return p.get(s,e)},post(s,e,a){return p.post(s,e,a)},put(s,e,a){return p.put(s,e,a)},patch(s,e,a){return p.patch(s,e,a)},delete(s,e){return p.delete(s,e)},download(s,e){return p.get(s,{...e,responseType:"blob"})}};function $(s){return X.post("/user/v1.0/login/by-domain",s)}const H={class:"login-page"},Q={class:"login-form-section"},F={class:"form-container"},G={class:"input-wrapper"},W={class:"input-wrapper"},Y={class:"form-options"},Z={key:0},ee={key:1},te=_({__name:"index",setup(s){const e=T(),a=M(),d=h(!1),l=h(!1),v=B({uid:"",password:""}),V={uid:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:6,message:"密码长度至少6位",trigger:"blur"}]},k=h(),x=async()=>{var u;try{await((u=k.value)==null?void 0:u.validate()),d.value=!0;const t=await $({appId:U(),clientId:O(),uid:v.uid,password:v.password,code:!0});A(t),n.success("登录成功");const f=a.query.redirect||"/";e.push(f)}catch(t){console.error("登录失败:",t)}finally{d.value=!1}};return(u,t)=>(g(),m("div",H,[t[10]||(t[10]=y('<div class="login-brand" data-v-15fc7de5><div class="brand-content" data-v-15fc7de5><div class="brand-logo" data-v-15fc7de5><div class="logo-icon" data-v-15fc7de5><svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-15fc7de5><rect width="48" height="48" rx="12" fill="currentColor" data-v-15fc7de5></rect><path d="M14 24L20 30L34 16" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" data-v-15fc7de5></path></svg></div><span class="logo-text" data-v-15fc7de5>XTO</span></div><div class="brand-slogan" data-v-15fc7de5><h1 data-v-15fc7de5>企业级后台管理解决方案</h1><p data-v-15fc7de5>开箱即用的中后台前端/设计解决方案</p></div><div class="brand-features" data-v-15fc7de5><div class="feature-item" data-v-15fc7de5><div class="feature-icon" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-15fc7de5><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" data-v-15fc7de5></path></svg></div><div class="feature-text" data-v-15fc7de5><h4 data-v-15fc7de5>高性能</h4><p data-v-15fc7de5>极致的渲染性能与响应速度</p></div></div><div class="feature-item" data-v-15fc7de5><div class="feature-icon" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-15fc7de5><rect x="3" y="3" width="18" height="18" rx="2" data-v-15fc7de5></rect><path d="M9 9h6M9 12h6M9 15h4" data-v-15fc7de5></path></svg></div><div class="feature-text" data-v-15fc7de5><h4 data-v-15fc7de5>丰富组件</h4><p data-v-15fc7de5>60+ 高质量业务组件</p></div></div><div class="feature-item" data-v-15fc7de5><div class="feature-icon" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-15fc7de5><circle cx="12" cy="12" r="10" data-v-15fc7de5></circle><path d="M12 6v6l4 2" data-v-15fc7de5></path></svg></div><div class="feature-text" data-v-15fc7de5><h4 data-v-15fc7de5>持续更新</h4><p data-v-15fc7de5>活跃的社区与快速迭代</p></div></div></div><div class="brand-decoration" data-v-15fc7de5><div class="decoration-line" data-v-15fc7de5></div><div class="decoration-dots" data-v-15fc7de5><span data-v-15fc7de5></span><span data-v-15fc7de5></span><span data-v-15fc7de5></span></div></div></div><div class="brand-bg" data-v-15fc7de5><div class="bg-grid" data-v-15fc7de5></div><div class="bg-glow" data-v-15fc7de5></div><div class="bg-pattern" data-v-15fc7de5></div></div></div>',1)),r("div",Q,[r("div",F,[t[7]||(t[7]=r("div",{class:"form-header"},[r("h2",null,"欢迎登录"),r("p",null,"请输入您的账户信息")],-1)),o(i(S),{ref_key:"formRef",ref:k,model:v,rules:V,class:"login-form","label-width":"0"},{default:c(()=>[o(i(w),{prop:"uid"},{default:c(()=>[r("div",G,[t[3]||(t[3]=r("label",{class:"input-label"},"用户名",-1)),o(i(C),{modelValue:v.uid,"onUpdate:modelValue":t[0]||(t[0]=f=>v.uid=f),placeholder:"请输入用户名",size:"large"},{prefix:c(()=>[o(i(z),{name:"user",size:18})]),_:1},8,["modelValue"])])]),_:1}),o(i(w),{prop:"password"},{default:c(()=>[r("div",W,[t[4]||(t[4]=r("label",{class:"input-label"},"密码",-1)),o(i(C),{modelValue:v.password,"onUpdate:modelValue":t[1]||(t[1]=f=>v.password=f),type:"password",placeholder:"请输入密码",size:"large","show-password":"",onKeyup:R(x,["enter"])},{prefix:c(()=>[o(i(z),{name:"lock",size:18})]),_:1},8,["modelValue"])])]),_:1}),r("div",Y,[o(i(L),{modelValue:l.value,"onUpdate:modelValue":t[2]||(t[2]=f=>l.value=f)},{default:c(()=>[...t[5]||(t[5]=[I("记住我",-1)])]),_:1},8,["modelValue"]),t[6]||(t[6]=r("a",{href:"#",class:"forgot-link"},"忘记密码?",-1))]),o(i(w),null,{default:c(()=>[o(i(j),{type:"primary",size:"large",loading:d.value,class:"login-btn",onClick:x},{default:c(()=>[d.value?(g(),m("span",ee,"登录中...")):(g(),m("span",Z,"登 录"))]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"]),t[8]||(t[8]=y('<div class="form-footer" data-v-15fc7de5><p data-v-15fc7de5>其他登录方式</p><div class="social-login" data-v-15fc7de5><button class="social-btn" title="企业微信" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="currentColor" data-v-15fc7de5><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-15fc7de5></path></svg></button><button class="social-btn" title="钉钉" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="currentColor" data-v-15fc7de5><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-15fc7de5></path></svg></button><button class="social-btn" title="飞书" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="currentColor" data-v-15fc7de5><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-15fc7de5></path></svg></button></div></div>',1))]),t[9]||(t[9]=r("div",{class:"copyright"},[r("p",null,"© 2024 XTO Team. All rights reserved.")],-1))])]))}}),ue=D(te,[["__scopeId","data-v-15fc7de5"]]);export{ue as default};
|