diff --git a/README.en-US.md b/README.en-US.md
index 9fb64d68..d07f5550 100644
--- a/README.en-US.md
+++ b/README.en-US.md
@@ -10,9 +10,9 @@
-
+
-
+
@@ -25,7 +25,7 @@

diff --git a/README.md b/README.md
index 7a8f16be..5f0737c2 100644
--- a/README.md
+++ b/README.md
@@ -10,8 +10,8 @@
-
-
+
+
@@ -26,7 +26,7 @@
@@ -57,20 +57,39 @@
| 项目 | Gitee | Github | GitCode|
| ---- | ----| ---- | ---- |
-| 前端 | [vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) | [vue3-element-admin](https://github.com/youlaitech/vue3-element-admin) | [vue3-element-admin](https://gitcode.com/youlai/vue3-element-admin) |
-| 精简版 | [vue3-element-template](https://gitee.com/youlaiorg/vue3-element-template) | [vue3-element-template](https://github.com/youlaitech/vue3-element-template) |-|
-| 后端 | [youlai-boot](https://gitee.com/youlaiorg/youlai-boot) | [youlai-boot](https://github.com/haoxianrui/youlai-boot.git) |[youlai-boot](https://gitcode.com/youlai/youlai-boot.git)|
+| vue3-element-admin 标准版| [vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) | [vue3-element-admin](https://github.com/youlaitech/vue3-element-admin) | [vue3-element-admin](https://gitcode.com/youlai/vue3-element-admin) |
+| vue3-element-admin 精简版 | [vue3-element-template](https://gitee.com/youlaiorg/vue3-element-template) | [vue3-element-template](https://github.com/youlaitech/vue3-element-template) |-|
+| Java 后端 | [youlai-boot](https://gitee.com/youlaiorg/youlai-boot) | [youlai-boot](https://github.com/haoxianrui/youlai-boot.git) |[youlai-boot](https://gitcode.com/youlai/youlai-boot.git)|
+| Node 后端 | [youlai-nest](https://gitee.com/youlaiorg/youlai-nest) | [youlai-nest](https://github.com/haoxianrui/youlai-nest.git) |[youlai-nest](https://gitcode.com/youlai/youlai-nest.git)|
-## 环境准备
-| 环境 | 名称版本 | 下载地址 |
-| -------------------- | :----------------------------------------------------------- | ------------------------------------------------------------ |
-| **开发工具** | VSCode | [下载](https://code.visualstudio.com/Download) |
-| **运行环境** | Node ≥18 (其中 20.6.0 版本不可用) | [下载](http://nodejs.cn/download) |
+
+## 项目文档
+
+| 文档名称 | 访问地址 |
+|---------------|-------------------------------------------------------------------------------------------|
+| 项目 0 到 1 | [基于 Vue3 + Vite + TypeScript + Element-Plus 从0到1搭建后台管理系统](https://blog.csdn.net/u013737132/article/details/130191394) |
+| 官方文档 | [https://www.youlai.tech/vue3-element-admin/](https://www.youlai.tech/vue3-element-admin/) |
+| 代码规范 | [ESLint V9 + Prettier + Stylelint + EditorConfig 约束和统一前端代码规范](https://youlai.blog.csdn.net/article/details/145608723) |
+| Git 规范 | [Husky + Lint-staged + Commitlint + Commitizen + cz-git 配置 Git 提交规范](https://youlai.blog.csdn.net/article/details/145615236) |
+| 在线接口文档 | [https://www.apifox.cn/apidoc](https://www.apifox.cn/apidoc/shared-195e783f-4d85-4235-a038-eec696de4ea5) |
+
## 项目启动
+
+- **环境准备**
+
+| 环境类型 | 版本要求 | 下载链接 |
+|----------------|-----------------------------|-----------------------------|
+| **开发工具** | Visual Studio Code (最新版) | [官方下载](https://code.visualstudio.com/Download) |
+| **运行环境** | Node.js 18.x (推荐18.16.1) | [中文镜像](https://npmmirror.com/mirrors/node/v18.16.1/) |
+> ⚠️ 注意:Node.js 20.6.0版本存在兼容性问题,请勿使用
+
+
+- **快速开始**
+
```bash
# 克隆代码
git clone https://gitee.com/youlaiorg/vue3-element-admin.git
@@ -92,7 +111,6 @@ pnpm run dev
```
-
## 项目部署
执行 `pnpm run build` 命令后,项目将被打包并生成 `dist` 目录。接下来,将 `dist` 目录下的文件上传到服务器 `/usr/share/nginx/html` 目录下,并配置 Nginx 进行反向代理。
@@ -161,14 +179,6 @@ server {
如果有其他问题或者建议,建议 [ISSUE](https://gitee.com/youlaiorg/vue3-element-admin/issues/new)
-
-## 项目文档
-
-- [基于 Vue3 + Vite + TypeScript + Element-Plus 从0到1搭建后台管理系统](https://blog.csdn.net/u013737132/article/details/130191394)
-- [ESLint+Prettier+Stylelint+EditorConfig 约束和统一前端代码规范](https://youlai.blog.csdn.net/article/details/145608723)
-- [Husky + Lint-staged + Commitlint + Commitizen + cz-git 配置 Git 提交规范](https://youlai.blog.csdn.net/article/details/145615236)
-
-
## 提交规范
执行 `pnpm run commit` 唤起 git commit 交互,根据提示完成信息的输入和选择。
@@ -191,11 +201,8 @@ Thanks to all the contributors!
## 加群交流
-> **关注「有来技术」公众号,点击菜单“交流群”获取加群二维码。**
->
-> 如果二维码过期,请加微信(haoxianrui)备注「前端」、「后端」或「全栈」拉你进群。
->
-> 交流群仅限技术交流,为过滤广告营销暂设此门槛,感谢理解与配合
+① 关注「有来技术」公众号,点击菜单 **交流群** 获取加群二维码(此举防止广告进群,感谢理解和支持)。
-
+② 直接添加微信 **`haoxianrui`** 备注「前端/后端/全栈」。
+
\ No newline at end of file
diff --git a/package.json b/package.json
index 1ebe1f89..564430d6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "vue3-element-admin",
- "version": "2.25.1",
+ "version": "2.25.2",
"private": true,
"type": "module",
"scripts": {
diff --git a/src/api/codegen.api.ts b/src/api/codegen.api.ts
index af592bae..b3b613fc 100644
--- a/src/api/codegen.api.ts
+++ b/src/api/codegen.api.ts
@@ -110,7 +110,7 @@ export interface TablePageVO {
/** 代码生成配置表单 */
export interface GenConfigForm {
/** 主键 */
- id?: number;
+ id?: string;
/** 表名 */
tableName?: string;
@@ -131,7 +131,7 @@ export interface GenConfigForm {
author?: string;
/** 上级菜单 */
- parentMenuId?: number;
+ parentMenuId?: string;
/** 后端应用名 */
backendAppName?: string;
@@ -145,7 +145,7 @@ export interface GenConfigForm {
/** 字段配置 */
export interface FieldConfig {
/** 主键 */
- id?: number;
+ id?: string;
/** 列名 */
columnName?: string;
diff --git a/src/api/system/config.api.ts b/src/api/system/config.api.ts
index d05aa81f..f280ee1c 100644
--- a/src/api/system/config.api.ts
+++ b/src/api/system/config.api.ts
@@ -13,7 +13,7 @@ const ConfigAPI = {
},
/** 系统配置表单数据 */
- getFormData(id: number) {
+ getFormData(id: string) {
return request({
url: `${CONFIG_BASE_URL}/${id}/form`,
method: "get",
@@ -30,7 +30,7 @@ const ConfigAPI = {
},
/** 更新系统配置 */
- update(id: number, data: ConfigForm) {
+ update(id: string, data: ConfigForm) {
return request({
url: `${CONFIG_BASE_URL}/${id}`,
method: "put",
@@ -43,7 +43,7 @@ const ConfigAPI = {
*
* @param ids 系统配置ID
*/
- deleteById(id: number) {
+ deleteById(id: string) {
return request({
url: `${CONFIG_BASE_URL}/${id}`,
method: "delete",
@@ -69,7 +69,7 @@ export interface ConfigPageQuery extends PageQuery {
/** 系统配置表单对象 */
export interface ConfigForm {
/** 主键 */
- id?: number;
+ id?: string;
/** 配置名称 */
configName?: string;
/** 配置键 */
@@ -83,7 +83,7 @@ export interface ConfigForm {
/** 系统配置分页对象 */
export interface ConfigPageVO {
/** 主键 */
- id?: number;
+ id?: string;
/** 配置名称 */
configName?: string;
/** 配置键 */
diff --git a/src/api/system/dept.api.ts b/src/api/system/dept.api.ts
index a2124e92..200065d3 100644
--- a/src/api/system/dept.api.ts
+++ b/src/api/system/dept.api.ts
@@ -31,7 +31,7 @@ const DeptAPI = {
* @param id 部门ID
* @returns 部门表单数据
*/
- getFormData(id: number) {
+ getFormData(id: string) {
return request({
url: `${DEPT_BASE_URL}/${id}/form`,
method: "get",
@@ -98,13 +98,13 @@ export interface DeptVO {
/** 创建时间 */
createTime?: Date;
/** 部门ID */
- id?: number;
+ id?: string;
/** 部门名称 */
name?: string;
/** 部门编号 */
code?: string;
/** 父部门ID */
- parentId?: number;
+ parentid?: string;
/** 排序 */
sort?: number;
/** 状态(1:启用;0:禁用) */
diff --git a/src/api/system/dict.api.ts b/src/api/system/dict.api.ts
index 755ff062..3a3d4da9 100644
--- a/src/api/system/dict.api.ts
+++ b/src/api/system/dict.api.ts
@@ -39,7 +39,7 @@ const DictAPI = {
* @param id 字典ID
* @returns 字典表单数据
*/
- getFormData(id: number) {
+ getFormData(id: string) {
return request>({
url: `${DICT_BASE_URL}/${id}/form`,
method: "get",
@@ -65,7 +65,7 @@ const DictAPI = {
* @param id 字典ID
* @param data 字典表单数据
*/
- update(id: number, data: DictForm) {
+ update(id: string, data: DictForm) {
return request({
url: `${DICT_BASE_URL}/${id}`,
method: "put",
@@ -129,7 +129,7 @@ const DictAPI = {
* @param id 字典项ID
* @returns 字典项表单数据
*/
- getDictItemFormData(dictCode: string, id: number) {
+ getDictItemFormData(dictCode: string, id: string) {
return request>({
url: `${DICT_BASE_URL}/${dictCode}/items/${id}/form`,
method: "get",
@@ -139,7 +139,7 @@ const DictAPI = {
/**
* 修改字典项
*/
- updateDictItem(dictCode: string, id: number, data: DictItemForm) {
+ updateDictItem(dictCode: string, id: string, data: DictItemForm) {
return request({
url: `${DICT_BASE_URL}/${dictCode}/items/${id}`,
method: "put",
@@ -182,7 +182,7 @@ export interface DictPageVO {
/**
* 字典ID
*/
- id: number;
+ id: string;
/**
* 字典名称
*/
@@ -204,7 +204,7 @@ export interface DictForm {
/**
* 字典ID
*/
- id?: number;
+ id?: string;
/**
* 字典名称
*/
@@ -241,7 +241,7 @@ export interface DictItemPageVO {
/**
* 字典ID
*/
- id: number;
+ id: string;
/**
* 字典编码
*/
@@ -271,7 +271,7 @@ export interface DictItemForm {
/**
* 字典ID
*/
- id?: number;
+ id?: string;
/**
* 字典编码
*/
diff --git a/src/api/system/log.api.ts b/src/api/system/log.api.ts
index 32dbc881..402478ad 100644
--- a/src/api/system/log.api.ts
+++ b/src/api/system/log.api.ts
@@ -61,7 +61,7 @@ export interface LogPageQuery extends PageQuery {
*/
export interface LogPageVO {
/** 主键 */
- id: number;
+ id: string;
/** 日志模块 */
module: string;
/** 日志内容 */
diff --git a/src/api/system/menu.api.ts b/src/api/system/menu.api.ts
index 65867ff5..06c11ed2 100644
--- a/src/api/system/menu.api.ts
+++ b/src/api/system/menu.api.ts
@@ -91,7 +91,7 @@ const MenuAPI = {
* @param id 菜单ID
* @returns 请求结果
*/
- deleteById(id: number) {
+ deleteById(id: string) {
return request({
url: `${MENU_BASE_URL}/${id}`,
method: "delete",
diff --git a/src/api/system/notice.api.ts b/src/api/system/notice.api.ts
index 0ad16107..b5e65e79 100644
--- a/src/api/system/notice.api.ts
+++ b/src/api/system/notice.api.ts
@@ -15,10 +15,10 @@ const NoticeAPI = {
/**
* 获取通知公告表单数据
*
- * @param id NoticeID
- * @returns Notice表单数据
+ * @param id 通知
+ * @returns 通知表单数据
*/
- getFormData(id: number) {
+ getFormData(id: string) {
return request({
url: `${NOTICE_BASE_URL}/${id}/form`,
method: "get",
@@ -28,7 +28,7 @@ const NoticeAPI = {
/**
* 添加通知公告
*
- * @param data Notice表单数据
+ * @param data 通知表单数据
* @returns
*/
create(data: NoticeForm) {
@@ -42,10 +42,10 @@ const NoticeAPI = {
/**
* 更新通知公告
*
- * @param id NoticeID
- * @param data Notice表单数据
+ * @param id 通知ID
+ * @param data 通知表单数据
*/
- update(id: number, data: NoticeForm) {
+ update(id: string, data: NoticeForm) {
return request({
url: `${NOTICE_BASE_URL}/${id}`,
method: "put",
@@ -71,7 +71,7 @@ const NoticeAPI = {
* @param id 被发布的通知公告id
* @returns
*/
- publish(id: number) {
+ publish(id: string) {
return request({
url: `${NOTICE_BASE_URL}/${id}/publish`,
method: "put",
@@ -84,7 +84,7 @@ const NoticeAPI = {
* @param id 撤回的通知id
* @returns
*/
- revoke(id: number) {
+ revoke(id: string) {
return request({
url: `${NOTICE_BASE_URL}/${id}/revoke`,
method: "put",
@@ -134,7 +134,7 @@ export interface NoticePageQuery extends PageQuery {
/** 通知公告表单对象 */
export interface NoticeForm {
- id?: number;
+ id?: string;
/** 通知标题 */
title?: string;
/** 通知内容 */
diff --git a/src/api/system/role.api.ts b/src/api/system/role.api.ts
index 44b4624a..be680229 100644
--- a/src/api/system/role.api.ts
+++ b/src/api/system/role.api.ts
@@ -25,8 +25,8 @@ const RoleAPI = {
* @param roleId 角色ID
* @returns 角色的菜单ID集合
*/
- getRoleMenuIds(roleId: number) {
- return request({
+ getRoleMenuIds(roleId: string) {
+ return request({
url: `${ROLE_BASE_URL}/${roleId}/menuIds`,
method: "get",
});
@@ -38,7 +38,7 @@ const RoleAPI = {
* @param roleId 角色ID
* @param data 菜单ID集合
*/
- updateRoleMenus(roleId: number, data: number[]) {
+ updateRoleMenus(roleId: string, data: number[]) {
return request({
url: `${ROLE_BASE_URL}/${roleId}/menus`,
method: "put",
@@ -52,7 +52,7 @@ const RoleAPI = {
* @param id 角色ID
* @returns 角色表单数据
*/
- getFormData(id: number) {
+ getFormData(id: string) {
return request({
url: `${ROLE_BASE_URL}/${id}/form`,
method: "get",
@@ -74,7 +74,7 @@ const RoleAPI = {
* @param id 角色ID
* @param data 角色表单数据
*/
- update(id: number, data: RoleForm) {
+ update(id: string, data: RoleForm) {
return request({
url: `${ROLE_BASE_URL}/${id}`,
method: "put",
@@ -105,10 +105,10 @@ export interface RolePageQuery extends PageQuery {
/** 角色分页对象 */
export interface RolePageVO {
+ /** 角色ID */
+ id?: string;
/** 角色编码 */
code?: string;
- /** 角色ID */
- id?: number;
/** 角色名称 */
name?: string;
/** 排序 */
@@ -124,7 +124,7 @@ export interface RolePageVO {
/** 角色表单对象 */
export interface RoleForm {
/** 角色ID */
- id?: number;
+ id?: string;
/** 角色编码 */
code?: string;
/** 数据权限 */
diff --git a/src/api/system/user.api.ts b/src/api/system/user.api.ts
index e9c69c1f..1d16fd1c 100644
--- a/src/api/system/user.api.ts
+++ b/src/api/system/user.api.ts
@@ -34,7 +34,7 @@ const UserAPI = {
* @param userId 用户ID
* @returns 用户表单详情
*/
- getFormData(userId: number) {
+ getFormData(userId: string) {
return request({
url: `${USER_BASE_URL}/${userId}/form`,
method: "get",
@@ -60,7 +60,7 @@ const UserAPI = {
* @param id 用户ID
* @param data 用户表单数据
*/
- update(id: number, data: UserForm) {
+ update(id: string, data: UserForm) {
return request({
url: `${USER_BASE_URL}/${id}`,
method: "put",
@@ -74,7 +74,7 @@ const UserAPI = {
* @param id 用户ID
* @param password 新密码
*/
- resetPassword(id: number, password: string) {
+ resetPassword(id: string, password: string) {
return request({
url: `${USER_BASE_URL}/${id}/password/reset`,
method: "put",
@@ -123,7 +123,7 @@ const UserAPI = {
* @param deptId 部门ID
* @param file 导入文件
*/
- import(deptId: number, file: File) {
+ import(deptId: string, file: File) {
const formData = new FormData();
formData.append("file", file);
return request({
@@ -215,7 +215,7 @@ export default UserAPI;
/** 登录用户信息 */
export interface UserInfo {
/** 用户ID */
- userId?: number;
+ userId?: string;
/** 用户名 */
username?: string;
@@ -244,7 +244,7 @@ export interface UserPageQuery extends PageQuery {
status?: number;
/** 部门ID */
- deptId?: number;
+ deptId?: string;
/** 开始时间 */
createTime?: [string, string];
@@ -253,7 +253,7 @@ export interface UserPageQuery extends PageQuery {
/** 用户分页对象 */
export interface UserPageVO {
/** 用户ID */
- id: number;
+ id: string;
/** 用户头像URL */
avatar?: string;
/** 创建时间 */
@@ -278,16 +278,16 @@ export interface UserPageVO {
/** 用户表单类型 */
export interface UserForm {
+ /** 用户ID */
+ id?: string;
/** 用户头像 */
avatar?: string;
/** 部门ID */
- deptId?: number;
+ deptId?: string;
/** 邮箱 */
email?: string;
/** 性别 */
gender?: number;
- /** 用户ID */
- id?: number;
/** 手机号 */
mobile?: string;
/** 昵称 */
@@ -303,7 +303,7 @@ export interface UserForm {
/** 个人中心用户信息 */
export interface UserProfileVO {
/** 用户ID */
- id?: number;
+ id?: string;
/** 用户名 */
username?: string;
@@ -336,7 +336,7 @@ export interface UserProfileVO {
/** 个人中心用户信息表单 */
export interface UserProfileForm {
/** 用户ID */
- id?: number;
+ id?: string;
/** 用户名 */
username?: string;
diff --git a/src/views/demo/curd/config/content.ts b/src/views/demo/curd/config/content.ts
index 3be52d3a..f4ce364c 100644
--- a/src/views/demo/curd/config/content.ts
+++ b/src/views/demo/curd/config/content.ts
@@ -20,7 +20,7 @@ const contentConfig: IContentConfig = {
},
deleteAction: UserAPI.deleteByIds,
importAction(file) {
- return UserAPI.import(1, file);
+ return UserAPI.import("1", file);
},
exportAction: UserAPI.export,
importTemplate: UserAPI.downloadTemplate,
diff --git a/src/views/demo/curd/config/edit.ts b/src/views/demo/curd/config/edit.ts
index cef72cf8..bcbe1d90 100644
--- a/src/views/demo/curd/config/edit.ts
+++ b/src/views/demo/curd/config/edit.ts
@@ -12,7 +12,7 @@ const modalConfig: IModalConfig = {
},
pk: "id",
formAction: function (data) {
- return UserAPI.update(data.id as number, data);
+ return UserAPI.update(data.id as string, data);
},
beforeSubmit(data) {
console.log("提交之前处理", data);
diff --git a/src/views/demo/table-select/index.vue b/src/views/demo/table-select/index.vue
index 6fd82c9d..0d7202c3 100644
--- a/src/views/demo/table-select/index.vue
+++ b/src/views/demo/table-select/index.vue
@@ -4,7 +4,7 @@ import selectConfig from "./config/select";
import { useDictStore } from "@/store";
const dictStore = useDictStore();
interface IUser {
- id: number;
+ id: string;
username: string;
nickname: string;
mobile: string;
diff --git a/src/views/system/config/index.vue b/src/views/system/config/index.vue
index ba7991b1..14e9da16 100644
--- a/src/views/system/config/index.vue
+++ b/src/views/system/config/index.vue
@@ -198,7 +198,7 @@ function handleSelectionChange(selection: any) {
}
// 打开系统配置弹窗
-function handleOpenDialog(id?: number) {
+function handleOpenDialog(id?: string) {
dialog.visible = true;
if (id) {
dialog.title = "修改系统配置";
@@ -259,7 +259,7 @@ function handleCloseDialog() {
}
// 删除系统配置
-function handleDelete(id: number) {
+function handleDelete(id: string) {
ElMessageBox.confirm("确认删除该项配置?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue
index 7c7f4f13..ed926967 100644
--- a/src/views/system/dept/index.vue
+++ b/src/views/system/dept/index.vue
@@ -213,7 +213,7 @@ function handleSelectionChange(selection: any) {
* @param parentId 父部门ID
* @param deptId 部门ID
*/
-async function handleOpenDialog(parentId?: string, deptId?: number) {
+async function handleOpenDialog(parentId?: string, deptId?: string) {
// 加载部门下拉数据
const data = await DeptAPI.getOptions();
deptOptions.value = [
diff --git a/src/views/system/dict/dict-item.vue b/src/views/system/dict/dict-item.vue
index 9f84912e..17ef6336 100644
--- a/src/views/system/dict/dict-item.vue
+++ b/src/views/system/dict/dict-item.vue
@@ -129,11 +129,6 @@
diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue
index 71f5132a..7de44c87 100644
--- a/src/views/system/dict/index.vue
+++ b/src/views/system/dict/index.vue
@@ -198,7 +198,7 @@ function handleAddClick() {
*
* @param id 字典ID
*/
-function handleEditClick(id: number) {
+function handleEditClick(id: string) {
dialog.visible = true;
dialog.title = "修改字典";
DictAPI.getFormData(id).then((data) => {
diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue
index ef25aca3..31a7e6d5 100644
--- a/src/views/system/menu/index.vue
+++ b/src/views/system/menu/index.vue
@@ -487,7 +487,7 @@ function handleSubmit() {
}
// 删除菜单
-function handleDelete(menuId: number) {
+function handleDelete(menuId: string) {
if (!menuId) {
ElMessage.warning("请勾选删除项");
return false;
diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue
index f96ed715..75cabbac 100644
--- a/src/views/system/notice/index.vue
+++ b/src/views/system/notice/index.vue
@@ -341,7 +341,7 @@ function handleSelectionChange(selection: any) {
}
// 打开通知公告弹窗
-function handleOpenDialog(id?: number) {
+function handleOpenDialog(id?: string) {
UserAPI.getOptions().then((data) => {
userOptions.value = data;
});
@@ -359,7 +359,7 @@ function handleOpenDialog(id?: number) {
}
// 发布通知公告
-function handlePublish(id: number) {
+function handlePublish(id: string) {
NoticeAPI.publish(id).then(() => {
ElMessage.success("发布成功");
handleQuery();
@@ -367,7 +367,7 @@ function handlePublish(id: number) {
}
// 撤回通知公告
-function handleRevoke(id: number) {
+function handleRevoke(id: string) {
NoticeAPI.revoke(id).then(() => {
ElMessage.success("撤回成功");
handleQuery();
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index b3704e4d..c14815d0 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -257,7 +257,7 @@ const rules = reactive({
// 选中的角色
interface CheckedRole {
- id?: number;
+ id?: string;
name?: string;
}
const checkedRole = ref({});
@@ -294,7 +294,7 @@ function handleSelectionChange(selection: any) {
}
// 打开角色弹窗
-function handleOpenDialog(roleId?: number) {
+function handleOpenDialog(roleId?: string) {
dialog.visible = true;
if (roleId) {
dialog.title = "修改角色";
diff --git a/src/views/system/user/components/DeptTree.vue b/src/views/system/user/components/DeptTree.vue
index 8ae944a8..fca23070 100644
--- a/src/views/system/user/components/DeptTree.vue
+++ b/src/views/system/user/components/DeptTree.vue
@@ -24,7 +24,7 @@
import DeptAPI from "@/api/system/dept.api";
const props = defineProps({
modelValue: {
- type: [Number],
+ type: [String, Number],
default: undefined,
},
});
diff --git a/src/views/system/user/components/UserImport.vue b/src/views/system/user/components/UserImport.vue
index 4bc57bab..bcfb420e 100644
--- a/src/views/system/user/components/UserImport.vue
+++ b/src/views/system/user/components/UserImport.vue
@@ -163,7 +163,7 @@ const handleUpload = async () => {
}
try {
- const result = await UserAPI.import(1, importFormData.files[0].raw as File);
+ const result = await UserAPI.import("1", importFormData.files[0].raw as File);
if (result.code === ResultEnum.SUCCESS && result.invalidCount === 0) {
ElMessage.success("导入成功,导入数据:" + result.validCount + "条");
emit("import-success");
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index b7be3635..f94ad4c2 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -360,7 +360,7 @@ function hancleResetPassword(row: UserPageVO) {
*
* @param id 用户ID
*/
-async function handleOpenDialog(id?: number) {
+async function handleOpenDialog(id?: string) {
dialog.visible = true;
// 加载角色下拉数据源
roleOptions.value = await RoleAPI.getOptions();