固定住运行环境状态

This commit is contained in:
aixianling
2022-02-09 09:37:29 +08:00
parent 1278e565d2
commit 0d55bd9bbd
2 changed files with 41 additions and 22 deletions

View File

@@ -68,13 +68,19 @@ export default {
})
},
handleSwitchSystem() {
this.$http.defaults.baseURL = this.currentLib == "apps" ? "/lan" :
this.currentLib == "sass" ? "/saas" : "/"
this.changeConfig()
sessionStorage.setItem("prj", this.currentLib)
this.getApps()
this.logout()
},
changeConfig() {
this.$http.defaults.baseURL = this.currentLib == "apps" ? "/lan" :
this.currentLib == "sass" ? "/saas" : "/"
}
},
onLoad() {
this.currentLib = sessionStorage.getItem("prj") || "apps"
this.changeConfig()
this.agentSign(this.$route.query)
},
onShow() {

View File

@@ -4,21 +4,21 @@
<div class="select-gird" v-if="component != 'Map' && isAdmin">
<img src="./components/img/gird-icon.png" alt="" class="gird-icon">
<div @click="linkTo('./SelectGird')">
{{params.girdName}}
{{ 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>
<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="" />
<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>
<p>没有网格员权限<br/>无法查看网格信息哦~</p>
</div>
</div>
</template>
@@ -96,26 +96,25 @@ export default {
})
},
linkTo(url) {
uni.navigateTo({ url })
uni.navigateTo({url})
},
},
onShow() {
document.title = '网格管理'
this.isGirdUser()
uni.$on('hideTab', () => {
this.isTab = false
})
uni.$on('showTab', () => {
this.isTab = true
})
},
onLoad() {
this.isGirdUser()
uni.$on('goback', (res) => {
this.params = res
})
},
onReachBottom() {
if(!this.tabIndex) {
if (!this.tabIndex) {
uni.$emit('nextList')
}
},
@@ -126,22 +125,26 @@ export default {
.AppGridManagement {
height: 100vh;
}
.pad-t32{
.pad-t32 {
padding-top: 32px;
}
.select-gird{
.select-gird {
width: calc(100% - 60px);
padding: 24px 32px;
background: #FFFFFF;
border-radius: 16px;
margin: 0 30px 32px;
box-sizing: border-box;
img{
img {
width: 32px;
height: 32px;
vertical-align: middle;
}
div{
div {
display: inline-block;
width: calc(100% - 144px);
padding-left: 20px;
@@ -151,11 +154,13 @@ export default {
font-weight: 500;
color: #333;
line-height: 48px;
img{
img {
margin-left: 8px;
}
}
span{
span {
display: inline-block;
width: 112px;
height: 48px;
@@ -166,6 +171,7 @@ export default {
line-height: 48px;
}
}
.tabs {
width: 100%;
height: 98px;
@@ -175,14 +181,17 @@ export default {
bottom: 0;
left: 0;
display: flex;
.item {
flex: 1;
text-align: center;
img {
width: 56px;
height: 56px;
margin-top: 8px;
}
p {
font-size: 22px;
font-family: PingFangSC-Medium, PingFang SC;
@@ -190,19 +199,23 @@ export default {
color: #c4cad4;
line-height: 8px;
}
.color-3267F0 {
color: #3267f0;
}
}
}
.empty{
.empty {
text-align: center;
img{
img {
width: 282px;
height: 306px;
margin: 136px auto 0;
}
p{
p {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;