农户相关接口完善
This commit is contained in:
parent
c007d53926
commit
999a85f35b
|
@ -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)
|
|
@ -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)
|
||||||
// 上传动物图片
|
// 上传动物图片
|
||||||
|
|
|
@ -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; // 月份从0开始,需要加1
|
||||||
|
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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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"
|
||||||
|
|
|
@ -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
|
||||||
})
|
})
|
||||||
|
|
|
@ -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}}亩
|
||||||
|
|
|
@ -46,11 +46,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const objFn = (obj) => {
|
const objFn = (obj) => {
|
||||||
for (const [key, value] of Object.entries(JSON.parse(obj))) {
|
if (typeof(obj) == 'object') {
|
||||||
return (`${key}: ${value}`);
|
for (const [key, value] of Object.entries((obj))) {
|
||||||
|
return (`${key}: ${value}`);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (const [key, value] of Object.entries(JSON.parse(obj))) {
|
||||||
|
return (`${key}: ${value}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,6 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
// 页面加载会先执行一次
|
|
||||||
immediate: true
|
immediate: true
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -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; // 月份从0开始,需要加1
|
||||||
|
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>
|
|
@ -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>
|
|
@ -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
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -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": {
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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>
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
|
@ -1,136 +1,214 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="cont">
|
<view :class="{popupShow:showPop}">
|
||||||
|
<view class="cont">
|
||||||
|
|
||||||
<!-- <view class="card">
|
<!-- <view class="card">
|
||||||
<view class="tit">
|
<view class="tit">
|
||||||
<view class="">
|
|
||||||
1号土地
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
溯源码: 12302
|
|
||||||
</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="">
|
|
||||||
播种时间: 2020.12.01
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
<landInfo :land_id='land_id'></landInfo>
|
|
||||||
|
|
||||||
<view class="operate">
|
|
||||||
<view class="tit">
|
|
||||||
操作选择
|
|
||||||
</view>
|
|
||||||
<view class="card">
|
|
||||||
<view class="operate-li" @click="showPop=true">
|
|
||||||
胶水
|
|
||||||
</view>
|
|
||||||
<view class="operate-li" @tap="navgo('')">
|
|
||||||
喂食
|
|
||||||
</view>
|
|
||||||
<view class="operate-li" @tap="navgo('/pages/feedIng/vaccineInfo')">
|
|
||||||
注射疫苗
|
|
||||||
</view>
|
|
||||||
<view class="operate-li">
|
|
||||||
胶水dassdd
|
|
||||||
</view>
|
|
||||||
<view class="operate-li">
|
|
||||||
胶水
|
|
||||||
</view>
|
|
||||||
<view class="operate-li">
|
|
||||||
胶水
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="fertilize">
|
|
||||||
<view class="card">
|
|
||||||
<view class="fertilize-tit">
|
|
||||||
<view class="">
|
<view class="">
|
||||||
施肥
|
1号土地
|
||||||
</view>
|
</view>
|
||||||
<view class="fertilize-tit-r">
|
<view class="">
|
||||||
<view class="" style="color: red;" @tap="showModal=true">
|
溯源码: 12302
|
||||||
删除
|
</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="">
|
||||||
|
播种时间: 2020.12.01
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<landInfo :land_id='land_id'></landInfo>
|
||||||
|
|
||||||
|
<view class="operate" v-for="(item,index) in actionData" :key="index">
|
||||||
|
|
||||||
|
<view class="tit">
|
||||||
|
{{index}}
|
||||||
|
</view>
|
||||||
|
<view class="card">
|
||||||
|
<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 class="operate-li" @tap="navgo('')">
|
||||||
|
喂食
|
||||||
|
</view>
|
||||||
|
<view class="operate-li" @tap="navgo('/pages/feedIng/vaccineInfo')">
|
||||||
|
注射疫苗
|
||||||
|
</view>
|
||||||
|
<view class="operate-li">
|
||||||
|
胶水dassdd
|
||||||
|
</view>
|
||||||
|
<view class="operate-li">
|
||||||
|
胶水
|
||||||
|
</view>
|
||||||
|
<view class="operate-li">
|
||||||
|
胶水
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="fertilize">
|
||||||
|
<view class="card">
|
||||||
|
<view class="fertilize-tit">
|
||||||
|
<view class="">
|
||||||
|
施肥
|
||||||
</view>
|
</view>
|
||||||
<view style="margin-left: 40rpx;color: #00A15E;">
|
<view class="fertilize-tit-r">
|
||||||
编辑
|
<view class="" style="color: red;" @tap="showModal=true">
|
||||||
|
删除
|
||||||
|
</view>
|
||||||
|
<view style="margin-left: 40rpx;color: #00A15E;">
|
||||||
|
编辑
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="fertilize-li">
|
||||||
|
<view class="">
|
||||||
|
肥料类型: 地生上的飞机
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
肥料品牌: 地生上的
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="fertilize-li">
|
||||||
</view>
|
<view class="">
|
||||||
<view class="fertilize-li">
|
兑水浓度: 地生上的飞机
|
||||||
<view class="">
|
</view>
|
||||||
肥料类型: 地生上的飞机
|
<view class="">
|
||||||
</view>
|
备注: 地生上的
|
||||||
<view class="">
|
</view>
|
||||||
肥料品牌: 地生上的
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="fertilize-li">
|
|
||||||
<view class="">
|
|
||||||
兑水浓度: 地生上的飞机
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
备注: 地生上的
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="ripe-btn">
|
||||||
|
完成今日操作
|
||||||
|
</view>
|
||||||
|
<!-- 组件 -->
|
||||||
|
<view class="">
|
||||||
|
<u-popup :show="showPop" :round="10" :closeable='true' @close="showPop=false" @open="showPop=true">
|
||||||
|
<scroll-view scroll-y style="max-height: 90vh;">
|
||||||
|
<!-- 滚动内容 -->
|
||||||
|
<view class="pop-content" v-for="item,index in popList" :key='index'>
|
||||||
|
<!-- 文本框 -->
|
||||||
|
<view class="" v-if="item.type==1">
|
||||||
|
<view class="">
|
||||||
|
{{item.title}}
|
||||||
|
</view>
|
||||||
|
<view class="pop-li">
|
||||||
|
<up-input placeholder="请输入" border="surround" v-model="formData.value"
|
||||||
|
@change="change"></up-input>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 下拉框 -->
|
||||||
|
<view class="" v-if="item.type==4">
|
||||||
|
<view class="">
|
||||||
|
{{item.title}}
|
||||||
|
</view>
|
||||||
|
<view class="pop-li">
|
||||||
|
<up-input readonly placeholder="点击选择" border="surround" v-model="formData.value"
|
||||||
|
@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 class="pop-confirm" @tap="confirm">
|
||||||
|
确认
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</u-popup>
|
||||||
|
</view>
|
||||||
|
<!-- 组件 -->
|
||||||
|
<u-picker :show="showPicker" :columns="columns" @confirm="confirmFn"></u-picker>
|
||||||
|
<u-modal :show="showModal" :showCancelButton='true' :closeOnClickOverlay="true" @close="showModal=false"
|
||||||
|
content='确认删除吗?' @confirm="delFn" @cancel="showModal=false"></u-modal>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="ripe-btn">
|
|
||||||
完成今日操作
|
|
||||||
</view>
|
|
||||||
<!-- 组件 -->
|
|
||||||
<view class="">
|
|
||||||
<u-popup :show="showPop" :round="10" :closeable='true' @close="showPop=false" @open="showPop=true">
|
|
||||||
<view class="pop-content">
|
|
||||||
<view class="pop-tit">
|
|
||||||
添加肥料相关信息
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
肥料类型
|
|
||||||
</view>
|
|
||||||
<view class="pop-li">
|
|
||||||
<up-input placeholder="请输入品种" border="surround" v-model="formData.value"
|
|
||||||
@change="change"></up-input>
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
兑水浓度
|
|
||||||
</view>
|
|
||||||
<view class="pop-li">
|
|
||||||
<up-input placeholder="请输入品种" border="surround" v-model="formData.value"
|
|
||||||
@change="change"></up-input>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="pop-confirm" @tap="confirm">
|
|
||||||
确认
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
</view>
|
|
||||||
<!-- 组件 -->
|
|
||||||
|
|
||||||
<u-modal :show="showModal" :showCancelButton='true' :closeOnClickOverlay="true" @close="showModal=false"
|
|
||||||
content='确认删除吗?' @confirm="delFn" @cancel="showModal=false"></u-modal>
|
|
||||||
</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,19 +386,56 @@
|
||||||
|
|
||||||
.pop-li {
|
.pop-li {
|
||||||
margin: 20rpx 0;
|
margin: 20rpx 0;
|
||||||
margin-bottom: 40rpx;
|
// margin-bottom: 40rpx;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.pop-confirm {
|
.pop-confirm {
|
||||||
width: 693.93rpx;
|
width: 693.93rpx;
|
||||||
height: 84.11rpx;
|
height: 84.11rpx;
|
||||||
background: linear-gradient(to right, #00A15E, #4CC593);
|
background: linear-gradient(to right, #00A15E, #4CC593);
|
||||||
color: white;
|
color: white;
|
||||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||||
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>
|
|
@ -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"
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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
|
@ -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": {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue