import request from '@/utils/request'

// 设备设施列表
export function deviceList(params) {
  return request({
    url: `/doubledefense/device/list`,
    method: "get",
    params
  });
}
// 设备设施详情
export function deviceDetail(params) {
  return request({
    url: `/doubledefense/device/${params}`,
    method: "get",
  });
}

// 查询区域树
export function areaTree(params) {
  return request({
    url: `/system/area/tree`,
    method: "get",
    params
  });
}
// PC查询部门树结构接口
export function deptTree(params) {
  return request({
    url: `/system/user/deptTree `,
    method: "get",
    params
  });
}

// 新增设备设施
export function saveDevice(data) {
  return request({
    url: `/doubledefense/device`,
    method: "post",
    data
  });
}

// 修改设备设施
export function editDevice(data) {
  return request({
    url: `/doubledefense/device`,
    method: "put",
    data
  });
}

// 删除
export function delDevice(data) {
  return request({
    url: `/doubledefense/device/${data}`,
    method: "delete",
  });
}
// 上传
export function upload(data) {
  return request({
    url: `/common/upload`,
    method: "post",
    data
  });
}