import request from '@/utils/request'

// 获取多语言字典，根据是否传入参数fmeaId，获取的数据意义不同
export function getLanguageDict(params) {
  return request({
    url: request.apiModule.rdfm + '/dictionary/languageKey',
    method: 'get',
    params
  })
}

// 获取Excel输出设置字典
export function getExcelOutputDict() {
  return request({
    url: request.apiModule.rdfm + '/dictionary/excelOutput',
    method: 'get'
  })
}

//获取状态字典
export function getMeasureStatusDict() {
  return request({
    url: request.apiModule.rdfm + '/dictionary/measureStatus',
    method: 'get'
  })
}

//获取规格字典
export function getSpecificationsDict() {
  return request({
    url: request.apiModule.rdfm + '/dictionary/xxx',
    method: 'get'
  })
}

//获取评分标准字典（评估）
export function getGradingDict(params) {
  return request({
    url: request.apiModule.rdfm + '/dictionary/grading',
    method: 'get',
    params
  })
}

//获取自定义属性字典
export function getCustomAttrDict(params) {
  return request({
    url: request.apiModule.rdfm + '/dictionary/customAttri',
    method: 'get',
    params
  })
}

// 添加自定义属性
export function addCustomAttrDict(data) {
  return request({
    url: request.apiModule.rdfm + '/customAttri',
    method: 'post',
    data
  })
}

//更改自定义属性
export function updateCustomAttrDict(data) {
  return request({
    url: request.apiModule.rdfm + '/customAttri',
    method: 'put',
    data
  })
}

// 编辑自定义属性
export function editCustomAttrDict(data) {
  return request({
    url: request.apiModule.rdfm + '/dictionary/customAttri',
    method: 'put',
    data
  })
}

// 删除自定义属性
export function delCustomAttrDict(id) {
  return request({
    url: request.apiModule.rdfm + '/customAttri',
    method: 'delete',
    data: { id: id }
  })
}

// 获取特性分类字典
export function getFeatureClassifyDict(params) {
  return request({
    url: request.apiModule.rdfm + '/dictionary/featureClassify',
    method: 'get',
    params
  })
}

//获取功能类别字典
export function getFuncCategoryDict(params) {
  return request({
    url: request.apiModule.rdfm + '/dictionary/funcCategory',
    method: 'get',
    params
  })
}

// 连接方式
export function getLinkMethodDict(type) {
  return request({
    url: request.apiModule.rdfm + '/dictionary/linkMethod/' + type,
    method: 'get'
  })
}

// 连接性质
export function getLinkPropertyDict() {
  return request({
    url: request.apiModule.rdfm + '/dictionary/linkProperty',
    method: 'get'
  })
}

// 连接类型
export function getLinkTypeDict() {
  return request({
    url: request.apiModule.rdfm + '/dictionary/linkType',
    method: 'get'
  })
}
