Compare commits

...

2 Commits

Author SHA1 Message Date
stt
25971e5239 Merge branch 'main' of http://192.168.1.22:3000/Web/admin-govern 2025-11-10 14:47:21 +08:00
stt
c3d7e91f4e 页面修改 2025-11-10 14:47:18 +08:00
9 changed files with 817 additions and 239 deletions

View File

@@ -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
})
}

View File

@@ -11,9 +11,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, provide, reactive, watch, h } from 'vue' import { ref, onMounted, provide, reactive, watch, h } from 'vue'
import TableStore from '@/utils/tableStore'
import TableHeader from '@/components/table/header/index.vue'
import { getTimeOfTheMonth } from '@/utils/formatTime'
import MyEchart from '@/components/echarts/MyEchart.vue' import MyEchart from '@/components/echarts/MyEchart.vue'
import { useConfig } from '@/stores/config' import { useConfig } from '@/stores/config'
const prop = defineProps({ const prop = defineProps({
@@ -30,103 +27,50 @@ const config = useConfig()
const echartList = ref({ const echartList = ref({
title: { title: {
text: '35kV进线谐波含有率', text: '指标日趋势图',
}, },
xAxis: { xAxis: {
type: 'time', type: 'category',
data: [
'00:00', '01:00', '02:00', '03:00', '04:00', '05:00',
'06:00', '07:00', '08:00', '09:00', '10:00', '11:00',
'12:00', '13:00', '14:00', '15:00', '16:00', '17:00',
'18:00', '19:00', '20:00', '21:00', '22:00', '23:00'
],
axisLabel: { axisLabel: {
formatter: { interval: 1
day: '{MM}-{dd}',
month: '{MM}',
year: '{yyyy}'
}
} }
}, },
yAxis: {
yAxis: [{}, {}], type: 'value',
name: '数值'
},
grid: { grid: {
left: '10px', left: '10px',
right: '20px' right: '20px',
containLabel: true
}, },
options: { options: {
series: [ series: [
{ {
// name: '暂降次数', name: '指标值',
type: 'bar', type: 'line',
name: '有功功率', showSymbol: true,
smooth: true,
data: [ data: [
['2025-10-16 07:00:00', 10], 10, 12, 15, 18, 22, 28,
['2025-10-16 07:15:00', 10], 35, 45, 60, 75, 88, 95,
['2025-10-16 07:30:00', 10], 100, 98, 90, 80, 70, 60,
['2025-10-16 07:45:00', 10], 50, 40, 30, 25, 20, 15
['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]
], ],
itemStyle: { itemStyle: {
normal: { normal: {
//这里是颜色 color: config.layout.elementUiPrimary[0]
color: function (params: any) {
if (params.value[1] == 0 || params.value[1] == 3.14159) {
return '#ccc'
} else {
return config.layout.elementUiPrimary[0]
}
}
} }
}, },
yAxisIndex: 0 areaStyle: {
}, opacity: 0.3
{ }
name: '谐波总畸变率',
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.1],
['2025-10-16 08:30:00', 0.1],
['2025-10-16 08:45:00', 0.1],
['2025-10-16 09:00:00', 1],
['2025-10-16 09:15:00', 1],
['2025-10-16 09:30:00', 1],
['2025-10-16 09:45:00', 1],
['2025-10-16 10:00:00', 0.8],
['2025-10-16 10:15:00', 0.8],
['2025-10-16 10:30:00', 0.8],
['2025-10-16 10:45:00', 0.8],
['2025-10-16 11:00:00', 0.8],
['2025-10-16 11:15:00', 0.1],
['2025-10-16 11:30:00', 0.1],
['2025-10-16 11:45:00', 0.1],
['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
} }
] ]
} }

View File

@@ -79,7 +79,7 @@ const fullscreen = computed(() => {
const list = ref([ const list = ref([
{ {
time: '2025-10-01', time: '2025-11-01',
key: 81, key: 81,
text: '3次谐波越限<br/>5次谐波越限<br/>三相不平衡越限' text: '3次谐波越限<br/>5次谐波越限<br/>三相不平衡越限'
}, },
@@ -89,22 +89,22 @@ const list = ref([
text: '3次谐波越限<br/>5次谐波越限<br/>三相不平衡越限' text: '3次谐波越限<br/>5次谐波越限<br/>三相不平衡越限'
}, },
{ {
time: '2025-10-08', time: '2025-11-08',
key: 20, key: 20,
text: '3次谐波越限<br/>5次谐波越限<br/>三相不平衡越限' text: '3次谐波越限<br/>5次谐波越限<br/>三相不平衡越限'
}, },
{ {
time: '2025-10-16', time: '2025-11-16',
key: 20, key: 20,
text: '3次谐波越限<br/>5次谐波越限<br/>三相不平衡越限' text: '3次谐波越限<br/>5次谐波越限<br/>三相不平衡越限'
}, },
{ {
time: '2025-10-23', time: '2025-11-23',
key: 20, key: 20,
text: '3次谐波越限<br/>5次谐波越限<br/>三相不平衡越限' text: '3次谐波越限<br/>5次谐波越限<br/>三相不平衡越限'
}, },
{ {
time: '2025-10-04', time: '2025-11-04',
key: 0, key: 0,
text: '' text: ''
}, },

View File

@@ -47,11 +47,10 @@ const prop = defineProps({
}) })
const options = [ const options = [
{ {
value: '1', value: '1',
label: '35V进线', label: '35V进线'
}, }
] ]
const headerHeight = ref(57) const headerHeight = ref(57)
@@ -82,14 +81,146 @@ const fullscreen = computed(() => {
} }
}) })
// const echartList = ref({
// options: {
// xAxis: null,
// yAxis: null,
// dataZoom: null,
// backgroundColor: '#fff',
// tooltip: {
// // trigger: 'axis'
// textStyle: {
// color: '#fff',
// fontStyle: 'normal',
// opacity: 0.35,
// fontSize: 14
// },
// backgroundColor: 'rgba(0,0,0,0.55)',
// borderWidth: 0,
// formatter: function (params: any) {
// console.log(params)
// var tips = ''
// for (var i = 0; i < params.length; i++) {
// tips += params[i].name + '</br/>'
// tips += '监测点数' + ':' + '&nbsp' + '&nbsp' + params[i].value + '</br/>'
// }
// return tips
// }
// },
// title: {
// text: '指标越限概率分布',
// x: 'center'
// },
// visualMap: {
// max: 20,
// show: false,
// inRange: {
// color: ['#313695', '#00BB00', '#ff8000', '#a50026']
// }
// },
// xAxis3D: {
// type: 'category',
// name: '指标越限',
// data: ['0-10', '10-20', '20-30', '30-40', '40-50'],
// axisLine: {
// lineStyle: {
// color: '#111'
// }
// },
// axisLabel: {
// color: '#111'
// }
// },
// yAxis3D: {
// type: 'category',
// name: '指标类型',
// data: ['闪变', '谐波电压', '谐波电流', '电压偏差', '三相不平衡'],
// nameTextStyle: {
// color: '#111'
// },
// axisLine: {
// show: true,
// lineStyle: {
// color: '#111'
// }
// },
// axisLabel: {
// color: '#111'
// },
// splitLine: {
// lineStyle: {
// // 使用深浅的间隔色
// color: ['#111'],
// type: 'dashed',
// opacity: 0.5
// }
// }
// },
// zAxis3D: {
// type: 'value',
// splitNumber: 10,
// minInterval: 10,
// name: '越限占比'
// },
// grid3D: {
// viewControl: {
// projection: 'perspective',
// distance: 250
// },
// boxWidth: 200,
// boxDepth: 80,
// light: {
// main: {
// intensity: 1.2
// },
// ambient: {
// intensity: 0.3
// }
// }
// },
// series: [
// {
// type: 'bar3D',
// data: [
// [0, 0, 1],
// [0, 1, 1],
// [0.2, 1]
// ],
// shading: 'realistic',
// label: {
// show: false,
// textStyle: {
// fontSize: 16,
// borderWidth: 1
// }
// },
// itemStyle: {
// opacity: 1
// },
// emphasis: {
// label: {
// textStyle: {
// fontSize: 20,
// color: '#900'
// }
// },
// itemStyle: {
// color: '#900'
// }
// }
// }
// ]
// }
// })
var yAxisData=['闪变', '谐波电压', '谐波电流', '电压偏差', '三相不平衡']
const echartList = ref({ const echartList = ref({
options: { options: {
xAxis: null,
yAxis: null,
dataZoom: null,
backgroundColor: '#fff', backgroundColor: '#fff',
tooltip: { tooltip: {
// trigger: 'axis'
textStyle: { textStyle: {
color: '#fff', color: '#fff',
fontStyle: 'normal', fontStyle: 'normal',
@@ -99,44 +230,74 @@ const echartList = ref({
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) console.log(params, '33344')
var yIndex = params.value[1]; //获取y轴索引
var tips = '' var tips = ''
for (var i = 0; i < params.length; i++) { // tips += '指标类型: ' + params.name + '</br>'
tips += params[i].name + '</br/>' tips += '指标类型: ' + yAxisData[yIndex] + '</br>'
tips += '监测点数' + ':' + '&nbsp' + '&nbsp' + params[i].value + '</br/>' tips += '越限程度: ' + params.seriesName + '</br>'
} // tips += '越限占比: ' + params.value + '%</br>'
tips += '越限占比: ' + params.value[2] + '%</br>'
return tips return tips
} }
}, },
title: { title: {
text: '指标越限概率分布', text: '指标越限概率分布',
x: 'center' x: 'center',
}, textStyle: {
fontSize: 16,
visualMap: { fontWeight: 'normal'
max: 20,
show: false,
inRange: {
color: ['#313695', '#00BB00', '#ff8000', '#a50026']
} }
}, },
visualMap: {
max: 100,
show: true,
inRange: {
color: [
'#313695',
'#4575b4',
'#74add1',
'#abd9e9',
'#e0f3f8',
'#ffffbf',
'#fee090',
'#fdae61',
'#f46d43',
'#d73027',
'#a50026'
]
}
// calculable: true,
// orient: 'horizontal',
// left: 'center',
// bottom: '5%'
},
xAxis3D: { xAxis3D: {
type: 'category', type: 'category',
name: '指标越限', name: '越限程度',
data: ['0-10', '10-20', '20-30', '30-40', '40-50'], nameLocation: 'middle',
nameGap: 30,
data: ['0-20%', '20-40%', '40-60%', '60-80%', '80-100%'],
axisLine: { axisLine: {
lineStyle: { lineStyle: {
color: '#111' color: '#111'
} }
}, },
axisLabel: { axisLabel: {
color: '#111',
margin: 15
},
nameTextStyle: {
color: '#111' color: '#111'
} }
}, },
yAxis3D: { yAxis3D: {
type: 'category', type: 'category',
name: '指标类型', name: '指标类型',
data: ['闪变', '谐波电压', '谐波电流', '电压偏差', '三相不平衡'], nameLocation: 'middle',
nameGap: 30,
// data: ['闪变', '谐波电压', '谐波电流', '电压偏差', '三相不平衡'],
data:yAxisData,
nameTextStyle: { nameTextStyle: {
color: '#111' color: '#111'
}, },
@@ -147,11 +308,11 @@ const echartList = ref({
} }
}, },
axisLabel: { axisLabel: {
color: '#111' color: '#111',
margin: 15
}, },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
// 使用深浅的间隔色
color: ['#111'], color: ['#111'],
type: 'dashed', type: 'dashed',
opacity: 0.5 opacity: 0.5
@@ -160,61 +321,203 @@ const echartList = ref({
}, },
zAxis3D: { zAxis3D: {
type: 'value', type: 'value',
splitNumber: 10, name: '越限占比(%)',
minInterval: 10, nameLocation: 'middle',
name: '越限占比' nameGap: 30,
nameTextStyle: {
color: '#111'
},
axisLine: {
lineStyle: {
color: '#111'
}
},
axisLabel: {
color: '#111'
},
min: 0,
max: 100
}, },
grid3D: { grid3D: {
viewControl: { viewControl: {
projection: 'perspective', projection: 'perspective',
distance: 250 distance: 250,
rotateSensitivity: 10,
zoomSensitivity: 2
}, },
boxWidth: 200, boxWidth: 150,
boxDepth: 80, boxDepth: 100,
boxHeight: 100,
light: { light: {
main: { main: {
intensity: 1.2 intensity: 1.2
}, },
ambient: { ambient: {
intensity: 0.3 intensity: 0.4
} }
} }
}, },
series: [ series: [
{ {
type: 'bar3D', type: 'bar3D',
name: '0-20%',
data: [ data: [
[0, 0, 1], // [xIndex, yIndex, value]
[0, 1, 1], [0, 0, 5], // 闪变 - 0-20%
[0.2, 1] [0, 1, 10], // 谐波电压 - 0-20%
[0, 2, 8], // 谐波电流 - 0-20%
[0, 3, 15], // 电压偏差 - 0-20%
[0, 4, 12] // 三相不平衡 - 0-20%
], ],
shading: 'realistic', shading: 'realistic',
label: { label: {
show: false, show: false
textStyle: {
fontSize: 16,
borderWidth: 1
}
}, },
itemStyle: { itemStyle: {
opacity: 1 opacity: 0.9
}, },
emphasis: { emphasis: {
label: { label: {
show: true,
textStyle: { textStyle: {
fontSize: 20, fontSize: 14,
color: '#900' color: '#000'
} }
}, },
itemStyle: { itemStyle: {
color: '#900' color: '#ff8000'
}
}
},
{
type: 'bar3D',
name: '20-40%',
// data: chartData.map(function (item) {
// return {
// value: [item[1], item[0], item[2]]
// };
// }),
data: [
[1, 0, 10], // 闪变 - 20-40%
[1, 1, 20], // 谐波电压 - 20-40%
[1, 2, 15], // 谐波电流 - 20-40%
[1, 3, 25], // 电压偏差 - 20-40%
[1, 4, 18] // 三相不平衡 - 20-40%
],
shading: 'realistic',
label: {
show: false
},
itemStyle: {
opacity: 0.9
},
emphasis: {
label: {
show: true,
textStyle: {
fontSize: 14,
color: '#000'
}
},
itemStyle: {
color: '#ff8000'
}
}
},
{
type: 'bar3D',
name: '40-60%',
data: [
[2, 0, 15], // 闪变 - 40-60%
[2, 1, 25], // 谐波电压 - 40-60%
[2, 2, 30], // 谐波电流 - 40-60%
[2, 3, 35], // 电压偏差 - 40-60%
[2, 4, 28] // 三相不平衡 - 40-60%
],
shading: 'realistic',
label: {
show: false
},
itemStyle: {
opacity: 0.9
},
emphasis: {
label: {
show: true,
textStyle: {
fontSize: 14,
color: '#000'
}
},
itemStyle: {
color: '#ff8000'
}
}
},
{
type: 'bar3D',
name: '60-80%',
data: [
[3, 0, 20], // 闪变 - 60-80%
[3, 1, 30], // 谐波电压 - 60-80%
[3, 2, 35], // 谐波电流 - 60-80%
[3, 3, 40], // 电压偏差 - 60-80%
[3, 4, 35] // 三相不平衡 - 60-80%
],
shading: 'realistic',
label: {
show: false
},
itemStyle: {
opacity: 0.9
},
emphasis: {
label: {
show: true,
textStyle: {
fontSize: 14,
color: '#000'
}
},
itemStyle: {
color: '#ff8000'
}
}
},
{
type: 'bar3D',
name: '80-100%',
data: [
[4, 0, 25], // 闪变 - 80-100%
[4, 1, 35], // 谐波电压 - 80-100%
[4, 2, 40], // 谐波电流 - 80-100%
[4, 3, 45], // 电压偏差 - 80-100%
[4, 4, 42] // 三相不平衡 - 80-100%
],
shading: 'realistic',
label: {
show: false
},
itemStyle: {
opacity: 0.9
},
emphasis: {
label: {
show: true,
textStyle: {
fontSize: 14,
color: '#000'
}
},
itemStyle: {
color: '#ff8000'
} }
} }
} }
] ]
} }
}) })
const echartList1 = ref({ const echartList1 = ref({
title: { title: {
text: '越限时间概率分布' text: '越限时间概率分布'

View File

@@ -0,0 +1,158 @@
<template>
<div>
<!-- 综合评估详情 -->
<el-dialog draggable title="指标合格率统计" v-model="dialogVisible" append-to-body width="70%">
<TableHeader datePicker showExport :showReset="false">
<template v-slot:select>
<el-form-item label="监测点名称">
<el-select
v-model="tableStore.table.params.searchValue"
placeholder="请选择监测点名称"
style="width: 150px"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</template>
</TableHeader>
<Table ref="tableRef" @cell-click="cellClickEvent" isGroup :height="height"></Table>
</el-dialog>
<!-- 谐波电流谐波电压占有率 -->
<HarmonicRatio ref="harmonicRatioRef" />
</div>
</template>
<script setup lang="ts">
import { ref, provide } from 'vue'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import TableStore from '@/utils/tableStore'
import { mainHeight } from '@/utils/layout'
import HarmonicRatio from '@/components/cockpit/listOfMainMonitoringPoints/components/harmonicRatio.vue'
const dialogVisible: any = ref(false)
const harmonicRatioRef: any = ref(null)
const options = [
{
value: '35kV进线',
label: '35kV进线'
}
]
const height = mainHeight(0, 2).height as any
const loop50 = (key: string) => {
let list: any[] = []
for (let i = 2; i < 51; i++) {
list.push({
title: i + '次',
// field: key + i,
field: 'flicker',
width: '80',
// render: 'customTemplate',
// customTemplate: (row: any) => {
// return `<span style='cursor: pointer;text-decoration: underline;'>${row.flicker}</span>`
// }
})
}
return list
}
const tableStore: any = new TableStore({
url: '/user-boot/role/selectRoleDetail?id=0',
method: 'POST',
publicHeight: 30,
showPage: false,
exportName: '主要监测点列表',
column: [
{
field: 'index',
title: '序号',
width: '80',
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{
title: '日期',
field: 'time',
width: '150'
},
{
title: '名称',
field: 'name',
width: '150'
},
{
title: '闪变越限(分钟)',
field: 'flicker',
width: '80',
// render: 'customTemplate',
// customTemplate: (row: any) => {
// return `<span style='cursor: pointer;text-decoration: underline;'>${row.flicker}</span>`
// }
},
{
title: '谐波电压越限(分钟)',
children: loop50('voltage')
},
{
title: '谐波电流越限(分钟)',
children: loop50('harmonicCurrent')
},
{
title: '三相不平衡度越限(分钟)',
field: 'flicker',
width: '100'
},
{
title: '电压偏差越限(分钟)',
field: 'flicker',
width: '100'
},
{
title: '频率偏差越限(分钟)',
field: 'flicker',
width: '100'
}
],
beforeSearchFun: () => {},
loadCallback: () => {
tableStore.table.data = [
{
time: '2024-01-01 00:00:00',
name: '35kV进线',
flicker: '0'
},
{
time: '2024-01-01 00:00:00',
name: '35kV进线',
flicker: '0'
},
{
time: '2024-01-01 00:00:00',
name: '35kV进线',
flicker: '0'
}
]
}
})
tableStore.table.params.searchValue = ''
provide('tableStore', tableStore)
const open = async (row: any) => {
dialogVisible.value = true
tableStore.index()
}
// 点击行
const cellClickEvent = ({ row, column }: any) => {
if (column.field != 'name' && column.field != 'time') {
harmonicRatioRef.value.openDialog(row)
}
}
defineExpose({ open })
</script>
<style lang="scss" scoped></style>

View File

@@ -11,7 +11,7 @@
> >
<template v-slot:select> <template v-slot:select>
<el-form-item label="关键词"> <el-form-item label="关键词">
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输关键字" /> <el-input v-model="tableStore.table.params.keywords" clearable placeholder="请输关键字" />
</el-form-item> </el-form-item>
</template> </template>
</TableHeader> </TableHeader>
@@ -29,11 +29,8 @@ import { ref, onMounted, provide, reactive, watch, h } from 'vue'
import TableStore from '@/utils/tableStore' import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue' import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/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 { getTimeOfTheMonth } from '@/utils/formatTime'
import { ElTag } from 'element-plus' import OverLimitDetails from '@/components/cockpit/indicatorFittingChart/components/overLimitDetails.vue'
import OverLimitDetails from '@/components/cockpit/listOfMainMonitoringPoints/components/overLimitDetails.vue'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import { useTimeCacheStore } from '@/stores/timeCache' import { useTimeCacheStore } from '@/stores/timeCache'
@@ -76,9 +73,8 @@ const fullscreen = computed(() => {
const tableStore: any = new TableStore({ const tableStore: any = new TableStore({
url: '/system-boot/dashboard/queryPage', url: '/harmonic-boot/mainLine/list',
method: 'POST', method: 'POST',
showPage: false, showPage: false,
exportName: '主要监测点列表', exportName: '主要监测点列表',
column: [ column: [
@@ -92,27 +88,26 @@ const tableStore: any = new TableStore({
}, },
{ {
title: '监测点名称', title: '监测点名称',
field: 'name', field: 'lineName',
minWidth: '90', minWidth: '90',
render: 'customTemplate', render: 'customTemplate',
customTemplate: (row: any) => { customTemplate: (row: any) => {
return `<span style='cursor: pointer;text-decoration: underline;'>${row.name}</span>` return `<span style='cursor: pointer;text-decoration: underline;'>${row.lineName}</span>`
} }
}, },
{ {
title: '监测对象类型', title: '监测对象类型',
field: 'type', field: 'objType',
minWidth: '90' minWidth: '90'
}, },
{ {
title: '是否治理', title: '是否治理',
field: 'whetherToGovern', field: 'govern',
minWidth: '70' minWidth: '70'
}, },
{ title: '主要存在的电能质量问题', field: 'question', minWidth: '150' } { title: '主要存在的电能质量问题', field: 'problems', minWidth: '150' }
], ],
beforeSearchFun: () => { beforeSearchFun: () => {
// 尝试从缓存获取时间值 // 尝试从缓存获取时间值
@@ -132,46 +127,18 @@ const tableStore: any = new TableStore({
tableStore.table.params.searchEndTime = endTime || prop.timeValue?.[1] || getTimeOfTheMonth(prop.timeKey)[1] tableStore.table.params.searchEndTime = endTime || prop.timeValue?.[1] || getTimeOfTheMonth(prop.timeKey)[1]
}, },
loadCallback: () => { 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)` tableStore.table.height = `calc(${prop.height} - 80px)`
} }
}) })
const tableRef = ref() const tableRef = ref()
provide('tableRef', tableRef) provide('tableRef', tableRef)
tableStore.table.params.type = '' tableStore.table.params.keywords = ''
tableStore.table.params.searchValue = ''
provide('tableStore', tableStore) provide('tableStore', tableStore)
// 点击行 // 点击行
const cellClickEvent = ({ row, column }: any) => { const cellClickEvent = ({ row, column }: any) => {
if (column.field == 'name') { if (column.field == 'lineName') {
console.log(row) console.log(row)
OverLimitDetailsRef.value.open(row) OverLimitDetailsRef.value.open(row)
} }

View File

@@ -7,27 +7,70 @@
<el-select <el-select
v-model="tableStore.table.params.searchValue" v-model="tableStore.table.params.searchValue"
placeholder="请选择谐波次数" placeholder="请选择谐波次数"
style="width: 240px" style="width: 150px"
> >
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" /> <el-option
v-for="item in harmonicOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="指标类型"> <el-form-item label="指标类型" v-show="!tableStore.table.params.checked">
<el-select <el-select
v-model="tableStore.table.params.searchValue" v-model="tableStore.table.params.indicatorType"
placeholder="请选择指标类型" placeholder="请选择指标类型"
style="width: 240px" style="width: 150px"
> >
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" /> <el-option
v-for="item in indicatorList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="指标类型1" v-show="tableStore.table.params.checked == true">
<el-select
v-model="tableStore.table.params.indicatorType1"
placeholder="请选择指标类型1"
style="width: 150px"
>
<el-option
v-for="item in indicatorList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="指标类型2" v-show="tableStore.table.params.checked == true">
<el-select
v-model="tableStore.table.params.indicatorType2"
placeholder="请选择指标类型2"
style="width: 150px"
>
<el-option
v-for="item in indicatorList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-checkbox v-model="tableStore.table.params.checked">指标对比分析</el-checkbox>
</el-form-item>
</template> </template>
</TableHeader> </TableHeader>
<my-echart <my-echart
class="tall" class="tall"
v-if="!tableStore.table.params.checked"
:options="echartList" :options="echartList"
style="width: 98%; height: 320px" style="width: 98%; height: 320px"
/> />
<my-echart class="tall" v-else :options="echartContrastList" style="width: 98%; height: 320px" />
</el-dialog> </el-dialog>
</template> </template>
@@ -55,16 +98,12 @@ const options = [
] ]
const config = useConfig() const config = useConfig()
const powerList: any = ref([
{ const harmonicOptions = Array.from({ length: 50 }, (_, i) => ({
label: '三相总有功功率', value: String(i + 1),
value: '1' label: `${i + 1}次谐波`
}, }))
{
label: '三相总无功功率',
value: '2'
}
])
const exceedingTheLimitList: any = ref([ const exceedingTheLimitList: any = ref([
{ {
label: '越限', label: '越限',
@@ -95,9 +134,8 @@ const indicatorList: any = ref([
]) ])
const echartList = ref({ const echartList = ref({
title: { title: {
text: '35kV进线谐波含有率', text: '谐波电压含有率'
}, },
xAxis: { xAxis: {
type: 'time', type: 'time',
axisLabel: { axisLabel: {
@@ -108,7 +146,6 @@ const echartList = ref({
} }
} }
}, },
yAxis: [{}, {}], yAxis: [{}, {}],
grid: { grid: {
left: '10px', left: '10px',
@@ -117,51 +154,171 @@ const echartList = ref({
options: { options: {
series: [ series: [
{ {
// name: '暂降次数', name: 'A相',
type: 'bar', type: 'line',
name: '有功功率', showSymbol: false,
smooth: true,
data: [ data: [
['2025-10-16 07:00:00', 10], ['2025-10-16 07:00:00', 0.5],
['2025-10-16 07:15:00', 10], ['2025-10-16 07:15:00', 0.6],
['2025-10-16 07:30:00', 10], ['2025-10-16 07:30:00', 0.4],
['2025-10-16 07:45:00', 10], ['2025-10-16 07:45:00', 0.7],
['2025-10-16 08:00:00', 30], ['2025-10-16 08:00:00', 1.2],
['2025-10-16 08:15:00', 50], ['2025-10-16 08:15:00', 1.5],
['2025-10-16 08:30:00', 60], ['2025-10-16 08:30:00', 1.8],
['2025-10-16 08:45:00', 70], ['2025-10-16 08:45:00', 2.1],
['2025-10-16 09:00:00', 100], ['2025-10-16 09:00:00', 2.5],
['2025-10-16 09:15:00', 120], ['2025-10-16 09:15:00', 2.8],
['2025-10-16 09:30:00', 130], ['2025-10-16 09:30:00', 3.0],
['2025-10-16 09:45:00', 140], ['2025-10-16 09:45:00', 2.7],
['2025-10-16 10:00:00', 160], ['2025-10-16 10:00:00', 2.2],
['2025-10-16 10:15:00', 160], ['2025-10-16 10:15:00', 1.9],
['2025-10-16 10:30:00', 130], ['2025-10-16 10:30:00', 1.6],
['2025-10-16 10:45:00', 120], ['2025-10-16 10:45:00', 1.3],
['2025-10-16 11:00:00', 140], ['2025-10-16 11:00:00', 1.1],
['2025-10-16 11:15:00', 80], ['2025-10-16 11:15:00', 0.8],
['2025-10-16 11:30:00', 70], ['2025-10-16 11:30:00', 0.6],
['2025-10-16 11:45:00', 90], ['2025-10-16 11:45:00', 0.4],
['2025-10-16 12:00:00', 60], ['2025-10-16 12:00:00', 0.3],
['2025-10-16 12:15:00', 60], ['2025-10-16 12:15:00', 0.2],
['2025-10-16 12:30:00', 60], ['2025-10-16 12:30:00', 0.3],
['2025-10-16 12:45:00', 60] ['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 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', type: 'line',
showSymbol: false, showSymbol: false,
smooth: true, smooth: true,
@@ -191,11 +348,45 @@ const echartList = ref({
['2025-10-16 12:30:00', 0], ['2025-10-16 12:30:00', 0],
['2025-10-16 12:45: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 yAxisIndex: 1
} }
] ]
} }
}) })
const headerHeight = ref(57) const headerHeight = ref(57)
const selectChange = (showSelect: any, height: any) => { const selectChange = (showSelect: any, height: any) => {
headerHeight.value = height headerHeight.value = height
@@ -219,6 +410,10 @@ tableStore.table.params.power = '1'
tableStore.table.params.indicator = '1' tableStore.table.params.indicator = '1'
tableStore.table.params.exceedingTheLimit = '1' tableStore.table.params.exceedingTheLimit = '1'
tableStore.table.params.searchValue = '' 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) provide('tableStore', tableStore)
onMounted(() => { onMounted(() => {

View File

@@ -8,7 +8,7 @@
<el-select <el-select
v-model="tableStore.table.params.searchValue" v-model="tableStore.table.params.searchValue"
placeholder="请选择监测点名称" placeholder="请选择监测点名称"
style="width: 240px" style="width: 150px"
> >
<el-option <el-option
v-for="item in options" v-for="item in options"
@@ -147,6 +147,7 @@ const open = async (row: any) => {
// 点击行 // 点击行
const cellClickEvent = ({ row, column }: any) => { const cellClickEvent = ({ row, column }: any) => {
console.log(row, '1111')
if (column.field != 'name' && column.field != 'time') { if (column.field != 'name' && column.field != 'time') {
harmonicRatioRef.value.openDialog(row) harmonicRatioRef.value.openDialog(row)
} }

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="default-main"> <div class="default-main">
<TableHeader :showSearch="false" v-if="flag"> <TableHeader :showSearch="false" v-show="flag">
<template v-slot:select> <template v-slot:select>
<el-form-item label="日期"> <el-form-item label="日期">
<DatePicker ref="datePickerRef" :nextFlag="false" :theCurrentTime="true" @change="handleDatePickerChange"></DatePicker> <DatePicker ref="datePickerRef" :nextFlag="false" :theCurrentTime="true" @change="handleDatePickerChange"></DatePicker>