You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

170 lines
4.2 KiB

<style lang="scss" scoped>
.container{
padding:30rpx;
background:#F6F6F6;
min-height: 100%;
.card{
margin:0;
.item{
border-top:2rpx solid rgba(216,216,216,0.4);
height:80rpx;
display:flex;
align-items: center;
justify-content: space-between;
color:#777;
font-size:28rpx;
text{
&:first-child{
flex-shrink: 0;
margin-right:20rpx;
}
}
&.inline{
flex-direction: column;
align-items: flex-start;
height:auto;
padding-bottom:20rpx;
text:first-child{
margin:20rpx 0;
}
}
.imgs{
margin:0 -20rpx -20rpx 0;
width:100%;
display:flex;
flex-wrap: wrap;
&>view{
width:calc((100% - 40rpx)/3);
margin:0 20rpx 20rpx 0;
&:nth-child(3n){
margin-right:0;
}
}
&.bg{
background:#F7F7F7;
padding:30rpx 30rpx 0;
border-radius: 24rpx;
.u-transition{
box-shadow: 4rpx 4rpx 10rpx -4rpx rgba(0,0,0,0.2);
}
}
}
.detail{
background:#F7F7F7;
border-radius: 24rpx;
padding:20rpx;
color:#999;
font-size:28rpx;
width:100%;
}
}
.u-tabs{
margin-bottom:20rpx;
&/deep/ .u-tabs__wrapper__nav__item{
height:56rpx!important;
.u-tabs__wrapper__nav__item__text{
font-size:24rpx;
}
}
}
}
}
</style>
<template>
<view class="container">
<view class="card">
<view class="title">基本信息</view>
<view class="item">
<text>基地名称</text> <text>{{detail.plantBaseName}}</text>
</view>
<view class="item">
<text>基块编号</text> <text>{{detail.plotNumber}}</text>
</view>
<view class="item">
<text>基块面积</text> <text>{{detail.drawArea}}</text>
</view>
<view class="item">
<text>实际面积</text> <text>{{detail.realityArea}}</text>
</view>
<view class="item inline">
<text>地块图片</text>
<view class="imgs">
<u-image mode="aspectFill" radius="8rpx" width="100%" height="160rpx" v-for="(v,k) in detail.image" :key="k" :src="`${imgUrl}/${v}`">
<text slot="error" style="font-size:60rpx" class="plant-xiaopangchetupianjiazaishibai"/>
</u-image>
</view>
</view>
<view class="item">
<text>使用日期</text> <text>{{detail.beginTime}} 至 {{detail.endTime}}</text>
</view>
<view class="item">
<text>海拔</text> <text>123米</text>
</view>
<view class="item">
<text>基地管理员</text> <text>张阿肆(1556325665)</text>
</view>
<view class="item inline">
<text>详细地址</text>
<view class="detail"> {{detail.address}} </view>
</view>
</view>
<view class="card" style="margin-top:30rpx;">
<u-tabs
lineColor="#10C176"
:scrollable="false"
lineWidth="60rpx"
:list="[{name:'土壤检测信息'},{name:'水质检测信息'},{name:'空气质量信息'}]"/>
<view class="item">
<text>送检人</text> <text>赵晓敏</text>
</view>
<view class="item">
<text>检测时间</text> <text class="over">2023-04-23</text>
</view>
<view class="item">
<text>检测机构</text> <text class="over">xxxx检测机构</text>
</view>
<view class="item">
<text>检测人</text> <text class="over">张欣欣</text>
</view>
<view class="item inline">
<text>检测报告</text>
<view class="imgs bg">
<u-image mode="aspectFill" v-for="k in 4" :key="k" radius="8rpx" width="100%" height="220rpx" src="https://tse1-mm.cn.bing.net/th/id/OIP-C.0H1wH1c5Gj0VDWYOP_EcawHaKe?pid=ImgDet&rs=1">
<text slot="error" style="font-size:60rpx" class="plant-xiaopangchetupianjiazaishibai"/>
</u-image>
</view>
</view>
</view>
</view>
</template>
<script>
import request,{host} from '@/common/request'
export default{
data(){
return{
detail:{},
imgUrl:host("imgUrl"),
}
},
onLoad(options){
this.getDetail(options.id)
},
methods:{
async getDetail(id){
var res=await request('/api/plantPlot/queryById',{
params:{id}
})
if(res.statu){
this.detail=res.data
}else{
uni.showModal({
title:"提示",
content:res.msg||"获取详情失败!",
showCancel:false,
})
}
}
}
}
</script>