Files
admin-sjzx/src/views/pqs/supervise/retire/index.vue

55 lines
1.3 KiB
Vue
Raw Normal View History

2024-04-16 08:41:41 +08:00
<template>
2024-06-04 18:36:17 +08:00
<div class='default-main'>
<el-tabs v-model='activeName' type='border-card'>
<el-tab-pane label='终端状态管理' name='0'>
<terminal :id="id" v-if="activeName == '0'" />
2024-06-04 18:36:17 +08:00
</el-tab-pane>
2024-06-18 16:38:33 +08:00
<el-tab-pane label='监测点状态管理' name='1'>
<monitor :id="id" v-if="activeName == '1'" />
2024-06-04 18:36:17 +08:00
</el-tab-pane>
</el-tabs>
</div>
2024-04-16 08:41:41 +08:00
</template>
2024-04-17 14:15:19 +08:00
2024-06-04 18:36:17 +08:00
<script setup lang='ts'>
import { ref } from 'vue'
import { mainHeight } from '@/utils/layout'
import terminal from './terminal.vue'
import monitor from './monitor.vue'
import {useRoute} from "vue-router";
2024-05-13 18:36:19 +08:00
2024-04-16 08:41:41 +08:00
defineOptions({
2024-06-04 18:36:17 +08:00
name: 'supervision/retire'
2024-04-16 08:41:41 +08:00
})
2024-06-04 18:36:17 +08:00
const activeName = ref('0')
const route = useRoute()
const id = ref('')
2024-05-13 18:36:19 +08:00
const layout = mainHeight(63) as any
watch(() => route.query.t, async (newValue, oldValue) => {
if (route.fullPath.includes('supervision/retire')) {
let type = (route.query.type as string) || 'null'
if (type == 'null' || type == '0') {
activeName.value = '0'
} else {
activeName.value = '1'
}
id.value = (route.query.id as string) || 'null'
id.value = id.value + '@' + route.query.t
}
}, {deep: true, immediate: true})
</script>
2024-05-13 18:36:19 +08:00
2024-06-04 18:36:17 +08:00
<style lang='scss' scoped>
.bars_w {
2024-06-04 18:36:17 +08:00
width: 100%;
height: 500px;
2024-05-14 15:21:37 +08:00
}
2024-06-04 18:36:17 +08:00
:deep(.el-tabs__content) {
2024-06-04 18:36:17 +08:00
height: v-bind('layout.height');
overflow-y: auto;
}
</style>