✨ 查询用户角色.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<a-card class="general-card"
|
||||
title="帮助文档"
|
||||
:header-style="{ paddingBottom: '0' }"
|
||||
:body-style="{ padding: '8px 20px 8px 20px' }">
|
||||
:header-style="{ paddingBottom: '4px' }"
|
||||
:body-style="{ padding: '0px 20px 8px 20px' }">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-link target="_blank" href="https://github.com/lijiahangmax/orion-ops-pro">github</a-link>
|
||||
@@ -14,7 +14,13 @@
|
||||
<a-link target="_blank" href="https://github.com/lijiahangmax/orion-ops-pro/blob/main/LICENSE">License</a-link>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-link target="_blank" href="https://lijiahangmax.gitee.io/orion-ops-pro">操作文档</a-link>
|
||||
<a-link target="_blank" href="https://github.com/lijiahangmax/orion-ops-pro/issues">上报 bug</a-link>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-link target="_blank" href="https://lijiahangmax.github.io/orion-ops-pro">操作文档</a-link>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-link target="_blank" href="https://lijiahangmax.github.io/orion-ops-pro/#/about/change-log">更新文档</a-link>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-card>
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<a-card class="general-card"
|
||||
title="快捷操作"
|
||||
:header-style="{ paddingBottom: '0' }"
|
||||
:body-style="{ padding: '20px 20px 0 20px' }">
|
||||
:body-style="{ padding: '0 20px' }">
|
||||
<a-row :gutter="8">
|
||||
<a-col v-for="link in links"
|
||||
:key="link.meta.locale as string"
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
<!-- 操作日志 -->
|
||||
<a-card class="general-card"
|
||||
title="操作日志"
|
||||
:header-style="{ paddingBottom: '0' }"
|
||||
:body-style="{ padding: '8px 20px 8px 20px' }">
|
||||
:body-style="{ padding: '0 20px 8px 20px' }">
|
||||
<operator-log-simple-table :current="true"
|
||||
:handle-column="false" />
|
||||
</a-card>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<a-spin :loading="loading" style="width: 400px;">
|
||||
<a-spin :loading="loading" style="width: 520px;">
|
||||
<!-- 头像 -->
|
||||
<div class="avatar-container">
|
||||
<div class="avatar-wrapper">
|
||||
@@ -33,6 +33,10 @@
|
||||
<a-form-item field="email" label="邮箱">
|
||||
<a-input v-model="formModel.email" placeholder="请输入邮箱" />
|
||||
</a-form-item>
|
||||
<!-- 角色 -->
|
||||
<a-form-item field="roles" label="角色" disabled>
|
||||
<a-input-tag v-model="roles" placeholder="角色" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<!-- 操作 -->
|
||||
<div class="handler-container">
|
||||
@@ -68,6 +72,7 @@
|
||||
const nickname = ref('');
|
||||
const formRef = ref();
|
||||
const formModel = ref<UserUpdateRequest>({});
|
||||
const roles = ref<Array<string>>([]);
|
||||
|
||||
// 修改用户信息
|
||||
const save = async () => {
|
||||
@@ -103,6 +108,7 @@
|
||||
u = data;
|
||||
}
|
||||
formModel.value = pick(u, 'id', 'username', 'nickname', 'mobile', 'email');
|
||||
roles.value = (u.roles || []).map(s => `${s.name}(${s.code})`);
|
||||
nickname.value = u.nickname?.substring(0, 1);
|
||||
} catch (e) {
|
||||
} finally {
|
||||
|
||||
@@ -13,6 +13,8 @@ const columns = [
|
||||
title: '角色名称',
|
||||
dataIndex: 'name',
|
||||
slotName: 'name',
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
}, {
|
||||
title: '角色编码',
|
||||
dataIndex: 'code',
|
||||
|
||||
@@ -127,7 +127,6 @@
|
||||
<!-- 分配角色 -->
|
||||
<a-button type="text"
|
||||
size="mini"
|
||||
:disabled="record.id === userStore.id"
|
||||
v-permission="['infra:system-user:grant-role']"
|
||||
@click="emits('openGrantRole', record)">
|
||||
分配角色
|
||||
|
||||
Reference in New Issue
Block a user