feat():适配优化

master
李神峰 2024-06-13 16:22:28 +08:00
parent c6144980a8
commit 85ecd992bd
12 changed files with 82 additions and 67 deletions

View File

@ -1,7 +1,8 @@
<template>
<view class="rain-detail-box">
<u-status-bar></u-status-bar>
<view class="nav-bar">
<u-icon name="arrow-left" color="#000" size="28" @click="backTo"></u-icon>
<u-icon name="arrow-left" color="#000" size="20" @click="backTo" style="margin-left:10px"></u-icon>
<view class="title">
{{stnm}}
</view>
@ -74,16 +75,18 @@
justify-content: center;
align-items: center;
width: 100%;
margin-top: 30px;
padding-top: 20px;
padding-bottom: 10px;
height: 44px;
// margin-top: 30px;
// padding-top: 20px;
// padding-bottom: 10px;
border-bottom: 1px solid #dfdfdf;
box-shadow: 0 5px 10px -8px #dfdfdf inset;
// box-shadow: 0 5px 10px -8px #dfdfdf inset;
}
.title{
flex:1;
text-align: center;
margin-right: 18px;
font-size: 18px;
}
.tab-bar{
display: flex;

View File

@ -6,7 +6,7 @@
<div class="icon">
<image
style="width: 100%; height: 100%;border-radius: 50%;"
:src="default_src || default_img"
:src="default_src"
mode="aspectFill"
></image>
</div>
@ -286,7 +286,6 @@ 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 {
@ -335,7 +334,6 @@ export default {
readStatus:false,
readYjStatus:false,
default_src: uni.getStorageSync('avatar'),
default_img
}
},
computed: {

View File

@ -111,7 +111,7 @@
console.log('-----avatar------',uni.getStorageSync('avatar'));
})
} else {
uni.setStorageSync('avatar','../../static/tabs/touxing.png')
uni.setStorageSync('avatar','../../static/tabs/touxiang.png')
}
})
}

View File

@ -1,12 +1,12 @@
<template>
<div class="table_div">
<div class="table_cur">
<table style="width:100%">
<table style="width:100%;display:block">
<tr>
<th style="width: 10%;">
<th style="width: 11%;">
<div style="margin-top: 6px;">序号</div>
</th>
<th style="width: 28%">
<th style="width: 27%">
<div style="margin-top: 6px;">站名</div></th>
<th style="width: 20%;">
<div>时段雨量</div>
@ -21,8 +21,8 @@
</tr>
<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)">
<td style="width: 11%;">{{ index + 1 }}</td>
<td style="width: 27%; color: #3399ef; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" @click="jumpDetail(item)">
{{ item.stnm }}</td>
<td style="width: 20%">{{ item.drp || 0 }}</td>
<td style="width: 20%">{{ item.yesDrp || 0 }}</td>

View File

