import request from '@/utils/request'
import state from '@/store'
import router from '@/router'

export function getData(date1, date2) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '采购管理_采购效率_查询数据_折线图',
      param: '开始时间=' + date1 + '&结束时间=' + date2
    }
  })
}

export function getData1(num) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '采购管理_采购效率分析_查询',
      param: '采购合同流水号=' + num
    }
  })
}

export function getData2(date1, date2) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '采购管理_合同审核审批效率_查询数据_折线图',
      param: '开始时间=' + date1 + '&结束时间=' + date2
    }
  })
}

export function getData3(date1, date2) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '车间采购管理_合同审批效率_查询数据_折线图',
      param: '开始时间=' + date1 + '&结束时间=' + date2
    }
  })
}

export function getData4(date1, date2) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '采购管理_请款审批付款效率_查询数据_折线图',
      param: '开始时间=' + date1 + '&结束时间=' + date2
    }
  })
}
