|
|
@ -75,22 +75,24 @@ |
|
|
|
</style> |
|
|
|
<template> |
|
|
|
<view class="container flex"> |
|
|
|
<d-search /> |
|
|
|
<d-search v-model="searchVal.search" :list="['施肥','施肥','施肥','施肥','施肥','施肥','施肥','施肥','施肥','施肥']" @search="clean();search()"/> |
|
|
|
|
|
|
|
<view class="date-range"> |
|
|
|
<text class="plant-youbian">请选择开始时间</text> ~ <text class="plant-youbian">请选择结束时间</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<scroll-view scroll-y @scrolltolower="search"> |
|
|
|
<view class="card"> |
|
|
|
<view class="card" v-for="(v,k) in list" :key="k"> |
|
|
|
<view class="info"> |
|
|
|
<text>施肥</text> <text class="over">中量元素水溶肥</text> <text>10kg</text> |
|
|
|
<text>{{v.type}}</text> <text class="over">{{v.inputName}}</text> <text>{{v.inputTotal}}{{v.unit}}</text> |
|
|
|
</view> |
|
|
|
<view class="people"> |
|
|
|
<text>负责人:张召忠</text> <text>记录时间:2022-12-12</text> |
|
|
|
<text>负责人:{{v.principal}}</text> <text>记录时间:{{v.time}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</template> |
|
|
|
<script> |
|
|
@ -98,13 +100,53 @@ import request from '@/common/request.js' |
|
|
|
export default { |
|
|
|
data(){ |
|
|
|
return{ |
|
|
|
|
|
|
|
searchVal:{ |
|
|
|
search:"", |
|
|
|
pageNo:1, |
|
|
|
pageSize:6, |
|
|
|
plotId:"", |
|
|
|
PlantBaseInfoId: this.$store.state.plantBaseInfoId, |
|
|
|
startTime:"", |
|
|
|
endTime:"", |
|
|
|
}, |
|
|
|
total:0, |
|
|
|
list:[], |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(){}, |
|
|
|
onLoad(){ |
|
|
|
this.init() |
|
|
|
this.search() |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
async init(){ |
|
|
|
var res=await reqeust("/api/plantFarming/listFarmName") |
|
|
|
if(res.statu){ |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
clean(){ |
|
|
|
this.list=[] |
|
|
|
this.total=0 |
|
|
|
this.searchVal.pageNo=1 |
|
|
|
}, |
|
|
|
async search(){ |
|
|
|
var res=await request() |
|
|
|
if(this.total==0 || this.list.length<this.total){ |
|
|
|
var res=await request("/api/plantFarming/listFarmByPlotId",{ |
|
|
|
params: this.searchVal |
|
|
|
}) |
|
|
|
if(res.statu){ |
|
|
|
this.list=this.list.concat(res.data.list) |
|
|
|
this.total=res.data.total |
|
|
|
this.searchVal.pageNo++ |
|
|
|
if(this.list.length==this.total)uni.showToast({title:"加载完成!",icon:"none"}) |
|
|
|
}else{ |
|
|
|
uni.showModal({ |
|
|
|
title:"提示", |
|
|
|
content:res.msg||"获取农事记录列表失败!", |
|
|
|
showCancel:false, |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|