@ -1,8 +1,10 @@
<template>
<view class="rain-box" style="overflow:hidden">
<u-status-bar></u-status-bar>
<!-- <view style="height: var(--status-bar-height); width: 100%;"></view> -->
<view class="nav-bar">
<u-icon name="arrow-left" color="#000" size="28" @click="backTo"></u-icon>
<view>
<u-icon name="arrow-left" color="#000" size="20" @click="backTo" style="margin-left:10px"></u-icon>
<view style="font-size:18px">
雨情
</view>
<!-- <u-icon name="arrow-right" color="#000" size="28"></u-icon> -->
@ -101,10 +103,10 @@
</view>
<!-- 时间段 -->
<view style="padding: 5px 10px; text-align: center; color: #f7b156;">
统计时段{{tm.stm}}{{tm.etm}}
<view style="padding: 1% 0%;width:100vw; text-align: center; color: #f7b156;">
统计时段:{{tm.stm}}{{tm.etm}}
</view>
<view style="margin: 0 10px;">
<view style="width:100%">
<Table :list="rainList" :height='tableHeight'/>
</view>
<u-picker
@ -427,7 +429,7 @@
let that = this
uni.getSystemInfo({
success: (res) => {
that.tableHeight = res.windowHeight - 300;
that.tableHeight = res.windowHeight - 280;
console.log("this.tableHeight", that.tableHeight);
}
})
@ -441,11 +443,12 @@
justify-content: space-between;
align-items: center;
width: 100%;
margin-top: 30px;
padding-top: 20px;
padding-bottom: 10px;
height: 44px;
// margin-top: 30px;
// padding-top: 40px;
// padding-bottom: 10px;
border-bottom: 1px solid #dfdfdf;
box-shadow: 0 5px 10px -8px #dfdfdf inset;
// box-shadow: 0 5px 10px -8px #dfdfdf inset;
}
.search-box{
width: 100%;

View File

@ -1,7 +1,8 @@
<template>
<view class="rain-detail-box">
<u-status-bar></u-status-bar>
<view class="nav-bar">
<u-icon name="arrow-left" color="#000" size="28" @click="backTo"></u-icon>
<u-icon name="arrow-left" color="#000" size="20" @click="backTo" style="margin-left:10px"></u-icon>
<view class="title">
{{stnm}}
</view>
@ -61,15 +62,17 @@
justify-content: center;
align-items: center;
width: 100%;
margin-top: 30px;
padding-top: 20px;
padding-bottom: 10px;
height: 44px;
// margin-top: 30px;
// padding-top: 20px;
// padding-bottom: 10px;
border-bottom: 1px solid #dfdfdf;
box-shadow: 0 5px 10px -8px #dfdfdf inset;
// box-shadow: 0 5px 10px -8px #dfdfdf inset;
}
.title{
flex:1;
text-align: center;
font-size: 18px;
}
.tab-bar{
display: flex;

View File

@ -1,7 +1,8 @@
<template>
<view class="rain-detail-box">
<u-status-bar></u-status-bar>
<view class="nav-bar">
<u-icon name="arrow-left" color="#000" size="28" @click="backTo"></u-icon>
<u-icon name="arrow-left" color="#000" size="20" @click="backTo" style="margin-left:10px"></u-icon>
<view class="title">
{{stnm}}
</view>
@ -118,16 +119,18 @@
justify-content: center;
align-items: center;
width: 100%;
margin-top: 30px;
padding-top: 20px;
padding-bottom: 10px;
height: 44px;
// margin-top: 30px;
// padding-top: 20px;
// padding-bottom: 10px;
border-bottom: 1px solid #dfdfdf;
box-shadow: 0 5px 10px -8px #dfdfdf inset;
// box-shadow: 0 5px 10px -8px #dfdfdf inset;
}
.title{
flex:1;
text-align: center;
margin-right: 18px;
font-size: 18px;
}
.tab-bar{
// width: 100%;

View File

@ -134,8 +134,9 @@
padding: 0 20px;
}
.content{
width: 100%;
margin-top: 10px;
max-height: 580px;
// max-height: 580px;
overflow-y: auto;
}

View File

@ -1,26 +1,26 @@
<template>
<div class="table_div">
<div class="table_cur">
<table>
<div class="table_cur" >
<table style="width:100%;display:block">
<tr>
<th style="width: 50px;">
<th style="width: 11%;">
序号
</th>
<th style="width: 130px">
<th style="width: 32%">
站名
<th style="width: 110px;">
<th style="width: 32%;">
监测时间
</th>
<th style="width: 100px;" >
<th style="width: 25%;" >
实时水位(m)
</th>
</tr>
<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>
<td style="width: 110px">{{item.tm}}</td>
<td style="width: 100px; position: relative;" >
<td style="width: 11%">{{ index + 1 }}</td>
<td style="width: 32%;color: #3399ef;" @click="jumpDetail(item)">{{ item.stnm }}</td>
<td style="width: 32%">{{item.tm}}</td>
<td style="width: 25%; position: relative;" >
<text :class="{'active1':item.gstate == 1,'active2':item.wstate == 1}">{{ item.z.toFixed(2) }}</text>
<text v-if="item.state == 1"
style="position: absolute; top: 0px; right: 0; color: #FF7D7D;font-size:18px;"></text>
@ -84,10 +84,10 @@
}
.table_cur tr {
display: flex;
line-height: 56rpx;
line-height: 80rpx;
}
.table_cur th {
height: 56rpx;
height: 80rpx;
color: #3399ef;
background: #e1f3ff;
font-size: 14px;

View File

@ -133,8 +133,9 @@
padding: 0 20px;
}
.content{
width: 100%;
margin-top: 10px;
max-height: 580px;
// max-height: 580px;
overflow-y: auto;
}

