mkm
/
yanzhiAPP
Template
2
0
Fork 0

农户相关接口完善

This commit is contained in:
zmj 2023-10-27 18:38:25 +08:00
parent c007d53926
commit 999a85f35b
32 changed files with 5299 additions and 3442 deletions

View File

@ -18,3 +18,8 @@ export const animalPicListAPI = (data) => syhttp.get('/AnimalBreed/animalPicList
export const addAnimalPicAPI = (data) => syhttp.post('/AnimalBreed/addAnimalPic', data) export const addAnimalPicAPI = (data) => syhttp.post('/AnimalBreed/addAnimalPic', data)
// 更新动物饲养状态 // 更新动物饲养状态
export const animalStatusAPI = (data) => syhttp.post('/AnimalBreed/animalStatus', data) export const animalStatusAPI = (data) => syhttp.post('/AnimalBreed/animalStatus', data)
// 动物历史养殖记录列表
export const animalChangeListAPI = (data) => syhttp.get('/AnimalBreed/animalChangeList', data)
// 标记为出栏
//
export const animalSellAPI = (data) => syhttp.post('/AnimalBreed/animalSell', data)

View File

@ -11,7 +11,7 @@ export const addAnimalAPI = (data) => syhttp.post('/PoultryBreed/addPoultry', da
// 操作列表 // 操作列表
export const actionsAPI = (data) => syhttp.get('/user/actions', data) export const actionsAPI = (data) => syhttp.get('/user/actions', data)
// 操作列表 // 操作列表
export const animalInfoAPI = (data) => syhttp.get('/AnimalBreed/animalInfo', data) export const animalInfoAPI = (data) => syhttp.get('/PoultryBreed/poultryInfo', data)
// 图片列表 // 图片列表
export const animalPicListAPI = (data) => syhttp.get('/PoultryBreed/poultryPicList', data) export const animalPicListAPI = (data) => syhttp.get('/PoultryBreed/poultryPicList', data)
// 上传动物图片 // 上传动物图片

View File

@ -0,0 +1,184 @@
<template>
<view class="" v-if="props.showImg">
<view class="" v-if="animal_detail?.pic_detail?.pic">
<imgCard :imgUrl='animal_detail.pic_detail.pic'></imgCard>
</view>
<view class="bad-info">
<view class="" style="display: flex;align-items: center;">
<u--image src="/static/img/sj.png')" style="margin: 0 5rpx;" width="28.04rpx"
height="28.04rpx"></u--image>
<text>刷新时间:{{dateFn()}}</text>
</view>
<view style="display: flex;" @click="navgo(`/pages/feedIng/histroyFeed?id=${props.id}`)">
查看历史条件 <u--image src="/static/img/CKGD.png" style="margin-left: 5rpx;" width="31.54rpx"
height="31.54rpx"></u--image>
</view>
</view>
<view class="up-plant-btn" @click="updateImgFn">
上传新的种植情况
</view>
</view>
<view class="card">
<view class="tit">
<view class="">
溯源码: {{animal_detail.animal_code}}
</view>
</view>
<view class="card-li">
<view class="">
养殖品种: {{animal_detail.animal_kind}}
</view>
<view class="">
年龄: {{animal_detail.animal_age}}
</view>
</view>
<view class="card-li">
<view class="">
养殖类型: {{animal_detail.animal_breed}}
</view>
<view class="">
体重:{{animal_detail.animal_weight}}
</view>
</view>
</view>
<view class="card">
<view class="card-li">
<view class="" style="display: flex;align-items: center;">
<u--image src="/static/img/GG.png" style="margin: 0 21rpx;" width="80rpx" height="80rpx"></u--image>
当前养殖状态
</view>
<view class="" style="color: #00A15E;" v-if='animal_detail.animal_status==1'>
健康
</view>
<view class="" style="color: #FFD736;" v-if='animal_detail.animal_status==2'>
怀孕中
</view>
<view class="" style="color: #3274F9;" v-if='animal_detail.animal_status==4'>
可出栏
</view>
<view class="" style="color: #F84221;" v-if='animal_detail.animal_status==3'>
生病隔离中
</view>
</view>
</view>
</template>
<script setup>
import imgCard from "@/components/imgCard.vue"
import uplodeImg from "@/utils/uplodeImg.js"
import {
animalInfoAPI,
addAnimalPicAPI
} from "@/api/animal.js"
import {
ref,
reactive,
watch
} from "vue"
const dateFn = () => {
var today = new Date();
//
var year = today.getFullYear();
var month = today.getMonth() + 1; // 01
var day = today.getDate();
//
var dateStr = year + '-' + month + '-' + day;
return dateStr
//
}
const navgo = (url) => {
uni.navigateTo({
url
})
}
//
const objFn = (res, data) => {
for (let key in res) {
data[key] = res[key]
}
}
const animal_detail = reactive({})
const props = defineProps({
id: String,
showImg: Boolean
})
watch(props, (newValue, oldVlaue) => {
if (props?.id) {
animalInfoAPI({
animal_id: Number(props.id)
}).then(res => {
objFn(res.data, animal_detail)
})
}
}, {
//
immediate: true
})
const updateImgFn = () => {
uplodeImg().then(res => {
animal_detail.pic_detail.pic = res.data.image
// img.value = res.data.image
addAnimalPicAPI({
animal_id: Number(props.id),
pic: res.data.image
})
})
}
</script>
<style lang="scss" scoped>
.card {
margin-bottom: 20rpx;
.tit {
display: flex;
justify-content: space-between;
padding-bottom: 20rpx;
border-bottom: 1px solid #EBF1EF;
}
.card-li {
margin-top: 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
}
.bad-info {
display: flex;
// background-color: red;
justify-content: space-between;
align-items: center;
margin: 20rpx 0;
color: #737373;
width: 693.93rpx;
font-size: 26.29rpx;
.tit-b {
color: red;
}
}
.up-plant-btn {
width: 371.5rpx;
height: 66.59rpx;
color: #00A15E;
margin: 40rpx auto;
border: 1px solid #00A15E;
font-weight: bold;
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
display: flex;
align-items: center;
justify-content: center;
}
</style>

View File

@ -0,0 +1,79 @@
<template>
<view class="card" v-if="userInfo.animal_detail">
<!-- {{userInfo.animal_detail.total_count}} -->
<view class="tit">
<view class="">
农户名称: {{userInfo.name}}
</view>
</view>
<view class="card-li">
<view class="">
种养殖类型: 养殖户
</view>
<view class="">
养殖头数: {{userInfo.animal_detail.total_count}}
</view>
</view>
<view class="card-li">
<view class="">
土地面积:{{userInfo.total_land_area}}
</view>
<view class="">
: {{userInfo.animal_detail.male_count}}
</view>
</view>
<view class="card-li">
<view class="">
养殖种类: {{userInfo.animal_detail.kind[0]}},{{userInfo.animal_detail.kind[1]}}
</view>
<view class="">
: {{userInfo.animal_detail.maternal_count}}
</view>
</view>
<view class="card-li">
<view class="">
具体种类: {{userInfo.animal_detail.breed[0]}}
</view>
</view>
</view>
</template>
<script setup>
import {
reactive,
watch
} from "vue";
import {
userInfoAPI
} from "@/api/plant.js"
const userInfo = reactive({})
const objFn = (res, data) => {
for (let key in res) {
data[key] = res[key]
}
}
userInfoAPI({
user_id: 307
}).then(res => {
objFn(res.data, userInfo)
})
</script>
<style lang="scss" scoped>
.card {
.tit {
display: flex;
justify-content: space-between;
padding-bottom: 20rpx;
border-bottom: 1px solid #EBF1EF;
}
.card-li {
margin-top: 20rpx;
display: flex;
justify-content: space-between;
}
}
</style>

View File

@ -0,0 +1,114 @@
<template>
<view class="card">
<view class="tit">
<view class="">
农户名称: ???
</view>
<view class="">
<!-- {{headData}} -->
溯源码: {{headData.source_code}}
</view>
</view>
<view class="card-li">
<view class="">
种养殖类型: 养殖户
</view>
<view class="">
养殖数量: {{headData.total_num}}
</view>
</view>
<view class="card-li">
<view class="">
土地面积: 20
</view>
<view class="">
草鱼鱼苗: 的划分等级
</view>
</view>
<view class="card-li" v-if="headData.kind">
<view class="">
养殖种类: {{headData.kind[0]}},{{headData.kind[1]}},{{headData.kind[2]}}
</view>
<view class="">
鲫鱼鱼苗: 的划分等级
</view>
</view>
<view class="card-li" v-if="headData.breed">
<view class="">
<!-- {{}} -->
具体种类: {{headData.breed[0]}},{{headData.breed[1]}},{{headData.breed[2]}}
</view>
</view>
<view class="add-btn" v-if="props.showBtn" @click="navgo(`/pages/aquatic/addPond?pond_id=${props.id}`)">
添加水产养殖
</view>
</view>
</template>
<script setup>
import {
ref,
reactive,
watch
} from "vue"
import {
pondInfoAPI,
} from "@/api/aquatic.js"
const props = defineProps({
id: String,
showBtn: Boolean
})
const headData = reactive({})
watch(props, (newValue, oldVlaue) => {
// console.log(newValue, oldVlaue)
if (props?.id) {
pondInfoAPI({
user_id: 307,
pond_id: props.id
}).then(res => {
for (let key in res.data) {
headData[key] = (res.data)[key]
}
})
}
}, {
immediate: true
})
const navgo = (url) => {
uni.navigateTo({
url
})
}
</script>
<style lang="scss" scoped>
.card {
.tit {
display: flex;
justify-content: space-between;
padding-bottom: 20rpx;
border-bottom: 1px solid #EBF1EF;
}
.card-li {
margin-top: 20rpx;
display: flex;
justify-content: space-between;
}
}
.add-btn {
margin: 0 auto;
width: 220.79rpx;
height: 57.83rpx;
color: #00A15E;
border: 1px solid #00A15E;
border-radius: 50rpx;
display: flex;
justify-content: center;
line-height: 57rpx;
font-size: 26rpx;
}
</style>

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="content"> <view class="content">
<view class="card"> <!-- <view class="card">
<view class="tit"> <view class="tit">
<view class=""> <view class="">
农户名称: {{userInfo.name}} 农户名称: {{userInfo.name}}
@ -36,7 +36,8 @@
</view> </view>
</view> </view>
</view> </view> -->
<farmersCard></farmersCard>
<view class="circumstance"> <view class="circumstance">
<view class="card-tit"> <view class="card-tit">
<view class=""> <view class="">
@ -90,7 +91,7 @@
<view class=""> <view class="">
{{index}} {{index}}
</view> </view>
<view class="updata-btn" @click="navgo('/pages/growRecord/index')"> <view class="updata-btn" @click="navgo('/pages/growRecord/index?type=2')">
更新{{index.slice(0,-2)}} 更新{{index.slice(0,-2)}}
</view> </view>
</view> </view>
@ -158,6 +159,7 @@
reactive reactive
} from "vue" } from "vue"
import myTable from "@/components/myTable/index.vue" import myTable from "@/components/myTable/index.vue"
import farmersCard from "@/components/poultry/farmersCard.vue"
import { import {
onLoad onLoad
} from "@dcloudio/uni-app" } from "@dcloudio/uni-app"

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="content"> <view class="content">
<view class="card"> <!-- <view class="card">
<view class="tit"> <view class="tit">
<view class=""> <view class="">
农户名称: {{userInfo.name}} 农户名称: {{userInfo.name}}
@ -36,7 +36,8 @@
</view> </view>
</view> </view>
</view> </view> -->
<farmersCard></farmersCard>
<view class="circumstance"> <view class="circumstance">
<view class="card-tit"> <view class="card-tit">
<view class=""> <view class="">
@ -87,11 +88,12 @@
<view class=""> <view class="">
{{index}} {{index}}
</view> </view>
<view class="updata-btn" @click="navgo('/pages/growRecord/index')"> <view class="updata-btn" @click="navgo('/pages/growRecord/index?type=3')">
更新{{index.slice(0,-2)}} 更新{{index.slice(0,-2)}}
</view> </view>
</view> </view>
<myTable :tit='`查看${index.slice(0,-2)}`' :dataList="item.action_record" route='/pages/feedIng/allRecording'> <myTable :tit='`查看${index.slice(0,-2)}`' :dataList="item.action_record"
route='/pages/feedIng/allRecordTable'>>
</myTable> </myTable>
</view> </view>
@ -151,6 +153,7 @@
animalEnvDataAPI, animalEnvDataAPI,
actionsAPI actionsAPI
} from "@/api/animal.js" } from "@/api/animal.js"
import farmersCard from "@/components/animal/farmersCard.vue"
const props = defineProps({ const props = defineProps({
userInfo: Object userInfo: Object
}) })

