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 === '可容忍事件') { if (params.seriesName === '可容忍事件') {
// 处理可容忍事件点击 // 处理可容忍事件点击
dialogTitle.value = '可容忍事件波形分析' dialogTitle.value = '可容忍事件波形分析'

View File

@@ -1,15 +1,11 @@
<template> <template>
<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"
@@ -19,8 +15,25 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
</TableHeader> --> </TableHeader>
<Table ref="tableRef" isGroup :height="height"></Table> <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> </el-dialog>
</div> </div>
</template> </template>
@@ -30,21 +43,37 @@ import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue' import TableHeader from '@/components/table/header/index.vue'
import TableStore from '@/utils/tableStore' import TableStore from '@/utils/tableStore'
import { mainHeight } from '@/utils/layout' 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 dialogVisible: any = ref(false)
const harmonicRatioRef: any = ref(null) const waveFormAnalysisRef: any = ref(null)
const options = [ // 波形
{ const isWaveCharts = ref(false)
value: '35kV进线', const loading = ref(false)
label: '35kV进线' const wp = ref({})
} const boxoList: any = ref({})
]
const height = mainHeight(0, 2).height as any 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({ 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: [
{ {
field: 'index', field: 'index',
@@ -56,76 +85,142 @@ const tableStore: any = new TableStore({
}, },
{ {
title: '暂态时间', title: '暂态时间',
field: 'time', field: 'startTime',
minWidth: '150'
}, },
{ {
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'
}, },
{
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: () => {}, beforeSearchFun: () => {},
loadCallback: () => { 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.params.searchValue = ''
provide('tableStore', tableStore) provide('tableStore', tableStore)
const open = async (row: any) => { const open = async (time: any) => {
dialogVisible.value = true 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 handleHideCharts = () => {
const cellClickEvent = ({ row, column }: any) => { isWaveCharts.value = false
if (column.field != 'name') { dialogVisible.value = true
harmonicRatioRef.value.openDialog(row)
}
} }
defineExpose({ open }) defineExpose({ open })
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>

View File

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

View File

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

View File

@@ -112,8 +112,6 @@ const getWpData = (val: any, list: any) => {
wp.value = val wp.value = val
isWp.value = true isWp.value = true
boxoList.value = list boxoList.value = list
console.log(wp.value, val, 'ggggghhhh')
} }
const changeView = () => { const changeView = () => {
showBoxi.value = false showBoxi.value = false