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
27406560
Commit
27406560
authored
May 12, 2021
by
xiexingan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
5537fbfc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
32 deletions
+43
-32
index.vue
src/pages/ol/demo/index.vue
+5
-5
index.vue
src/pages/sys/point/index.vue
+38
-27
No files found.
src/pages/ol/demo/index.vue
View file @
27406560
...
...
@@ -823,11 +823,11 @@ export default {
this
.
isFlag
(
this
.
treeData
,
this
.
checkedData
.
tierId
)
if
(
this
.
treeData
)
{
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
}
})
this
.
currentMap
=
this
.
mapList
.
filter
(
e
=>
{
if
(
this
.
treeData
[
0
].
children
[
0
].
stationId
==
e
.
stationId
)
{
return
e
}
})
this
.
defaultExpandedKeys
=
[
this
.
checkedData
.
tierId
]
this
.
checkedData
.
tierName
=
this
.
mapList
[
0
].
name
this
.
stationMap
=
this
.
mapList
[
0
]
...
...
src/pages/sys/point/index.vue
View file @
27406560
...
...
@@ -41,7 +41,7 @@
div(slot='header' ref="sprtDom" )
el-row(:span="24")
el-col(:md='12' :sm="5" class='tier-btn')
el-button(type="primary" size='mini' plain :class="[checkedData.tierId===item.id?'active-tier':'']" style="float:left;margin:6px 10px 0 0; " v-for="item in
mapList
" :key='item.id' @click="changeMap(item)")
{{
item
.
name
}}
el-button(type="primary" size='mini' plain :class="[checkedData.tierId===item.id?'active-tier':'']" style="float:left;margin:6px 10px 0 0; " v-for="item in
currentMap
" :key='item.id' @click="changeMap(item)")
{{
item
.
name
}}
//- el-col(:md='12' :sm="5")
//- div(style="float:right;")
//- div( :class="item.value" :title="item.name" style="margin:5px 5px 0 0;" v-for="item in iconNameListBottom" @click="iconClick(item)")
...
...
@@ -131,6 +131,7 @@ export default {
nodeKey
:
'id'
,
station
:
{},
//当前选择的站点
mapList
:
[],
//当前站点的所有层
currentMap
:
[],
stationMap
:
{},
//当前选择的层
resource
:
{},
//当前选择的资源点
typeList
:
[],
...
...
@@ -220,7 +221,7 @@ export default {
this
.
addInteraction
()
},
// 初始化地图
initMap
(
url
)
{
initMap
()
{
let
mapList
=
this
.
mapList
// 计算静态地图映射到地图上的范围
let
extent
=
[
-
1100
,
110
,
1460
,
820
]
...
...
@@ -922,26 +923,33 @@ export default {
initStation
(
id
,
res
,
subId
)
{
// console.log('初始化站点id:', id)
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/liStation/
getId/
${
id
}
`
),
method
:
'
ge
t'
,
params
:
this
.
$http
.
adornParams
()
url
:
this
.
$http
.
adornUrl
(
`/liStation/
list
`
),
method
:
'
pos
t'
,
data
:
{}
})
.
then
((
data
)
=>
{
if
(
data
&&
data
.
code
===
0
)
{
if
(
data
.
bean
)
{
this
.
station
=
data
.
bean
this
.
mapList
=
data
.
bean
.
mapList
this
.
mapList
.
forEach
((
element
)
=>
{
element
.
readPath
=
this
.
urlPath
+
element
.
filePath
})
this
.
checkedData
.
lineId
=
this
.
station
.
lineId
this
.
checkedData
.
lineName
=
this
.
station
.
lineName
this
.
checkedData
.
stationId
=
this
.
station
.
id
this
.
checkedData
.
stationName
=
this
.
station
.
stationName
// this.station = data.bean
this
.
station
=
data
.
list
[
0
]
this
.
mapList
=
data
.
mapList
this
.
mapList
.
forEach
((
element
)
=>
{
element
.
readPath
=
this
.
urlPath
+
element
.
filePath
})
this
.
checkedData
.
lineId
=
this
.
station
.
lineId
this
.
checkedData
.
lineName
=
this
.
station
.
lineName
this
.
checkedData
.
stationId
=
this
.
station
.
id
this
.
checkedData
.
stationName
=
this
.
station
.
stationName
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
.
currentMap
=
this
.
mapList
.
filter
(
e
=>
{
if
(
this
.
treeData
[
0
].
children
[
0
].
stationId
===
e
.
stationId
)
{
return
e
}
})
}
//this.checkedData.tierId = this.mapList[0].id
// this.isFlag(this.treeData, this.checkedData.tierId)
// this.$refs.tree.setCurrentNode(this.treeData[0].children[0])
// this.defaultExpandedKeys = [this.checkedData.tierId]
if
(
res
)
{
this
.
mapList
.
forEach
((
e
)
=>
{
...
...
@@ -1045,9 +1053,12 @@ export default {
this
.
checkedData
.
lineName
=
name
}
else
if
(
level
===
3
)
{
//站点
this
.
checkedData
.
stationId
=
id
this
.
checkedData
.
stationName
=
name
//
this.checkedData.stationId = id
//
this.checkedData.stationName = name
// this.initTreeStationMap(node)
//切换根节点
this
.
currentMap
=
this
.
mapList
.
filter
(
e
=>
e
.
stationId
===
id
)
this
.
changeMap
(
this
.
currentMap
[
0
])
}
else
if
(
level
===
4
)
{
this
.
tierMap
=
node
//层级
...
...
@@ -1091,13 +1102,13 @@ export default {
sysId
=
element
.
id
}
})
// 资源点
let
subNode
=
this
.
$refs
.
tree
.
getNode
(
node
.
tierId
+
sysId
).
data
// console.log('当前要选中的层级节点', subNode)
this
.
list
=
[]
subNode
.
children
.
forEach
((
res
)
=>
{
this
.
list
.
push
(
res
)
})
//
//
资源点
//
let subNode = this.$refs.tree.getNode(node.tierId + sysId).data
//
//
console.log('当前要选中的层级节点', subNode)
//
this.list = []
//
subNode.children.forEach((res) => {
//
this.list.push(res)
//
})
this
.
checkedData
.
resourceId
=
id
this
.
checkedData
.
tierId
=
node
.
tierId
...
...
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