暂态事件概率分布联调修改

This commit is contained in:
stt
2025-11-25 16:12:20 +08:00
parent f1439e0464
commit 67d9aaf958

View File

@@ -217,29 +217,37 @@ const tableStore: any = new TableStore({
const xlist = tableStore.table.data.xlist || [] const xlist = tableStore.table.data.xlist || []
// 处理趋势图数据 // 处理趋势图数据
const seriesData = [ const seriesData = trendList.map((item: any) => {
{ // 根据接口返回的name字段确定系列名称和颜色
name: '电压中断', let name = ''
type: 'line', let color = ''
showSymbol: false,
color: '#FF9100', switch (item.name) {
data: trendList[0]?.map((value: number, index: number) => [xlist[index], value]) || [] case 'Evt_Sys_DipStr':
}, name = '电压暂降'
{ color = '#FFBF00'
name: '电压暂降', break
type: 'line', case 'Evt_Sys_IntrStr':
showSymbol: false, name = '电压中断'
color: '#FFBF00', color = '#FF9100'
data: trendList[1]?.map((value: number, index: number) => [xlist[index], value]) || [] break
}, case 'Evt_Sys_SwlStr':
{ name = '电压暂升'
name: '电压暂升', color = config.layout.elementUiPrimary[0]
type: 'line', break
showSymbol: false, default:
color: config.layout.elementUiPrimary[0], name = item.name
data: trendList[2]?.map((value: number, index: number) => [xlist[index], value]) || [] color = '#000000'
} }
]
return {
name: name,
type: 'line',
showSymbol: false,
color: color,
data: item.trendList?.map((value: number, index: number) => [xlist[index], value]) || []
}
})
// 获取x轴和y轴的标签值 // 获取x轴和y轴的标签值
const xLabels = [ const xLabels = [
@@ -272,9 +280,7 @@ const tableStore: any = new TableStore({
backgroundColor: 'rgba(0,0,0,0.55)', backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0, borderWidth: 0,
formatter: function (params: any) { formatter: function (params: any) {
console.log(params, '99000')
var tips = '' var tips = ''
tips += '持续时间: ' + yLabels[params.value[1]] + '</br>' tips += '持续时间: ' + yLabels[params.value[1]] + '</br>'
tips += '特征幅值: ' + xLabels[params.value[0]] + '</br>' tips += '特征幅值: ' + xLabels[params.value[0]] + '</br>'
tips += '事件次数: ' + params.value[2] + '</br>' tips += '事件次数: ' + params.value[2] + '</br>'