import {requestInstance} from "@/service";
import {UserInfo} from "@/unit/UserInfo";

export function qualityCheckRuleHomeTableData(params) {
 return requestInstance({
  url:'/zljc/getInspectionList',
  data:{
   ...params
  }
 })
}
export function qualityCheckRuleDetailTableData(params) {
 return requestInstance({
  url:'/zljc/getInspectionListByCode',
  data:{
   ...params
  }
 })
}
export function getQualityDetailRuleSelect() {
 return requestInstance({
  url:'/zljc/getInspectionRuleTypePageList',
  data:{
   "STATE": "1",
   pageIndex:1,
   pageSize:20000,
  }
 })
}
export function getQualityDetailRuleAllFieldSelect(CODE) {
 return requestInstance({
  url:'/catalog/getMetadataxxKbglList',
  data:{
   "code":CODE,
   pageIndex:1,
   pageSize:'20000',
   appkey:new UserInfo().GetUserKeyCode()
  }
 })
}
export function deleteQualityCheck(UUID) {
 return requestInstance({
  url:'/zljc/removeInspectionRule',
  data:{
   UUID
  }
 })
}
export function validDataDictionary(CATALOG_CODE){
 return requestInstance({
  url:'/DataDictionary/getDataDictionary',
  data:{
   CATALOG_CODE
  }
 })
}
export function addOrEditQualityRule(params) {
 return requestInstance({
  url:'/zljc/addInspectionRule',
  data:{
   ...params
  }
 })
}
