This commit is contained in:
liuye
2022-01-14 15:59:11 +08:00
parent ab4325d682
commit 4aa68348a9
2 changed files with 34 additions and 2 deletions

View File

@@ -1,12 +1,16 @@
<template>
<div class="AppGridManagement">
<component v-if="refresh" :is="component" @change="onChange" :params="params"> </component>
<div class="tabs" v-if="isTab">
<component v-if="refresh && isAdmin" :is="component" @change="onChange" :params="params"> </component>
<div class="tabs" v-if="isTab && isAdmin">
<div class="item" @click="tabClick(index, item.component)" v-for="(item, index) in tabs" :key="index">
<img :src="tabIndex == index ? item.activeImg : item.img" alt="" />
<p :class="tabIndex == index ? 'color-3267F0' : ''">{{ item.text }}</p>
</div>
</div>
<div v-if="!isAdmin" class="empty">
<img src="./components/img/no-admin.png" alt="">
<p>没有网格员权限<br />无法查看网格信息哦~</p>
</div>
</div>
</template>
@@ -46,6 +50,7 @@ export default {
}
],
isTab: true,
isAdmin: false
}
},
@@ -68,6 +73,16 @@ export default {
this.refresh = true
})
},
isGirdUser() {
this.isAdmin = false
this.$http.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => {
if (res.code == 0) {
if (res.data.checkType) {
this.isAdmin = true
}
}
})
},
},
onShow() {
document.title = '网格管理'
@@ -78,6 +93,9 @@ export default {
this.isTab = true
})
},
onLoad() {
this.isGirdUser()
},
onReachBottom() {
if(!this.tabIndex) {
uni.$emit('nextList')
@@ -119,4 +137,18 @@ export default {
}
}
}
.empty{
text-align: center;
img{
width: 282px;
height: 306px;
margin: 136px auto 0;
}
p{
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 40px;
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB