import { request } from 'umi';

/** 获取设备列表  */
export async function GetDeviceInfoPage(data) {
     return request(`/kitchen/api/Device/GetDeviceInfoPage`, {
      method: 'POST',
      data: data,
    });
  }
/**获取设备类型 */
export async function GetDicList(TypeCode) {
    return request(`/kitchen/api/dict-data/dic-list/${TypeCode}`, {
      method: 'Get',
    });
 }
/** 获取所有设备类型  */
export async function GetDeviceType(data) {
    return request(`​/kitchen/api/Device/GetDeviceType`, {
     method: 'GET',
   });
}
/**
 * 获取店铺设备
 * @returns
 */
export async function GetStoreDeviceTree()
{
  return request('/kitchen/api/Device/StoreDeviceTree',{
    method:'GET',
  });
}

/**
 * 修改设备信息
 * @param {设备数据} data
 * @returns
 */
export async function UpdateDeviceInfo(data) {
  return request(`/kitchen/api/Device/UpdateDeviceInfo`, {
   method: 'POST',
   data: data,
 });
}
