|
|
|
@ -3,6 +3,10 @@
|
|
|
|
|
<div class="monitor-container">
|
|
|
|
|
<!-- 左侧数据列表树 -->
|
|
|
|
|
<div class="sideBar">
|
|
|
|
|
<div class="searchBar">
|
|
|
|
|
<el-input placeholder="输入关键字进行过滤" v-model="filterText">
|
|
|
|
|
</el-input>
|
|
|
|
|
</div>
|
|
|
|
|
<el-tree
|
|
|
|
|
:data="lineTreeData"
|
|
|
|
|
:props="defaultProps"
|
|
|
|
@ -12,6 +16,7 @@
|
|
|
|
|
:default-expand-all="true"
|
|
|
|
|
@node-click="handleNodeClick"
|
|
|
|
|
:current-node-key="currentNodekey"
|
|
|
|
|
:filter-node-method="filterNode"
|
|
|
|
|
>
|
|
|
|
|
<span class="custom-tree-node" slot-scope="{ node, data }">
|
|
|
|
|
<div v-if="node.level === 1">
|
|
|
|
@ -246,6 +251,7 @@ export default {
|
|
|
|
|
lineTreeData: [],
|
|
|
|
|
treeStatus: [],
|
|
|
|
|
statusTimer: null,
|
|
|
|
|
filterText: "",
|
|
|
|
|
defaultProps: {
|
|
|
|
|
//指定参数格式回显数据
|
|
|
|
|
children: "list",
|
|
|
|
@ -274,14 +280,13 @@ export default {
|
|
|
|
|
zzstatus: "",
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
// watch: {
|
|
|
|
|
// lineTreeData: {
|
|
|
|
|
// handler() {
|
|
|
|
|
// console.log("count改变");
|
|
|
|
|
// },
|
|
|
|
|
// immediate: true, // 加此属性
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
watch: {
|
|
|
|
|
filterText(val) {
|
|
|
|
|
console.log(val);
|
|
|
|
|
this.$refs.tree.filter(val);
|
|
|
|
|
console.log(this.$refs.tree);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
...mapState(["channelid", "termid"]),
|
|
|
|
|
channelid() {
|
|
|
|
@ -304,6 +309,12 @@ export default {
|
|
|
|
|
}, 300000);
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
//树状图搜索
|
|
|
|
|
filterNode(value, data) {
|
|
|
|
|
console.log(value, data);
|
|
|
|
|
if (!value) return true;
|
|
|
|
|
return data.name.indexOf(value) !== -1;
|
|
|
|
|
},
|
|
|
|
|
//获取当前时间
|
|
|
|
|
getDateTime() {
|
|
|
|
|
this.dateValue = new Date().getTime();
|
|
|
|
@ -741,9 +752,16 @@ export default {
|
|
|
|
|
.sideBar {
|
|
|
|
|
width: 300px;
|
|
|
|
|
border-right: 1px solid @border-color-base;
|
|
|
|
|
overflow: auto;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
padding: 16px 0px;
|
|
|
|
|
.searchBar {
|
|
|
|
|
width: 94%;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
}
|
|
|
|
|
.el-tree {
|
|
|
|
|
overflow: auto;
|
|
|
|
|
.el-tree-node__content {
|
|
|
|
|
height: 40px;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|