View File

@ -10,7 +10,10 @@
农户名称: {{userInfo.name}} 农户名称: {{userInfo.name}}
</view> </view>
<view class="card-li"> <view class="card-li">
种养殖类型: 种植户 种养殖类型: 养殖户
</view>
<view class="card-li">
<!-- 养殖种类: {{userInfo.}} -->
</view> </view>
<view class="card-li"> <view class="card-li">
土地面积: {{userInfo.total_land_area}} 土地面积: {{userInfo.total_land_area}}

View File

@ -46,9 +46,16 @@
} }
const objFn = (obj) => { const objFn = (obj) => {
if (typeof(obj) == 'object') {
for (const [key, value] of Object.entries((obj))) {
return (`${key}: ${value}`);
}
} else {
for (const [key, value] of Object.entries(JSON.parse(obj))) { for (const [key, value] of Object.entries(JSON.parse(obj))) {
return (`${key}: ${value}`); return (`${key}: ${value}`);
} }
}
} }

View File

@ -74,7 +74,6 @@
}) })
} }
}, { }, {
//
immediate: true immediate: true
}) })
</script> </script>

View File

@ -0,0 +1,185 @@
<template>
<view class="" v-if="props.showImg">
<view class="" v-if="animal_detail?.pic_detail?.pic">
<imgCard :imgUrl='animal_detail.pic_detail.pic'></imgCard>
</view>
<view class="bad-info">
<view class="" style="display: flex;align-items: center;">
<u--image src="/static/img/sj.png')" style="margin: 0 5rpx;" width="28.04rpx"
height="28.04rpx"></u--image>
<text>刷新时间:{{dateFn()}}</text>
</view>
<view style="display: flex;" @click="navgo(`/pages/feedIng/histroyFeed?id=${props.id}`)">
查看历史条件 <u--image src="/static/img/CKGD.png" style="margin-left: 5rpx;" width="31.54rpx"
height="31.54rpx"></u--image>
</view>
</view>
<view class="up-plant-btn" @click="updateImgFn">
上传新的种植情况
</view>
</view>
<view class="card">
<view class="tit">
<view class="">
溯源码: {{animal_detail.code}}
</view>
</view>
<view class="card-li">
<view class="">
养殖品种: {{animal_detail.kind}}
</view>
<view class="">
年龄: {{animal_detail.age}}
</view>
</view>
<view class="card-li">
<view class="">
养殖类型: {{animal_detail.breed}}
</view>
<view class="">
体重:{{animal_detail.weight}}
</view>
</view>
</view>
<view class="card">
<view class="card-li">
<view class="" style="display: flex;align-items: center;">
<u--image src="/static/img/GG.png" style="margin: 0 21rpx;" width="80rpx" height="80rpx"></u--image>
当前养殖状态
</view>
<view class="" style="color: #00A15E;" v-if='animal_detail.status==1'>
健康
</view>
<view class="" style="color: #FFD736;" v-if='animal_detail.status==2'>
怀孕中
</view>
<view class="" style="color: #3274F9;" v-if='animal_detail.status==4'>
可出栏
</view>
<view class="" style="color: #F84221;" v-if='animal_detail.status==3'>
生病隔离中
</view>
</view>
</view>
</template>
<script setup>
import imgCard from "@/components/imgCard.vue"
import uplodeImg from "@/utils/uplodeImg.js"
import {
animalInfoAPI,
addAnimalPicAPI
} from "@/api/chick.js"
import {
ref,
reactive,
watch
} from "vue"
const dateFn = () => {
var today = new Date();
//
var year = today.getFullYear();
var month = today.getMonth() + 1; // 01
var day = today.getDate();
//
var dateStr = year + '-' + month + '-' + day;
return dateStr
//
}
const navgo = (url) => {
uni.navigateTo({
url
})
}
//
const objFn = (res, data) => {
for (let key in res) {
data[key] = res[key]
}
}
const animal_detail = reactive({})
const props = defineProps({
id: String,
showImg: Boolean
})
watch(props, (newValue, oldVlaue) => {
console.log("dfhsdfgsdjk")
if (props?.id) {
animalInfoAPI({
poultry_id: Number(props.id)
}).then(res => {
objFn(res.data, animal_detail)
})
}
}, {
//
immediate: true
})
const updateImgFn = () => {
uplodeImg().then(res => {
animal_detail.pic_detail.pic = res.data.image
// img.value = res.data.image
addAnimalPicAPI({
poultry_id: Number(props.id),
pic: res.data.image
})
})
}
</script>
<style lang="scss" scoped>
.card {
margin-bottom: 20rpx;
.tit {
display: flex;
justify-content: space-between;
padding-bottom: 20rpx;
border-bottom: 1px solid #EBF1EF;
}
.card-li {
margin-top: 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
}
.bad-info {
display: flex;
// background-color: red;
justify-content: space-between;
align-items: center;
margin: 20rpx 0;
color: #737373;
width: 693.93rpx;
font-size: 26.29rpx;
.tit-b {
color: red;
}
}
.up-plant-btn {
width: 371.5rpx;
height: 66.59rpx;
color: #00A15E;
margin: 40rpx auto;
border: 1px solid #00A15E;
font-weight: bold;
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
display: flex;
align-items: center;
justify-content: center;
}
</style>

View File

@ -0,0 +1,80 @@
<template>
<!-- {{userInfo.poultry_detail}} -->
<view class="card" v-if="userInfo.poultry_detail">
<!-- {{userInfo.animal_detail.total_count}} -->
<view class="tit">
<view class="">
农户名称: {{userInfo.name}}
</view>
</view>
<view class="card-li">
<view class="">
种养殖类型: 养殖户
</view>
<view class="">
养殖头数: {{userInfo.poultry_detail.total_count}}
</view>
</view>
<view class="card-li">
<view class="">
土地面积:{{userInfo.total_land_area}}
</view>
<view class="">
: {{userInfo.poultry_detail.male_count}}
</view>
</view>
<view class="card-li">
<view class="">
养殖种类: {{userInfo.poultry_detail.kind[0]}},{{userInfo.poultry_detail.kind[1]}}
</view>
<view class="">
: {{userInfo.poultry_detail.maternal_count}}
</view>
</view>
<view class="card-li">
<view class="">
具体种类: {{userInfo.poultry_detail.breed[0]}}
</view>
</view>
</view>
</template>
<script setup>
import {
reactive,
watch
} from "vue";
import {
userInfoAPI
} from "@/api/plant.js"
const userInfo = reactive({})
const objFn = (res, data) => {
for (let key in res) {
data[key] = res[key]
}
}
userInfoAPI({
user_id: 307
}).then(res => {
objFn(res.data, userInfo)
})
</script>
<style lang="scss" scoped>
.card {
.tit {
display: flex;
justify-content: space-between;
padding-bottom: 20rpx;
border-bottom: 1px solid #EBF1EF;
}
.card-li {
margin-top: 20rpx;
display: flex;
justify-content: space-between;
}
}
</style>

View File

@ -1,11 +1,11 @@
{ {
"hash": "a1d62a80", "hash": "25035236",
"browserHash": "90e08141", "browserHash": "1466e902",
"optimized": { "optimized": {
"uview-plus": { "uview-plus": {
"src": "../../uview-plus/index.js", "src": "../../uview-plus/index.js",
"file": "uview-plus.js", "file": "uview-plus.js",
"fileHash": "b7892bb7", "fileHash": "a0f19e5d",
"needsInterop": false "needsInterop": false
} }
}, },

View File

@ -113,6 +113,14 @@
"navigationBarBackgroundColor": "#F4F4F4", "navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
} }
}, {
"path": "pages/feedIng/allRecordTable",
"style": {
"navigationBarTitleText": "记录列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F4F4",
"navigationBarTextStyle": "black"
}
}, { }, {
"path": "pages/feedIng/allFeed", "path": "pages/feedIng/allFeed",
"style": { "style": {

View File

@ -14,62 +14,13 @@
<view class="up-plant-btn" @click="updateImgFn"> <view class="up-plant-btn" @click="updateImgFn">
上传新的种植情况 上传新的种植情况
</view> </view>
<view class="card"> <pondCard :id='pond_id' :showBtn="true"></pondCard>
<view class="tit">
<view class="">
农户名称: 1号土地
</view>
<view class="">
溯源码: 1号土地
</view>
</view>
<view class="card-li">
<view class="">
农户名称: 土豆
</view>
<view class="">
溯源码: 的划分等级
</view>
</view>
<view class="card-li">
<view class="">
种养殖类别: 20
</view>
<view class="">
养殖数量: 的划分等级
</view>
</view>
<view class="card-li">
<view class="">
土地面积: 20
</view>
<view class="">
草鱼鱼苗: 的划分等级
</view>
</view>
<view class="card-li">
<view class="">
养殖种类: 20
</view>
<view class="">
鲫鱼鱼苗: 的划分等级
</view>
</view>
<view class="card-li">
<view class="">
具体种类: 20
</view>
</view>
<view class="add-btn" @click="navgo(`/pages/aquatic/addPond?pond_id=${pond_id}`)">
添加水产养殖
</view>
</view>
<view class="circumstance" v-for="(item,index) in actionList" :key="index"> <view class="circumstance" v-for="(item,index) in actionList" :key="index">
<view class="card-tit"> <view class="card-tit">
<view class=""> <view class="">
{{index}} {{index}}
</view> </view>
<view class="updata-btn" @click="navgo('/pages/growRecord/index')"> <view class="updata-btn" @click="navgo('/pages/growRecord/index?type=4')">
更新{{index.slice(0,-2)}} 更新{{index.slice(0,-2)}}
</view> </view>
</view> </view>
@ -157,6 +108,7 @@
} from "@/api/aquatic.js" } from "@/api/aquatic.js"
import myTable from "@/components/myTable/index.vue" import myTable from "@/components/myTable/index.vue"
import imgCard from "@/components/imgCard.vue" import imgCard from "@/components/imgCard.vue"
import pondCard from "@/components/aquatic/pondCard.vue"
import { import {
onLoad onLoad
} from "@dcloudio/uni-app" } from "@dcloudio/uni-app"

View File

@ -44,8 +44,8 @@
</view> </view>
</view> --> </view> -->
<landInfo :pond_id='pond_id'></landInfo> <!-- <landInfo :pond_id='pond_id'></landInfo> -->
<pondCard :id='pond_id'></pondCard>
<!-- <view class="status"> <!-- <view class="status">
<view class="" style="margin-bottom: 30rpx;"> <view class="" style="margin-bottom: 30rpx;">
今日种植状态 今日种植状态
@ -77,8 +77,9 @@
</template> </template>
<script setup> <script setup>
import landInfo from "@/components/plant/landInfo.vue" // import landInfo from "@/components/plant/landInfo.vue"
import imgCard from "@/components/imgCard.vue" import imgCard from "@/components/imgCard.vue"
import pondCard from "@/components/aquatic/pondCard.vue"
import { import {
fishPicListAPI, fishPicListAPI,
addFishPicAPI addFishPicAPI

View File

@ -22,17 +22,18 @@
<landInfo :land_id='landDeatil.land_id'></landInfo> <landInfo :land_id='landDeatil.land_id'></landInfo>
<!-- 生长记录 --> <!-- 生长记录 -->
<!-- <view class="grow-record-tit"> <view class="grow-record-tit">
<view class=""> <view class="">
生长记录操作 生长记录操作
</view> </view>
<view class="updata-btn" @tap="navgo(`/pages/growRecord/index?land_id=${landDeatil.land_id}`)"> <view class="updata-btn" @tap="navgo(`/pages/growRecord/index?land_id=${landDeatil.land_id}&type=1`)">
更新生长记录 更新生长记录
</view> </view>
</view> </view>
<myTable tit='查看历史记录' :dataList="tableDate" route='/pages/records/index'></myTable> --> <myTable tit='查看历史记录' :dataList="tableDate" :route='`/pages/records/index?land_id=${landDeatil.land_id}`'>
</myTable>
<view class="circumstance" v-for="(item,index) in actionList" :key="index"> <!-- <view class="circumstance" v-for="(item,index) in tableDate" :key="index">
<view class="card-tit"> <view class="card-tit">
<view class=""> <view class="">
{{index}} {{index}}
@ -43,7 +44,7 @@
</view> </view>
<myTable :tit='`查看${index.slice(0,-2)}`' :dataList="item.action_record" route='/pages/feedIng/allRecording'> <myTable :tit='`查看${index.slice(0,-2)}`' :dataList="item.action_record" route='/pages/feedIng/allRecording'>
</myTable> </myTable>
</view> </view> -->
<view class="data"> <view class="data">
<view class="tit"> <view class="tit">
@ -293,14 +294,13 @@
} }
} }
const actionList = reactive({}) // actionsAPI({
actionsAPI({ // type: 1
type: 1 // }).then(res => {
}).then(res => { // for (let key in res.data) {
for (let key in res.data) { // actionList[key] = (res.data)[key]
actionList[key] = (res.data)[key] // }
} // })
})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="content"> <view class="content">
<imgCard></imgCard> <!-- <imgCard></imgCard>
<view class="bad-info"> <view class="bad-info">
<view class="" style="display: flex;align-items: center;"> <view class="" style="display: flex;align-items: center;">
@ -13,10 +13,9 @@
</view> </view>
</view> </view>
<view class="up-plant-btn" @click="updateImgFn"> <view class="up-plant-btn" @click="updateImgFn">
上传新的种植情况 上传新的种植情况
</view> </view> -->
<view class="card"> <!-- <view class="card">
<view class="tit"> <view class="tit">
<view class=""> <view class="">
编号: 52656 编号: 52656
@ -41,9 +40,9 @@
体重: 45kg 体重: 45kg
</view> </view>
</view> </view>
</view> </view> -->
<view class="card"> <!-- <view class="card">
<view class="card-li"> <view class="card-li">
<view class="" style="display: flex;align-items: center;"> <view class="" style="display: flex;align-items: center;">
<u--image src="/static/img/GG.png" style="margin: 0 21rpx;" width="80rpx" height="80rpx"></u--image> <u--image src="/static/img/GG.png" style="margin: 0 21rpx;" width="80rpx" height="80rpx"></u--image>
@ -54,7 +53,8 @@
</view> </view>
</view> </view>
</view> </view> -->
<detailCard :id="animal_id" :showImg='true'></detailCard>
<view class=""> <view class="">
<view class="" style="margin-bottom: 20rpx;"> <view class="" style="margin-bottom: 20rpx;">
饲养记录 饲养记录
@ -67,6 +67,7 @@
<script setup> <script setup>
import myTable from "@/components/myTable/index.vue" import myTable from "@/components/myTable/index.vue"
import imgCard from "@/components/imgCard.vue" import imgCard from "@/components/imgCard.vue"
import detailCard from "@/components/animal/detailCard.vue"
import { import {
ref ref
} from "vue" } from "vue"

