Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
55aec6a720 | |||
dd1127e2b8 | |||
678aa92457 | |||
65e564dc67 | |||
e519d746c9 | |||
735982373a | |||
9fa765ce50 |
23
.github/workflows/release-tag.yml
vendored
Normal file
23
.github/workflows/release-tag.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*' # Push events to matching v*, i.e. v1.0.0
|
||||
|
||||
jobs:
|
||||
release:
|
||||
if: github.repository == 'Charles7c/continew-admin-ui'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- name: Create Release for Tag
|
||||
id: release_tag
|
||||
uses: yyx990803/release-tag@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
body: |
|
||||
详情请参阅 [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/dev/CHANGELOG.md) 。
|
15
CHANGELOG.md
15
CHANGELOG.md
@@ -1,3 +1,18 @@
|
||||
## v2.4.0 (2024-02-16)
|
||||
|
||||
### ✨ 新特性
|
||||
|
||||
* 系统日志详情新增 traceId 链路号显示 ([7359823](https://github.com/Charles7c/continew-admin-ui/commit/735982373a13889340970623bce544dafc574cdb))
|
||||
|
||||
### 💎 功能优化
|
||||
|
||||
- 取消用户默认密码,改为表单填写密码 ([e519d74](https://github.com/Charles7c/continew-admin-ui/commit/e519d746c92596d0b4a568aef26218b8c4c1e4f4)) ([dd1127e](https://github.com/Charles7c/continew-admin-ui/commit/dd1127e2b8ddfad70e67fca5502505fb269236cc))
|
||||
- 部分 ID 列 => 序号列 ([678aa92](https://github.com/Charles7c/continew-admin-ui/commit/678aa92457dc172a300e78e9523ab0fe50715947))
|
||||
|
||||
### 🐛 问题修复
|
||||
|
||||
- 修复暗黑模式下返回到登录页面时的部分样式错乱 ([65e564d](https://github.com/Charles7c/continew-admin-ui/commit/65e564dc67c06a18bc543d032d430718ae620cb9))
|
||||
|
||||
## v2.3.0 (2024-01-21)
|
||||
|
||||
### ✨ 新特性
|
||||
|
28
README.md
28
README.md
@@ -4,7 +4,19 @@
|
||||
<img src="https://img.shields.io/badge/License-Apache--2.0-blue.svg" alt="License" />
|
||||
</a>
|
||||
<a href="https://github.com/Charles7c/continew-admin-ui" target="_blank">
|
||||
<img src="https://img.shields.io/badge/RELEASE-v2.3.0-%23ff3f59.svg" alt="Release" />
|
||||
<img src="https://img.shields.io/badge/RELEASE-v2.4.0-%23ff3f59.svg" alt="Release" />
|
||||
</a>
|
||||
<a href="https://cn.vuejs.org/" target="_blank">
|
||||
<img src="https://img.shields.io/badge/Vue-3.3.7-%236CB52D.svg?logo=Vue.js" alt="Release" />
|
||||
</a>
|
||||
<a href="https://arco.design/vue/docs/start" target="_blank">
|
||||
<img src="https://img.shields.io/badge/Arco Design-2.53.3-%236CB52D.svg" alt="Release" />
|
||||
</a>
|
||||
<a href="https://ts.nodejs.cn/" target="_blank">
|
||||
<img src="https://img.shields.io/badge/TypeScript-5.3.3-%236CB52D.svg?logo=TypeScript&logoColor=FFF" alt="Release" />
|
||||
</a>
|
||||
<a href="https://cn.vitejs.dev/" target="_blank">
|
||||
<img src="https://img.shields.io/badge/Vite-4.5.1-%236CB52D.svg?logo=Vite&logoColor=FFF" alt="Release" />
|
||||
</a>
|
||||
<a href="https://github.com/Charles7c/continew-admin" target="_blank">
|
||||
<img src="https://img.shields.io/github/stars/Charles7c/continew-admin?style=social" alt="GitHub stars" />
|
||||
@@ -18,18 +30,6 @@
|
||||
<a href="https://gitee.com/Charles7c/continew-admin" target="_blank">
|
||||
<img src="https://gitee.com/Charles7c/continew-admin/badge/fork.svg?theme=white" alt="Gitee forks" />
|
||||
</a>
|
||||
<a href="https://github.com/Charles7c/continew-admin-ui" target="_blank">
|
||||
<img src="https://img.shields.io/badge/Vue-3.3.7-%236CB52D.svg" alt="Release" />
|
||||
</a>
|
||||
<a href="https://github.com/Charles7c/continew-admin-ui" target="_blank">
|
||||
<img src="https://img.shields.io/badge/Arco Design Vue-2.53.3-%236CB52D.svg" alt="Release" />
|
||||
</a>
|
||||
<a href="https://github.com/Charles7c/continew-admin-ui" target="_blank">
|
||||
<img src="https://img.shields.io/badge/TypeScript-5.3.3-%236CB52D.svg" alt="Release" />
|
||||
</a>
|
||||
<a href="https://github.com/Charles7c/continew-admin-ui" target="_blank">
|
||||
<img src="https://img.shields.io/badge/Vite-4.5.1-%236CB52D.svg" alt="Release" />
|
||||
</a>
|
||||
|
||||
📚 [在线文档](https://doc.charles7c.top) | 🚀 [演示地址](https://cnadmin.charles7c.top)(账号/密码:admin/admin123)
|
||||
|
||||
@@ -323,7 +323,7 @@ ContiNew Admin 的分支目前分为下个大版本的开发分支和上个大
|
||||
|
||||
### 特别鸣谢
|
||||
|
||||
- 感谢 <a href="https://www.jetbrains.com/" target="_blank">JetBrains</a> 提供的 <a href="https://www.jetbrains.com/shop/eform/opensource" target="_blank">非商业开源软件开发授权</a>
|
||||
- 感谢 <a href="https://www.jetbrains.com/" target="_blank">JetBrains</a> 提供的 <a href="https://jb.gg/OpenSourceSupport" target="_blank">非商业开源软件开发授权</a>
|
||||
- 感谢 <a href="http://pro.arco.design/" target="_blank">Arco Design Pro</a> 开箱即用的中后台前端解决方案
|
||||
- 感谢 [Gi Admin Pro](https://gitee.com/lin0716/gi-demo),致敬各位作者为开源前端模板领域作出的贡献
|
||||
- e.g. 扩展于 Gi Admin Pro 项目开源的文件管理组件
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "continew-admin-ui",
|
||||
"description": "ContiNew Admin(Continue New Admin)持续迭代优化的前后端分离中后台管理系统框架,开箱即用,持续提供舒适的开发体验。",
|
||||
"version": "2.3.0",
|
||||
"version": "2.4.0",
|
||||
"private": true,
|
||||
"author": "Charles7c",
|
||||
"license": "Apache-2.0",
|
||||
|
@@ -35,6 +35,7 @@ export interface SystemLogRecord extends LogRecord {
|
||||
}
|
||||
|
||||
export interface SystemLogDetailRecord extends SystemLogRecord {
|
||||
traceId: string;
|
||||
requestHeaders: string;
|
||||
requestBody: string;
|
||||
responseHeaders: string;
|
||||
|
@@ -7,6 +7,7 @@ export interface DataRecord {
|
||||
id?: number;
|
||||
username?: string;
|
||||
nickname?: string;
|
||||
password?: string;
|
||||
gender?: number;
|
||||
email?: string;
|
||||
phone?: string;
|
||||
@@ -25,6 +26,10 @@ export interface DataRecord {
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
export interface UserResetReq {
|
||||
newPassword: string;
|
||||
}
|
||||
|
||||
export interface ListParam {
|
||||
username?: string;
|
||||
status?: number;
|
||||
@@ -64,8 +69,8 @@ export function del(ids: number | Array<number>) {
|
||||
return axios.delete(`${BASE_URL}/${ids}`);
|
||||
}
|
||||
|
||||
export function resetPassword(id: number) {
|
||||
return axios.patch(`${BASE_URL}/${id}/password`);
|
||||
export function resetPassword(req: UserResetReq, id: number) {
|
||||
return axios.patch(`${BASE_URL}/${id}/password`, req);
|
||||
}
|
||||
|
||||
export interface UpdateUserRoleReq {
|
||||
|
@@ -169,15 +169,18 @@
|
||||
margin-top: 16px;
|
||||
.arco-input-wrapper,
|
||||
:deep(.arco-select-view-single) {
|
||||
background-color: var(--color-bg-white);
|
||||
border: 1px solid var(--color-border-3);
|
||||
background-color: #fff;
|
||||
border: 1px solid #c9cdd4;
|
||||
height: 40px;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
}
|
||||
.arco-input-wrapper.arco-input-error {
|
||||
background-color: var(--color-danger-light-1);
|
||||
border-color: var(--color-danger-light-4);
|
||||
background-color: rgb(255, 236, 232);
|
||||
border-color: rgb(249, 137, 129);
|
||||
}
|
||||
.arco-input-wrapper :deep(.arco-input) {
|
||||
color: rgb(29, 33, 41);
|
||||
}
|
||||
|
||||
.captcha {
|
||||
|
@@ -165,15 +165,18 @@
|
||||
margin-top: 16px;
|
||||
.arco-input-wrapper,
|
||||
:deep(.arco-select-view-single) {
|
||||
background-color: var(--color-bg-white);
|
||||
border: 1px solid var(--color-border-3);
|
||||
background-color: #fff;
|
||||
border: 1px solid #c9cdd4;
|
||||
height: 40px;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
}
|
||||
.arco-input-wrapper.arco-input-error {
|
||||
background-color: var(--color-danger-light-1);
|
||||
border-color: var(--color-danger-light-4);
|
||||
background-color: rgb(255, 236, 232);
|
||||
border-color: rgb(249, 137, 129);
|
||||
}
|
||||
.arco-input-wrapper :deep(.arco-input) {
|
||||
color: rgb(29, 33, 41);
|
||||
}
|
||||
|
||||
.captcha-btn {
|
||||
@@ -190,7 +193,7 @@
|
||||
}
|
||||
.arco-btn-secondary:not(.arco-btn-disabled):hover {
|
||||
background-color: transparent;
|
||||
border: 1px solid rgb(var(--primary-6));
|
||||
border: 1px solid rgb(22, 93, 255);
|
||||
}
|
||||
|
||||
.btn {
|
||||
|
@@ -197,15 +197,18 @@
|
||||
margin-top: 16px;
|
||||
.arco-input-wrapper,
|
||||
:deep(.arco-select-view-single) {
|
||||
background-color: var(--color-bg-white);
|
||||
border: 1px solid var(--color-border-3);
|
||||
background-color: #fff;
|
||||
border: 1px solid #c9cdd4;
|
||||
height: 40px;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
}
|
||||
.arco-input-wrapper.arco-input-error {
|
||||
background-color: var(--color-danger-light-1);
|
||||
border-color: var(--color-danger-light-4);
|
||||
background-color: rgb(255, 236, 232);
|
||||
border-color: rgb(249, 137, 129);
|
||||
}
|
||||
.arco-input-wrapper :deep(.arco-input) {
|
||||
color: rgb(29, 33, 41);
|
||||
}
|
||||
|
||||
.captcha-btn {
|
||||
@@ -220,9 +223,14 @@
|
||||
border: 1px solid #dde2e9;
|
||||
color: #41464f;
|
||||
}
|
||||
.arco-btn-secondary.arco-btn-disabled,
|
||||
.arco-btn-secondary[type='submit'].arco-btn-disabled {
|
||||
color: #c9cdd4;
|
||||
background-color: rgb(247, 248, 250);
|
||||
}
|
||||
.arco-btn-secondary:not(.arco-btn-disabled):hover {
|
||||
background-color: transparent;
|
||||
border: 1px solid rgb(var(--primary-6));
|
||||
border: 1px solid rgb(22, 93, 255);
|
||||
}
|
||||
|
||||
.btn {
|
||||
@@ -240,10 +248,11 @@
|
||||
|
||||
.arco-btn-primary.arco-btn-disabled,
|
||||
.arco-btn-primary[type='submit'].arco-btn-disabled {
|
||||
background-color: var(--color-neutral-4);
|
||||
color: #fff;
|
||||
background-color: rgb(201, 205, 212);
|
||||
box-shadow:
|
||||
0 0 0 1px var(--color-neutral-4),
|
||||
0 2px 1px rgba(0, 0, 0, 0.15);
|
||||
0 0 0 1px rgb(201, 205, 212),
|
||||
0 2px 1px #00000026;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@@ -124,7 +124,7 @@
|
||||
display: inline-block;
|
||||
margin-right: 4px;
|
||||
margin-left: 4px;
|
||||
color: var(--color-text-1);
|
||||
color: #1d2129;
|
||||
font-size: 24px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@@ -189,16 +189,23 @@
|
||||
position: relative;
|
||||
}
|
||||
:deep(.arco-tabs-tab-title:hover) {
|
||||
color: rgb(var(--primary-6));
|
||||
color: rgb(22, 93, 255);
|
||||
}
|
||||
:deep(.arco-tabs-tab-title:before) {
|
||||
display: none;
|
||||
}
|
||||
:deep(.arco-tabs-tab) {
|
||||
margin: 0 30px 0 6px;
|
||||
color: rgb(78, 89, 105);
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.arco-checkbox-label) {
|
||||
color: #1d2129;
|
||||
}
|
||||
:deep(.arco-select-view-single) {
|
||||
color: #1d2129;
|
||||
}
|
||||
.oauth {
|
||||
margin-top: 20px;
|
||||
padding: 0 5px;
|
||||
@@ -207,6 +214,10 @@
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
background: #fff;
|
||||
}
|
||||
:deep(.arco-divider-horizontal) {
|
||||
border-bottom: 1px solid rgb(229, 230, 235);
|
||||
}
|
||||
:deep(.arco-divider) {
|
||||
margin-bottom: 25px;
|
||||
@@ -259,11 +270,11 @@
|
||||
}
|
||||
.mail:hover,
|
||||
.account:hover {
|
||||
color: rgb(var(--primary-6));
|
||||
color: rgb(22, 93, 255);
|
||||
}
|
||||
.mail svg:hover,
|
||||
.account svg:hover {
|
||||
color: rgb(var(--primary-6));
|
||||
color: rgb(22, 93, 255);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -14,6 +14,7 @@
|
||||
const { copy, copied } = useClipboard();
|
||||
const systemLogList = ref<SystemLogRecord[]>([]);
|
||||
const systemLog = ref<SystemLogDetailRecord>({
|
||||
traceId: '',
|
||||
requestUrl: '',
|
||||
requestMethod: '',
|
||||
requestHeaders: '',
|
||||
@@ -35,6 +36,7 @@
|
||||
const data = reactive({
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
traceId: undefined,
|
||||
createTime: undefined,
|
||||
page: 1,
|
||||
size: 10,
|
||||
@@ -335,6 +337,18 @@
|
||||
/>
|
||||
</span>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="Trace ID" :span="2">
|
||||
<a-skeleton v-if="loading" :animation="true">
|
||||
<a-skeleton-line :rows="1" />
|
||||
</a-skeleton>
|
||||
<span v-else>
|
||||
{{ systemLog.traceId }}
|
||||
<icon-copy
|
||||
class="copy-btn"
|
||||
@click="handleCopy(systemLog.traceId)"
|
||||
/>
|
||||
</span>
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
<a-descriptions
|
||||
layout="inline-vertical"
|
||||
|
@@ -534,7 +534,11 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<template #columns>
|
||||
<a-table-column title="ID" data-index="id" />
|
||||
<a-table-column title="序号">
|
||||
<template #cell="{ rowIndex }">
|
||||
{{ rowIndex + 1 + (queryParams.page - 1) * queryParams.size }}
|
||||
</template>
|
||||
</a-table-column>
|
||||
<a-table-column title="名称" :width="130">
|
||||
<template #cell="{ record }">
|
||||
<a-link @click="toDetail(record.id)">{{ record.name }}</a-link>
|
||||
|
@@ -68,7 +68,7 @@
|
||||
callback(
|
||||
t(
|
||||
'userCenter.securitySettings.updatePwd.form.error.validator.rePassword'
|
||||
)
|
||||
),
|
||||
);
|
||||
} else {
|
||||
callback();
|
||||
|
@@ -3,6 +3,7 @@
|
||||
import {
|
||||
DataRecord,
|
||||
ListParam,
|
||||
UserResetReq,
|
||||
list,
|
||||
get,
|
||||
add,
|
||||
@@ -15,6 +16,7 @@
|
||||
import { LabelValueState } from '@/store/modules/dict/types';
|
||||
import getAvatar from '@/utils/avatar';
|
||||
import checkPermission from '@/utils/permission';
|
||||
import { encryptByRsa } from '@/utils/encrypt';
|
||||
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
const { dis_enable_status_enum } = proxy.useDict('dis_enable_status_enum');
|
||||
@@ -31,6 +33,7 @@
|
||||
const detailLoading = ref(false);
|
||||
const exportLoading = ref(false);
|
||||
const visible = ref(false);
|
||||
const resetPasswordVisible = ref(false);
|
||||
const userRoleVisible = ref(false);
|
||||
const detailVisible = ref(false);
|
||||
const deptLoading = ref(false);
|
||||
@@ -53,15 +56,17 @@
|
||||
},
|
||||
// 表单数据
|
||||
form: {} as DataRecord,
|
||||
userResetReq: {} as UserResetReq,
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
username: [{ required: true, message: '请输入用户名' }],
|
||||
nickname: [{ required: true, message: '请输入昵称' }],
|
||||
password: [{ required: true, message: '请输入密码' }],
|
||||
deptId: [{ required: true, message: '请选择所属部门' }],
|
||||
roleIds: [{ required: true, message: '请选择所属角色' }],
|
||||
},
|
||||
});
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
const { queryParams, form, userResetReq, rules } = toRefs(data);
|
||||
|
||||
/**
|
||||
* 查询部门树
|
||||
@@ -126,6 +131,17 @@
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 打开重置密码对话框
|
||||
*
|
||||
* @param id ID
|
||||
*/
|
||||
const toResetPassword = (id: number) => {
|
||||
reset();
|
||||
form.value.id = id;
|
||||
resetPasswordVisible.value = true;
|
||||
};
|
||||
|
||||
/**
|
||||
* 打开分配角色对话框
|
||||
*
|
||||
@@ -183,8 +199,10 @@
|
||||
*/
|
||||
const handleCancel = () => {
|
||||
visible.value = false;
|
||||
resetPasswordVisible.value = false;
|
||||
userRoleVisible.value = false;
|
||||
proxy.$refs.formRef?.resetFields();
|
||||
proxy.$refs.resetPasswordFormRef?.resetFields();
|
||||
proxy.$refs.userRoleFormRef?.resetFields();
|
||||
};
|
||||
|
||||
@@ -201,12 +219,41 @@
|
||||
proxy.$message.success(res.msg);
|
||||
});
|
||||
} else {
|
||||
add(form.value).then((res) => {
|
||||
const rawPassword = form.value.password;
|
||||
if (rawPassword) {
|
||||
form.value.password = encryptByRsa(rawPassword) || '';
|
||||
}
|
||||
add(form.value)
|
||||
.then((res) => {
|
||||
handleCancel();
|
||||
getList();
|
||||
proxy.$message.success(res.msg);
|
||||
})
|
||||
.catch(() => {
|
||||
form.value.password = rawPassword;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
*/
|
||||
const handleResetPassword = () => {
|
||||
proxy.$refs.resetPasswordFormRef.validate((valid: any) => {
|
||||
if (!valid && form.value.id !== undefined) {
|
||||
const rawPassword = form.value.password;
|
||||
if (rawPassword) {
|
||||
userResetReq.value.newPassword = encryptByRsa(rawPassword) || '';
|
||||
}
|
||||
resetPassword(userResetReq.value, form.value.id)
|
||||
.then((res) => {
|
||||
handleCancel();
|
||||
getList();
|
||||
proxy.$message.success(res.msg);
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch();
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -285,17 +332,6 @@
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
*
|
||||
* @param id ID
|
||||
*/
|
||||
const handleResetPassword = (id: number) => {
|
||||
resetPassword(id).then((res) => {
|
||||
proxy.$message.success(res.msg);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 已选择的数据行发生改变时触发
|
||||
*
|
||||
@@ -570,7 +606,11 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<template #columns>
|
||||
<a-table-column title="ID" data-index="id" />
|
||||
<a-table-column title="序号">
|
||||
<template #cell="{ rowIndex }">
|
||||
{{ rowIndex + 1 + (queryParams.page - 1) * queryParams.size }}
|
||||
</template>
|
||||
</a-table-column>
|
||||
<a-table-column title="用户名" :width="100" ellipsis tooltip>
|
||||
<template #cell="{ record }">
|
||||
<a-link @click="toDetail(record.id)">{{
|
||||
@@ -578,7 +618,13 @@
|
||||
}}</a-link>
|
||||
</template>
|
||||
</a-table-column>
|
||||
<a-table-column title="昵称" data-index="nickname" :width="115" ellipsis tooltip />
|
||||
<a-table-column
|
||||
title="昵称"
|
||||
data-index="nickname"
|
||||
:width="115"
|
||||
ellipsis
|
||||
tooltip
|
||||
/>
|
||||
<a-table-column title="性别" align="center">
|
||||
<template #cell="{ record }">
|
||||
<span v-if="record.gender === 1">男</span>
|
||||
@@ -622,7 +668,12 @@
|
||||
<a-tag v-else color="arcoblue">否</a-tag>
|
||||
</template>
|
||||
</a-table-column>
|
||||
<a-table-column title="描述" data-index="description" ellipsis tooltip />
|
||||
<a-table-column
|
||||
title="描述"
|
||||
data-index="description"
|
||||
ellipsis
|
||||
tooltip
|
||||
/>
|
||||
<a-table-column title="创建人/创建时间" :width="175">
|
||||
<template #cell="{ record }">
|
||||
{{ record.createUserString }}<br />
|
||||
@@ -668,22 +719,15 @@
|
||||
<template #icon><icon-delete /></template>
|
||||
</a-button>
|
||||
</a-popconfirm>
|
||||
<a-popconfirm
|
||||
content="是否确定重置当前用户的密码?"
|
||||
type="warning"
|
||||
@ok="handleResetPassword(record.id)"
|
||||
<a-button
|
||||
v-permission="['system:user:password:reset']"
|
||||
type="text"
|
||||
size="small"
|
||||
title="重置密码"
|
||||
@click="toResetPassword(record.id)"
|
||||
>
|
||||
<a-button
|
||||
v-permission="['system:user:password:reset']"
|
||||
type="text"
|
||||
size="small"
|
||||
title="重置密码"
|
||||
>
|
||||
<template #icon
|
||||
><svg-icon icon-class="privacy"
|
||||
/></template>
|
||||
</a-button>
|
||||
</a-popconfirm>
|
||||
<template #icon><svg-icon icon-class="privacy" /></template>
|
||||
</a-button>
|
||||
<a-button
|
||||
v-permission="['system:user:role:update']"
|
||||
type="text"
|
||||
@@ -715,19 +759,11 @@
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-form
|
||||
ref="formRef"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
:label-col-style="{ width: '84px' }"
|
||||
size="large"
|
||||
layout="inline"
|
||||
>
|
||||
<a-form ref="formRef" :model="form" :rules="rules" size="large">
|
||||
<a-form-item label="用户名" field="username">
|
||||
<a-input
|
||||
v-model="form.username"
|
||||
placeholder="请输入用户名"
|
||||
style="width: 162px"
|
||||
:max-length="64"
|
||||
/>
|
||||
</a-form-item>
|
||||
@@ -736,7 +772,13 @@
|
||||
v-model="form.nickname"
|
||||
placeholder="请输入昵称"
|
||||
:max-length="30"
|
||||
style="width: 162px"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item v-if="!form.id" label="密码" field="password">
|
||||
<a-input-password
|
||||
v-model="form.password"
|
||||
placeholder="请输入密码"
|
||||
:max-length="32"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="邮箱" field="email">
|
||||
@@ -744,7 +786,6 @@
|
||||
v-model="form.email"
|
||||
placeholder="请输入邮箱"
|
||||
:max-length="255"
|
||||
style="width: 162px"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="手机号码" field="phone">
|
||||
@@ -752,11 +793,10 @@
|
||||
v-model="form.phone"
|
||||
placeholder="请输入手机号码"
|
||||
:max-length="15"
|
||||
style="width: 162px"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="性别" field="gender">
|
||||
<a-radio-group v-model="form.gender">
|
||||
<a-radio-group v-model="form.gender" style="width: 197px">
|
||||
<a-radio :value="1">男</a-radio>
|
||||
<a-radio :value="2">女</a-radio>
|
||||
<a-radio :value="0" disabled>未知</a-radio>
|
||||
@@ -770,7 +810,6 @@
|
||||
allow-clear
|
||||
allow-search
|
||||
:filter-tree-node="filterDeptOptions"
|
||||
style="width: 431px"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
@@ -786,7 +825,6 @@
|
||||
multiple
|
||||
allow-clear
|
||||
:allow-search="{ retainInputValue: true }"
|
||||
style="width: 431px"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="描述" field="description">
|
||||
@@ -798,7 +836,32 @@
|
||||
minRows: 3,
|
||||
}"
|
||||
show-word-limit
|
||||
style="width: 431px"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
|
||||
<a-modal
|
||||
title="重置密码"
|
||||
:visible="resetPasswordVisible"
|
||||
:mask-closable="false"
|
||||
:esc-to-close="false"
|
||||
unmount-on-close
|
||||
render-to-body
|
||||
@ok="handleResetPassword"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-form
|
||||
ref="resetPasswordFormRef"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
size="large"
|
||||
>
|
||||
<a-form-item label="密码" field="password">
|
||||
<a-input-password
|
||||
v-model="form.password"
|
||||
placeholder="请输入密码"
|
||||
:max-length="32"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
|
Reference in New Issue
Block a user