修复BUG
This commit is contained in:
@@ -81,17 +81,18 @@ export default {
|
||||
if (this.isMyGirds) {
|
||||
url = `/app/appgirdmemberinfo/queryMyGirdListByLevel2`
|
||||
}
|
||||
if(this.$route.query.action) {
|
||||
if (this.$route.query.action) {
|
||||
url = this.$route.query.action
|
||||
}
|
||||
this.$http.post(url, null, {params}).then((res) => {
|
||||
if (res?.data) {
|
||||
let parents = res.data.map(e => e.parentGirdId)
|
||||
console.log(parents)
|
||||
this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id)}))
|
||||
this.treeInit()
|
||||
if(this.$route.query.selected) { //确认按钮弹窗报错
|
||||
this.allData.map((item) => {
|
||||
if(item.id == this.$route.query.selected) {
|
||||
if (this.$route.query.selected) { //确认按钮弹窗报错
|
||||
this.allData.map((item) => {
|
||||
if (item.id == this.$route.query.selected) {
|
||||
this.SelectGird = item
|
||||
}
|
||||
})
|
||||
@@ -106,7 +107,10 @@ export default {
|
||||
params: {girdId: last}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.selectList = [{girdName: '可选范围', id: ''}, res.data.filter(e => !!this.allData.find(a => a.id == e.id))].flat()
|
||||
this.selectList = [{
|
||||
girdName: '可选范围',
|
||||
id: ''
|
||||
}, res.data.filter(e => !!this.allData.find(a => a.id == e.id))].flat()
|
||||
this.getGridsByGridMemberAndParent({id: last})
|
||||
}
|
||||
})
|
||||
@@ -131,14 +135,14 @@ export default {
|
||||
let {id: parentGirdId} = row
|
||||
this.options = this.allData.filter(e => e.parentGirdId == parentGirdId)
|
||||
this.options.map((item) => item.isChecked = this.selected.includes(item.id))
|
||||
|
||||
|
||||
},
|
||||
girdNameClick(row, index) {
|
||||
if (!index) { //第一级别
|
||||
this.selectList = []
|
||||
this.treeInit(true)
|
||||
} else {
|
||||
this.selectList.splice(index, 8)
|
||||
this.selectList.splice(index + 1, 8)
|
||||
this.getGridsByGridMemberAndParent(row)
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user