befly-admin-ui 1.10.17 → 1.10.19

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.
Files changed (39) hide show
  1. package/README.md +2 -1
  2. package/components/detailPanel.vue +0 -1
  3. package/components/pageDialog.vue +0 -1
  4. package/components/pageTableDetail.vue +1 -1
  5. package/layouts/default.vue +1 -2
  6. package/package.json +2 -2
  7. package/styles/dashboardCard.scss +228 -0
  8. package/views/config/dict/components/edit.vue +1 -1
  9. package/views/config/dict/index.vue +1 -2
  10. package/views/config/dictType/components/edit.vue +1 -1
  11. package/views/config/dictType/index.vue +0 -2
  12. package/views/config/system/components/edit.vue +1 -1
  13. package/views/config/system/index.vue +0 -2
  14. package/views/index/components/environmentInfo.vue +66 -81
  15. package/views/index/components/projectStats.vue +392 -0
  16. package/views/index/components/serviceStatus.vue +28 -105
  17. package/views/index/components/systemOverview.vue +41 -1065
  18. package/views/index/components/systemResources.vue +35 -94
  19. package/views/index/index.vue +10 -7
  20. package/views/log/email/index.vue +1 -2
  21. package/views/log/error/index.vue +1 -2
  22. package/views/log/login/index.vue +0 -1
  23. package/views/log/operate/index.vue +0 -1
  24. package/views/login_1/index.vue +1 -2
  25. package/views/people/admin/components/edit.vue +0 -6
  26. package/views/people/admin/index.vue +0 -2
  27. package/views/permission/api/index.vue +1 -2
  28. package/views/permission/menu/index.vue +1 -1
  29. package/views/permission/role/components/api.vue +1 -2
  30. package/views/permission/role/components/edit.vue +0 -6
  31. package/views/permission/role/components/menu.vue +1 -2
  32. package/views/permission/role/index.vue +0 -2
  33. package/views/resource/gallery/index.vue +1 -2
  34. package/views/index/components/addonList.vue +0 -140
  35. package/views/index/components/operationLogs.vue +0 -120
  36. package/views/index/components/performanceMetrics.vue +0 -158
  37. package/views/index/components/quickActions.vue +0 -30
  38. package/views/index/components/systemNotifications.vue +0 -139
  39. package/views/index/components/userInfo.vue +0 -188
package/README.md CHANGED
@@ -14,7 +14,8 @@
14
14
 
15
15
  - 仅使用 `tdesign-icons-vue-next` 的组件形式(如 `<AddIcon />`),禁止 `<Icon name="..." />`。
16
16
  - 统一使用 **outline** 风格:不要使用 `*FilledIcon`。
17
- - 图标必须显式导入(adminUI 视图不依赖自动导入)。
17
+ - `packages/adminUI/**/*.vue` 可直接依赖 befly-vite 的自动注册:TDesign 组件和 `*Icon` 不再手动导入。
18
+ - `MessagePlugin`、`DialogPlugin` 等非组件 API 仍需显式导入。
18
19
  - 已验证存在性(基于 `tdesign-icons-vue-next/esm/icons.d.ts`)的当前使用清单:
19
20
 
20
21
  `AddIcon`, `CallIcon`, `ChartIcon`, `CheckCircleIcon`, `ChevronDownIcon`, `CircleIcon`, `CloseCircleIcon`, `CloudIcon`, `CodeIcon`, `CpuIcon`, `DataBaseIcon`, `DeleteIcon`, `EditIcon`, `ErrorCircleIcon`, `ErrorTriangleIcon`, `HardDiskStorageIcon`, `InfoCircleIcon`, `LightingCircleIcon`, `LinkIcon`, `LockOnIcon`, `MailIcon`, `MenuIcon`, `NotificationIcon`, `RefreshIcon`, `SearchIcon`, `SendIcon`, `ServerIcon`, `SettingIcon`, `SystemStorageIcon`, `TimeIcon`, `TrendingUpIcon`, `UsergroupIcon`, `UserIcon`
@@ -31,7 +31,6 @@
31
31
  </template>
32
32
 
33
33
  <script setup>
