暂降幅值概率分布
This commit is contained in:
@@ -61,4 +61,32 @@ export function getStatistic(data: any) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 暂降分布统计 右 获取数据
|
||||||
|
export function getProbabilityDistribution(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/event-boot/monitor/getProbabilityDistribution',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 事件分析 获取数据
|
||||||
|
export function getMonitorEventAnalyseQuery(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/event-boot/monitor/getMonitorEventAnalyseQuery',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 事件分析 下载
|
||||||
|
export function downloadMonitorEventWaveFile(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/event-boot/monitor/downloadMonitorEventWaveFile',
|
||||||
|
method: 'post',
|
||||||
|
data: data.lineId,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
@@ -8,17 +8,6 @@
|
|||||||
<el-button type='primary' @click='init'>查询</el-button>
|
<el-button type='primary' @click='init'>查询</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-descriptions
|
|
||||||
class='mt2'
|
|
||||||
direction='vertical'
|
|
||||||
:column='4'
|
|
||||||
border
|
|
||||||
>
|
|
||||||
<el-descriptions-item align='center' label='名称'>{{ data.name }}</el-descriptions-item>
|
|
||||||
<el-descriptions-item align='center' label='事件总数'>{{ data.gs }}</el-descriptions-item>
|
|
||||||
<el-descriptions-item align='center' label='可容忍'>{{ data.krr }}</el-descriptions-item>
|
|
||||||
<el-descriptions-item align='center' label='不可容忍'> {{ data.bkrr }}</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
<div style='flex: 1;' class='mt10'>
|
<div style='flex: 1;' class='mt10'>
|
||||||
<my-echart :options='options' />
|
<my-echart :options='options' />
|
||||||
</div>
|
</div>
|
||||||
@@ -29,7 +18,7 @@ import { nextTick, onMounted, reactive, ref } from 'vue'
|
|||||||
import DatePicker from '@/components/form/datePicker/index.vue'
|
import DatePicker from '@/components/form/datePicker/index.vue'
|
||||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||||
import { useMonitoringPoint } from '@/views/pms/voltageSags/monitoringPoint/online/store'
|
import { useMonitoringPoint } from '@/views/pms/voltageSags/monitoringPoint/online/store'
|
||||||
import { getPlot } from '@/api/event-boot/monitor'
|
import { getProbabilityDistribution } from '@/api/event-boot/monitor'
|
||||||
|
|
||||||
const datePickerRef = ref()
|
const datePickerRef = ref()
|
||||||
const monitoringPoint = useMonitoringPoint()
|
const monitoringPoint = useMonitoringPoint()
|
||||||
@@ -39,37 +28,43 @@ const formData = reactive({
|
|||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: ''
|
endTime: ''
|
||||||
})
|
})
|
||||||
const data = reactive({
|
|
||||||
name: '事件个数',
|
|
||||||
gs: 0,
|
|
||||||
krr: 0,
|
|
||||||
bkrr: 0
|
|
||||||
})
|
|
||||||
const options = ref({})
|
const options = ref({})
|
||||||
|
|
||||||
const init = () => {
|
const init = () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
formData.startTime = datePickerRef.value.timeValue[0]
|
formData.startTime = datePickerRef.value.timeValue[0]
|
||||||
formData.endTime = datePickerRef.value.timeValue[1]
|
formData.endTime = datePickerRef.value.timeValue[1]
|
||||||
getPlot(formData).then(
|
getProbabilityDistribution(formData).then(
|
||||||
(res: any) => {
|
(res: any) => {
|
||||||
const gongData = gongfunction(res.data.voltageToleranceCurveDataList)
|
let data = res.data
|
||||||
data.gs = res.data.voltageToleranceCurveDataList.length
|
let eventValue = data.eventvalue
|
||||||
data.krr = gongData.pointI.length
|
let pereventValue = data.pereventvalue
|
||||||
data.bkrr = gongData.pointIun.length
|
|
||||||
console.log(gongData)
|
|
||||||
options.value = {
|
options.value = {
|
||||||
// backgroundColor: "#f9f9f9", //地图背景色深蓝
|
backgroundColor: '#fff', //背景色,
|
||||||
title: {
|
title: {
|
||||||
text: `SEMI F47曲线`
|
text: '暂降幅值的概率分布函数',
|
||||||
|
x: 'center'
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
data: ['上限', '下限', '可容忍事件', '不可容忍事件'],
|
|
||||||
x: 'left'
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'item',
|
|
||||||
show: true,
|
show: true,
|
||||||
|
left: 10,
|
||||||
|
data: ['概率分布', '占比'],
|
||||||
|
|
||||||
|
textStyle: {
|
||||||
|
rich: {
|
||||||
|
a: {
|
||||||
|
verticalAlign: 'middle'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
padding: [2, 0, 0, 0] //[上、右、下、左]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
tooltip: {
|
||||||
|
//提示框组件
|
||||||
|
trigger: 'axis',
|
||||||
|
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: 'shadow',
|
type: 'shadow',
|
||||||
label: {
|
label: {
|
||||||
@@ -84,83 +79,93 @@ const init = () => {
|
|||||||
fontSize: 14
|
fontSize: 14
|
||||||
},
|
},
|
||||||
backgroundColor: 'rgba(0,0,0,0.35)',
|
backgroundColor: 'rgba(0,0,0,0.35)',
|
||||||
borderWidth: 0,
|
borderWidth: 0
|
||||||
formatter: function(a: any) {
|
|
||||||
var relVal = ''
|
|
||||||
relVal =
|
|
||||||
'<font style=\'color:' +
|
|
||||||
'\'>发生时间:' +
|
|
||||||
a.value[2] +
|
|
||||||
'</font><br/>'
|
|
||||||
relVal +=
|
|
||||||
'<font style=\'color:' +
|
|
||||||
'\'>持续时间:' +
|
|
||||||
a.value[0] +
|
|
||||||
's</font><br/>'
|
|
||||||
relVal +=
|
|
||||||
'<font style=\'color:' +
|
|
||||||
'\'>特征幅值:' +
|
|
||||||
a.value[1].toFixed(2) +
|
|
||||||
'%</font>'
|
|
||||||
return relVal
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
calculable: true,
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
type: 'log',
|
type: 'category',
|
||||||
min: 0.001,
|
name: '暂降幅值',
|
||||||
max: 1000,
|
nameGap: 10,
|
||||||
splitLine: {
|
nameTextStyle: {
|
||||||
show: false
|
fontSize: 12
|
||||||
},
|
},
|
||||||
name: 's'
|
data: [
|
||||||
|
'0',
|
||||||
|
'10%',
|
||||||
|
'20%',
|
||||||
|
'30%',
|
||||||
|
'40%',
|
||||||
|
'50%',
|
||||||
|
'60%',
|
||||||
|
'70%',
|
||||||
|
'80%',
|
||||||
|
'90%',
|
||||||
|
'100%'
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
yAxis: [
|
yAxis: [
|
||||||
{
|
{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
max: function(value: any) {
|
name: '概率分布',
|
||||||
return value.max + 20
|
nameTextStyle: {
|
||||||
|
fontSize: 15
|
||||||
},
|
},
|
||||||
splitNumber: 10,
|
axisLabel: {
|
||||||
minInterval: 0.1,
|
formatter: '{value}%'
|
||||||
name: '%'
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: true
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
lineStyle: {
|
||||||
|
// 使用深浅的间隔色
|
||||||
|
type: 'dashed',
|
||||||
|
opacity: 0.5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'value',
|
||||||
|
name: '占比',
|
||||||
|
|
||||||
|
nameTextStyle: {
|
||||||
|
fontSize: 15
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: true
|
||||||
|
},
|
||||||
|
|
||||||
|
splitLine: {
|
||||||
|
lineStyle: {
|
||||||
|
type: 'dashed',
|
||||||
|
opacity: 0.5
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
options: {
|
series: [
|
||||||
dataZoom: null,
|
{
|
||||||
series: [
|
name: '概率分布',
|
||||||
{
|
type: 'line',
|
||||||
name: '边界线',
|
data: eventValue,
|
||||||
type: 'line',
|
itemStyle: {
|
||||||
data: [
|
normal: { show: true }
|
||||||
[0.05, 0],
|
|
||||||
[0.05, 50],
|
|
||||||
[0.2, 50],
|
|
||||||
[0.2, 70],
|
|
||||||
[0.5, 70],
|
|
||||||
[0.5, 80],
|
|
||||||
[10, 80],
|
|
||||||
[1000, 80]
|
|
||||||
],
|
|
||||||
showSymbol: false,
|
|
||||||
tooltips: {
|
|
||||||
show: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '可容忍事件',
|
|
||||||
type: 'scatter',
|
|
||||||
symbol: 'circle',
|
|
||||||
data: gongData.pointI
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '不可容忍事件',
|
|
||||||
type: 'scatter',
|
|
||||||
symbol: 'circle',
|
|
||||||
data: gongData.pointIun
|
|
||||||
}
|
}
|
||||||
]
|
},
|
||||||
|
{
|
||||||
|
name: '占比',
|
||||||
|
type: 'bar',
|
||||||
|
data: pereventValue,
|
||||||
|
barWidth: 30,
|
||||||
|
itemStyle: {
|
||||||
|
normal: { show: true }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
options:{
|
||||||
|
dataZoom: null,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
@@ -170,164 +175,6 @@ const init = () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function gongfunction(arr: any) {
|
|
||||||
let standI = 0
|
|
||||||
let unstandI = 0
|
|
||||||
let standF = 0
|
|
||||||
let unstandF = 0
|
|
||||||
let total = 0
|
|
||||||
let pointIun = []
|
|
||||||
let pointI = []
|
|
||||||
let pointF = []
|
|
||||||
let pointFun = []
|
|
||||||
total = arr.length
|
|
||||||
if (total == 0) {
|
|
||||||
} else {
|
|
||||||
for (let i = 0; i < arr.length; i++) {
|
|
||||||
let point = []
|
|
||||||
let xx = arr[i].persistTime
|
|
||||||
let yy = arr[i].eventValue
|
|
||||||
let time = arr[i].time
|
|
||||||
let eventId = arr[i].eventId
|
|
||||||
// let index =arr[i].eventDetailIndex;
|
|
||||||
point = [xx, yy, time, eventId]
|
|
||||||
|
|
||||||
if (xx <= 0.003) {
|
|
||||||
let line = 0
|
|
||||||
line = 250 - 30000 * xx
|
|
||||||
if (yy > line) {
|
|
||||||
unstandI++
|
|
||||||
pointIun.push({
|
|
||||||
value: point,
|
|
||||||
itemStyle: { normal: { color: 'red' } }
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
standI++
|
|
||||||
pointI.push({
|
|
||||||
value: point,
|
|
||||||
itemStyle: { normal: { color: 'green' } }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else if (xx <= 0.02) {
|
|
||||||
if (yy > 120) {
|
|
||||||
unstandI++
|
|
||||||
pointIun.push({
|
|
||||||
value: point,
|
|
||||||
itemStyle: { normal: { color: 'red' } }
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
standI++
|
|
||||||
pointI.push({
|
|
||||||
value: point,
|
|
||||||
itemStyle: { normal: { color: 'green' } }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else if (xx <= 0.5) {
|
|
||||||
if (yy > 120 || yy < 70) {
|
|
||||||
unstandI++
|
|
||||||
pointIun.push({
|
|
||||||
value: point,
|
|
||||||
itemStyle: { normal: { color: 'red' } }
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
standI++
|
|
||||||
pointI.push({
|
|
||||||
value: point,
|
|
||||||
itemStyle: { normal: { color: 'green' } }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else if (xx <= 10) {
|
|
||||||
if (yy > 110 || yy < 80) {
|
|
||||||
unstandI++
|
|
||||||
pointIun.push({
|
|
||||||
value: point,
|
|
||||||
itemStyle: { normal: { color: 'red' } }
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
standI++
|
|
||||||
pointI.push({
|
|
||||||
value: point,
|
|
||||||
itemStyle: { normal: { color: 'green' } }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (yy > 110 || yy < 90) {
|
|
||||||
unstandI++
|
|
||||||
pointIun.push({
|
|
||||||
value: point,
|
|
||||||
itemStyle: { normal: { color: 'red' } }
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
standI++
|
|
||||||
pointI.push({
|
|
||||||
value: point,
|
|
||||||
itemStyle: { normal: { color: 'green' } }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (xx < 0.05) {
|
|
||||||
standF++
|
|
||||||
pointF.push({
|
|
||||||
value: point,
|
|
||||||
itemStyle: { normal: { color: 'green' } }
|
|
||||||
})
|
|
||||||
} else if (xx < 0.2) {
|
|
||||||
if (yy > 50) {
|
|
||||||
standF++
|
|
||||||
pointF.push({
|
|
||||||
value: point,
|
|
||||||
itemStyle: { normal: { color: 'green' } }
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
unstandF++
|
|
||||||
pointFun.push({
|
|
||||||
value: point,
|
|
||||||
itemStyle: { normal: { color: 'red' } }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else if (xx < 0.5) {
|
|
||||||
if (yy > 70) {
|
|
||||||
standF++
|
|
||||||
pointF.push({
|
|
||||||
value: point,
|
|
||||||
itemStyle: { normal: { color: 'green' } }
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
unstandF++
|
|
||||||
pointFun.push({
|
|
||||||
value: point,
|
|
||||||
itemStyle: { normal: { color: 'red' } }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (yy > 80) {
|
|
||||||
standF++
|
|
||||||
pointF.push({
|
|
||||||
value: point,
|
|
||||||
itemStyle: { normal: { color: 'green' } }
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
unstandF++
|
|
||||||
pointFun.push({
|
|
||||||
value: point,
|
|
||||||
itemStyle: { normal: { color: 'red' } }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
standI,
|
|
||||||
unstandI,
|
|
||||||
pointI,
|
|
||||||
pointIun,
|
|
||||||
standF,
|
|
||||||
unstandF,
|
|
||||||
pointF,
|
|
||||||
pointFun
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init()
|
init()
|
||||||
|
|||||||
Reference in New Issue
Block a user