暂态事件统计页面联调

This commit is contained in:
stt
2025-11-25 10:14:50 +08:00
parent b0df1157ad
commit 925c9c6f15
3 changed files with 100 additions and 112 deletions

View File

@@ -176,7 +176,7 @@ export function sensitiveUserTrendData(data: any) {
return request({ return request({
url: '/cs-device-boot/csGroup/sensitiveUserTrendData', url: '/cs-device-boot/csGroup/sensitiveUserTrendData',
method: 'post', method: 'post',
params: data data: data
}) })
} }
@@ -185,7 +185,7 @@ export function getList(data: any) {
return request({ return request({
url: '/cs-harmonic-boot/pqSensitiveUser/getList', url: '/cs-harmonic-boot/pqSensitiveUser/getList',
method: 'post', method: 'post',
params: data data: data
}) })
} }
@@ -194,7 +194,7 @@ export function f47Curve(data: any) {
return request({ return request({
url: '/cs-harmonic-boot/csevent/f47Curve', url: '/cs-harmonic-boot/csevent/f47Curve',
method: 'post', method: 'post',
params: data data: data
}) })
} }
@@ -203,7 +203,7 @@ export function getEventCoords(data: any) {
return request({ return request({
url: '/cs-harmonic-boot/csevent/getEventCoords', url: '/cs-harmonic-boot/csevent/getEventCoords',
method: 'post', method: 'post',
params: data data: data
}) })
} }
@@ -212,7 +212,7 @@ export function getEventDate(data: any) {
return request({ return request({
url: '/cs-harmonic-boot/csevent/getEventDate', url: '/cs-harmonic-boot/csevent/getEventDate',
method: 'post', method: 'post',
params: data data: data
}) })
} }
@@ -221,7 +221,7 @@ export function netEventEcharts(data: any) {
return request({ return request({
url: '/cs-harmonic-boot/csevent/netEventEcharts', url: '/cs-harmonic-boot/csevent/netEventEcharts',
method: 'post', method: 'post',
params: data data: data
}) })
} }
@@ -230,7 +230,7 @@ export function netEventTable(data: any) {
return request({ return request({
url: '/cs-harmonic-boot/csevent/netEventTable', url: '/cs-harmonic-boot/csevent/netEventTable',
method: 'post', method: 'post',
params: data data: data
}) })
} }

View File

