import { baseHttpUtils } from "@/utils/http/baseHttpUtils";
import { Count } from "@/models/equip";
import { equipquery_pre, object_pre } from "./preTypes";

/**
 * 设备相关接口
 */
class EquipController {
  static http = new baseHttpUtils();
  /**
   * 查询设备关联资产部件数量
   * @returns
   */
  static async getEquipTableCon(params) {
    return await this.http.postRequest(
      equipquery_pre + "/equip-components",
      params
    );
  }
  /**
   * 设备清单 - 查询设备信息
   */
  static async queryEquip(params) {
    return await this.http.postRequest(object_pre + "/equip/query", params);
  }
  /**
   * 根据条件查询统计数量
   * @param {Count} params
   * @returns
   */
  static async countEquip(params: Count) {
    return await this.http.postRequest(object_pre + "/equip/count", params);
  }
}

export default EquipController;
