import { defHttp } from '@/utils/http/axios';
import { ID, IDS, commonExport } from '@/api/base';
import { InfoVO, InfoForm, InfoQuery,LargeScreenQuery,LargeScreenVO,LargeScreenForm } from './model';

/**
 * 查询物业单位基础信息;列表
 * @param params
 * @returns
 */
export function infoList(params?: InfoQuery) {
  return defHttp.get<InfoVO[]>({ url: '/tenement/info/list', params });
}
/**
 * 查询监控大屏;列表
 * @param params
 * @returns
 */
export function largeScreenList(params?: LargeScreenQuery) {
  return defHttp.get<LargeScreenVO[]>({ url: '/elevator/largeScreen/list', params });
}
/**
 * 新增监控大屏;
 * @param data
 * @returns
 */
export function largeScreenAdd(data: LargeScreenForm) {
  return defHttp.postWithMsg<void>({ url: '/elevator/largeScreen', data });
}

/**
 * 更新监控大屏;
 * @param data
 * @returns
 */
export function largeScreenUpdate(data: LargeScreenForm) {
  return defHttp.putWithMsg<void>({ url: '/elevator/largeScreen', data });
}
/**
 * 查询监控大屏;详细
 * @param id id
 * @returns
 */
export function largeScreenInfo(id: ID) {
  return defHttp.get<LargeScreenVO>({ url: '/elevator/largeScreen/' + id });
}
/**
 * 导出物业单位基础信息;列表
 * @param params
 * @returns
 */
export function infoExport(params?: InfoQuery) {
  return commonExport('/tenement/info/export', params ?? {});
}
/**
 * 删除监控大屏;
 * @param id id
 * @returns
 */
export function largeScreenRemove(id: ID | IDS) {
  return defHttp.deleteWithMsg<void>({ url: '/elevator/largeScreen/' + id });
}
/**
 * 导出监控大屏;列表
 * @param params
 * @returns
 */
export function largeScreenExport(params?: LargeScreenQuery) {
  return commonExport('/elevator/largeScreen/export', params ?? {});
}
/**
 * 查询物业单位基础信息;详细
 * @param id id
 * @returns
 */
export function infoInfo(id: ID) {
  return defHttp.get<InfoVO>({ url: '/tenement/info/' + id });
}

/**
 * 新增物业单位基础信息;
 * @param data
 * @returns
 */
export function infoAdd(data: InfoForm) {
  return defHttp.postWithMsg<void>({ url: '/tenement/info', data });
}

/**
 * 更新物业单位基础信息;
 * @param data
 * @returns
 */
export function infoUpdate(data: InfoForm) {
  return defHttp.putWithMsg<void>({ url: '/tenement/info', data });
}

/**
 * 删除物业单位基础信息;
 * @param id id
 * @returns
 */
export function infoRemove(id: ID | IDS) {
  return defHttp.deleteWithMsg<void>({ url: '/tenement/info/' + id });
}
