feat():适配

master
李神峰 2024-06-13 13:55:33 +08:00
parent 80c2dec37f
commit 6d521c1dcc
8 changed files with 104 additions and 60 deletions

View File

@ -5,9 +5,9 @@
<div class="left">
<div class="icon">
<image
style="width: 100%; height: 100%"
src="../../static/tabs/touxiang.png"
mode="aspectFit"
style="width: 100%; height: 100%;border-radius: 50%;"
:src="default_src || default_img"
mode="aspectFill"
></image>
</div>
<div class="info_name">
@ -284,6 +284,7 @@ import moment from 'moment'
import {level} from "../../pages/utils/dicType"
import {disType} from "../utils/dicType.js"
import drpOption from "./chartOption.js"
import default_img from "../../static/tabs/touxiang.png"
export default {
data () {
return {
@ -330,7 +331,9 @@ export default {
hdList:[],
skList:[],
readStatus:false,
readYjStatus:false
readYjStatus:false,
default_src: uni.getStorageSync('avatar'),
default_img
}
},
computed: {

View File

@ -1,32 +1,32 @@
<template>
<div class="table_div">
<div class="table_cur">
<table>
<table style="width:100%">
<tr>
<th style="width: 50px;">
<th style="width: 10%;">
<div style="margin-top: 6px;">序号</div>
</th>
<th style="width: 100px">
<th style="width: 28%">
<div style="margin-top: 6px;">站名</div></th>
<th style="width: 70px;">
<th style="width: 20%;">
<div>时段雨量</div>
<div style="margin-top: -12px;">(mm)</div>
</th>
<th style="width: 70px;" >
<th style="width: 20%;" >
<div>昨日降雨</div>
<div style="margin-top: -12px;">(mm)</div>
</th>
<th style="width: 100px">
<th style="width: 22%">
<div style="margin-top: 6px;">所属政区</div></th>
</tr>
<div :style="{'max-height':height + 'px', 'overflow-y': 'auto'}">
<tr v-for="(item, index) in list" :key="index">
<td style="width: 50px;">{{ index + 1 }}</td>
<td style="width: 100px;color: #3399ef; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" @click="jumpDetail(item)">
<div :style="{'max-height':height + 'px', 'overflow-y': 'auto',width:'100%'}">
<tr v-for="(item, index) in list" :key="index" style="width:100%">
<td style="width: 10%;">{{ index + 1 }}</td>
<td style="width: 28%; color: #3399ef; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" @click="jumpDetail(item)">
{{ item.stnm }}</td>
<td style="width: 70px">{{ item.drp || 0 }}</td>
<td style="width: 70px">{{ item.yesDrp || 0 }}</td>
<td style="width: 100px;">{{ item.adnm }}</td>
<td style="width: 20%">{{ item.drp || 0 }}</td>
<td style="width: 20%">{{ item.yesDrp || 0 }}</td>
<td style="width:23%;">{{ item.adnm }}</td>
</tr>
</div>
</table>

View File

@ -51,12 +51,12 @@
<u-icon name="arrow-down-fill" color="#000" size="20" v-show="!jiangyu"></u-icon>
<u-icon name="arrow-up-fill" color="#000" size="20" v-show="jiangyu"></u-icon>
<view class="jiangyu-dropdown" v-show="this.jiangyu">
<view :class="{'active': formData.orderType == 0}" @click="rainsort(0)" style="border-bottom: 1px solid #dfdfdf; border-top: 1px solid #dfdfdf; padding: 10px 0; display: flex; align-items: center;">
<text style="margin-right: 220px;">按时段降雨降序</text>
<view :class="{'active': formData.orderType == 0,'no_f':true}" @click="rainsort(0)" style="border-top: 1px solid #dfdfdf;">
<text >按时段降雨降序</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.orderType == 0"></u-icon>
</view>
<view :class="{'active':formData.orderType == 1}" @click="rainsort(1)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;">
<text style="margin-right: 220px;">按昨日降雨降序</text>
<view :class="{'active':formData.orderType == 1,'no_f':true}" @click="rainsort(1)" >
<text>按昨日降雨降序</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.orderType == 1"></u-icon>
</view>
</view>
@ -72,24 +72,24 @@
<u-icon name="arrow-down-fill" color="#000" size="20" v-show="!rainTime"></u-icon>
<u-icon name="arrow-up-fill" color="#000" size="20" v-show="rainTime"></u-icon>
<view class="rain-time-dropdown" v-show="rainTime">
<view :class="{'active': formData.timeType == 1}" @click="timesort(1)" style="border-bottom: 1px solid #dfdfdf; border-top: 1px solid #dfdfdf; padding: 10px 0; display: flex; align-items: center;">
<text style="margin-right: 300px;">1h</text>
<view :class="{'active': formData.timeType == 1,'no_f':true}" @click="timesort(1)" style="border-top: 1px solid #dfdfdf;">
<text >1h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 1"></u-icon>
</view>
<view :class="{'active': formData.timeType == 3}" @click="timesort(3)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;">
<text style="margin-right: 300px;">3h</text>
<view :class="{'active': formData.timeType == 3,'no_f':true}" @click="timesort(3)" >
<text >3h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 3"></u-icon>
</view>
<view :class="{'active': formData.timeType == 6}" @click="timesort(6)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;">
<text style="margin-right: 300px;">6h</text>
<view :class="{'active': formData.timeType == 6,'no_f':true}" @click="timesort(6)" >
<text >6h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 6"></u-icon>
</view>
<view :class="{'active': formData.timeType == 12}" @click="timesort(12)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;">
<text style="margin-right: 300px;">12h</text>
<view :class="{'active': formData.timeType == 12,'no_f':true}" @click="timesort(12)" >
<text >12h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 12"></u-icon>
</view>
<view :class="{'active': formData.timeType == 24}" @click="timesort(24)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;">
<text style="margin-right: 300px;">24h</text>
<view :class="{'active': formData.timeType == 24,'no_f':true}" @click="timesort(24)" >
<text>24h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 24"></u-icon>
</view>
</view>
@ -127,7 +127,7 @@
>
</u-picker>
<u-popup :show="popupOpen" mode="right" @close="popupOpen=false" >
<view style="padding: 30px 20px;">
<view style="padding: 30px 20px; ">
<text style="font-weight: bold;">按类型</text>
<view style="margin-bottom: 10px; margin-left: -5px;">
<u-checkbox-group
@ -158,7 +158,7 @@
<u-button class="first-btn" text="昨日08:00~当前时间"></u-button>
<u-button class="second-btn" text="今天08:00~当前时间"></u-button>
</view> -->
<view style="display: flex; margin-top: 240%;">
<view style="display: flex; position:absolute;bottom:20px;right:20px">
<u-button text="重置" class="bottom-btn1"
@click="formData = {...formData,source}"></u-button>
<u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popupOpen = false"></u-button>
@ -477,37 +477,54 @@
display: flex;
column-gap: 5px;
margin-right: 20px;
}
.jiangyu{
position: relative;
// position: relative;
.jiangyu-dropdown{
position: absolute;
background-color: #fff;
width: 100vw;
left: -72px;
left: 0;
top: 35px;
.active{
color:#02a7f0
}
view{
margin-top: 10px;
text{
margin-right: 58%;
}
.no_f{
border-bottom: 1px solid #dfdfdf;
// border-top: 1px solid #dfdfdf;
padding: 10px 15px;
display: flex;
align-items: center;
// justify-content: space-around;
}
}
}
.rain-time{
position: relative;
// position: relative;
.rain-time-dropdown{
position: absolute;
background-color: #fff;
width: 100vw;
left: -230px;
// left: -10%;
left: 0;
top: 35px;
.active{
color:#02a7f0
color:#02a7f0;
text{
margin-right: 80%;
}
view{
margin-top: 10px;
}
.no_f{
border-bottom: 1px solid #dfdfdf;
// border-top: 1px solid #dfdfdf;
padding: 10px 15px;
display: flex;
align-items: center;
// justify-content: space-around;
}
}
}

View File

@ -18,10 +18,10 @@
</image>
</view>
<view class="content">
<Table :list="list" />
<Table :list="list" :height="height" />
</view>
<u-popup :show="popupOpen" mode="right" @close="popupOpen=false" >
<view style="padding: 30px 20px;">
<view style="padding: 30px 20px; width:250px">
<text style="font-weight: bold;">按类型</text>
<view style="margin-bottom: 10px; margin-left: -5px;">
<u-checkbox-group
@ -38,7 +38,7 @@
</u-checkbox>
</u-checkbox-group>
</view>
<view style="display: flex; margin-top: 240%;">
<view style="display: flex;position:absolute;bottom:20px;right:20px">
<u-button text="重置" class="bottom-btn1"
@click="formData = {...formData,sources}"></u-button>
<u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button>
@ -56,6 +56,7 @@
export default {
props:{
stcd:String,
height:Number,
default:''
},
components:{
@ -81,7 +82,8 @@
adcd:type == 1 ? undefined :adcd,
},
list:[], //
saveList:[] //
saveList:[], //
tableHeight:0
}
},
@ -118,7 +120,8 @@
},
mounted() {
this.getList()
}
},
}
</script>