View File

@ -1,36 +1,36 @@
<template>
<div class="table_div">
<div class="table_cur">
<table>
<table style="width:100%;display:block">
<tr>
<th style="width: 40px;">
<th style="width: 11%;">
序号
</th>
<th style="width: 90px">
<th style="width: 24%">
站名
<th style="width: 80px;">
<th style="width: 22%;">
监测时间
</th>
<th style="width: 100px;" >
<th style="width: 25%;" >
实时水位(m)
</th>
<th style="width: 90px;" >
<th style="width: 20%;" >
超汛限(m)
</th>
</tr>
<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>
<td style="width: 80px">{{item.tm}}</td>
<td style="width: 100px; position: relative;" >
<td style="width: 11%">{{ index + 1 }}</td>
<td style="width: 24%;color: #3399ef;" @click="jumpDetail(item)">{{ item.stnm }}</td>
<td style="width: 22%">{{item.tm}}</td>
<td style="width: 25%; position: relative;" >
<text :class="{'active1':item.flState == 1,'active2':item.desState == 1,'active3':item.calState}">{{ item.rz.toFixed(2) }}</text>
<text v-if="item.state == 1"
style="position: absolute; top: 0px; right: 0; color: #FF7D7D;font-size:18px;"></text>
<text v-else-if="item.state == 2" style="position: absolute;
top:0px;right: 0; color: #32E48E; font-size: 18px;"></text>
</td>
<td style="width: 90px">{{item.afsltdz ? item.afsltdz.toFixed(2):'-'}}</td>
<td style="width: 20%">{{item.afsltdz ? item.afsltdz.toFixed(2):'-'}}</td>
</tr>
</div>
</table>
@ -89,10 +89,10 @@
}
.table_cur tr {
display: flex;
line-height: 56rpx;
line-height: 80rpx;
}
.table_cur th {
height: 56rpx;
height: 80rpx;
color: #3399ef;
background: #e1f3ff;
font-size: 14px;

View File

@ -1,7 +1,8 @@
<template>
<view class="water-box">
<u-status-bar></u-status-bar>
<view class="nav-bar">
<u-icon name="arrow-left" color="#000" size="28" @click="backTo"></u-icon>
<u-icon name="arrow-left" color="#000" size="20" @click="backTo" style="margin-left:10px"></u-icon>
<view class="title">
水情
</view>
@ -46,7 +47,7 @@
let that = this
uni.getSystemInfo({
success: (res) => {
that.tableHeight = res.windowHeight - 240;
that.tableHeight = res.windowHeight - 220;
console.log("that.tableHeight",that.tableHeight);
}
})
@ -61,16 +62,18 @@
justify-content: center;
align-items: center;
width: 100%;
margin-top: 30px;
padding-top: 20px;
padding-bottom: 10px;
height: 44px;
// margin-top: 30px;
// padding-top: 40px;
// padding-bottom: 10px;
border-bottom: 1px solid #dfdfdf;
box-shadow: 0 5px 10px -8px #dfdfdf inset;
// box-shadow: 0 5px 10px -8px #dfdfdf inset;
}
.title{
flex:1;
text-align: center;
margin-right: 15px;
font-size: 18px;
}
.tab-bar{
display: flex;