完成水电表列表
This commit is contained in:
63
src/api/system/InspectionPoint/index.ts
Normal file
63
src/api/system/InspectionPoint/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { PointVO, PointForm, PointQuery } from '@/api/system/InspectionPoint/type';
|
||||
|
||||
/**
|
||||
* 查询巡检点列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listPoint = (query?: PointQuery): AxiosPromise<PointVO[]> => {
|
||||
return request({
|
||||
url: '/inspection/point/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询巡检点详细
|
||||
* @param id
|
||||
*/
|
||||
export const getPoint = (id: string | number): AxiosPromise<PointVO> => {
|
||||
return request({
|
||||
url: '/inspection/point/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增巡检点
|
||||
* @param data
|
||||
*/
|
||||
export const addPoint = (data: PointForm) => {
|
||||
return request({
|
||||
url: '/inspection/point',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改巡检点
|
||||
* @param data
|
||||
*/
|
||||
export const updatePoint = (data: PointForm) => {
|
||||
return request({
|
||||
url: '/inspection/point',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除巡检点
|
||||
* @param id
|
||||
*/
|
||||
export const delPoint = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/inspection/point/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
150
src/api/system/InspectionPoint/type.ts
Normal file
150
src/api/system/InspectionPoint/type.ts
Normal file
@@ -0,0 +1,150 @@
|
||||
export interface PointVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 巡检点名称
|
||||
*/
|
||||
pointName: string;
|
||||
|
||||
/**
|
||||
* 巡检项目id
|
||||
*/
|
||||
itemId: string | number;
|
||||
|
||||
/**
|
||||
* 所属路线ID
|
||||
*/
|
||||
routeId: string | number;
|
||||
|
||||
/**
|
||||
* 巡检点位置(经纬度),格式:经度,纬度
|
||||
*/
|
||||
location: string;
|
||||
|
||||
/**
|
||||
* 打卡方式:9999定位打卡、9998蓝牙打卡、9997NFC打卡
|
||||
*/
|
||||
checkMode: string;
|
||||
|
||||
/**
|
||||
* 状态:0-开启,1-关闭
|
||||
*/
|
||||
status: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 点位编号
|
||||
*/
|
||||
pointCode: string;
|
||||
|
||||
/**
|
||||
* 是否打卡 0:已打卡 1:未打卡
|
||||
*/
|
||||
isCheck: string;
|
||||
}
|
||||
|
||||
export interface PointForm extends BaseEntity {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 巡检点名称
|
||||
*/
|
||||
pointName?: string;
|
||||
|
||||
/**
|
||||
* 巡检项目id
|
||||
*/
|
||||
itemId?: string | number;
|
||||
|
||||
/**
|
||||
* 所属路线ID
|
||||
*/
|
||||
routeId?: string | number;
|
||||
|
||||
/**
|
||||
* 巡检点位置(经纬度),格式:经度,纬度
|
||||
*/
|
||||
location?: string;
|
||||
|
||||
/**
|
||||
* 打卡方式:9999定位打卡、9998蓝牙打卡、9997NFC打卡
|
||||
*/
|
||||
checkMode?: string;
|
||||
|
||||
/**
|
||||
* 状态:0-开启,1-关闭
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 点位编号
|
||||
*/
|
||||
pointCode?: string;
|
||||
|
||||
/**
|
||||
* 是否打卡 0:已打卡 1:未打卡
|
||||
*/
|
||||
isCheck?: string;
|
||||
}
|
||||
|
||||
export interface PointQuery extends PageQuery {
|
||||
/**
|
||||
* 巡检点名称
|
||||
*/
|
||||
pointName?: string;
|
||||
|
||||
/**
|
||||
* 巡检项目id
|
||||
*/
|
||||
itemId?: string | number;
|
||||
|
||||
/**
|
||||
* 所属路线ID
|
||||
*/
|
||||
routeId?: string | number;
|
||||
|
||||
/**
|
||||
* 巡检点位置(经纬度),格式:经度,纬度
|
||||
*/
|
||||
location?: string;
|
||||
|
||||
/**
|
||||
* 打卡方式:9999定位打卡、9998蓝牙打卡、9997NFC打卡
|
||||
*/
|
||||
checkMode?: string;
|
||||
|
||||
/**
|
||||
* 状态:0-开启,1-关闭
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 点位编号
|
||||
*/
|
||||
pointCode?: string;
|
||||
|
||||
/**
|
||||
* 是否打卡 0:已打卡 1:未打卡
|
||||
*/
|
||||
isCheck?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
Reference in New Issue
Block a user