| | |
| | | import type { InspectPlanVO } from './model'; |
| | | |
| | | import type { ID, IDS } from '#/api/common'; |
| | | |
| | | import { commonExport } from '#/api/helper'; |
| | | import { commonExport, ContentTypeEnum } from '#/api/helper'; |
| | | import { requestClient } from '#/api/request'; |
| | | |
| | | enum Api { |
| | | inspectPlanExport = '/eims/inspectPlan/export', |
| | | inspectPlanList = '/eims/inspectPlan/list', |
| | | root = '/eims/inspectPlan' |
| | | root = '/eims/inspectPlan', |
| | | inspectPlanImport = '/eims/inspectPlan/importData', |
| | | inspectPlanImportTemplate = '/eims/inspectPlan/importTemplate' |
| | | } |
| | | |
| | | /** |
| | |
| | | export function inspPlanExport(data: any) { |
| | | return commonExport(Api.inspectPlanExport, data); |
| | | } |
| | | |
| | | /** |
| | | * 下载点检计划导入模板 |
| | | */ |
| | | export function downloadImportTemplate() { |
| | | return commonExport(Api.inspectPlanImportTemplate); |
| | | } |
| | | |
| | | /** |
| | | * 从excel导入点检计划数据 |
| | | * @param data |
| | | * @returns void |
| | | */ |
| | | export function inspPlanImportData(data: any) { |
| | | return requestClient.post<{ code: number; msg: string }>(Api.inspectPlanImport, data, { |
| | | headers: { |
| | | 'Content-Type': ContentTypeEnum.FORM_DATA |
| | | }, |
| | | isTransformResponse: false |
| | | }); |
| | | } |