@@ -12,6 +12,7 @@ import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue' import TableHeader from '@/components/table/header/index.vue'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import { useTimeCacheStore } from '@/stores/timeCache' import { useTimeCacheStore } from '@/stores/timeCache'
import { useDictData } from '@/stores/dictData'
const prop = defineProps({ const prop = defineProps({
w: { type: [String, Number]}, w: { type: [String, Number]},
@@ -24,8 +25,9 @@ const prop = defineProps({
const headerHeight = ref(57) const headerHeight = ref(57)
const route = useRoute() const dictData = useDictData()
const timeCacheStore = useTimeCacheStore() const sensitiveUserType = dictData.getBasicData('Sensitive_User_Type')
const selectChange = (showSelect: any, height: any, datePickerValue?: any) => { const selectChange = (showSelect: any, height: any, datePickerValue?: any) => {
headerHeight.value = height headerHeight.value = height
@@ -73,7 +75,10 @@ const tableStore: any = new TableStore({
{ {
title: '敏感负荷类型', title: '敏感负荷类型',
field: 'loadType', field: 'loadType',
minWidth: '70' minWidth: '70',
formatter: row => {
return sensitiveUserType.filter(item => item.id == row.cellValue)[0]?.name
}
}, },
{ {
title: '是否监测', title: '是否监测',

View File

@@ -30,6 +30,7 @@ import TransientStatisticsDetail from '@/components/cockpit/transientStatistics/
import TableHeader from '@/components/table/header/index.vue' import TableHeader from '@/components/table/header/index.vue'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import { useTimeCacheStore } from '@/stores/timeCache' import { useTimeCacheStore } from '@/stores/timeCache'
import { netEventEcharts } from '@/api/harmonic-boot/cockpit/cockpit'
const prop = defineProps({ const prop = defineProps({
w: { type: [String, Number] }, w: { type: [String, Number] },
@@ -42,9 +43,6 @@ const prop = defineProps({
const headerHeight = ref(57) const headerHeight = ref(57)
const route = useRoute()
const timeCacheStore = useTimeCacheStore()
const selectChange = (showSelect: any, height: any, datePickerValue?: any) => { const selectChange = (showSelect: any, height: any, datePickerValue?: any) => {
headerHeight.value = height headerHeight.value = height
@@ -68,23 +66,34 @@ const fullscreen = computed(() => {
}) })
const config = useConfig() const config = useConfig()
const data = [ const data = ref()
const echartList = ref()
const eventEcharts = () => {
netEventEcharts({
searchBeginTime: tableStore.table.params.searchBeginTime || prop.timeValue?.[0],
searchEndTime: tableStore.table.params.searchEndTime || prop.timeValue?.[1]
}).then(res => {
// 整理接口数据为图表所需格式
const rawData = res.data || {};
data.value = [
{ {
name: '电压中断', name: '电压中断',
value: 4 value: rawData.eventOff || 0
}, },
{ {
name: '电压暂降', name: '电压暂降',
value: 41 value: rawData.eventDown || 0
}, },
{ {
name: '电压暂升', name: '电压暂升',
value: 46 value: rawData.eventUp || 0
} }
] ];
const echartList = ref({
title: {},
echartList.value = {
title: {},
tooltip: { tooltip: {
trigger: 'item' trigger: 'item'
}, },
@@ -93,7 +102,7 @@ const echartList = ref({
top: 'center', top: 'center',
right: '5%', right: '5%',
formatter: function (e: any) { formatter: function (e: any) {
return e + ' ' + data.filter(item => item.name == e)[0].value + '次' return e + ' ' + data.value.filter((item: any) => item.name == e)[0].value + '次'
} }
}, },
xAxis: { xAxis: {
@@ -115,7 +124,7 @@ const echartList = ref({
left: 'center' left: 'center'
}, },
{ {
text: data[0].value + data[1].value + data[2].value + '次', text: (rawData.eventOff + rawData.eventDown + rawData.eventUp) + '次',
left: 'center', left: 'center',
top: 'center' top: 'center'
} }
@@ -127,20 +136,21 @@ const echartList = ref({
radius: ['50%', '70%'], radius: ['50%', '70%'],
label: { label: {
show: false, show: false,
position: 'outside', position: 'outside'
textStyle: {
//数值样式
}
}, },
name: '事件统计', name: '事件统计',
data: data data: data.value
} }
] ]
} }
}
}) })
}
const transientStatisticsDetailRef = ref() const transientStatisticsDetailRef = ref()
const tableStore: any = new TableStore({ const tableStore: any = new TableStore({
url: '/user-boot/dept/deptTree', url: '/cs-harmonic-boot/csevent/netEventTable',
method: 'POST', method: 'POST',
showPage: false, showPage: false,
@@ -162,29 +172,29 @@ const tableStore: any = new TableStore({
{ {
title: '电压中断(次)', title: '电压中断(次)',
field: 'type', field: 'eventOff',
minWidth: '70', minWidth: '70',
render: 'customTemplate', render: 'customTemplate',
customTemplate: (row: any) => { customTemplate: (row: any) => {
return `<span style='cursor: pointer;text-decoration: underline;'>${row.type}</span>` return `<span style='cursor: pointer;text-decoration: underline;'>${row.eventOff}</span>`
} }
}, },
{ {
title: '电压暂降(次)', title: '电压暂降(次)',
field: 'type1', field: 'eventDown',
minWidth: '80', minWidth: '80',
render: 'customTemplate', render: 'customTemplate',
customTemplate: (row: any) => { customTemplate: (row: any) => {
return `<span style='cursor: pointer;text-decoration: underline;'>${row.type1}</span>` return `<span style='cursor: pointer;text-decoration: underline;'>${row.eventDown}</span>`
} }
}, },
{ {
title: '电压暂升(次)', title: '电压暂升(次)',
field: 'type2', field: 'eventUp',
minWidth: '80', minWidth: '80',
render: 'customTemplate', render: 'customTemplate',
customTemplate: (row: any) => { customTemplate: (row: any) => {
return `<span style='cursor: pointer;text-decoration: underline;'>${row.type2}</span>` return `<span style='cursor: pointer;text-decoration: underline;'>${row.eventUp}</span>`
} }
} }
], ],
@@ -193,32 +203,7 @@ const tableStore: any = new TableStore({
tableStore.table.params.searchEndTime = tableStore.table.params.searchEndTime || prop.timeValue?.[1] tableStore.table.params.searchEndTime = tableStore.table.params.searchEndTime || prop.timeValue?.[1]
}, },
loadCallback: () => { loadCallback: () => {
tableStore.table.data = [ eventEcharts()
{
name: '35kV1进线',
type: '2',
type1: '38',
type2: '35'
},
{
name: '35kV1变压器',
type: '2',
type1: '1',
type2: '3'
},
{
name: '35kV1母线',
type: '0',
type1: '1',
type2: '4'
},
{
name: '35kV2母线',
type: '0',
type1: '1',
type2: '4'
}
]
} }
}) })
@@ -259,7 +244,5 @@ watch(
deep: true deep: true
} }
) )
const addMenu = () => {}
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>