This commit is contained in:
liuye
2022-01-17 14:24:54 +08:00
parent 0073e30a2b
commit 4a4d152c10
3 changed files with 64 additions and 113 deletions

View File

@@ -1,5 +1,14 @@
<template>
<div class="AppGridManagement">
<div class="pad-t32" v-if="component != 'Map'"></div>
<div class="select-gird" v-if="component != 'Map'">
<img src="./components/img/gird-icon.png" alt="" class="gird-icon">
<div @click="linkTo('./SelectGird')">
{{params.girdName}}
<img src="./components/img/down-icon.png" alt="" class="down-icon">
</div>
<span @click="linkTo('./SetGird')" v-if="checkType == 2">网格配置</span>
</div>
<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">
@@ -50,7 +59,8 @@ export default {
}
],
isTab: true,
isAdmin: false
isAdmin: false,
checkType: ''
}
},
@@ -79,10 +89,15 @@ export default {
if (res.code == 0) {
if (res.data.checkType != '0') {
this.isAdmin = true
this.checkType = res.data.checkType
this.params = res.data.appGirdInfo
}
}
})
},
linkTo(url) {
uni.navigateTo({ url })
},
},
onShow() {
document.title = '网格管理'
@@ -95,6 +110,9 @@ export default {
},
onLoad() {
this.isGirdUser()
uni.$on('goback', (res) => {
this.params = res
})
},
onReachBottom() {
if(!this.tabIndex) {
@@ -108,6 +126,46 @@ export default {
.AppGridManagement {
height: 100vh;
}
.pad-t32{
padding-top: 32px;
}
.select-gird{
width: calc(100% - 60px);
padding: 24px 32px;
background: #FFFFFF;
border-radius: 16px;
margin: 0 30px 32px;
box-sizing: border-box;
img{
width: 32px;
height: 32px;
vertical-align: middle;
}
div{
display: inline-block;
width: calc(100% - 144px);
padding-left: 20px;
box-sizing: border-box;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 48px;
img{
margin-left: 8px;
}
}
span{
display: inline-block;
width: 112px;
height: 48px;
font-size: 28px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #3F8DF5;
line-height: 48px;
}
}
.tabs {
width: 100%;
height: 98px;