暂态事件统计页面联调
This commit is contained in:
@@ -176,7 +176,7 @@ export function sensitiveUserTrendData(data: any) {
|
||||
return request({
|
||||
url: '/cs-device-boot/csGroup/sensitiveUserTrendData',
|
||||
method: 'post',
|
||||
params: data
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ export function getList(data: any) {
|
||||
return request({
|
||||
url: '/cs-harmonic-boot/pqSensitiveUser/getList',
|
||||
method: 'post',
|
||||
params: data
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ export function f47Curve(data: any) {
|
||||
return request({
|
||||
url: '/cs-harmonic-boot/csevent/f47Curve',
|
||||
method: 'post',
|
||||
params: data
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ export function getEventCoords(data: any) {
|
||||
return request({
|
||||
url: '/cs-harmonic-boot/csevent/getEventCoords',
|
||||
method: 'post',
|
||||
params: data
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ export function getEventDate(data: any) {
|
||||
return request({
|
||||
url: '/cs-harmonic-boot/csevent/getEventDate',
|
||||
method: 'post',
|
||||
params: data
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ export function netEventEcharts(data: any) {
|
||||
return request({
|
||||
url: '/cs-harmonic-boot/csevent/netEventEcharts',
|
||||
method: 'post',
|
||||
params: data
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ export function netEventTable(data: any) {
|
||||
return request({
|
||||
url: '/cs-harmonic-boot/csevent/netEventTable',
|
||||
method: 'post',
|
||||
params: data
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useTimeCacheStore } from '@/stores/timeCache'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
const prop = defineProps({
|
||||
w: { type: [String, Number]},
|
||||
@@ -24,8 +25,9 @@ const prop = defineProps({
|
||||
|
||||
const headerHeight = ref(57)
|
||||
|
||||
const route = useRoute()
|
||||
const timeCacheStore = useTimeCacheStore()
|
||||
const dictData = useDictData()
|
||||
const sensitiveUserType = dictData.getBasicData('Sensitive_User_Type')
|
||||
|
||||
|
||||
const selectChange = (showSelect: any, height: any, datePickerValue?: any) => {
|
||||
headerHeight.value = height
|
||||
@@ -73,7 +75,10 @@ const tableStore: any = new TableStore({
|
||||
{
|
||||
title: '敏感负荷类型',
|
||||
field: 'loadType',
|
||||
minWidth: '70'
|
||||
minWidth: '70',
|
||||
formatter: row => {
|
||||
return sensitiveUserType.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '是否监测',
|
||||
|
||||
@@ -30,6 +30,7 @@ import TransientStatisticsDetail from '@/components/cockpit/transientStatistics/
|
||||
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({
|
||||
w: { type: [String, Number] },
|
||||
@@ -42,9 +43,6 @@ const prop = defineProps({
|
||||
|
||||
const headerHeight = ref(57)
|
||||
|
||||
const route = useRoute()
|
||||
const timeCacheStore = useTimeCacheStore()
|
||||
|
||||
const selectChange = (showSelect: any, height: any, datePickerValue?: any) => {
|
||||
headerHeight.value = height
|
||||
|
||||
@@ -68,79 +66,91 @@ const fullscreen = computed(() => {
|
||||
})
|
||||
const config = useConfig()
|
||||
|
||||
const data = [
|
||||
{
|
||||
name: '电压中断',
|
||||
value: 4
|
||||
},
|
||||
{
|
||||
name: '电压暂降',
|
||||
value: 41
|
||||
},
|
||||
{
|
||||
name: '电压暂升',
|
||||
value: 46
|
||||
}
|
||||
]
|
||||
const echartList = ref({
|
||||
title: {},
|
||||
const data = ref()
|
||||
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
top: 'center',
|
||||
right: '5%',
|
||||
formatter: function (e: any) {
|
||||
return e + ' ' + data.filter(item => item.name == e)[0].value + '次'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
show: false
|
||||
},
|
||||
yAxis: {
|
||||
show: false
|
||||
},
|
||||
grid: {
|
||||
left: '10px',
|
||||
right: '20px'
|
||||
},
|
||||
color: ['#FF9100', '#FFBF00', config.layout.elementUiPrimary[0]],
|
||||
options: {
|
||||
dataZoom: null,
|
||||
title: [
|
||||
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 = [
|
||||
{
|
||||
text: '暂态事件统计',
|
||||
left: 'center'
|
||||
name: '电压中断',
|
||||
value: rawData.eventOff || 0
|
||||
},
|
||||
{
|
||||
text: data[0].value + data[1].value + data[2].value + '次',
|
||||
left: 'center',
|
||||
top: 'center'
|
||||
}
|
||||
],
|
||||
series: [
|
||||
name: '电压暂降',
|
||||
value: rawData.eventDown || 0
|
||||
},
|
||||
{
|
||||
type: 'pie',
|
||||
center: 'center',
|
||||
radius: ['50%', '70%'],
|
||||
label: {
|
||||
show: false,
|
||||
position: 'outside',
|
||||
textStyle: {
|
||||
//数值样式
|
||||
}
|
||||
},
|
||||
name: '事件统计',
|
||||
data: data
|
||||
name: '电压暂升',
|
||||
value: rawData.eventUp || 0
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
];
|
||||
|
||||
echartList.value = {
|
||||
title: {},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
top: 'center',
|
||||
right: '5%',
|
||||
formatter: function (e: any) {
|
||||
return e + ' ' + data.value.filter((item: any) => item.name == e)[0].value + '次'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
show: false
|
||||
},
|
||||
yAxis: {
|
||||
show: false
|
||||
},
|
||||
grid: {
|
||||
left: '10px',
|
||||
right: '20px'
|
||||
},
|
||||
color: ['#FF9100', '#FFBF00', config.layout.elementUiPrimary[0]],
|
||||
options: {
|
||||
dataZoom: null,
|
||||
title: [
|
||||
{
|
||||
text: '暂态事件统计',
|
||||
left: 'center'
|
||||
},
|
||||
{
|
||||
text: (rawData.eventOff + rawData.eventDown + rawData.eventUp) + '次',
|
||||
left: 'center',
|
||||
top: 'center'
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
center: 'center',
|
||||
radius: ['50%', '70%'],
|
||||
label: {
|
||||
show: false,
|
||||
position: 'outside'
|
||||
},
|
||||
name: '事件统计',
|
||||
data: data.value
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const transientStatisticsDetailRef = ref()
|
||||
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/user-boot/dept/deptTree',
|
||||
url: '/cs-harmonic-boot/csevent/netEventTable',
|
||||
method: 'POST',
|
||||
|
||||
showPage: false,
|
||||
@@ -162,29 +172,29 @@ const tableStore: any = new TableStore({
|
||||
|
||||
{
|
||||
title: '电压中断(次)',
|
||||
field: 'type',
|
||||
field: 'eventOff',
|
||||
minWidth: '70',
|
||||
render: 'customTemplate',
|
||||
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: '电压暂降(次)',
|
||||
field: 'type1',
|
||||
field: 'eventDown',
|
||||
minWidth: '80',
|
||||
render: 'customTemplate',
|
||||
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: '电压暂升(次)',
|
||||
field: 'type2',
|
||||
field: 'eventUp',
|
||||
minWidth: '80',
|
||||
render: 'customTemplate',
|
||||
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]
|
||||
},
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = [
|
||||
{
|
||||
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'
|
||||
}
|
||||
]
|
||||
eventEcharts()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -259,7 +244,5 @@ watch(
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
const addMenu = () => {}
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user