diff --git a/src/components/pages/selectGird.vue b/src/components/pages/selectGird.vue
index 9b42cc4..630337b 100644
--- a/src/components/pages/selectGird.vue
+++ b/src/components/pages/selectGird.vue
@@ -21,7 +21,7 @@
-
+
@@ -49,34 +49,20 @@ export default {
},
computed: {
...mapState(['user']),
- isGridMember() {
- return this.user.girdCheckType > 0
- },
//是否展示所有网格(随手拍)
isApply: v => v.query?.formType == 2,
clearable: v => v.query?.clearable,
- isMyGirds: v => v.query?.self == true,
selected: v => [v.query?.selected].flat(),
- isFormMap: v => v.query?.isFormMap || 0
},
onLoad(query) {
this.query = query
- this.isGridMember || this.isApply ? this.getAllGrids() : this.$u.toast('当前人员不是网格员或网格长')
+ this.getAllGrids()
},
methods: {
getAllGrids() {
this.selectList = []
- let {girdMemberId} = this.user,
- url = `/app/appgirdmemberinfo/queryMyGirdListByLevel2AndUser`,
- params = {girdMemberId}
- if (this.isApply) {
- url = `/app/appgirdinfo/listByInfo`
- params = {}
- }
- if (this.isMyGirds) {
- url = `/app/appgirdmemberinfo/queryMyGirdListByLevel2`
- }
- this.$instance.post(url, null, {params}).then((res) => {
+ let url = `/app/appgirdinfo/listByInfo`
+ this.$instance.post(url).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)}))
@@ -96,7 +82,7 @@ export default {
}
})
} else {
- this.options = this.allData.filter((e, i, arr) => !arr?.map(e => e.id).includes(e.parentGirdId) || this.isMyGirds)
+ this.options = this.allData.filter((e, i, arr) => !arr?.map(e => e.id).includes(e.parentGirdId))
this.options?.map((item) => item.isChecked = this.selected.includes(item.id))
let obj = {girdName: '可选范围', id: ''}
this.selectList.push(obj)
@@ -141,7 +127,7 @@ export default {
},
submit() {
if (this.SelectGird.id != null) {
- if (!this.isApply && !this.isMyGirds) {
+ if (!this.isApply) {
uni.setStorageSync("lastSelectedGrid", this.SelectGird.parentGirdId)
}
uni.navigateBack({