@befly-addon/admin 1.0.32 → 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 +3 -4
- package/views/403/index.vue +2 -3
- package/views/admin/components/edit.vue +2 -2
- package/views/admin/components/role.vue +3 -3
- package/views/admin/index.vue +7 -13
- package/views/dict/components/edit.vue +2 -2
- package/views/dict/index.vue +6 -11
- package/views/index/components/addonList.vue +3 -5
- package/views/index/components/environmentInfo.vue +2 -3
- package/views/index/components/operationLogs.vue +2 -4
- package/views/index/components/performanceMetrics.vue +7 -12
- package/views/index/components/quickActions.vue +3 -4
- package/views/index/components/serviceStatus.vue +12 -23
- package/views/index/components/systemNotifications.vue +7 -15
- package/views/index/components/systemOverview.vue +25 -34
- package/views/index/components/systemResources.vue +8 -12
- package/views/index/components/userInfo.vue +10 -24
- package/views/login/components/emailLoginForm.vue +7 -10
- package/views/login/components/registerForm.vue +9 -13
- package/views/menu/components/edit.vue +2 -2
- package/views/menu/index.vue +7 -13
- 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 +8 -14
- package/views/user/index.vue +4 -7
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,9 +39,8 @@
|
|
|
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
|
-
"befly": "3.8.12"
|
|
45
|
-
"tdesign-vue-next": "^1.10.6"
|
|
44
|
+
"befly": "3.8.12"
|
|
46
45
|
}
|
|
47
46
|
}
|
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>
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
15
|
<script setup>
|
|
16
|
-
import { useRouter } from 'vue-router';
|
|
17
16
|
const router = useRouter();
|
|
18
17
|
|
|
19
18
|
const $Method = {
|
|
@@ -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>
|
|
@@ -68,12 +68,6 @@
|
|
|
68
68
|
</template>
|
|
69
69
|
|
|
70
70
|
<script setup>
|
|
71
|
-
import IconLucidePlus from '~icons/lucide/plus';
|
|
72
|
-
import IconLucideRotateCw from '~icons/lucide/rotate-cw';
|
|
73
|
-
import IconLucidePencil from '~icons/lucide/pencil';
|
|
74
|
-
import IconLucideUser from '~icons/lucide/user';
|
|
75
|
-
import IconLucideTrash2 from '~icons/lucide/trash-2';
|
|
76
|
-
|
|
77
71
|
import EditDialog from './components/edit.vue';
|
|
78
72
|
import RoleDialog from './components/role.vue';
|
|
79
73
|
import { $Http } from '@/plugins/http';
|
|
@@ -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
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
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>
|
|
@@ -53,11 +53,6 @@
|
|
|
53
53
|
</template>
|
|
54
54
|
|
|
55
55
|
<script setup>
|
|
56
|
-
import IconLucidePlus from '~icons/lucide/plus';
|
|
57
|
-
import IconLucideRotateCw from '~icons/lucide/rotate-cw';
|
|
58
|
-
import IconLucidePencil from '~icons/lucide/pencil';
|
|
59
|
-
import IconLucideTrash2 from '~icons/lucide/trash-2';
|
|
60
|
-
|
|
61
56
|
import EditDialog from './components/edit.vue';
|
|
62
57
|
import { $Http } from '@/plugins/http';
|
|
63
58
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<template>
|
|
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">
|
|
@@ -24,8 +24,6 @@
|
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
26
|
<script setup>
|
|
27
|
-
import IconLucideBox from '~icons/lucide/box';
|
|
28
|
-
import IconLucidePackage from '~icons/lucide/package';
|
|
29
27
|
import { $Http } from '@/plugins/http';
|
|
30
28
|
|
|
31
29
|
// 组件内部数据
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
2
2
|
<div class="section-block">
|
|
3
3
|
<div class="section-header flex items-center gap-2">
|
|
4
|
-
<
|
|
4
|
+
<i-lucide:server />
|
|
5
5
|
<h2>运行环境</h2>
|
|
6
6
|
</div>
|
|
7
7
|
<div class="section-content">
|
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
38
|
<script setup>
|
|
39
|
-
import IconLucideServer from '~icons/lucide/server';
|
|
40
39
|
import { $Http } from '@/plugins/http';
|
|
41
40
|
|
|
42
41
|
// 组件内部数据
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
2
2
|
<div class="section-block">
|
|
3
3
|
<div class="section-header flex items-center gap-2">
|
|
4
|
-
<
|
|
4
|
+
<i-lucide:file-text />
|
|
5
5
|
<h2>操作日志</h2>
|
|
6
6
|
</div>
|
|
7
7
|
<div class="section-content">
|
|
@@ -34,8 +34,6 @@
|
|
|
34
34
|
</template>
|
|
35
35
|
|
|
36
36
|
<script setup>
|
|
37
|
-
import IconLucideFileText from '~icons/lucide/file-text';
|
|
38
|
-
|
|
39
37
|
// 组件内部数据
|
|
40
38
|
const operationLogs = $ref([
|
|
41
39
|
{ id: 1, userName: '管理员', action: '创建角色', module: '权限管理', ip: '192.168.1.100', status: 'success', createdAt: Date.now() - 120000 },
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<template>
|
|
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>
|
|
@@ -53,11 +53,6 @@
|
|
|
53
53
|
</template>
|
|
54
54
|
|
|
55
55
|
<script setup>
|
|
56
|
-
import IconLucideActivity from '~icons/lucide/activity';
|
|
57
|
-
import IconLucideTrendingUp from '~icons/lucide/trending-up';
|
|
58
|
-
import IconLucideAlertCircle from '~icons/lucide/alert-circle';
|
|
59
|
-
import IconLucideClock from '~icons/lucide/clock';
|
|
60
|
-
import IconLucideAlertTriangle from '~icons/lucide/alert-triangle';
|
|
61
56
|
import { $Http } from '@/plugins/http';
|
|
62
57
|
|
|
63
58
|
// 组件内部数据
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<template>
|
|
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>
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
</template>
|
|
13
13
|
|
|
14
14
|
<script setup>
|
|
15
|
-
import IconLucideRotateCw from '~icons/lucide/rotate-cw';
|
|
16
15
|
const handleClearCache = () => {
|
|
17
16
|
console.log('刷新缓存');
|
|
18
17
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
<template>
|
|
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>
|
|
@@ -35,17 +35,6 @@
|
|
|
35
35
|
</template>
|
|
36
36
|
|
|
37
37
|
<script setup>
|
|
38
|
-
import IconLucideCheckCircle from '~icons/lucide/check-circle';
|
|
39
|
-
import IconLucideZap from '~icons/lucide/zap';
|
|
40
|
-
import IconLucideCloud from '~icons/lucide/cloud';
|
|
41
|
-
import IconLucideCircle from '~icons/lucide/circle';
|
|
42
|
-
import IconLucideXCircle from '~icons/lucide/x-circle';
|
|
43
|
-
import IconLucideCheck from '~icons/lucide/check';
|
|
44
|
-
import IconLucideX from '~icons/lucide/x';
|
|
45
|
-
import IconLucideAlertCircle from '~icons/lucide/alert-circle';
|
|
46
|
-
import IconLucideDatabase from '~icons/lucide/database';
|
|
47
|
-
import IconLucideMail from '~icons/lucide/mail';
|
|
48
|
-
import IconLucideHardDrive from '~icons/lucide/hard-drive';
|
|
49
38
|
import { $Http } from '@/plugins/http';
|
|
50
39
|
|
|
51
40
|
// 组件内部数据
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
<template>
|
|
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>
|
|
@@ -26,14 +26,6 @@
|
|
|
26
26
|
</template>
|
|
27
27
|
|
|
28
28
|
<script setup>
|
|
29
|
-
import IconLucideBell from '~icons/lucide/bell';
|
|
30
|
-
import IconLucideCheckCircle from '~icons/lucide/check-circle';
|
|
31
|
-
import IconLucideAlertTriangle from '~icons/lucide/alert-triangle';
|
|
32
|
-
import IconLucideXCircle from '~icons/lucide/x-circle';
|
|
33
|
-
import IconLucideInfo from '~icons/lucide/info';
|
|
34
|
-
import IconLucideCheck from '~icons/lucide/check';
|
|
35
|
-
import IconLucideX from '~icons/lucide/x';
|
|
36
|
-
|
|
37
29
|
// 组件内部数据
|
|
38
30
|
const notifications = $ref([
|
|
39
31
|
{ id: 1, type: 'warning', title: '系统更新提醒 - v1.1.0 版本已发布', isRead: false, createdAt: Date.now() - 3600000 },
|
|
@@ -1,49 +1,40 @@
|
|
|
1
|
-
<template>
|
|
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>
|
|
40
36
|
|
|
41
37
|
<script setup>
|
|
42
|
-
import IconLucideWebhook from '~icons/lucide/webhook';
|
|
43
|
-
import IconLucideUsers from '~icons/lucide/users';
|
|
44
|
-
import IconLucideUser from '~icons/lucide/user';
|
|
45
|
-
import IconLucideMenu from '~icons/lucide/menu';
|
|
46
|
-
import IconLucideInfo from '~icons/lucide/info';
|
|
47
38
|
import { $Http } from '@/plugins/http';
|
|
48
39
|
|
|
49
40
|
// 组件内部数据
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
<template>
|
|
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>
|
|
@@ -39,10 +39,6 @@
|
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
41
|
<script setup>
|
|
42
|
-
import IconLucideDisc from '~icons/lucide/disc';
|
|
43
|
-
import IconLucideCpu from '~icons/lucide/cpu';
|
|
44
|
-
import IconLucideHardDrive from '~icons/lucide/hard-drive';
|
|
45
|
-
import IconLucideActivity from '~icons/lucide/activity';
|
|
46
42
|
import { $Http } from '@/plugins/http';
|
|
47
43
|
|
|
48
44
|
// 组件内部数据
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
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>
|
|
@@ -37,11 +37,6 @@
|
|
|
37
37
|
</template>
|
|
38
38
|
|
|
39
39
|
<script setup>
|
|
40
|
-
import IconLucidePhone from '~icons/lucide/phone';
|
|
41
|
-
import IconLucideClock from '~icons/lucide/clock';
|
|
42
|
-
import IconLucideUser from '~icons/lucide/user';
|
|
43
|
-
import IconLucideMail from '~icons/lucide/mail';
|
|
44
|
-
import IconLucideRotateCw from '~icons/lucide/rotate-cw';
|
|
45
40
|
import { $Http } from '@/plugins/http';
|
|
46
41
|
|
|
47
42
|
// 响应式数据
|
|
@@ -82,22 +77,13 @@ const $Method = {
|
|
|
82
77
|
messages.push(`角色缓存: ${roles.count} 个`);
|
|
83
78
|
}
|
|
84
79
|
|
|
85
|
-
|
|
86
|
-
message: `缓存刷新成功!${messages.join(',')}`,
|
|
87
|
-
duration: 3000
|
|
88
|
-
});
|
|
80
|
+
MessagePlugin.success(`缓存刷新成功!${messages.join(',')}`);
|
|
89
81
|
} else {
|
|
90
|
-
|
|
91
|
-
message: result.msg || '部分缓存刷新失败',
|
|
92
|
-
duration: 3000
|
|
93
|
-
});
|
|
82
|
+
MessagePlugin.warning(result.msg || '部分缓存刷新失败');
|
|
94
83
|
}
|
|
95
84
|
} catch (error) {
|
|
96
85
|
console.error('刷新缓存失败:', error);
|
|
97
|
-
|
|
98
|
-
message: '刷新缓存失败,请稍后重试',
|
|
99
|
-
duration: 3000
|
|
100
|
-
});
|
|
86
|
+
MessagePlugin.error('刷新缓存失败,请稍后重试');
|
|
101
87
|
} finally {
|
|
102
88
|
$Data.refreshing = false;
|
|
103
89
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
2
2
|
<t-form :model="$Data.formData" :rules="$Data2.formRules" :ref="(el) => ($From.form = el)" class="login-form" label-width="90px" label-position="left" :show-message="false">
|
|
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>
|
|
@@ -25,9 +25,6 @@
|
|
|
25
25
|
</template>
|
|
26
26
|
|
|
27
27
|
<script setup>
|
|
28
|
-
import { useRouter } from 'vue-router';
|
|
29
|
-
import IconLucideUser from '~icons/lucide/user';
|
|
30
|
-
import IconLucideLock from '~icons/lucide/lock';
|
|
31
28
|
import { $Http } from '@/plugins/http';
|
|
32
29
|
import { $Storage } from '@/plugins/storage';
|
|
33
30
|
|
|
@@ -97,15 +94,15 @@ const $Method = {
|
|
|
97
94
|
max-width: 450px;
|
|
98
95
|
}
|
|
99
96
|
|
|
100
|
-
.
|
|
97
|
+
.t-form__item {
|
|
101
98
|
width: 100%;
|
|
102
99
|
margin-bottom: 1.2rem;
|
|
103
100
|
|
|
104
|
-
:deep(.
|
|
101
|
+
:deep(.t-form__controls) {
|
|
105
102
|
width: 100%;
|
|
106
103
|
}
|
|
107
104
|
|
|
108
|
-
:deep(.
|
|
105
|
+
:deep(.t-input) {
|
|
109
106
|
width: 100%;
|
|
110
107
|
background: #f8f9fa;
|
|
111
108
|
border: 1px solid #e0e0e0;
|
|
@@ -162,7 +159,7 @@ const $Method = {
|
|
|
162
159
|
box-shadow: 0 3px 10px rgba(72, 177, 159, 0.3);
|
|
163
160
|
}
|
|
164
161
|
|
|
165
|
-
:deep(.
|
|
162
|
+
:deep(.t-button__text) {
|
|
166
163
|
color: #fff;
|
|
167
164
|
}
|
|
168
165
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
2
2
|
<t-form :model="$Data.formData" :rules="$Data2.formRules" :ref="(el) => ($From.form = el)" class="login-form" label-width="70px" label-position="left">
|
|
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>
|
|
@@ -37,10 +37,6 @@
|
|
|
37
37
|
</template>
|
|
38
38
|
|
|
39
39
|
<script setup>
|
|
40
|
-
import IconLucideUser from '~icons/lucide/user';
|
|
41
|
-
import IconLucideMail from '~icons/lucide/mail';
|
|
42
|
-
import IconLucideLock from '~icons/lucide/lock';
|
|
43
|
-
import IconLucideSmile from '~icons/lucide/smile';
|
|
44
40
|
import { $Http } from '@/plugins/http';
|
|
45
41
|
|
|
46
42
|
const emit = defineEmits(['success']);
|
|
@@ -119,15 +115,15 @@ const $Method = {
|
|
|
119
115
|
max-width: 450px;
|
|
120
116
|
}
|
|
121
117
|
|
|
122
|
-
.
|
|
118
|
+
.t-form__item {
|
|
123
119
|
width: 100%;
|
|
124
120
|
margin-bottom: 1.2rem;
|
|
125
121
|
|
|
126
|
-
:deep(.
|
|
122
|
+
:deep(.t-form__controls) {
|
|
127
123
|
width: 100%;
|
|
128
124
|
}
|
|
129
125
|
|
|
130
|
-
:deep(.
|
|
126
|
+
:deep(.t-input) {
|
|
131
127
|
width: 100%;
|
|
132
128
|
background: #f8f9fa;
|
|
133
129
|
border: 1px solid #e0e0e0;
|
|
@@ -167,7 +163,7 @@ const $Method = {
|
|
|
167
163
|
box-shadow: 0 3px 10px rgba(72, 177, 159, 0.3);
|
|
168
164
|
}
|
|
169
165
|
|
|
170
|
-
:deep(.
|
|
166
|
+
:deep(.t-button__text) {
|
|
171
167
|
color: #fff;
|
|
172
168
|
}
|
|
173
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
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
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>
|
|
@@ -57,12 +57,6 @@
|
|
|
57
57
|
</template>
|
|
58
58
|
|
|
59
59
|
<script setup>
|
|
60
|
-
import IconLucidePlus from '~icons/lucide/plus';
|
|
61
|
-
import IconLucideRotateCw from '~icons/lucide/rotate-cw';
|
|
62
|
-
import IconLucideSquare from '~icons/lucide/square';
|
|
63
|
-
import IconLucidePencil from '~icons/lucide/pencil';
|
|
64
|
-
import IconLucideTrash2 from '~icons/lucide/trash-2';
|
|
65
|
-
|
|
66
60
|
import EditDialog from './components/edit.vue';
|
|
67
61
|
import { $Http } from '@/plugins/http';
|
|
68
62
|
|
|
@@ -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
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
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>
|
|
@@ -67,12 +67,6 @@
|
|
|
67
67
|
</template>
|
|
68
68
|
|
|
69
69
|
<script setup>
|
|
70
|
-
import IconLucidePlus from '~icons/lucide/plus';
|
|
71
|
-
import IconLucideRotateCw from '~icons/lucide/rotate-cw';
|
|
72
|
-
import IconLucidePencil from '~icons/lucide/pencil';
|
|
73
|
-
import IconLucideSettings from '~icons/lucide/settings';
|
|
74
|
-
import IconLucideCode from '~icons/lucide/code';
|
|
75
|
-
import IconLucideTrash2 from '~icons/lucide/trash-2';
|
|
76
70
|
import EditDialog from './components/edit.vue';
|
|
77
71
|
import MenuDialog from './components/menu.vue';
|
|
78
72
|
import ApiDialog from './components/api.vue';
|
package/views/user/index.vue
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
2
2
|
<div class="user-manage">
|
|
3
3
|
<!-- 上:过滤和操作栏 -->
|
|
4
4
|
<div class="toolbar">
|
|
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>
|
|
@@ -74,9 +74,6 @@
|
|
|
74
74
|
</template>
|
|
75
75
|
|
|
76
76
|
<script setup>
|
|
77
|
-
import IconLucidePlus from '~icons/lucide/plus';
|
|
78
|
-
import IconLucideSearch from '~icons/lucide/search';
|
|
79
|
-
import IconLucideRotateCw from '~icons/lucide/rotate-cw';
|
|
80
77
|
import { $Http } from '@/plugins/http';
|
|
81
78
|
|
|
82
79
|
// 响应式数据
|