@befly-addon/admin 1.0.33 → 1.0.34
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/package.json +2 -2
- package/views/403/index.vue +2 -2
- package/views/admin/components/edit.vue +2 -2
- package/views/admin/components/role.vue +3 -3
- package/views/admin/index.vue +7 -7
- package/views/dict/components/edit.vue +2 -2
- package/views/dict/index.vue +5 -5
- package/views/index/components/addonList.vue +2 -2
- package/views/index/components/environmentInfo.vue +1 -1
- package/views/index/components/operationLogs.vue +1 -1
- package/views/index/components/performanceMetrics.vue +6 -6
- package/views/index/components/quickActions.vue +2 -2
- package/views/index/components/serviceStatus.vue +11 -11
- package/views/index/components/systemNotifications.vue +6 -6
- package/views/index/components/systemOverview.vue +24 -28
- package/views/index/components/systemResources.vue +7 -7
- package/views/index/components/userInfo.vue +9 -18
- package/views/login/components/emailLoginForm.vue +6 -6
- package/views/login/components/registerForm.vue +8 -8
- package/views/menu/components/edit.vue +2 -2
- package/views/menu/index.vue +6 -6
- package/views/role/components/api.vue +14 -10
- package/views/role/components/edit.vue +2 -2
- package/views/role/components/menu.vue +2 -2
- package/views/role/index.vue +7 -7
- package/views/user/index.vue +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@befly-addon/admin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.34",
|
|
4
4
|
"description": "Befly - 管理后台功能组件",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"url": "https://github.com/chenbimo/befly.git",
|
|
40
40
|
"directory": "packages/addon-admin"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "3593368cbf5c34f379b3b4569a7439bce9666938",
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"befly": "3.8.12"
|
|
45
45
|
}
|
package/views/403/index.vue
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
2
2
|
<div class="error-page">
|
|
3
3
|
<div class="error-content">
|
|
4
4
|
<div class="error-code">403</div>
|
|
5
5
|
<h1 class="error-title">无权限访问</h1>
|
|
6
6
|
<p class="error-description">抱歉,您没有访问该页面的权限</p>
|
|
7
7
|
<div class="error-actions">
|
|
8
|
-
<t-button
|
|
8
|
+
<t-button theme="primary" @click="$Method.goHome">返回首页</t-button>
|
|
9
9
|
<t-button @click="$Method.goBack">返回上一页</t-button>
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
2
2
|
<t-dialog v-model:visible="$Data.visible" :title="$Prop.actionType === 'upd' ? '编辑管理员' : '添加管理员'" width="600px" :append-to-body="true" :show-footer="true" :esc-closable="false" top="10vh" @close="$Method.onClose">
|
|
3
3
|
<t-form :model="$Data.formData" label-width="120px" label-position="left" :rules="$Data2.formRules" :ref="(el) => ($From.form = el)">
|
|
4
4
|
<t-form-item label="用户名" prop="username">
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
</t-form>
|
|
29
29
|
<template #footer>
|
|
30
30
|
<t-button @click="$Method.onClose">取消</t-button>
|
|
31
|
-
<t-button
|
|
31
|
+
<t-button theme="primary" @click="$Method.onSubmit">确定</t-button>
|
|
32
32
|
</template>
|
|
33
33
|
</t-dialog>
|
|
34
34
|
</template>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
2
2
|
<t-dialog v-model:visible="$Data.visible" title="分配角色" width="600px" :append-to-body="true" :show-footer="true" :esc-closable="false" top="20vh" @close="$Method.onClose">
|
|
3
3
|
<div class="role-dialog">
|
|
4
4
|
<div class="user-info">
|
|
5
5
|
<t-tag type="info">{{ $Prop.rowData.username }}</t-tag>
|
|
6
6
|
<span class="user-email">{{ $Prop.rowData.email }}</span>
|
|
7
7
|
</div>
|
|
8
|
-
<
|
|
8
|
+
<t-divider />
|
|
9
9
|
<t-select v-model="$Data.checkedRoleCode" :options="$Data.roleOptions" placeholder="请选择角色" />
|
|
10
10
|
</div>
|
|
11
11
|
<template #footer>
|
|
12
12
|
<t-button @click="$Method.onClose">取消</t-button>
|
|
13
|
-
<t-button
|
|
13
|
+
<t-button theme="primary" @click="$Method.onSubmit">确定</t-button>
|
|
14
14
|
</template>
|
|
15
15
|
</t-dialog>
|
|
16
16
|
</template>
|
package/views/admin/index.vue
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
<div class="page-admin page-table">
|
|
3
3
|
<div class="main-tool">
|
|
4
4
|
<div class="left">
|
|
5
|
-
<t-button
|
|
5
|
+
<t-button theme="primary" @click="$Method.onAction('add', {})">
|
|
6
6
|
<template #icon>
|
|
7
|
-
<
|
|
7
|
+
<i-lucide:plus />
|
|
8
8
|
</template>
|
|
9
9
|
添加管理员
|
|
10
10
|
</t-button>
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
<div class="right">
|
|
13
13
|
<t-button @click="$Method.handleRefresh">
|
|
14
14
|
<template #icon>
|
|
15
|
-
<
|
|
15
|
+
<i-lucide:rotate-cw />
|
|
16
16
|
</template>
|
|
17
17
|
</t-button>
|
|
18
18
|
</div>
|
|
19
19
|
<div class="right">
|
|
20
20
|
<t-button @click="$Method.handleRefresh">
|
|
21
21
|
<template #icon>
|
|
22
|
-
<
|
|
22
|
+
<i-lucide:rotate-cw />
|
|
23
23
|
</template>
|
|
24
24
|
刷新
|
|
25
25
|
</t-button>
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
<t-button variant="text" size="small">操作</t-button>
|
|
39
39
|
<t-dropdown-menu slot="dropdown">
|
|
40
40
|
<t-dropdown-item value="role">
|
|
41
|
-
<
|
|
41
|
+
<i-lucide:user />
|
|
42
42
|
分配角色
|
|
43
43
|
</t-dropdown-item>
|
|
44
44
|
<t-dropdown-item value="upd">
|
|
45
|
-
<
|
|
45
|
+
<i-lucide:pencil />
|
|
46
46
|
编辑
|
|
47
47
|
</t-dropdown-item>
|
|
48
48
|
<t-dropdown-item value="del" :divider="true">
|
|
49
|
-
<
|
|
49
|
+
<i-lucide:trash-2 style="width: 14px; height: 14px; margin-right: 6px" />
|
|
50
50
|
删除
|
|
51
51
|
</t-dropdown-item>
|
|
52
52
|
</t-dropdown-menu>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
2
2
|
<t-dialog v-model:visible="$Data.visible" :title="$Prop.actionType === 'upd' ? '编辑字典' : '添加字典'" width="600px" :append-to-body="true" :show-footer="true" :esc-closable="false" top="10vh" @close="$Method.onClose">
|
|
3
3
|
<t-form :model="$Data.formData" label-width="120px" label-position="left" :rules="$Data2.formRules" :ref="(el) => ($From.form = el)">
|
|
4
4
|
<t-form-item label="字典名称" prop="name">
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
</t-form>
|
|
29
29
|
<template #footer>
|
|
30
30
|
<t-button @click="$Method.onClose">取消</t-button>
|
|
31
|
-
<t-button
|
|
31
|
+
<t-button theme="primary" @click="$Method.onSubmit">确定</t-button>
|
|
32
32
|
</template>
|
|
33
33
|
</t-dialog>
|
|
34
34
|
</template>
|
package/views/dict/index.vue
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
<div class="page-dict page-table">
|
|
3
3
|
<div class="main-tool">
|
|
4
4
|
<div class="left">
|
|
5
|
-
<t-button
|
|
5
|
+
<t-button theme="primary" @click="$Method.onAction('add', {})">
|
|
6
6
|
<template #icon>
|
|
7
|
-
<
|
|
7
|
+
<i-lucide:plus />
|
|
8
8
|
</template>
|
|
9
9
|
添加字典
|
|
10
10
|
</t-button>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<div class="right">
|
|
13
13
|
<t-button @click="$Method.handleRefresh">
|
|
14
14
|
<template #icon>
|
|
15
|
-
<
|
|
15
|
+
<i-lucide:rotate-cw />
|
|
16
16
|
</template>
|
|
17
17
|
刷新
|
|
18
18
|
</t-button>
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
<t-button variant="text" size="small">操作</t-button>
|
|
31
31
|
<t-dropdown-menu slot="dropdown">
|
|
32
32
|
<t-dropdown-item value="upd">
|
|
33
|
-
<
|
|
33
|
+
<i-lucide:pencil />
|
|
34
34
|
编辑
|
|
35
35
|
</t-dropdown-item>
|
|
36
36
|
<t-dropdown-item value="del" :divider="true">
|
|
37
|
-
<
|
|
37
|
+
<i-lucide:trash-2 style="width: 14px; height: 14px; margin-right: 6px" />
|
|
38
38
|
删除
|
|
39
39
|
</t-dropdown-item>
|
|
40
40
|
</t-dropdown-menu>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="section-block">
|
|
3
3
|
<div class="section-header flex items-center gap-2">
|
|
4
|
-
<
|
|
4
|
+
<i-lucide:package />
|
|
5
5
|
<h2>已安装插件</h2>
|
|
6
6
|
</div>
|
|
7
7
|
<div class="section-content">
|
|
8
8
|
<div class="addon-list">
|
|
9
9
|
<div v-for="addon in addonList" :key="addon.name" class="addon-item">
|
|
10
10
|
<div class="addon-icon">
|
|
11
|
-
<
|
|
11
|
+
<i-lucide:box />
|
|
12
12
|
</div>
|
|
13
13
|
<div class="addon-info">
|
|
14
14
|
<div class="addon-title">
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="section-block">
|
|
3
3
|
<div class="section-header flex items-center gap-2">
|
|
4
|
-
<
|
|
4
|
+
<i-lucide:activity />
|
|
5
5
|
<h2>性能指标</h2>
|
|
6
6
|
</div>
|
|
7
7
|
<div class="section-content">
|
|
8
8
|
<div class="performance-grid">
|
|
9
9
|
<div class="perf-metric">
|
|
10
10
|
<div class="perf-icon">
|
|
11
|
-
<
|
|
11
|
+
<i-lucide:clock />
|
|
12
12
|
</div>
|
|
13
13
|
<div class="perf-info">
|
|
14
14
|
<div class="perf-label">平均响应</div>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</div>
|
|
18
18
|
<div class="perf-metric">
|
|
19
19
|
<div class="perf-icon">
|
|
20
|
-
<
|
|
20
|
+
<i-lucide:trending-up />
|
|
21
21
|
</div>
|
|
22
22
|
<div class="perf-info">
|
|
23
23
|
<div class="perf-label">QPS</div>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
</div>
|
|
27
27
|
<div class="perf-metric">
|
|
28
28
|
<div class="perf-icon">
|
|
29
|
-
<
|
|
29
|
+
<i-lucide:alert-circle />
|
|
30
30
|
</div>
|
|
31
31
|
<div class="perf-info">
|
|
32
32
|
<div class="perf-label">错误率</div>
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
</div>
|
|
36
36
|
<div class="perf-metric">
|
|
37
37
|
<div class="perf-icon">
|
|
38
|
-
<
|
|
38
|
+
<i-lucide:activity />
|
|
39
39
|
</div>
|
|
40
40
|
<div class="perf-info">
|
|
41
41
|
<div class="perf-label">活跃连接</div>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
</div>
|
|
46
46
|
<!-- 最慢接口提示 -->
|
|
47
47
|
<div v-if="performanceMetrics.slowestApi" class="perf-slowest">
|
|
48
|
-
<
|
|
48
|
+
<i-lucide:alert-triangle />
|
|
49
49
|
<span>最慢接口: {{ performanceMetrics.slowestApi.path }} ({{ performanceMetrics.slowestApi.time }}ms)</span>
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="section-block">
|
|
3
3
|
<div class="section-content">
|
|
4
|
-
<t-button
|
|
4
|
+
<t-button theme="primary" size="large" @click="handleClearCache">
|
|
5
5
|
<template #prefix>
|
|
6
|
-
<
|
|
6
|
+
<i-lucide:rotate-cw />
|
|
7
7
|
</template>
|
|
8
8
|
刷新缓存
|
|
9
9
|
</t-button>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="section-block">
|
|
3
3
|
<div class="section-header flex items-center gap-2">
|
|
4
|
-
<
|
|
4
|
+
<i-lucide:check-circle />
|
|
5
5
|
<h2>服务状态</h2>
|
|
6
6
|
</div>
|
|
7
7
|
<div class="section-content">
|
|
8
8
|
<div class="config-grid">
|
|
9
9
|
<div v-for="service in services" :key="service.name" class="config-card" :class="`config-${service.status}`">
|
|
10
10
|
<div class="config-icon">
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
<
|
|
15
|
-
<
|
|
16
|
-
<
|
|
11
|
+
<i-lucide:database v-if="service.name === '数据库'" style="width: 20px; height: 20px" />
|
|
12
|
+
<i-lucide:zap v-else-if="service.name === 'Redis'" style="width: 20px; height: 20px" />
|
|
13
|
+
<i-lucide:hard-drive v-else-if="service.name === '文件系统'" style="width: 20px; height: 20px" />
|
|
14
|
+
<i-lucide:mail v-else-if="service.name === '邮件服务'" style="width: 20px; height: 20px" />
|
|
15
|
+
<i-lucide:cloud v-else-if="service.name === 'OSS存储'" style="width: 20px; height: 20px" />
|
|
16
|
+
<i-lucide:circle v-else style="width: 20px; height: 20px" />
|
|
17
17
|
</div>
|
|
18
18
|
<div class="config-info">
|
|
19
19
|
<div class="config-name">{{ service.name }}</div>
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
|
25
25
|
<div class="config-badge">
|
|
26
|
-
<
|
|
27
|
-
<
|
|
28
|
-
<
|
|
29
|
-
<
|
|
26
|
+
<i-lucide:check-circle v-if="service.status === 'running'" style="width: 32px; height: 32px" />
|
|
27
|
+
<i-lucide:x-circle v-else-if="service.status === 'stopped'" style="width: 32px; height: 32px" />
|
|
28
|
+
<i-lucide:alert-circle v-else-if="service.status === 'unconfigured'" style="width: 32px; height: 32px" />
|
|
29
|
+
<i-lucide:circle v-else style="width: 32px; height: 32px" />
|
|
30
30
|
</div>
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="section-block">
|
|
3
3
|
<div class="section-header flex items-center gap-2">
|
|
4
|
-
<
|
|
4
|
+
<i-lucide:bell />
|
|
5
5
|
<h2>系统通知</h2>
|
|
6
6
|
</div>
|
|
7
7
|
<div class="section-content">
|
|
8
8
|
<div class="notification-compact-list">
|
|
9
9
|
<div v-for="notification in notifications" :key="notification.id" class="notification-compact-item">
|
|
10
10
|
<div class="notification-icon" :class="`type-${notification.type}`">
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
<
|
|
15
|
-
<
|
|
11
|
+
<i-lucide:info v-if="notification.type === 'info'" />
|
|
12
|
+
<i-lucide:check-circle v-else-if="notification.type === 'success'" />
|
|
13
|
+
<i-lucide:alert-triangle v-else-if="notification.type === 'warning'" />
|
|
14
|
+
<i-lucide:x-circle v-else-if="notification.type === 'error'" />
|
|
15
|
+
<i-lucide:bell v-else />
|
|
16
16
|
</div>
|
|
17
17
|
<div class="notification-content">
|
|
18
18
|
<span class="notification-title">{{ notification.title }}</span>
|
|
@@ -1,39 +1,35 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="section-block">
|
|
3
3
|
<div class="section-header flex items-center gap-2">
|
|
4
|
-
<
|
|
4
|
+
<i-lucide:info />
|
|
5
5
|
<h2>系统概览</h2>
|
|
6
6
|
</div>
|
|
7
7
|
<div class="section-content">
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
<div class="
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<div class="stat-value">{{ permissionStats.menuCount }}</div>
|
|
16
|
-
<div class="stat-label">菜单总数</div>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
<div class="stat-box stat-success">
|
|
20
|
-
<IconLucideWebhook />
|
|
21
|
-
<div class="stat-content">
|
|
22
|
-
<div class="stat-value">{{ permissionStats.apiCount }}</div>
|
|
23
|
-
<div class="stat-label">接口总数</div>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
<div class="stat-box stat-warning">
|
|
27
|
-
<IconLucideUsers />
|
|
28
|
-
<div class="stat-content">
|
|
29
|
-
<div class="stat-value">{{ permissionStats.roleCount }}</div>
|
|
30
|
-
<div class="stat-label">角色总数</div>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
8
|
+
<div class="info-block">
|
|
9
|
+
<div class="stats-grid">
|
|
10
|
+
<div class="stat-box stat-primary">
|
|
11
|
+
<i-lucide:menu />
|
|
12
|
+
<div class="stat-content">
|
|
13
|
+
<div class="stat-value">{{ permissionStats.menuCount }}</div>
|
|
14
|
+
<div class="stat-label">菜单总数</div>
|
|
33
15
|
</div>
|
|
34
16
|
</div>
|
|
35
|
-
|
|
36
|
-
|
|
17
|
+
<div class="stat-box stat-success">
|
|
18
|
+
<i-lucide:webhook />
|
|
19
|
+
<div class="stat-content">
|
|
20
|
+
<div class="stat-value">{{ permissionStats.apiCount }}</div>
|
|
21
|
+
<div class="stat-label">接口总数</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="stat-box stat-warning">
|
|
25
|
+
<i-lucide:users />
|
|
26
|
+
<div class="stat-content">
|
|
27
|
+
<div class="stat-value">{{ permissionStats.roleCount }}</div>
|
|
28
|
+
<div class="stat-label">角色总数</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
37
33
|
</div>
|
|
38
34
|
</div>
|
|
39
35
|
</template>
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="section-block">
|
|
3
3
|
<div class="section-header flex items-center gap-2">
|
|
4
|
-
<
|
|
4
|
+
<i-lucide:activity />
|
|
5
5
|
<h2>系统资源</h2>
|
|
6
6
|
</div>
|
|
7
7
|
<div class="section-content">
|
|
8
8
|
<div class="resource-compact-list">
|
|
9
9
|
<div class="resource-compact-item">
|
|
10
10
|
<div class="resource-compact-header">
|
|
11
|
-
<
|
|
11
|
+
<i-lucide:cpu />
|
|
12
12
|
<span class="resource-label">CPU</span>
|
|
13
13
|
<span class="resource-value">{{ systemResources.cpu.usage }}%</span>
|
|
14
14
|
<span class="resource-desc">{{ systemResources.cpu.cores }}核心</span>
|
|
15
15
|
</div>
|
|
16
|
-
<
|
|
16
|
+
<t-progress :percentage="systemResources.cpu.usage" :status="getProgressColor(systemResources.cpu.usage)" />
|
|
17
17
|
</div>
|
|
18
18
|
<div class="resource-compact-item">
|
|
19
19
|
<div class="resource-compact-header">
|
|
20
|
-
<
|
|
20
|
+
<i-lucide:hard-drive />
|
|
21
21
|
<span class="resource-label">内存</span>
|
|
22
22
|
<span class="resource-value">{{ systemResources.memory.percentage }}%</span>
|
|
23
23
|
<span class="resource-desc">{{ systemResources.memory.used }}GB / {{ systemResources.memory.total }}GB</span>
|
|
24
24
|
</div>
|
|
25
|
-
<
|
|
25
|
+
<t-progress :percentage="systemResources.memory.percentage" :status="getProgressColor(systemResources.memory.percentage)" />
|
|
26
26
|
</div>
|
|
27
27
|
<div class="resource-compact-item">
|
|
28
28
|
<div class="resource-compact-header">
|
|
29
|
-
<
|
|
29
|
+
<i-lucide:disc />
|
|
30
30
|
<span class="resource-label">磁盘</span>
|
|
31
31
|
<span class="resource-value">{{ systemResources.disk.percentage }}%</span>
|
|
32
32
|
<span class="resource-desc">{{ systemResources.disk.used }}GB / {{ systemResources.disk.total }}GB</span>
|
|
33
33
|
</div>
|
|
34
|
-
<
|
|
34
|
+
<t-progress :percentage="systemResources.disk.percentage" :status="getProgressColor(systemResources.disk.percentage)" />
|
|
35
35
|
</div>
|
|
36
36
|
</div>
|
|
37
37
|
</div>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="section-block user-info-card">
|
|
3
3
|
<div class="user-header">
|
|
4
4
|
<div class="user-avatar">
|
|
5
|
-
<
|
|
5
|
+
<i-lucide:user />
|
|
6
6
|
</div>
|
|
7
7
|
<div class="user-basic">
|
|
8
8
|
<div class="user-name">{{ $Data.userInfo.nickname || $Data.userInfo.name || $Data.userInfo.username || '未设置' }}</div>
|
|
@@ -11,24 +11,24 @@
|
|
|
11
11
|
</div>
|
|
12
12
|
<div class="user-details">
|
|
13
13
|
<div class="detail-item">
|
|
14
|
-
<
|
|
14
|
+
<i-lucide:mail />
|
|
15
15
|
<span>{{ $Data.userInfo.email || '未设置' }}</span>
|
|
16
16
|
</div>
|
|
17
17
|
<div v-if="$Data.userInfo.phone" class="detail-item">
|
|
18
|
-
<
|
|
18
|
+
<i-lucide:phone />
|
|
19
19
|
<span>{{ $Data.userInfo.phone }}</span>
|
|
20
20
|
</div>
|
|
21
21
|
<div v-if="$Data.userInfo.lastLoginTime" class="detail-item">
|
|
22
|
-
<
|
|
22
|
+
<i-lucide:clock />
|
|
23
23
|
<span>{{ $Method.formatTime($Data.userInfo.lastLoginTime) }}</span>
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
26
26
|
|
|
27
27
|
<!-- 仅 dev 角色显示刷新缓存按钮 -->
|
|
28
28
|
<div v-if="$Data.userInfo.roleCode === 'dev'" class="user-actions">
|
|
29
|
-
<t-button
|
|
29
|
+
<t-button theme="primary" size="mini" :loading="$Data.refreshing" @click="$Method.handleRefreshCache">
|
|
30
30
|
<template #icon>
|
|
31
|
-
<
|
|
31
|
+
<i-lucide:rotate-cw />
|
|
32
32
|
</template>
|
|
33
33
|
刷新缓存
|
|
34
34
|
</t-button>
|
|
@@ -77,22 +77,13 @@ const $Method = {
|
|
|
77
77
|
messages.push(`角色缓存: ${roles.count} 个`);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
message: `缓存刷新成功!${messages.join(',')}`,
|
|
82
|
-
duration: 3000
|
|
83
|
-
});
|
|
80
|
+
MessagePlugin.success(`缓存刷新成功!${messages.join(',')}`);
|
|
84
81
|
} else {
|
|
85
|
-
|
|
86
|
-
message: result.msg || '部分缓存刷新失败',
|
|
87
|
-
duration: 3000
|
|
88
|
-
});
|
|
82
|
+
MessagePlugin.warning(result.msg || '部分缓存刷新失败');
|
|
89
83
|
}
|
|
90
84
|
} catch (error) {
|
|
91
85
|
console.error('刷新缓存失败:', error);
|
|
92
|
-
|
|
93
|
-
message: '刷新缓存失败,请稍后重试',
|
|
94
|
-
duration: 3000
|
|
95
|
-
});
|
|
86
|
+
MessagePlugin.error('刷新缓存失败,请稍后重试');
|
|
96
87
|
} finally {
|
|
97
88
|
$Data.refreshing = false;
|
|
98
89
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<t-form-item prop="account" label="账号">
|
|
4
4
|
<t-input v-model="$Data.formData.account" placeholder="请输入用户名或邮箱" size="large" clearable>
|
|
5
5
|
<template #prefix-icon>
|
|
6
|
-
<
|
|
6
|
+
<i-lucide:user />
|
|
7
7
|
</template>
|
|
8
8
|
</t-input>
|
|
9
9
|
</t-form-item>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<t-form-item prop="password" label="密码">
|
|
12
12
|
<t-input v-model="$Data.formData.password" type="password" placeholder="请输入密码" size="large" clearable>
|
|
13
13
|
<template #prefix-icon>
|
|
14
|
-
<
|
|
14
|
+
<i-lucide:lock />
|
|
15
15
|
</template>
|
|
16
16
|
</t-input>
|
|
17
17
|
</t-form-item>
|
|
@@ -94,15 +94,15 @@ const $Method = {
|
|
|
94
94
|
max-width: 450px;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
.
|
|
97
|
+
.t-form__item {
|
|
98
98
|
width: 100%;
|
|
99
99
|
margin-bottom: 1.2rem;
|
|
100
100
|
|
|
101
|
-
:deep(.
|
|
101
|
+
:deep(.t-form__controls) {
|
|
102
102
|
width: 100%;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
:deep(.
|
|
105
|
+
:deep(.t-input) {
|
|
106
106
|
width: 100%;
|
|
107
107
|
background: #f8f9fa;
|
|
108
108
|
border: 1px solid #e0e0e0;
|
|
@@ -159,7 +159,7 @@ const $Method = {
|
|
|
159
159
|
box-shadow: 0 3px 10px rgba(72, 177, 159, 0.3);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
:deep(.
|
|
162
|
+
:deep(.t-button__text) {
|
|
163
163
|
color: #fff;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<t-form-item prop="username" label="用户名">
|
|
4
4
|
<t-input v-model="$Data.formData.username" placeholder="请输入用户名" size="large" clearable>
|
|
5
5
|
<template #prefix-icon>
|
|
6
|
-
<
|
|
6
|
+
<i-lucide:user />
|
|
7
7
|
</template>
|
|
8
8
|
</t-input>
|
|
9
9
|
</t-form-item>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<t-form-item prop="email" label="邮箱">
|
|
12
12
|
<t-input v-model="$Data.formData.email" placeholder="请输入邮箱" size="large" clearable>
|
|
13
13
|
<template #prefix-icon>
|
|
14
|
-
<
|
|
14
|
+
<i-lucide:mail />
|
|
15
15
|
</template>
|
|
16
16
|
</t-input>
|
|
17
17
|
</t-form-item>
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<t-form-item prop="password" label="密码">
|
|
20
20
|
<t-input v-model="$Data.formData.password" type="password" placeholder="请输入密码" size="large" clearable>
|
|
21
21
|
<template #prefix-icon>
|
|
22
|
-
<
|
|
22
|
+
<i-lucide:lock />
|
|
23
23
|
</template>
|
|
24
24
|
</t-input>
|
|
25
25
|
</t-form-item>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<t-form-item prop="nickname" label="昵称">
|
|
28
28
|
<t-input v-model="$Data.formData.nickname" placeholder="请输入昵称(选填)" size="large" clearable>
|
|
29
29
|
<template #prefix-icon>
|
|
30
|
-
<
|
|
30
|
+
<i-lucide:smile />
|
|
31
31
|
</template>
|
|
32
32
|
</t-input>
|
|
33
33
|
</t-form-item>
|
|
@@ -115,15 +115,15 @@ const $Method = {
|
|
|
115
115
|
max-width: 450px;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
.
|
|
118
|
+
.t-form__item {
|
|
119
119
|
width: 100%;
|
|
120
120
|
margin-bottom: 1.2rem;
|
|
121
121
|
|
|
122
|
-
:deep(.
|
|
122
|
+
:deep(.t-form__controls) {
|
|
123
123
|
width: 100%;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
:deep(.
|
|
126
|
+
:deep(.t-input) {
|
|
127
127
|
width: 100%;
|
|
128
128
|
background: #f8f9fa;
|
|
129
129
|
border: 1px solid #e0e0e0;
|
|
@@ -163,7 +163,7 @@ const $Method = {
|
|
|
163
163
|
box-shadow: 0 3px 10px rgba(72, 177, 159, 0.3);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
:deep(.
|
|
166
|
+
:deep(.t-button__text) {
|
|
167
167
|
color: #fff;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
2
2
|
<t-dialog v-model:visible="$Data.visible" :title="$Prop.actionType === 'add' ? '添加菜单' : '编辑菜单'" width="600px" :append-to-body="true" :show-footer="true" top="10vh">
|
|
3
3
|
<t-form :model="$Data.formData" label-width="120px" label-position="left" :rules="$Data2.formRules" :ref="(el) => ($From.form = el)">
|
|
4
4
|
<t-form-item label="菜单名称" prop="name">
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</t-form>
|
|
23
23
|
<template #footer>
|
|
24
24
|
<t-button @click="$Method.onClose">取消</t-button>
|
|
25
|
-
<t-button
|
|
25
|
+
<t-button theme="primary" @click="$Method.onSubmit">确定</t-button>
|
|
26
26
|
</template>
|
|
27
27
|
</t-dialog>
|
|
28
28
|
</template>
|
package/views/menu/index.vue
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
<div class="page-menu page-table">
|
|
3
3
|
<div class="main-tool">
|
|
4
4
|
<div class="left">
|
|
5
|
-
<t-button
|
|
5
|
+
<t-button theme="primary" @click="$Method.onAction('add', {})">
|
|
6
6
|
<template #icon>
|
|
7
|
-
<
|
|
7
|
+
<i-lucide:plus />
|
|
8
8
|
</template>
|
|
9
9
|
添加菜单
|
|
10
10
|
</t-button>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<div class="right">
|
|
13
13
|
<t-button @click="$Method.handleRefresh">
|
|
14
14
|
<template #icon>
|
|
15
|
-
<
|
|
15
|
+
<i-lucide:rotate-cw />
|
|
16
16
|
</template>
|
|
17
17
|
刷新
|
|
18
18
|
</t-button>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<div class="main-table">
|
|
22
22
|
<t-table :data="$Data.menuList" :columns="$Data.columns" header-cell-class-name="custom-table-cell-class" size="small" height="100%" row-key="id">
|
|
23
23
|
<template #icon="{ row }">
|
|
24
|
-
<
|
|
24
|
+
<i-lucide:square v-if="row.icon" />
|
|
25
25
|
<span v-else>-</span>
|
|
26
26
|
</template>
|
|
27
27
|
<template #state="{ row }">
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
<t-button variant="text" size="small">操作</t-button>
|
|
35
35
|
<t-dropdown-menu slot="dropdown">
|
|
36
36
|
<t-dropdown-item value="upd">
|
|
37
|
-
<
|
|
37
|
+
<i-lucide:pencil />
|
|
38
38
|
编辑
|
|
39
39
|
</t-dropdown-item>
|
|
40
40
|
<t-dropdown-item value="del" :divider="true">
|
|
41
|
-
<
|
|
41
|
+
<i-lucide:trash-2 style="width: 14px; height: 14px; margin-right: 6px" />
|
|
42
42
|
删除
|
|
43
43
|
</t-dropdown-item>
|
|
44
44
|
</t-dropdown-menu>
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
2
2
|
<t-dialog v-model:visible="$Data.visible" title="接口权限" width="900px" :append-to-body="true" :show-footer="true" top="5vh" @close="$Method.onClose">
|
|
3
3
|
<div class="comp-role-api">
|
|
4
4
|
<!-- 搜索框 -->
|
|
5
5
|
<div class="search-box">
|
|
6
|
-
<
|
|
6
|
+
<t-input v-model="$Data.searchText" placeholder="搜索接口名称或路径" clearable @change="$Method.onSearch">
|
|
7
|
+
<template #prefix-icon>
|
|
8
|
+
<i-lucide:search />
|
|
9
|
+
</template>
|
|
10
|
+
</t-input>
|
|
7
11
|
</div>
|
|
8
12
|
|
|
9
13
|
<!-- 接口分组列表 -->
|
|
@@ -11,9 +15,9 @@
|
|
|
11
15
|
<div v-for="group in $Data.filteredApiData" :key="group.name" class="api-group">
|
|
12
16
|
<div class="group-header">{{ group.title }}</div>
|
|
13
17
|
<div class="api-checkbox-list">
|
|
14
|
-
<
|
|
15
|
-
<
|
|
16
|
-
</
|
|
18
|
+
<t-checkbox-group v-model="$Data.checkedApiIds">
|
|
19
|
+
<t-checkbox v-for="api in group.apis" :key="api.id" :value="api.id"> {{ api.label }} </t-checkbox>
|
|
20
|
+
</t-checkbox-group>
|
|
17
21
|
</div>
|
|
18
22
|
</div>
|
|
19
23
|
</div>
|
|
@@ -26,7 +30,7 @@
|
|
|
26
30
|
</div>
|
|
27
31
|
<div class="footer-right">
|
|
28
32
|
<t-button @click="$Method.onClose">取消</t-button>
|
|
29
|
-
<t-button
|
|
33
|
+
<t-button theme="primary" @click="$Method.onSubmit">保存</t-button>
|
|
30
34
|
</div>
|
|
31
35
|
</template>
|
|
32
36
|
</t-dialog>
|
|
@@ -241,18 +245,18 @@ $Method.initData();
|
|
|
241
245
|
padding: 16px;
|
|
242
246
|
background-color: $bg-color-container;
|
|
243
247
|
|
|
244
|
-
:deep(.
|
|
248
|
+
:deep(.t-checkbox-group) {
|
|
245
249
|
display: flex;
|
|
246
250
|
flex-wrap: wrap;
|
|
247
251
|
gap: 12px;
|
|
248
252
|
width: 100%;
|
|
249
253
|
}
|
|
250
254
|
|
|
251
|
-
:deep(.
|
|
255
|
+
:deep(.t-checkbox) {
|
|
252
256
|
flex: 0 0 calc(33.333% - 8px);
|
|
253
257
|
margin: 0;
|
|
254
258
|
|
|
255
|
-
.
|
|
259
|
+
.t-checkbox__label {
|
|
256
260
|
white-space: nowrap;
|
|
257
261
|
overflow: hidden;
|
|
258
262
|
text-overflow: ellipsis;
|
|
@@ -264,7 +268,7 @@ $Method.initData();
|
|
|
264
268
|
}
|
|
265
269
|
|
|
266
270
|
// 底部操作栏布局
|
|
267
|
-
:deep(.
|
|
271
|
+
:deep(.t-dialog__footer) {
|
|
268
272
|
display: flex;
|
|
269
273
|
justify-content: space-between;
|
|
270
274
|
align-items: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
2
2
|
<t-dialog v-model:visible="$Data.visible" :title="$Prop.actionType === 'upd' ? '更新角色' : '添加角色'" width="600px" :append-to-body="true" :show-footer="true" :esc-closable="false" top="10vh" @close="$Method.onClose">
|
|
3
3
|
<div class="comp-role-edit">
|
|
4
4
|
<t-form :model="$Data.formData" label-width="120px" label-position="left" :rules="$Data2.formRules" :ref="(el) => ($From.form = el)">
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
</div>
|
|
25
25
|
<template #footer>
|
|
26
26
|
<t-button @click="$Method.onClose">取消</t-button>
|
|
27
|
-
<t-button
|
|
27
|
+
<t-button theme="primary" @click="$Method.onSubmit">确定</t-button>
|
|
28
28
|
</template>
|
|
29
29
|
</t-dialog>
|
|
30
30
|
</template>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
2
2
|
<t-dialog v-model:visible="$Data.visible" title="菜单权限" width="600px" :append-to-body="true" :show-footer="true" top="10vh" @close="$Method.onClose">
|
|
3
3
|
<div class="comp-role-menu">
|
|
4
4
|
<t-tree :data="$Data.menuTreeData" node-key="id" show-checkbox default-expand-all :props="{ label: 'name' }" :ref="(el) => ($From.tree = el)" />
|
|
5
5
|
</div>
|
|
6
6
|
<template #footer>
|
|
7
7
|
<t-button @click="$Method.onClose">取消</t-button>
|
|
8
|
-
<t-button
|
|
8
|
+
<t-button theme="primary" @click="$Method.onSubmit">保存</t-button>
|
|
9
9
|
</template>
|
|
10
10
|
</t-dialog>
|
|
11
11
|
</template>
|
package/views/role/index.vue
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
<div class="page-role page-table">
|
|
3
3
|
<div class="main-tool">
|
|
4
4
|
<div class="left">
|
|
5
|
-
<t-button
|
|
5
|
+
<t-button theme="primary" @click="$Method.onAction('add', {})">
|
|
6
6
|
<template #icon>
|
|
7
|
-
<
|
|
7
|
+
<i-lucide:plus />
|
|
8
8
|
</template>
|
|
9
9
|
添加角色
|
|
10
10
|
</t-button>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<div class="right">
|
|
13
13
|
<t-button @click="$Method.handleRefresh">
|
|
14
14
|
<template #icon>
|
|
15
|
-
<
|
|
15
|
+
<i-lucide:rotate-cw />
|
|
16
16
|
</template>
|
|
17
17
|
刷新
|
|
18
18
|
</t-button>
|
|
@@ -30,19 +30,19 @@
|
|
|
30
30
|
<t-button variant="text" size="small">操作</t-button>
|
|
31
31
|
<t-dropdown-menu slot="dropdown">
|
|
32
32
|
<t-dropdown-item value="upd">
|
|
33
|
-
<
|
|
33
|
+
<i-lucide:pencil />
|
|
34
34
|
编辑
|
|
35
35
|
</t-dropdown-item>
|
|
36
36
|
<t-dropdown-item value="menu">
|
|
37
|
-
<
|
|
37
|
+
<i-lucide:settings />
|
|
38
38
|
菜单权限
|
|
39
39
|
</t-dropdown-item>
|
|
40
40
|
<t-dropdown-item value="api">
|
|
41
|
-
<
|
|
41
|
+
<i-lucide:code />
|
|
42
42
|
接口权限
|
|
43
43
|
</t-dropdown-item>
|
|
44
44
|
<t-dropdown-item value="del" :divider="true">
|
|
45
|
-
<
|
|
45
|
+
<i-lucide:trash-2 style="width: 14px; height: 14px; margin-right: 6px" />
|
|
46
46
|
删除
|
|
47
47
|
</t-dropdown-item>
|
|
48
48
|
</t-dropdown-menu>
|
package/views/user/index.vue
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<div class="toolbar-left">
|
|
6
6
|
<t-button theme="primary" @click="$Method.handleAdd">
|
|
7
7
|
<template #icon>
|
|
8
|
-
<
|
|
8
|
+
<i-lucide:plus />
|
|
9
9
|
</template>
|
|
10
10
|
添加管理员
|
|
11
11
|
</t-button>
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
<t-select v-model="$Data.searchState" placeholder="状态" clearable style="width: 120px" :options="$Data.stateOptions" @change="$Method.handleSearch" />
|
|
17
17
|
<t-button theme="default" @click="$Method.handleSearch">
|
|
18
18
|
<template #icon>
|
|
19
|
-
<
|
|
19
|
+
<i-lucide:search />
|
|
20
20
|
</template>
|
|
21
21
|
搜索
|
|
22
22
|
</t-button>
|
|
23
23
|
<t-button theme="default" @click="$Method.handleReset">
|
|
24
24
|
<template #icon>
|
|
25
|
-
<
|
|
25
|
+
<i-lucide:rotate-cw />
|
|
26
26
|
</template>
|
|
27
27
|
重置
|
|
28
28
|
</t-button>
|