7 Commits
2.3.x ... 2.4.x

14 changed files with 240 additions and 89 deletions

23
.github/workflows/release-tag.yml vendored Normal file
View 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) 。

View File

@@ -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) ## v2.3.0 (2024-01-21)
### ✨ 新特性 ### ✨ 新特性

View File

@@ -4,7 +4,19 @@
<img src="https://img.shields.io/badge/License-Apache--2.0-blue.svg" alt="License" /> <img src="https://img.shields.io/badge/License-Apache--2.0-blue.svg" alt="License" />
</a> </a>
<a href="https://github.com/Charles7c/continew-admin-ui" target="_blank"> <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>
<a href="https://github.com/Charles7c/continew-admin" target="_blank"> <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" /> <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"> <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" /> <img src="https://gitee.com/Charles7c/continew-admin/badge/fork.svg?theme=white" alt="Gitee forks" />
</a> </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 📚 [在线文档](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> 开箱即用的中后台前端解决方案 - 感谢 <a href="http://pro.arco.design/" target="_blank">Arco Design Pro</a> 开箱即用的中后台前端解决方案
- 感谢 [Gi Admin Pro](https://gitee.com/lin0716/gi-demo),致敬各位作者为开源前端模板领域作出的贡献 - 感谢 [Gi Admin Pro](https://gitee.com/lin0716/gi-demo),致敬各位作者为开源前端模板领域作出的贡献
- e.g. 扩展于 Gi Admin Pro 项目开源的文件管理组件 - e.g. 扩展于 Gi Admin Pro 项目开源的文件管理组件

View File

@@ -1,7 +1,7 @@
{ {
"name": "continew-admin-ui", "name": "continew-admin-ui",
"description": "ContiNew AdminContinue New Admin持续迭代优化的前后端分离中后台管理系统框架开箱即用持续提供舒适的开发体验。", "description": "ContiNew AdminContinue New Admin持续迭代优化的前后端分离中后台管理系统框架开箱即用持续提供舒适的开发体验。",
"version": "2.3.0", "version": "2.4.0",
"private": true, "private": true,
"author": "Charles7c", "author": "Charles7c",
"license": "Apache-2.0", "license": "Apache-2.0",

View File

@@ -35,6 +35,7 @@ export interface SystemLogRecord extends LogRecord {
} }
export interface SystemLogDetailRecord extends SystemLogRecord { export interface SystemLogDetailRecord extends SystemLogRecord {
traceId: string;
requestHeaders: string; requestHeaders: string;
requestBody: string; requestBody: string;
responseHeaders: string; responseHeaders: string;

View File

@@ -7,6 +7,7 @@ export interface DataRecord {
id?: number; id?: number;
username?: string; username?: string;
nickname?: string; nickname?: string;
password?: string;
gender?: number; gender?: number;
email?: string; email?: string;
phone?: string; phone?: string;
@@ -25,6 +26,10 @@ export interface DataRecord {
disabled?: boolean; disabled?: boolean;
} }
export interface UserResetReq {
newPassword: string;
}
export interface ListParam { export interface ListParam {
username?: string; username?: string;
status?: number; status?: number;
@@ -64,8 +69,8 @@ export function del(ids: number | Array<number>) {
return axios.delete(`${BASE_URL}/${ids}`); return axios.delete(`${BASE_URL}/${ids}`);
} }
export function resetPassword(id: number) { export function resetPassword(req: UserResetReq, id: number) {
return axios.patch(`${BASE_URL}/${id}/password`); return axios.patch(`${BASE_URL}/${id}/password`, req);
} }
export interface UpdateUserRoleReq { export interface UpdateUserRoleReq {

View File

@@ -169,15 +169,18 @@
margin-top: 16px; margin-top: 16px;
.arco-input-wrapper, .arco-input-wrapper,
:deep(.arco-select-view-single) { :deep(.arco-select-view-single) {
background-color: var(--color-bg-white); background-color: #fff;
border: 1px solid var(--color-border-3); border: 1px solid #c9cdd4;
height: 40px; height: 40px;
border-radius: 4px; border-radius: 4px;
font-size: 13px; font-size: 13px;
} }
.arco-input-wrapper.arco-input-error { .arco-input-wrapper.arco-input-error {
background-color: var(--color-danger-light-1); background-color: rgb(255, 236, 232);
border-color: var(--color-danger-light-4); border-color: rgb(249, 137, 129);
}
.arco-input-wrapper :deep(.arco-input) {
color: rgb(29, 33, 41);
} }
.captcha { .captcha {

View File

@@ -165,15 +165,18 @@
margin-top: 16px; margin-top: 16px;
.arco-input-wrapper, .arco-input-wrapper,
:deep(.arco-select-view-single) { :deep(.arco-select-view-single) {
background-color: var(--color-bg-white); background-color: #fff;
border: 1px solid var(--color-border-3); border: 1px solid #c9cdd4;
height: 40px; height: 40px;
border-radius: 4px; border-radius: 4px;
font-size: 13px; font-size: 13px;
} }
.arco-input-wrapper.arco-input-error { .arco-input-wrapper.arco-input-error {
background-color: var(--color-danger-light-1); background-color: rgb(255, 236, 232);
border-color: var(--color-danger-light-4); border-color: rgb(249, 137, 129);
}
.arco-input-wrapper :deep(.arco-input) {
color: rgb(29, 33, 41);
} }
.captcha-btn { .captcha-btn {
@@ -190,7 +193,7 @@
} }
.arco-btn-secondary:not(.arco-btn-disabled):hover { .arco-btn-secondary:not(.arco-btn-disabled):hover {
background-color: transparent; background-color: transparent;
border: 1px solid rgb(var(--primary-6)); border: 1px solid rgb(22, 93, 255);
} }
.btn { .btn {

View File

@@ -197,15 +197,18 @@
margin-top: 16px; margin-top: 16px;
.arco-input-wrapper, .arco-input-wrapper,
:deep(.arco-select-view-single) { :deep(.arco-select-view-single) {
background-color: var(--color-bg-white); background-color: #fff;
border: 1px solid var(--color-border-3); border: 1px solid #c9cdd4;
height: 40px; height: 40px;
border-radius: 4px; border-radius: 4px;
font-size: 13px; font-size: 13px;
} }
.arco-input-wrapper.arco-input-error { .arco-input-wrapper.arco-input-error {
background-color: var(--color-danger-light-1); background-color: rgb(255, 236, 232);
border-color: var(--color-danger-light-4); border-color: rgb(249, 137, 129);
}
.arco-input-wrapper :deep(.arco-input) {
color: rgb(29, 33, 41);
} }
.captcha-btn { .captcha-btn {
@@ -220,9 +223,14 @@
border: 1px solid #dde2e9; border: 1px solid #dde2e9;
color: #41464f; 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 { .arco-btn-secondary:not(.arco-btn-disabled):hover {
background-color: transparent; background-color: transparent;
border: 1px solid rgb(var(--primary-6)); border: 1px solid rgb(22, 93, 255);
} }
.btn { .btn {
@@ -240,10 +248,11 @@
.arco-btn-primary.arco-btn-disabled, .arco-btn-primary.arco-btn-disabled,
.arco-btn-primary[type='submit'].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: box-shadow:
0 0 0 1px var(--color-neutral-4), 0 0 0 1px rgb(201, 205, 212),
0 2px 1px rgba(0, 0, 0, 0.15); 0 2px 1px #00000026;
} }
} }
</style> </style>

View File

@@ -124,7 +124,7 @@
display: inline-block; display: inline-block;
margin-right: 4px; margin-right: 4px;
margin-left: 4px; margin-left: 4px;
color: var(--color-text-1); color: #1d2129;
font-size: 24px; font-size: 24px;
vertical-align: middle; vertical-align: middle;
} }
@@ -189,16 +189,23 @@
position: relative; position: relative;
} }
:deep(.arco-tabs-tab-title:hover) { :deep(.arco-tabs-tab-title:hover) {
color: rgb(var(--primary-6)); color: rgb(22, 93, 255);
} }
:deep(.arco-tabs-tab-title:before) { :deep(.arco-tabs-tab-title:before) {
display: none; display: none;
} }
:deep(.arco-tabs-tab) { :deep(.arco-tabs-tab) {
margin: 0 30px 0 6px; margin: 0 30px 0 6px;
color: rgb(78, 89, 105);
} }
} }
:deep(.arco-checkbox-label) {
color: #1d2129;
}
:deep(.arco-select-view-single) {
color: #1d2129;
}
.oauth { .oauth {
margin-top: 20px; margin-top: 20px;
padding: 0 5px; padding: 0 5px;
@@ -207,6 +214,10 @@
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;
line-height: 20px; line-height: 20px;
background: #fff;
}
:deep(.arco-divider-horizontal) {
border-bottom: 1px solid rgb(229, 230, 235);
} }
:deep(.arco-divider) { :deep(.arco-divider) {
margin-bottom: 25px; margin-bottom: 25px;
@@ -259,11 +270,11 @@
} }
.mail:hover, .mail:hover,
.account:hover { .account:hover {
color: rgb(var(--primary-6)); color: rgb(22, 93, 255);
} }
.mail svg:hover, .mail svg:hover,
.account svg:hover { .account svg:hover {
color: rgb(var(--primary-6)); color: rgb(22, 93, 255);
} }
} }
} }

