|
@@ -1,75 +1,76 @@
|
|
|
import httpUtil from "../scan/httpUtil";
|
|
|
import fetch from "../scan/fetch";
|
|
|
import storage from '@/framework/utils/storage'
|
|
|
+import { baseUrl, graphicUrl, dataCenter, dictCustom } from "@/api/scan/config.js"
|
|
|
|
|
|
|
|
|
//查询总览
|
|
|
export function graphic(param, success) {
|
|
|
- let url = '/api/datacenter4/graphic/overview'
|
|
|
+ let url = `${baseUrl}${graphicUrl}/overview`
|
|
|
httpUtil.postJson(url, param, success)
|
|
|
}
|
|
|
|
|
|
// 查询总览数量
|
|
|
export function graphicNumber(param, success) {
|
|
|
- let url = '/api/datacenter4/graphic/query-count'
|
|
|
+ let url = `${baseUrl}${graphicUrl}/query-count`
|
|
|
httpUtil.postJson(url, param, success)
|
|
|
|
|
|
}
|
|
|
|
|
|
//导入excel
|
|
|
export function graphicUpload(param, success) {
|
|
|
- let url = '/api/datacenter4/graphic/import'
|
|
|
+ let url = `${baseUrl}${graphicUrl}/import`
|
|
|
httpUtil.postJson(url, param, success)
|
|
|
}
|
|
|
|
|
|
// 下载报告
|
|
|
export function reportDownload(param, success) {
|
|
|
- let url = '/api/datacenter4/graphic/report-downloads'
|
|
|
+ let url = `${baseUrl}${graphicUrl}/report-downloads`
|
|
|
httpUtil.getJson(url, param, success)
|
|
|
}
|
|
|
|
|
|
// 下载模板
|
|
|
export function templateDownloads(param, success) {
|
|
|
- let url = '/api/datacenter4/graphic/template-downloads'
|
|
|
+ let url = `${baseUrl}${graphicUrl}/template-downloads`
|
|
|
httpUtil.getJson(url, param, success)
|
|
|
}
|
|
|
|
|
|
|
|
|
// 建筑下的业务空间
|
|
|
export function buildSpace(param, success) {
|
|
|
- let url = '/api/datacenter4/calc_building/space'
|
|
|
+ let url = `${baseUrl}${dataCenter}/calc_building/space`
|
|
|
httpUtil.postJson(url, param, success)
|
|
|
}
|
|
|
|
|
|
|
|
|
// 管网系统设备分块 1
|
|
|
// export function calcSpecial(param, success) {
|
|
|
-// let url = ` /api/datacenter4/calc_special/sys-block?Domain=${param.Domain}&SystemName=${param.SystemName}`
|
|
|
+// let url = ` ${baseUrl}${dataCenter}/calc_special/sys-block?Domain=${param.Domain}&SystemName=${param.SystemName}`
|
|
|
// httpUtil.postJson(url, param, success)
|
|
|
// }
|
|
|
export function calcSpecial(param, success) {
|
|
|
- let url = ` /api/datacenter4/calc_special/sys-block?relationType=${param.RelationType}`
|
|
|
+ let url = `${baseUrl}${dataCenter}/calc_special/sys-block?relationType=${param.RelationType}`
|
|
|
httpUtil.postJson(url, param, success)
|
|
|
}
|
|
|
|
|
|
|
|
|
// 获取源末端 2
|
|
|
export function blockQuery(param, success) {
|
|
|
- let url = '/api/datacenter4/graphic/connected-block-query'
|
|
|
+ let url = `${baseUrl}${graphicUrl}/connected-block-query`
|
|
|
httpUtil.postJson(url, param, success)
|
|
|
}
|
|
|
|
|
|
|
|
|
// 覆盖源末端 3
|
|
|
export function blockSource(param, success) {
|
|
|
- let url = '/api/datacenter4/graphic/replace-connected-block-source'
|
|
|
+ let url = `${baseUrl}${graphicUrl}/replace-connected-block-source`
|
|
|
httpUtil.postJson(url, param, success)
|
|
|
}
|
|
|
|
|
|
// 管网系统确定流向 4
|
|
|
export function sysDirection(param, success) {
|
|
|
let buildId = param.BuildingId ? `BuildingId=${param.BuildingId}&` : ''
|
|
|
- let url = `/api/datacenter4/calc_special/sys-direction?BlockId=${param.BlockId}&${buildId}Domain=${param.Domain}&SystemName=${param.SystemName}&isSource=${param.isSource}`
|
|
|
+ let url = `${baseUrl}${dataCenter}/calc_special/sys-direction?BlockId=${param.BlockId}&${buildId}Domain=${param.Domain}&SystemName=${param.SystemName}&isSource=${param.isSource}`
|
|
|
httpUtil.postJson(url, param, success)
|
|
|
}
|
|
|
|
|
@@ -82,7 +83,7 @@ export function businessSpaceAll(param) {
|
|
|
let objectTypes = zone_type ? "?objectTypes=" + zone_type : ''
|
|
|
return fetch({
|
|
|
method: 'POST',
|
|
|
- url: "/api/datacenter4/relation-calc/" + relation_type + objectTypes,
|
|
|
+ url: `${baseUrl}${dataCenter}/relation-calc/` + relation_type + objectTypes,
|
|
|
data: proId,
|
|
|
headers: {'ProjectId': ProjectId, 'Comming': 'adm', 'Account': userName}
|
|
|
})
|
|
@@ -92,13 +93,13 @@ export function businessSpaceAll(param) {
|
|
|
|
|
|
// 项目化字典-统计数量
|
|
|
export function dictCount(param, success) {
|
|
|
- let url = '/api/equip-component4/dict-custom/project-dict-count'
|
|
|
+ let url = `${baseUrl}${dictCustom}/project-dict-count`
|
|
|
httpUtil.postJson(url, param, success)
|
|
|
}
|
|
|
|
|
|
// 项目化字典-需补充转换规则数量
|
|
|
export function dictSwitchCount(param, success) {
|
|
|
- let url = '/api/equip-component4/dict-custom/project-dict-switch-count'
|
|
|
+ let url = `${baseUrl}${dictCustom}/project-dict-switch-count`
|
|
|
httpUtil.postJson(url, param, success)
|
|
|
}
|
|
|
|
|
@@ -109,7 +110,7 @@ export function dectInfo(param) {
|
|
|
let ProjectId = localStorage.getItem("projectId")
|
|
|
return fetch({
|
|
|
method: 'POST',
|
|
|
- url: `/api/equip-component4/dict-custom/project-dict-info`,
|
|
|
+ url: `${baseUrl}${dictCustom}/project-dict-info`,
|
|
|
data,
|
|
|
headers: {'ProjectId': ProjectId, 'Comming': 'adm', 'Account': userName}
|
|
|
})
|
|
@@ -117,31 +118,31 @@ export function dectInfo(param) {
|
|
|
|
|
|
//数据中心-物理世界数据转换
|
|
|
export function dictDataCenter(param, success) {
|
|
|
- let url = '/api/equip-component4/dict-custom/project-dict-datacenter4'
|
|
|
+ let url = `${baseUrl}${dictCustom}/project-dict-datacenter`
|
|
|
httpUtil.postJson(url, param, success)
|
|
|
}
|
|
|
|
|
|
//物理世界-数据中心数据转换
|
|
|
export function dictDataPlatFrom(param, success) {
|
|
|
- let url = '/api/equip-component4/dict-custom/project-dict-dataplatfrom'
|
|
|
+ let url = `${baseUrl}${dictCustom}/project-dict-dataplatfrom`
|
|
|
httpUtil.postJson(url, param, success)
|
|
|
}
|
|
|
|
|
|
// 同步设备
|
|
|
export function createEquip(param, success) {
|
|
|
- let url = `/api/dataplatform-sync/project-sync/create-equip?projectId=${param.projectId}`
|
|
|
+ let url = `${baseUrl}/dataplatform-sync/project-sync/create-equip?projectId=${param.projectId}`
|
|
|
httpUtil.postJson(url, {}, success)
|
|
|
}
|
|
|
|
|
|
//更新自定义自定脚本
|
|
|
export function dictUpdate(param, success) {
|
|
|
- let url = '/api/equip-component4/dict-custom/update'
|
|
|
+ let url = `${baseUrl}${dictCustom}/update`
|
|
|
httpUtil.postJson(url, param, success)
|
|
|
}
|
|
|
|
|
|
// 查询关系数据
|
|
|
export function relQuery(param,success) {
|
|
|
- let url = '/api/datacenter4/relation-manual-calc/rel-query'
|
|
|
+ let url = `${baseUrl}${dataCenter}/relation-manual-calc/rel-query`
|
|
|
httpUtil.postJson(url,param,success)
|
|
|
}
|
|
|
//添加关系数据
|
|
@@ -150,7 +151,7 @@ export function relAdd(data) {
|
|
|
let ProjectId = localStorage.getItem("projectId")
|
|
|
return fetch({
|
|
|
method: 'POST',
|
|
|
- url: `/api/datacenter4/relation-manual-calc/rel-add`,
|
|
|
+ url: `${baseUrl}${dataCenter}/relation-manual-calc/rel-add`,
|
|
|
data,
|
|
|
headers: {'ProjectId': ProjectId, 'Comming': 'adm', 'Account': userName}
|
|
|
})
|
|
@@ -158,20 +159,19 @@ export function relAdd(data) {
|
|
|
|
|
|
//删除关系
|
|
|
export function relDelete(param, success) {
|
|
|
- let url = '/api/datacenter4/relation-manual-calc/rel-del'
|
|
|
+ let url = `${baseUrl}${dataCenter}/relation-manual-calc/rel-del`
|
|
|
httpUtil.postJson(url, param, success)
|
|
|
}
|
|
|
|
|
|
|
|
|
// 添加源设备
|
|
|
export function addSource(param, success) {
|
|
|
- let url = '/api/datacenter4/mep-system-calc/source/add'
|
|
|
+ let url = `${baseUrl}${dataCenter}/mep-system-calc/source/add`
|
|
|
httpUtil.postJson(url, param, success)
|
|
|
}
|
|
|
|
|
|
//查看源设备
|
|
|
export function sourceQuery(param, success) {
|
|
|
- let url = '/api/datacenter4/mep-system-calc/source/query'
|
|
|
+ let url = `${baseUrl}${dataCenter}/mep-system-calc/source/query`
|
|
|
httpUtil.postJson(url, param, success)
|
|
|
-
|
|
|
}
|