import request from '@/utils/request'

/*****************************化学品信息页面*****************************/
/*
export function hxpChemicalList(query) {
  return request({
    url: '/chemical/hxpChemical/list',
    method: 'get',
    params: query
  })
}

export function addHxpChemical(data) {
  return request({
    url: '/chemical/hxpChemical',
    method: 'post',
    data: data
  })
}

export function putHxpChemical(data) {
  return request({
    url: '/chemical/hxpChemical',
    method: 'put',
    data: data
  })
}

export function delHxpChemicalInfo(id) {
  return request({
    url: '/chemical//hxpChemical/'+id,
    method: 'delete',
  })
}
*/
//获取校区/楼栋/楼层数据
export function getTreeList(query) {
  return request({
    url: '/laboratory/buildFloor/getTreeList',
    method: 'get',
    params: query
  })
}
//新增校区/楼栋/楼层数据
export function addBuildFloor(data) {
  return request({
    url: '/laboratory/buildFloor',
    method: 'post',
    data: data
  })
}
//编辑校区/楼栋/楼层数据
export function putBuildFloor(data) {
  return request({
    url: '/laboratory/buildFloor',
    method: 'put',
    data: data
  })
}
//删除校区/楼栋/楼层数据
export function delBuildFloor(data) {
  return request({
    url: '/laboratory/buildFloor/'+data,
    method: 'delete',
  })
}
//获取校区/楼栋/楼层详情数据
export function getTreeSonList(query) {
  return request({
    url: '/laboratory/buildFloor/getTreeSonList',
    method: 'get',
    params: query
  })
}
//拖动调整楼栋/楼层排序
export function editSortNum(data) {
  return request({
    url: '/laboratory/buildFloor/editSortNum',
    method: 'put',
    data: data
  })
}
//楼层实验室列表查询
export function buildFloorLayoutList(query) {
  return request({
    url: '/laboratory/buildFloorLayout/list',
    method: 'get',
    params: query
  })
}
//查询房间关联实验室详情
export function getBuildFloorLayout(id) {
  return request({
    url: '/laboratory/buildFloorLayout/'+id,
    method: 'get',
  })
}
//修改房间关联实验室详情
export function putBuildFloorLayout(data) {
  return request({
    url: '/laboratory/buildFloorLayout',
    method: 'put',
    data: data
  })
}
//根据名称查询实验室
export function subjectList(data) {
  return request({
    url: '/laboratory/subject/list/listAdminByLayout',
    method: 'post',
    data: data
  })
}
//根据名称查询实验室
export function lineVertex(data) {
  return request({
    url: '/laboratory/lineVertex',
    method: 'post',
    data: data
  })
}
//获取预案详情
export function selectRiskPlanLeveList(data) {
  return request({
    url: '/zd-laboratory/plan/lists/',
    method: 'post',
    data: data
  })
}
//获取预案详情
export function setPlanData(data) {
  return request({
    url: '/zd-laboratory/plan',
    method: 'post',
    data: data
  })
}
//新增预案(名称)
export function addPlan(data) {
  return request({
    url: '/zd-laboratory/plan/add',
    method: 'post',
    data:data
  })
}
//修改预案(名称)
export function putPlan(data) {
  return request({
    url: '/zd-laboratory/plan/update',
    method: 'put',
    data:data
  })
}

//删除预案
export function delPlanData(data) {
  return request({
    url: '/zd-laboratory/plan/delete/'+data,
    method: 'delete',
  })
}

//根据ID查询分级列表
export function selectRiskPlanLeveListRiskPlanId(id) {
  return request({
    url: '/zd-laboratory/planLevel/selectRiskPlanLeveList/'+id,
    method: 'get',
  })
}
//新增预案分级数据
export function planLevelAdd(data) {
  return request({
    url: '/zd-laboratory/planLevel/add',
    method: 'post',
    data:data
  })
}
//编辑预案分级数据
export function planLevelPut(data) {
  return request({
    url: '/zd-laboratory/planLevel/update',
    method: 'put',
    data:data
  })
}
//编辑预案分级数据
export function planLevelDel(data) {
  return request({
    url: '/zd-laboratory/planLevel/delete/',
    method: 'delete',
    data:data
  })
}

//获取关联预案实验室列表
export function getLabRiskPlanJoinSub(data) {
  return request({
    url: '/zd-laboratory/plan/getLabRiskPlanJoinSub',
    method: 'post',
    data: data
  })
}
//获取非关联预案实验室列表
export function getLabRiskPlanNoJoinSub(data) {
  return request({
    url: '/zd-laboratory/plan/getLabRiskPlanNoJoinSub',
    method: 'post',
    data: data
  })
}
//删除关联实验室
export function deleteRiskPlanJoinSub(data) {
  return request({
    url: '/zd-laboratory/plan/deleteRiskPlanJoinSub',
    method: 'delete',
    data: data
  })
}
//新增关联实验室
export function riskPlanJoinSub(data) {
  return request({
    url: '/zd-laboratory/plan/riskPlanJoinSub',
    method: 'post',
    data: data
  })
}
//批量关联实验室
export function riskPlanBatchJoinSub(data) {
  return request({
    url: '/zd-laboratory/plan/riskPlanBatchJoinSub',
    method: 'post',
    data: data
  })
}


//疏散设备页面获取楼栋楼层
export function selBuildOrFloorList(query) {
  return request({
    url: 'laboratory/buildFloor/selBuildOrFloorList',
    method: 'get',
    params: query
  })
}
