xytSk-App/pages/skDetail/skDetail.vue

154 lines
4.4 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">
<uni-swiper-dot :info="Array(2).fill(0)" :current="current" field="content" :dotsStyles="dotsStyles">
<swiper class="swiper-box" style="height: 30px;" @change="change">
<swiper-item >
2024-06-14 10:19:48 +08:00
<view style="display: flex;justify-content: space-between;">
2024-06-05 16:16:58 +08:00
<view class="jcsj" @click="activeOne = 0" :class="{'active':activeOne == 0}">
监测数据
</view>
2024-06-14 10:19:48 +08:00
<!-- style="margin: 0 25px;" -->
<view class="tjsj" @click="activeOne = 1" :class="{'active':activeOne == 1}" style="margin: 0 4%">
2024-06-05 16:16:58 +08:00
统计数据
</view>
2024-06-14 10:19:48 +08:00
<!-- style="margin: 0 25px 0 0;" -->
<view class="zrtx" @click="activeOne = 2" :class="{'active':activeOne == 2}" >
2024-06-05 16:16:58 +08:00
责任体系
</view>
2024-06-14 10:19:48 +08:00
<view class="txjc" @click="activeOne = 3" :class="{'active':activeOne == 3}" style="margin-left:4%">
2024-06-05 16:16:58 +08:00
图像监测
</view>
</view>
</swiper-item>
<swiper-item >
<view style="display: flex;">
2024-06-14 10:19:48 +08:00
<view class="spjk" @click="activeOne = 4" :class="{'active':activeOne == 4}" style="margin-right:4%">
2024-06-05 16:16:58 +08:00
视频监控
</view>
2024-06-14 10:19:48 +08:00
<view class="zbyq" @click="activeOne = 5" :class="{'active':activeOne == 5}" >
2024-06-05 16:16:58 +08:00
周边雨情
</view>
</view>
</swiper-item>
</swiper>
</uni-swiper-dot>
</view>
<view class="rain-detail-content">
<Jcsj :stcd="stcd" :source="source" :afsltdz="afsltdz" :flLowLimLev="flLowLimLev" :desFloodLev="desFloodLev" :calFloodLev="calFloodLev" v-if="activeOne == 0"/>
<Tjsj :stcd="stcd" :source="source" v-else-if="activeOne == 1"/>
<Zrtx :stcd="stcd" :source="source" :resCode="resCode" v-else-if="activeOne == 2"/>
<Txjc :resCode="resCode" :source="source" v-else-if="activeOne == 3"/>
<Spjk :stcd="stcd" :source="source" v-else-if="activeOne == 4"/>
<Zbyq :stcd="stcd" v-else-if="activeOne == 5"/>
</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"
import Zrtx from "./zrtx/zrtx.vue"
import Txjc from "./txjc/txjc.vue"
export default {
data(){
return {
activeOne:0,
stcd:'',
stnm:'',
source:'',
wrz:'',
grz:'',
calFloodLev:'',
desFloodLev:'',
flLowLimLev:'',
afsltdz:'',
resCode:'',
current:0,
dotsStyles:{
bottom:0,
selectedBackgroundColor:"#d9001b"
}
}
},
components:{
Jcsj,
Tjsj,
Zbyq,
Spjk,
Zrtx,
Txjc
},
methods:{
backTo(){
uni.navigateBack({delta:1})
},
change(e) {
console.log(e.detail.current);
this.current = e.detail.current;
}
},
onLoad(option) {
this.stcd = option.stcd;
this.stnm = option.stnm;
this.source = option.source;
this.grz = option.grz;
this.wrz = option.wrz;
this.afsltdz = option.afsltdz;
this.calFloodLev = option.calFloodLev;
this.flLowLimLev = option.flLowLimLev;
this.desFloodLev = option.desFloodLev;
this.resCode = option.resCode;
}
}
</script>
<style lang="scss" scoped>
.rain-detail-box{
2024-06-14 10:19:48 +08:00
height: 100vh;
overflow: hidden;
2024-06-07 10:56:32 +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{
// width: 100%;
display: flex;
justify-content: space-between;
padding: 5px 30px;
border-bottom: 1px solid #dfdfdf;
// overflow-x: auto;
}
.active{
color: #39a6ff;
}
.rain-detail-content{
padding: 10px;
}
}
</style>