Files
admin-govern/src/views/govern/analyze/DVR/index.vue

74 lines
2.0 KiB
Vue
Raw Normal View History

2024-01-12 14:05:36 +08:00
<template>
<div class="default-main analyze-dvr" :style="{ height: pageHeight.height }" v-loading="loading">
<DeviceTree @node-click="nodeClick" @init="nodeClick"></DeviceTree>
2024-01-15 10:36:24 +08:00
<div class="analyze-dvr-right">
<Table ref="tableRef" />
</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-12 14:05:36 +08:00
defineOptions({
name: 'govern/analyze/DVR'
})
const pageHeight = mainHeight(20)
const loading = ref(false)
2024-01-15 10:36:24 +08:00
const tableStore = new TableStore({
url: '/cs-harmonic-boot/eventUser/queryEventpage',
method: 'POST',
column: [
{ title: '事件描述', field: 'evtParamPosition' },
{ title: '持续时间(s)', field: 'evtParamTm' },
{ title: '暂降深度', field: 'evtParamVVaDepth' },
{ title: '发生时刻', field: 'startTime' },
{
title: '操作',
align: 'center',
width: '130',
render: 'buttons',
buttons: [
{
name: 'edit',
2024-01-15 16:15:24 +08:00
title: '波形分析',
2024-01-15 10:36:24 +08:00
type: 'primary',
icon: 'el-icon-DataLine',
render: 'tipButton',
click: row => {
}
},
]
}
]
})
tableStore.table.params.type = 0
provide('tableStore', tableStore)
2024-01-12 14:05:36 +08:00
const nodeClick = async (e: anyObj) => {
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
}
}
</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>