From 7ad9c3c93f0cc103347ae2e2429e0122fb512e24 Mon Sep 17 00:00:00 2001
From: lrj <owen.stl@gmail.com>
Date: 星期三, 01 十月 2025 21:26:12 +0800
Subject: [PATCH] feat: 修复员工管理功能并优化UI

---
 web/src/api/region.js |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/web/src/api/region.js b/web/src/api/region.js
index 87cbcdf..d78274b 100644
--- a/web/src/api/region.js
+++ b/web/src/api/region.js
@@ -17,8 +17,8 @@
   `
   
   try {
-    const data = await graphqlRequest(query)
-    return data.regions || []
+    const result = await graphqlRequest(query)
+    return result.data.regions || []
   } catch (error) {
     throw new Error(error.message || '鑾峰彇鍦板尯鍒楄〃澶辫触')
   }
@@ -39,8 +39,8 @@
   `
   
   try {
-    const data = await graphqlRequest(query, { id })
-    return data.region
+    const result = await graphqlRequest(query, { id })
+    return result.data.region
   } catch (error) {
     throw new Error(error.message || '鑾峰彇鍦板尯璇︽儏澶辫触')
   }
@@ -98,8 +98,8 @@
   `
   
   try {
-    const data = await graphqlRequest(query)
-    return data.provinces || []
+    const result = await graphqlRequest(query)
+    return result.data.provinces || []
   } catch (error) {
     throw new Error(error.message || '鑾峰彇鐪佷唤鍒楄〃澶辫触')
   }
@@ -119,8 +119,8 @@
   `
   
   try {
-    const data = await graphqlRequest(query, { provinceId })
-    return data.cities || []
+    const result = await graphqlRequest(query, { provinceId })
+    return result.data.cities || []
   } catch (error) {
     throw new Error(error.message || '鑾峰彇鍩庡競鍒楄〃澶辫触')
   }
@@ -140,8 +140,8 @@
   `
   
   try {
-    const data = await graphqlRequest(query, { cityId })
-    return data.districts || []
+    const result = await graphqlRequest(query, { cityId })
+    return result.data.districts || []
   } catch (error) {
     throw new Error(error.message || '鑾峰彇鍖哄幙鍒楄〃澶辫触')
   }

--
Gitblit v1.8.0