View File

@ -15,7 +15,7 @@
实时水位(m)
</th>
</tr>
<div style="max-height: 500px; overflow-y: auto">
<div :style="{'max-height':height + 'px', 'overflow-y': 'auto'}">
<tr v-for="(item, index) in newList" :key="index">
<td style="width: 50px">{{ index + 1 }}</td>
<td style="width: 130px;color: #3399ef;" @click="jumpDetail(item)">{{ item.stnm }}</td>
@ -42,6 +42,10 @@
list:{
type:Array,
default:[],
},
height:{
type:Number,
default:0
}
},
computed:{

View File

@ -18,10 +18,10 @@
</image>
</view>
<view class="content">
<Table :list="list" />
<Table :list="list" :height="height"/>
</view>
<u-popup :show="popupOpen" mode="right" @close="popupOpen=false" >
<view style="padding: 30px 20px;">
<view style="padding: 30px 20px; width:250px">
<text style="font-weight: bold;">按类型</text>
<view style="margin-bottom: 10px; margin-left: -5px;">
<u-checkbox-group
@ -38,7 +38,7 @@
</u-checkbox>
</u-checkbox-group>
</view>
<view style="display: flex; margin-top: 240%;">
<view style="display: flex;position:absolute;bottom:20px;right:20px">
<u-button text="重置" class="bottom-btn1"
@click="formData = {...formData,sources}"></u-button>
<u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button>
@ -55,6 +55,7 @@
const type = disType(adcd)
export default {
props:{
height:Number,
stcd:String,
default:''
},

View File

@ -18,7 +18,7 @@
超汛限(m)
</th>
</tr>
<div style="max-height: 500px; overflow-y: auto">
<div :style="{'max-height':height + 'px', 'overflow-y': 'auto'}">
<tr v-for="(item, index) in newList" :key="index">
<td style="width: 40px">{{ index + 1 }}</td>
<td style="width: 90px;color: #3399ef;" @click="jumpDetail(item)">{{ item.stnm }}</td>
@ -46,6 +46,10 @@
list:{
type:Array,
default:[],
},
height:{
type:Number,
default:0,
}
},
computed:{

View File

@ -15,8 +15,8 @@
</view>
</view>
<view class="water-detail-content">
<HdWater v-if="activeOne == 0"/>
<SkWater v-if="activeOne == 1"/>
<HdWater v-if="activeOne == 0" :height="tableHeight"/>
<SkWater v-if="activeOne == 1" :height="tableHeight"/>
</view>
</view>
</template>
@ -27,17 +27,29 @@
export default {
data() {
return {
activeOne:0
activeOne:0,
tableHeight:0
}
},
components:{
HdWater,
SkWater
},
methods: {
backTo(){
uni.navigateBack({delta:1})
}
},
onReady(){
console.log(123333);
let that = this
uni.getSystemInfo({
success: (res) => {
that.tableHeight = res.windowHeight - 240;
console.log("that.tableHeight",that.tableHeight);
}
})
}
}
</script>