rt-sim-training-client/src/api/project.js
2020-07-20 16:00:27 +08:00

170 lines
4.0 KiB
JavaScript

import request from '@/utils/request';
/** 新建项目设备*/
export function createDevice(data) {
return request({
url: `/api/device`,
method: 'post',
data: data
});
}
/** 项目设备编码是否已存在 */
export function deviceIsExist(code) {
return request({
url: `/api/device/exist/${code}`,
method: 'get'
});
}
/** 分页查询项目设备n */
export function getProjectDeviceList(params) {
return request({
url: `/api/device/paging`,
method: 'get',
params:params
});
}
// export function getProjectDeviceList(params) {
// return request({
// url: `/api/device/paging`,
// method: 'get',
// params:params
// });
// }
/** 删除项目设备 */
export function deleteProjectDevice(id) {
return request({
url: `/api/device/${id}`,
method: 'delete'
});
}
/** 获取设备详情 */
export function getDeviceDetail(id) {
return request({
url: `/api/device/${id}`,
method: 'get'
});
}
/** 添加/修改屏蔽门设备网关映射配置 */
export function setPsdConfig(id, data) {
return request({
url: `/api/device/${id}/config/psd`,
method: 'put',
data: data
});
}
/** 添加/修改信号机设备网关映射配置 */
export function setSignalConfig(id, data) {
return request({
url: `/api/device/${id}/config/signal`,
method: 'put',
data: data
});
}
/** 添加/修改信号机设备网关映射配置 */
export function setSwitchConfig(id, data) {
return request({
url: `/api/device/${id}/config/switch`,
method: 'put',
data: data
});
}
/** 添加/修改端头控制盒网关映射配置 */
export function setPslConfig(id, data) {
return request({
url: `/api/device/${id}/config/psl`,
method: 'put',
data: data
});
}
/** 添加/修改ibp盘网关映射配置 */
export function setIbpConfig(id, data) {
return request({
url: `/api/device/${id}/config/ibp`,
method: 'put',
data: data
});
}
/** 添加/修改psc控制柜网关映射配置 */
export function setPscConfig(id, data) {
return request({
url: `/api/device/${id}/config/psc`,
method: 'put',
data: data
});
}
/** 查询项目下的所有设备 */
export function getAllDeviceInProject(params) {
return request({
url: `/api/project/device/project`,
method: 'get',
params
});
}
/** 添加/修改ibp设备配置 */
export function setVrIbpConfig(id, data) {
return request({
url: `/api/device/${id}/config/vribp`,
method: 'put',
data: data
});
}
/** 添加/修改现地工作站配置 */
export function setLwConfig(id, data) {
return request({
url: `/api/device/${id}/config/lw`,
method: 'put',
data: data
});
}
/** 查询所有的某类型设备 */
export function getDevicesByType(type) {
return request({
url: `/api/device/${type}/all`,
method: 'get'
});
}
/** 添加/修改车站综合监控配置 */
export function setIscsLwConfig(id, data) {
return request({
url: `/api/device/${id}/config/iscslw`,
method: 'put',
data: data
});
}
/** 添加/修改中心综合监控配置 */
export function setIscsCwConfig(id, data) {
return request({
url: `/api/device/${id}/config/iscscw`,
method: 'put',
data: data
});
}
/** 添加/修改大屏工作站配置 */
export function setLswConfig(id, data) {
return request({
url: `/api/device/${id}/config/lsw`,
method: 'put',
data: data
});
}
/** 添加/修改CCTV工作站配置 */
export function setCctvConfig(id, data) {
return request({
url: `/api/device/${id}/config/cctv`,
method: 'put',
data: data
});
}
/** 添加/修改CCTV工作站配置 */
export function setVrPsdConfig(id, data) {
return request({
url: `/api/device/${id}/config/vrpsd`,
method: 'put',
data: data
});
}