From b901b322b34b09d49135a93242de0d35fddcf8ba Mon Sep 17 00:00:00 2001 From: liuye Date: Thu, 7 Sep 2023 11:46:09 +0800 Subject: [PATCH] bug --- src/components/pages/selectGird.vue | 13 ++++++++++++- src/project/lulong/AppHandSnapshot/Statistics.vue | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/components/pages/selectGird.vue b/src/components/pages/selectGird.vue index 4ae8e701..33a5aaa0 100644 --- a/src/components/pages/selectGird.vue +++ b/src/components/pages/selectGird.vue @@ -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) { //第一级别 diff --git a/src/project/lulong/AppHandSnapshot/Statistics.vue b/src/project/lulong/AppHandSnapshot/Statistics.vue index 8d24f006..a1809361 100644 --- a/src/project/lulong/AppHandSnapshot/Statistics.vue +++ b/src/project/lulong/AppHandSnapshot/Statistics.vue @@ -70,7 +70,7 @@ export default { ...mapState(['user']), }, - mounted() { + created() { this.getGirdInfo() }, methods: {