查看波形图联调修改
This commit is contained in:
@@ -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]
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user