import request from '@/utils/request'
// 所有项目投决列表
export function getAllDecisionList(query) {
  return request({
    url: '/project/decision/listAll',
    method: 'get',
    params: query
  })
}

//  查询可申请项目投决流程列表 ​/dev-api​/invest​/pool​/listDecision
export function applicableListDecision(query) {
  return request({
    url: '/project/decision/applicableList',
    method: 'get',
    params: query
  })
}
// 我的待办任务列表
export function getMyTaskList(query) {
  return request({
    url: '/project/decision/getMyTaskList',
    method: 'get',
    params: query
  })
}
//我的已办任务列表
export function getMyDoneTaskList(query) {
  return request({
    url: '/project/decision/getMyDoneTaskList',
    method: 'get',
    params: query
  })
}
//我的单据列表
export function getMyList(query) {
  return request({
    url: '/project/decision/getMyList',
    method: 'get',
    params: query
  })
}
//启动流程
export function decisionStart(data) {
  return request({
    //url: '/invest/pool',
    url:'/project/decision/start',
    method: 'post',
    data: data
  })
}
//审批流程
export function decisionComplete(data) {
  return request({
    url:'/project/decision/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 getDecisionInfo(pInstId) {
  return request({
    url: '/project/decision/' + pInstId,
    method: 'get'
  })
}
//查询会议投决节点  会议详情
export function getMeetingInfo(pInstId) {
  return request({
    url: '/project/decision/getMeetingInfo/' + pInstId,
    method: 'get',
  })
}

// 根据会议ID查询汇总分数和平均分数
export function getSumScore(pInstId) {
  return request({
    url: '/project/decision/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 getMyTaskDecisionNumber() {
  return request({
    url: '/project/decision/getMyTaskList',
    method: 'get'
  })
}