View File

@ -0,0 +1,84 @@
<template>
<view class="content">
<farmersCard></farmersCard>
<view class="circumstance" v-for="(item,index) in actionList" :key="index">
<view class="card-tit">
<view class="">
{{index}}
</view>
<view class="updata-btn" @click="navgo('/pages/growRecord/index')">
更新{{index.slice(0,-2)}}
</view>
</view>
<myTable :dataList="item.action_record">>
</myTable>
</view>
</view>
</template>
<script setup>
import farmersCard from "@/components/animal/farmersCard.vue"
import {
ref,
reactive
} from "vue"
import myTable from "@/components/myTable/index.vue"
import {
actionsAPI
} from "@/api/animal.js"
const actionList = reactive({})
actionsAPI({
type: 3
}).then(res => {
for (let key in res.data) {
actionList[key] = (res.data)[key]
}
})
const navgo = (url) => {
uni.navigateTo({
url
})
}
</script>
<style lang="scss" scoped>
.circumstance {
width: 693.93rpx;
margin: 0 auto;
margin-bottom: 43rpx;
.card-tit {
display: flex;
justify-content: space-between;
margin-bottom: 28rpx;
}
.updata-btn {
font-size: 26.29rpx;
// width: 192.76rpx;
padding: 0 30rpx;
height: 57.83rpx;
border: 1px solid #00A15E;
color: #00A15E;
display: flex;
justify-content: center;
align-items: center;
border-radius: 31.54rpx 31.54rpx 31.54rpx 31.54rpx;
}
.check {
font-size: 29.79rpx;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
}
.tab {
height: 500rpx;
background-color: red;
}
}
</style>

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="content"> <view class="content">
<view class="card"> <!-- <view class="card">
<view class="tit"> <view class="tit">
<view class=""> <view class="">
农户名称: 1号土地 农户名称: 1号土地
@ -38,8 +38,8 @@
幼崽: 的划分等级 幼崽: 的划分等级
</view> </view>
</view> </view>
</view> </view> -->
<detailCard :id='id'></detailCard>
<view class="" style="margin-bottom: 20rpx;"> <view class="" style="margin-bottom: 20rpx;">
饲养记录 饲养记录
</view> </view>
@ -50,6 +50,17 @@
<script setup> <script setup>
import myTable from "@/components/myTable/index.vue" import myTable from "@/components/myTable/index.vue"
import {
onLoad
} from "@dcloudio/uni-app"
import detailCard from "@/components/animal/detailCard.vue"
import {
ref
} from "vue"
const id = ref(0)
onLoad((option) => {
id.value = option.id
})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="content" @click.capture="selectAct=false"> <view class="content" @click.capture="selectAct=false">
<view class="card"> <!-- <view class="card">
<view class="tit"> <view class="tit">
<view class=""> <view class="">
农户名称: 1号土地 农户名称: 1号土地
@ -38,8 +38,8 @@
幼崽: 的划分等级 幼崽: 的划分等级
</view> </view>
</view> </view>
</view> </view> -->
<farmersCard></farmersCard>
<!-- <view class="serch"> <!-- <view class="serch">
<u-search bgColor='white' height='63.08rpx' :show-action="false" actionText="搜索" <u-search bgColor='white' height='63.08rpx' :show-action="false" actionText="搜索"
:animation="true"></u-search> :animation="true"></u-search>
@ -106,7 +106,8 @@
更新{{index.slice(0,-2)}} 更新{{index.slice(0,-2)}}
</view> </view>
</view> </view>
<myTable :tit='`查看${index.slice(0,-2)}`' :dataList="item.action_record" route='/pages/feedIng/allRecording'> <myTable :tit='`查看${index.slice(0,-2)}`' :dataList="item.action_record"
:route='`/pages/feedIng/allRecording?id=${animal_id}`'>
</myTable> </myTable>
</view> </view>
<view class="ripe-btn" @tap="outBar"> <view class="ripe-btn" @tap="outBar">
@ -117,6 +118,7 @@
</template> </template>
<script setup> <script setup>
import farmersCard from "@/components/animal/farmersCard.vue"
import imgCard from "@/components/imgCard.vue" import imgCard from "@/components/imgCard.vue"
import myTable from "@/components/myTable/index.vue" import myTable from "@/components/myTable/index.vue"
import { import {
@ -128,7 +130,10 @@
} from "vue" } from "vue"
import { import {
animalInfoAPI, animalInfoAPI,
animalStatusAPI animalStatusAPI,
animalChangeListAPI,
animalSellAPI
} from "@/api/animal.js" } from "@/api/animal.js"
import { import {
actionsAPI actionsAPI
@ -136,6 +141,7 @@
const selectList = reactive([ const selectList = reactive([
"健康", "怀孕中", "生病隔离中", "可出栏" "健康", "怀孕中", "生病隔离中", "可出栏"
]) ])
const actionList = reactive({})
const value = ref("") const value = ref("")
const selectAct = ref(false) const selectAct = ref(false)
const selectFoucsFn = (e) => { const selectFoucsFn = (e) => {
@ -162,6 +168,15 @@
value.value = selectList[baseData.animal_status - 1] value.value = selectList[baseData.animal_status - 1]
indexs.value = baseData.animal_status - 1 indexs.value = baseData.animal_status - 1
}) })
animalChangeListAPI({
animal_id: animal_id.value
}).then(res => {
console.log(res.data)
return
for (let key in res.data) {
actionList[key] = (res.data)[key]
}
})
}) })
const navgo = (url) => { const navgo = (url) => {
uni.navigateTo({ uni.navigateTo({
@ -184,8 +199,7 @@
}) })
} }
const outBar = () => { const outBar = () => {
animalStatusAPI({ animalSellAPI({
status: 4,
animal_id: animal_id.value, animal_id: animal_id.value,
}).then(res => { }).then(res => {
uni.showToast({ uni.showToast({
@ -199,14 +213,13 @@
}, 2000) }, 2000)
}) })
} }
const actionList = reactive({}) // animalChangeListAPI({
actionsAPI({ // animal_id: animal_id
type: 3 // }).then(res => {
}).then(res => { // for (let key in res.data) {
for (let key in res.data) { // actionList[key] = (res.data)[key]
actionList[key] = (res.data)[key] // }
} // })
})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="content"> <view class="content">
<view class="card"> <!-- <view class="card">
<view class="tit"> <view class="tit">
<view class=""> <view class="">
农户名称: 1号土地 农户名称: 1号土地
@ -38,8 +38,9 @@
幼崽: 的划分等级 幼崽: 的划分等级
</view> </view>
</view> </view>
</view>
</view> -->
<farmersCard></farmersCard>
<view class="serch"> <view class="serch">
<u-search bgColor='white' v-model="query" height='63.08rpx' :show-action="false" actionText="搜索" <u-search bgColor='white' v-model="query" height='63.08rpx' :show-action="false" actionText="搜索"
:animation="true"></u-search> :animation="true"></u-search>
@ -89,6 +90,7 @@
import { import {
animalListAPI, animalListAPI,
} from "@/api/animal.js" } from "@/api/animal.js"
import farmersCard from "@/components/animal/farmersCard.vue"
import { import {
reactive, reactive,
ref ref

View File

@ -1,28 +1,26 @@
<template> <template>
<view class="content"> <view class="content">
<view class="card"> <!-- <view class="card">
<view class="tit"> <view class="tit">
<view class=""> <view class="">
编号: 52656 溯源码: {{animal_detail.animal_code}}
</view>
<view class="">
溯源码: 52656
</view> </view>
</view> </view>
<view class="card-li"> <view class="card-li">
<view class=""> <view class="">
养殖品种: 土豆 养殖品种: {{animal_detail.animal_kind}}
</view> </view>
<view class=""> <view class="">
年龄: 的划分等级 年龄: {{animal_detail.animal_age}}
</view> </view>
</view> </view>
<view class="card-li"> <view class="card-li">
<view class=""> <view class="">
养殖类型: 20 养殖类型: {{animal_detail.animal_breed}}
</view> </view>
<view class=""> <view class="">
体重: 45kg 体重:{{animal_detail.animal_weight}}
</view> </view>
</view> </view>
</view> </view>
@ -33,13 +31,22 @@
<u--image src="/static/img/GG.png" style="margin: 0 21rpx;" width="80rpx" height="80rpx"></u--image> <u--image src="/static/img/GG.png" style="margin: 0 21rpx;" width="80rpx" height="80rpx"></u--image>
当前养殖状态 当前养殖状态
</view> </view>
<view class="" style="color: green;"> <view class="" style="color: #00A15E;" v-if='animal_detail.animal_status==1'>
健康 健康
</view> </view>
<view class="" style="color: #FFD736;" v-if='animal_detail.animal_status==2'>
怀孕中
</view>
<view class="" style="color: #3274F9;" v-if='animal_detail.animal_status==4'>
可出栏
</view>
<view class="" style="color: #F84221;" v-if='animal_detail.animal_status==3'>
生病隔离中
</view>
</view> </view>
</view> </view> -->
<detailCard :id='animal_id'></detailCard>
<view class=""> <view class="">
<view class=""> <view class="">
养殖情况 养殖情况
@ -60,7 +67,8 @@
import uplodeImg from "@/utils/uplodeImg.js" import uplodeImg from "@/utils/uplodeImg.js"
import { import {
animalPicListAPI, animalPicListAPI,
addAnimalPicAPI addAnimalPicAPI,
animalInfoAPI
} from "@/api/animal.js" } from "@/api/animal.js"
import { import {
onLoad onLoad
@ -69,6 +77,7 @@
reactive, reactive,
ref ref
} from "vue"; } from "vue";
import detailCard from "@/components/animal/detailCard.vue"
const img = ref("") const img = ref("")
const updateImgFn = () => { const updateImgFn = () => {
uplodeImg().then(res => { uplodeImg().then(res => {

View File

@ -1,4 +1,5 @@
<template> <template>
<view :class="{popupShow:showPop}">
<view class="cont"> <view class="cont">
<!-- <view class="card"> <!-- <view class="card">
@ -35,15 +36,18 @@
</view> --> </view> -->
<landInfo :land_id='land_id'></landInfo> <landInfo :land_id='land_id'></landInfo>
<view class="operate"> <view class="operate" v-for="(item,index) in actionData" :key="index">
<view class="tit"> <view class="tit">
操作选择 {{index}}
</view> </view>
<view class="card"> <view class="card">
<view class="operate-li" @click="showPop=true"> <view class="operate-li" style="margin: 20rpx 0;margin-right: 20rpx;" @click="showPopFn(items.id)"
胶水 v-for="items,indexs in item.actions" :key='indexs'>
{{items.name}}
</view> </view>
<view class="operate-li" @tap="navgo('')">
<!-- <view class="operate-li" @tap="navgo('')">
喂食 喂食
</view> </view>
<view class="operate-li" @tap="navgo('/pages/feedIng/vaccineInfo')"> <view class="operate-li" @tap="navgo('/pages/feedIng/vaccineInfo')">
@ -57,7 +61,10 @@
</view> </view>
<view class="operate-li"> <view class="operate-li">
胶水 胶水
</view> -->
</view> </view>
<view class="">
</view> </view>
</view> </view>
<view class="fertilize"> <view class="fertilize">
@ -102,35 +109,106 @@
<!-- 组件 --> <!-- 组件 -->
<view class=""> <view class="">
<u-popup :show="showPop" :round="10" :closeable='true' @close="showPop=false" @open="showPop=true"> <u-popup :show="showPop" :round="10" :closeable='true' @close="showPop=false" @open="showPop=true">
<view class="pop-content"> <scroll-view scroll-y style="max-height: 90vh;">
<view class="pop-tit"> <!-- 滚动内容 -->
添加肥料相关信息 <view class="pop-content" v-for="item,index in popList" :key='index'>
</view> <!-- 文本框 -->
<view class="" v-if="item.type==1">
<view class=""> <view class="">
肥料类型 {{item.title}}
</view> </view>
<view class="pop-li"> <view class="pop-li">
<up-input placeholder="请输入品种" border="surround" v-model="formData.value" <up-input placeholder="请输入" border="surround" v-model="formData.value"
@change="change"></up-input> @change="change"></up-input>
</view> </view>
</view>
<!-- 下拉框 -->
<view class="" v-if="item.type==4">
<view class=""> <view class="">
兑水浓度 {{item.title}}
</view> </view>
<view class="pop-li"> <view class="pop-li">
<up-input placeholder="请输入品种" border="surround" v-model="formData.value" <up-input readonly placeholder="点击选择" border="surround" v-model="formData.value"
@change="change"></up-input> @click="showPicker=true"></up-input>
</view>
</view>
<!-- 上传图片 -->
<view class="" v-if="item.type==2">
<view class="">
{{item.title}}
</view>
<view class="pop-li">
<view class="code-img">
<view class="carime-icon" @click="updateImgFn">
<u--image src="/static/img/DJSC.png" width="91.12rpx"
height="91.12rpx"></u--image>
<view class="">
点击上传图片
</view>
</view>
</view>
</view>
</view>
<!-- 搜索框 -->
<view class="" v-if="item.type==3">
<view class="">
{{item.title}}
</view>
<view class="pop-li">
<up-input placeholder="请输入品种" border="surround" v-model="formData.value"></up-input>
</view>
<view style="margin-bottom: 20rpx;" v-for="item in [1]" :key="item">
<u-swipe-action>
<u-swipe-action-item :options="options1"
style="border-radius: 20rpx;border: 1px solid #C7C6CD;">
<view class="" style="padding: 20rpx 30rpx;">
<view class="swipe-action-tit">
<view class="">
编号: 123456
</view>
<view class="" style="color: #00A15E;" v-if="true">
健康
</view>
<view class="" style="color: #FFD736;" v-if="0">
怀孕中
</view>
<view class="" style="color: #3274F9;" v-if="0">
可出栏
</view>
</view>
<view class="swipe-action-li">
<view class="">
养殖品种:黑山猪
</view>
<view class="">
年龄: 5
</view>
<view class="">
体重: 150kg
</view>
</view>
</view>
</u-swipe-action-item>
</u-swipe-action>
</view>
</view>
</view> </view>
<view class="pop-confirm" @tap="confirm"> <view class="pop-confirm" @tap="confirm">
确认 确认
</view> </view>
</view> </scroll-view>
</u-popup> </u-popup>
</view> </view>
<!-- 组件 --> <!-- 组件 -->
<u-picker :show="showPicker" :columns="columns" @confirm="confirmFn"></u-picker>
<u-modal :show="showModal" :showCancelButton='true' :closeOnClickOverlay="true" @close="showModal=false" <u-modal :show="showModal" :showCancelButton='true' :closeOnClickOverlay="true" @close="showModal=false"
content='确认删除吗?' @confirm="delFn" @cancel="showModal=false"></u-modal> content='确认删除吗?' @confirm="delFn" @cancel="showModal=false"></u-modal>
</view>
</template> </template>
<script setup> <script setup>
@ -140,14 +218,35 @@
} from "vue" } from "vue"
import landInfo from "@/components/plant/landInfo.vue" import landInfo from "@/components/plant/landInfo.vue"
import { import {
landCropRecordInfoAPI actionsListAPI,
actionsDetailAPI
} from "@/api/plant.js" } from "@/api/plant.js"
import { import {
onLoad onLoad
} from "@dcloudio/uni-app" } from "@dcloudio/uni-app"
const options1 = reactive([{
text: '删除'
}])
const showPicker = ref(false)
const columns = reactive([
['中国', '美国', '日本']
], )
const confirmFn = (e) => {
showPicker.value = false
console.log(e.value)
}
const land_id = ref(0) const land_id = ref(0)
const type = ref(0)
const actionData = reactive({})
onLoad((options) => { onLoad((options) => {
land_id.value = options.land_id land_id.value = options.land_id
actionsListAPI({
type: options.type
}).then(res => {
for (let key in res.data) {
actionData[key] = res.data[key]
}
})
}) })
const showPop = ref(false) const showPop = ref(false)
const formData = reactive({ const formData = reactive({
@ -174,6 +273,24 @@
duration: 1000 duration: 1000
}) })
} }
const popList = reactive([])
const showPopFn = (id) => {
popList.splice(0, popList.length)
showPop.value = true
columns[0].splice(0, columns[0].length)
actionsDetailAPI({
action_id: id
}).then(res => {
res.data.forEach(item => {
popList.push(item)
if (item.type == 4) {
columns[0] = Array.from(item.options)
console.log(columns[0])
}
})
// console.log(popList)
})
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -186,7 +303,6 @@
.card { .card {
.tit { .tit {
display: flex; display: flex;
justify-content: space-between;
padding-bottom: 20rpx; padding-bottom: 20rpx;
border-bottom: 1px solid #EBF1EF; border-bottom: 1px solid #EBF1EF;
} }
@ -194,7 +310,6 @@
.card-li { .card-li {
margin-top: 20rpx; margin-top: 20rpx;
display: flex; display: flex;
justify-content: space-between;
} }
} }
@ -209,7 +324,6 @@
.card { .card {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between;
.operate-li { .operate-li {
font-size: 29.79rpx; font-size: 29.79rpx;
@ -263,6 +377,7 @@
.pop-content { .pop-content {
padding: 20rpx; padding: 20rpx;
padding-bottom: 0;
.pop-tit { .pop-tit {
margin-bottom: 20rpx; margin-bottom: 20rpx;
@ -271,7 +386,8 @@
.pop-li { .pop-li {
margin: 20rpx 0; margin: 20rpx 0;
margin-bottom: 40rpx; // margin-bottom: 40rpx;
}
} }
.pop-confirm { .pop-confirm {
@ -283,7 +399,43 @@
text-align: center; text-align: center;
line-height: 84rpx; line-height: 84rpx;
margin-top: 70rpx; margin-top: 70rpx;
margin: 0 auto;
}
.code-img {
background-color: #F4F4F4;
height: 196.26rpx;
position: relative;
.carime-icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
align-items: center;
} }
} }
.swipe-action-tit {
display: flex;
justify-content: space-between;
border-bottom: 1px solid #F4F4F4;
padding-bottom: 20rpx;
margin-bottom: 20rpx;
}
.swipe-action-li {
display: flex;
justify-content: space-between;
// align-items: ;
}
.popupShow {
// overflow: hidden;
position: fixed;
left: 30rpx;
}
</style> </style>

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="content"> <view class="content">
<imgCard></imgCard> <!-- <imgCard></imgCard>
<view class="bad-info"> <view class="bad-info">
<view class="" style="display: flex;align-items: center;"> <view class="" style="display: flex;align-items: center;">
@ -54,7 +54,8 @@
</view> </view>
</view> </view>
</view> </view> -->
<detailCard :id='id'></detailCard>
<view class=""> <view class="">
<view class="" style="margin-bottom: 20rpx;"> <view class="" style="margin-bottom: 20rpx;">
饲养记录 饲养记录
@ -67,6 +68,7 @@
<script setup> <script setup>
import myTable from "@/components/myTable/index.vue" import myTable from "@/components/myTable/index.vue"
import imgCard from "@/components/imgCard.vue" import imgCard from "@/components/imgCard.vue"
import detailCard from "@/components/poultry/detailCard.vue"
import { import {
onLoad onLoad
} from "@dcloudio/uni-app" } from "@dcloudio/uni-app"

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="content" @click.capture="selectAct=false"> <view class="content" @click.capture="selectAct=false">
<view class="card"> <!-- <view class="card">
<view class="tit"> <view class="tit">
<view class=""> <view class="">
农户名称: 1号土地 农户名称: 1号土地
@ -38,7 +38,7 @@
幼崽: 的划分等级 幼崽: 的划分等级
</view> </view>
</view> </view>
</view> </view> -->
<!-- <view class="serch"> <!-- <view class="serch">
<u-search bgColor='white' height='63.08rpx' :show-action="false" actionText="搜索" <u-search bgColor='white' height='63.08rpx' :show-action="false" actionText="搜索"
@ -47,6 +47,7 @@
搜索 搜索
</view> </view>
</view> --> </view> -->
<farmersCard></farmersCard>
<view class="title"> <view class="title">
<view class=""> <view class="">
编号: {{baseData.code}} 编号: {{baseData.code}}
@ -117,6 +118,7 @@
</template> </template>
<script setup> <script setup>
import farmersCard from "@/components/poultry/farmersCard.vue"
import imgCard from "@/components/imgCard.vue" import imgCard from "@/components/imgCard.vue"
import myTable from "@/components/myTable/index.vue" import myTable from "@/components/myTable/index.vue"
import { import {

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="content"> <view class="content">
<view class="card"> <!-- <view class="card">
<view class="tit"> <view class="tit">
<view class=""> <view class="">
农户名称: 1号土地 农户名称: 1号土地
@ -38,12 +38,12 @@
幼崽: 的划分等级 幼崽: 的划分等级
</view> </view>
</view> </view>
</view> </view> -->
<farmersCard></farmersCard>
<view class="serch"> <view class="serch">
<u-search bgColor='white' v-model="query" height='63.08rpx' :show-action="false" actionText="搜索" <u-search bgColor='white' v-model="query" @change="queryFn" height='63.08rpx' :show-action="false"
:animation="true"></u-search> actionText="搜索" :animation="true"></u-search>
<view class="serch-btn" @tap="queryFn"> <view class="serch-btn">
搜索 搜索
</view> </view>
</view> </view>
@ -93,6 +93,7 @@
reactive, reactive,
ref ref
} from "vue"; } from "vue";
import farmersCard from "@/components/poultry/farmersCard.vue"
const navgo = (url) => { const navgo = (url) => {
uni.navigateTo({ uni.navigateTo({
url url
@ -110,6 +111,7 @@
}) })
const query = ref("") const query = ref("")
const queryFn = () => { const queryFn = () => {
console.log(444454)
animalList.splice(0, 999999999) animalList.splice(0, 999999999)
animalListAPI({ animalListAPI({
user_id: 307, user_id: 307,

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="content"> <view class="content">
<view class="card"> <!-- <view class="card">
<view class="tit"> <view class="tit">
<view class=""> <view class="">
1号土地 1号土地
@ -42,15 +42,15 @@
</view> </view>
</view> </view> -->
<landInfo :land_id='land_id'></landInfo>
<view class="histroy"> <view class="histroy">
<view class="tit" style="margin-bottom: 40rpx;"> <view class="tit" style="margin-bottom: 40rpx;">
历史操作记录 历史操作记录
</view> </view>
<myTable></myTable> <myTable></myTable>
</view> </view>
<view class="btn" @click="navgo('/pages/growRecord/index')"> <view class="btn" @click="navgo(`/pages/growRecord/index?land_id=${land_id}`)">
记录今日操作 记录今日操作
</view> </view>
</view> </view>
@ -62,11 +62,22 @@
actionsDetailAPI actionsDetailAPI
} from "@/api/plant.js" } from "@/api/plant.js"
import myTable from "@/components/myTable/index.vue" import myTable from "@/components/myTable/index.vue"
import landInfo from "@/components/plant/landInfo.vue"
import {
onLoad
} from "@dcloudio/uni-app"
import {
ref
} from "vue"
// actionsListAPI({ // actionsListAPI({
// type: 1 // type: 1
// }).then(res => { // }).then(res => {
// console.log(res) // console.log(res)
// }) // })
const land_id = ref(0)
onLoad((option) => {
land_id.value = option.land_id
})
actionsDetailAPI({ actionsDetailAPI({
action_id: 2 action_id: 2
}).then(res => { }).then(res => {

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -86,7 +86,7 @@
"uni-app": { "uni-app": {
"control": "uni-v3", "control": "uni-v3",
"vueVersion": "3", "vueVersion": "3",
"compilerVersion": "3.8.12", "compilerVersion": "3.94",
"nvueCompiler": "uni-app", "nvueCompiler": "uni-app",
"renderer": "auto", "renderer": "auto",
"nvue": { "nvue": {

View File

@ -730,6 +730,42 @@ uni-view[data-v-9d58ba7c], uni-scroll-view[data-v-9d58ba7c], uni-swiper-item[dat
/* 垂直间距 */ /* 垂直间距 */
/* 透明度 */ /* 透明度 */
/* 文章场景相关 */ /* 文章场景相关 */
.card .tit[data-v-853f8e7d] {
display: flex;
justify-content: space-between;
padding-bottom: 0.625rem;
border-bottom: 1px solid #EBF1EF;
}
.card .card-li[data-v-853f8e7d] {
margin-top: 0.625rem;
display: flex;
justify-content: space-between;
}
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.circumstance[data-v-91fd8d70] { .circumstance[data-v-91fd8d70] {
width: 21.68531rem; width: 21.68531rem;
margin: 0 auto; margin: 0 auto;
@ -993,6 +1029,42 @@ uni-view[data-v-9d58ba7c], uni-scroll-view[data-v-9d58ba7c], uni-swiper-item[dat
/* 垂直间距 */ /* 垂直间距 */
/* 透明度 */ /* 透明度 */
/* 文章场景相关 */ /* 文章场景相关 */
.card .tit[data-v-7a12289e] {
display: flex;
justify-content: space-between;
padding-bottom: 0.625rem;
border-bottom: 1px solid #EBF1EF;
}
.card .card-li[data-v-7a12289e] {
margin-top: 0.625rem;
display: flex;
justify-content: space-between;
}
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.circumstance[data-v-c4e0dba5] { .circumstance[data-v-c4e0dba5] {
width: 21.68531rem; width: 21.68531rem;
margin: 0 auto; margin: 0 auto;