import request from '@/utils/request'
import { URL } from '@/config'

export function getList(params) {
  return request({
    url: URL.edu.evaluation.topic.getList,
    method: 'get',
    params,
  })
}

export function doEdit(data) {
  return request({
    url: URL.edu.evaluation.topic.doEdit,
    method: 'post',
    data,
  })
}

export function doDelete(data) {
  return request({
    url: URL.edu.evaluation.topic.doDelete,
    method: 'post',
    data,
  })
}

export function getTopicListByPaperId(params) {
  return request({
    url: URL.edu.evaluation.topic.getTopicListByPaperId,
    method: 'get',
    params,
  })
}

export function getTopicTypeAndNum(params) {
  return request({
    url: URL.edu.evaluation.topic.getTopicTypeAndNum,
    method: 'get',
    params,
  })
}

export function getTopicListByTypeNum(data) {
  return request({
    url: URL.edu.evaluation.topic.getTopicListByTypeNum,
    method: 'post',
    data,
  })
}

export function expTopicTemp(data) {
  return request({
    url: URL.edu.evaluation.topic.expTopicTemp,
    method: 'post',
    data,
    responseType: 'blob',
  })
}

export function impTopicTemp(data) {
  return request({
    url: URL.edu.evaluation.topic.impTopicTemp,
    method: 'post',
    data,
  })
}
