import { stringify } from 'qs';
import { request } from 'umi';
export async function queryDevice(params = {}) {
  params.DepId = localStorage.depId;
  return request(
    `/api/v1/device/list/${params.ProjectId}?${stringify(params)}`,
  );
}
export async function queryDeviceList(ProjectId) {
  return request(`/api/v1/device-pad/list/${ProjectId}`);
}

export async function queryRepairRecord(params = {}) {
  const res = await request(
    `/api/v1/repair-record/list/${params.recordId}?${stringify(params)}`,
  );
  return { data: res.data?.list };
}
export async function queryMaintainRecord(params = {}) {
  const res = await request(
    `/api/v1/maintain-record/list/${params.recordId}?${stringify(params)}`,
  );
  return { data: res.data?.list };
}
