2025-10-21 16:27:49 +08:00
|
|
|
<template>
|
2026-06-30 08:38:05 +08:00
|
|
|
<div class="default-main device-control" :style="{ height: pageHeight.height }" v-loading="loading"
|
|
|
|
|
style="position: relative">
|
2025-10-21 16:27:49 +08:00
|
|
|
<!-- @init="nodeClick" -->
|
2025-10-24 11:17:18 +08:00
|
|
|
<PointTree @node-click="nodeClick" @init="nodeClick" @checkChange="handleCheckedNodesChange"></PointTree>
|
2026-06-30 08:38:05 +08:00
|
|
|
<div class="device-control-right">
|
|
|
|
|
<el-tabs type="border-card" class="mb10" @tab-click="handleClick" v-model="activeTab">
|
|
|
|
|
<el-tab-pane label="稳态补召" name="1" v-if="showTab">
|
|
|
|
|
<div style="height: calc(100vh - 205px)">
|
2025-10-21 16:27:49 +08:00
|
|
|
<SteadyRecall ref="steadyRef" :checked-nodes="checkedNodes"></SteadyRecall>
|
|
|
|
|
</div>
|
|
|
|
|
</el-tab-pane>
|
2026-06-30 08:38:05 +08:00
|
|
|
<el-tab-pane label="暂态补召" name="2" v-if="showTab">
|
|
|
|
|
<div style="height: calc(100vh - 205px)">
|
2025-10-21 16:27:49 +08:00
|
|
|
<Event ref="eventRef" :checked-nodes="checkedNodes"></Event>
|
|
|
|
|
</div>
|
|
|
|
|
</el-tab-pane>
|
2026-06-30 08:38:05 +08:00
|
|
|
<el-tab-pane label="补招日志" name="3" v-if="!showTab">
|
|
|
|
|
<div style="height: calc(100vh - 205px)">
|
|
|
|
|
<Log ref="logRef"></Log>
|
|
|
|
|
</div>
|
|
|
|
|
</el-tab-pane>
|
2025-10-21 16:27:49 +08:00
|
|
|
</el-tabs>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import PointTree from '@/components/tree/govern/selectTree.vue'
|
|
|
|
|
import { ref, reactive, onMounted, onUnmounted, inject, nextTick, onBeforeUnmount } from 'vue'
|
|
|
|
|
import DatePicker from '@/components/form/datePicker/index.vue'
|
|
|
|
|
import TableHeader from '@/components/table/header/index.vue'
|
|
|
|
|
import { mainHeight } from '@/utils/layout'
|
|
|
|
|
import Event from './eventRecall.vue'
|
2026-06-30 08:38:05 +08:00
|
|
|
import Log from './log.vue'
|
2025-10-21 16:27:49 +08:00
|
|
|
import SteadyRecall from './steadyRecall.vue'
|
2026-06-30 08:38:05 +08:00
|
|
|
const showTab = ref(true)
|
2025-10-21 16:27:49 +08:00
|
|
|
const pageHeight = mainHeight(20)
|
|
|
|
|
const steadyRef = ref()
|
|
|
|
|
const eventRef = ref()
|
|
|
|
|
const loading = ref(false)
|
2026-06-30 08:38:05 +08:00
|
|
|
const activeTab = ref('1')
|
2025-10-21 16:27:49 +08:00
|
|
|
const checkedNodes = ref<any[]>([]) // 存储左侧树勾选的节点
|
2025-10-22 15:32:18 +08:00
|
|
|
const currentNode = ref<any>(null) // 存储当前点击的树节点
|
2025-10-21 16:27:49 +08:00
|
|
|
|
|
|
|
|
defineOptions({
|
2026-06-30 08:38:05 +08:00
|
|
|
name: 'cs-device-boot/monitorRecall'
|
2025-10-21 16:27:49 +08:00
|
|
|
})
|
|
|
|
|
|
2026-06-30 08:38:05 +08:00
|
|
|
const logRef = ref()
|
|
|
|
|
|
2025-10-21 16:27:49 +08:00
|
|
|
// 处理子组件传递的勾选节点变化
|
|
|
|
|
const handleCheckedNodesChange = (nodes: any[]) => {
|
2025-10-22 15:32:18 +08:00
|
|
|
checkedNodes.value = nodes
|
2025-10-21 16:27:49 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// tab切换时的处理
|
|
|
|
|
const handleClick = (tab: any) => {
|
|
|
|
|
activeTab.value = tab.props.name
|
2026-06-30 08:38:05 +08:00
|
|
|
|
2025-10-21 16:27:49 +08:00
|
|
|
// tab切换时刷新对应组件的数据
|
|
|
|
|
nextTick(() => {
|
2026-06-30 08:38:05 +08:00
|
|
|
// tab切换后触发查询
|
|
|
|
|
triggerEventRecallQuery()
|
2025-10-21 16:27:49 +08:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const nodeClick = (node: any) => {
|
2026-06-30 08:38:05 +08:00
|
|
|
if(node==undefined){
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (node?.pname.includes('便携')) {
|
|
|
|
|
activeTab.value = '3'
|
|
|
|
|
showTab.value = false
|
|
|
|
|
nextTick(() => {
|
|
|
|
|
logRef.value.open(node)
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
activeTab.value = '1'
|
|
|
|
|
showTab.value = true
|
|
|
|
|
currentNode.value = node
|
|
|
|
|
// 只有在暂态补召页面时才触发查询
|
2025-10-22 15:32:18 +08:00
|
|
|
triggerEventRecallQuery()
|
|
|
|
|
}
|
2026-06-30 08:38:05 +08:00
|
|
|
|
2025-10-21 16:27:49 +08:00
|
|
|
}
|
|
|
|
|
|
2025-10-22 15:32:18 +08:00
|
|
|
// 触发暂态补召查询
|
|
|
|
|
const triggerEventRecallQuery = () => {
|
|
|
|
|
nextTick(() => {
|
2026-06-30 08:38:05 +08:00
|
|
|
if (activeTab.value === '1' && steadyRef.value) {
|
|
|
|
|
if (steadyRef.value.handleTreeNodeClick) {
|
|
|
|
|
steadyRef.value.handleTreeNodeClick(currentNode.value)
|
|
|
|
|
}
|
|
|
|
|
} else if (activeTab.value === '2' && eventRef.value) {
|
2025-10-22 15:32:18 +08:00
|
|
|
// 将当前点击的节点传递给暂态补召组件
|
|
|
|
|
if (eventRef.value.handleTreeNodeClick) {
|
2025-10-24 11:17:18 +08:00
|
|
|
|
2025-10-22 15:32:18 +08:00
|
|
|
eventRef.value.handleTreeNodeClick(currentNode.value)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-10-21 16:27:49 +08:00
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
2025-10-24 11:17:18 +08:00
|
|
|
<style lang="scss" scoped>
|
2025-10-21 16:27:49 +08:00
|
|
|
.device-control {
|
|
|
|
|
display: flex;
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
|
|
&-left {
|
|
|
|
|
// width: 280px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-right {
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
flex: 1;
|
|
|
|
|
padding: 10px 10px 10px 0;
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
|
|
.el-tabs {
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.el-tabs__content {
|
|
|
|
|
height: calc(100% - 55px);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.el-tab-pane {
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.el-descriptions__header {
|
|
|
|
|
height: 36px;
|
|
|
|
|
margin-bottom: 7px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.content {
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
overflow: auto;
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
|
|
|
|
|
grid-gap: 10px;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
|
|
.box-card {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
color: var(--el-color-white);
|
|
|
|
|
min-height: 80px;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
|
|
|
|
.el-card__header {
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
|
|
|
|
.clearfix {
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
height: 35px;
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
background: var(--el-color-primary);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.el-card__body {
|
|
|
|
|
flex: 1;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
background-image: linear-gradient(var(--el-color-primary), var(--el-color-primary-light-3));
|
|
|
|
|
|
|
|
|
|
.box-card-content {
|
|
|
|
|
height: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-30 08:38:05 +08:00
|
|
|
.device-control-right>div {
|
2025-10-21 16:27:49 +08:00
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
</style>
|