From c3d7e91f4e5c8e649bb040f9560d7c800aaa0295 Mon Sep 17 00:00:00 2001 From: stt Date: Mon, 10 Nov 2025 14:47:18 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/harmonic-boot/cockpit/cockpit.ts | 10 + .../components/dailyTrendChart.vue | 110 ++--- .../cockpit/indicatorDetails/index.vue | 10 +- .../cockpit/indicatorDistribution/index.vue | 397 +++++++++++++++--- .../components/overLimitDetails.vue | 158 +++++++ .../cockpit/indicatorFittingChart/index.vue | 53 +-- .../components/harmonicRatio‌.vue | 313 +++++++++++--- .../components/overLimitDetails.vue | 3 +- src/views/pqs/cockpit/homePage/index.vue | 2 +- 9 files changed, 817 insertions(+), 239 deletions(-) create mode 100644 src/api/harmonic-boot/cockpit/cockpit.ts create mode 100644 src/components/cockpit/indicatorFittingChart/components/overLimitDetails.vue diff --git a/src/api/harmonic-boot/cockpit/cockpit.ts b/src/api/harmonic-boot/cockpit/cockpit.ts new file mode 100644 index 0000000..b276fc1 --- /dev/null +++ b/src/api/harmonic-boot/cockpit/cockpit.ts @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +// 主要监测点列表查询 +export function mainLineList(data: any) { + return request({ + url: '/harmonic-boot/mainLine/list', + method: 'post', + data: data + }) +} \ No newline at end of file diff --git a/src/components/cockpit/exceedanceLevel/components/dailyTrendChart.vue b/src/components/cockpit/exceedanceLevel/components/dailyTrendChart.vue index 7f9408e..da7f3a3 100644 --- a/src/components/cockpit/exceedanceLevel/components/dailyTrendChart.vue +++ b/src/components/cockpit/exceedanceLevel/components/dailyTrendChart.vue @@ -11,9 +11,6 @@ + diff --git a/src/components/cockpit/indicatorFittingChart/index.vue b/src/components/cockpit/indicatorFittingChart/index.vue index fdf8ae8..540095d 100644 --- a/src/components/cockpit/indicatorFittingChart/index.vue +++ b/src/components/cockpit/indicatorFittingChart/index.vue @@ -11,7 +11,7 @@ > @@ -29,11 +29,8 @@ import { ref, onMounted, provide, reactive, watch, h } from 'vue' import TableStore from '@/utils/tableStore' import Table from '@/components/table/index.vue' import TableHeader from '@/components/table/header/index.vue' -import { useDictData } from '@/stores/dictData' -import { ElMessage, ElMessageBox } from 'element-plus' import { getTimeOfTheMonth } from '@/utils/formatTime' -import { ElTag } from 'element-plus' -import OverLimitDetails from '@/components/cockpit/listOfMainMonitoringPoints/components/overLimitDetails.vue' +import OverLimitDetails from '@/components/cockpit/indicatorFittingChart/components/overLimitDetails.vue' import { useRoute } from 'vue-router' import { useTimeCacheStore } from '@/stores/timeCache' @@ -76,9 +73,8 @@ const fullscreen = computed(() => { const tableStore: any = new TableStore({ - url: '/system-boot/dashboard/queryPage', + url: '/harmonic-boot/mainLine/list', method: 'POST', - showPage: false, exportName: '主要监测点列表', column: [ @@ -92,27 +88,26 @@ const tableStore: any = new TableStore({ }, { title: '监测点名称', - field: 'name', + field: 'lineName', minWidth: '90', - render: 'customTemplate', customTemplate: (row: any) => { - return `${row.name}` + return `${row.lineName}` } }, { title: '监测对象类型', - field: 'type', + field: 'objType', minWidth: '90' }, { title: '是否治理', - field: 'whetherToGovern', + field: 'govern', minWidth: '70' }, - { title: '主要存在的电能质量问题', field: 'question', minWidth: '150' } + { title: '主要存在的电能质量问题', field: 'problems', minWidth: '150' } ], beforeSearchFun: () => { // 尝试从缓存获取时间值 @@ -132,46 +127,18 @@ const tableStore: any = new TableStore({ tableStore.table.params.searchEndTime = endTime || prop.timeValue?.[1] || getTimeOfTheMonth(prop.timeKey)[1] }, loadCallback: () => { - tableStore.table.data = [ - { - name: '10kV1#电动机', - type: '电动机', - whetherToGovern: '否', - question: '3次谐波电压、5次谐波电流、电压不平衡度超标' - }, - { - name: '10kV2#(治理后)', - type: '电焊机', - whetherToGovern: '100A APF', - question: '所有指标均合格' - }, - { - name: '380V电焊机(治理前)', - type: '电焊机', - whetherToGovern: '100A APF', - question: '5次谐波电流、电压不平衡度超标' - }, - { - name: '380V水泵机', - type: '电动机', - whetherToGovern: '否', - question: '所有指标均合格' - } - ] - tableStore.table.height = `calc(${prop.height} - 80px)` } }) const tableRef = ref() provide('tableRef', tableRef) -tableStore.table.params.type = '' -tableStore.table.params.searchValue = '' +tableStore.table.params.keywords = '' provide('tableStore', tableStore) // 点击行 const cellClickEvent = ({ row, column }: any) => { - if (column.field == 'name') { + if (column.field == 'lineName') { console.log(row) OverLimitDetailsRef.value.open(row) } diff --git a/src/components/cockpit/listOfMainMonitoringPoints/components/harmonicRatio‌.vue b/src/components/cockpit/listOfMainMonitoringPoints/components/harmonicRatio‌.vue index 800b042..166ed96 100644 --- a/src/components/cockpit/listOfMainMonitoringPoints/components/harmonicRatio‌.vue +++ b/src/components/cockpit/listOfMainMonitoringPoints/components/harmonicRatio‌.vue @@ -7,27 +7,70 @@ - + - + - + + + + + + + + + + + + + 指标对比分析 + + @@ -55,16 +98,12 @@ const options = [ ] const config = useConfig() -const powerList: any = ref([ - { - label: '三相总有功功率', - value: '1' - }, - { - label: '三相总无功功率', - value: '2' - } -]) + +const harmonicOptions = Array.from({ length: 50 }, (_, i) => ({ + value: String(i + 1), + label: `${i + 1}次谐波` +})) + const exceedingTheLimitList: any = ref([ { label: '越限', @@ -95,9 +134,8 @@ const indicatorList: any = ref([ ]) const echartList = ref({ title: { - text: '35kV进线谐波含有率', + text: '谐波电压含有率' }, - xAxis: { type: 'time', axisLabel: { @@ -108,7 +146,6 @@ const echartList = ref({ } } }, - yAxis: [{}, {}], grid: { left: '10px', @@ -117,51 +154,171 @@ const echartList = ref({ options: { series: [ { - // name: '暂降次数', - type: 'bar', - name: '有功功率', + name: 'A相', + type: 'line', + showSymbol: false, + smooth: true, data: [ - ['2025-10-16 07:00:00', 10], - ['2025-10-16 07:15:00', 10], - ['2025-10-16 07:30:00', 10], - ['2025-10-16 07:45:00', 10], - ['2025-10-16 08:00:00', 30], - ['2025-10-16 08:15:00', 50], - ['2025-10-16 08:30:00', 60], - ['2025-10-16 08:45:00', 70], - ['2025-10-16 09:00:00', 100], - ['2025-10-16 09:15:00', 120], - ['2025-10-16 09:30:00', 130], - ['2025-10-16 09:45:00', 140], - ['2025-10-16 10:00:00', 160], - ['2025-10-16 10:15:00', 160], - ['2025-10-16 10:30:00', 130], - ['2025-10-16 10:45:00', 120], - ['2025-10-16 11:00:00', 140], - ['2025-10-16 11:15:00', 80], - ['2025-10-16 11:30:00', 70], - ['2025-10-16 11:45:00', 90], - ['2025-10-16 12:00:00', 60], - ['2025-10-16 12:15:00', 60], - ['2025-10-16 12:30:00', 60], - ['2025-10-16 12:45:00', 60] + ['2025-10-16 07:00:00', 0.5], + ['2025-10-16 07:15:00', 0.6], + ['2025-10-16 07:30:00', 0.4], + ['2025-10-16 07:45:00', 0.7], + ['2025-10-16 08:00:00', 1.2], + ['2025-10-16 08:15:00', 1.5], + ['2025-10-16 08:30:00', 1.8], + ['2025-10-16 08:45:00', 2.1], + ['2025-10-16 09:00:00', 2.5], + ['2025-10-16 09:15:00', 2.8], + ['2025-10-16 09:30:00', 3.0], + ['2025-10-16 09:45:00', 2.7], + ['2025-10-16 10:00:00', 2.2], + ['2025-10-16 10:15:00', 1.9], + ['2025-10-16 10:30:00', 1.6], + ['2025-10-16 10:45:00', 1.3], + ['2025-10-16 11:00:00', 1.1], + ['2025-10-16 11:15:00', 0.8], + ['2025-10-16 11:30:00', 0.6], + ['2025-10-16 11:45:00', 0.4], + ['2025-10-16 12:00:00', 0.3], + ['2025-10-16 12:15:00', 0.2], + ['2025-10-16 12:30:00', 0.3], + ['2025-10-16 12:45:00', 0.4] ], - itemStyle: { - normal: { - //这里是颜色 - color: function (params: any) { - if (params.value[1] == 0 || params.value[1] == 3.14159) { - return '#ccc' - } else { - return config.layout.elementUiPrimary[0] - } - } - } - }, yAxisIndex: 0 }, { - name: '谐波总畸变率', + name: 'B相', + type: 'line', + showSymbol: false, + smooth: true, + data: [ + ['2025-10-16 07:00:00', 0.4], + ['2025-10-16 07:15:00', 0.5], + ['2025-10-16 07:30:00', 0.3], + ['2025-10-16 07:45:00', 0.6], + ['2025-10-16 08:00:00', 1.0], + ['2025-10-16 08:15:00', 1.3], + ['2025-10-16 08:30:00', 1.6], + ['2025-10-16 08:45:00', 1.9], + ['2025-10-16 09:00:00', 2.2], + ['2025-10-16 09:15:00', 2.5], + ['2025-10-16 09:30:00', 2.7], + ['2025-10-16 09:45:00', 2.4], + ['2025-10-16 10:00:00', 2.0], + ['2025-10-16 10:15:00', 1.7], + ['2025-10-16 10:30:00', 1.4], + ['2025-10-16 10:45:00', 1.1], + ['2025-10-16 11:00:00', 0.9], + ['2025-10-16 11:15:00', 0.7], + ['2025-10-16 11:30:00', 0.5], + ['2025-10-16 11:45:00', 0.3], + ['2025-10-16 12:00:00', 0.2], + ['2025-10-16 12:15:00', 0.1], + ['2025-10-16 12:30:00', 0.2], + ['2025-10-16 12:45:00', 0.3] + ], + yAxisIndex: 0 + }, + { + name: 'C相', + type: 'line', + showSymbol: false, + smooth: true, + data: [ + ['2025-10-16 07:00:00', 0.6], + ['2025-10-16 07:15:00', 0.7], + ['2025-10-16 07:30:00', 0.5], + ['2025-10-16 07:45:00', 0.8], + ['2025-10-16 08:00:00', 1.4], + ['2025-10-16 08:15:00', 1.7], + ['2025-10-16 08:30:00', 2.0], + ['2025-10-16 08:45:00', 2.3], + ['2025-10-16 09:00:00', 2.8], + ['2025-10-16 09:15:00', 3.1], + ['2025-10-16 09:30:00', 3.3], + ['2025-10-16 09:45:00', 3.0], + ['2025-10-16 10:00:00', 2.5], + ['2025-10-16 10:15:00', 2.1], + ['2025-10-16 10:30:00', 1.8], + ['2025-10-16 10:45:00', 1.5], + ['2025-10-16 11:00:00', 1.3], + ['2025-10-16 11:15:00', 1.0], + ['2025-10-16 11:30:00', 0.8], + ['2025-10-16 11:45:00', 0.6], + ['2025-10-16 12:00:00', 0.5], + ['2025-10-16 12:15:00', 0.4], + ['2025-10-16 12:30:00', 0.5], + ['2025-10-16 12:45:00', 0.6] + ], + yAxisIndex: 0 + }, + { + name: '暂降触发点', + type: 'line', + showSymbol: false, + smooth: true, + data: [ + ['2025-10-16 07:00:00', 3.14159], + ['2025-10-16 07:15:00', 3.14159], + ['2025-10-16 07:30:00', 3.14159], + ['2025-10-16 07:45:00', 3.14159], + ['2025-10-16 08:00:00', 3.14159], + ['2025-10-16 08:15:00', 3.14159], + ['2025-10-16 08:30:00', 3.14159], + ['2025-10-16 08:45:00', 3.14159], + ['2025-10-16 09:00:00', 3.14159], + ['2025-10-16 09:15:00', 3.14159], + ['2025-10-16 09:30:00', 3.14159], + ['2025-10-16 09:45:00', 3.14159], + ['2025-10-16 10:00:00', 3.14159], + ['2025-10-16 10:15:00', 3.14159], + ['2025-10-16 10:30:00', 3.14159], + ['2025-10-16 10:45:00', 3.14159], + ['2025-10-16 11:00:00', 3.14159], + ['2025-10-16 11:15:00', 3.14159], + ['2025-10-16 11:30:00', 3.14159], + ['2025-10-16 11:45:00', 3.14159], + ['2025-10-16 12:00:00', 3.14159], + ['2025-10-16 12:15:00', 3.14159], + ['2025-10-16 12:30:00', 3.14159], + ['2025-10-16 12:45:00', 3.14159] + ], + lineStyle: { + type: 'dashed', + color: '#ff0000' // 红色 + }, + itemStyle: { + color: '#ff0000' // 红色 + }, + yAxisIndex: 0 + } + ] + } +}) + +const echartContrastList = ref({ + title: { + text: 'A相谐波电压和A相谐波电流对比趋势图' + }, + xAxis: { + type: 'time', + axisLabel: { + formatter: { + day: '{MM}-{dd}', + month: '{MM}', + year: '{yyyy}' + } + } + }, + yAxis: [{}, {}], + grid: { + left: '10px', + right: '20px' + }, + options: { + series: [ + { + name: 'A相谐波电压', type: 'line', showSymbol: false, smooth: true, @@ -191,11 +348,45 @@ const echartList = ref({ ['2025-10-16 12:30:00', 0], ['2025-10-16 12:45:00', 0] ], + yAxisIndex: 0 + }, + { + name: 'A相谐波电流', + type: 'line', + showSymbol: false, + smooth: true, + data: [ + ['2025-10-16 07:00:00', 0], + ['2025-10-16 07:15:00', 0], + ['2025-10-16 07:30:00', 0], + ['2025-10-16 07:45:00', 0], + ['2025-10-16 08:00:00', 0], + ['2025-10-16 08:15:00', 0.05], + ['2025-10-16 08:30:00', 0.05], + ['2025-10-16 08:45:00', 0.05], + ['2025-10-16 09:00:00', 0.5], + ['2025-10-16 09:15:00', 0.5], + ['2025-10-16 09:30:00', 0.5], + ['2025-10-16 09:45:00', 0.5], + ['2025-10-16 10:00:00', 0.4], + ['2025-10-16 10:15:00', 0.4], + ['2025-10-16 10:30:00', 0.4], + ['2025-10-16 10:45:00', 0.4], + ['2025-10-16 11:00:00', 0.4], + ['2025-10-16 11:15:00', 0.05], + ['2025-10-16 11:30:00', 0.05], + ['2025-10-16 11:45:00', 0.05], + ['2025-10-16 12:00:00', 0], + ['2025-10-16 12:15:00', 0], + ['2025-10-16 12:30:00', 0], + ['2025-10-16 12:45:00', 0] + ], yAxisIndex: 1 } ] } }) + const headerHeight = ref(57) const selectChange = (showSelect: any, height: any) => { headerHeight.value = height @@ -219,6 +410,10 @@ tableStore.table.params.power = '1' tableStore.table.params.indicator = '1' tableStore.table.params.exceedingTheLimit = '1' tableStore.table.params.searchValue = '' +tableStore.table.params.checked = false +tableStore.table.params.indicatorType = '' // 指标类型 +tableStore.table.params.indicatorType1 = '' // 指标类型1 +tableStore.table.params.indicatorType2 = '' // 指标类型2 provide('tableStore', tableStore) onMounted(() => { diff --git a/src/components/cockpit/listOfMainMonitoringPoints/components/overLimitDetails.vue b/src/components/cockpit/listOfMainMonitoringPoints/components/overLimitDetails.vue index 547ede5..b7f5050 100644 --- a/src/components/cockpit/listOfMainMonitoringPoints/components/overLimitDetails.vue +++ b/src/components/cockpit/listOfMainMonitoringPoints/components/overLimitDetails.vue @@ -8,7 +8,7 @@ { // 点击行 const cellClickEvent = ({ row, column }: any) => { + console.log(row, '1111') if (column.field != 'name' && column.field != 'time') { harmonicRatio‌Ref.value.openDialog(row) } diff --git a/src/views/pqs/cockpit/homePage/index.vue b/src/views/pqs/cockpit/homePage/index.vue index 415e1e0..cb50f76 100644 --- a/src/views/pqs/cockpit/homePage/index.vue +++ b/src/views/pqs/cockpit/homePage/index.vue @@ -1,6 +1,6 @@