diff --git a/frontend/src/services/apis/index.ts b/frontend/src/services/apis/index.ts
index 213cf471..678074a4 100644
--- a/frontend/src/services/apis/index.ts
+++ b/frontend/src/services/apis/index.ts
@@ -1,5 +1,5 @@
import { useDefineApi } from "@/stores/useDefineApi";
-import type { InstanceDetail, NodeStatus, Settings } from "@/types";
+import type { InstanceDetail, NodeStatus, Settings, UserInfo } from "@/types";
import type { BaseUserInfo } from "@/types/user";
import type { IPanelOverviewResponse } from "../../../../common/global";
@@ -71,6 +71,48 @@ export const setSettingInfo = useDefineApi<
method: "PUT"
});
+// 用户管理
+// 用户管理 获取信息
+export const getUserInfo = useDefineApi<
+ {
+ params: {
+ userName: string;
+ page: number;
+ page_size: number;
+ };
+ },
+ { total: number; pageSize: number; page: number; maxPage: number; data: UserInfo[] }
+>({
+ url: "/api/auth/search",
+ method: "GET"
+});
+
+// 用户管理 删除用户
+export const deleteUser = useDefineApi<
+ {
+ data: string[];
+ },
+ any
+>({
+ url: "/api/auth",
+ method: "DELETE"
+});
+
+// 用户管理 新增用户
+export const addUser = useDefineApi<
+ {
+ data: {
+ username: string;
+ password: string;
+ permission: number;
+ };
+ },
+ boolean
+>({
+ url: "/api/auth",
+ method: "POST"
+});
+
// 获取总览
// 获取设置信息
diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.ts
index f09c9d8a..4ce3e245 100644
--- a/frontend/src/types/index.ts
+++ b/frontend/src/types/index.ts
@@ -1,3 +1,4 @@
+/* eslint-disable no-unused-vars */
import type { IGlobalInstanceConfig } from "./../../../common/global";
import type { LayoutCardHeight } from "@/config/originLayoutConfig";
@@ -85,3 +86,15 @@ export interface Settings {
quickInstallAddr: string;
redisUrl: string;
}
+
+export interface UserInfo {
+ uuid: string;
+ userName: string;
+ registerTime: string;
+ permission: number;
+ passWordType: number;
+ loginTime: string;
+ isInit: boolean;
+ instances: any[];
+ apiKey: string;
+}
diff --git a/frontend/src/widgets/UserList.vue b/frontend/src/widgets/UserList.vue
index d6df2de1..be6718b1 100644
--- a/frontend/src/widgets/UserList.vue
+++ b/frontend/src/widgets/UserList.vue
@@ -1,103 +1,80 @@
+
+
+
+
{{ t("用户名") }}
+
+
+ {{ t("必填,6 到 12 个字符,支持中文,英文和字符") }}
+
+
+
+
+
+
+
{{ t("用户密码") }}
+
+
+ {{ t("必填,9 到 36 个字符,必须包含大小写字母和数字") }}
+
+
+
+
+
+
+
{{ t("权限") }}
+
+
+ {{ t("普通权限适用于商业用户,最高权限适用于管理人员") }}
+
+
+
+
+ {{ item.lable }}
+
+
+
+
+
+
{{ t("注意事项") }}
+
+
+ {{
+ t(
+ "若您从事出租商业活动,请务必保证应用实例运行在 Linux 的 Docker 虚拟容器中,否则将有安全隐患。"
+ )
+ }}
+
+ 具体信息参考
+
+
+
+
+
+
@@ -129,20 +276,29 @@ const rowSelection = () => {};
- 新增用户
- 删除用户
- 封禁用户
+
+ {{ t("新增用户") }}
+
+
+ {{ t("删除用户") }}
+
+
- 用户操作
+ {{ t("用户操作") }}