新增数据,开始安全巡检模块
This commit is contained in:
63
src/api/system/InspectionPlan/index.ts
Normal file
63
src/api/system/InspectionPlan/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { PlanVO, PlanForm, PlanQuery } from '@/api/system/InspectionPlan/type';
|
||||
|
||||
/**
|
||||
* 查询巡检计划列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listPlan = (query?: PlanQuery): AxiosPromise<PlanVO[]> => {
|
||||
return request({
|
||||
url: '/inspection/plan/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询巡检计划详细
|
||||
* @param id
|
||||
*/
|
||||
export const getPlan = (id: string | number): AxiosPromise<PlanVO> => {
|
||||
return request({
|
||||
url: '/inspection/plan/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增巡检计划
|
||||
* @param data
|
||||
*/
|
||||
export const addPlan = (data: PlanForm) => {
|
||||
return request({
|
||||
url: '/inspection/plan',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改巡检计划
|
||||
* @param data
|
||||
*/
|
||||
export const updatePlan = (data: PlanForm) => {
|
||||
return request({
|
||||
url: '/inspection/plan',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除巡检计划
|
||||
* @param id
|
||||
*/
|
||||
export const delPlan = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/inspection/plan/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user