Commit d05988c2 authored by co_dengxiongwen's avatar co_dengxiongwen

tj

parent 9d873711
......@@ -135,8 +135,6 @@ export default {
resource: {}, //当前选择的资源点
typeList: [],
checkedData: {
lineId: '',
lineName: '',
stationId: '',
stationName: '',
tierId: '',
......@@ -798,6 +796,7 @@ export default {
return data.name.indexOf(value) !== -1
},
initTree() {
this.treeData = []
// console.log('stationId:', this.checkedData.sId)
this.$http({
url: this.$http.adornUrl('/liResource/getTreeList'),
......@@ -831,35 +830,28 @@ export default {
this.initStation(this.treeData[0].id, null, 1)
} else {
//层级
let mapid = this.tierMap.tierId
if (this.tierMap.level === 4) {
this.currentNode = this.$refs.tree.getNode(this.tierMap.id).data
this.initStation(this.tierMap.stationId, null, this.tierMap.id)
this.showResourceByParentId(this.tierMap.id)
mapid = this.tierMap.id
}
if (this.tierMap.level === 5) {
this.currentNode = this.$refs.tree.getNode(this.tierMap.id).data
this.initStation(
this.tierMap.stationId,
this.tierMap.children,
this.tierMap.id
)
this.showResourceByParentId(this.tierMap.id)
}
if (this.tierMap.level === 6) {
this.currentNode = this.$refs.tree.getNode(this.tierMap.id).data
let res = this.$refs.tree.getNode(
this.tierMap.tierId + this.tierMap.type
).data
this.initStation(
this.tierMap.stationId,
res.children,
this.showResourceByParentId(
this.tierMap.tierId + this.tierMap.type
)
}
this.changeVectorLayer(this.list)
//将选中的层级树节点设置为选中
this.$refs.tree.setCurrentNode(this.treeData[0].children[0])
Vue.set(this.tierMap, 'iconB', true)
this.defaultExpandedKeys = [this.currentNode.id]
this.isFlag(this.treeData, this.currentNode.id)
console.log('tierMap:---', this.tierMap)
let curNode = this.$refs.tree.getNode(mapid).data
this.$refs.tree.setCurrentNode(curNode)
this.defaultExpandedKeys = [curNode.id]
this.isFlag(this.treeData, curNode.id)
this.changeImgControl(curNode.id)
}
})
}
......@@ -924,19 +916,17 @@ export default {
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.currentMap = this.mapList.filter((e) => {
if (this.treeData[0].children[0].stationId === e.stationId) {
return e
}
})
}
// this.defaultExpandedKeys = [this.checkedData.tierId]
if (res) {
......@@ -969,22 +959,6 @@ 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)
if (this.currentNode.level === 4) {
this.currentMap = this.mapList.filter(e => e.stationId === this.currentNode.stationId)
this.checkedData.tierId = this.currentNode.id
} else if (this.currentNode.level === 5) {
this.currentMap = this.mapList.filter(e => e.stationId === this.currentNode.stationId)
this.checkedData.tierId = this.currentNode.tierId
} else if (this.currentNode.level === 6) {
console.log(this.mapList)
this.currentMap = this.mapList.filter(e => e.stationId === this.currentNode.stationId)
this.checkedData.tierId = this.currentNode.tierId
}
})
},
......@@ -1051,11 +1025,7 @@ export default {
// this.list = []
this.listItem = '' //控制编辑按钮
}
if (level === 2) {
//线路
this.checkedData.lineId = id
this.checkedData.lineName = name
} else if (level === 3) {
if (level === 3) {
//站点
// this.checkedData.stationId = id
// this.checkedData.stationName = 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