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/post/index.ts |   25 ++++++++++++++++++++++++-
 1 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/src/api/system/post/index.ts b/src/api/system/post/index.ts
index be8ae7f..ca7c381 100644
--- a/src/api/system/post/index.ts
+++ b/src/api/system/post/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';
 
@@ -12,6 +12,13 @@
     status: number;
     remark: string;
     createTime?: Date;
+  }
+
+  /** 宀椾綅瀵煎叆缁撴灉 */
+  export interface PostImportRespVO {
+    createPostNames?: string[]; // 鏂板鎴愬姛鐨勫矖浣嶅悕
+    updatePostNames?: string[]; // 鏇存柊鎴愬姛鐨勫矖浣嶅悕
+    failurePostNames?: Record<string, string>; // 瀵煎叆澶辫触鐨勫矖浣嶅悕鍙婂師鍥�
   }
 }
 
@@ -61,3 +68,19 @@
     params,
   });
 }
+
+/** 涓嬭浇宀椾綅瀵煎叆妯℃澘 */
+export function importPostTemplate() {
+  return requestClient.download('/system/post/get-import-template');
+}
+
+/** 瀵煎叆宀椾綅 */
+export function importPost(file: File, updateSupport: boolean) {
+  return requestClient.upload<SystemPostApi.PostImportRespVO>(
+    '/system/post/import',
+    {
+      file,
+      updateSupport,
+    },
+  );
+}

--
Gitblit v1.9.3