Commit 27406560 authored by xiexingan's avatar xiexingan

tj

parent 5537fbfc
......@@ -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]
......
......@@ -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: 'get',
params: this.$http.adornParams()
url: this.$http.adornUrl(`/liStation/list`),
method: 'post',
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
......
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