BUG 29525

This commit is contained in:
aixianling
2022-05-09 10:24:22 +08:00
parent 995ac78a85
commit 18d8a0cb93
2 changed files with 13 additions and 17 deletions

View File

@@ -3,8 +3,7 @@
<AiTopFixed v-if="isGridMember">
<div class="pad-t32"></div>
<div class="select-gird">
<AiPagePicker type="custom" @select="confirmSelect" v-model="girdId" self
:ops="{url:'../AppGridManagement/SelectGird',label: 'girdName'}">
<AiPagePicker type="custom" @select="confirmSelect" self :ops="{url:'../AppGridManagement/SelectGird',label: 'girdName'}">
<div flex class="center">
<img src="./components/img/gird-icon.png" alt="" class="gird-icon">
<AiMore v-model="girdName" icon="arrow-down"/>
@@ -126,6 +125,7 @@ export default {
methods: {
...mapActions(['injectJWeixin', 'wxInvoke']),
confirmSelect(v) {
this.girdId = v?.id
this.girdName = v?.girdName
this.getListInit()
this.getTotal()

View File

@@ -21,7 +21,7 @@
</div>
</div>
</div>
<AiEmpty description="暂无数据" class="emptyWrap" v-else/>
<AiEmpty :description="isGridMember?`暂无数据`:`当前人员不是网格员或网格管理员`" class="emptyWrap" v-else/>
</div>
</div>
<!-- <div style="padding-bottom: 70px;"></div> -->
@@ -32,6 +32,8 @@
</template>
<script>
import {mapState} from "vuex";
export default {
name: 'SelectGird',
data() {
@@ -40,36 +42,30 @@ export default {
allData: null,
treeList: [],
slectList: [],
userGird: {},
userList: [],
parentGirdId: '',
isFormMap: 0, //1为网格地图 一级不允许选中
}
},
computed: {
...mapState(['user']),
isMyGirds() {
return !!this.$route.query.self
},
userGird() {
return this.user?.gridInfo || {}
},
isGridMember() {
return this.user.girdCheckType > 0
}
},
onLoad(option) {
if (option.isFormMap) {
this.isFormMap = option.isFormMap
}
this.isGirdUser()
this.isGridMember ? this.getAllGrids() : this.$u.toast('当前人员不是网格员或网格管理员')
},
methods: {
isGirdUser() {
this.$http.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => {
if (res.code == 0) {
if (res.data.checkType) {
this.userGird = res.data
this.getAllGrids()
} else {
this.$u.toast('当前人员不是网格员或网格管理员')
}
}
})
},
getAllGrids() {
this.slectList = []
let {girdMemberId} = this.userGird,