import request from '@/utils/request'
// 所有项目立项列表
export function getAllApprovalList(query) {
  return request({
    url: '/project/approval/listAll',
    method: 'get',
    params: query
  })
}
//  查询可申请项目立项流程列表
export function applicableListApproval(query) {
  return request({
    url: '/project/approval/applicableList',
    method: 'get',
    params: query
  })
}
// 我的待办任务列表
export function getMyTaskList(query) {
  return request({
    url: '/project/approval/getMyTaskList',
    method: 'get',
    params: query
  })
}
//我的已办任务列表
export function getMyDoneTaskList(query) {
  return request({
    url: '/project/approval/getMyDoneTaskList',
    method: 'get',
    params: query
  })
}
//我的单据列表
export function getMyList(query) {
  return request({
    url: '/project/approval/getMyList',
    method: 'get',
    params: query
  })
}
//启动流程
export function approvalStart(data) {
  return request({
    //url: '/invest/pool',
    url:'/project/approval/start',
    method: 'post',
    data: data
  })
}
//审批流程
export function approvalComplete(data) {
  return request({
    url:'/project/approval/complete',
    method: 'put',
    data: data,
  })
}
// 查询项目池详细
export function getPool(id) {
  return request({
    url: '/invest/pool/' + id,
    method: 'get'
  })
}
/*export function getInvestInfo(pInstId) {
  return request({
    url: '/project/approval/' + pInstId,
    method: 'get'
  })
}*/
export function getApprovalInfo(pInstId) {
  return request({
    url: '/project/approval/' + pInstId,
    method: 'get'
  })
}
//查询会议投决节点  会议详情
export function getMeetingInfo(pInstId) {
  return request({
    url: '/project/approval/getMeetingInfo/' + pInstId,
    method: 'get',
  })
}

// 根据会议ID查询汇总分数和平均分数
export function getSumScore(pInstId) {
  return request({
    url: '/project/approval/getSumScore/' + pInstId,
    method: 'get',
  })
}
// 新增项目池


// 修改项目池
/*export function updatePool(data) {
  return request({
    url: '/invest/pool',
    method: 'put',
    data: data
  })
}*/

// 删除项目池
/*export function delPool(id) {
  return request({
    url: '/invest/pool/' + id,
    method: 'delete'
  })
}*/

// 查询项目立项待办任务列表数量
export function getMyTaskApprovalNumber() {
  return request({
    url: '/project/approval/getMyTaskList',
    method: 'get'
  })
}
