import request from '@/utils/request'
export function getConsEntranceList(query) {
  return request({
    url: '/project/consApproval/getConsEntranceList',
    method: 'get',
    params: query,
  })
}

/**
 * 获取首页审批记录
 * @param query
 * @returns {AxiosPromise}
 */
export function getAuditRecord(query) {
  return request({
    url: '/project/consApproval/getAuditRecord',
    method: 'get',
    params: query,
  })
}

/**
 * 监理、承包商、分包商入场申请撤回
 * @param data
 * @returns {*}
 */
export function revokeEnter(data) {
  console.log(data)
  return request({
    url: '/project/consApproval/revokeEnter',
    method: 'post',
    data: data,
  })
}

/**
 * 承包商完工、分包商出场申请撤回
 * @param data
 * @returns {*}
 */
export function revokeExit(data) {
  console.log(data)
  return request({
    url: '/project/consApproval/revokeExit',
    method: 'post',
    data: data,
  })
}

/**
 * 获取首页工程基础信息
 * @param data
 * @returns {*}
 */
export function getIndexBasicInfo(data) {
  return request({
    url: '/project/consApproval/getIndexBasicInfo',
    method: 'post',
    data: data,
  })
}

export function getAuditPerson(params) {
  return request({
    url: '/flowable/business/approvalHistoryUser',
    method: 'post',
    data: params,
  })
}
