import request from "@/https/request";


export default {
  /**
   * 获取车辆类型的数量
   * @param data
   */
  countType: async (data) => {
    return request('/vehicle/manager/visual/management/illegal/count/type', {method: 'GET', data})
  },
  /**
   * 获取本月违规数
   */
  monthCount: async () => {
    return request('/vehicle/manager/visual/management/illegal/current/month')
  },
  /**
   * 获取上月违规数
   */
  lastMonthCount: async () => {
    return request('/vehicle/manager/visual/management/illegal/last/month')
  },
  /**
   * 获取当日的违规数
   */
  dayCount: async () => {
    return request('/vehicle/manager/visual/management/illegal/today')
  },
  /**
   * 获取昨日
   */
  lastDay: async () => {
    return request('/vehicle/manager/visual/management/illegal/yesterday')
  },
  /**
   * 获取违规列表
   * @return {Promise<any>}
   */
  illegalList: async () => {
    return request('/vehicle/manager/visual/management/illegal/page')
  },
  /**
   * 获取违规总数
   */
  illegalCount: async () => {
    return request('/vehicle/manager/visual/management/illegal/count')
  },
  /**
   * 获取人员车辆列表
   */
  userVehicleList: async ({vehicleTypeId, userType, keyword}) => {
    return request('/vehicle/manager/visual/management/illegal/user/vehicle', {
      method: 'GET', params: {
        vehicleTypeId,
        userType,
        keyword
      }
    })
  },
  /**
   * 获取身份表
   */
  idTypeList:async () => {
    return request('/vehicle/manager/user/enum/page',{
      method:'GET'
    })
  },
  /**
   * 获取人员车辆详情
   */
  userVehicleDetails:async(vehicleTypeId, userId)=> {
    return request('/vehicle/manager/visual/management/illegal/user/vehicle/detail',{
      method:'GET',params:{
        vehicleTypeId,
        userId,
      }
    })
  }
}
