F47曲线详情,暂态事件明细详情联调

This commit is contained in:
stt
2025-11-28 14:06:33 +08:00
parent 80182cdc6f
commit 58bc269940
5 changed files with 175 additions and 77 deletions

View File

@@ -409,7 +409,7 @@ onMounted(() => {
})
// 点击事件处理函数
const handleChartClick = (params: any) => {
const handleChartClick = (params: any, e: any) => {
if (params.seriesName === '可容忍事件') {
// 处理可容忍事件点击
dialogTitle.value = '可容忍事件波形分析'

View File

@@ -1,15 +1,11 @@
<template>
<div>
<!-- 暂态事件列表 -->
<el-dialog draggable title="暂态事件列表" v-model="dialogVisible" append-to-body width="70%">
<!-- <TableHeader datePicker showExport :showReset="false">
<!-- 暂态事件详情 -->
<el-dialog draggable title="暂态事件详情 " v-model="dialogVisible" append-to-body width="70%">
<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"
@@ -19,8 +15,25 @@
</el-select>
</el-form-item>
</template>
</TableHeader> -->
<Table ref="tableRef" isGroup :height="height"></Table>
</TableHeader>
<Table ref="tableRef" isGroup :height="heightRef"></Table>
</el-dialog>
<!-- 查看波形 -->
<el-dialog
v-model="isWaveCharts"
draggable
title="波形分析"
append-to-body
width="70%"
@close="handleHideCharts"
>
<waveFormAnalysis
v-loading="loading"
v-if="isWaveCharts"
ref="waveFormAnalysisRef"
@handleHideCharts="handleHideCharts"
:wp="wp"
/>
</el-dialog>
</div>
</template>
@@ -30,21 +43,37 @@ import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import TableStore from '@/utils/tableStore'
import { mainHeight } from '@/utils/layout'
import waveFormAnalysis from '@/views/govern/device/control/tabs/components/waveFormAnalysis.vue'
import { analyseWave } from '@/api/common'
import { getSimpleLine } from '@/api/harmonic-boot/cockpit/cockpit'
const dialogVisible: any = ref(false)
const harmonicRatioRef: any = ref(null)
const options = [
{
value: '35kV进线',
label: '35kV进线'
}
]
const height = mainHeight(0, 2).height as any
const waveFormAnalysisRef: any = ref(null)
// 波形
const isWaveCharts = ref(false)
const loading = ref(false)
const wp = ref({})
const boxoList: any = ref({})
const tableHeaderRef = ref()
const options = ref()
const heightRef = ref(mainHeight(168, 2.1).height)
const selectChange = (flag: boolean, h: any) => {
heightRef.value = mainHeight(h, 2.1).height
}
const getSimpleLineList = async () => {
const res = await getSimpleLine()
options.value = res.data
}
const tableStore: any = new TableStore({
url: '/user-boot/role/selectRoleDetail?id=0',
url: '/cs-harmonic-boot/event/pageEvent',
method: 'POST',
publicHeight: 30,
showPage: false,
exportName: '主要监测点列表',
showPage: true,
exportName: '暂态事件详情',
column: [
{
field: 'index',
@@ -56,76 +85,142 @@ const tableStore: any = new TableStore({
},
{
title: '暂态时间',
field: 'time',
field: 'startTime',
minWidth: '150'
},
{
title: '测点名称',
field: 'name',
field: 'lineName',
width: '150'
},
{
title: '暂态类型',
field: 'flicker',
width: '100',
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'
},
{
title: '波形',
width: '100',
render: 'buttons',
buttons: [
{
name: 'edit',
text: '波形分析',
type: 'primary',
icon: 'el-icon-DataLine',
render: 'basicButton',
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)
waveFormAnalysisRef.value.setHeight(999, 130, 1.6666666)
}
})
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 = 'YPT'
wp.value = res.data
}
loading.value = false
})
.catch(() => {
row.loading1 = false
loading.value = false
})
nextTick(() => {
waveFormAnalysisRef.value &&
waveFormAnalysisRef.value.getWpData(wp.value, boxoList.value, true)
})
}
},
{
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'
}
]
}
loadCallback: () => {}
})
tableStore.table.params.searchValue = ''
provide('tableStore', tableStore)
const open = async (row: any) => {
const open = async (time: any) => {
dialogVisible.value = true
tableStore.index()
getSimpleLineList()
tableStore.table.params.lineId = ''
nextTick(() => {
tableHeaderRef.value.setInterval(5)
tableHeaderRef.value.setTimeInterval([time, time])
tableStore.table.params.searchBeginTime = time
tableStore.table.params.searchEndTime = time
tableStore.index()
})
}
// 点击行
const cellClickEvent = ({ row, column }: any) => {
if (column.field != 'name') {
harmonicRatioRef.value.openDialog(row)
}
const handleHideCharts = () => {
isWaveCharts.value = false
dialogVisible.value = true
}
defineExpose({ open })
</script>
<style lang="scss" scoped></style>

View File

@@ -41,8 +41,9 @@
style="text-decoration: underline"
class="details"
v-for="item in list?.filter((item:any) => item.name == data.day)"
@click="descentClick(item)"
>
<div @click="descentClick">电压暂降:{{ item.eventDown || 0 }}</div>
<div>电压暂降:{{ item.eventDown || 0 }}</div>
<div>电压中断:{{ item.eventOff || 0 }}</div>
<div>电压暂升:{{ item.eventUp || 0 }}</div>
</div>
@@ -182,8 +183,8 @@ watch(
)
// 电压暂降点击事件
const descentClick = () => {
transientListRef.value.open()
const descentClick = (item:any) => {
transientListRef.value.open(item.name)
}
</script>
<style lang="scss" scoped>

View File

@@ -45,6 +45,8 @@ import TableStore from '@/utils/tableStore'
import { mainHeight } from '@/utils/layout'
import waveFormAnalysis from '@/views/govern/device/control/tabs/components/waveFormAnalysis.vue'
import { analyseWave } from '@/api/common'
import { getSimpleLine } from '@/api/harmonic-boot/cockpit/cockpit'
const dialogVisible: any = ref(false)
const waveFormAnalysisRef: any = ref(null)
// 波形
@@ -55,16 +57,18 @@ const boxoList: any = ref({})
const tableHeaderRef = ref()
const options = [
{
value: '35kV进线',
label: '35kV进线'
}
]
const heightRef = ref(mainHeight(57, 2.3).height)
const options = ref()
const heightRef = ref(mainHeight(168, 2.1).height)
const selectChange = (flag: boolean, h: any) => {
heightRef.value = mainHeight(h, 2.3).height
heightRef.value = mainHeight(h, 2.1).height
}
const getSimpleLineList = async () => {
const res = await getSimpleLine()
options.value = res.data
}
const tableStore: any = new TableStore({
url: '/cs-harmonic-boot/event/pageEvent',
method: 'POST',
@@ -195,13 +199,13 @@ const tableStore: any = new TableStore({
}
],
beforeSearchFun: () => {},
loadCallback: () => {
}
loadCallback: () => {}
})
provide('tableStore', tableStore)
const open = async (row: any, searchBeginTime: any, searchEndTime: any) => {
dialogVisible.value = true
getSimpleLineList()
tableStore.table.params.lineId = row.id
nextTick(() => {
tableHeaderRef.value.setTimeInterval([searchBeginTime, searchEndTime])