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

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 + this.boxoList.evtParamTm +
"s"; "s";
}else { }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.titles =
"变电站名称:" + "变电站名称:" +
this.boxoList.subName + this.boxoList.subName +
@@ -210,7 +219,7 @@ export default {
" 发生时刻:" + " 发生时刻:" +
this.boxoList.startTime + this.boxoList.startTime +
" 暂降(骤升)幅值:" + " 暂降(骤升)幅值:" +
(this.boxoList.featureAmplitude * 100).toFixed(0) + this.boxoList.featureAmplitude+
"% 持续时间:" + "% 持续时间:" +
this.boxoList.duration + this.boxoList.duration +
"s"; "s";

View File

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

View File

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

View File

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