import request from '@/utils/request'

// 查询列表
export function getList(data) {
  return request({
    url: '/system/QualityRules/list',
    method: 'post',
    data
  })
}

// 新增列表
export function getAdd(data) {
  return request({
    url: '/system/QualityRules/add',
    method: 'post',
    data
  })
}

// 修改列表
export function getUpdate(data) {
  return request({
    url: '/system/QualityRules/update',
    method: 'post',
    data
  })
}

export function getRuleTypeArr() {
  return request({
    url: '/system/dict/data/list?pageNum=1&pageSize=10&dictType=quality_rules_type',
    method: 'get'
  })
}
export function getDimensionStr() {
  return request({
    url: '/system/dict/data/list?pageNum=1&pageSize=10&dictType=quality_rules_dimension',
    method: 'get'
  })
}

// 删除列表
export function getRemove(params) {
  return request({
    url: '/system/QualityRules/remove',
    method: 'get',
    params
  })
}

export function getRuleTypeNumApi(params) {
  return request({
    url: '/system/QualityRules/getRuleTypeNum',
    method: 'get',
    params
  })
}
