@befly-addon/admin 1.0.55 → 1.0.57

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 (61) hide show
  1. package/apis/admin/ins.ts +11 -15
  2. package/apis/admin/upd.ts +1 -13
  3. package/apis/auth/login.ts +49 -5
  4. package/apis/email/config.ts +16 -0
  5. package/apis/email/logList.ts +13 -0
  6. package/apis/email/send.ts +42 -0
  7. package/apis/email/verify.ts +12 -0
  8. package/apis/loginLog/list.ts +13 -0
  9. package/apis/operateLog/list.ts +13 -0
  10. package/apis/sysConfig/all.ts +12 -0
  11. package/apis/sysConfig/del.ts +30 -0
  12. package/apis/sysConfig/get.ts +31 -0
  13. package/apis/sysConfig/ins.ts +38 -0
  14. package/apis/sysConfig/list.ts +14 -0
  15. package/apis/sysConfig/upd.ts +50 -0
  16. package/package.json +14 -3
  17. package/plugins/email.ts +206 -0
  18. package/styles/variables.scss +121 -60
  19. package/tables/admin.json +12 -15
  20. package/tables/emailLog.json +69 -0
  21. package/tables/loginLog.json +96 -0
  22. package/tables/operateLog.json +82 -0
  23. package/tables/role.json +1 -1
  24. package/tables/sysConfig.json +53 -0
  25. package/views/403_1/meta.json +4 -0
  26. package/views/{dict → config/dict}/index.vue +27 -38
  27. package/views/config/dict/meta.json +4 -0
  28. package/views/config/meta.json +4 -0
  29. package/views/config/system/components/edit.vue +179 -0
  30. package/views/config/system/index.vue +256 -0
  31. package/views/config/system/meta.json +4 -0
  32. package/views/index/index.vue +46 -9
  33. package/views/index/meta.json +4 -0
  34. package/views/log/email/index.vue +285 -0
  35. package/views/log/email/meta.json +4 -0
  36. package/views/log/login/index.vue +180 -0
  37. package/views/log/login/meta.json +4 -0
  38. package/views/log/meta.json +4 -0
  39. package/views/log/operate/index.vue +242 -0
  40. package/views/log/operate/meta.json +4 -0
  41. package/views/login_1/meta.json +4 -0
  42. package/views/{admin → people/admin}/components/edit.vue +22 -24
  43. package/views/{admin → people/admin}/index.vue +21 -61
  44. package/views/people/admin/meta.json +4 -0
  45. package/views/people/meta.json +4 -0
  46. package/views/{api → permission/api}/index.vue +17 -55
  47. package/views/permission/api/meta.json +4 -0
  48. package/views/{menu → permission/menu}/index.vue +17 -56
  49. package/views/permission/menu/meta.json +4 -0
  50. package/views/permission/meta.json +4 -0
  51. package/views/{role → permission/role}/components/api.vue +13 -38
  52. package/views/{role → permission/role}/components/edit.vue +9 -8
  53. package/views/{role → permission/role}/components/menu.vue +2 -25
  54. package/views/{role → permission/role}/index.vue +27 -36
  55. package/views/permission/role/meta.json +4 -0
  56. /package/views/{403 → 403_1}/index.vue +0 -0
  57. /package/views/{dict → config/dict}/components/edit.vue +0 -0
  58. /package/views/{login → login_1}/components/emailLoginForm.vue +0 -0
  59. /package/views/{login → login_1}/components/registerForm.vue +0 -0
  60. /package/views/{login → login_1}/components/welcomePanel.vue +0 -0
  61. /package/views/{login/index_1.vue → login_1/index.vue} +0 -0
@@ -9,7 +9,7 @@
9
9
  </TButton>
10
10
  </div>
11
11
  <div class="right">
12
- <TButton @click="$Method.handleRefresh">
12
+ <TButton shape="circle" @click="$Method.handleRefresh">
13
13
  <template #icon>
14
14
  <ILucideRotateCw />
15
15
  </template>
@@ -18,15 +18,18 @@
18
18
  </div>
19
19
  <div class="main-content">
20
20
  <div class="main-table">
21
- <TTable v-bind="withTableProps()" :data="$Data.tableData" :columns="$Data.columns" :loading="$Data.loading" :active-row-keys="$Data.activeRowKeys" @active-change="$Method.onActiveChange">
21
+ <TTable :data="$Data.tableData" :columns="$Data.columns" :loading="$Data.loading" :active-row-keys="$Data.activeRowKeys" row-key="id" height="calc(100vh - 94px)" active-row-type="single" @active-change="$Method.onActiveChange">
22
22
  <template #state="{ row }">
