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

const baseUrl = '/groupcontrol';

/**
 * @description 获取会议室类型
 * @param {Object} data
 * @author zhoujx
 */
export const getMeetingTypes = () => fetch('/meetingRoom/getMeetingTypes', baseUrl, {}, 'JSON', 'GET', 'FORMDATA');

/**
 * @description 获取APP会议列表
 * @param {Object} data
 * @author zhoujx
 */
export const getMeetingListForApp = (data) => fetch('/meeting/getMeetingListForApp', baseUrl, data, 'JSON', 'GET', 'FORMDATA');

/**
 * @description 获取APP已结束的会议列表
 * @param {Object} data
 * @author zhoujx
 */
export const getMeetingListEndForApp = (data) => fetch('/meeting/getMeetingListEndForApp', baseUrl, data, 'JSON', 'GET', 'FORMDATA');

/**
 * @description 获取APP我发起的会议列表
 * @param {Object} data
 * @author zhoujx
 */
export const getMeetingListMyForApp = (data) => fetch('/meeting/getMeetingListMyForApp', baseUrl, data, 'JSON', 'GET', 'FORMDATA');

/**
 * @description 获取APP我审批的会议列表
 * @param {Object} data
 * @author zhoujx
 */
export const getMeetingListCheckForApp = (data) => fetch('/meeting/getMeetingListCheckForApp', baseUrl, data, 'JSON', 'GET', 'FORMDATA');

/**
 * @description 获取会议室列表
 * @param {Object} data
 * @author zhoujx
 */
export const getMeetingRoomList = (data) => fetch('/meetingRoom/getMeetingRoomListByNeedApproval', baseUrl, data, 'JSON', 'GET', 'FORMDATA');

/**
 * @description 获取会议室详情
 * @param {Object} data
 * @author zhoujx
 */
export const getRoomByIdForMeeting = (data) => fetch('/meetingRoom/getRoomByIdForMeeting', baseUrl, data, 'JSON', 'GET', 'FORMDATA');

/**
 * @description 获取公司下的人员列表
 * @param {Object} data
 * @author zhoujx
 */
export const getDeptAndUserByCompanyId = (data) => fetch('/meeting/getDeptAndUserByCompanyId', baseUrl, data, 'JSON', 'GET', 'FORMDATA');

/**
 * @description 获取公司下的人员列表
 * @param {Object} data
 * @author zhoujx
 */
export const getMeetingUsingProject = (data) => fetch('/meeting/getMeetingUsingProject', baseUrl, data, 'JSON', 'GET', 'FORMDATA');

/**
 * @description 获取公司下的人员列表
 * @param {Object} data
 * @author zhoujx
 */
export const startMeetingRoom = (data) => fetch('/meeting/startMeetingRoom', baseUrl, data, 'JSON', 'POST', 'FORMDATA');

/**
 * @description 根据会议Id查询会议信息(通用)
 * @param {Object} data
 * @author zhoujx
 */
export const getMeetingMessageForAPPById = (data) => fetch('/meeting/getMeetingMessageForAPPById', baseUrl, data, 'JSON', 'GET', 'FORMDATA');

/**
 * @description 根据会议Id查询会议信息(签到)
 * @param {Object} data
 * @author zhoujx
 */
export const getMeetingMessageForAPPByIdToSign = (data) => fetch('/meeting/getMeetingMessageForAPPByIdToSign', baseUrl, data, 'JSON', 'GET', 'FORMDATA');

/**
 * @description 取消会议
 * @param {Object} data
 * @author zhoujx
 */
export const cancelMeeting = (data) => fetch('/meeting/cancelMeeting', baseUrl, data, 'JSON', 'POST', 'FORMDATA');

/**
 * @description 获得APP会议审核角标信息
 * @param {Object} data
 * @author zhoujx
 */
export const getCornerMarkNumByUserId = (data) => fetch('/meeting/getCornerMarkNumByUserId', baseUrl, data, 'JSON', 'GET', 'FORMDATA');

/**
 * @description 保存上传文件信息
 * @param {string} bookingMeetingDetailId 会议ID
 * @param {string} fileurl 文件路径
 * @param {string} filename 文件名称
 * @param {string} type  类型(1:会议材料;2:会议纪要;3:照片)
 * @author zhoujx
 */
export const saveFileMessage = (data) => fetch('/meeting/saveFileMessage', baseUrl, data, 'JSON', 'POST', 'FORMDATA');

/**
 * @description 保存上传文件信息
 * @param {string} bookingMeetingDetailId 会议ID
 * @author zhoujx
 */
export const getFileMessageByBookingMeetingDetailId = (data) => fetch('/meeting/getFileMessageByBookingMeetingDetailId', baseUrl, data, 'JSON', 'GET', 'FORMDATA');

/**
 * @description 审批通过
 * @param {body}
 * @author zhoujx
 */
export const checkComplete = (data) => fetch('/activiti/complete', baseUrl, data, 'JSON', 'POST', 'JSON');


/**
 * @description 审批拒绝
 * @param {body}
 * @author zhoujx
 */
export const checkReject = (data) => fetch('/activiti/reject', baseUrl, data, 'JSON', 'POST', 'JSON');

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


