查看波形图联调修改

This commit is contained in:
stt
2025-11-26 15:37:56 +08:00
parent af3f9fe607
commit e759f443d3
3 changed files with 301 additions and 221 deletions

View File

@@ -2,14 +2,10 @@
<div>
<!-- 暂态事件详情 -->
<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>
<el-form-item label="监测点名称">
<el-select
v-model="tableStore.table.params.searchValue"
placeholder="请选择监测点名称"
style="width: 240px"
>
<el-form-item label="监测点">
<el-select v-model="tableStore.table.params.lineId" placeholder="请选择监测点名称">
<el-option
v-for="item in options"
:key="item.value"
@@ -20,15 +16,22 @@
</el-form-item>
</template>
</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 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
v-loading="loading"
v-if="isWaveCharts"
ref="waveFormAnalysisRef"
@handleHideCharts="isWaveCharts = false"
@handleHideCharts="handleHideCharts"
:wp="wp"
/>
</el-dialog>
@@ -50,18 +53,22 @@ const loading = ref(false)
const wp = ref({})
const boxoList: any = ref({})
const tableHeaderRef = ref()
const options = [
{
value: '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({
url: '/user-boot/role/selectRoleDetail?id=0',
url: '/cs-harmonic-boot/event/pageEvent',
method: 'POST',
publicHeight: 30,
showPage: false,
showPage: true,
exportName: '主要监测点列表',
column: [
{
@@ -74,36 +81,49 @@ const tableStore: any = new TableStore({
},
{
title: '暂态时间',
field: 'time'
field: 'startTime'
},
{
title: '测点名称',
field: 'name',
field: 'lineName',
width: '150'
},
{
title: '暂态类型',
field: 'flicker',
field: 'tag',
width: '100'
},
{
title: '特征幅值(%)',
field: 'flicker',
field: 'amplitude',
width: '100'
},
{
title: '暂降深度(%)',
field: 'flicker',
width: '100'
field: 'depth',
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)',
field: 'flicker',
field: 'persistTime',
width: '100'
},
{
title: '严重度',
field: 'flicker',
field: 'severity',
width: '80'
},
{
@@ -112,27 +132,38 @@ const tableStore: any = new TableStore({
render: 'buttons',
buttons: [
{
name: 'check',
title: '查看波形',
name: 'edit',
text: '波形分析',
type: 'primary',
icon: 'el-icon-EditPen',
icon: 'el-icon-DataLine',
render: 'basicButton',
loading: 'loading1',
// disabled: row => {
// return !row.wavePath
// },
disabled: row => {
return !row.wavePath
},
click: async row => {
row.loading1 = true
loading.value = true
isWaveCharts.value = true
dialogVisible.value = false
// 在打开弹窗时立即设置高度
nextTick(() => {
if (waveFormAnalysisRef.value) {
waveFormAnalysisRef.value.setHeight(false, 360)
}
})
await analyseWave(row.id)
.then(res => {
row.loading1 = false
if (res != undefined) {
boxoList.value = row
// boxoList.value = {
// ...row,
// duration: row.persistTime // 将 persistTime 值赋给 duration
// }
boxoList.value.featureAmplitude =
row.evtParamVVaDepth != '-' ? row.evtParamVVaDepth - 0 : null
boxoList.value.systemType = 'WX'
boxoList.value.systemType = 'YPT'
wp.value = res.data
}
loading.value = false
@@ -145,39 +176,60 @@ const tableStore: any = new TableStore({
nextTick(() => {
waveFormAnalysisRef.value &&
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: () => {},
loadCallback: () => {
tableStore.table.data = [
{
time: '2024-01-01 00:00:00',
name: '35kV进线',
flicker: '0'
},
{
time: '2024-01-01 00:00:00',
name: '35kV进线',
flicker: '0'
},
{
time: '2024-01-01 00:00:00',
name: '35kV进线',
flicker: '0'
}
]
// tableStore.table.data = [
// {
// time: '2024-01-01 00:00:00',
// name: '35kV进线',
// flicker: '0'
// },
// {
// time: '2024-01-01 00:00:00',
// name: '35kV进线',
// flicker: '0'
// },
// {
// time: '2024-01-01 00:00:00',
// name: '35kV进线',
// flicker: '0'
// }
// ]
}
})
tableStore.table.params.searchValue = ''
provide('tableStore', tableStore)
const open = async (row: any) => {
const open = async (row: any, searchBeginTime: any, searchEndTime: any) => {
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()
})
}
const handleHideCharts = () => {
isWaveCharts.value = false
dialogVisible.value = true
tableStore.index()
}
// 点击行

View File

@@ -24,12 +24,9 @@ import { ref, onMounted, provide, reactive, watch, h } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import MyEchart from '@/components/echarts/MyEchart.vue'
import { getTimeOfTheMonth } from '@/utils/formatTime'
import { useConfig } from '@/stores/config'
import TransientStatisticsDetail from '@/components/cockpit/transientStatistics/components/transientStatisticsDetail.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'
const prop = defineProps({
@@ -76,7 +73,7 @@ const eventEcharts = () => {
searchEndTime: tableStore.table.params.searchEndTime || prop.timeValue?.[1]
}).then(res => {
// 整理接口数据为图表所需格式
const rawData = res.data || {};
const rawData = res.data || {}
data.value = [
{
name: '电压中断',
@@ -90,8 +87,8 @@ const eventEcharts = () => {
name: '电压暂升',
value: rawData.eventUp || 0
}
];
]
echartList.value = {
title: {},
tooltip: {
@@ -124,7 +121,7 @@ const eventEcharts = () => {
left: 'center'
},
{
text: (rawData.eventOff + rawData.eventDown + rawData.eventUp) + '次',
text: rawData.eventOff + rawData.eventDown + rawData.eventUp + '次',
left: 'center',
top: 'center'
}
@@ -174,6 +171,7 @@ const tableStore: any = new TableStore({
title: '电压中断(次)',
field: 'eventOff',
minWidth: '70',
sortable: true,
render: 'customTemplate',
customTemplate: (row: any) => {
return `<span style='cursor: pointer;text-decoration: underline;'>${row.eventOff}</span>`
@@ -183,6 +181,7 @@ const tableStore: any = new TableStore({
title: '电压暂降(次)',
field: 'eventDown',
minWidth: '80',
sortable: true,
render: 'customTemplate',
customTemplate: (row: any) => {
return `<span style='cursor: pointer;text-decoration: underline;'>${row.eventDown}</span>`
@@ -192,6 +191,7 @@ const tableStore: any = new TableStore({
title: '电压暂升(次)',
field: 'eventUp',
minWidth: '80',
sortable: true,
render: 'customTemplate',
customTemplate: (row: any) => {
return `<span style='cursor: pointer;text-decoration: underline;'>${row.eventUp}</span>`
@@ -215,7 +215,11 @@ provide('tableStore', tableStore)
// 点击行
const cellClickEvent = ({ row, column }: any) => {
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]
)
}
}