样式修改

This commit is contained in:
978184212@qq.com 2025-12-01 10:50:35 +08:00
parent 3525d2233a
commit 0b15b83805
5 changed files with 304 additions and 23 deletions

View File

@ -95,13 +95,12 @@
uni.showLoading({
title: '加载中'
});
this.$http.get('/applet/survStationInfo/fdeviceList').then(res =>{
this.$http.get('/applet/survStationInfo/deviceList').then(res =>{
this.list = res.data.data
uni.hideLoading();
})
},
todetail(item,index){
console.log(item,12)
uni.navigateTo({
url:'/packDetail/pages/vidio/detail?item=' + encodeURIComponent(JSON.stringify(item))
})

View File

@ -0,0 +1,280 @@
<template>
<view class="container">
<view class="liebiaos" v-if="list.length">
<scroll-view :style="{height:scorllheight + 'rpx'}" scroll-y="true" class="scroll-Y">
<view class="list_item" v-for="(it,i) in list" :key="i">
<view class="list_item_top">
<view class="list_item_left">
<image v-if="it[0].stationType == 'orient'" src="../../static/zd.png" mode=""></image>
<image v-if="it[0].stationType == 'livestock'" src="../../static/zhandian_icon_xuqin.png" mode=""></image>
<view class="item_right">
<view class="right_top">
{{it[0].stationName}}
</view>
<view class="right_bot">
<image src="../../static/shebei_icon_shebei.png" mode=""></image>
<view class="">设备数量{{it.length}} </view>
</view>
</view>
</view>
<!-- <view class="state">
<view class="">
在线
</view>
<image src="../../static/zhandian_icon_zaixian .png" mode="" class="zt"></image>
</view> -->
</view>
<view class="botcontent">
<block v-for="(item,index) in it" :key="index">
<view class="botcontent_left" @click="todetail(item,index)">
<view class="botleft_left">
<view class="botleftleft_top">
<image :src="baseUrl + '/applet/common/static/' + item.deviceInfo.deviceIcon" mode=""></image>
</view>
<view class="botleftleft_bot">
<view class="botleft_bottop">
{{item.deployDes}}
</view>
<!-- <view class="botleft_botbot">
型号{{item.deviceInfo.deviceModel}}
</view> -->
</view>
</view>
</view>
</block>
</view>
</view>
</scroll-view>
</view>
<view class="zwsj" v-else>
<view class="inzwsj">
<image src="../../static/zwsj.png" mode="" class="zwsjimg"></image>
<view class="zwsjtext">
暂无数据
</view>
</view>
</view>
</view>
</template>
<script>
import api from "@/api/api"
import configService from '@/common/service/config.service.js';
export default{
data(){
return{
height:0,
scorllheight:0,
baseUrl:configService.apiUrl,
allNum: '',
isLastpage: '',
intervalId: null,
loadStatus:'more', //more-loading-nomore-
isLoadMore:false, //
show:false,
show1:false,
top:0,
list:[]
}
},
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
console.log(this.height,ktxStatusHeight,navigationHeight)
this.scorllheight = this.height
}
});
this.getList()
},
methods:{
getList(){
uni.showLoading({
title: '加载中'
});
this.$http.get('/applet/survStationInfo/fdeviceList').then(res =>{
this.list = res.data.data
uni.hideLoading();
})
},
todetail(item,index){
console.log(item,12)
uni.navigateTo({
url:'/packDetail/pages/vidio/detail?item=' + encodeURIComponent(JSON.stringify(item))
})
}
}
}
</script>
<style lang="scss">
page{
height: 100%;
}
.container{
height: 100%;
// overflow-y: scroll;
// overflow-x: hidden;
}
.bgimg{
width: 100%;
height: 3631rpx;
}
.liebiaos{
padding: 28rpx 32rpx;
}
.list_item{
width: 100%;
padding: 37rpx 34rpx 28rpx;
background: #FFFFFF;
border-radius: 34rpx;
margin-bottom: 25rpx;
position: relative;
}
.list_item:last-child{
margin-bottom: 0;
}
.list_item_top{
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
margin-bottom: 25rpx;
}
.list_item_left{
display: flex;
align-items: center;
}
.list_item_left image{
width: 73rpx;
height: 73rpx;
margin-right: 18rpx;
}
.item_right{
height: 76rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.right_top{
font-size: 32rpx;
font-family: Source Han Sans SC;
font-weight: 500;
color: #2F3841;
}
.right_bot{
display: flex;
align-items: center;
font-size: 24rpx;
font-family: Source Han Sans SC;
font-weight: 400;
color: #9CA9BE;
}
.right_bot image{
height: 26rpx;
width: 24rpx;
margin-right: 11rpx;
}
.jt{
width: 40rpx;
height: 48rpx;
}
.state{
background: #F6F6F6;
border-top-left-radius: 26rpx;
border-bottom-left-radius: 26rpx;
width: 171rpx;
height: 52rpx;
font-size: 24rpx;
font-family: Source Han Sans SC;
font-weight: 400;
color: #5F7088;
display: flex;
align-items: center;
padding-left: 24rpx;
box-sizing: border-box;
position: absolute;
top: 31rpx;
right: -32rpx;
}
.zt{
width: 24rpx;
height: 24rpx;
margin-left: 18rpx;
}
.botcontent{
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.botcontent_left{
width: 48%;
background: #F8F8F8;
border-radius: 24rpx;
padding: 44rpx 5rpx 44rpx 5rpx;
margin-top: 20rpx;
}
.botcontent_left image{
width: 61rpx;
height: 61rpx;
}
.botleftleft_top{
display: flex;
justify-content: center;
margin-bottom: 24rpx;
}
.botleftleft_top image{
width: 65rpx;
height: 65rpx;
}
.botleftleft_bot{
display: flex;
flex-direction: column;
align-items: center;
}
.botleft_bottop{
width: 70%;
font-size: 28rpx;
font-family: Source Han Sans SC;
font-weight: 500;
color: #333333;
text-align: center;
}
.botleft_botbot{
width: 60%;
font-size: 24rpx;
font-family: Source Han Sans SC;
font-weight: 400;
color: #9CA9BE;
margin-top: 17rpx;
word-break: break-all;
// text-align: center;
}
.zwsj{
width: 100%;
height: 100%;
display: flex;
padding: 60% 170rpx 0;
}
.inzwsj{
width: 100%;
}
.zwsjimg{
width: 100%;
height: 224rpx;
margin-bottom: 37rpx;
}
.zwsjtext{
width: 100%;
font-size: 26rpx;
font-family: Source Han Sans SC;
font-weight: 400;
color: #999999;
line-height: 31rpx;
text-align: center;
}
</style>

View File

@ -132,6 +132,14 @@
},
{
"path": "pages/vidio/index",
"style": {
"navigationBarTitleText": "站点监测",
"navigationStyle": "default",
"navigationBarBackgroundColor":"#0F6EFF"
}
},
{
"path": "pages/vidio/soilindex",
"style": {
"navigationBarTitleText": "土壤监测",
"navigationStyle": "default",

View File

@ -22,7 +22,7 @@
indicator-active-color="rgba(197, 197, 197, 1)" :autoplay="autoplay" interval="3000"
:duration="duration">
<swiper-item class="swiper_items" v-for="(item,index) in bigswiperList" :key="index">
<image class="siwper_imgs" :src="baseUrl + '/applet/common/static/' + item.detailPics" mode="">
<image class="siwper_imgs" :src="baseUrl + '/applet/common/static/' + item.detailPics" mode="" @click="banlick(index)">
</image>
</swiper-item>
</swiper>
@ -150,7 +150,7 @@
path: '/packDetail/pages/Site/index'
},
{
name: '土壤监测',
name: '站点监测',
img: require('../../static/home_icon_shebei.png'),
path: '/packDetail/pages/vidio/index'
},
@ -185,15 +185,12 @@
},
onLoad() {
// this.wrwlist = uni.getStorageSync('wrwlist')
console.log(1561)
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
// console.log(navigationHeight,'111111111')
// console.log(this.height, ktxStatusHeight, navigationHeight)
this.contentheight = this.height - ktxStatusHeight - navigationHeight
this.pageheight = this.height - ktxStatusHeight - navigationHeight - 98
}
@ -210,9 +207,7 @@
var that = this
myAmapFun.getWeather({
type: 'live',
// city:code,
success: function(data) {
console.log(data) //
that.weather = data.temperature.data + '℃'
that.city = data.liveData.city;
var twtype = data.weather.data
@ -264,13 +259,10 @@
if (uni.getStorageSync('third_session')) {
uni.login({
success: function(res) {
console.log(res.code)
this.code = res.code
let params = {}
params.jsCode = this.code
console.log(params, 152)
api.wxlogin(params).then(res => {
console.log(res, 165)
if (res.data.code == 0) {
let userInfo = res.data.data;
// uni.setStorageSync('third_session', userInfo.thirdSession);
@ -683,9 +675,7 @@
}]
if (that.list) {
for (var i = 0; i < that.list.length; i++) {
// console.log(Object.keys(this.list[i]),Object.keys(this.list[i]).length)
that.list[i].wrwcode = []
// console.log(this.wrwlist,'shuzu')
for (var j = 0; j < that.wrwlist.length; j++) {
// Object.keys
for (var k = 0; k < Object.keys(this.list[i])
@ -704,7 +694,6 @@
}
if (that.list[i].dataDateTime) {
that.list[i].times = null
// console.log(this.list[i].times)
}
}
that.numbers = that.list[0].dataCounts
@ -1128,9 +1117,7 @@
}]
if (that.list) {
for (var i = 0; i < that.list.length; i++) {
// console.log(Object.keys(this.list[i]),Object.keys(this.list[i]).length)
that.list[i].wrwcode = []
// console.log(this.wrwlist,'shuzu')
for (var j = 0; j < that.wrwlist.length; j++) {
// Object.keys
for (var k = 0; k < Object.keys(this.list[i]).length; k++) {
@ -1147,7 +1134,6 @@
}
if (that.list[i].dataDateTime) {
that.list[i].times = null
// console.log(this.list[i].times)
}
}
that.numbers = that.list[0].dataCounts
@ -1194,7 +1180,6 @@
//
if (now - this.lastClickTime < this.throttleDelay) {
console.log('点击过于频繁,请稍后再试');
return;
}
@ -1231,9 +1216,7 @@
this.list = res.data.data
if (this.list.length > 0) {
for (var i = 0; i < this.list.length; i++) {
// console.log(Object.keys(this.list[i]),Object.keys(this.list[i]).length)
this.list[i].wrwcode = []
// console.log(this.wrwlist,'shuzu')
for (var j = 0; j < this.wrwlist.length; j++) {
// Object.keys
for (var k = 0; k < Object.keys(this.list[i]).length; k++) {
@ -1251,7 +1234,6 @@
}
if (this.list[i].dataDateTime) {
this.list[i].times = this.list[i].dataDateTime.split(" ")
// console.log(this.list[i].times)
}
}
this.numbers = this.list[0].dataCounts
@ -1260,6 +1242,18 @@
},
toList(item, index) {
this.isAathorize(item.path)
},
// banner
banlick(index){
if (index==0) {
uni.navigateTo({
url: '/packDetail/pages/vidio/soilindex'
})
} else {
uni.navigateTo({
url: '/packDetail/pages/Site/index'
})
}
}
}
}

View File

@ -19,7 +19,7 @@
<view class="zdxqitem" @click="switch2Change('土壤')">
<image src="../../static/iconsheturangzs.png" mode=""></image>
<view class="textss">
土壤监测点
长期定位监测点位
</view>
</view>
</view>