23
- <TTag v-if="row.state === 1" theme="success">正常</TTag>
24
- <TTag v-else-if="row.state === 2" theme="warning">禁用</TTag>
25
- <TTag v-else theme="danger">已删除</TTag>
23
+ <TTag v-if="row.state === 1" shape="round" theme="success" variant="light-outline">正常</TTag>
24
+ <TTag v-else-if="row.state === 2" shape="round" theme="warning" variant="light-outline">禁用</TTag>
25
+ <TTag v-else shape="round" theme="danger" variant="light-outline">已删除</TTag>
26
26
  </template>
27
27
  <template #operation="{ row }">
28
- <TDropdown trigger="click" min-column-width="120" @click="(data) => $Method.onAction(data.value, row)">
29
- <TButton variant="text" size="small">操作</TButton>
28
+ <TDropdown trigger="click" placement="bottom-right" @click="(data) => $Method.onAction(data.value, row)">
29
+ <TButton theme="primary" size="small">
30
+ 操作
31
+ <template #suffix> <t-icon name="chevron-down" size="16" /></template>
32
+ </TButton>
30
33
  <TDropdownMenu slot="dropdown">
31
34
  <TDropdownItem value="upd">
32
35
  <ILucidePencil />
@@ -51,17 +54,7 @@
51
54
  </div>
52
55
 
53
56
  <div class="main-detail">
54
- <DetailPanel
55
- :data="$Data.currentRow"
56
- :fields="[
57
- { key: 'id', label: 'ID' },
58
- { key: 'name', label: '角色名称' },
59
- { key: 'code', label: '角色代码' },
60
- { key: 'description', label: '描述' },
61
- { key: 'sort', label: '排序' },
62
- { key: 'state', label: '状态' }
63
- ]"
64
- />
57
+ <DetailPanel :data="$Data.currentRow" :fields="$Data.columns" />
65
58
  </div>
66
59
  </div>
67
60
 
@@ -93,7 +86,7 @@ import MenuDialog from './components/menu.vue';
93
86
  import ApiDialog from './components/api.vue';
94
87
  import DetailPanel from '@/components/DetailPanel.vue';
95
88
  import { $Http } from '@/plugins/http';
96
- import { withDefaultColumns, withTableProps } from '@/utils';
89
+ import { withDefaultColumns } from '@/utils';
97
90
 
98
91
  // 响应式数据
99
92
  const $Data = $ref({
@@ -102,13 +95,13 @@ const $Data = $ref({
102
95
  activeRowKeys: [],
103
96
  currentRow: null,
104
97
  columns: withDefaultColumns([
105
- { colKey: 'index', title: '序号', width: 100, align: 'center' },
106
- { colKey: 'name', title: '角色名称', width: 150 },
107
- { colKey: 'code', title: '角色代码', width: 150 },
108
- { colKey: 'description', title: '描述', minWidth: 150 },
109
- { colKey: 'sort', title: '排序', width: 80, align: 'center' },
110
- { colKey: 'state', title: '状态', width: 100, align: 'center', ellipsis: false },
111
- { colKey: 'operation', title: '操作', width: 120, align: 'center', fixed: 'right', ellipsis: false }
98
+ { colKey: 'id', title: 'ID' },
99
+ { colKey: 'name', title: '角色名称' },
100
+ { colKey: 'code', title: '角色代码' },
101
+ { colKey: 'description', title: '描述' },
102
+ { colKey: 'sort', title: '排序' },
103
+ { colKey: 'state', title: '状态' },
104
+ { colKey: 'operation', title: '操作' }
112
105
  ]),
113
106
  pagerConfig: {
114
107
  currentPage: 1,
@@ -196,18 +189,16 @@ const $Method = {
196
189
  $Method.apiRoleList();
197
190
  },
198
191
 
199
- // 高亮行变化(点击行选中)
200
- onActiveChange(value, { activeRowData }) {
192
+ // 高亮行变化
193
+ onActiveChange(value, context) {
194
+ // 禁止取消高亮:如果新值为空,保持当前选中
195
+ if (value.length === 0 && $Data.activeRowKeys.length > 0) {
196
+ return;
197
+ }
201
198
  $Data.activeRowKeys = value;
202
199
  // 更新当前高亮的行数据
203
- if (activeRowData && activeRowData.length > 0) {
204
- $Data.currentRow = activeRowData[0];
205
- } else if ($Data.tableData.length > 0) {
206
- // 如果取消高亮,默认显示第一行
207
- $Data.currentRow = $Data.tableData[0];
208
- $Data.activeRowKeys = [$Data.tableData[0].id];
209
- } else {
210
- $Data.currentRow = null;
200
+ if (context.activeRowList && context.activeRowList.length > 0) {
201
+ $Data.currentRow = context.activeRowList[0].row;
211
202
  }
212
203
  },
213
204
 
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "角色管理",
3
+ "order": 1
4
+ }
File without changes
File without changes
File without changes