From dba26f8ace63fd778c251e3cc42e516cdd29e908 Mon Sep 17 00:00:00 2001
From: AaronWu <2463371514@qq.com>
Date: Wed, 16 Apr 2025 17:24:35 +0800
Subject: [PATCH] =?UTF-8?q?feat:=200416=E4=BC=9A=E8=AE=AE=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD=E7=82=B9=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 2 +-
.env.production | 2 +-
src/api/issue/model.d.ts | 2 +
src/api/user/index.ts | 22 ++
src/api/user/model.d.ts | 1 +
src/assets/icons/audit.svg | 1 +
src/layout/header/index.vue | 6 +-
src/locales/lang/en-US/layout.ts | 1 +
src/locales/lang/en-US/routes/account.ts | 1 +
src/locales/lang/zh-CN/layout.ts | 1 +
src/locales/lang/zh-CN/routes/account.ts | 1 +
src/plugins/antd.ts | 2 +-
src/router/constant.ts | 9 +-
src/router/index.ts | 2 +-
src/router/router-guards.ts | 2 +-
src/store/modules/user.ts | 1 +
src/views/client/entrance/index.vue | 81 +++++--
src/views/client/issue/columns.tsx | 165 +++++++++++++
src/views/client/issue/data.ts | 32 +++
src/views/client/issue/formSchemas.tsx | 294 +++++++++++++++++++++++
src/views/client/issue/index.vue | 21 +-
src/views/dashboard/welcome/index.vue | 5 +-
src/views/login/index.vue | 25 +-
src/views/question/issue/columns.tsx | 1 +
src/views/question/issue/formSchemas.tsx | 22 +-
src/views/question/knowledge/columns.tsx | 2 +-
src/views/system/admin/columns.tsx | 73 +++---
src/views/system/user/columns.tsx | 37 +--
src/views/system/user/index.vue | 19 +-
29 files changed, 715 insertions(+), 118 deletions(-)
create mode 100644 src/assets/icons/audit.svg
create mode 100644 src/views/client/issue/columns.tsx
create mode 100644 src/views/client/issue/data.ts
create mode 100644 src/views/client/issue/formSchemas.tsx
diff --git a/.env.development b/.env.development
index 4e32643..1f0b776 100644
--- a/.env.development
+++ b/.env.development
@@ -10,7 +10,7 @@
# 网站前缀
VITE_BASE_API_URL = http://192.168.2.92:8089/server/
-# VITE_BASE_API_URL = http://43.137.2.78:8082/server/
+# VITE_BASE_API_URL = http://43.137.2.78:8085/server/
# base api
VITE_BASE_API = '/server/'
diff --git a/.env.production b/.env.production
index 0c9e272..da5a0b1 100644
--- a/.env.production
+++ b/.env.production
@@ -9,7 +9,7 @@
# 只在生产模式中被载入
# 网站前缀
-VITE_BASE_API_URL = http://43.137.2.78:8082/server/
+VITE_BASE_API_URL = http://43.137.2.78:8085/server/
# base api
VITE_BASE_API = '/server/'
diff --git a/src/api/issue/model.d.ts b/src/api/issue/model.d.ts
index 8b5807f..dddf202 100644
--- a/src/api/issue/model.d.ts
+++ b/src/api/issue/model.d.ts
@@ -26,6 +26,7 @@ declare namespace API {
fileList?: any[]; // 附件列表
tags?: string[] | string; // 标签
solution?: string; // 解决方案
+ zentaoNos?: string; // 关联的禅道工单号
};
type CreateIssueParams = {
@@ -51,6 +52,7 @@ declare namespace API {
fileList?: any[]; // 附件列表
tags?: string[] | string; // 标签
solution?: string; // 解决方案
+ zentaoNos?: string; // 关联的禅道工单号
};
type DeleteIssueParams = {
diff --git a/src/api/user/index.ts b/src/api/user/index.ts
index d019c26..aa43a40 100644
--- a/src/api/user/index.ts
+++ b/src/api/user/index.ts
@@ -81,6 +81,28 @@ export function updateState(params: { id: string; state: number }) {
});
}
+/**
+ * @description 修改审核状态
+ */
+export function updateAuditState(params: { id: string; auditState: number }) {
+ return request({
+ url: `user/updateAuditState`,
+ method: 'get',
+ params,
+ });
+}
+
+/**
+ * @description 修改是否是管理员
+ */
+export function updateAdminState(params: { id: string; adminState: number }) {
+ return request({
+ url: `user/updateAdminState`,
+ method: 'get',
+ params,
+ });
+}
+
/**
* @description 查询单条
*/
diff --git a/src/api/user/model.d.ts b/src/api/user/model.d.ts
index 1840ca4..0267247 100644
--- a/src/api/user/model.d.ts
+++ b/src/api/user/model.d.ts
@@ -20,6 +20,7 @@ declare namespace API {
createTime: string;
isAdmin: number;
email: string;
+ auditState?: number;
pendingStatus?: boolean;
};
diff --git a/src/assets/icons/audit.svg b/src/assets/icons/audit.svg
new file mode 100644
index 0000000..76e70d1
--- /dev/null
+++ b/src/assets/icons/audit.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/layout/header/index.vue b/src/layout/header/index.vue
index 86abc5c..028521b 100644
--- a/src/layout/header/index.vue
+++ b/src/layout/header/index.vue
@@ -2,7 +2,7 @@