BUG 29477
This commit is contained in:
@@ -46,6 +46,11 @@ export default {
|
||||
isFormMap: 0, //1为网格地图 一级不允许选中
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isMyGirds() {
|
||||
return !!this.$route.query.self
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.isFormMap) {
|
||||
this.isFormMap = option.isFormMap
|
||||
@@ -67,10 +72,14 @@ export default {
|
||||
},
|
||||
getAllGrids() {
|
||||
this.slectList = []
|
||||
let {girdMemberId} = this.userGird
|
||||
this.$http.post(`/app/appgirdinfo/queryAppGirdInfoByGirdLevel`, null, {
|
||||
params: {girdMemberId}
|
||||
}).then((res) => {
|
||||
let {girdMemberId} = this.userGird,
|
||||
url = `/app/appgirdinfo/queryAppGirdInfoByGirdLevel`,
|
||||
params = {girdMemberId}
|
||||
if (this.isMyGirds) {
|
||||
url = `/app/appgirdmemberinfo/queryMyGirdListByLevel2AndUser`
|
||||
params = {}
|
||||
}
|
||||
this.$http.post(url, null, {params}).then((res) => {
|
||||
if (res?.data) {
|
||||
let parents = res.data.map(e => e.parentGirdId)
|
||||
this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id)}))
|
||||
@@ -80,7 +89,7 @@ export default {
|
||||
},
|
||||
|
||||
treeInit() {
|
||||
this.treeList = this.allData.filter(e => !e.parentGirdId)
|
||||
this.treeList = this.allData.filter(e => !e.parentGirdId || this.isMyGirds)
|
||||
this.treeList.map((item) => {
|
||||
item.isChecked = false
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user