加上YPT的代码
This commit is contained in:
@@ -1,51 +1,51 @@
|
|||||||
// 辅助函数
|
// 辅助函数
|
||||||
const getMax = (temp, tempA, tempB, tempC) => {
|
const getMax = (temp, tempA, tempB, tempC) => {
|
||||||
temp = temp > tempA ? temp : tempA;
|
temp = temp > tempA ? temp : tempA
|
||||||
temp = temp > tempB ? temp : tempB;
|
temp = temp > tempB ? temp : tempB
|
||||||
if (tempC !== undefined) {
|
if (tempC !== undefined) {
|
||||||
temp = temp > tempC ? temp : tempC;
|
temp = temp > tempC ? temp : tempC
|
||||||
}
|
}
|
||||||
return temp;
|
return temp
|
||||||
};
|
}
|
||||||
|
|
||||||
const getMaxTwo = (temp, tempA, tempB) => {
|
const getMaxTwo = (temp, tempA, tempB) => {
|
||||||
temp = temp > tempA ? temp : tempA;
|
temp = temp > tempA ? temp : tempA
|
||||||
temp = temp > tempB ? temp : tempB;
|
temp = temp > tempB ? temp : tempB
|
||||||
return temp;
|
return temp
|
||||||
};
|
}
|
||||||
|
|
||||||
const getMin = (temp, tempA, tempB, tempC) => {
|
const getMin = (temp, tempA, tempB, tempC) => {
|
||||||
temp = temp < tempA ? temp : tempA;
|
temp = temp < tempA ? temp : tempA
|
||||||
temp = temp < tempB ? temp : tempB;
|
temp = temp < tempB ? temp : tempB
|
||||||
if (tempC !== undefined) {
|
if (tempC !== undefined) {
|
||||||
temp = temp < tempC ? temp : tempC;
|
temp = temp < tempC ? temp : tempC
|
||||||
}
|
}
|
||||||
return temp;
|
return temp
|
||||||
};
|
}
|
||||||
|
|
||||||
const getMinOpen = (temp, tempA, tempB) => {
|
const getMinOpen = (temp, tempA, tempB) => {
|
||||||
temp = temp < tempA ? temp : tempA;
|
temp = temp < tempA ? temp : tempA
|
||||||
temp = temp < tempB ? temp : tempB;
|
temp = temp < tempB ? temp : tempB
|
||||||
return temp;
|
return temp
|
||||||
};
|
}
|
||||||
|
|
||||||
// 数据处理函数
|
// 数据处理函数
|
||||||
const fliteWaveData = (wp, step, iphasicValue, isOpen) => {
|
const fliteWaveData = (wp, step, iphasicValue, isOpen) => {
|
||||||
const rmsData = wp.listRmsData;
|
const rmsData = wp.listRmsData
|
||||||
const pt = Number(wp.pt) / 1000;
|
const pt = Number(wp.pt) / 1000
|
||||||
const ct = Number(wp.ct);
|
const ct = Number(wp.ct)
|
||||||
const titleList = wp.waveTitle;
|
const titleList = wp.waveTitle
|
||||||
let xishu = pt;
|
let xishu = pt
|
||||||
let aTitle = "",
|
let aTitle = '',
|
||||||
bTitle = "",
|
bTitle = '',
|
||||||
cTitle = "",
|
cTitle = '',
|
||||||
unit = "电压";
|
unit = '电压'
|
||||||
let rmsvFirstX = 0,
|
let rmsvFirstX = 0,
|
||||||
rmsvFirstY = 0,
|
rmsvFirstY = 0,
|
||||||
rmsvSecondX = 0,
|
rmsvSecondX = 0,
|
||||||
rmsvSecondY = 0,
|
rmsvSecondY = 0,
|
||||||
firstZhou = "a",
|
firstZhou = 'a',
|
||||||
secondeZhou = "a";
|
secondeZhou = 'a'
|
||||||
let ifmax = 0,
|
let ifmax = 0,
|
||||||
ifmin = 0,
|
ifmin = 0,
|
||||||
ismax = 0,
|
ismax = 0,
|
||||||
@@ -53,176 +53,172 @@ const fliteWaveData = (wp, step, iphasicValue, isOpen) => {
|
|||||||
rfmax = 0,
|
rfmax = 0,
|
||||||
rfmin = 0,
|
rfmin = 0,
|
||||||
rsmax = 0,
|
rsmax = 0,
|
||||||
rsmin = 0;
|
rsmin = 0
|
||||||
|
|
||||||
const shunshiFA = [];
|
const shunshiFA = []
|
||||||
const shunshiFB = [];
|
const shunshiFB = []
|
||||||
const shunshiFC = [];
|
const shunshiFC = []
|
||||||
const shunshiSA = [];
|
const shunshiSA = []
|
||||||
const shunshiSB = [];
|
const shunshiSB = []
|
||||||
const shunshiSC = [];
|
const shunshiSC = []
|
||||||
const rmsFA = [];
|
const rmsFA = []
|
||||||
const rmsFB = [];
|
const rmsFB = []
|
||||||
const rmsFC = [];
|
const rmsFC = []
|
||||||
const rmsSA = [];
|
const rmsSA = []
|
||||||
const rmsSB = [];
|
const rmsSB = []
|
||||||
const rmsSC = [];
|
const rmsSC = []
|
||||||
|
|
||||||
|
if (titleList[iphasicValue * step + 1]?.substring(0, 1) !== 'U') {
|
||||||
|
xishu = ct
|
||||||
if (titleList[iphasicValue * step + 1]?.substring(0, 1) !== "U") {
|
unit = '电流'
|
||||||
xishu = ct;
|
|
||||||
unit = "电流";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 1; i <= iphasicValue; i++) {
|
for (let i = 1; i <= iphasicValue; i++) {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 1:
|
case 1:
|
||||||
aTitle = titleList[iphasicValue * step + i]?.substring(1) || "";
|
aTitle = titleList[iphasicValue * step + i]?.substring(1) || ''
|
||||||
break;
|
break
|
||||||
case 2:
|
case 2:
|
||||||
bTitle = titleList[iphasicValue * step + i]?.substring(1) || "";
|
bTitle = titleList[iphasicValue * step + i]?.substring(1) || ''
|
||||||
break;
|
break
|
||||||
case 3:
|
case 3:
|
||||||
cTitle = titleList[iphasicValue * step + i]?.substring(1) || "";
|
cTitle = titleList[iphasicValue * step + i]?.substring(1) || ''
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rmsData[0] && rmsData[0][iphasicValue * step + 1] !== undefined) {
|
if (rmsData[0] && rmsData[0][iphasicValue * step + 1] !== undefined) {
|
||||||
rfmax = rmsData[0][iphasicValue * step + 1] * xishu;
|
rfmax = rmsData[0][iphasicValue * step + 1] * xishu
|
||||||
rfmin = rmsData[0][iphasicValue * step + 1] * xishu;
|
rfmin = rmsData[0][iphasicValue * step + 1] * xishu
|
||||||
rmsvFirstY = rmsData[0][iphasicValue * step + 1] * xishu;
|
rmsvFirstY = rmsData[0][iphasicValue * step + 1] * xishu
|
||||||
rmsvFirstX = rmsData[0][0];
|
rmsvFirstX = rmsData[0][0]
|
||||||
rsmax = rmsData[0][iphasicValue * step + 1];
|
rsmax = rmsData[0][iphasicValue * step + 1]
|
||||||
rsmin = rmsData[0][iphasicValue * step + 1];
|
rsmin = rmsData[0][iphasicValue * step + 1]
|
||||||
rmsvSecondY = rmsData[0][iphasicValue * step + 1];
|
rmsvSecondY = rmsData[0][iphasicValue * step + 1]
|
||||||
rmsvSecondX = rmsData[0][0];
|
rmsvSecondX = rmsData[0][0]
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let rms = 0; rms < rmsData.length; rms++) {
|
for (let rms = 0; rms < rmsData.length; rms++) {
|
||||||
if (!rmsData[rms] || rmsData[rms][iphasicValue * step + 1] === undefined) {
|
if (!rmsData[rms] || rmsData[rms][iphasicValue * step + 1] === undefined) {
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (iphasicValue) {
|
switch (iphasicValue) {
|
||||||
case 1:
|
case 1:
|
||||||
const rmsFirstA = rmsData[rms][iphasicValue * step + 1] * xishu;
|
const rmsFirstA = rmsData[rms][iphasicValue * step + 1] * xishu
|
||||||
rmsFA.push([rmsData[rms][0], rmsFirstA]);
|
rmsFA.push([rmsData[rms][0], rmsFirstA])
|
||||||
rfmax = rfmax > rmsFirstA ? rfmax : rmsFirstA;
|
rfmax = rfmax > rmsFirstA ? rfmax : rmsFirstA
|
||||||
rfmin = rfmin < rmsFirstA ? rfmin : rmsFirstA;
|
rfmin = rfmin < rmsFirstA ? rfmin : rmsFirstA
|
||||||
if (rfmin < rmsvFirstY) {
|
if (rfmin < rmsvFirstY) {
|
||||||
rmsvFirstY = rfmin;
|
rmsvFirstY = rfmin
|
||||||
firstZhou = "a";
|
firstZhou = 'a'
|
||||||
rmsvFirstX = rmsData[rms][0];
|
rmsvFirstX = rmsData[rms][0]
|
||||||
}
|
}
|
||||||
|
|
||||||
const rmsSecondA = rmsData[rms][iphasicValue * step + 1];
|
const rmsSecondA = rmsData[rms][iphasicValue * step + 1]
|
||||||
rmsSA.push([rmsData[rms][0], rmsSecondA]);
|
rmsSA.push([rmsData[rms][0], rmsSecondA])
|
||||||
rsmax = rsmax > rmsSecondA ? rsmax : rmsSecondA;
|
rsmax = rsmax > rmsSecondA ? rsmax : rmsSecondA
|
||||||
rsmin = rsmin < rmsSecondA ? rsmin : rmsSecondA;
|
rsmin = rsmin < rmsSecondA ? rsmin : rmsSecondA
|
||||||
if (rsmin < rmsvSecondY) {
|
if (rsmin < rmsvSecondY) {
|
||||||
rmsvSecondY = rsmin;
|
rmsvSecondY = rsmin
|
||||||
secondeZhou = "a";
|
secondeZhou = 'a'
|
||||||
rmsvSecondX = rmsData[rms][0];
|
rmsvSecondX = rmsData[rms][0]
|
||||||
}
|
}
|
||||||
break;
|
break
|
||||||
case 2:
|
case 2:
|
||||||
const rmsFirstA2 = rmsData[rms][iphasicValue * step + 1] * xishu;
|
const rmsFirstA2 = rmsData[rms][iphasicValue * step + 1] * xishu
|
||||||
const rmsFirstB2 = rmsData[rms][iphasicValue * step + 2] * xishu;
|
const rmsFirstB2 = rmsData[rms][iphasicValue * step + 2] * xishu
|
||||||
rmsFA.push([rmsData[rms][0], rmsFirstA2]);
|
rmsFA.push([rmsData[rms][0], rmsFirstA2])
|
||||||
rmsFB.push([rmsData[rms][0], rmsFirstB2]);
|
rmsFB.push([rmsData[rms][0], rmsFirstB2])
|
||||||
rfmax = getMaxTwo(rfmax, rmsFirstA2, rmsFirstB2);
|
rfmax = getMaxTwo(rfmax, rmsFirstA2, rmsFirstB2)
|
||||||
rfmin = getMinOpen(rfmin, rmsFirstA2, rmsFirstB2);
|
rfmin = getMinOpen(rfmin, rmsFirstA2, rmsFirstB2)
|
||||||
if (rfmin < rmsvFirstY) {
|
if (rfmin < rmsvFirstY) {
|
||||||
rmsvFirstY = rfmin;
|
rmsvFirstY = rfmin
|
||||||
if (rfmin === rmsFirstA2) {
|
if (rfmin === rmsFirstA2) {
|
||||||
firstZhou = "a";
|
firstZhou = 'a'
|
||||||
} else if (rfmin === rmsFirstB2) {
|
} else if (rfmin === rmsFirstB2) {
|
||||||
firstZhou = "b";
|
firstZhou = 'b'
|
||||||
}
|
}
|
||||||
rmsvFirstX = rmsData[rms][0];
|
rmsvFirstX = rmsData[rms][0]
|
||||||
}
|
}
|
||||||
|
|
||||||
const rmsSecondA2 = rmsData[rms][iphasicValue * step + 1];
|
const rmsSecondA2 = rmsData[rms][iphasicValue * step + 1]
|
||||||
const rmsSecondB2 = rmsData[rms][iphasicValue * step + 2];
|
const rmsSecondB2 = rmsData[rms][iphasicValue * step + 2]
|
||||||
rmsSA.push([rmsData[rms][0], rmsSecondA2]);
|
rmsSA.push([rmsData[rms][0], rmsSecondA2])
|
||||||
rmsSB.push([rmsData[rms][0], rmsSecondB2]);
|
rmsSB.push([rmsData[rms][0], rmsSecondB2])
|
||||||
rsmax = getMaxTwo(rsmax, rmsSecondA2, rmsSecondB2);
|
rsmax = getMaxTwo(rsmax, rmsSecondA2, rmsSecondB2)
|
||||||
rsmin = getMinOpen(rsmin, rmsSecondA2, rmsSecondB2);
|
rsmin = getMinOpen(rsmin, rmsSecondA2, rmsSecondB2)
|
||||||
if (rsmin < rmsvSecondY) {
|
if (rsmin < rmsvSecondY) {
|
||||||
rmsvSecondY = rsmin;
|
rmsvSecondY = rsmin
|
||||||
if (rsmin === rmsSecondA2) {
|
if (rsmin === rmsSecondA2) {
|
||||||
secondeZhou = "a";
|
secondeZhou = 'a'
|
||||||
} else if (rsmin === rmsSecondB2) {
|
} else if (rsmin === rmsSecondB2) {
|
||||||
secondeZhou = "b";
|
secondeZhou = 'b'
|
||||||
}
|
}
|
||||||
rmsvSecondX = rmsData[rms][0];
|
rmsvSecondX = rmsData[rms][0]
|
||||||
}
|
}
|
||||||
break;
|
break
|
||||||
case 3:
|
case 3:
|
||||||
const rmsFirstA3 = rmsData[rms][iphasicValue * step + 1] * xishu;
|
const rmsFirstA3 = rmsData[rms][iphasicValue * step + 1] * xishu
|
||||||
const rmsFirstB3 = rmsData[rms][iphasicValue * step + 2] * xishu;
|
const rmsFirstB3 = rmsData[rms][iphasicValue * step + 2] * xishu
|
||||||
const rmsFirstC3 = rmsData[rms][iphasicValue * step + 3] * xishu;
|
const rmsFirstC3 = rmsData[rms][iphasicValue * step + 3] * xishu
|
||||||
rmsFA.push([rmsData[rms][0], rmsFirstA3]);
|
rmsFA.push([rmsData[rms][0], rmsFirstA3])
|
||||||
rmsFB.push([rmsData[rms][0], rmsFirstB3]);
|
rmsFB.push([rmsData[rms][0], rmsFirstB3])
|
||||||
rmsFC.push([rmsData[rms][0], rmsFirstC3]);
|
rmsFC.push([rmsData[rms][0], rmsFirstC3])
|
||||||
rfmax = getMax(rfmax, rmsFirstA3, rmsFirstB3, rmsFirstC3);
|
rfmax = getMax(rfmax, rmsFirstA3, rmsFirstB3, rmsFirstC3)
|
||||||
rfmin = isOpen
|
rfmin = isOpen
|
||||||
? getMinOpen(rfmin, rmsFirstA3, rmsFirstC3)
|
? getMinOpen(rfmin, rmsFirstA3, rmsFirstC3)
|
||||||
: getMin(rfmin, rmsFirstA3, rmsFirstB3, rmsFirstC3);
|
: getMin(rfmin, rmsFirstA3, rmsFirstB3, rmsFirstC3)
|
||||||
if (rfmin < rmsvFirstY) {
|
if (rfmin < rmsvFirstY) {
|
||||||
rmsvFirstY = rfmin;
|
rmsvFirstY = rfmin
|
||||||
if (rfmin === rmsFirstA3) {
|
if (rfmin === rmsFirstA3) {
|
||||||
firstZhou = "a";
|
firstZhou = 'a'
|
||||||
} else if (rfmin === rmsFirstB3) {
|
} else if (rfmin === rmsFirstB3) {
|
||||||
firstZhou = "b";
|
firstZhou = 'b'
|
||||||
} else {
|
} else {
|
||||||
firstZhou = "c";
|
firstZhou = 'c'
|
||||||
}
|
}
|
||||||
rmsvFirstX = rmsData[rms][0];
|
rmsvFirstX = rmsData[rms][0]
|
||||||
}
|
}
|
||||||
|
|
||||||
const rmsSecondA3 = rmsData[rms][iphasicValue * step + 1];
|
const rmsSecondA3 = rmsData[rms][iphasicValue * step + 1]
|
||||||
const rmsSecondB3 = rmsData[rms][iphasicValue * step + 2];
|
const rmsSecondB3 = rmsData[rms][iphasicValue * step + 2]
|
||||||
const rmsSecondC3 = rmsData[rms][iphasicValue * step + 3];
|
const rmsSecondC3 = rmsData[rms][iphasicValue * step + 3]
|
||||||
rmsSA.push([rmsData[rms][0], rmsSecondA3]);
|
rmsSA.push([rmsData[rms][0], rmsSecondA3])
|
||||||
rmsSB.push([rmsData[rms][0], rmsSecondB3]);
|
rmsSB.push([rmsData[rms][0], rmsSecondB3])
|
||||||
rmsSC.push([rmsData[rms][0], rmsSecondC3]);
|
rmsSC.push([rmsData[rms][0], rmsSecondC3])
|
||||||
rsmax = getMax(rsmax, rmsSecondA3, rmsSecondB3, rmsSecondC3);
|
rsmax = getMax(rsmax, rmsSecondA3, rmsSecondB3, rmsSecondC3)
|
||||||
rsmin = isOpen
|
rsmin = isOpen
|
||||||
? getMinOpen(rsmin, rmsSecondA3, rmsSecondC3)
|
? getMinOpen(rsmin, rmsSecondA3, rmsSecondC3)
|
||||||
: getMin(rsmin, rmsSecondA3, rmsSecondB3, rmsSecondC3);
|
: getMin(rsmin, rmsSecondA3, rmsSecondB3, rmsSecondC3)
|
||||||
if (rsmin < rmsvSecondY) {
|
if (rsmin < rmsvSecondY) {
|
||||||
rmsvSecondY = rsmin;
|
rmsvSecondY = rsmin
|
||||||
if (rsmin === rmsSecondA3) {
|
if (rsmin === rmsSecondA3) {
|
||||||
secondeZhou = "a";
|
secondeZhou = 'a'
|
||||||
} else if (rsmin === rmsSecondB3) {
|
} else if (rsmin === rmsSecondB3) {
|
||||||
secondeZhou = "b";
|
secondeZhou = 'b'
|
||||||
} else {
|
} else {
|
||||||
secondeZhou = "c";
|
secondeZhou = 'c'
|
||||||
}
|
}
|
||||||
rmsvSecondX = rmsData[rms][0];
|
rmsvSecondX = rmsData[rms][0]
|
||||||
}
|
}
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const instantF = { max: ifmax, min: ifmin };
|
const instantF = { max: ifmax, min: ifmin }
|
||||||
const instantS = { max: ismax, min: ismin };
|
const instantS = { max: ismax, min: ismin }
|
||||||
const RMSF = { max: rfmax, min: rfmin };
|
const RMSF = { max: rfmax, min: rfmin }
|
||||||
const RMSS = { max: rsmax, min: rsmin };
|
const RMSS = { max: rsmax, min: rsmin }
|
||||||
const RMSFMinDetail = { rmsvFirstX, rmsvFirstY, firstZhou };
|
const RMSFMinDetail = { rmsvFirstX, rmsvFirstY, firstZhou }
|
||||||
const RMSSMinDetail = { rmsvSecondX, rmsvSecondY, secondeZhou };
|
const RMSSMinDetail = { rmsvSecondX, rmsvSecondY, secondeZhou }
|
||||||
const shunshiF = { shunshiFA, shunshiFB, shunshiFC };
|
const shunshiF = { shunshiFA, shunshiFB, shunshiFC }
|
||||||
const shunshiS = { shunshiSA, shunshiSB, shunshiSC };
|
const shunshiS = { shunshiSA, shunshiSB, shunshiSC }
|
||||||
const RMSFWave = { rmsFA, rmsFB, rmsFC };
|
const RMSFWave = { rmsFA, rmsFB, rmsFC }
|
||||||
const RMSSWave = { rmsSA, rmsSB, rmsSC };
|
const RMSSWave = { rmsSA, rmsSB, rmsSC }
|
||||||
const title = { aTitle, bTitle, cTitle, unit };
|
const title = { aTitle, bTitle, cTitle, unit }
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
instantF,
|
instantF,
|
||||||
instantS,
|
instantS,
|
||||||
RMSF,
|
RMSF,
|
||||||
@@ -234,63 +230,74 @@ const fliteWaveData = (wp, step, iphasicValue, isOpen) => {
|
|||||||
RMSFWave,
|
RMSFWave,
|
||||||
RMSSWave,
|
RMSSWave,
|
||||||
title,
|
title,
|
||||||
unit,
|
unit
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
// 监听消息
|
// 监听消息
|
||||||
self.onmessage = function (e) {
|
self.onmessage = function (e) {
|
||||||
const { wp, isOpen, value, boxoList } = JSON.parse(e.data);
|
const { wp, isOpen, value, boxoList } = JSON.parse(e.data)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const iphasicValue = wp.iphasic || 1;
|
const iphasicValue = wp.iphasic || 1
|
||||||
|
|
||||||
const picCounts = (wp.waveTitle.length - 1) / iphasicValue;
|
const picCounts = (wp.waveTitle.length - 1) / iphasicValue
|
||||||
const waveDatas = [];
|
const waveDatas = []
|
||||||
|
|
||||||
for (let i = 0; i < picCounts; i++) {
|
for (let i = 0; i < picCounts; i++) {
|
||||||
const data = fliteWaveData(wp, i, iphasicValue, isOpen,boxoList);
|
const data = fliteWaveData(wp, i, iphasicValue, isOpen, boxoList)
|
||||||
waveDatas.push(data);
|
waveDatas.push(data)
|
||||||
}
|
}
|
||||||
// 处理标题
|
// 处理标题
|
||||||
let titles = "";
|
let titles = ''
|
||||||
if (boxoList.systemType == "pms") {
|
if (boxoList.systemType == 'pms') {
|
||||||
titles =
|
titles =
|
||||||
"变电站名称:" +
|
'变电站名称:' +
|
||||||
boxoList.powerStationName +
|
boxoList.powerStationName +
|
||||||
" 监测点名称:" +
|
' 监测点名称:' +
|
||||||
boxoList.measurementPointName +
|
boxoList.measurementPointName +
|
||||||
" 发生时刻:" +
|
' 发生时刻:' +
|
||||||
boxoList.startTime +
|
boxoList.startTime +
|
||||||
" 残余电压:" +
|
' 残余电压:' +
|
||||||
(boxoList.featureAmplitude * 100).toFixed(2) +
|
(boxoList.featureAmplitude * 100).toFixed(2) +
|
||||||
"% 持续时间:" +
|
'% 持续时间:' +
|
||||||
boxoList.duration +
|
boxoList.duration +
|
||||||
"s";
|
's'
|
||||||
} else if (boxoList.systemType == "ZL") {
|
} else if (boxoList.systemType == 'ZL') {
|
||||||
titles =
|
titles =
|
||||||
" 监测点名称:" +
|
' 监测点名称:' +
|
||||||
boxoList.equipmentName +
|
boxoList.equipmentName +
|
||||||
" 发生时刻:" +
|
' 发生时刻:' +
|
||||||
boxoList.startTime +
|
boxoList.startTime +
|
||||||
" 残余电压:" +
|
' 残余电压:' +
|
||||||
boxoList.evtParamVVaDepth +
|
boxoList.evtParamVVaDepth +
|
||||||
" 持续时间:" +
|
' 持续时间:' +
|
||||||
boxoList.evtParamTm +
|
boxoList.evtParamTm +
|
||||||
"s";
|
's'
|
||||||
|
} else if (boxoList.systemType == 'YPT') {
|
||||||
|
titles =
|
||||||
|
' 监测点名称:' +
|
||||||
|
boxoList.lineName +
|
||||||
|
' 发生时刻:' +
|
||||||
|
boxoList.startTime +
|
||||||
|
' 残余电压:' +
|
||||||
|
(boxoList.featureAmplitude * 100).toFixed(2) +
|
||||||
|
'% 持续时间:' +
|
||||||
|
boxoList.persistTime +
|
||||||
|
's'
|
||||||
} else {
|
} else {
|
||||||
titles =
|
titles =
|
||||||
"变电站名称:" +
|
'变电站名称:' +
|
||||||
boxoList.subName +
|
boxoList.subName +
|
||||||
" 监测点名称:" +
|
' 监测点名称:' +
|
||||||
boxoList.lineName +
|
boxoList.lineName +
|
||||||
" 发生时刻:" +
|
' 发生时刻:' +
|
||||||
boxoList.startTime +
|
boxoList.startTime +
|
||||||
" 残余电压:" +
|
' 残余电压:' +
|
||||||
(boxoList.featureAmplitude * 100).toFixed(2) +
|
(boxoList.featureAmplitude * 100).toFixed(2) +
|
||||||
"% 持续时间:" +
|
'% 持续时间:' +
|
||||||
boxoList.duration +
|
boxoList.duration +
|
||||||
"s";
|
's'
|
||||||
}
|
}
|
||||||
// 发送处理结果回主线程
|
// 发送处理结果回主线程
|
||||||
self.postMessage({
|
self.postMessage({
|
||||||
@@ -300,12 +307,12 @@ self.onmessage = function (e) {
|
|||||||
time: wp.time,
|
time: wp.time,
|
||||||
type: wp.waveType,
|
type: wp.waveType,
|
||||||
severity: wp.yzd,
|
severity: wp.yzd,
|
||||||
iphasic: iphasicValue,
|
iphasic: iphasicValue
|
||||||
});
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
self.postMessage({
|
self.postMessage({
|
||||||
success: false,
|
success: false,
|
||||||
error: error.message,
|
error: error.message
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user