重构进度填报
This commit is contained in:
63
src/api/drone/droneConfig/index.ts
Normal file
63
src/api/drone/droneConfig/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DroneConfigVO, DroneConfigForm, DroneConfigQuery } from '@/api/drone/droneConfig/types';
|
||||
|
||||
/**
|
||||
* 查询无人机配置列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listDroneConfig = (query?: DroneConfigQuery): AxiosPromise<DroneConfigVO[]> => {
|
||||
return request({
|
||||
url: '/drone/droneConfig/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询无人机配置详细
|
||||
* @param id
|
||||
*/
|
||||
export const getDroneConfig = (id: string | number): AxiosPromise<DroneConfigVO> => {
|
||||
return request({
|
||||
url: '/drone/droneConfig/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增无人机配置
|
||||
* @param data
|
||||
*/
|
||||
export const addDroneConfig = (data: DroneConfigForm) => {
|
||||
return request({
|
||||
url: '/drone/droneConfig',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改无人机配置
|
||||
* @param data
|
||||
*/
|
||||
export const updateDroneConfig = (data: DroneConfigForm) => {
|
||||
return request({
|
||||
url: '/drone/droneConfig',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除无人机配置
|
||||
* @param id
|
||||
*/
|
||||
export const delDroneConfig = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/drone/droneConfig/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
80
src/api/drone/droneConfig/types.ts
Normal file
80
src/api/drone/droneConfig/types.ts
Normal file
@ -0,0 +1,80 @@
|
||||
export interface DroneConfigVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 配置名称
|
||||
*/
|
||||
configName: string;
|
||||
|
||||
/**
|
||||
* 配置地址
|
||||
*/
|
||||
configUrl: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface DroneConfigForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 配置名称
|
||||
*/
|
||||
configName?: string;
|
||||
|
||||
/**
|
||||
* 配置地址
|
||||
*/
|
||||
configUrl?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
dockSocketUrl?: string;
|
||||
aiUrl?: string;
|
||||
srsUrl?: string;
|
||||
rtmpPort?: string;
|
||||
rtcPort?: string;
|
||||
}
|
||||
|
||||
export interface DroneConfigQuery extends PageQuery {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 配置名称
|
||||
*/
|
||||
configName?: string;
|
||||
|
||||
/**
|
||||
* 配置地址
|
||||
*/
|
||||
configUrl?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
Reference in New Issue
Block a user