Commit ec0ade93 authored by xiexingan's avatar xiexingan

tj

parent ce75b3d7
......@@ -23,7 +23,7 @@
div(class="monitor_point_left_topR")
el-input(suffix-icon="el-icon-search" size='mini' placeholder="" v-model="searchInput" clearable)
//- el-tree(style='background:#f4f4f4;' :data="treeData" ref='tree' :accordion='true' :highlight-current='true' :check-on-click-node='true' :props="defaultProps" :default-expand-all='false' @node-click="handleNodeClick" :default-expanded-keys='defaultExpandedKeys' :node-key='nodeKey' )
el-tree.dic_tree( :data="treeData" ref='tree' :accordion='true' :highlight-current='true' :filter-node-method="filterNode" :props="defaultProps" :default-expand-all='false' @node-click="handleNodeClick2" :default-expanded-keys='defaultExpandedKeys' :node-key='nodeKey' )
el-tree.dic_tree( :data="treeData" ref='tree' :accordion='true' :highlight-current='true' :filter-node-method="filterNode" :props="defaultProps" :default-expand-all='false' @node-click="handleNodeClick" :default-expanded-keys='defaultExpandedKeys' :node-key='nodeKey' )
span(class="custom-tree-node" style='width:90%;line-height: 18px;' slot-scope="{ node, data }")
span(v-if="node.data.level == 3" class="el-icon-build xa-icon")
//- span(v-if="node.data.level == 3 && node.data.iconB" class="el-icon-wq-treeIcon1")
......@@ -944,7 +944,7 @@ export default {
this.checkedData.tierId = !this.mapList[0] ? '' : this.mapList[0].id
this.isFlag(this.treeData, this.checkedData.tierId)
if (this.treeData) {
this.$refs.tree.setCurrentNode(this.treeData[0].children[0])
// this.$refs.tree.setCurrentNode(this.treeData[0].children[0])
this.currentMap = this.mapList.filter(e => {
if (this.treeData[0].children[0].stationId === e.stationId) {
return e
......@@ -982,6 +982,17 @@ export default {
} else {
this.changeVectorLayer(this.list)
}
//将选中的层级树节点设置为选中
this.$refs.tree.setCurrentNode(this.currentNode)
Vue.set(this.currentNode, 'iconB', true)
this.defaultExpandedKeys = [this.currentNode.id]
this.isFlag(this.treeData, this.currentNode.id)
this.currentMap = this.mapList.filter(e => e.stationId === this.currentNode.stationId)
if (this.currentNode.level === 4) {
this.checkedData.tierId = this.currentNode.id
} else if (this.currentNode.level === 5 || this.currentNode.level === 6) {
this.checkedData.tierId = this.currentNode.tierId
}
})
},
......@@ -1029,7 +1040,7 @@ export default {
//线路资源点树节点点击事件
handleNodeClick(node) {
// console.log('node.id', node.id)
//console.log('选中树节点', node)
console.log('选中树节点', node)
this.currentNode = node
let level = node.level
let name = node.name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment