样式更新

This commit is contained in:
978184212@qq.com 2025-11-22 15:46:52 +08:00
parent 2c66f71e04
commit d8c7d2f95e
6 changed files with 182 additions and 224 deletions

View File

@ -1,5 +1,5 @@
{ {
"name" : "农业面源污染监测系统", "name" : "汾西县黄河流域面源污染监测",
"appid" : "__UNI__44A8AB0", "appid" : "__UNI__44A8AB0",
"description" : "", "description" : "",
"versionName" : "2.2.22", "versionName" : "2.2.22",

View File

@ -460,11 +460,6 @@
this.$http.get('/applet/survStationInfo/getStationInfo',{params:params}).then(res =>{ this.$http.get('/applet/survStationInfo/getStationInfo',{params:params}).then(res =>{
if(res.data.code == 0){ if(res.data.code == 0){
this.details = res.data.data.stationInfo this.details = res.data.data.stationInfo
this.dataH2s = res.data.data.liveSurvData[1].dataH2s
this.dataNh3 = res.data.data.liveSurvData[1].dataNh3
this.dataOu = res.data.data.liveSurvData[1].dataOu
this.dataTvoc = res.data.data.liveSurvData[1].dataTvoc
console.log('数据1',this.dataH2s)
if(this.details.deviceCount >= 10000 && this.details.deviceCount < 100000000){ if(this.details.deviceCount >= 10000 && this.details.deviceCount < 100000000){
this.details.deviceCount = (this.details.deviceCount /10000).toFixed(1) + '万' this.details.deviceCount = (this.details.deviceCount /10000).toFixed(1) + '万'
} }

View File

@ -1,7 +1,6 @@
<template> <template>
<view class="container"> <view class="container">
<scroll-view scroll-y="true" :style="{height:height + 'rpx'}" @refresherrefresh="refresherrefreshFun" <!-- 顶部选项卡 -->
@refresherpulling="refresherpullingFun" :refresher-triggered="isRefresher" refresher-enabled="true">
<view class="topScroll"> <view class="topScroll">
<scroll-view scroll-x="true" class="scroll"> <scroll-view scroll-x="true" class="scroll">
<view class="scroll-item" v-for="(item,index) in topItems" :key="index" <view class="scroll-item" v-for="(item,index) in topItems" :key="index"
@ -12,6 +11,8 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<!-- 异常趋势图 -->
<block v-if="isActive == 1"> <block v-if="isActive == 1">
<view class="liebiaos" v-if="resolt.length>0"> <view class="liebiaos" v-if="resolt.length>0">
<view class="searchbox"> <view class="searchbox">
@ -41,11 +42,10 @@
</view> </view>
</view> </view>
</block> </block>
<!-- 监测站告警 --> <!-- 监测站告警 -->
<block v-else-if="isActive == 0"> <block v-else-if="isActive == 0">
<view class="liebiaos" v-if="List.length != 0"> <view class="liebiaos" v-if="List.length != 0">
<scroll-view :style="{height:scorllheights + 'rpx'}" scroll-y="true" class="scroll-Y"
@scrolltolower="lower">
<view class="itembox" v-for="(item,index) in List" :key="index"> <view class="itembox" v-for="(item,index) in List" :key="index">
<view class="itembox_top" v-if="item.stationName"> <view class="itembox_top" v-if="item.stationName">
<view class="itembox_lef"> <view class="itembox_lef">
@ -92,7 +92,6 @@
<view class="load"> <view class="load">
<uni-load-more :status="loadStatus"></uni-load-more> <uni-load-more :status="loadStatus"></uni-load-more>
</view> </view>
</scroll-view>
</view> </view>
<view class="zwsj" v-else> <view class="zwsj" v-else>
<view class="inzwsj"> <view class="inzwsj">
@ -103,7 +102,6 @@
</view> </view>
</view> </view>
</block> </block>
</scroll-view>
</view> </view>
</template> </template>
@ -128,9 +126,6 @@
intervalId: null, intervalId: null,
loadStatus: 'more', //more-loading-nomore- loadStatus: 'more', //more-loading-nomore-
isLoadMore: false, // isLoadMore: false, //
height: 0,
scorllheight: 0,
scorllheights: 0,
show: false, show: false,
show1: false, show1: false,
top: 0, top: 0,
@ -212,31 +207,21 @@
} }
}, },
onLoad() { onLoad() {
uni.getSystemInfo({
success: res => {
var pxToRpxScale = 750 / res.windowWidth
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
var navigationHeight = 44 * pxToRpxScale
this.height = res.windowHeight * pxToRpxScale //px rpx
this.scorllheight = this.height - 174
this.scorllheights = this.height - 90
}
});
this.getList() this.getList()
this.startTime = this.rangetime[0] this.startTime = this.rangetime[0]
this.endTime = this.rangetime[1] this.endTime = this.rangetime[1]
}, },
onShow() { onShow() {
uni.getSystemInfo({ //
success: res => { this.getList()
var pxToRpxScale = 750 / res.windowWidth },
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale onReachBottom() {
var navigationHeight = 44 * pxToRpxScale //
this.height = res.windowHeight * pxToRpxScale //px rpx this.lower();
this.scorllheight = this.height - 174 },
this.scorllheights = this.height - 90 onPullDownRefresh() {
} //
}); this.refresherrefreshFun();
}, },
watch: { watch: {
rangetime(newval) { rangetime(newval) {
@ -265,11 +250,9 @@
refresherrefreshFun() { refresherrefreshFun() {
this.pageNo = 1 this.pageNo = 1
this.deviceNo = '' this.deviceNo = ''
this.getList() this.getList().then(() => {
}, uni.stopPullDownRefresh();
// });
refresherpullingFun() {
this.isRefresher = true
}, },
// //
chooseClick(item, index) { chooseClick(item, index) {
@ -282,6 +265,7 @@
} }
}, },
getList() { getList() {
return new Promise((resolve, reject) => {
var params = {} var params = {}
params.pageNo = this.pageNo params.pageNo = this.pageNo
params.pageSize = this.pageSize params.pageSize = this.pageSize
@ -315,7 +299,6 @@
this.loadStatus = 'nomore' this.loadStatus = 'nomore'
} else { } else {
this.isLastpage = false; this.isLastpage = false;
// this.isLoadMore=true
this.loadStatus = 'more' this.loadStatus = 'more'
} }
} else { } else {
@ -325,6 +308,11 @@
} }
uni.hideLoading(); uni.hideLoading();
this.isRefresher = false this.isRefresher = false
resolve()
}).catch(err => {
uni.hideLoading();
reject(err)
})
}) })
}, },
lower() { lower() {
@ -361,7 +349,6 @@
this.loadStatus = 'nomore' this.loadStatus = 'nomore'
} else { } else {
this.isLastpage = false; this.isLastpage = false;
// this.isLoadMore=true
this.loadStatus = 'more' this.loadStatus = 'more'
} }
} else { } else {
@ -457,44 +444,6 @@
color: "#1890FF" color: "#1890FF"
}); });
// //
// if (highValNum !== null) {
// const highAlertData = mainData.map(value => {
// return value > highValNum ? value : null;
// });
// series.push({
// name: '',
// data: highAlertData,
// color: "#FF4242",
// pointStyle: {
// shape: 'circle',
// size: 6,
// borderWidth: 2
// },
// lineStyle: 'none' // 线
// });
// }
// // 绿
// if (lowValNum !== null) {
// const lowAlertData = mainData.map(value => {
// return value < lowValNum ? value : null;
// });
// series.push({
// name: '',
// data: lowAlertData,
// color: "#19D58A",
// pointStyle: {
// shape: 'circle',
// size: 6,
// borderWidth: 2
// },
// lineStyle: 'none' // 线
// });
// }
// 线线 // 线线
if (highValNum !== null) { if (highValNum !== null) {
series.push({ series.push({
@ -559,10 +508,14 @@
page { page {
height: 100%; height: 100%;
background: #fff; background: #fff;
/* 确保页面可以滚动 */
overflow: auto;
} }
.container { .container {
height: 100%; min-height: 100%;
/* 改为 min-height */
padding-bottom: 20rpx;
} }
.searchbox { .searchbox {
@ -572,7 +525,6 @@
position: relative; position: relative;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.search_input { .search_input {
@ -675,6 +627,9 @@
height: 85rpx; height: 85rpx;
background-color: #fff; background-color: #fff;
border-bottom: 1rpx solid #ededed; border-bottom: 1rpx solid #ededed;
position: sticky;
top: 0;
z-index: 999;
} }
.scroll { .scroll {
@ -683,6 +638,7 @@
white-space: nowrap; white-space: nowrap;
justify-content: space-between; justify-content: space-between;
padding-top: 12rpx; padding-top: 12rpx;
background: #fff;
} }
.scroll-item { .scroll-item {

View File

@ -11,19 +11,19 @@
版本号 版本号
</view> </view>
<view class="item_right"> <view class="item_right">
1.0.1 v1.0.1
</view> </view>
</view> </view>
<!-- <view class="usList_item">--> <!-- <view class="usList_item">
<!-- <view class="item_left">--> <view class="item_left">
<!-- 经营主体--> 经营主体
<!-- </view>-->
<!-- <view class="item_right">-->
<!--&lt;!&ndash; 版权所有 &ndash;&gt;-->
<!-- </view>-->
<!-- </view>-->
</view> </view>
<view class="item_right">
版权所有
</view>
</view> -->
</view>
<text class="botmTetx">Copyright 汾西县农业农村局</text>
</view> </view>
</view> </view>
</template> </template>
@ -105,4 +105,11 @@
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
} }
.botmTetx{
position: absolute;
bottom: 60rpx;
left: 50%;
transform: translate(-50%);
color: #000;
}
</style> </style>

View File

@ -4,7 +4,7 @@
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "农业面源污染监测系统", "navigationBarTitleText": "汾西县黄河流域面源污染监测",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="container"> <view class="container">
<uni-nav-bar :fixed="true" background-color="transparent" status-bar title="农业面源污染监测系统" /> <uni-nav-bar :fixed="true" background-color="transparent" status-bar title="汾西县黄河流域面源污染监测" />
<image src="../../static/home_top_bg.png" mode="" class="bgimg"></image> <image src="../../static/home_top_bg.png" mode="" class="bgimg"></image>
<scroll-view class="content" scroll-y="true" :style="{height:contentheight + 'rpx'}"> <scroll-view class="content" scroll-y="true" :style="{height:contentheight + 'rpx'}">
<view class="top_address"> <view class="top_address">
@ -53,7 +53,7 @@
</view> </view>
<view class="line"></view> <view class="line"></view>
<swiper class="liebiao" next-margin="570rpx" :vertical="true" circular :autoplay="autoplay" <swiper class="liebiao" next-margin="570rpx" :vertical="true" circular :autoplay="autoplay"
:indicator-dots="false" interval="900" :duration="duration"> :indicator-dots="false" interval="3000" :duration="duration">
<swiper-item class="item" v-for="(item,index) in list" :key="index" @click="todetail(item,index)"> <swiper-item class="item" v-for="(item,index) in list" :key="index" @click="todetail(item,index)">
<view class="topline" :class="{'toplines':index == 0}"></view> <view class="topline" :class="{'toplines':index == 0}"></view>
<view class="List"> <view class="List">