优化分屏监控

This commit is contained in:
648540858
2024-09-12 17:49:16 +08:00
parent 525f325d2b
commit 76ef652e7c
17 changed files with 222 additions and 554 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div id="DeviceTree">
<div class="page-header" style="margin-bottom: 1rem;">
<div class="page-header" style="margin-bottom: 1rem;" v-if="showHeader">
<div class="page-title">行政区划</div>
<div class="page-header-btn">
<div style="display: inline;">
@@ -11,14 +11,15 @@
</div>
</div>
</div>
<div>
<div v-if="showHeader" style="height: 2rem; background-color: #FFFFFF" ></div>
<div >
<vue-easy-tree
class="flow-tree"
ref="veTree"
node-key="deviceId"
height="78vh"
lazy
style="padding: 2rem 0 2rem 0.5rem"
style="padding: 0 0 2rem 0.5rem"
:load="loadNode"
:data="treeData"
:props="props"
@@ -27,7 +28,7 @@
@node-click="nodeClickHandler"
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span @click.stop >
<span @click.stop v-if="edit">
<el-radio v-if="node.data.type === 0 && node.level !== 1 " style="margin-right: 0" v-model="chooseId" @input="chooseIdChange" :label="node.data.deviceId">{{''}}</el-radio>
</span>
<span v-if="node.data.type === 0" style="color: #409EFF" class="iconfont icon-bianzubeifen3"></span>
@@ -63,7 +64,7 @@ export default {
treeData: [],
}
},
props: ['edit', 'clickEvent', 'chooseIdChange', 'onChannelChange'],
props: ['edit', 'clickEvent', 'chooseIdChange', 'onChannelChange', 'showHeader'],
created() {
},
methods: {
@@ -102,7 +103,9 @@ export default {
this.$forceUpdate();
},
contextmenuEventHandler: function (event, data, node, element) {
if (!this.edit) {
return
}
console.log(node.level)
if (node.data.type === 1) {
data.parentId = node.parent.data.id;
@@ -356,6 +359,9 @@ export default {
nodeClickHandler: function (data, node, tree) {
console.log(data)
console.log(node)
if (this.clickEvent) {
this.clickEvent(data)
}
// this.chooseId = data.id;
// this.chooseName = data.name;
// if (this.catalogIdChange)this.catalogIdChange(this.chooseId, this.chooseName);