mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-14 05:03:49 +08:00
版本预发布
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { h } from 'vue';
|
||||
import { NAvatar, NTag } from 'naive-ui';
|
||||
import { formatBefore } from '@/utils/dateUtil';
|
||||
|
||||
export const columns = [
|
||||
{
|
||||
@@ -104,9 +105,15 @@ export const columns = [
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '访问次数',
|
||||
key: 'visitCount',
|
||||
title: '最近活跃',
|
||||
key: 'lastActiveAt',
|
||||
width: 100,
|
||||
render(row) {
|
||||
if (row.lastActiveAt === null) {
|
||||
return '从未登录';
|
||||
}
|
||||
return formatBefore(new Date(row.lastActiveAt));
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
|
||||
@@ -81,10 +81,11 @@
|
||||
<n-grid x-gap="24" :cols="2">
|
||||
<n-gi>
|
||||
<n-form-item label="绑定角色" path="roleId">
|
||||
<n-select
|
||||
<n-tree-select
|
||||
:default-value="formParams.roleId"
|
||||
:options="roleList"
|
||||
@update:value="handleUpdateRoleValue"
|
||||
:default-expand-all="true"
|
||||
/>
|
||||
</n-form-item>
|
||||
</n-gi>
|
||||
@@ -385,16 +386,9 @@
|
||||
roleList.value = [];
|
||||
let roleLists = await getRoleList({ pageSize: 100 });
|
||||
if (roleLists.list === undefined || roleLists.list === null) {
|
||||
roleLists = [];
|
||||
roleList.value = [];
|
||||
} else {
|
||||
roleLists = roleLists.list;
|
||||
}
|
||||
if (roleLists.length > 0) {
|
||||
for (let i = 0; i < roleLists.length; i++) {
|
||||
roleList.value[i] = {};
|
||||
roleList.value[i].label = roleLists[i].name;
|
||||
roleList.value[i].value = roleLists[i].id;
|
||||
}
|
||||
roleList.value = roleLists.list;
|
||||
}
|
||||
|
||||
postList.value = [];
|
||||
|
||||
Reference in New Issue
Block a user