@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.
- package/apis/admin/ins.ts +11 -15
- package/apis/admin/upd.ts +1 -13
- package/apis/auth/login.ts +49 -5
- package/apis/email/config.ts +16 -0
- package/apis/email/logList.ts +13 -0
- package/apis/email/send.ts +42 -0
- package/apis/email/verify.ts +12 -0
- package/apis/loginLog/list.ts +13 -0
- package/apis/operateLog/list.ts +13 -0
- package/apis/sysConfig/all.ts +12 -0
- package/apis/sysConfig/del.ts +30 -0
- package/apis/sysConfig/get.ts +31 -0
- package/apis/sysConfig/ins.ts +38 -0
- package/apis/sysConfig/list.ts +14 -0
- package/apis/sysConfig/upd.ts +50 -0
- package/package.json +14 -3
- package/plugins/email.ts +206 -0
- package/styles/variables.scss +121 -60
- package/tables/admin.json +12 -15
- package/tables/emailLog.json +69 -0
- package/tables/loginLog.json +96 -0
- package/tables/operateLog.json +82 -0
- package/tables/role.json +1 -1
- package/tables/sysConfig.json +53 -0
- package/views/403_1/meta.json +4 -0
- package/views/{dict → config/dict}/index.vue +27 -38
- package/views/config/dict/meta.json +4 -0
- package/views/config/meta.json +4 -0
- package/views/config/system/components/edit.vue +179 -0
- package/views/config/system/index.vue +256 -0
- package/views/config/system/meta.json +4 -0
- package/views/index/index.vue +46 -9
- package/views/index/meta.json +4 -0
- package/views/log/email/index.vue +285 -0
- package/views/log/email/meta.json +4 -0
- package/views/log/login/index.vue +180 -0
- package/views/log/login/meta.json +4 -0
- package/views/log/meta.json +4 -0
- package/views/log/operate/index.vue +242 -0
- package/views/log/operate/meta.json +4 -0
- package/views/login_1/meta.json +4 -0
- package/views/{admin → people/admin}/components/edit.vue +22 -24
- package/views/{admin → people/admin}/index.vue +21 -61
- package/views/people/admin/meta.json +4 -0
- package/views/people/meta.json +4 -0
- package/views/{api → permission/api}/index.vue +17 -55
- package/views/permission/api/meta.json +4 -0
- package/views/{menu → permission/menu}/index.vue +17 -56
- package/views/permission/menu/meta.json +4 -0
- package/views/permission/meta.json +4 -0
- package/views/{role → permission/role}/components/api.vue +13 -38
- package/views/{role → permission/role}/components/edit.vue +9 -8
- package/views/{role → permission/role}/components/menu.vue +2 -25
- package/views/{role → permission/role}/index.vue +27 -36
- package/views/permission/role/meta.json +4 -0
- /package/views/{403 → 403_1}/index.vue +0 -0
- /package/views/{dict → config/dict}/components/edit.vue +0 -0
- /package/views/{login → login_1}/components/emailLoginForm.vue +0 -0
- /package/views/{login → login_1}/components/registerForm.vue +0 -0
- /package/views/{login → login_1}/components/welcomePanel.vue +0 -0
- /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
|
|
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"
|
|
29
|
-
<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
|
|
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: '
|
|
106
|
-
{ colKey: 'name', title: '角色名称'
|
|
107
|
-
{ colKey: 'code', title: '角色代码'
|
|
108
|
-
{ colKey: 'description', title: '描述'
|
|
109
|
-
{ colKey: 'sort', title: '排序'
|
|
110
|
-
{ colKey: 'state', title: '状态'
|
|
111
|
-
{ colKey: 'operation', title: '操作'
|
|
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,
|
|
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 (
|
|
204
|
-
$Data.currentRow =
|
|
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
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|