From ba94ceae1315174798ae1967ef62268c6d16cd5b Mon Sep 17 00:00:00 2001
From: Codex Assistant <codex@example.com>
Date: 星期一, 06 十月 2025 22:07:06 +0800
Subject: [PATCH] feat: 评审与活动相关改动 - backend(GraphQL): Activity schema 增加 updateActivityState(id, state);实现 resolver/service 仅更新 state=2 作为逻辑删除 - backend(GraphQL): region.graphqls 新增 Query leafRegions - backend(GraphQL): player.graphqls 的 projectReviewApplications 增加可选参数 regionId - backend(Service): listProjectReviewApplications 绑定 regionId 参数,修复 QueryParameterException - frontend(web): 新增 api/activity.js 的 updateActivityState 并接入 activity-list 删除逻辑 - frontend(web): review-list.vue 权限仅校验登录,移除角色限制;查询参数修正为 name/regionId - frontend(web): 删除未引用的 ActivityList.vue - frontend(web): projectReviewNew.js GraphQL 查询增加 name 参数

---
 web/src/api/employee.ts |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/web/src/api/employee.ts b/web/src/api/employee.ts
index 75c9dac..6cb318e 100644
--- a/web/src/api/employee.ts
+++ b/web/src/api/employee.ts
@@ -19,7 +19,7 @@
     }
   `,
   
-  // 鏍规嵁濮撳悕鎼滅储鍛樺伐
+  // 鎼滅储鍛樺伐
   SEARCH_EMPLOYEES: `
     query SearchEmployees($name: String) {
       employeesByName(name: $name) {
@@ -99,18 +99,18 @@
   // 鑾峰彇鍛樺伐鍒楄〃
   async getEmployees(): Promise<Employee[]> {
     try {
-      const data = await graphqlRequest(EMPLOYEE_QUERIES.GET_EMPLOYEES)
-      return data?.employees || []
+      const result = await graphqlRequest(EMPLOYEE_QUERIES.GET_EMPLOYEES)
+      return result?.data?.employees || []
     } catch (error: any) {
       throw new Error(error.message || '鑾峰彇鍛樺伐鍒楄〃澶辫触')
     }
   },
 
   // 鎼滅储鍛樺伐
-  async searchEmployees(keyword: string): Promise<Employee[]> {
+  async searchEmployees(name: string): Promise<Employee[]> {
     try {
-      const data = await graphqlRequest(EMPLOYEE_QUERIES.SEARCH_EMPLOYEES, { keyword })
-      return data?.searchEmployees || []
+      const result = await graphqlRequest(EMPLOYEE_QUERIES.SEARCH_EMPLOYEES, { name })
+      return result?.data?.employeesByName || []
     } catch (error: any) {
       throw new Error(error.message || '鎼滅储鍛樺伐澶辫触')
     }
@@ -119,8 +119,8 @@
   // 鏍规嵁ID鑾峰彇鍛樺伐璇︽儏
   async getEmployee(id: string): Promise<Employee | null> {
     try {
-      const data = await graphqlRequest(EMPLOYEE_QUERIES.GET_EMPLOYEE, { id })
-      return data?.employee || null
+      const result = await graphqlRequest(EMPLOYEE_QUERIES.GET_EMPLOYEE, { id })
+      return result?.data?.employee || null
     } catch (error: any) {
       throw new Error(error.message || '鑾峰彇鍛樺伐璇︽儏澶辫触')
     }
@@ -129,8 +129,8 @@
   // 淇濆瓨鍛樺伐锛堟柊澧炴垨鏇存柊锛�
   async saveEmployee(employee: EmployeeInput): Promise<Employee> {
     try {
-      const data = await graphqlRequest(EMPLOYEE_MUTATIONS.SAVE_EMPLOYEE, { input: employee })
-      return data?.saveEmployee
+      const result = await graphqlRequest(EMPLOYEE_MUTATIONS.SAVE_EMPLOYEE, { input: employee })
+      return result?.data?.saveEmployee
     } catch (error: any) {
       throw new Error(error.message || '淇濆瓨鍛樺伐澶辫触')
     }
@@ -139,8 +139,8 @@
   // 鍒犻櫎鍛樺伐
   async deleteEmployee(id: string): Promise<boolean> {
     try {
-      const data = await graphqlRequest(EMPLOYEE_MUTATIONS.DELETE_EMPLOYEE, { id })
-      return data?.deleteEmployee || false
+      const result = await graphqlRequest(EMPLOYEE_MUTATIONS.DELETE_EMPLOYEE, { id })
+      return result?.data?.deleteEmployee || false
     } catch (error: any) {
       throw new Error(error.message || '鍒犻櫎鍛樺伐澶辫触')
     }

--
Gitblit v1.8.0