bug
This commit is contained in:
@@ -62,10 +62,13 @@ export default {
|
|||||||
selected: v => [v.$route?.query.selected].flat()
|
selected: v => [v.$route?.query.selected].flat()
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
console.log(this.$route.query.action)
|
console.log(this.$route.query)
|
||||||
if (option.isFormMap) {
|
if (option.isFormMap) {
|
||||||
this.isFormMap = option.isFormMap
|
this.isFormMap = option.isFormMap
|
||||||
}
|
}
|
||||||
|
// if (this.$route.query.selected) {
|
||||||
|
// this.SelectGird.id = this.$route.query.selected
|
||||||
|
// }
|
||||||
this.isGridMember || this.isApply ? this.getAllGrids() : this.$u.toast('当前人员不是网格员或网格长')
|
this.isGridMember || this.isApply ? this.getAllGrids() : this.$u.toast('当前人员不是网格员或网格长')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -90,6 +93,13 @@ export default {
|
|||||||
let parents = res.data.map(e => e.parentGirdId)
|
let parents = res.data.map(e => e.parentGirdId)
|
||||||
this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id)}))
|
this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id)}))
|
||||||
this.treeInit()
|
this.treeInit()
|
||||||
|
if(this.$route.query.selected && this.$route.query.selected.length) { //确认按钮弹窗报错
|
||||||
|
this.allData.map((item) => {
|
||||||
|
if(item.id == this.$route.query.selected) {
|
||||||
|
this.SelectGird = item
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}).finally(() => uni.hideLoading())
|
}).finally(() => uni.hideLoading())
|
||||||
},
|
},
|
||||||
@@ -125,6 +135,7 @@ export default {
|
|||||||
let {id: parentGirdId} = row
|
let {id: parentGirdId} = row
|
||||||
this.options = this.allData.filter(e => e.parentGirdId == parentGirdId)
|
this.options = this.allData.filter(e => e.parentGirdId == parentGirdId)
|
||||||
this.options.map((item) => item.isChecked = this.selected.includes(item.id))
|
this.options.map((item) => item.isChecked = this.selected.includes(item.id))
|
||||||
|
|
||||||
},
|
},
|
||||||
girdNameClick(row, index) {
|
girdNameClick(row, index) {
|
||||||
if (!index) { //第一级别
|
if (!index) { //第一级别
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export default {
|
|||||||
...mapState(['user']),
|
...mapState(['user']),
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
created() {
|
||||||
this.getGirdInfo()
|
this.getGirdInfo()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Reference in New Issue
Block a user