import request from '@/utils/request'

export const getDictList = (params) => {
  return request({
    url: '/system/dict/data/list',
    method: 'get',
    params
  })
}

export const addProject = (data) => {
  return request({
    url: '/ti/project',
    method: 'post',
    data
  })
}

export const updateProject = (data) => {
  return request({
    url: '/ti/project',
    method: 'put',
    data
  })
}

export const getProjectList = (params) => {
  return request({
    url: '/ti/project/list',
    method: 'get',
    params
  })
}

export const deleteProject = (projectIds) => {
  return request({
    url: '/ti/project/' + projectIds,
    method: 'delete'
  })
}

export const getExecuteRunParams = (params) => {
  return request({
    url: '/ti/project/queryExecuteRunParams',
    method: 'get',
    params
  })
}

export const projectExecute = (data) => {
  return request({
    url: '/ti/project/execute',
    method: 'post',
    data
  })
}

export const executeProject = (data) => {
  return request({
    url: '/ti/project/evaluation',
    method: 'post',
    data
  })
}

/**
 * 获取评估
 * @param {*} projectId 
 * @returns 
 */
export function getValuationProject(projectId) {
  return request({
    url: '/ti/project/evaluation/' + projectId,
    method: 'get'
  })
}