2024-01-12 14:05:36 +08:00
|
|
|
<template>
|
2024-01-18 15:50:17 +08:00
|
|
|
<div class="default-main">
|
|
|
|
|
<div class="analyze-dvr" v-show="view" :style="{ height: pageHeight.height }" v-loading="loading">
|
|
|
|
|
<DeviceTree @node-click="nodeClick" @init="nodeClick"></DeviceTree>
|
2024-01-29 14:57:49 +08:00
|
|
|
<div class="analyze-dvr-right" v-if="tableStore.table.params.deviceId">
|
2024-01-18 15:50:17 +08:00
|
|
|
<Table v-if="view" ref="tableRef"></Table>
|
|
|
|
|
</div>
|
2024-01-29 14:57:49 +08:00
|
|
|
<el-empty v-else description="请选择设备" class="analyze-dvr-right" />
|
2024-01-18 15:50:17 +08:00
|
|
|
</div>
|
|
|
|
|
<div :style="{ height: pageHeight.height }" style="padding: 10px; overflow: hidden" v-if="!view">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
2024-09-25 16:36:53 +08:00
|
|
|
<div v-if="view2" style="display: flex">
|
2024-12-17 20:57:07 +08:00
|
|
|
<el-radio-group v-model="value" @change="changeView">
|
|
|
|
|
<el-radio-button label="一次值" :value="1" />
|
|
|
|
|
<el-radio-button label="二次值" :value="2" />
|
|
|
|
|
|
|
|
|
|
</el-radio-group>
|
2024-09-25 16:36:53 +08:00
|
|
|
</div>
|
2024-01-18 15:50:17 +08:00
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
2024-12-17 20:57:07 +08:00
|
|
|
<el-button v-if="view2" @click="backbxlb" class="el-icon-refresh-right" icon="el-icon-Back"
|
|
|
|
|
style="float: right">
|
2024-01-18 15:50:17 +08:00
|
|
|
返回
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-tabs v-if="view2" class="default-main" v-model="bxactiveName" @tab-click="bxhandleClick">
|
2024-09-25 16:36:53 +08:00
|
|
|
<el-tab-pane label="瞬时波形" name="ssbx" class="boxbx pt10 pb10"
|
|
|
|
|
:style="'height:' + bxecharts + ';overflow-y: scroll;'">
|
|
|
|
|
<shushiboxi v-if="bxactiveName == 'ssbx' && showBoxi" :value="value" :boxoList="boxoList" :wp="wp">
|
|
|
|
|
</shushiboxi>
|
2024-01-18 15:50:17 +08:00
|
|
|
</el-tab-pane>
|
2024-09-25 16:36:53 +08:00
|
|
|
<el-tab-pane label="RMS波形" class="boxbx pt10 pb10" name="rmsbx"
|
|
|
|
|
:style="'height:' + bxecharts + ';overflow-y: scroll;'">
|
|
|
|
|
<rmsboxi v-if="bxactiveName == 'rmsbx' && showBoxi" :value="value" :boxoList="boxoList" :wp="wp">
|
|
|
|
|
</rmsboxi>
|
2024-01-18 15:50:17 +08:00
|
|
|
</el-tab-pane>
|
|
|
|
|
</el-tabs>
|
|
|
|
|
<!-- <xiebofenxi ref="child" :bxshuju="bxshuju" @backfh="back"></xiebofenxi> -->
|
2024-01-15 10:36:24 +08:00
|
|
|
</div>
|
2024-01-12 14:05:36 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2024-01-15 10:36:24 +08:00
|
|
|
import { ref, reactive, provide, onMounted } from 'vue'
|
2024-01-12 14:05:36 +08:00
|
|
|
import { mainHeight } from '@/utils/layout'
|
|
|
|
|
import DeviceTree from '@/components/tree/govern/deviceTree.vue'
|
2024-01-15 10:36:24 +08:00
|
|
|
import TableStore from '@/utils/tableStore'
|
|
|
|
|
import Table from '@/components/table/index.vue'
|
2024-01-18 15:50:17 +08:00
|
|
|
import { analyseWave } from '@/api/common'
|
|
|
|
|
import shushiboxi from '@/components/echarts/shushiboxi.vue'
|
|
|
|
|
import rmsboxi from '@/components/echarts/rmsboxi.vue'
|
2024-01-12 14:05:36 +08:00
|
|
|
defineOptions({
|
|
|
|
|
name: 'govern/analyze/DVR'
|
|
|
|
|
})
|
|
|
|
|
const pageHeight = mainHeight(20)
|
|
|
|
|
const loading = ref(false)
|
2024-01-18 15:50:17 +08:00
|
|
|
const view = ref(true)
|
|
|
|
|
const view2 = ref(false)
|
|
|
|
|
const showBoxi = ref(true)
|
|
|
|
|
|
|
|
|
|
const bxactiveName = ref('ssbx')
|
|
|
|
|
const boxoList = ref({})
|
|
|
|
|
const wp = ref({})
|
|
|
|
|
const value = ref(1)
|
|
|
|
|
const options = ref([
|
|
|
|
|
{
|
|
|
|
|
value: 1,
|
|
|
|
|
label: '一次值'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 2,
|
|
|
|
|
label: '二次值'
|
|
|
|
|
}
|
|
|
|
|
])
|
2024-01-15 10:36:24 +08:00
|
|
|
const tableStore = new TableStore({
|
2024-10-10 09:56:34 +08:00
|
|
|
url: '/cs-harmonic-boot/eventUser/queryEventpageWeb',
|
2024-01-15 10:36:24 +08:00
|
|
|
method: 'POST',
|
|
|
|
|
column: [
|
|
|
|
|
{ title: '事件描述', field: 'evtParamPosition' },
|
|
|
|
|
{ title: '持续时间(s)', field: 'evtParamTm' },
|
|
|
|
|
{ title: '暂降深度', field: 'evtParamVVaDepth' },
|
|
|
|
|
{ title: '发生时刻', field: 'startTime' },
|
|
|
|
|
{
|
|
|
|
|
title: '操作',
|
|
|
|
|
align: 'center',
|
2024-01-30 14:11:29 +08:00
|
|
|
width: '180',
|
2024-01-15 10:36:24 +08:00
|
|
|
render: 'buttons',
|
|
|
|
|
buttons: [
|
|
|
|
|
{
|
|
|
|
|
name: 'edit',
|
2024-01-18 15:50:17 +08:00
|
|
|
text: '波形分析',
|
2024-01-15 10:36:24 +08:00
|
|
|
type: 'primary',
|
|
|
|
|
icon: 'el-icon-DataLine',
|
2024-01-18 15:50:17 +08:00
|
|
|
render: 'basicButton',
|
|
|
|
|
disabled: row => {
|
|
|
|
|
return !row.wavePath && row.evtParamTm < 20
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
click: async row => {
|
|
|
|
|
row.loading = true
|
|
|
|
|
boxoList.value = row
|
|
|
|
|
await analyseWave(row.id)
|
|
|
|
|
.then(res => {
|
|
|
|
|
row.loading = false
|
|
|
|
|
if (res != undefined) {
|
|
|
|
|
wp.value = res.data
|
|
|
|
|
view.value = false
|
|
|
|
|
view2.value = true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
row.loading = false
|
|
|
|
|
})
|
2024-01-15 10:36:24 +08:00
|
|
|
}
|
2024-09-25 16:36:53 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'edit',
|
|
|
|
|
text: '暂无波形',
|
|
|
|
|
type: 'info',
|
|
|
|
|
icon: 'el-icon-DataLine',
|
|
|
|
|
render: 'basicButton',
|
|
|
|
|
disabled: row => {
|
|
|
|
|
return !(!row.wavePath && row.evtParamTm < 20)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
2024-01-18 15:50:17 +08:00
|
|
|
}
|
2024-01-15 10:36:24 +08:00
|
|
|
]
|
|
|
|
|
}
|
2024-01-18 15:50:17 +08:00
|
|
|
],
|
|
|
|
|
loadCallback: () => {
|
|
|
|
|
tableStore.table.data.forEach((item: any) => {
|
|
|
|
|
item.loading = false
|
|
|
|
|
item.evtParamTm = item.evtParamTm.split('s')[0]
|
|
|
|
|
})
|
|
|
|
|
}
|
2024-01-15 10:36:24 +08:00
|
|
|
})
|
|
|
|
|
tableStore.table.params.type = 0
|
|
|
|
|
provide('tableStore', tableStore)
|
2024-01-12 14:05:36 +08:00
|
|
|
const nodeClick = async (e: anyObj) => {
|
2024-10-21 09:09:56 +08:00
|
|
|
console.log("🚀 ~ nodeClick ~ e:", e)
|
2024-01-12 14:05:36 +08:00
|
|
|
if (e.level == 2) {
|
2024-01-15 10:36:24 +08:00
|
|
|
loading.value = false
|
|
|
|
|
tableStore.table.params.deviceId = e.id
|
|
|
|
|
tableStore.index()
|
2024-01-12 14:05:36 +08:00
|
|
|
}
|
|
|
|
|
}
|
2024-01-18 15:50:17 +08:00
|
|
|
|
|
|
|
|
const changeView = () => {
|
|
|
|
|
showBoxi.value = false
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
showBoxi.value = true
|
|
|
|
|
}, 0)
|
|
|
|
|
}
|
|
|
|
|
const bxhandleClick = (tab: any) => {
|
|
|
|
|
if (tab.name == 'ssbx') {
|
|
|
|
|
bxactiveName.value = 'ssbx'
|
|
|
|
|
} else if (tab.name == 'rmsbx') {
|
|
|
|
|
bxactiveName.value = 'rmsbx'
|
|
|
|
|
}
|
|
|
|
|
// console.log(tab, event);
|
|
|
|
|
}
|
|
|
|
|
const backbxlb = () => {
|
|
|
|
|
view.value = true
|
|
|
|
|
view2.value = false
|
|
|
|
|
}
|
|
|
|
|
const bxecharts = mainHeight(95).height as any
|
2024-01-12 14:05:36 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
.analyze-dvr {
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
&-right {
|
|
|
|
|
height: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
flex: 1;
|
|
|
|
|
padding: 10px 10px 10px 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|