xytSk-App/pages/hdDetail/hdDetail.vue

104 lines
2.5 KiB
Vue
Raw Normal View History

2024-06-05 16:16:58 +08:00
<template>
<view class="rain-detail-box">
2024-06-13 16:22:28 +08:00
<u-status-bar></u-status-bar>
2024-06-05 16:16:58 +08:00
<view class="nav-bar">
2024-06-13 16:22:28 +08:00
<u-icon name="arrow-left" color="#000" size="20" @click="backTo" style="margin-left:10px"></u-icon>
2024-06-05 16:16:58 +08:00
<view class="title">
{{stnm}}
</view>
</view>
<view class="tab-bar" >
<view class="jcsj" @click="activeOne = 0" :class="{'active':activeOne == 0}">
监测数据
</view>
<view class="tjsj" @click="activeOne = 1" :class="{'active':activeOne == 1}">
统计数据
</view>
<view class="spjk" @click="activeOne = 3" :class="{'active':activeOne == 3}">
视频监控
</view>
<view class="zbyq" @click="activeOne = 2" :class="{'active':activeOne == 2}">
周边雨情
</view>
</view>
<view class="rain-detail-content">
<Jcsj :stcd="stcd" :source="source" :grz="grz" :wrz="wrz" v-if="activeOne == 0"/>
<Tjsj :stcd="stcd" :source="source" v-else-if="activeOne == 1"/>
<Spjk :stcd="stcd" :source="source" v-else-if="activeOne == 3"/>
<Zbyq :stcd="stcd" v-else-if="activeOne == 2"/>
</view>
</view>
</template>
<script>
import Jcsj from "./jcsj/jcsj.vue"
import Tjsj from "./tjsj/tjsj.vue"
import Zbyq from "./zbyq/zbyq.vue"
import Spjk from "./spjk/spjk.vue"
export default {
data(){
return {
activeOne:0,
stcd:'',
stnm:'',
source:'',
wrz:'',
grz:''
}
},
components:{
Jcsj,
Tjsj,
Zbyq,
Spjk,
},
methods:{
backTo(){
uni.navigateBack({delta:1})
}
},
onLoad(option) {
this.stcd = option.stcd;
this.stnm = option.stnm;
this.source = option.source;
this.grz = option.grz;
this.wrz = option.wrz;
}
}
</script>
<style lang="scss" scoped>
.rain-detail-box{
2024-06-07 16:16:03 +08:00
position: relative;
2024-06-05 16:16:58 +08:00
.nav-bar{
display: flex;
justify-content: center;
align-items: center;
width: 100%;
2024-06-13 16:22:28 +08:00
height: 44px;
// margin-top: 30px;
// padding-top: 20px;
// padding-bottom: 10px;
2024-06-05 16:16:58 +08:00
border-bottom: 1px solid #dfdfdf;
2024-06-13 16:22:28 +08:00
// box-shadow: 0 5px 10px -8px #dfdfdf inset;
2024-06-05 16:16:58 +08:00
}
.title{
flex:1;
text-align: center;
margin-right: 18px;
2024-06-13 16:22:28 +08:00
font-size: 18px;
2024-06-05 16:16:58 +08:00
}
.tab-bar{
display: flex;
justify-content: space-between;
padding: 10px 30px;
border-bottom: 1px solid #dfdfdf;
}
.active{
color: #39a6ff;
}
.rain-detail-content{
padding: 10px;
}
}
</style>