feat(credit): 添加信用模块数据导入导出功能
- 为行政许可、破产重整、分支机构、历史法定代表人、附近企业、专利、疑似关系模块添加导入功能 - 在工具栏中将导入按钮文本更新为导入(多)以区分单个导入和批量导入 - 为各信用模块表格添加导入弹窗组件和相应的导入导出事件处理 - 实现各信用模块的导出功能,支持按搜索条件导出数据 - 优化表格数据源处理,支持关键词搜索和状态筛选 - 添加链接字段的点击跳转功能,提升用户体验 - 移除冗余的表格列字段,精简表格展示内容
This commit is contained in:
@@ -103,3 +103,27 @@ export async function getCreditAdministrativeLicense(id: number) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入行政许可
|
||||
*/
|
||||
export async function importCreditAdministrativeLicense(file: File, companyId?: number) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
if (companyId != null) {
|
||||
formData.append('companyId', String(companyId));
|
||||
}
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-administrative-license/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user