BUG 30097

This commit is contained in:
aixianling
2022-06-08 10:48:17 +08:00
parent aae31a7bb8
commit a7ced7a899
2 changed files with 6 additions and 15 deletions

View File

@@ -2,7 +2,6 @@
<div class="SelectGird">
<div class="header-middle">
<div class="hint">
<AiGap/>
<span v-for="(item, index) in slectList" :key="index">
<span v-if="index" style="margin:0 4px;" v-text="`/`"/>
<span style="color:#3F8DF5" @click="girdNameClick(item, index)" v-text="item.girdName"/>
@@ -43,7 +42,6 @@ export default {
allData: null,
treeList: [],
slectList: [],
userList: [],
parentGirdId: '',
isFormMap: 0, //1为网格地图 一级不允许选中
}
@@ -81,9 +79,9 @@ export default {
}
})
},
treeInit() {
treeInit(isClick) {
let last = uni.getStorageSync("lastSelectedGrid")
if (last) {
if (!isClick && last) {
this.$http.post("/app/appgirdinfo/listFatherGirdInfo", null, {
params: {girdId: last}
}).then(res => {
@@ -114,18 +112,11 @@ export default {
this.treeList = this.allData.filter(e => e.parentGirdId == parentGirdId)
},
girdNameClick(row, index) {
this.userList = []
if (!index) { //第一级别
this.slectList = []
this.treeInit()
this.treeInit(true)
} else {
var list = []
this.slectList.map((item, i) => {
if (i <= index) {
list.push(item)
}
})
this.slectList = list
this.slectList.splice(index, 8)
this.getGridsByGridMemberAndParent(row)
}
},