62 lines
1.6 KiB
TypeScript
62 lines
1.6 KiB
TypeScript
|
import type { ContingenPlanVO, ContingenPlanForm, ContingenPlanQuery } from './model';
|
||
|
|
||
|
import type { ID, IDS } from '#/api/common';
|
||
|
import type { PageResult } from '#/api/common';
|
||
|
|
||
|
import { commonExport } from '#/api/helper';
|
||
|
import { requestClient } from '#/api/request';
|
||
|
|
||
|
/**
|
||
|
* 查询应急预案管理列表
|
||
|
* @param params
|
||
|
* @returns 应急预案管理列表
|
||
|
*/
|
||
|
export function contingenPlanList(params?: ContingenPlanQuery) {
|
||
|
return requestClient.get<PageResult<ContingenPlanVO>>('/property/contingenPlan/list', { params });
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 导出应急预案管理列表
|
||
|
* @param params
|
||
|
* @returns 应急预案管理列表
|
||
|
*/
|
||
|
export function contingenPlanExport(params?: ContingenPlanQuery) {
|
||
|
return commonExport('/property/contingenPlan/export', params ?? {});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 查询应急预案管理详情
|
||
|
* @param id id
|
||
|
* @returns 应急预案管理详情
|
||
|
*/
|
||
|
export function contingenPlanInfo(id: ID) {
|
||
|
return requestClient.get<ContingenPlanVO>(`/property/contingenPlan/${id}`);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 新增应急预案管理
|
||
|
* @param data
|
||
|
* @returns void
|
||
|
*/
|
||
|
export function contingenPlanAdd(data: ContingenPlanForm) {
|
||
|
return requestClient.postWithMsg<void>('/property/contingenPlan', data);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 更新应急预案管理
|
||
|
* @param data
|
||
|
* @returns void
|
||
|
*/
|
||
|
export function contingenPlanUpdate(data: ContingenPlanForm) {
|
||
|
return requestClient.putWithMsg<void>('/property/contingenPlan', data);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 删除应急预案管理
|
||
|
* @param id id
|
||
|
* @returns void
|
||
|
*/
|
||
|
export function contingenPlanRemove(id: ID | IDS) {
|
||
|
return requestClient.deleteWithMsg<void>(`/property/contingenPlan/${id}`);
|
||
|
}
|