import request from '@/utils/request'

export function getDictionary(param) {
  return request({
    url: '/Dictionary/getDictionary',
    method: 'post',
    data: param
  })
}

export function getBasicDataSelect(searchKey) {
  return request({
    url: `/Dictionary/getBasicDataSelect?searchKey=${searchKey}`,
    method: 'get'
  })
}
export function getBasicDataSelects(param) {
  return request({
    url: `/Dictionary/getBasicDataSelect`,
    method: 'post',
    data: param
  })
}

export function getBasicDataAllSelect(params, isSystem) {
  return request({
    url: params ? (isSystem ? `/Dictionary/getBasicDataAllSelect?SystemReadingCriterionId=${params}` : `/Dictionary/getBasicDataAllSelect?TrialReadingCriterionId=${params}`) : `/Dictionary/getBasicDataAllSelect`,
    method: 'get'
  })
}

export function setCriterionDictionary(params) {
  return request({
    url: `/ReadingQuestion/setCriterionDictionary`,
    method: 'post',
    data: params
  })
}

export function getFrontInternationalizationList(params) {
  return request({
    url: `/Internationalization/getFrontInternationalizationList`,
    method: 'get',
  })
}

export function batchAddOrUpdateFrontInternationalization(params) {
  return request({
    url: `/Internationalization/batchAddOrUpdateFrontInternationalization`,
    method: 'post',
    data: params
  })
}
// 获取当前版本
export function getCurrentPublishInfo() {
  return request({
    url: `/PublishLog/getCurrentPublishInfo`,
    method: 'get'
  })
}
