暂态事件-波形解析接口调试

This commit is contained in:
zhujiyan
2024-08-01 10:55:08 +08:00
parent 06c08c416e
commit f056aa3eb1
4 changed files with 85 additions and 51 deletions

View File

@@ -202,6 +202,15 @@ export default {
this.boxoList.evtParamTm +
"s";
}else {
console.log( this.boxoList.subName,"0000000000000000");
if((this.boxoList.featureAmplitude * 100).toFixed(0)){
this.boxoList.featureAmplitude= (this.boxoList.featureAmplitude * 100).toFixed(0)
}
for(var key in this.boxoList) {
if(this.boxoList[key]==null||!this.boxoList[key]){
this.boxoList[key]='/'
}
}
this.titles =
"变电站名称:" +
this.boxoList.subName +
@@ -210,7 +219,7 @@ export default {
" 发生时刻:" +
this.boxoList.startTime +
" 暂降(骤升)幅值:" +
(this.boxoList.featureAmplitude * 100).toFixed(0) +
this.boxoList.featureAmplitude+
"% 持续时间:" +
this.boxoList.duration +
"s";

View File

@@ -96,7 +96,7 @@ export default {
}
},
mounted() {
// console.log(`123123`,this.boxoList,this.wp);
console.log(`123123`,this.boxoList,this.wp);
this.zoom = 1 / document.body.style.zoom
window.addEventListener('resize', () => {
this.zoom = 1 / document.body.style.zoom
@@ -142,6 +142,7 @@ export default {
},
//根据后台查询的数据,清洗数据
initWaves() {
console.log(this.boxoList.systemType,"this.boxoList.systemType");
if (null != this.wp) {
if (this.boxoList.systemType == 'pms') {
this.titles =
@@ -170,17 +171,25 @@ export default {
this.boxoList.evtParamTm +
's'
} else {
if((this.boxoList.featureAmplitude * 100).toFixed(0)){
this.boxoList.featureAmplitude= (this.boxoList.featureAmplitude * 100).toFixed(0)
}
for(var key in this.boxoList) {
if(this.boxoList[key]==null||!this.boxoList[key]){
this.boxoList[key]='/'
}
}
this.titles =
'变电站名称:' +
this.boxoList.subName +
this.boxoList.subName +
' 监测点名称:' +
this.boxoList.lineName +
' 发生时刻:' +
this.boxoList.startTime +
' 暂降(骤升)幅值:' +
(this.boxoList.featureAmplitude * 100).toFixed(0) +
this.boxoList.featureAmplitude +
'% 持续时间:' +
this.boxoList.duration +
this.boxoList.duration +
's'
}

View File

@@ -5,8 +5,8 @@
<el-form-item label="值类型选择">
<el-select @change="changeView" v-model="value" placeholder="请选择值类型">
<el-option
v-for="item in options"
:key="item.value"
v-for="(item, index) in options"
:key="index"
:label="item.label"
:value="item.value"
></el-option>
@@ -17,18 +17,26 @@
<el-tab-pane
label="瞬时波形"
name="ssbx"
class="boxbx pt10 pb10"
:style="'height:' + bxecharts + ';overflow-y: scroll;'"
:style="'height:' + bxecharts + ';overflow-y: scroll;padding-bottom:200px;'"
>
<shushiboxi v-if="wp" :value="value" :boxoList="boxoList" :wp="wp"></shushiboxi>
<shushiboxi
v-if="isWp && wp && activeName == 'ssbx'"
:value="value"
:boxoList="boxoList"
:wp="wp"
></shushiboxi>
</el-tab-pane>
<el-tab-pane
label="RMS波形"
class="boxbx pt10 pb10"
name="rmsbx"
:style="'height:' + bxecharts + ';overflow-y: scroll;'"
:style="'height:' + bxecharts + ';overflow-y: scroll;padding-bottom:200px;'"
>
<rmsboxi v-if="wp" :value="value" :boxoList="boxoList" :wp="wp"></rmsboxi>
<rmsboxi
v-if="isWp && wp && activeName == 'rmsbx'"
:value="value"
:boxoList="boxoList"
:wp="wp"
></rmsboxi>
</el-tab-pane>
<!-- <el-tab-pane label="瞬时波形" name="0">
<template #label>
@@ -109,9 +117,8 @@ const view = ref(true)
const view2 = ref(false)
const showBoxi = ref(true)
const activeName = ref('ssbx')
const boxoList = ref({})
const wp = ref({})
const value = ref(1)
const value = ref(2)
const options = ref([
{
value: 1,
@@ -122,29 +129,34 @@ const options = ref([
label: '二次值'
}
])
watch(
() => props.wp,
(val, oldVal) => {
if (val) {
console.log(val, '+++++++++++++++wp')
wp.value == val
}
},
{
immediate: true,
deep: true
}
)
const getWpData = (val: any) => {
// watch(
// () => props.wp,
// (val, oldVal) => {
// if (val) {
// console.log(val,"+++++++++++++++wp");
// wp.value == val
// }
// },
// {
// immediate: true,
// deep: true
// }
// )
const isWp = ref(false)
const boxoList: any = ref([])
const getWpData = (val: any, list: any) => {
wp.value = val
isWp.value = true
boxoList.value = list
console.log(wp.value, val, 'ggggghhhh')
}
const changeView = () => {
// showBoxi.value = false
// setTimeout(() => {
// showBoxi.value = true
// }, 0)
showBoxi.value = false
setTimeout(() => {
showBoxi.value = true
}, 0)
}
const bxecharts = mainHeight(155).height as any
const bxecharts = mainHeight(195).height as any
//加载echarts
const init = () => {
return
@@ -524,7 +536,7 @@ const init = () => {
}
const handleClick = (tab: any, event: any) => {
activeName.value = tab.index
// activeName.value = tab.index
if (tab.name == 'ssbx') {
activeName.value = 'ssbx'
} else if (tab.name == 'rmsbx') {
@@ -561,11 +573,17 @@ defineExpose({ getWpData })
position: relative;
.waveFormAnalysis_header {
position: absolute;
top: -30px;
top: -25px;
left: 0;
width: 80%;
height: 40px;
.el-select {
width: 200px !important;
}
}
.waveFormAnalysis_body {
margin-top: 15px;
margin-top: 20px;
flex: 1;
}
}
</style>

View File

@@ -9,11 +9,11 @@
</div>
<div class="view">
<Table ref="tableRef" v-if="!isWaveCharts" />
<waveFormAnalysis ref="waveFormAnalysisRef" v-if="isWaveCharts" :wp="wp" />
<waveFormAnalysis v-if="isWaveCharts" ref="waveFormAnalysisRef" :wp="wp" />
</div>
</template>
<script lang="ts" setup>
import { ref, onMounted, provide } from 'vue'
import { ref, onMounted, provide, nextTick } from 'vue'
import { getTabsDataByType } from '@/api/cs-device-boot/EquipmentDelivery'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
@@ -26,9 +26,10 @@ const view = ref(true)
const view2 = ref(false)
const showBoxi = ref(true)
const bxactiveName = ref('ssbx')
const boxoList = ref({})
const boxoList:any = ref([])
const wp = ref({})
const value = ref(1)
const waveFormAnalysisRef = ref()
const tableStore: any = new TableStore({
url: '/cs-device-boot/csGroup/deviceDataByType',
publicHeight: 210,
@@ -93,11 +94,11 @@ const tableStore: any = new TableStore({
// },
click: async row => {
row.loading = true
boxoList.value = row
await analyseWave(row.eventId)
.then(res => {
row.loading = false
if (res != undefined) {
boxoList.value = row
wp.value = res.data
view.value = false
view2.value = true
@@ -106,7 +107,10 @@ const tableStore: any = new TableStore({
.catch(() => {
row.loading = false
})
handleWaveFormAnalysis(wp.value)
isWaveCharts.value = true
nextTick(() => {
waveFormAnalysisRef.value && waveFormAnalysisRef.value.getWpData(wp.value, boxoList.value)
})
}
}
]
@@ -130,17 +134,11 @@ const getTableParams = (val: any) => {
isWaveCharts.value = false
tableStore.index()
}
//波形解析组件
const waveFormAnalysisRef = ref()
const handleWaveFormAnalysis = (val: any) => {
console.log(val, '波形解析')
isWaveCharts.value = true
waveFormAnalysisRef.value.getWpData(val)
}
//返回
const handleBack = () => {
const handleBack = async () => {
isWaveCharts.value = false
tableStore.index()
console.log(6666666, isWaveCharts.value)
await tableStore.index()
}
defineExpose({ getTableParams })
onMounted(() => {