import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { BaseDeviceTypeVO, BaseDeviceTypeForm, BaseDeviceTypeQuery } from '@/api/dms/baseDeviceType/types';

/**
 * 查询设备类型信息列表
 * @param query
 * @returns {*}
 */

export const listBaseDeviceTypeInDMS = (query?: BaseDeviceTypeQuery): AxiosPromise<BaseDeviceTypeVO[]> => {
  return request({
    url: '/dms/baseDeviceType/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询设备类型信息详细
 * @param deviceTypeId
 */
export const getBaseDeviceTypeInDMS = (deviceTypeId: string | number): AxiosPromise<BaseDeviceTypeVO> => {
  return request({
    url: '/dms/baseDeviceType/' + deviceTypeId,
    method: 'get'
  });
};

/**
 * 新增设备类型信息
 * @param data
 */
/*export const addBaseDeviceTypeInDMS = (data: BaseDeviceTypeForm) => {
  return request({
    url: '/dms/baseDeviceType',
    method: 'post',
    data: data
  });
};*/

/**
 * 修改设备类型信息
 * @param data
 */
/*export const updateBaseDeviceTypeInDMS = (data: BaseDeviceTypeForm) => {
  return request({
    url: '/dms/baseDeviceType',
    method: 'put',
    data: data
  });
};*/

/**
 * 删除设备类型信息
 * @param deviceTypeId
 */
/*export const delBaseDeviceTypeInDMS = (deviceTypeId: string | number | Array<string | number>) => {
  return request({
    url: '/dms/baseDeviceType/' + deviceTypeId,
    method: 'delete'
  });
};*/


/**
 * 下拉框查询设备类型信息列表
 * @param query
 * @returns {*}
 */
export function getBaseDeviceTypeListInDMS (query) {
    return request({
        url: '/dms/baseDeviceType/getBaseDeviceTypeList',
        method: 'get',
        params: query
    });
};
