import {baseUrl, dict, component_dict} from "@/api/scan/config";
import http from "@/api/scan/httpUtil";

//头部信息查询(查询所有设备类型-所有部件类型-所有系统类型-所有专业类型)
export function queryPhysicsAllType(param, success) {
  let url = `${baseUrl}${dict}/category`;
  http.postJson(url, param, success);
}

//查询项目下类型的信息点
export function getDataDictionary(param, success) {
  let url = `${baseUrl}${dict}/query`;
  http.postJson(url, param, success);
}

//批量处理字典信息操作
export function setInfoPoint(param, success) {
  let url = `${baseUrl}${dict}/dict-batch`;
  http.postJson(url, param, success)
}

//设置-项目定制化字典
export function setDataDictionary(param, success) {
  let url = `${baseUrl}${dict}/setting-dic-project`;
  http.postJson(url, param, success)
}

// 字典-项目下已有的设备类型带系统
export function getEquipLkSys(param, success) {
    let url = `${baseUrl}${dict}/system/equip/category`;
    http.postJson(url, param, success)
}

/**
 * 字典统一配置（切换到equip-component服务上）
 */

// 头部信息查询(查询所有设备类型-所有部件类型-所有系统类型-所有专业类型)
export function dictCategory(param, success) {
    let url = `${baseUrl}${component_dict}/category`;
    http.postJson(url, param, success);
}

//查询项目下类型的信息点
export function dictQuery(param, success) {
    let url = `${baseUrl}${component_dict}/query`;
    http.postJson(url, param, success);
}

//设置-项目定制化字典
export function setDicProject(param, success) {
    let url = `${baseUrl}${component_dict}/setting-dic-project`;
    http.postJson(url, param, success)
}

//需采集信息同步到所有项目
export function synDicProject(param, success) {
    let url = `${baseUrl}${component_dict}/syn-dic-project`;
    http.getJson(url, param, success)
}

// 统计-根据条件统计返回信息点
export function deliveredInfos(param, success) {
    let url = `${baseUrl}${component_dict}/delivered/infos`
    http.postJson(url, param, success)
}