import request from '@/utils/request'
// 所有项目终止流程列表
export function getAllTerminationList(query) {
  return request({
    url: '/project/termination/listAll',
    method: 'get',
    params: query
  })
}
//  查询可申请终止流程列表
export function applicableListTermination(query) {
  return request({
    url: '/project/termination/applicableList',
    method: 'get',
    params: query
  })
}
// 我的待办任务列表
export function getMyTaskList(query) {
  return request({
    url: '/project/termination/getMyTaskList',
    method: 'get',
    params: query
  })
}
//我的已办任务列表
export function getMyDoneTaskList(query) {
  return request({
    url: '/project/termination/getMyDoneTaskList',
    method: 'get',
    params: query
  })
}
//我的单据列表
export function getMyList(query) {
  return request({
    url: '/project/termination/getMyList',
    method: 'get',
    params: query
  })
}
//启动流程
export function terminationStart(data) {
  return request({
    //url: '/invest/pool',
    url:'/project/termination/start',
    method: 'post',
    data: data
  })
}
//审批流程
export function terminationComplete(data) {
  return request({
    url:'/project/termination/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 getTerminationInfo(pInstId) {
  return request({
    url: '/project/termination/' + pInstId,
    method: 'get'
  })
}
//查询会议投决节点  会议详情
export function getMeetingInfo(pInstId) {
  return request({
    url: '/project/termination/getMeetingInfo/' + pInstId,
    method: 'get',
  })
}

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

