gaoluyang
2 天以前 6164c340e703d4a52227a2b6df5b22bdad112245
src/api/system/post/index.ts
@@ -13,6 +13,13 @@
    remark: string;
    createTime?: Date;
  }
  /** 岗位导入结果 */
  export interface PostImportRespVO {
    createPostNames?: string[]; // 新增成功的岗位名
    updatePostNames?: string[]; // 更新成功的岗位名
    failurePostNames?: Record<string, string>; // 导入失败的岗位名及原因
  }
}
/** 查询岗位列表 */
@@ -69,8 +76,11 @@
/** 导入岗位 */
export function importPost(file: File, updateSupport: boolean) {
  return requestClient.upload('/system/post/import', {
    file,
    updateSupport,
  });
  return requestClient.upload<SystemPostApi.PostImportRespVO>(
    '/system/post/import',
    {
      file,
      updateSupport,
    },
  );
}