chore: remove large file and update .gitignore
This commit is contained in:
63
src/api/safety/violationLevel/index.ts
Normal file
63
src/api/safety/violationLevel/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ViolationLevelVO, ViolationLevelForm, ViolationLevelQuery } from '@/api/safety/violationLevel/types';
|
||||
|
||||
/**
|
||||
* 查询违章等级列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listViolationLevel = (query?: ViolationLevelQuery): AxiosPromise<ViolationLevelVO[]> => {
|
||||
return request({
|
||||
url: '/safety/violationLevel/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询违章等级详细
|
||||
* @param id
|
||||
*/
|
||||
export const getViolationLevel = (id: string | number): AxiosPromise<ViolationLevelVO> => {
|
||||
return request({
|
||||
url: '/safety/violationLevel/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增违章等级
|
||||
* @param data
|
||||
*/
|
||||
export const addViolationLevel = (data: ViolationLevelForm) => {
|
||||
return request({
|
||||
url: '/safety/violationLevel',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改违章等级
|
||||
* @param data
|
||||
*/
|
||||
export const updateViolationLevel = (data: ViolationLevelForm) => {
|
||||
return request({
|
||||
url: '/safety/violationLevel',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除违章等级
|
||||
* @param id
|
||||
*/
|
||||
export const delViolationLevel = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/safety/violationLevel/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user