34
- import { Tag as TTag } from "tdesign-vue-next";
35
34
  import { computed, reactive } from "vue";
36
35
 
37
36
  import { formatFieldValue } from "../utils/formatFieldValue.js";
@@ -28,7 +28,6 @@
28
28
  </template>
29
29
 
30
30
  <script setup>
31
- import { Button as TButton, Dialog as TDialog } from "tdesign-vue-next";
32
31
  import { onBeforeUnmount, onMounted, reactive, watch } from "vue";
33
32
 
34
33
  defineOptions({
@@ -41,7 +41,7 @@
41
41
  </template>
42
42
 
43
43
  <script setup>
44
- import { DialogPlugin, MessagePlugin, Pagination as TPagination, Table as TTable } from "tdesign-vue-next";
44
+ import { DialogPlugin, MessagePlugin } from "tdesign-vue-next";
45
45
  import { computed, onMounted, reactive, useSlots } from "vue";
46
46
 
47
47
  import { $Http } from "@/plugins/http.js";
@@ -101,8 +101,7 @@
101
101
  import PageDialog from "befly-admin-ui/components/pageDialog.vue";
102
102
  import { arrayToTree } from "befly-admin-ui/utils/arrayToTree";
103
103
  import { hashPassword } from "befly-admin-ui/utils/hashPassword";
104
- import { AppIcon, ChevronDownIcon, CloseCircleIcon, ControlPlatformIcon, HomeIcon, LockOnIcon, UserIcon } from "tdesign-icons-vue-next";
105
- import { DialogPlugin, Dropdown as TDropdown, DropdownItem as TDropdownItem, DropdownMenu as TDropdownMenu, Form as TForm, FormItem as TFormItem, Input as TInput, Menu as TMenu, MenuItem as TMenuItem, MessagePlugin, Submenu as TSubmenu } from "tdesign-vue-next";
104
+ import { DialogPlugin, MessagePlugin } from "tdesign-vue-next";
106
105
  import { reactive, watch } from "vue";
107
106
  import { useRoute, useRouter } from "vue-router";
108
107
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "befly-admin-ui",
3
- "version": "1.10.17",
3
+ "version": "1.10.19",
4
4
  "gitHead": "071d17be177355cdd61f30659c6e4c5873f87d39",
5
5
  "private": false,
6
6
  "description": "Befly - 管理后台功能组件",
@@ -49,7 +49,7 @@
49
49
  "dependencies": {
50
50
  "tdesign-icons-vue-next": "^0.4.4",
51
51
  "tdesign-vue-next": "^1.20.0",
52
- "vue": "^3.5.34",
52
+ "vue": "^3.5.35",
53
53
  "vue-router": "^5.0.7"
54
54
  }
55
55
  }
@@ -0,0 +1,228 @@
1
+ @mixin dashboardCardCol($className) {
2
+ :deep(.#{$className}) {
3
+ min-width: 0;
4
+ }
5
+ }
6
+
7
+ @mixin dashboardCardShell() {
8
+ display: flex;
9
+ flex-direction: column;
10
+ justify-content: center;
11
+ height: 100%;
12
+ min-width: 0;
13
+ min-height: 84px;
14
+ padding: 12px;
15
+ position: relative;
16
+ overflow: hidden;
17
+ border-radius: var(--card-radius);
18
+ border: 1px solid rgba(0, 0, 0, 0.08);
19
+ background: linear-gradient(180deg, rgba(var(--primary-color-rgb), 0.018), rgba(255, 255, 255, 0.96));
20
+ box-shadow: 0 4px 14px rgba(31, 35, 41, 0.04);
21
+ transition:
22
+ transform 0.2s ease,
23
+ box-shadow 0.2s ease,
24
+ background 0.2s ease,
25
+ border-color 0.2s ease;
26
+
27
+ &:hover {
28
+ background: rgba(var(--primary-color-rgb), 0.05);
29
+ border-color: rgba(0, 0, 0, 0.12);
30
+ box-shadow: 0 8px 20px rgba(31, 35, 41, 0.08);
31
+ transform: translateY(-2px);
32
+ }
33
+ }
34
+
35
+ @mixin dashboardCardContent($gap: 4px) {
36
+ display: flex;
37
+ flex-direction: column;
38
+ justify-content: center;
39
+ gap: $gap;
40
+ width: 100%;
41
+ min-width: 0;
42
+ }
43
+
44
+ @mixin dashboardCardTwoLine($gap: 8px) {
45
+ @include dashboardCardContent($gap);
46
+ }
47
+
48
+ @mixin dashboardCardValueRow($gap: 10px) {
49
+ display: flex;
50
+ align-items: flex-end;
51
+ justify-content: space-between;
52
+ gap: $gap;
53
+ width: 100%;
54
+ min-width: 0;
55
+ }
56
+
57
+ @mixin dashboardCardTitle() {
58
+ font-size: 14px;
59
+ font-weight: 600;
60
+ color: var(--text-secondary);
61
+ line-height: 1.2;
62
+ }
63
+
64
+ @mixin dashboardCardLabel() {
65
+ font-size: 12px;
66
+ font-weight: 500;
67
+ color: var(--text-primary);
68
+ line-height: 1.2;
69
+ }
70
+
71
+ @mixin dashboardCardNumericValue($color: var(--primary-color)) {
72
+ font-size: 20px;
73
+ font-weight: 700;
74
+ line-height: 1.1;
75
+ letter-spacing: -0.3px;
76
+ font-variant-numeric: tabular-nums;
77
+ color: $color;
78
+ }
79
+
80
+ @mixin dashboardCardTextValue($fontSize: 14px, $color: var(--text-primary)) {
81
+ font-size: $fontSize;
82
+ font-weight: 600;
83
+ line-height: 1.35;
84
+ color: $color;
85
+ min-width: 0;
86
+ width: 100%;
87
+ word-break: break-word;
88
+ }
89
+
90
+ @mixin dashboardCardMainValue($fontSize: 16px, $color: var(--text-primary), $fontWeight: 700) {
91
+ font-size: $fontSize;
92
+ font-weight: $fontWeight;
93
+ line-height: 1.25;
94
+ color: $color;
95
+ flex: 1;
96
+ min-width: 0;
97
+ overflow: hidden;
98
+ text-overflow: ellipsis;
99
+ white-space: nowrap;
100
+ }
101
+
102
+ @mixin dashboardCardAccentValue($color: var(--primary-color)) {
103
+ @include dashboardCardNumericValue($color);
104
+
105
+ flex: 0 0 auto;
106
+ white-space: nowrap;
107
+ }
108
+
109
+ @mixin dashboardCardMeta($color: var(--text-placeholder)) {
110
+ font-size: 12px;
111
+ color: $color;
112
+ line-height: 1.3;
113
+ min-width: 0;
114
+ word-break: break-word;
115
+ }
116
+
117
+ @mixin dashboardCardStandard($colClass: "dashboard-card-col") {
118
+ @include dashboardCardCol($colClass);
119
+
120
+ .dashboard-card {
121
+ @include dashboardCardShell();
122
+
123
+ align-items: flex-start;
124
+ }
125
+
126
+ .dashboard-card-content {
127
+ @include dashboardCardTwoLine();
128
+
129
+ flex: 1;
130
+ }
131
+
132
+ .dashboard-card-label {
133
+ @include dashboardCardLabel();
134
+ }
135
+
136
+ .dashboard-card-value-row {
137
+ @include dashboardCardValueRow();
138
+ }
139
+
140
+ .dashboard-card-main {
141
+ @include dashboardCardMainValue();
142
+
143
+ text-align: left;
144
+ }
145
+
146
+ .dashboard-card-main--muted {
147
+ @include dashboardCardMainValue(15px, var(--text-primary), 700);
148
+ }
149
+
150
+ .dashboard-card-main--metric {
151
+ @include dashboardCardNumericValue(var(--text-primary));
152
+
153
+ flex: 0 0 auto;
154
+ min-width: 0;
155
+ text-align: left;
156
+ white-space: nowrap;
157
+ }
158
+
159
+ .dashboard-card-accent {
160
+ @include dashboardCardAccentValue();
161
+ }
162
+
163
+ .dashboard-card--success {
164
+ .dashboard-card-main {
165
+ color: var(--success-color);
166
+ }
167
+ }
168
+
169
+ .dashboard-card--warning {
170
+ .dashboard-card-main {
171
+ color: var(--warning-color);
172
+ }
173
+ }
174
+
175
+ .dashboard-card--error {
176
+ .dashboard-card-main {
177
+ color: #d54941;
178
+ }
179
+ }
180
+
181
+ .dashboard-card-label--success {
182
+ color: var(--text-primary);
183
+ }
184
+
185
+ .dashboard-card-label--warning {
186
+ color: var(--text-primary);
187
+ }
188
+
189
+ .dashboard-card-label--error {
190
+ color: var(--text-primary);
191
+ }
192
+
193
+ .dashboard-card-main--black {
194
+ color: var(--text-primary);
195
+ }
196
+
197
+ .dashboard-card-main--blue {
198
+ color: var(--primary-color);
199
+ }
200
+
201
+ .dashboard-card-main--green {
202
+ color: var(--success-color);
203
+ }
204
+
205
+ .dashboard-card-main--yellow {
206
+ color: var(--warning-color);
207
+ }
208
+
209
+ .dashboard-card-main--red {
210
+ color: #d54941;
211
+ }
212
+
213
+ .dashboard-card-main--primary {
214
+ color: var(--primary-color);
215
+ }
216
+
217
+ .dashboard-card-main--success {
218
+ color: var(--success-color);
219
+ }
220
+
221
+ .dashboard-card-main--warning {
222
+ color: var(--warning-color);
223
+ }
224
+
225
+ .dashboard-card-main--critical {
226
+ color: #d54941;
227
+ }
228
+ }
@@ -33,7 +33,7 @@
33
33
 
34
34
  <script setup>
35
35
  import PageDialog from "befly-admin-ui/components/pageDialog.vue";
36
- import { Form as TForm, FormItem as TFormItem, Input as TInput, Select as TSelect, Option as TOption, Textarea as TTextarea, InputNumber as TInputNumber, MessagePlugin } from "tdesign-vue-next";
36
+ import { MessagePlugin } from "tdesign-vue-next";
37
37
  import { computed, reactive } from "vue";
38
38
 
39
39
  import { $Http } from "@/plugins/http.js";
@@ -47,8 +47,7 @@
47
47
  <script setup>
48
48
  import PageTableDetail from "befly-admin-ui/components/pageTableDetail.vue";
49
49
  import { withDefaultColumns } from "befly-admin-ui/utils/withDefaultColumns";
50
- import { AddIcon, ChevronDownIcon, DeleteIcon, EditIcon, SearchIcon } from "tdesign-icons-vue-next";
51
- import { Button as TButton, Dropdown as TDropdown, DropdownItem as TDropdownItem, DropdownMenu as TDropdownMenu, Input as TInput, Option as TOption, Select as TSelect, MessagePlugin } from "tdesign-vue-next";
50
+ import { MessagePlugin } from "tdesign-vue-next";
52
51
  import { onMounted, reactive } from "vue";
53
52
 
54
53
  import { $Http } from "@/plugins/http.js";
@@ -28,7 +28,7 @@
28
28
 
29
29
  <script setup>
30
30
  import PageDialog from "befly-admin-ui/components/pageDialog.vue";
31
- import { Form as TForm, FormItem as TFormItem, Input as TInput, Textarea as TTextarea, InputNumber as TInputNumber, MessagePlugin } from "tdesign-vue-next";
31
+ import { MessagePlugin } from "tdesign-vue-next";
32
32
  import { computed, reactive } from "vue";
33
33
 
34
34
  import { $Http } from "@/plugins/http.js";
@@ -44,8 +44,6 @@
44
44
  <script setup>
45
45
  import PageTableDetail from "befly-admin-ui/components/pageTableDetail.vue";
46
46
  import { withDefaultColumns } from "befly-admin-ui/utils/withDefaultColumns";
47
- import { AddIcon, ChevronDownIcon, DeleteIcon, EditIcon, SearchIcon } from "tdesign-icons-vue-next";
48
- import { Button as TButton, Dropdown as TDropdown, DropdownItem as TDropdownItem, DropdownMenu as TDropdownMenu, Input as TInput } from "tdesign-vue-next";
49
47
  import { reactive } from "vue";
50
48
 
51
49
  import EditDialog from "./components/edit.vue";
@@ -52,7 +52,7 @@
52
52
 
53
53
  <script setup>
54
54
  import PageDialog from "befly-admin-ui/components/pageDialog.vue";
55
- import { Form as TForm, FormItem as TFormItem, Input as TInput, Textarea as TTextarea, InputNumber as TInputNumber, Select as TSelect, Option as TOption, RadioGroup as TRadioGroup, Radio as TRadio, MessagePlugin } from "tdesign-vue-next";
55
+ import { MessagePlugin } from "tdesign-vue-next";
56
56
  import { computed, reactive } from "vue";
57
57
 
58
58
  import { $Http } from "@/plugins/http.js";
@@ -70,8 +70,6 @@
70
70
  import DetailPanel from "befly-admin-ui/components/detailPanel.vue";
71
71
  import PageTableDetail from "befly-admin-ui/components/pageTableDetail.vue";
72
72
  import { withDefaultColumns } from "befly-admin-ui/utils/withDefaultColumns";
73
- import { AddIcon, ChevronDownIcon, DeleteIcon, EditIcon } from "tdesign-icons-vue-next";
74
- import { Button as TButton, Dropdown as TDropdown, DropdownItem as TDropdownItem, DropdownMenu as TDropdownMenu, Option as TOption, Select as TSelect, Tag as TTag } from "tdesign-vue-next";
75
73
  import { reactive } from "vue";
76
74
 
77
75
  import EditDialog from "./components/edit.vue";
@@ -5,38 +5,73 @@
5
5
  <h2>运行环境</h2>
6
6
  </div>
7
7
  <div class="section-content">
8
- <div class="env-grid-compact">
9
- <div class="env-compact-item">
10
- <span class="env-label">操作系统</span>
11
- <span class="env-value">{{ $Data.environmentInfo.os }}</span>
12
- </div>
13
- <div class="env-compact-item">
14
- <span class="env-label">服务器</span>
15
- <span class="env-value">{{ $Data.environmentInfo.server }}</span>
16
- </div>
17
- <div class="env-compact-item">
18
- <span class="env-label">Node版本</span>
19
- <span class="env-value">{{ $Data.environmentInfo.nodeVersion }}</span>
20
- </div>
21
- <div class="env-compact-item">
22
- <span class="env-label">数据库</span>
23
- <span class="env-value">{{ $Data.environmentInfo.database }}</span>
24
- </div>
25
- <div class="env-compact-item">
26
- <span class="env-label">缓存</span>
27
- <span class="env-value">{{ $Data.environmentInfo.cache }}</span>
28
- </div>
29
- <div class="env-compact-item">
30
- <span class="env-label">时区</span>
31
- <span class="env-value">{{ $Data.environmentInfo.timezone }}</span>
32
- </div>
33
- </div>
8
+ <t-row :gutter="[16, 16]" class="dashboard-card-row">
9
+ <t-col :span="2" class="dashboard-card-col">
10
+ <div class="dashboard-card">
11
+ <div class="dashboard-card-content">
12
+ <span class="dashboard-card-label">操作系统</span>
13
+ <div class="dashboard-card-value-row">
14
+ <span class="dashboard-card-main">{{ $Data.environmentInfo.os }}</span>
15
+ </div>
16
+ </div>
17
+ </div>
18
+ </t-col>
19
+ <t-col :span="2" class="dashboard-card-col">
20
+ <div class="dashboard-card">
21
+ <div class="dashboard-card-content">
22
+ <span class="dashboard-card-label">服务器</span>
23
+ <div class="dashboard-card-value-row">
24
+ <span class="dashboard-card-main">{{ $Data.environmentInfo.server }}</span>
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </t-col>
29
+ <t-col :span="2" class="dashboard-card-col">
30
+ <div class="dashboard-card">
31
+ <div class="dashboard-card-content">
32
+ <span class="dashboard-card-label">运行时</span>
33
+ <div class="dashboard-card-value-row">
34
+ <span class="dashboard-card-main">{{ $Data.environmentInfo.runtimeVersion || $Data.environmentInfo.nodeVersion }}</span>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ </t-col>
39
+ <t-col :span="2" class="dashboard-card-col">
40
+ <div class="dashboard-card">
41
+ <div class="dashboard-card-content">
42
+ <span class="dashboard-card-label">数据库</span>
43
+ <div class="dashboard-card-value-row">
44
+ <span class="dashboard-card-main">{{ $Data.environmentInfo.database }}</span>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ </t-col>
49
+ <t-col :span="2" class="dashboard-card-col">
50
+ <div class="dashboard-card">
51
+ <div class="dashboard-card-content">
52
+ <span class="dashboard-card-label">缓存</span>
53
+ <div class="dashboard-card-value-row">
54
+ <span class="dashboard-card-main">{{ $Data.environmentInfo.cache }}</span>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ </t-col>
59
+ <t-col :span="2" class="dashboard-card-col">
60
+ <div class="dashboard-card">
61
+ <div class="dashboard-card-content">
62
+ <span class="dashboard-card-label">时区</span>
63
+ <div class="dashboard-card-value-row">
64
+ <span class="dashboard-card-main">{{ $Data.environmentInfo.timezone }}</span>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ </t-col>
69
+ </t-row>
34
70
  </div>
35
71
  </div>
36
72
  </template>
37
73
 
38
74
  <script setup>
39
- import { ServerIcon } from "tdesign-icons-vue-next";
40
75
  import { reactive } from "vue";
41
76
 
42
77
  import { $Http } from "@/plugins/http.js";
@@ -46,6 +81,7 @@ const $Data = reactive({
46
81
  environmentInfo: {
47
82
  os: "",
48
83
  server: "",
84
+ runtimeVersion: "",
49
85
  nodeVersion: "",
50
86
  database: "",
51
87
  cache: "",
@@ -68,60 +104,9 @@ $Method.fetchData();
68
104
  </script>
69
105
 
70
106
  <style scoped lang="scss">
71
- .env-grid-compact {
72
- display: grid;
73
- grid-template-columns: repeat(3, minmax(0, 1fr));
74
- gap: 10px;
107
+ @use "../../../styles/dashboardCard.scss" as dashboardCard;
75
108
 
76
- .env-compact-item {
77
- display: flex;
78
- flex-direction: column;
79
- justify-content: center;
80
- align-items: flex-start;
81
- min-width: 0;
82
- min-height: 92px;
83
- gap: 4px;
84
- padding: 14px;
85
- background: linear-gradient(180deg, rgba(var(--primary-color-rgb), 0.018), rgba(255, 255, 255, 0.96));
86
- border-radius: 8px;
87
- border: 1px solid rgba(0, 0, 0, 0.06);
88
- transition: all 0.2s ease;
89
-
90
- &:hover {
91
- background: rgba(var(--primary-color-rgb), 0.05);
92
- border-color: var(--primary-color);
93
- box-shadow: 0 8px 18px rgba(31, 35, 41, 0.08);
94
- }
95
-
96
- .env-label {
97
- font-size: 12px;
98
- color: var(--text-secondary);
99
- font-weight: 500;
100
- line-height: 1.2;
101
- }
102
-
103
- .env-value {
104
- font-size: 14px;
105
- color: var(--text-primary);
106
- font-weight: 600;
107
- line-height: 1.35;
108
- text-align: left;
109
- min-width: 0;
110
- width: 100%;
111
- word-break: break-word;
112
- }
113
- }
114
- }
115
-
116
- @media (max-width: 1200px) {
117
- .env-grid-compact {
118
- grid-template-columns: repeat(2, minmax(0, 1fr));
119
- }
120
- }
121
-
122
- @media (max-width: 640px) {
123
- .env-grid-compact {
124
- grid-template-columns: 1fr;
125
- }
109
+ .dashboard-card-row {
110
+ @include dashboardCard.dashboardCardStandard();
126
111
  }
127
112
  </style>