|
@@ -1,12 +1,11 @@
|
|
|
import request from "./axios.js";
|
|
|
-export const baseURL = "http://10.81.3.154:6015/";
|
|
|
-// export const baseURL = "http://192.168.1.106:6015/";
|
|
|
+import { baseURL } from "./apiConfig.js"
|
|
|
import JSONBIG from "json-bigint";
|
|
|
|
|
|
// 获取场站数据
|
|
|
export function fetchStationListAll() {
|
|
|
return request({
|
|
|
- baseURL: baseURL,
|
|
|
+ baseURL,
|
|
|
url: `alertrule/querywpllist`,
|
|
|
method: "get",
|
|
|
});
|
|
@@ -15,7 +14,7 @@ export function fetchStationListAll() {
|
|
|
//获取部件及预警类型列表
|
|
|
export function fetchRelatePartAndAlarmType() {
|
|
|
return request({
|
|
|
- baseURL: baseURL,
|
|
|
+ baseURL,
|
|
|
url: "alertrule/queryalarmtypellist",
|
|
|
method: "get",
|
|
|
});
|
|
@@ -23,7 +22,7 @@ export function fetchRelatePartAndAlarmType() {
|
|
|
//获取型号列表
|
|
|
export const fetchModel = () => {
|
|
|
return request({
|
|
|
- baseURL: baseURL,
|
|
|
+ baseURL,
|
|
|
url: "alertrule/querywpbyymodellist",
|
|
|
method: "get",
|
|
|
});
|
|
@@ -31,7 +30,7 @@ export const fetchModel = () => {
|
|
|
//获取升压站列表
|
|
|
export const fetchBooststation = () => {
|
|
|
return request({
|
|
|
- baseURL: baseURL,
|
|
|
+ baseURL,
|
|
|
url: "alertrule/querysubllist",
|
|
|
method: "get",
|
|
|
});
|
|
@@ -39,7 +38,7 @@ export const fetchBooststation = () => {
|
|
|
//查询自定义预警列表
|
|
|
export function custombj_fetchTableData(params) {
|
|
|
return request({
|
|
|
- baseURL: baseURL,
|
|
|
+ baseURL,
|
|
|
url: "alertrule/page",
|
|
|
method: "get",
|
|
|
params,
|
|
@@ -49,7 +48,7 @@ export function custombj_fetchTableData(params) {
|
|
|
//根据场站编号,风机型号获取AI/DI测点
|
|
|
export const fetchPointList = (wpId = "", modelId = "") => {
|
|
|
return request({
|
|
|
- baseURL: baseURL,
|
|
|
+ baseURL,
|
|
|
url: `alertrule/querywtpointlist?wpId=${wpId}&modelId=${modelId}`,
|
|
|
method: "get",
|
|
|
});
|
|
@@ -57,7 +56,7 @@ export const fetchPointList = (wpId = "", modelId = "") => {
|
|
|
//根据升压站编号获取AI/DI测点
|
|
|
export const fetchPointListByBootst = (subId = "") => {
|
|
|
return request({
|
|
|
- baseURL: baseURL,
|
|
|
+ baseURL,
|
|
|
url: `alertrule/querysubpointllist?subId=${subId}`,
|
|
|
method: "get",
|
|
|
});
|
|
@@ -65,7 +64,7 @@ export const fetchPointListByBootst = (subId = "") => {
|
|
|
//新增/修改自定义预警
|
|
|
export const custombj_postSave = (form) => {
|
|
|
return request({
|
|
|
- baseURL: baseURL,
|
|
|
+ baseURL,
|
|
|
url: "alertrule/save",
|
|
|
method: "post",
|
|
|
data: form,
|
|
@@ -74,7 +73,7 @@ export const custombj_postSave = (form) => {
|
|
|
//自定义预警模板下载
|
|
|
export const custombj_importTemplate = () => {
|
|
|
return request({
|
|
|
- baseURL: baseURL,
|
|
|
+ baseURL,
|
|
|
url: "alertrule/get-import-template",
|
|
|
method: "get",
|
|
|
responseType: "blob",
|
|
@@ -84,7 +83,7 @@ export const custombj_importTemplate = () => {
|
|
|
//根据风场id获取所有风机
|
|
|
export const fetchWindturbineList = (wpId = "") => {
|
|
|
return request({
|
|
|
- baseURL: baseURL,
|
|
|
+ baseURL,
|
|
|
url: `alertrule/querywtlist?wpId=${wpId}`,
|
|
|
method: "get",
|
|
|
});
|
|
@@ -100,7 +99,7 @@ export const fetchAIDIPointList = (
|
|
|
pageSize
|
|
|
) => {
|
|
|
return request({
|
|
|
- baseURL: baseURL,
|
|
|
+ baseURL,
|
|
|
url: "info/point",
|
|
|
method: "get",
|
|
|
params: {
|
|
@@ -117,7 +116,7 @@ export const fetchAIDIPointList = (
|
|
|
//字典维护列表
|
|
|
export const get_datadictionary = (pageNum, pageSize, name, category) => {
|
|
|
return request({
|
|
|
- baseURL: baseURL,
|
|
|
+ baseURL,
|
|
|
method: "get",
|
|
|
url: `datadictionary/page?pageNum=${pageNum}&pageSize=${pageSize}&name=${name}&category=${category}`,
|
|
|
});
|
|
@@ -125,7 +124,7 @@ export const get_datadictionary = (pageNum, pageSize, name, category) => {
|
|
|
//字典维护 新增 修改
|
|
|
export const post_saveorupdate = (data) => {
|
|
|
return request({
|
|
|
- baseURL: baseURL,
|
|
|
+ baseURL,
|
|
|
method: "post",
|
|
|
url: `datadictionary/save`,
|
|
|
data,
|
|
@@ -135,7 +134,7 @@ export const post_saveorupdate = (data) => {
|
|
|
//实时报警列表
|
|
|
export const alarm_snap_top = (params) => {
|
|
|
return request({
|
|
|
- baseURL: baseURL,
|
|
|
+ baseURL,
|
|
|
method: "get",
|
|
|
url: `alarm/history/findAlarmByTypelist`,
|
|
|
params: params,
|
|
@@ -171,7 +170,7 @@ export const getAdapterHistory = (
|
|
|
) => {
|
|
|
return request({
|
|
|
url: `ts/history/raw?uniformCode=${AIpoint}&thingId=${stationId}&thingType=windturbine&startTs=${startTs}&endTs=${endTs}`,
|
|
|
- baseURL: baseUrl,
|
|
|
+ baseURL,
|
|
|
});
|
|
|
};
|
|
|
//数据查询 数据快照
|
|
@@ -185,7 +184,7 @@ export const getAdapterHistorysnap = (
|
|
|
) => {
|
|
|
return request({
|
|
|
url: `ts/history/snap?uniformCode=${AIpoint}&thingId=${stationId}&thingType=windturbine&startTs=${startTs}&endTs=${endTs}&interval=${interval}`,
|
|
|
- baseURL: baseUrl,
|
|
|
+ baseURL,
|
|
|
});
|
|
|
};
|
|
|
|
|
@@ -561,12 +560,7 @@ export function point(
|
|
|
}
|
|
|
//测点新增
|
|
|
export function metrics(data) {
|
|
|
- return request({
|
|
|
- method: "post",
|
|
|
- baseURL,
|
|
|
- url: `device/metrics/single`,
|
|
|
- data
|
|
|
- });
|
|
|
+ return request.post(`device/metrics/single`, data);
|
|
|
}
|
|
|
//测点删除
|
|
|
export function delmetrics(params) {
|
|
@@ -579,12 +573,12 @@ export function delmetrics(params) {
|
|
|
//测点导入
|
|
|
|
|
|
//tree新增 添加一个设备结构节点
|
|
|
-export function treeAdd(params) {
|
|
|
+export function treeAdd(data) {
|
|
|
return request({
|
|
|
method: "post",
|
|
|
baseURL,
|
|
|
url: `device/structure`,
|
|
|
- params,
|
|
|
+ data,
|
|
|
});
|
|
|
}
|
|
|
//tree删除 tree删除一个设备结构节点
|