import request from '@/utils/request.js'

// 新增车辆基础信息
export function add(data) {
    return request({
        url: '/system/system/vehicle/add',
        method: 'POST',
        data: data
    })
}


// 修改垃圾转运站
export function update(data) {
    return request({
        url: '/system/system/vehicle/update',
        method: 'POST',
        data: data
    })
}

// 取车辆基础信息详细信息
export function getDetail(query) {
    return request({
        url: '/system/system/vehicle/detail',
        method: 'get',
        params: query
    })
}

// 车辆基础信息详细信息
export function queryVehicleBind(query) {
    return request({
        url: '/system/system/vehicle/queryVehicleBind',
        method: 'get',
        params: query
    })
}

// 查询车辆基础信息分页列表
export function getList(query) {
    return request({
        url: '/system/system/vehicle/list',
        method: 'post',
        data: query
    })
}

// 批量删除车辆基础信息
export function remove(data) {
    return request({
        url: '/system/system/vehicle/remove',
        method: 'post',
        data: data
    })
}

// 车辆作业类型下拉列表(全部)
export function dropDownList(query) {
    return request({
        url: '/system/vehicle/common/workType/dropDown/list',
        method: 'get',
        params: query
    })
}

// 车辆类型下拉列表
export function veDropDown(data) {
    return request({
        url: '/system/vehicle/common/dropDown',
        method: 'POST',
        data: data
    })
}


// 部门车辆组件树
export function deptVehTree(query) {
  return request({
      url: '/system/vehicle/common/deptVehTree',
      method: 'get',
      params: query
  })
}


// 获取车辆报警信息详细信息
export function vehicleAlarmDetail(query) {
  return request({
      url: '/system/system/vehicleAlarm/detail',
      method: 'get',
      params: query
  })
}


// 修改车辆报警信息
export function vehicleAlarmUpdate(data) {
  return request({
      url: '/system/system/vehicleAlarm/update',
      method: 'POST',
      data: data
  })
}

// 车辆作业规则详情
export function getRulesDetails(data) {
    return request({
        url: '/system/vehWork/rules/details',
        method: 'POST',
        data: data
    })
}
// 设置车辆作业规则
export function rulesSet(data) {
    return request({
        url: '/system/vehWork/rules/rulesSet',
        method: 'POST',
        data: data
    })
}

// 批量设置车辆作业规则
export function rulesAllSet(data) {
    return request({
        url: '/system/vehWork/rules/rulesAllSet',
        method: 'POST',
        data: data
    })
}

// 批量修改车辆基础信息
export function batchUpdate(data) {
    return request({
        url: '/system/system/vehicle/batchUpdate',
        method: 'POST',
        data: data
    })
}

// 查询所有车辆信息
export function getAllVeh(data) {
    return request({
        url: '/system/system/vehicle/getAllVeh',
        method: 'POST',
        data: data
    })
}

