<template>
|
<view>
|
<!-- 自定义导航栏 -->
|
<view class="navBarBox fix">
|
<!-- 状态栏占位 -->
|
<view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view>
|
<!-- 真正的导航栏内容 -->
|
<view class="navBar">
|
<view class="barText">首页</view>
|
<view >
|
<u-button type="text" @click="loginOut" style="color: blue;margin-right: 5px;">退出</u-button>
|
</view>
|
</view>
|
</view>
|
<view class="list">
|
<view class="first" @click="goExamine" v-if="role == '审核领导'">
|
<view class="badge">
|
<u-badge type="error" :absolute="true" :offset="[90 + statusBarHeight ,65]" max="99" :value="examineNum" style="line-height: 40px;font-size: 14px;width: 30px;height: 40px;">
|
</u-badge>
|
</view>
|
<view class="text">预警审核</view>
|
<view class="eng">WARNING REVIEW</view>
|
<view class="icon">
|
<view class="heng"></view>
|
<image src="../../../static/examine.png" class="img"></image>
|
</view>
|
</view>
|
<view class="first"
|
@click="goCurrent"
|
style="background-color:rgb(255, 160, 235) ;"
|
>
|
<view class="text">信息查看</view>
|
<view class="eng">INFORMATION VIEWING</view>
|
<view class="icon">
|
<view class="heng"></view>
|
<image src="../../../static/look.png" class="img"></image>
|
</view>
|
</view>
|
<view class="first"
|
style="background-color: rgb(112,179, 224);"
|
@click="goWeather"
|
>
|
<view class="text">实时气象</view>
|
<view class="eng">RWAL TIME WEATHER</view>
|
<view class="icon">
|
<view class="heng"></view>
|
<image src="../../../static/we.png" class="img"></image>
|
</view>
|
</view>
|
<view class="first"
|
style="background-color: rgb(134, 204, 170) ;margin-bottom: 35px;"
|
@click="goCount"
|
>
|
<view class="text">统计分析</view>
|
<view class="eng">STATISTIC ANALYSIS</view>
|
<view class="icon">
|
<view class="heng"></view>
|
<image src="../../../static/count1.png" class="img"></image>
|
</view>
|
</view>
|
|
</view>
|
<tabBar :currentPagePath="page"></tabBar>
|
</view>
|
</template>
|
|
<script>
|
import tabBar from '../tabBarIndex.vue'
|
import {getExamine} from '../../../api/examine.js'
|
import { Value } from 'sass';
|
export default {
|
components:{
|
tabBar
|
},
|
data() {
|
return {
|
titleList:[
|
{
|
label: '默认排序',
|
value: 1,
|
}
|
],
|
page: 'pages/tabBar/firstPage/firstPage',
|
statusBarHeight: '',
|
leaderType: 'da',
|
examineNum: 0,
|
data: {
|
pageIndex: 1,
|
pageSize: 9999,
|
searchParams: {
|
emergType: null,//1-紧急;2-常规
|
warningLevel: null,//1-红色预警;2-橙色预警;3-黄色预警;4-蓝色预警
|
reviewStatus: null//1:未审核,2:已审核,3:审核已驳回
|
}
|
},
|
role: '',
|
realname:''
|
}
|
|
},
|
onLoad() {
|
//获取手机状态栏高度
|
this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight'];
|
uni.hideTabBar();
|
this.realname = uni
|
|
|
},
|
onShow(){
|
this.role = uni.getStorageSync('roleName');
|
this.realname = uni.getStorageSync('user').realName
|
console.log("role",uni.getStorageSync('user'))
|
this.getNum();
|
},
|
methods: {
|
loginOut() {
|
uni.clearStorageSync();
|
uni.clearStorage();
|
uni.navigateTo({
|
url: '/pages/index/index'
|
})
|
},
|
getNum(){
|
this.data.searchParams.reviewStatus = 1;
|
getExamine(this.data).then(res => {
|
if(res.code == 100) {
|
if(res.data && res.data.length > 0){
|
this.examineNum = res.data.length;
|
}else {
|
this.examineNum = 0;
|
}
|
}else{
|
uni.$u.toast(res.msg)
|
}
|
})
|
},
|
goExamine() {
|
uni.switchTab({
|
url: '/pages/tabBar/examine/examine'
|
})
|
},
|
goCurrent() {
|
uni.switchTab({
|
url: '/pages/tabBar/current/current'
|
})
|
},
|
goCount() {
|
uni.switchTab({
|
url: '/pages/tabBar/count/count'
|
})
|
},
|
goWeather(){
|
uni.switchTab({
|
url: '/pages/tabBar/weather/weather'
|
})
|
}
|
}
|
}
|
|
</script>
|
|
<style>
|
.navBarBox .navBar {
|
background-color:#fff;
|
height: 50px;
|
display: flex;
|
flex-direction: row;
|
justify-content: center;
|
align-items: center;
|
box-shadow: 0 3px 12px rgba(0,0,0,0.05);
|
|
}
|
.fix{
|
position: sticky;
|
top: 0;
|
left: 0;
|
right: 0;
|
width: 100%;
|
z-index: 1;
|
}
|
.statusBar{
|
background-color:lightgrey;
|
}
|
.list{
|
margin: 12px 12px 0;
|
padding: 12px;
|
box-sizing: border-box;
|
display: flex;
|
flex-direction: column;
|
justify-content: space-between;
|
width: calc(100% - 24px);
|
background: #fff;
|
border-radius: 5px;
|
box-shadow: 0 3px 12px rgba(0,0,0,0.05);
|
|
}
|
.first{
|
width: 100%;
|
height: 110px;
|
border-radius: 15px;
|
background-color: rgb(241,161,108);
|
border: 1px solid lightgrey;
|
|
margin-top: 40px;
|
|
}
|
.text{
|
font-size: 18px;
|
padding-top: 15px;
|
padding-left: 15px;
|
color: #faf9f4;
|
font-family: '宋体';
|
font-weight: 600;
|
}
|
.eng{
|
font-size: 14px;
|
padding-left: 15px;
|
color: rgba(250,249,244,0.5);
|
}
|
.icon{
|
display: flex;
|
align-items: baseline;
|
justify-content: space-between;
|
}
|
.barText{
|
/* text-align: center; */
|
font-size: 16px;
|
font-weight: 600;
|
flex: 2;
|
margin-left: 45%;
|
}
|
.img{
|
width: 45px;
|
height: 45px;
|
margin-right: 16px;
|
margin-bottom: 5px;
|
|
}
|
.badge span{
|
text-align: center;
|
width: 100%;
|
}
|
.heng{
|
width: 30px;
|
height: 3px;
|
background-color: rgba(230,230,230,0.5);
|
margin-left: 15px;
|
}
|
</style>
|