查看波形图联调修改
This commit is contained in:
@@ -2,14 +2,10 @@
|
|||||||
<div>
|
<div>
|
||||||
<!-- 暂态事件详情 -->
|
<!-- 暂态事件详情 -->
|
||||||
<el-dialog draggable title="暂态事件详情 " v-model="dialogVisible" append-to-body width="70%">
|
<el-dialog draggable title="暂态事件详情 " v-model="dialogVisible" append-to-body width="70%">
|
||||||
<TableHeader datePicker showExport :showReset="false">
|
<TableHeader datePicker showExport :showReset="false" ref="tableHeaderRef" @selectChange="selectChange">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="监测点名称">
|
<el-form-item label="监测点">
|
||||||
<el-select
|
<el-select v-model="tableStore.table.params.lineId" placeholder="请选择监测点名称">
|
||||||
v-model="tableStore.table.params.searchValue"
|
|
||||||
placeholder="请选择监测点名称"
|
|
||||||
style="width: 240px"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options"
|
v-for="item in options"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -20,15 +16,22 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" @cell-click="cellClickEvent" isGroup :height="height"></Table>
|
<Table ref="tableRef" @cell-click="cellClickEvent" isGroup :height="heightRef"></Table>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 查看波形 -->
|
<!-- 查看波形 -->
|
||||||
<el-dialog v-model="isWaveCharts" draggable title="瞬时/RMS波形" append-to-body width="70%">
|
<el-dialog
|
||||||
|
v-model="isWaveCharts"
|
||||||
|
draggable
|
||||||
|
title="瞬时/RMS波形"
|
||||||
|
append-to-body
|
||||||
|
width="70%"
|
||||||
|
@close="handleHideCharts"
|
||||||
|
>
|
||||||
<waveFormAnalysis
|
<waveFormAnalysis
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
v-if="isWaveCharts"
|
v-if="isWaveCharts"
|
||||||
ref="waveFormAnalysisRef"
|
ref="waveFormAnalysisRef"
|
||||||
@handleHideCharts="isWaveCharts = false"
|
@handleHideCharts="handleHideCharts"
|
||||||
:wp="wp"
|
:wp="wp"
|
||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -50,18 +53,22 @@ const loading = ref(false)
|
|||||||
const wp = ref({})
|
const wp = ref({})
|
||||||
const boxoList: any = ref({})
|
const boxoList: any = ref({})
|
||||||
|
|
||||||
|
const tableHeaderRef = ref()
|
||||||
|
|
||||||
const options = [
|
const options = [
|
||||||
{
|
{
|
||||||
value: '35kV进线',
|
value: '35kV进线',
|
||||||
label: '35kV进线'
|
label: '35kV进线'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const height = mainHeight(0, 2).height as any
|
const heightRef = ref(mainHeight(57, 2.3).height)
|
||||||
|
const selectChange = (flag: boolean, h: any) => {
|
||||||
|
heightRef.value = mainHeight(h, 2.3).height
|
||||||
|
}
|
||||||
const tableStore: any = new TableStore({
|
const tableStore: any = new TableStore({
|
||||||
url: '/user-boot/role/selectRoleDetail?id=0',
|
url: '/cs-harmonic-boot/event/pageEvent',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
publicHeight: 30,
|
showPage: true,
|
||||||
showPage: false,
|
|
||||||
exportName: '主要监测点列表',
|
exportName: '主要监测点列表',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
@@ -74,36 +81,49 @@ const tableStore: any = new TableStore({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '暂态时间',
|
title: '暂态时间',
|
||||||
field: 'time'
|
field: 'startTime'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '测点名称',
|
title: '测点名称',
|
||||||
field: 'name',
|
field: 'lineName',
|
||||||
width: '150'
|
width: '150'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '暂态类型',
|
title: '暂态类型',
|
||||||
field: 'flicker',
|
field: 'tag',
|
||||||
width: '100'
|
width: '100'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '特征幅值(%)',
|
title: '特征幅值(%)',
|
||||||
field: 'flicker',
|
field: 'amplitude',
|
||||||
width: '100'
|
width: '100'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '暂降深度(%)',
|
title: '暂降深度(%)',
|
||||||
field: 'flicker',
|
field: 'depth',
|
||||||
width: '100'
|
width: '100',
|
||||||
|
formatter: (row: any) => {
|
||||||
|
// 当暂态类型不是电压暂升时,计算暂降深度 = 100 - 特征幅值
|
||||||
|
if (row.tag !== '电压暂升') {
|
||||||
|
const amplitude = parseFloat(row.row.amplitude)
|
||||||
|
if (!isNaN(amplitude)) {
|
||||||
|
return 100 - amplitude
|
||||||
|
}
|
||||||
|
return '-'
|
||||||
|
} else {
|
||||||
|
// 电压暂升时不显示暂降深度
|
||||||
|
return '/'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '持续时间(S)',
|
title: '持续时间(S)',
|
||||||
field: 'flicker',
|
field: 'persistTime',
|
||||||
width: '100'
|
width: '100'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '严重度',
|
title: '严重度',
|
||||||
field: 'flicker',
|
field: 'severity',
|
||||||
width: '80'
|
width: '80'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -112,27 +132,38 @@ const tableStore: any = new TableStore({
|
|||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'check',
|
name: 'edit',
|
||||||
title: '查看波形',
|
text: '波形分析',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-DataLine',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
loading: 'loading1',
|
disabled: row => {
|
||||||
// disabled: row => {
|
return !row.wavePath
|
||||||
// return !row.wavePath
|
},
|
||||||
// },
|
|
||||||
click: async row => {
|
click: async row => {
|
||||||
row.loading1 = true
|
row.loading1 = true
|
||||||
loading.value = true
|
loading.value = true
|
||||||
isWaveCharts.value = true
|
isWaveCharts.value = true
|
||||||
|
dialogVisible.value = false
|
||||||
|
// 在打开弹窗时立即设置高度
|
||||||
|
nextTick(() => {
|
||||||
|
if (waveFormAnalysisRef.value) {
|
||||||
|
waveFormAnalysisRef.value.setHeight(false, 360)
|
||||||
|
}
|
||||||
|
})
|
||||||
await analyseWave(row.id)
|
await analyseWave(row.id)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
row.loading1 = false
|
row.loading1 = false
|
||||||
if (res != undefined) {
|
if (res != undefined) {
|
||||||
boxoList.value = row
|
boxoList.value = row
|
||||||
|
// boxoList.value = {
|
||||||
|
// ...row,
|
||||||
|
// duration: row.persistTime // 将 persistTime 值赋给 duration
|
||||||
|
// }
|
||||||
boxoList.value.featureAmplitude =
|
boxoList.value.featureAmplitude =
|
||||||
row.evtParamVVaDepth != '-' ? row.evtParamVVaDepth - 0 : null
|
row.evtParamVVaDepth != '-' ? row.evtParamVVaDepth - 0 : null
|
||||||
boxoList.value.systemType = 'WX'
|
boxoList.value.systemType = 'YPT'
|
||||||
wp.value = res.data
|
wp.value = res.data
|
||||||
}
|
}
|
||||||
loading.value = false
|
loading.value = false
|
||||||
@@ -145,39 +176,60 @@ const tableStore: any = new TableStore({
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
waveFormAnalysisRef.value &&
|
waveFormAnalysisRef.value &&
|
||||||
waveFormAnalysisRef.value.getWpData(wp.value, boxoList.value, true)
|
waveFormAnalysisRef.value.getWpData(wp.value, boxoList.value, true)
|
||||||
|
// waveFormAnalysisRef.value && waveFormAnalysisRef.value.setHeight(false, 360)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
text: '暂无波形',
|
||||||
|
type: 'info',
|
||||||
|
icon: 'el-icon-DataLine',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return !(!row.wavePath && row.evtParamTm < 20)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {},
|
beforeSearchFun: () => {},
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data = [
|
// tableStore.table.data = [
|
||||||
{
|
// {
|
||||||
time: '2024-01-01 00:00:00',
|
// time: '2024-01-01 00:00:00',
|
||||||
name: '35kV进线',
|
// name: '35kV进线',
|
||||||
flicker: '0'
|
// flicker: '0'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
time: '2024-01-01 00:00:00',
|
// time: '2024-01-01 00:00:00',
|
||||||
name: '35kV进线',
|
// name: '35kV进线',
|
||||||
flicker: '0'
|
// flicker: '0'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
time: '2024-01-01 00:00:00',
|
// time: '2024-01-01 00:00:00',
|
||||||
name: '35kV进线',
|
// name: '35kV进线',
|
||||||
flicker: '0'
|
// flicker: '0'
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.searchValue = ''
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
const open = async (row: any) => {
|
const open = async (row: any, searchBeginTime: any, searchEndTime: any) => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
|
tableStore.table.params.lineId = row.id
|
||||||
|
nextTick(() => {
|
||||||
|
tableHeaderRef.value.setTimeInterval([searchBeginTime, searchEndTime])
|
||||||
|
tableStore.table.params.searchBeginTime = searchBeginTime
|
||||||
|
tableStore.table.params.searchEndTime = searchEndTime
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleHideCharts = () => {
|
||||||
|
isWaveCharts.value = false
|
||||||
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 点击行
|
// 点击行
|
||||||
|
|||||||
@@ -24,12 +24,9 @@ import { ref, onMounted, provide, reactive, watch, h } from 'vue'
|
|||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||||
import { getTimeOfTheMonth } from '@/utils/formatTime'
|
|
||||||
import { useConfig } from '@/stores/config'
|
import { useConfig } from '@/stores/config'
|
||||||
import TransientStatisticsDetail from '@/components/cockpit/transientStatistics/components/transientStatisticsDetail.vue'
|
import TransientStatisticsDetail from '@/components/cockpit/transientStatistics/components/transientStatisticsDetail.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useRoute } from 'vue-router'
|
|
||||||
import { useTimeCacheStore } from '@/stores/timeCache'
|
|
||||||
import { netEventEcharts } from '@/api/harmonic-boot/cockpit/cockpit'
|
import { netEventEcharts } from '@/api/harmonic-boot/cockpit/cockpit'
|
||||||
|
|
||||||
const prop = defineProps({
|
const prop = defineProps({
|
||||||
@@ -76,7 +73,7 @@ const eventEcharts = () => {
|
|||||||
searchEndTime: tableStore.table.params.searchEndTime || prop.timeValue?.[1]
|
searchEndTime: tableStore.table.params.searchEndTime || prop.timeValue?.[1]
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
// 整理接口数据为图表所需格式
|
// 整理接口数据为图表所需格式
|
||||||
const rawData = res.data || {};
|
const rawData = res.data || {}
|
||||||
data.value = [
|
data.value = [
|
||||||
{
|
{
|
||||||
name: '电压中断',
|
name: '电压中断',
|
||||||
@@ -90,7 +87,7 @@ const eventEcharts = () => {
|
|||||||
name: '电压暂升',
|
name: '电压暂升',
|
||||||
value: rawData.eventUp || 0
|
value: rawData.eventUp || 0
|
||||||
}
|
}
|
||||||
];
|
]
|
||||||
|
|
||||||
echartList.value = {
|
echartList.value = {
|
||||||
title: {},
|
title: {},
|
||||||
@@ -124,7 +121,7 @@ const eventEcharts = () => {
|
|||||||
left: 'center'
|
left: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: (rawData.eventOff + rawData.eventDown + rawData.eventUp) + '次',
|
text: rawData.eventOff + rawData.eventDown + rawData.eventUp + '次',
|
||||||
left: 'center',
|
left: 'center',
|
||||||
top: 'center'
|
top: 'center'
|
||||||
}
|
}
|
||||||
@@ -174,6 +171,7 @@ const tableStore: any = new TableStore({
|
|||||||
title: '电压中断(次)',
|
title: '电压中断(次)',
|
||||||
field: 'eventOff',
|
field: 'eventOff',
|
||||||
minWidth: '70',
|
minWidth: '70',
|
||||||
|
sortable: true,
|
||||||
render: 'customTemplate',
|
render: 'customTemplate',
|
||||||
customTemplate: (row: any) => {
|
customTemplate: (row: any) => {
|
||||||
return `<span style='cursor: pointer;text-decoration: underline;'>${row.eventOff}</span>`
|
return `<span style='cursor: pointer;text-decoration: underline;'>${row.eventOff}</span>`
|
||||||
@@ -183,6 +181,7 @@ const tableStore: any = new TableStore({
|
|||||||
title: '电压暂降(次)',
|
title: '电压暂降(次)',
|
||||||
field: 'eventDown',
|
field: 'eventDown',
|
||||||
minWidth: '80',
|
minWidth: '80',
|
||||||
|
sortable: true,
|
||||||
render: 'customTemplate',
|
render: 'customTemplate',
|
||||||
customTemplate: (row: any) => {
|
customTemplate: (row: any) => {
|
||||||
return `<span style='cursor: pointer;text-decoration: underline;'>${row.eventDown}</span>`
|
return `<span style='cursor: pointer;text-decoration: underline;'>${row.eventDown}</span>`
|
||||||
@@ -192,6 +191,7 @@ const tableStore: any = new TableStore({
|
|||||||
title: '电压暂升(次)',
|
title: '电压暂升(次)',
|
||||||
field: 'eventUp',
|
field: 'eventUp',
|
||||||
minWidth: '80',
|
minWidth: '80',
|
||||||
|
sortable: true,
|
||||||
render: 'customTemplate',
|
render: 'customTemplate',
|
||||||
customTemplate: (row: any) => {
|
customTemplate: (row: any) => {
|
||||||
return `<span style='cursor: pointer;text-decoration: underline;'>${row.eventUp}</span>`
|
return `<span style='cursor: pointer;text-decoration: underline;'>${row.eventUp}</span>`
|
||||||
@@ -215,7 +215,11 @@ provide('tableStore', tableStore)
|
|||||||
// 点击行
|
// 点击行
|
||||||
const cellClickEvent = ({ row, column }: any) => {
|
const cellClickEvent = ({ row, column }: any) => {
|
||||||
if (column.field != 'name') {
|
if (column.field != 'name') {
|
||||||
transientStatisticsDetailRef.value.open(row)
|
transientStatisticsDetailRef.value.open(
|
||||||
|
row,
|
||||||
|
tableStore.table.params.searchBeginTime || prop.timeValue?.[0],
|
||||||
|
tableStore.table.params.searchEndTime || prop.timeValue?.[1]
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,120 +1,131 @@
|
|||||||
// waveData.worker.js
|
// waveData.worker.js
|
||||||
self.addEventListener('message', function(e) {
|
self.addEventListener('message', function (e) {
|
||||||
const { wp, value, iphasic, isOpen, boxoList } = JSON.parse(e.data);
|
const { wp, value, iphasic, isOpen, boxoList } = JSON.parse(e.data)
|
||||||
|
|
||||||
// 处理波形数据的函数
|
// 处理波形数据的函数
|
||||||
const fliteWaveData = (wp, step) => {
|
const fliteWaveData = (wp, step) => {
|
||||||
// 将原有的fliteWaveData函数实现复制到这里
|
// 将原有的fliteWaveData函数实现复制到这里
|
||||||
const shunData = wp.listWaveData;
|
const shunData = wp.listWaveData
|
||||||
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 = '', bTitle = '', cTitle = '', unit = '电压';
|
let aTitle = '',
|
||||||
let ifmax = 0, ifmin = 0, ismax = 0, ismin = 0;
|
bTitle = '',
|
||||||
|
cTitle = '',
|
||||||
|
unit = '电压'
|
||||||
|
let ifmax = 0,
|
||||||
|
ifmin = 0,
|
||||||
|
ismax = 0,
|
||||||
|
ismin = 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 = []
|
||||||
|
|
||||||
if (shunData.length > 0) {
|
if (shunData.length > 0) {
|
||||||
if (titleList[iphasic * step + 1]?.substring(0, 1) !== 'U') {
|
if (titleList[iphasic * step + 1]?.substring(0, 1) !== 'U') {
|
||||||
xishu = ct;
|
xishu = ct
|
||||||
unit = '电流';
|
unit = '电流'
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 1; i <= iphasic; i++) {
|
for (let i = 1; i <= iphasic; i++) {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 1:
|
case 1:
|
||||||
aTitle = titleList[iphasic * step + i]?.substring(1) || '';
|
aTitle = titleList[iphasic * step + i]?.substring(1) || ''
|
||||||
break;
|
break
|
||||||
case 2:
|
case 2:
|
||||||
bTitle = titleList[iphasic * step + i]?.substring(1) || '';
|
bTitle = titleList[iphasic * step + i]?.substring(1) || ''
|
||||||
break;
|
break
|
||||||
case 3:
|
case 3:
|
||||||
cTitle = titleList[iphasic * step + i]?.substring(1) || '';
|
cTitle = titleList[iphasic * step + i]?.substring(1) || ''
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shunData[0][iphasic * step + 1] !== undefined) {
|
if (shunData[0][iphasic * step + 1] !== undefined) {
|
||||||
ifmax = shunData[0][iphasic * step + 1] * xishu;
|
ifmax = shunData[0][iphasic * step + 1] * xishu
|
||||||
ifmin = shunData[0][iphasic * step + 1] * xishu;
|
ifmin = shunData[0][iphasic * step + 1] * xishu
|
||||||
ismax = shunData[0][iphasic * step + 1];
|
ismax = shunData[0][iphasic * step + 1]
|
||||||
ismin = shunData[0][iphasic * step + 1];
|
ismin = shunData[0][iphasic * step + 1]
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let shun = 0; shun < shunData.length; shun++) {
|
for (let shun = 0; shun < shunData.length; shun++) {
|
||||||
if (shunData[shun][iphasic * step + 1] === undefined) {
|
if (shunData[shun][iphasic * step + 1] === undefined) {
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (iphasic) {
|
switch (iphasic) {
|
||||||
case 1:
|
case 1:
|
||||||
const shunFirstA = shunData[shun][iphasic * step + 1] * xishu;
|
const shunFirstA = shunData[shun][iphasic * step + 1] * xishu
|
||||||
shunshiFA.push([shunData[shun][0], shunFirstA]);
|
shunshiFA.push([shunData[shun][0], shunFirstA])
|
||||||
ifmax = Math.max(ifmax, shunFirstA);
|
ifmax = Math.max(ifmax, shunFirstA)
|
||||||
ifmin = Math.min(ifmin, shunFirstA);
|
ifmin = Math.min(ifmin, shunFirstA)
|
||||||
|
|
||||||
const shunSecondA = shunData[shun][iphasic * step + 1];
|
const shunSecondA = shunData[shun][iphasic * step + 1]
|
||||||
shunshiSA.push([shunData[shun][0], shunSecondA]);
|
shunshiSA.push([shunData[shun][0], shunSecondA])
|
||||||
ismax = Math.max(ismax, shunSecondA);
|
ismax = Math.max(ismax, shunSecondA)
|
||||||
ismin = Math.min(ismin, shunSecondA);
|
ismin = Math.min(ismin, shunSecondA)
|
||||||
break;
|
break
|
||||||
case 2:
|
case 2:
|
||||||
const shunFirstA2 = shunData[shun][iphasic * step + 1] * xishu;
|
const shunFirstA2 = shunData[shun][iphasic * step + 1] * xishu
|
||||||
const shunFirstB2 = shunData[shun][iphasic * step + 2] * xishu;
|
const shunFirstB2 = shunData[shun][iphasic * step + 2] * xishu
|
||||||
shunshiFA.push([shunData[shun][0], shunFirstA2]);
|
shunshiFA.push([shunData[shun][0], shunFirstA2])
|
||||||
shunshiFB.push([shunData[shun][0], shunFirstB2]);
|
shunshiFB.push([shunData[shun][0], shunFirstB2])
|
||||||
ifmax = Math.max(ifmax, shunFirstA2, shunFirstB2);
|
ifmax = Math.max(ifmax, shunFirstA2, shunFirstB2)
|
||||||
ifmin = Math.min(ifmin, shunFirstA2, shunFirstB2);
|
ifmin = Math.min(ifmin, shunFirstA2, shunFirstB2)
|
||||||
|
|
||||||
const shunSecondA2 = shunData[shun][iphasic * step + 1];
|
const shunSecondA2 = shunData[shun][iphasic * step + 1]
|
||||||
const shunSecondB2 = shunData[shun][iphasic * step + 2];
|
const shunSecondB2 = shunData[shun][iphasic * step + 2]
|
||||||
shunshiSA.push([shunData[shun][0], shunSecondA2]);
|
shunshiSA.push([shunData[shun][0], shunSecondA2])
|
||||||
shunshiSB.push([shunData[shun][0], shunSecondB2]);
|
shunshiSB.push([shunData[shun][0], shunSecondB2])
|
||||||
ismax = Math.max(ismax, shunSecondA2, shunSecondB2);
|
ismax = Math.max(ismax, shunSecondA2, shunSecondB2)
|
||||||
ismin = Math.min(ismin, shunSecondA2, shunSecondB2);
|
ismin = Math.min(ismin, shunSecondA2, shunSecondB2)
|
||||||
break;
|
break
|
||||||
case 3:
|
case 3:
|
||||||
const shunFirstA3 = shunData[shun][iphasic * step + 1] * xishu;
|
const shunFirstA3 = shunData[shun][iphasic * step + 1] * xishu
|
||||||
const shunFirstB3 = shunData[shun][iphasic * step + 2] * xishu;
|
const shunFirstB3 = shunData[shun][iphasic * step + 2] * xishu
|
||||||
const shunFirstC3 = shunData[shun][iphasic * step + 3] * xishu;
|
const shunFirstC3 = shunData[shun][iphasic * step + 3] * xishu
|
||||||
shunshiFA.push([shunData[shun][0], shunFirstA3]);
|
shunshiFA.push([shunData[shun][0], shunFirstA3])
|
||||||
shunshiFB.push([shunData[shun][0], shunFirstB3]);
|
shunshiFB.push([shunData[shun][0], shunFirstB3])
|
||||||
shunshiFC.push([shunData[shun][0], shunFirstC3]);
|
shunshiFC.push([shunData[shun][0], shunFirstC3])
|
||||||
ifmax = Math.max(ifmax, shunFirstA3, shunFirstB3, shunFirstC3);
|
ifmax = Math.max(ifmax, shunFirstA3, shunFirstB3, shunFirstC3)
|
||||||
ifmin = isOpen ? Math.min(ifmin, shunFirstA3, shunFirstC3) : Math.min(ifmin, shunFirstA3, shunFirstB3, shunFirstC3);
|
ifmin = isOpen
|
||||||
|
? Math.min(ifmin, shunFirstA3, shunFirstC3)
|
||||||
|
: Math.min(ifmin, shunFirstA3, shunFirstB3, shunFirstC3)
|
||||||
|
|
||||||
const shunSecondA3 = shunData[shun][iphasic * step + 1];
|
const shunSecondA3 = shunData[shun][iphasic * step + 1]
|
||||||
const shunSecondB3 = shunData[shun][iphasic * step + 2];
|
const shunSecondB3 = shunData[shun][iphasic * step + 2]
|
||||||
const shunSecondC3 = shunData[shun][iphasic * step + 3];
|
const shunSecondC3 = shunData[shun][iphasic * step + 3]
|
||||||
shunshiSA.push([shunData[shun][0], shunSecondA3]);
|
shunshiSA.push([shunData[shun][0], shunSecondA3])
|
||||||
shunshiSB.push([shunData[shun][0], shunSecondB3]);
|
shunshiSB.push([shunData[shun][0], shunSecondB3])
|
||||||
shunshiSC.push([shunData[shun][0], shunSecondC3]);
|
shunshiSC.push([shunData[shun][0], shunSecondC3])
|
||||||
ismax = Math.max(ismax, shunSecondA3, shunSecondB3, shunSecondC3);
|
ismax = Math.max(ismax, shunSecondA3, shunSecondB3, shunSecondC3)
|
||||||
ismin = isOpen ? Math.min(ismin, shunSecondA3, shunSecondC3) : Math.min(ismin, shunSecondA3, shunSecondB3, shunSecondC3);
|
ismin = isOpen
|
||||||
break;
|
? Math.min(ismin, shunSecondA3, shunSecondC3)
|
||||||
|
: Math.min(ismin, shunSecondA3, shunSecondB3, shunSecondC3)
|
||||||
|
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 shunshiF = { shunshiFA, shunshiFB, shunshiFC };
|
const shunshiF = { shunshiFA, shunshiFB, shunshiFC }
|
||||||
const shunshiS = { shunshiSA, shunshiSB, shunshiSC };
|
const shunshiS = { shunshiSA, shunshiSB, shunshiSC }
|
||||||
const title = { aTitle, bTitle, cTitle, unit };
|
const title = { aTitle, bTitle, cTitle, unit }
|
||||||
|
|
||||||
return { instantF, instantS, shunshiF, shunshiS, title, unit };
|
return { instantF, instantS, shunshiF, shunshiS, title, unit }
|
||||||
};
|
}
|
||||||
|
|
||||||
// 处理标题
|
// 处理标题
|
||||||
let titles = '';
|
let titles = ''
|
||||||
if (boxoList.systemType == 'pms') {
|
if (boxoList.systemType == 'pms') {
|
||||||
titles = '变电站名称:' +
|
titles =
|
||||||
|
'变电站名称:' +
|
||||||
boxoList.powerStationName +
|
boxoList.powerStationName +
|
||||||
' 监测点名称:' +
|
' 监测点名称:' +
|
||||||
boxoList.measurementPointName +
|
boxoList.measurementPointName +
|
||||||
@@ -124,9 +135,10 @@ self.addEventListener('message', function(e) {
|
|||||||
(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 +
|
||||||
@@ -134,9 +146,21 @@ self.addEventListener('message', function(e) {
|
|||||||
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 +
|
||||||
@@ -146,25 +170,25 @@ self.addEventListener('message', function(e) {
|
|||||||
(boxoList.featureAmplitude * 100).toFixed(2) +
|
(boxoList.featureAmplitude * 100).toFixed(2) +
|
||||||
'% 持续时间:' +
|
'% 持续时间:' +
|
||||||
boxoList.duration +
|
boxoList.duration +
|
||||||
's';
|
's'
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
const data = fliteWaveData(wp, i)
|
||||||
waveDatas.push(data);
|
waveDatas.push(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
const time = wp.time;
|
const time = wp.time
|
||||||
const type = wp.waveType;
|
const type = wp.waveType
|
||||||
let severity = wp.yzd;
|
let severity = wp.yzd
|
||||||
|
|
||||||
if (severity < 0) {
|
if (severity < 0) {
|
||||||
severity = '/';
|
severity = '/'
|
||||||
type = '/';
|
type = '/'
|
||||||
}
|
}
|
||||||
|
|
||||||
// 将处理结果发送回主线程
|
// 将处理结果发送回主线程
|
||||||
@@ -175,5 +199,5 @@ self.addEventListener('message', function(e) {
|
|||||||
severity,
|
severity,
|
||||||
titles,
|
titles,
|
||||||
iphasic: iphasicValue
|
iphasic: iphasicValue
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user