Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled
44 lines
1.2 KiB
TypeScript
44 lines
1.2 KiB
TypeScript
import { request } from '@umijs/max';
|
|
import { downLoadXlsx } from '@/utils/downloadfile';
|
|
|
|
export async function getCmsIndustryList(params?: API.ClassifyIndustry.Params) {
|
|
return request<API.ClassifyIndustry.IndustryResult>(`/api/cms/industry/list`, {
|
|
method: 'GET',
|
|
params: params,
|
|
});
|
|
}
|
|
|
|
export async function delCmsIndustryList(industryId?: string) {
|
|
return request<API.ClassifyIndustry.IndustryResult>(`/api/cms/industry/${industryId}`, {
|
|
method: 'DELETE',
|
|
});
|
|
}
|
|
|
|
export async function getCmsIndustryTreeList() {
|
|
return request(`/api/cms/industry/treeselect`, {
|
|
method: 'GET',
|
|
});
|
|
}
|
|
|
|
export async function addCmsIndustryIndustryt(params?: API.ClassifyIndustry.Params) {
|
|
return request<API.ClassifyIndustry.IndustryTreeResult>(`/api/cms/industry`, {
|
|
method: 'POST',
|
|
data: params,
|
|
});
|
|
}
|
|
|
|
export async function updateCmsIndustryIndustryt(params?: API.ClassifyIndustry.Params) {
|
|
return request<API.ClassifyIndustry.IndustryTreeResult>(`/api/cms/industry`, {
|
|
method: 'PUT',
|
|
data: params,
|
|
});
|
|
}
|
|
|
|
export async function exportCmsIndustry(params?: API.ClassifyIndustry.Params) {
|
|
return downLoadXlsx(
|
|
`/api/cms/industry/export`,
|
|
{ params },
|
|
`dict_data_${new Date().getTime()}.xlsx`,
|
|
);
|
|
}
|