import request from '@/utils/request'

// 查询语音交互-项目列表
export function listProject(query) {
  return request({
    url: '/vi/project/list',
    method: 'get',
    params: query
  })
}

// 查询语音交互-项目详细
export function getProject(projectId) {
  return request({
    url: '/vi/project/' + projectId,
    method: 'get'
  })
}

// 新增语音交互-项目
export function addProject(data) {
  return request({
    url: '/vi/project',
    method: 'post',
    data: data
  })
}

// 修改语音交互-项目
export function updateProject(data) {
  return request({
    url: '/vi/project',
    method: 'put',
    data: data
  })
}

// 删除语音交互-项目
export function delProject(projectId) {
  return request({
    url: '/vi/project/' + projectId,
    method: 'delete'
  })
}

export function getExecuteRunParams(projectId) {
  return request({
    url: '/vi/project/queryExecuteRunParams',
    method: 'get',
    params: {
      projectId
    }
  })
}

export function projectExecute(data) {
  return request({
    url: '/vi/project/execute',
    method: 'post',
    data
  })
}

export function queryExecuteInstId(projectId) {
  return request({
    url: `/vi/project/queryExecuteInstId/${projectId}`,
    method: 'get',
    
  })
}


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