From a241b66efcc41e973290a6722fb7a4d79b833ea1 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期二, 13 十月 2026 09:54:32 +0800
Subject: [PATCH] feat(bi): 为图表配置接口添加名称字段

---
 src/api/system/user/index.ts |   27 ++++++++++++++++++++++-----
 1 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts
index 431397c..7491b84 100644
--- a/src/api/system/user/index.ts
+++ b/src/api/system/user/index.ts
@@ -1,4 +1,4 @@
-import type { PageParam, PageResult } from '../../../packages/effects/request/src';
+import type { PageParam, PageResult } from '@vben/request';
 
 import { requestClient } from '#/api/request';
 
@@ -25,6 +25,13 @@
   /** 鐢ㄦ埛绮剧畝淇℃伅 */
   export interface UserSimple extends User {
     id: number;
+  }
+
+  /** 鐢ㄦ埛瀵煎叆缁撴灉 */
+  export interface UserImportRespVO {
+    createUsernames?: string[]; // 鏂板鎴愬姛鐨勭敤鎴峰悕
+    updateUsernames?: string[]; // 鏇存柊鎴愬姛鐨勭敤鎴峰悕
+    failureUsernames?: Record<string, string>; // 瀵煎叆澶辫触鐨勭敤鎴峰悕鍙婂師鍥�
   }
 }
 
@@ -80,10 +87,13 @@
 
 /** 瀵煎叆鐢ㄦ埛 */
 export function importUser(file: File, updateSupport: boolean) {
-  return requestClient.upload('/system/user/import', {
-    file,
-    updateSupport,
-  });
+  return requestClient.upload<SystemUserApi.UserImportRespVO>(
+    '/system/user/import',
+    {
+      file,
+      updateSupport,
+    },
+  );
 }
 
 /** 鐢ㄦ埛瀵嗙爜閲嶇疆 */
@@ -114,3 +124,10 @@
     params: { nickname },
   });
 }
+
+/** 閫氳繃瑙掕壊鏍囪瘑鑾峰彇鐢ㄦ埛绮剧畝淇℃伅鍒楄〃 */
+export function getSimpleUserListByRoleCode(code: Object) {
+  return requestClient.get<SystemUserApi.UserSimple[]>('/system/user/list-by-role-code', {
+    params:  code ,
+  });
+}

--
Gitblit v1.9.3