import fetch from '../../../../config/fetch'

const baseUrl = '/groupcontrol';

/**
 * @description 获取机房列表数据
 * @param {Object} data
 * @author zhoujx
 */
export const findPageList = (data) => fetch('/machineRoomAccessRecord/findPageList', baseUrl, data, 'JSON', 'GET', 'FORMDATA');

/**
 * @description 获取进入机房的缘由列表信息
 * @param {Object} data
 * @author zhoujx
 */
export const findReasonsForEntryMachineRoom = (data) => fetch('/machineRoomAccessRecord/findReasonsForEntryMachineRoom', baseUrl, data, 'JSON', 'GET', 'FORMDATA');

/**
 * @description 根据进入机房的用户UserId（userId）获取需要离场的详情信息
 * @param {Object} data
 * @author zhoujx
 */
export const findByUserIdAndMachineRoomCode = (data) => fetch('/machineRoomAccessRecord/findByUserIdAndMachineRoomCode', baseUrl, data, 'JSON', 'GET', 'FORMDATA');

/**
 * @description 新增进入记录
 * @param {Object} data
 * @author zhoujx
 */
export const saveMachineRoomAccessRecord = (data) => fetch('/machineRoomAccessRecord/saveMachineRoomAccessRecord', baseUrl, data, 'JSON', 'POST', 'FORMDATA');

/**
 * @description 编辑出去记录
 * @param {Object} data
 * @author zhoujx
 */
export const editMachineRoomAccessRecord = (data) => fetch('/machineRoomAccessRecord/editMachineRoomAccessRecord', baseUrl, data, 'JSON', 'POST', 'FORMDATA');

/**
 * @description 上传pc端图片
 * @method POST
 * @param imgData, imgType, imgSize, count, orderId
 * @author jgj
 */
export const uploadFileByLocal = (data) => fetch('/machineRoomAccessRecord/saveFile',baseUrl,  data, 'JSON', 'POST', 'JSON');





