From f64a46710c98df705484de6552068160a03850a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=82=A5=E7=BE=8A?= <1048382248@qq.com> Date: Tue, 21 Apr 2026 16:46:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E5=B1=8F=E8=94=BD?= =?UTF-8?q?=E5=AD=A6=E7=94=9F=E8=80=81=E5=B8=88=E7=9A=84=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E8=81=8C=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 12 +++++++++--- src/api/userCenter.ts | 2 +- src/views/student/edit.vue | 8 +------- src/views/student/index.vue | 2 +- src/views/teacher/edit.vue | 9 +-------- src/views/teacher/index.vue | 2 +- 6 files changed, 14 insertions(+), 21 deletions(-) diff --git a/.env.development b/.env.development index 8d3955a..429c2db 100644 --- a/.env.development +++ b/.env.development @@ -8,11 +8,17 @@ VITE_PUBLIC_PATH = / VITE_ROUTER_HISTORY = "hash" # 接口地址 -VITE_API_BASEURL = "http://192.168.2.33:5199/api" -#数据中心后台地址 -VITE_API_USERCENTER_URL = "https://dca.w.23544.com:8843/api" +# VITE_API_BASEURL = "http://192.168.2.33:5199/api" +# #数据中心后台地址 +# VITE_API_USERCENTER_URL = "https://dca.w.23544.com:8843/api" # # 接口地址 # VITE_API_BASEURL = "https://learn-archives-admin-dev.23544.com/api" # #数据中心后台地址 # VITE_API_USERCENTER_URL = "https://dca.w.23544.com:8843/api" + + +# 接口地址 +VITE_API_BASEURL = "https://learn-archives-admin.23544.com/api" +#数据中心后台地址 +VITE_API_USERCENTER_URL = "https://dcb.23544.com/api" diff --git a/src/api/userCenter.ts b/src/api/userCenter.ts index 1695c1d..5fa874e 100644 --- a/src/api/userCenter.ts +++ b/src/api/userCenter.ts @@ -204,7 +204,7 @@ export interface Position { subjectName: string; positionType: number; positionLevel: number; - status: boolean; + status: number; classList?: ComboModel[]; } diff --git a/src/views/student/edit.vue b/src/views/student/edit.vue index 09e76e9..7b885f1 100644 --- a/src/views/student/edit.vue +++ b/src/views/student/edit.vue @@ -649,7 +649,7 @@ const fetchFormData = async () => { } let sInfo = await StudentInfo(props.id); positionList.value = res.data.positions - .filter((s: Position) => s.enable) + .filter((s: Position) => s.enable && s.status == 1) .map((s: Position) => { if (s.positionLevel > 2) s.grade = (s.gradeLevel ?? s.grade[0]) + s.graduationYear + "届"; @@ -680,12 +680,6 @@ const fetchFormData = async () => { positionList: positionList.value, ...sInfo.data, }); - positionList.value = res.data.positions - .filter((s: Position) => s.enable) - .map((s: Position) => { - s.grade = (s.gradeLevel ?? s.grade[0]) + s.graduationYear + "届"; - return s; - }); PositionFormIds.value = res.data.positions .filter((s: Position) => s.enable) .map((s: any) => s.id); diff --git a/src/views/student/index.vue b/src/views/student/index.vue index cc75fba..428f6d0 100644 --- a/src/views/student/index.vue +++ b/src/views/student/index.vue @@ -638,7 +638,7 @@ const PositionsSort = (arr: Position[]) => { return 1; } }); - return arr.filter((s) => s.enable); + return arr.filter((s) => s.enable && s.status == 1); }; const handleReloadPaged = (event?: any, searchUnUse?: boolean) => { diff --git a/src/views/teacher/edit.vue b/src/views/teacher/edit.vue index f942ee5..5d52a97 100644 --- a/src/views/teacher/edit.vue +++ b/src/views/teacher/edit.vue @@ -493,7 +493,7 @@ const fetchFormData = () => { } positionList.value = res.data.positions - .filter((s: Position) => s.enable) + .filter((s: Position) => s.enable && s.status == 1) .map((s: Position) => { if (s.positionLevel > 2) s.grade = (s.gradeLevel ?? s.grade[0]) + s.graduationYear + "届"; @@ -522,13 +522,6 @@ const fetchFormData = () => { pointPenSN: res.data.pointPenSN, positionList: positionList.value ?? [], }); - positionList.value = res.data.positions - .filter((s: Position) => s.enable) - .map((s: Position) => { - if (s.positionLevel > 2) - s.grade = (s.gradeLevel ?? s.grade[0]) + s.graduationYear + "届"; - return s; - }); PositionFormIds.value = res.data.positions .filter((s: Position) => s.enable) .map((s: any) => s.id); diff --git a/src/views/teacher/index.vue b/src/views/teacher/index.vue index 73079c7..f8e0807 100644 --- a/src/views/teacher/index.vue +++ b/src/views/teacher/index.vue @@ -618,7 +618,7 @@ const PositionsSort = (arr: Position[]) => { return 1; } }); - return arr.filter((s) => s.enable); + return arr.filter((s) => s.enable && s.status == 1); }; function searchReload() {