View File

@@ -14,6 +14,7 @@
const { copy, copied } = useClipboard(); const { copy, copied } = useClipboard();
const systemLogList = ref<SystemLogRecord[]>([]); const systemLogList = ref<SystemLogRecord[]>([]);
const systemLog = ref<SystemLogDetailRecord>({ const systemLog = ref<SystemLogDetailRecord>({
traceId: '',
requestUrl: '', requestUrl: '',
requestMethod: '', requestMethod: '',
requestHeaders: '', requestHeaders: '',
@@ -35,6 +36,7 @@
const data = reactive({ const data = reactive({
// 查询参数 // 查询参数
queryParams: { queryParams: {
traceId: undefined,
createTime: undefined, createTime: undefined,
page: 1, page: 1,
size: 10, size: 10,
@@ -335,6 +337,18 @@
/> />
</span> </span>
</a-descriptions-item> </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>
<a-descriptions <a-descriptions
layout="inline-vertical" layout="inline-vertical"

View File

@@ -534,7 +534,11 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<template #columns> <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"> <a-table-column title="名称" :width="130">
<template #cell="{ record }"> <template #cell="{ record }">
<a-link @click="toDetail(record.id)">{{ record.name }}</a-link> <a-link @click="toDetail(record.id)">{{ record.name }}</a-link>

View File

@@ -68,7 +68,7 @@
callback( callback(
t( t(
'userCenter.securitySettings.updatePwd.form.error.validator.rePassword' 'userCenter.securitySettings.updatePwd.form.error.validator.rePassword'
) ),
); );
} else { } else {
callback(); callback();

View File

@@ -3,6 +3,7 @@
import { import {
DataRecord, DataRecord,
ListParam, ListParam,
UserResetReq,
list, list,
get, get,
add, add,
@@ -15,6 +16,7 @@
import { LabelValueState } from '@/store/modules/dict/types'; import { LabelValueState } from '@/store/modules/dict/types';
import getAvatar from '@/utils/avatar'; import getAvatar from '@/utils/avatar';
import checkPermission from '@/utils/permission'; import checkPermission from '@/utils/permission';
import { encryptByRsa } from '@/utils/encrypt';
const { proxy } = getCurrentInstance() as any; const { proxy } = getCurrentInstance() as any;
const { dis_enable_status_enum } = proxy.useDict('dis_enable_status_enum'); const { dis_enable_status_enum } = proxy.useDict('dis_enable_status_enum');
@@ -31,6 +33,7 @@
const detailLoading = ref(false); const detailLoading = ref(false);
const exportLoading = ref(false); const exportLoading = ref(false);
const visible = ref(false); const visible = ref(false);
const resetPasswordVisible = ref(false);
const userRoleVisible = ref(false); const userRoleVisible = ref(false);
const detailVisible = ref(false); const detailVisible = ref(false);
const deptLoading = ref(false); const deptLoading = ref(false);
@@ -53,15 +56,17 @@
}, },
// 表单数据 // 表单数据
form: {} as DataRecord, form: {} as DataRecord,
userResetReq: {} as UserResetReq,
// 表单验证规则 // 表单验证规则
rules: { rules: {
username: [{ required: true, message: '请输入用户名' }], username: [{ required: true, message: '请输入用户名' }],
nickname: [{ required: true, message: '请输入昵称' }], nickname: [{ required: true, message: '请输入昵称' }],
password: [{ required: true, message: '请输入密码' }],
deptId: [{ required: true, message: '请选择所属部门' }], deptId: [{ required: true, message: '请选择所属部门' }],
roleIds: [{ 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 = () => { const handleCancel = () => {
visible.value = false; visible.value = false;
resetPasswordVisible.value = false;
userRoleVisible.value = false; userRoleVisible.value = false;
proxy.$refs.formRef?.resetFields(); proxy.$refs.formRef?.resetFields();
proxy.$refs.resetPasswordFormRef?.resetFields();
proxy.$refs.userRoleFormRef?.resetFields(); proxy.$refs.userRoleFormRef?.resetFields();
}; };
@@ -201,12 +219,41 @@
proxy.$message.success(res.msg); proxy.$message.success(res.msg);
}); });
} else { } 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(); handleCancel();
getList(); getList();
proxy.$message.success(res.msg); 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" @selection-change="handleSelectionChange"
> >
<template #columns> <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> <a-table-column title="用户名" :width="100" ellipsis tooltip>
<template #cell="{ record }"> <template #cell="{ record }">
<a-link @click="toDetail(record.id)">{{ <a-link @click="toDetail(record.id)">{{
@@ -578,7 +618,13 @@
}}</a-link> }}</a-link>
</template> </template>
</a-table-column> </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"> <a-table-column title="性别" align="center">
<template #cell="{ record }"> <template #cell="{ record }">
<span v-if="record.gender === 1"></span> <span v-if="record.gender === 1"></span>
@@ -622,7 +668,12 @@
<a-tag v-else color="arcoblue"></a-tag> <a-tag v-else color="arcoblue"></a-tag>
</template> </template>
</a-table-column> </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"> <a-table-column title="创建人/创建时间" :width="175">
<template #cell="{ record }"> <template #cell="{ record }">
{{ record.createUserString }}<br /> {{ record.createUserString }}<br />
@@ -668,22 +719,15 @@
<template #icon><icon-delete /></template> <template #icon><icon-delete /></template>
</a-button> </a-button>
</a-popconfirm> </a-popconfirm>
<a-popconfirm <a-button
content="是否确定重置当前用户的密码?" v-permission="['system:user:password:reset']"
type="warning" type="text"
@ok="handleResetPassword(record.id)" size="small"
title="重置密码"
@click="toResetPassword(record.id)"
> >
<a-button <template #icon><svg-icon icon-class="privacy" /></template>
v-permission="['system:user:password:reset']" </a-button>
type="text"
size="small"
title="重置密码"
>
<template #icon
><svg-icon icon-class="privacy"
/></template>
</a-button>
</a-popconfirm>
<a-button <a-button
v-permission="['system:user:role:update']" v-permission="['system:user:role:update']"
type="text" type="text"
@@ -715,19 +759,11 @@
@ok="handleOk" @ok="handleOk"
@cancel="handleCancel" @cancel="handleCancel"
> >
<a-form <a-form ref="formRef" :model="form" :rules="rules" size="large">
ref="formRef"
:model="form"
:rules="rules"
:label-col-style="{ width: '84px' }"
size="large"
layout="inline"
>
<a-form-item label="用户名" field="username"> <a-form-item label="用户名" field="username">
<a-input <a-input
v-model="form.username" v-model="form.username"
placeholder="请输入用户名" placeholder="请输入用户名"
style="width: 162px"
:max-length="64" :max-length="64"
/> />
</a-form-item> </a-form-item>
@@ -736,7 +772,13 @@
v-model="form.nickname" v-model="form.nickname"
placeholder="请输入昵称" placeholder="请输入昵称"
:max-length="30" :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>
<a-form-item label="邮箱" field="email"> <a-form-item label="邮箱" field="email">
@@ -744,7 +786,6 @@
v-model="form.email" v-model="form.email"
placeholder="请输入邮箱" placeholder="请输入邮箱"
:max-length="255" :max-length="255"
style="width: 162px"
/> />
</a-form-item> </a-form-item>
<a-form-item label="手机号码" field="phone"> <a-form-item label="手机号码" field="phone">
@@ -752,11 +793,10 @@
v-model="form.phone" v-model="form.phone"
placeholder="请输入手机号码" placeholder="请输入手机号码"
:max-length="15" :max-length="15"
style="width: 162px"
/> />
</a-form-item> </a-form-item>
<a-form-item label="性别" field="gender"> <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="1">男</a-radio>
<a-radio :value="2">女</a-radio> <a-radio :value="2">女</a-radio>
<a-radio :value="0" disabled>未知</a-radio> <a-radio :value="0" disabled>未知</a-radio>
@@ -770,7 +810,6 @@
allow-clear allow-clear
allow-search allow-search
:filter-tree-node="filterDeptOptions" :filter-tree-node="filterDeptOptions"
style="width: 431px"
/> />
</a-form-item> </a-form-item>
<a-form-item <a-form-item
@@ -786,7 +825,6 @@
multiple multiple
allow-clear allow-clear
:allow-search="{ retainInputValue: true }" :allow-search="{ retainInputValue: true }"
style="width: 431px"
/> />
</a-form-item> </a-form-item>
<a-form-item label="描述" field="description"> <a-form-item label="描述" field="description">
@@ -798,7 +836,32 @@
minRows: 3, minRows: 3,
}" }"
show-word-limit 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-item>
</a-form> </a-form>