萤石摄像头
This commit is contained in:
80
src/api/other/ys7Device/index.ts
Normal file
80
src/api/other/ys7Device/index.ts
Normal file
@ -0,0 +1,80 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { Ys7DeviceVO, Ys7DeviceForm, Ys7DeviceQuery } from '@/api/other/ys7Device/types';
|
||||
|
||||
/**
|
||||
* 查询萤石摄像头列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listYs7Device = (query?: Ys7DeviceQuery): AxiosPromise<Ys7DeviceVO[]> => {
|
||||
return request({
|
||||
url: '/other/ys7Device/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询萤石摄像头详细
|
||||
* @param id
|
||||
*/
|
||||
export const getYs7Device = (id: string | number): AxiosPromise<Ys7DeviceVO> => {
|
||||
return request({
|
||||
url: '/other/ys7Device/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增萤石摄像头
|
||||
* @param data
|
||||
*/
|
||||
export const addYs7Device = (data: Ys7DeviceForm) => {
|
||||
return request({
|
||||
url: '/other/ys7Device',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改萤石摄像头
|
||||
* @param data
|
||||
*/
|
||||
export const updateYs7Device = (data: Ys7DeviceForm) => {
|
||||
return request({
|
||||
url: '/other/ys7Device',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除萤石摄像头
|
||||
* @param id
|
||||
*/
|
||||
export const delYs7Device = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/other/ys7Device/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/// 修改加密状态
|
||||
export const toggleEncrypt = (data?: any): AxiosPromise<{}> => {
|
||||
return request({
|
||||
url: '/other/ys7Device/video/encrypted',
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
export const devicesLinkPro = (data: { id: string | number; projectId: string | number }): AxiosPromise<Ys7DeviceVO> => {
|
||||
return request({
|
||||
url: '/other/ys7Device/with/project',
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
};
|
131
src/api/other/ys7Device/types.ts
Normal file
131
src/api/other/ys7Device/types.ts
Normal file
@ -0,0 +1,131 @@
|
||||
export interface Ys7DeviceVO {
|
||||
id: any;
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 设备序列号
|
||||
*/
|
||||
deviceSerial: string;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
deviceName: string;
|
||||
|
||||
/**
|
||||
* 设备型号
|
||||
*/
|
||||
deviceType: string;
|
||||
|
||||
/**
|
||||
* 设备在线状态(0离线 1在线)
|
||||
*/
|
||||
status: number;
|
||||
|
||||
/**
|
||||
* 固件版本号
|
||||
*/
|
||||
deviceVersion: string;
|
||||
|
||||
/**
|
||||
* 设备添加时间
|
||||
*/
|
||||
deviceCreateTime: string;
|
||||
|
||||
/**
|
||||
* 视频加密(0关闭 1开启)
|
||||
*/
|
||||
videoEncrypted: string | number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface Ys7DeviceForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 设备序列号
|
||||
*/
|
||||
deviceSerial?: string;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
deviceName?: string;
|
||||
|
||||
/**
|
||||
* 设备型号
|
||||
*/
|
||||
deviceType?: string;
|
||||
|
||||
/**
|
||||
* 设备在线状态(0离线 1在线)
|
||||
*/
|
||||
status?: number;
|
||||
|
||||
/**
|
||||
* 固件版本号
|
||||
*/
|
||||
deviceVersion?: string;
|
||||
|
||||
/**
|
||||
* 视频加密(0关闭 1开启)
|
||||
*/
|
||||
videoEncrypted?: string | number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface Ys7DeviceQuery extends PageQuery {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 设备序列号
|
||||
*/
|
||||
deviceSerial?: string;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
deviceName?: string;
|
||||
|
||||
/**
|
||||
* 设备型号
|
||||
*/
|
||||
deviceType?: string;
|
||||
|
||||
/**
|
||||
* 设备在线状态(0离线 1在线)
|
||||
*/
|
||||
status?: number;
|
||||
|
||||
/**
|
||||
* 固件版本号
|
||||
*/
|
||||
deviceVersion?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
Reference in New Issue
Block a user