Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
Z
zhxf_vue
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
葛齐林
zhxf_vue
Commits
ec0ade93
Commit
ec0ade93
authored
May 13, 2021
by
xiexingan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
ce75b3d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
index.vue
src/pages/sys/point/index.vue
+14
-3
No files found.
src/pages/sys/point/index.vue
View file @
ec0ade93
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
div(class="monitor_point_left_topR")
div(class="monitor_point_left_topR")
el-input(suffix-icon="el-icon-search" size='mini' placeholder="" v-model="searchInput" clearable)
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(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="handleNodeClick
2
" :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(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" class="el-icon-build xa-icon")
//- span(v-if="node.data.level == 3 && node.data.iconB" class="el-icon-wq-treeIcon1")
//- span(v-if="node.data.level == 3 && node.data.iconB" class="el-icon-wq-treeIcon1")
...
@@ -944,7 +944,7 @@ export default {
...
@@ -944,7 +944,7 @@ export default {
this
.
checkedData
.
tierId
=
!
this
.
mapList
[
0
]
?
''
:
this
.
mapList
[
0
].
id
this
.
checkedData
.
tierId
=
!
this
.
mapList
[
0
]
?
''
:
this
.
mapList
[
0
].
id
this
.
isFlag
(
this
.
treeData
,
this
.
checkedData
.
tierId
)
this
.
isFlag
(
this
.
treeData
,
this
.
checkedData
.
tierId
)
if
(
this
.
treeData
)
{
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
=>
{
this
.
currentMap
=
this
.
mapList
.
filter
(
e
=>
{
if
(
this
.
treeData
[
0
].
children
[
0
].
stationId
===
e
.
stationId
)
{
if
(
this
.
treeData
[
0
].
children
[
0
].
stationId
===
e
.
stationId
)
{
return
e
return
e
...
@@ -982,6 +982,17 @@ export default {
...
@@ -982,6 +982,17 @@ export default {
}
else
{
}
else
{
this
.
changeVectorLayer
(
this
.
list
)
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 {
...
@@ -1029,7 +1040,7 @@ export default {
//线路资源点树节点点击事件
//线路资源点树节点点击事件
handleNodeClick
(
node
)
{
handleNodeClick
(
node
)
{
// console.log('node.id', node.id)
// console.log('node.id', node.id)
//
console.log('选中树节点', node)
console
.
log
(
'选中树节点'
,
node
)
this
.
currentNode
=
node
this
.
currentNode
=
node
let
level
=
node
.
level
let
level
=
node
.
level
let
name
=
node
.
name
let
name
=
node
.
name
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment