This commit is contained in:
liuye
2023-09-07 11:46:09 +08:00
parent 4787c6aaf9
commit b901b322b3
2 changed files with 13 additions and 2 deletions

View File

@@ -62,10 +62,13 @@ export default {
selected: v => [v.$route?.query.selected].flat()
},
onLoad(option) {
console.log(this.$route.query.action)
console.log(this.$route.query)
if (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('当前人员不是网格员或网格长')
},
methods: {
@@ -90,6 +93,13 @@ export default {
let parents = res.data.map(e => e.parentGirdId)
this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id)}))
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())
},
@@ -125,6 +135,7 @@ 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) { //第一级别

View File

@@ -70,7 +70,7 @@ export default {
...mapState(['user']),
},
mounted() {
created() {
this.getGirdInfo()
},
methods: {