This commit is contained in:
parent
8720abb0b6
commit
539915a6f7
|
@ -16,3 +16,5 @@ export const animalInfoAPI = (data) => syhttp.get('/AnimalBreed/animalInfo', dat
|
|||
export const animalPicListAPI = (data) => syhttp.get('/AnimalBreed/animalPicList', data)
|
||||
// 上传动物图片
|
||||
export const addAnimalPicAPI = (data) => syhttp.post('/AnimalBreed/addAnimalPic', data)
|
||||
// 更新动物饲养状态
|
||||
export const animalStatusAPI = (data) => syhttp.post('/AnimalBreed/animalStatus', data)
|
|
@ -0,0 +1,16 @@
|
|||
import syhttp from "@/utils/syhttp.js";
|
||||
|
||||
/**
|
||||
* 添加水产养殖信息
|
||||
*/
|
||||
export const addFishAPI = (data) => syhttp.post('/FishBreed/addFish', data)
|
||||
// 用户池塘信息
|
||||
export const pondInfoAPI = (data) => syhttp.get('/FishBreed/pondInfo', data)
|
||||
// 上传图片
|
||||
export const addFishPicAPI = (data) => syhttp.post('/FishBreed/addFishPic', data)
|
||||
// 实时环境监测
|
||||
export const pondEnvDataAPI = (data) => syhttp.get('/FishBreed/pondEnvData', data)
|
||||
// 图片列表
|
||||
export const fishPicListAPI = (data) => syhttp.get('/FishBreed/fishPicList', data)
|
||||
//
|
||||
// export const fishPicListAPI = (data) => syhttp.get('/FishBreed/fishPicList', data)
|
|
@ -20,3 +20,9 @@ export const setLandCropRipeAPI = (data) => syhttp.get('/LandPlant/setLandCropRi
|
|||
export const landCropPicListAPI = (data) => syhttp.get('/LandPlant/landCropPicList', data)
|
||||
// 种植操作列表
|
||||
export const actionsListAPI = (data) => syhttp.get('/user/actions', data)
|
||||
// 种植操作详情
|
||||
export const actionsDetailAPI = (data) => syhttp.get('/user/actionsDetail', data)
|
||||
// 种植操作详情列表
|
||||
export const landCropRecordInfoAPI = (data) => syhttp.get('/LandPlant/landCropRecordInfo', data)
|
||||
// 检测数据表
|
||||
export const landEnvDataChartAPI = (data) => syhttp.get('/LandPlant/landEnvDataChart', data)
|
|
@ -6,7 +6,8 @@
|
|||
<u--image :src="props.imgUrl" width="693.93rpx" height=" 394.28rpx" alt=""></u--image>
|
||||
</view>
|
||||
<view class="poisition">
|
||||
{{props.text}}
|
||||
<!-- {{props.text}} -->
|
||||
{{address}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -18,7 +19,16 @@
|
|||
reactive
|
||||
} from 'vue'
|
||||
import uplodeFn from "@/utils/uplodeImg.js"
|
||||
|
||||
import {
|
||||
userInfoAPI
|
||||
} from "@/api/plant.js"
|
||||
const address = ref("")
|
||||
userInfoAPI({
|
||||
user_id: 307
|
||||
}).then(res => {
|
||||
let userInfo = res.data
|
||||
address.value = userInfo.area_name + userInfo.street_name + userInfo.village_name + userInfo.brigade_name
|
||||
})
|
||||
const props = defineProps({
|
||||
imgUrl: String,
|
||||
text: String
|
||||
|
|
|
@ -242,13 +242,13 @@
|
|||
}
|
||||
})
|
||||
const actionList = reactive({})
|
||||
// actionsAPI({
|
||||
// type: 3
|
||||
// }).then(res => {
|
||||
// for (let key in res.data) {
|
||||
// actionList[key] = (res.data)[key]
|
||||
// }
|
||||
// })
|
||||
actionsAPI({
|
||||
type: 2
|
||||
}).then(res => {
|
||||
for (let key in res.data) {
|
||||
actionList[key] = (res.data)[key]
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -83,9 +83,6 @@
|
|||
|
||||
|
||||
<view class="circumstance" v-for="(item,index) in actionList" :key="index">
|
||||
|
||||
<!-- {{item.action_record}} -->
|
||||
|
||||
<view class="card-tit">
|
||||
<view class="">
|
||||
{{index}}
|
||||
|
@ -97,18 +94,6 @@
|
|||
<myTable :tit='`查看${index.slice(0,-2)}`' :dataList="item.action_record" route='/pages/feedIng/allRecording'>
|
||||
</myTable>
|
||||
</view>
|
||||
<!-- <view class="circumstance">
|
||||
<view class="card-tit">
|
||||
<view class="">
|
||||
消毒情况
|
||||
</view>
|
||||
<view class="updata-btn" @click="navgo('/pages/growRecord/index')">
|
||||
更新消毒情况
|
||||
</view>
|
||||
</view>
|
||||
<myTable tit='查看历史消毒记录' route='/pages/feedIng/allRecording'></myTable>
|
||||
</view> -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -247,7 +232,6 @@
|
|||
for (let key in res.data) {
|
||||
actionList[key] = (res.data)[key]
|
||||
}
|
||||
console.log(actionList)
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
@ -5,54 +5,50 @@
|
|||
</view>
|
||||
<view class="" style="height: 30rpx;">
|
||||
</view>
|
||||
|
||||
<view class="card">
|
||||
<view class="card-li">
|
||||
农户名称: {{userInfo.name}}
|
||||
</view>
|
||||
<view class="card-li">
|
||||
种养殖类型: 养殖户
|
||||
种养殖类型: 种植户
|
||||
</view>
|
||||
<view class="card-li">
|
||||
养殖种类: 鱼类
|
||||
土地面积: {{userInfo.total_land_area}}亩
|
||||
</view>
|
||||
<view class="card-li">
|
||||
土地面积: 00
|
||||
</view>
|
||||
<view class="card-li">
|
||||
地址: 对话方式打开就会发生的空间和
|
||||
地址: {{userInfo.area_name}}{{userInfo.street_name}}{{userInfo.village_name}}{{userInfo.brigade_name}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card" v-for="(item,index) in list" :key="index" @click="navgoFn(item.type)">
|
||||
<view class="card" v-for="(item,index) in userInfo.pond_detail" :key="index"
|
||||
@click="navgoFn(item.is_culture,item.pond_id)">
|
||||
<view class="tit card-li">
|
||||
<view class="">
|
||||
池塘1
|
||||
{{item.pond_notes}}
|
||||
</view>
|
||||
<view class="" style="color: #00A15E;" v-if="item.type==1||item.type==2">
|
||||
<view class="" style="color: #00A15E;" v-if="item.is_culture">
|
||||
已养殖
|
||||
</view>
|
||||
<view class="" style="color: #00A15E;" v-if="item.type==0">
|
||||
<view class="" style="color: #00A15E;" v-else>
|
||||
未养殖
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
面积: 10亩
|
||||
面积: {{item.pond_area}}亩
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li tit">
|
||||
<view class="" style="font-weight: normal;">
|
||||
养殖品种: 10亩
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="card-li tit" style="font-weight: normal;">
|
||||
<view class="card-li" v-if="item.is_culture">
|
||||
<view class="">
|
||||
养殖数量: 100kg
|
||||
养殖品种: {{item.pond_area}}亩
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="card-li" v-if="item.is_culture">
|
||||
<view class="">
|
||||
养殖数量: {{item.total_num}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view style="height: 170rpx;">
|
||||
</view>
|
||||
|
@ -62,9 +58,9 @@
|
|||
<view class="add-btn" @click="navgo('/pages/growRecord/index')">
|
||||
批量处理
|
||||
</view>
|
||||
<view class="add-btn add" @click="navgo('/pages/InformationAdd/index')">
|
||||
<!-- <view class="add-btn add" @click="navgo('/pages/InformationAdd/index')">
|
||||
增加种植
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -76,51 +72,20 @@
|
|||
const props = defineProps({
|
||||
userInfo: Object
|
||||
})
|
||||
|
||||
const userInfo = reactive(props.userInfo)
|
||||
const list = reactive([{
|
||||
tit: "土地种植管理",
|
||||
type: 1,
|
||||
}, {
|
||||
tit: "土地种植管理",
|
||||
type: 0,
|
||||
}, {
|
||||
tit: "土地种植管理",
|
||||
type: 2,
|
||||
}, {
|
||||
tit: "土地种植管理",
|
||||
type: 1,
|
||||
}, {
|
||||
tit: "土地种植管理",
|
||||
type: 0,
|
||||
}, {
|
||||
tit: "土地种植管理",
|
||||
type: 2,
|
||||
}, {
|
||||
tit: "土地种植管理"
|
||||
}, {
|
||||
tit: "土地种植管理"
|
||||
}, {
|
||||
tit: "土地种植管理"
|
||||
}, {
|
||||
tit: "土地种植管理"
|
||||
}, ])
|
||||
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
const navgoFn = (type) => {
|
||||
|
||||
if (type == 0) {
|
||||
navgo("/pages/InformationAdd/index")
|
||||
const navgoFn = (is_cropped, pond_id) => {
|
||||
if (!is_cropped) {
|
||||
navgo(`/pages/aquatic/addPond?pond_id=${pond_id}`)
|
||||
} else if (is_cropped) {
|
||||
navgo(`/pages/aquatic/detail?pond_id=${pond_id}`)
|
||||
}
|
||||
if (type == 1) {
|
||||
navgo("/pages/detail/plant")
|
||||
}
|
||||
if (type == 2) {
|
||||
navgo('/pages/detail/plant')
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -148,12 +113,11 @@
|
|||
margin: auto;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx;
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
.card-li {
|
||||
margin-bottom: 17rpx;
|
||||
// margin-bottom: 17rpx;
|
||||
}
|
||||
|
||||
.tit {
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
</view>
|
||||
<view class="" style="height: 30rpx;">
|
||||
</view>
|
||||
|
||||
<view class="card">
|
||||
<view class="card-li">
|
||||
农户名称: {{userInfo.name}}
|
||||
|
@ -80,46 +79,20 @@
|
|||
})
|
||||
|
||||
const userInfo = reactive(props.userInfo)
|
||||
const list = reactive([{
|
||||
tit: "土地种植管理",
|
||||
type: 1,
|
||||
}, {
|
||||
tit: "土地种植管理",
|
||||
type: 0,
|
||||
}, {
|
||||
tit: "土地种植管理",
|
||||
type: 2,
|
||||
}, {
|
||||
tit: "土地种植管理",
|
||||
type: 1,
|
||||
}, {
|
||||
tit: "土地种植管理",
|
||||
type: 0,
|
||||
}, {
|
||||
tit: "土地种植管理",
|
||||
type: 2,
|
||||
}, {
|
||||
tit: "土地种植管理"
|
||||
}, {
|
||||
tit: "土地种植管理"
|
||||
}, {
|
||||
tit: "土地种植管理"
|
||||
}, {
|
||||
tit: "土地种植管理"
|
||||
}, ])
|
||||
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
const navgoFn = (type, id) => {
|
||||
const navgoFn = (is_cropped, land_id) => {
|
||||
|
||||
if (!type) {
|
||||
navgo(`/pages/InformationAdd/index?land_id=${id}`)
|
||||
} else if (type) {
|
||||
navgo(`/pages/detail/plant?land_id=${id}`)
|
||||
if (!is_cropped) {
|
||||
navgo(`/pages/InformationAdd/index?land_id=${land_id}`)
|
||||
} else if (is_cropped) {
|
||||
navgo(`/pages/detail/plant?land_id=${land_id}`)
|
||||
}
|
||||
if (type == 2) {
|
||||
if (is_cropped == 2) {
|
||||
navgo('/pages/detail/plant')
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,16 +24,15 @@
|
|||
种子品牌: {{land.crop_variety}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li" v-if="false">
|
||||
<view class="card-li" v-if="land.crop_yield">
|
||||
<view class="">
|
||||
预计产量: {{land.crop_yield}}亩
|
||||
</view>
|
||||
<view class="">
|
||||
<!-- <view class="">
|
||||
已出售: ???
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
播种时间: {{land.seed_time}}
|
||||
|
@ -49,10 +48,12 @@
|
|||
landInfoAPI,
|
||||
} from "@/api/plant.js"
|
||||
import {
|
||||
reactive
|
||||
reactive,
|
||||
watch
|
||||
} from "vue";
|
||||
const props = defineProps({
|
||||
land_id: String
|
||||
land_id: String,
|
||||
is_cropped: Boolean,
|
||||
})
|
||||
const land = reactive({})
|
||||
const objFn = (res, data) => {
|
||||
|
@ -61,14 +62,21 @@
|
|||
}
|
||||
|
||||
}
|
||||
setTimeout(() => {
|
||||
landInfoAPI({
|
||||
land_id: props.land_id,
|
||||
user_id: 307
|
||||
}).then(res => {
|
||||
objFn(res.data, land)
|
||||
})
|
||||
}, 300)
|
||||
|
||||
watch(props, (newValue, oldVlaue) => {
|
||||
// console.log(newValue, oldVlaue)
|
||||
if (props?.land_id) {
|
||||
landInfoAPI({
|
||||
land_id: props.land_id,
|
||||
user_id: 307
|
||||
}).then(res => {
|
||||
objFn(res.data, land)
|
||||
})
|
||||
}
|
||||
}, {
|
||||
// 页面加载会先执行一次
|
||||
immediate: true
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
33
pages.json
33
pages.json
|
@ -121,6 +121,14 @@
|
|||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/feedIng/SingleDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "单个详情",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/feedIng/allRecording",
|
||||
"style": {
|
||||
|
@ -193,6 +201,14 @@
|
|||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/poultry/SingleDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "单个详情",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/poultry/allRecording",
|
||||
"style": {
|
||||
|
@ -202,6 +218,7 @@
|
|||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "pages/aquatic/addAquatic",
|
||||
"style": {
|
||||
|
@ -210,6 +227,14 @@
|
|||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/aquatic/addPond",
|
||||
"style": {
|
||||
"navigationBarTitleText": "养殖信息",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/aquatic/updateGrow",
|
||||
"style": {
|
||||
|
@ -218,6 +243,14 @@
|
|||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/aquatic/imgList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "生长记录",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#F4F4F4",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/aquatic/detail",
|
||||
"style": {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
|
||||
<view class="card">
|
||||
<!-- <view class="card">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
1号土地
|
||||
|
@ -43,10 +43,10 @@
|
|||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view> -->
|
||||
<landInfo :land_id='land_id'></landInfo>
|
||||
|
||||
|
||||
<view class="status">
|
||||
<!-- <view class="status">
|
||||
<view class="" style="margin-bottom: 30rpx;">
|
||||
今日种植状态
|
||||
</view>
|
||||
|
@ -61,24 +61,27 @@
|
|||
<imgCard text="地址"
|
||||
imgUrl='http://ceshi-suyuan.lihaink.cn/uploads/20231025/3048b734cff7d9adfb00aaf6ab7290e5.jpeg'>
|
||||
</imgCard>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="status">
|
||||
<view class="" style="margin-bottom: 30rpx;">
|
||||
生长情况
|
||||
</view>
|
||||
<imgCard text="地址" :imgUrl="item.pic" v-for="(item,index) in imgList" :key="index"></imgCard>
|
||||
<imgCard text="地址" :imgUrl="item" v-for="(item,index) in imgList" :key="index" @tap='previewImage(index)'>
|
||||
</imgCard>
|
||||
</view>
|
||||
|
||||
<view class="up-btn">
|
||||
<view class="up-btn" @click="updateImgFn">
|
||||
上传新的种植情况
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import landInfo from "@/components/plant/landInfo.vue"
|
||||
import imgCard from "@/components/imgCard.vue"
|
||||
import {
|
||||
landCropPicListAPI
|
||||
landCropPicListAPI,
|
||||
addLandCropPicAPI
|
||||
} from "@/api/plant.js"
|
||||
import {
|
||||
onLoad
|
||||
|
@ -87,18 +90,40 @@
|
|||
ref,
|
||||
reactive
|
||||
} from "vue"
|
||||
import uplodeImg from "@/utils/uplodeImg.js"
|
||||
const imgList = reactive([])
|
||||
const crop_id = ref(0)
|
||||
const land_id = ref(0)
|
||||
onLoad((options) => {
|
||||
crop_id.value = options.crop_id
|
||||
land_id.value = options.land_id
|
||||
landCropPicListAPI({
|
||||
crop_id: options.crop_id
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
res.data.forEach(item => {
|
||||
imgList.push(item)
|
||||
imgList.push(item.pic)
|
||||
})
|
||||
console.log(imgList)
|
||||
})
|
||||
})
|
||||
const updateImgFn = () => {
|
||||
let image = ""
|
||||
uplodeImg().then(res => {
|
||||
image = res.data.image
|
||||
addLandCropPicAPI({
|
||||
crop_id: crop_id.value,
|
||||
pic: image
|
||||
}).then(res2 => {
|
||||
imgList.unshift(image)
|
||||
})
|
||||
})
|
||||
}
|
||||
const previewImage = (index) => {
|
||||
uni.previewImage({
|
||||
urls: imgList,
|
||||
current: index,
|
||||
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -0,0 +1,214 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
|
||||
<view class="card">
|
||||
<view class="card-li">
|
||||
<view class="card-li-tit">
|
||||
养殖种类
|
||||
</view>
|
||||
<view class="">
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="formData.kind"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="card-li-tit">
|
||||
具体品种
|
||||
</view>
|
||||
<view class="">
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="formData.breed"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="card-li-tit">
|
||||
具体数量
|
||||
</view>
|
||||
<view class="">
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="formData.number"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="card-li-tit">
|
||||
鱼苗购入点
|
||||
</view>
|
||||
<view class="">
|
||||
<up-input placeholder="请输入品种" border="surround" v-model="formData.buy_info"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card-li">
|
||||
<view class="card-li-tit">
|
||||
导入凭证
|
||||
</view>
|
||||
<view class="code-img">
|
||||
<view class="" @click="updateImgFn">
|
||||
<view class="" v-if="formData.buy_cert">
|
||||
<u--image :src="formData.buy_cert" width="637.85rpx" height="350.47rpx"></u--image>
|
||||
</view>
|
||||
<view class="carime-icon" v-else>
|
||||
<u--image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u--image>
|
||||
<view class="">
|
||||
点击上传图片
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
<!-- <view class="up-img confim-btn">
|
||||
+上传播种图片
|
||||
</view> -->
|
||||
<view class="confirm">
|
||||
<view class="confirm-btn" style="color: white;background-color: #0AA565;"
|
||||
@click="navgo('/pages/index/index')">
|
||||
完成添加
|
||||
</view>
|
||||
<view class="confirm-btn" style="color: #0AA565;" @click="nextFn">
|
||||
下一个
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="today-btn confim-btn" @tap="sowFn">
|
||||
今日播种
|
||||
</view> -->
|
||||
|
||||
<!-- 组件 -->
|
||||
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
addFishAPI
|
||||
} from "@/api/aquatic.js"
|
||||
import uplodeImg from "@/utils/uplodeImg.js"
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from "vue";
|
||||
import {
|
||||
onLoad
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
userInfoStore
|
||||
} from '@/store/userInfo'
|
||||
const userInfo = userInfoStore()
|
||||
const formData = reactive({})
|
||||
const baseData = reactive({
|
||||
user_id: userInfo.user_id,
|
||||
pond_id: "",
|
||||
kind: "",
|
||||
breed: "",
|
||||
number: "",
|
||||
buy_info: "",
|
||||
buy_cert: ""
|
||||
})
|
||||
const objFn = (res, obj) => {
|
||||
for (let key in res) {
|
||||
obj[key] = res[key]
|
||||
}
|
||||
}
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
const nextFn = async () => {
|
||||
let res = await addFishAPI({
|
||||
...formData
|
||||
})
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
objFn(baseData, formData)
|
||||
}
|
||||
const updateImgFn = async () => {
|
||||
let res = await uplodeImg()
|
||||
formData.buy_cert = res.data.image
|
||||
}
|
||||
onLoad((options) => {
|
||||
baseData.pond_id = options.pond_id
|
||||
objFn(baseData, formData)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
.tit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.card-li-tit {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.confim-btn {
|
||||
margin: 0 auto;
|
||||
width: 196.26rpx;
|
||||
height: 66.59rpx;
|
||||
/* border: ; */
|
||||
border: #00A15E 1px solid;
|
||||
color: #00A15E;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
}
|
||||
|
||||
.up-img {
|
||||
width: 341.71rpx
|
||||
}
|
||||
|
||||
.today-btn {
|
||||
width: 588.79rpx;
|
||||
background-color: #00A15E;
|
||||
color: white;
|
||||
position: fixed;
|
||||
bottom: 40rpx;
|
||||
/* transform: ; */
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
background: linear-gradient(to right, #00A15E, #4CC593);
|
||||
/* margin: 0 auto; */
|
||||
}
|
||||
|
||||
.code-img {
|
||||
background-color: #F4F4F4;
|
||||
height: 350.47rpx;
|
||||
position: relative;
|
||||
margin-bottom: 100rpx;
|
||||
|
||||
.carime-icon {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.confirm {
|
||||
position: fixed;
|
||||
height: 84.11rpx;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
bottom: 80rpx;
|
||||
|
||||
.confirm-btn {
|
||||
width: 315.42rpx;
|
||||
height: 84.11rpx;
|
||||
border: #00A15E 1px solid;
|
||||
margin-right: 20rpx;
|
||||
border-radius: 80rpx;
|
||||
text-align: center;
|
||||
line-height: 84rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,19 +1,17 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<imgCard></imgCard>
|
||||
|
||||
<imgCard :imgUrl='headData?.pic_detail?.pic'></imgCard>
|
||||
<view class="bad-info">
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
<u--image :src="urlFn('sj')" style="margin: 0 5rpx;" width="28.04rpx" height="28.04rpx"></u--image>
|
||||
<text>刷新时间:{{dateFn()}}</text>
|
||||
</view>
|
||||
<view style="display: flex;" @click="navgo('/pages/allPlant/index')">
|
||||
<view style="display: flex;" @click="navgo(`/pages/aquatic/imgList?pond_id=${pond_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 class="card">
|
||||
|
@ -62,11 +60,23 @@
|
|||
具体种类: 20亩
|
||||
</view>
|
||||
</view>
|
||||
<view class="add-btn" @click="navgo('/pages/aquatic/addAquatic')">
|
||||
<view class="add-btn" @click="navgo(`/pages/aquatic/addPond?pond_id=${pond_id}`)">
|
||||
添加水产养殖
|
||||
</view>
|
||||
</view>
|
||||
<view class="circumstance">
|
||||
<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 :tit='`查看${index.slice(0,-2)}`' :dataList="item.action_record" route='/pages/feedIng/allRecording'>
|
||||
</myTable>
|
||||
</view>
|
||||
<!-- <view class="circumstance">
|
||||
<view class="card-tit">
|
||||
<view class="">
|
||||
生长密度记录
|
||||
|
@ -90,7 +100,7 @@
|
|||
</view>
|
||||
<myTable tit='查看历史消毒记录' route='/pages/feedIng/allRecording'></myTable>
|
||||
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="data">
|
||||
<view class="tit">
|
||||
<view class="" style="display: flex;justify-content: space-between;font-size: 29.79rpx;">
|
||||
|
@ -100,9 +110,10 @@
|
|||
</view>
|
||||
<view class="tit-b">
|
||||
<u--image :src="urlFn('sj')" style="margin: 0 5rpx;" width="28.04rpx" height="28.04rpx"></u--image>
|
||||
<text>刷新时间: 2022-3-3</text>
|
||||
<text>刷新时间: {{dateFn()}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 你这不是 -->
|
||||
|
||||
<view class="data-cont">
|
||||
<view class="data-cont-li center" v-for="(item,index) in data " :key="index">
|
||||
|
@ -136,69 +147,51 @@
|
|||
ref,
|
||||
reactive
|
||||
} from "vue"
|
||||
import {
|
||||
actionsAPI
|
||||
} from "@/api/animal.js"
|
||||
import {
|
||||
pondInfoAPI,
|
||||
addFishPicAPI,
|
||||
pondEnvDataAPI
|
||||
} from "@/api/aquatic.js"
|
||||
import myTable from "@/components/myTable/index.vue"
|
||||
import imgCard from "@/components/imgCard.vue"
|
||||
import {
|
||||
onLoad
|
||||
} from "@dcloudio/uni-app"
|
||||
import uplodeImg from "@/utils/uplodeImg.js"
|
||||
const data = reactive([{
|
||||
tit: "水温",
|
||||
icon: 'TRWD',
|
||||
dw: "℃",
|
||||
cont: 'soil_temperature',
|
||||
cont: 'water_temp',
|
||||
flag: false,
|
||||
|
||||
}, {
|
||||
tit: "PH值",
|
||||
icon: 'TRSD',
|
||||
dw: "%RH",
|
||||
cont: 'soil_moisture',
|
||||
cont: 'ph_content',
|
||||
}, {
|
||||
tit: "溶解氧",
|
||||
icon: 'FX',
|
||||
cont: 'wind_direction',
|
||||
cont: 'dissolved_oxygen',
|
||||
dw: "%",
|
||||
}, {
|
||||
tit: "电导率",
|
||||
icon: 'FS',
|
||||
dw: "m/s",
|
||||
cont: 'wind_speed',
|
||||
dw: "mg/l",
|
||||
cont: 'electric_conductivity',
|
||||
}, {
|
||||
tit: "TDS",
|
||||
icon: 'JYL',
|
||||
dw: "mm",
|
||||
cont: 'rainfall',
|
||||
dw: "lux",
|
||||
cont: 'tds',
|
||||
},
|
||||
|
||||
])
|
||||
|
||||
const data2 = reactive([{
|
||||
cont: "气象多要素百叶箱",
|
||||
cont2: "1天/1次",
|
||||
}, {
|
||||
cont: "多功能控制器",
|
||||
cont2: "3个小时/次",
|
||||
}, ])
|
||||
const baseData = reactive({
|
||||
"id": 27,
|
||||
"production_base_id": 1,
|
||||
"soil_temperature": 20,
|
||||
"soil_moisture": 50,
|
||||
"room_temperature": 0,
|
||||
"air_humidity": 0,
|
||||
"air_quality_index": 0,
|
||||
"pond_temperature": 0,
|
||||
"pond_ph_value": 0,
|
||||
"wind_direction": "北",
|
||||
"wind_speed": 3.4,
|
||||
"illumination": 2,
|
||||
"rainfall": 20,
|
||||
"carbon_dioxide_content": 450,
|
||||
"nitrogen_content": 0,
|
||||
"methane_content": 0,
|
||||
"ammonia_nitrogen_content": 0,
|
||||
"nitrite_content": 0,
|
||||
"dissolved_oxygen": 0,
|
||||
"temperature_threshold": 0,
|
||||
"humidity_threshold": 0,
|
||||
"flag": 1
|
||||
})
|
||||
const baseData = reactive({})
|
||||
const urlFn = (name) => {
|
||||
return `/static/img/${name}.png`
|
||||
}
|
||||
|
@ -224,6 +217,48 @@
|
|||
// 输出日期字符串
|
||||
|
||||
}
|
||||
const updateImgFn = () => {
|
||||
let image = ""
|
||||
uplodeImg().then(res => {
|
||||
image = res.data.image
|
||||
headData.pic_detail.pic = image
|
||||
addFishPicAPI({
|
||||
pond_id: pond_id.value,
|
||||
pic: image
|
||||
})
|
||||
})
|
||||
}
|
||||
const pond_id = ref(0)
|
||||
const headData = reactive({})
|
||||
onLoad((option) => {
|
||||
|
||||
pondEnvDataAPI({
|
||||
user_id: 307
|
||||
}).then(res => {
|
||||
for (let key in res.data) {
|
||||
baseData[key] = (res.data)[key]
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
pond_id.value = option.pond_id
|
||||
pondInfoAPI({
|
||||
user_id: 307,
|
||||
pond_id: pond_id.value
|
||||
}).then(res => {
|
||||
for (let key in res.data) {
|
||||
headData[key] = (res.data)[key]
|
||||
}
|
||||
})
|
||||
})
|
||||
const actionList = reactive({})
|
||||
actionsAPI({
|
||||
type: 4
|
||||
}).then(res => {
|
||||
for (let key in res.data) {
|
||||
actionList[key] = (res.data)[key]
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -0,0 +1,185 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
|
||||
<!-- <view class="card">
|
||||
<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="">
|
||||
预计产量: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
已出售: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
播种时间: 2020.12.01
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view> -->
|
||||
<landInfo :pond_id='pond_id'></landInfo>
|
||||
|
||||
<!-- <view class="status">
|
||||
<view class="" style="margin-bottom: 30rpx;">
|
||||
今日种植状态
|
||||
</view>
|
||||
<imgCard text="地址"
|
||||
imgUrl='http://ceshi-suyuan.lihaink.cn/uploads/20231025/3048b734cff7d9adfb00aaf6ab7290e5.jpeg'>
|
||||
</imgCard>
|
||||
</view>
|
||||
<view class="status">
|
||||
<view class="" style="margin-bottom: 30rpx;">
|
||||
播种图片
|
||||
</view>
|
||||
<imgCard text="地址"
|
||||
imgUrl='http://ceshi-suyuan.lihaink.cn/uploads/20231025/3048b734cff7d9adfb00aaf6ab7290e5.jpeg'>
|
||||
</imgCard>
|
||||
</view> -->
|
||||
<view class="status">
|
||||
<view class="" style="margin-bottom: 30rpx;">
|
||||
生长情况
|
||||
</view>
|
||||
<imgCard text="地址" :imgUrl="item" v-for="(item,index) in imgList" :key="index" @tap='previewImage(index)'>
|
||||
</imgCard>
|
||||
</view>
|
||||
|
||||
<view class="up-btn" @click="updateImgFn">
|
||||
上传新的种植情况
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import landInfo from "@/components/plant/landInfo.vue"
|
||||
import imgCard from "@/components/imgCard.vue"
|
||||
import {
|
||||
fishPicListAPI,
|
||||
addFishPicAPI
|
||||
} from "@/api/aquatic.js"
|
||||
import {
|
||||
onLoad
|
||||
} from "@dcloudio/uni-app"
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from "vue"
|
||||
import uplodeImg from "@/utils/uplodeImg.js"
|
||||
const imgList = reactive([])
|
||||
const pond_id = ref(0)
|
||||
onLoad((options) => {
|
||||
pond_id.value = options.pond_id
|
||||
fishPicListAPI({
|
||||
pond_id: options.pond_id
|
||||
}).then(res => {
|
||||
res.data.forEach(item => {
|
||||
imgList.push(item.pic)
|
||||
})
|
||||
})
|
||||
})
|
||||
const updateImgFn = () => {
|
||||
let image = ""
|
||||
uplodeImg().then(res => {
|
||||
image = res.data.image
|
||||
addFishPicAPI({
|
||||
pond_id: pond_id.value,
|
||||
pic: image
|
||||
}).then(res2 => {
|
||||
imgList.unshift(image)
|
||||
})
|
||||
})
|
||||
}
|
||||
const previewImage = (index) => {
|
||||
uni.previewImage({
|
||||
urls: imgList,
|
||||
current: index,
|
||||
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
padding: 20rpx;
|
||||
background-color: #F4F4F4;
|
||||
min-height: 100vh;
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
.status {
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.head-img {
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
margin: 20rpx auto;
|
||||
position: relative;
|
||||
|
||||
.poisition {
|
||||
opacity: 0.7;
|
||||
position: absolute;
|
||||
width: 360.26rpx;
|
||||
height: 71rpx;
|
||||
background-color: #FFFFFF;
|
||||
left: 20rpx;
|
||||
bottom: 36rpx;
|
||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 29.79rpx;
|
||||
padding-left: 20rpx;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.up-btn {
|
||||
width: 371.5rpx;
|
||||
height: 66.59rpx;
|
||||
border: 1px solid #00A15E;
|
||||
color: #00A15E;
|
||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||
text-align: center;
|
||||
line-height: 66rpx;
|
||||
margin: 40rpx auto;
|
||||
}
|
||||
</style>
|
|
@ -8,7 +8,8 @@
|
|||
<u--image :src="urlFn('sj')" style="margin: 0 5rpx;" width="28.04rpx" height="28.04rpx"></u--image>
|
||||
<text>刷新时间:{{dateFn()}}</text>
|
||||
</view>
|
||||
<view style="display: flex;" @click="navgo(`/pages/allPlant/index?crop_id=${landDeatil.crop_id}`)">
|
||||
<view style="display: flex;"
|
||||
@click="navgo(`/pages/allPlant/index?crop_id=${landDeatil.crop_id}&land_id=${landDeatil.land_id}`)">
|
||||
查看历史记录 <u--image src="/static/img/CKGD.png" style="margin-left: 5rpx;" width="31.54rpx"
|
||||
height="31.54rpx"></u--image>
|
||||
</view>
|
||||
|
@ -21,18 +22,28 @@
|
|||
<landInfo :land_id='landDeatil.land_id'></landInfo>
|
||||
<!-- 生长记录 -->
|
||||
|
||||
<view class="grow-record-tit">
|
||||
<!-- <view class="grow-record-tit">
|
||||
<view class="">
|
||||
生长记录操作
|
||||
</view>
|
||||
<view class="updata-btn" @tap="navgo('/pages/growRecord/index')">
|
||||
<view class="updata-btn" @tap="navgo(`/pages/growRecord/index?land_id=${landDeatil.land_id}`)">
|
||||
更新生长记录
|
||||
</view>
|
||||
</view>
|
||||
<!-- <myTable :dataList="dataList" tit='查看历史'></myTable> -->
|
||||
<myTable tit='查看历史记录' :dataList="tableDate" route='/pages/records/index'></myTable>
|
||||
|
||||
<myTable tit='查看历史记录' :dataList="tableDate" route='/pages/records/index'></myTable> -->
|
||||
|
||||
<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 :tit='`查看${index.slice(0,-2)}`' :dataList="item.action_record" route='/pages/feedIng/allRecording'>
|
||||
</myTable>
|
||||
</view>
|
||||
|
||||
<view class="data">
|
||||
<view class="tit">
|
||||
|
@ -94,7 +105,8 @@
|
|||
农作物成熟标记
|
||||
</view>
|
||||
<view class="" @tap="showPop=false">
|
||||
X
|
||||
<u--image :src="urlFn('GBAN')" style="margin: 0 5rpx;" width="49.07rpx" height="49.07rpx">
|
||||
</u--image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mark-li">
|
||||
|
@ -126,7 +138,7 @@
|
|||
成熟日期:
|
||||
</view>
|
||||
<view class="">
|
||||
?
|
||||
{{dateFn()}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="mark-li" style="display: block;border: 0;">
|
||||
|
@ -157,6 +169,9 @@
|
|||
import imgCard from "@/components/imgCard.vue"
|
||||
import uplodeImg from "@/utils/uplodeImg.js"
|
||||
import landInfo from "@/components/plant/landInfo.vue"
|
||||
import {
|
||||
actionsAPI
|
||||
} from "@/api/animal.js"
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
|
@ -211,8 +226,6 @@
|
|||
crop_id: landDeatil.crop_id
|
||||
})
|
||||
objFn(res2.data, tableDate)
|
||||
|
||||
// console.log(res2.data)
|
||||
let res3 = await landEnvDataCurrAPI({
|
||||
user_id: 307,
|
||||
})
|
||||
|
@ -280,6 +293,14 @@
|
|||
}
|
||||
|
||||
}
|
||||
const actionList = reactive({})
|
||||
actionsAPI({
|
||||
type: 1
|
||||
}).then(res => {
|
||||
for (let key in res.data) {
|
||||
actionList[key] = (res.data)[key]
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -465,4 +486,42 @@
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
.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;
|
||||
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>
|
|
@ -0,0 +1,152 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<imgCard></imgCard>
|
||||
|
||||
<view class="bad-info">
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
<u--image :src="urlFn('sj')" style="margin: 0 5rpx;" width="28.04rpx" height="28.04rpx"></u--image>
|
||||
<text>刷新时间:{{dateFn()}}</text>
|
||||
</view>
|
||||
<view style="display: flex;" @click="navgo('/pages/allPlant/index')">
|
||||
查看历史条件 <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 class="card">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
编号: 52656
|
||||
</view>
|
||||
<view class="">
|
||||
溯源码: 52656
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖品种: 土豆
|
||||
</view>
|
||||
<view class="">
|
||||
年龄: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖类型: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
体重: 45kg
|
||||
</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: green;">
|
||||
健康
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="" style="margin-bottom: 20rpx;">
|
||||
饲养记录
|
||||
</view>
|
||||
<myTable></myTable>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import myTable from "@/components/myTable/index.vue"
|
||||
import imgCard from "@/components/imgCard.vue"
|
||||
const urlFn = (name) => {
|
||||
return `/static/img/${name}.png`
|
||||
}
|
||||
const img = (w, h, m) => {
|
||||
return `width:${w}rpx;height:${h};margin:0 ${m}rpx `
|
||||
}
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
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
|
||||
// 输出日期字符串
|
||||
|
||||
}
|
||||
</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;
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
margin-top: 20rpx;
|
||||
height: 500rpx;
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.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>
|
|
@ -41,18 +41,18 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="serch">
|
||||
<!-- <view class="serch">
|
||||
<u-search bgColor='white' height='63.08rpx' :show-action="false" actionText="搜索"
|
||||
:animation="true"></u-search>
|
||||
<view class="serch-btn">
|
||||
搜索
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="title">
|
||||
<view class="">
|
||||
编号: 13645
|
||||
编号: {{baseData.animal_code}}
|
||||
</view>
|
||||
<view class="more-jt" @click="navgo(`/pages/feedIng/histroyFeed?id=${animal_id}`)">
|
||||
<view class="more-jt" @click="navgo(`/pages/feedIng/SingleDetail?id=${animal_id}`)">
|
||||
查看养殖详情 <u--image src="/static/img/CKGD.png" style="margin-left: 5rpx;" width="31.54rpx"
|
||||
height="31.54rpx"></u--image>
|
||||
</view>
|
||||
|
@ -61,22 +61,21 @@
|
|||
<view class="card">
|
||||
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖类型: 母猪
|
||||
<view class="" @click.capture="selectFoucsFn">
|
||||
养殖类型: {{baseData.animal_kind}}
|
||||
</view>
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
体重: <up-input style="height: 49.07rpx;width: 215.54rpx;margin-left: 20rpx;" placeholder="请输入内容"
|
||||
border="surround" v-model="value" @change="change"></up-input>
|
||||
border="surround" v-model="formData.animal_weight"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li" style="align-items: center;">
|
||||
<view class="">
|
||||
年龄: 2年
|
||||
年龄: {{baseData.animal_age}}年
|
||||
</view>
|
||||
<view class="select">
|
||||
状态: <up-input readonly style="height: 49.07rpx;width: 215.54rpx;margin-left: 20rpx;"
|
||||
placeholder="请选择" border="surround" @click.capture="selectFoucsFn" @blur="selectAct=false"
|
||||
v-model="value">
|
||||
placeholder="请选择" border="surround" @click.capture="selectFoucsFn" v-model="value">
|
||||
</up-input>
|
||||
<view class="JT" :class="{actJT:selectAct}">
|
||||
<u--image src="/static/img/XLJT.png" width="24.53rpx" height="24.53rpx"></u--image>
|
||||
|
@ -92,23 +91,26 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<imgCard></imgCard>
|
||||
<imgCard :imgUrl='baseData?.pic_detail?.pic'></imgCard>
|
||||
|
||||
<view class="up-plant-btn">
|
||||
上传新的种植情况
|
||||
<view class="up-plant-btn" @tap="updataStatusFn">
|
||||
确认更新
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="title">
|
||||
<view class="">
|
||||
饲养记录
|
||||
</view>
|
||||
<view class="updata-btn">
|
||||
更新生长记录
|
||||
<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 :tit='`查看${index.slice(0,-2)}`' :dataList="item.action_record" route='/pages/feedIng/allRecording'>
|
||||
</myTable>
|
||||
</view>
|
||||
<myTable tit='查看历史饲养记录' route='/pages/feedIng/allFeed'></myTable>
|
||||
<view class="ripe-btn">
|
||||
<view class="ripe-btn" @tap="outBar">
|
||||
标记状态为出栏
|
||||
</view>
|
||||
|
||||
|
@ -126,7 +128,11 @@
|
|||
reactive
|
||||
} from "vue"
|
||||
import {
|
||||
animalInfoAPI
|
||||
animalInfoAPI,
|
||||
animalStatusAPI
|
||||
} from "@/api/animal.js"
|
||||
import {
|
||||
actionsAPI
|
||||
} from "@/api/animal.js"
|
||||
const selectList = reactive([
|
||||
"健康", "怀孕中", "生病隔离中", "可出栏"
|
||||
|
@ -140,17 +146,68 @@
|
|||
const changSelectfn = (index) => {
|
||||
indexs.value = index
|
||||
value.value = selectList[index]
|
||||
formData.status = index + 1
|
||||
}
|
||||
const animal_id = ref("")
|
||||
const animal_id = ref(0)
|
||||
const baseData = reactive({})
|
||||
onLoad((options) => {
|
||||
animal_id.value = options.id
|
||||
console.log(animal_id.value, 6666)
|
||||
formData.animal_id = options.id
|
||||
animalInfoAPI({
|
||||
animal_id: options.id
|
||||
}).then(res => {
|
||||
for (let key in res.data) {
|
||||
baseData[key] = res.data[key]
|
||||
}
|
||||
formData.animal_weight = baseData.animal_weight
|
||||
value.value = selectList[baseData.animal_status - 1]
|
||||
indexs.value = baseData.animal_status - 1
|
||||
})
|
||||
})
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
const formData = reactive({
|
||||
status: '',
|
||||
animal_id: '',
|
||||
animal_weight: ""
|
||||
})
|
||||
const updataStatusFn = () => {
|
||||
animalStatusAPI({
|
||||
...formData
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
const outBar = () => {
|
||||
animalStatusAPI({
|
||||
status: 4,
|
||||
animal_id: animal_id.value,
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}, 2000)
|
||||
})
|
||||
}
|
||||
const actionList = reactive({})
|
||||
actionsAPI({
|
||||
type: 3
|
||||
}).then(res => {
|
||||
for (let key in res.data) {
|
||||
actionList[key] = (res.data)[key]
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -180,6 +237,7 @@
|
|||
|
||||
.updata-btn {
|
||||
width: 192.76rpx;
|
||||
|
||||
height: 57.83rpx;
|
||||
border: 1px solid #00A15E;
|
||||
color: #00A15E;
|
||||
|
@ -302,4 +360,43 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.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 20rpx;
|
||||
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,7 +1,7 @@
|
|||
<template>
|
||||
<view class="cont">
|
||||
|
||||
<view class="card">
|
||||
<!-- <view class="card">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
1号土地
|
||||
|
@ -32,8 +32,8 @@
|
|||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view> -->
|
||||
<landInfo :land_id='land_id'></landInfo>
|
||||
|
||||
<view class="operate">
|
||||
<view class="tit">
|
||||
|
@ -138,6 +138,17 @@
|
|||
ref,
|
||||
reactive
|
||||
} from "vue"
|
||||
import landInfo from "@/components/plant/landInfo.vue"
|
||||
import {
|
||||
landCropRecordInfoAPI
|
||||
} from "@/api/plant.js"
|
||||
import {
|
||||
onLoad
|
||||
} from "@dcloudio/uni-app"
|
||||
const land_id = ref(0)
|
||||
onLoad((options) => {
|
||||
land_id.value = options.land_id
|
||||
})
|
||||
const showPop = ref(false)
|
||||
const formData = reactive({
|
||||
value: ""
|
||||
|
|
|
@ -0,0 +1,152 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<imgCard></imgCard>
|
||||
|
||||
<view class="bad-info">
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
<u--image :src="urlFn('sj')" style="margin: 0 5rpx;" width="28.04rpx" height="28.04rpx"></u--image>
|
||||
<text>刷新时间:{{dateFn()}}</text>
|
||||
</view>
|
||||
<view style="display: flex;" @click="navgo('/pages/allPlant/index')">
|
||||
查看历史条件 <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 class="card">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
编号: 52656
|
||||
</view>
|
||||
<view class="">
|
||||
溯源码: 52656
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖品种: 土豆
|
||||
</view>
|
||||
<view class="">
|
||||
年龄: 的划分等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖类型: 20亩
|
||||
</view>
|
||||
<view class="">
|
||||
体重: 45kg
|
||||
</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: green;">
|
||||
健康
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="" style="margin-bottom: 20rpx;">
|
||||
饲养记录
|
||||
</view>
|
||||
<myTable></myTable>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import myTable from "@/components/myTable/index.vue"
|
||||
import imgCard from "@/components/imgCard.vue"
|
||||
const urlFn = (name) => {
|
||||
return `/static/img/${name}.png`
|
||||
}
|
||||
const img = (w, h, m) => {
|
||||
return `width:${w}rpx;height:${h};margin:0 ${m}rpx `
|
||||
}
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
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
|
||||
// 输出日期字符串
|
||||
|
||||
}
|
||||
</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;
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
margin-top: 20rpx;
|
||||
height: 500rpx;
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.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>
|
|
@ -111,7 +111,7 @@
|
|||
import {
|
||||
addAnimalAPI,
|
||||
|
||||
} from "@/api/animal.js"
|
||||
} from "@/api/chick.js"
|
||||
const navgo = () => {
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/index"
|
||||
|
|
|
@ -41,18 +41,18 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="serch">
|
||||
<!-- <view class="serch">
|
||||
<u-search bgColor='white' height='63.08rpx' :show-action="false" actionText="搜索"
|
||||
:animation="true"></u-search>
|
||||
<view class="serch-btn">
|
||||
搜索
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="title">
|
||||
<view class="">
|
||||
编号: 13645
|
||||
</view>
|
||||
<view class="more-jt" @click="navgo(`/pages/poultry/histroyFeed?id=${animal_id}`)">
|
||||
<view class="more-jt" @click="navgo(`/pages/poultry/SingleDetail?id=${animal_id}`)">
|
||||
查看养殖详情 <u--image src="/static/img/CKGD.png" style="margin-left: 5rpx;" width="31.54rpx"
|
||||
height="31.54rpx"></u--image>
|
||||
</view>
|
||||
|
@ -61,12 +61,12 @@
|
|||
<view class="card">
|
||||
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
<view class="" @click.capture="selectFoucsFn">
|
||||
养殖类型: 母猪
|
||||
</view>
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
体重: <up-input style="height: 49.07rpx;width: 215.54rpx;margin-left: 20rpx;" placeholder="请输入内容"
|
||||
border="surround" v-model="value" @change="change"></up-input>
|
||||
border="surround" v-model="formData.animal_weight"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li" style="align-items: center;">
|
||||
|
@ -75,8 +75,7 @@
|
|||
</view>
|
||||
<view class="select">
|
||||
状态: <up-input readonly style="height: 49.07rpx;width: 215.54rpx;margin-left: 20rpx;"
|
||||
placeholder="请选择" border="surround" @click.capture="selectFoucsFn" @blur="selectAct=false"
|
||||
v-model="value">
|
||||
placeholder="请选择" border="surround" @click.capture="selectFoucsFn" v-model="value">
|
||||
</up-input>
|
||||
<view class="JT" :class="{actJT:selectAct}">
|
||||
<u--image src="/static/img/XLJT.png" width="24.53rpx" height="24.53rpx"></u--image>
|
||||
|
@ -94,21 +93,24 @@
|
|||
</view>
|
||||
<imgCard></imgCard>
|
||||
|
||||
<view class="up-plant-btn">
|
||||
上传新的种植情况
|
||||
<view class="up-plant-btn" @tap="updataStatusFn">
|
||||
确认更新
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="title">
|
||||
<view class="">
|
||||
饲养记录
|
||||
</view>
|
||||
<view class="updata-btn">
|
||||
更新生长记录
|
||||
<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 :tit='`查看${index.slice(0,-2)}`' :dataList="item.action_record" route='/pages/feedIng/allRecording'>
|
||||
</myTable>
|
||||
</view>
|
||||
<myTable tit='查看历史饲养记录' route='/pages/feedIng/allFeed'></myTable>
|
||||
<view class="ripe-btn">
|
||||
<view class="ripe-btn" @tap="outBar">
|
||||
标记状态为出栏
|
||||
</view>
|
||||
|
||||
|
@ -126,7 +128,11 @@
|
|||
reactive
|
||||
} from "vue"
|
||||
import {
|
||||
animalInfoAPI
|
||||
animalInfoAPI,
|
||||
animalStatusAPI
|
||||
} from "@/api/animal.js"
|
||||
import {
|
||||
actionsAPI
|
||||
} from "@/api/animal.js"
|
||||
const selectList = reactive([
|
||||
"健康", "怀孕中", "生病隔离中", "可出栏"
|
||||
|
@ -140,17 +146,57 @@
|
|||
const changSelectfn = (index) => {
|
||||
indexs.value = index
|
||||
value.value = selectList[index]
|
||||
formData.status = index + 1
|
||||
}
|
||||
const animal_id = ref("")
|
||||
const animal_id = ref(0)
|
||||
onLoad((options) => {
|
||||
animal_id.value = options.id
|
||||
console.log(animal_id.value, 6666)
|
||||
formData.animal_id = options.id
|
||||
})
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
const formData = reactive({
|
||||
status: '',
|
||||
animal_id: '',
|
||||
animal_weight: ""
|
||||
})
|
||||
const updataStatusFn = () => {
|
||||
animalStatusAPI({
|
||||
...formData
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
const outBar = () => {
|
||||
animalStatusAPI({
|
||||
status: 4,
|
||||
animal_id: animal_id.value,
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}, 2000)
|
||||
})
|
||||
}
|
||||
const actionList = reactive({})
|
||||
actionsAPI({
|
||||
type: 2
|
||||
}).then(res => {
|
||||
for (let key in res.data) {
|
||||
actionList[key] = (res.data)[key]
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -302,4 +348,42 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
padding: 0 20rpx;
|
||||
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>
|
|
@ -50,30 +50,30 @@
|
|||
<view class="card" v-for="(item,index) in animalList" :key="index" @click="navgo('/pages/feedIng/feedDetail')">
|
||||
<view class="tit">
|
||||
<view class="">
|
||||
编号: {{item.code}}
|
||||
编号: {{item.animal_code}}
|
||||
</view>
|
||||
<view class="" style="color: #00A15E;" v-if='item.status==1'>
|
||||
<view class="" style="color: #00A15E;" v-if='item.animal_status==1'>
|
||||
健康
|
||||
</view>
|
||||
<view class="" style="color: #FFD736;" v-if='item.status==2'>
|
||||
<view class="" style="color: #FFD736;" v-if='item.animal_status==2'>
|
||||
怀孕中
|
||||
</view>
|
||||
<view class="" style="color: #3274F9;" v-if='item.status==4'>
|
||||
<view class="" style="color: #3274F9;" v-if='item.animal_status==4'>
|
||||
可出栏
|
||||
</view>
|
||||
<view class="" style="color: #F84221;" v-if='item.status==3'>
|
||||
<view class="" style="color: #F84221;" v-if='item.animal_status==3'>
|
||||
生病隔离中
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-li">
|
||||
<view class="">
|
||||
养殖类型: {{item.kind}}
|
||||
养殖类型: {{item.animal_kind}}
|
||||
</view>
|
||||
<view class="">
|
||||
年龄: {{item.age}}年
|
||||
年龄: {{item.animal_age}}年
|
||||
</view>
|
||||
<view class="">
|
||||
体重: {{item.weight}}kg
|
||||
体重: {{item.animal_weight}}kg
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -87,7 +87,7 @@
|
|||
<script setup>
|
||||
import {
|
||||
animalListAPI,
|
||||
} from "@/api/chick.js"
|
||||
} from "@/api/animal.js"
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
import {
|
||||
animalPicListAPI,
|
||||
addAnimalPicAPI
|
||||
} from "@/api/chick.js"
|
||||
} from "@/api/animal.js"
|
||||
import {
|
||||
onLoad
|
||||
} from "@dcloudio/uni-app"
|
||||
|
@ -76,7 +76,7 @@
|
|||
const updateImgFn = () => {
|
||||
uplodeImg().then(res => {
|
||||
addAnimalPicAPI({
|
||||
poultry_id: Number(animal_id.value),
|
||||
animal_id: Number(animal_id.value),
|
||||
pic: res.data.image
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
|
@ -88,7 +88,7 @@
|
|||
onLoad((option) => {
|
||||
animal_id.value = option.id
|
||||
animalPicListAPI({
|
||||
poultry_id: option.id
|
||||
animal_id: option.id
|
||||
}).then(res => {
|
||||
res.data.forEach(item => {
|
||||
imgList.push(item)
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<template>
|
||||
<view class="" style="padding: 30rpx;">
|
||||
|
||||
<!-- <view class="" style="display: flex;align-items: center;font-size: 33.29rpx;margin-bottom: 20rpx;">
|
||||
<u--image @tap="backFn" src="/static/img/FH.png" width="50.82rpx" height="50.82rpx" alt=""></u--image>
|
||||
<text>生态概况</text>
|
||||
</view> -->
|
||||
<view class="" style="padding: 20rpx;box-sizing: border-box;">
|
||||
<view class="head">
|
||||
<view class="subsection">
|
||||
|
@ -14,7 +9,6 @@
|
|||
<view class="subsection-li" @click="changeDate(160.7)">
|
||||
月
|
||||
</view>
|
||||
|
||||
<view class="act" :style="{left:leftNum+'rpx'}">
|
||||
|
||||
</view>
|
||||
|
@ -29,13 +23,10 @@
|
|||
<view class="tit">
|
||||
土地检测数据
|
||||
</view>
|
||||
<view class="charts-box">
|
||||
<view class="charts-box" v-for="(item,index) in baseData " :key="index">
|
||||
<qiun-data-charts type="column" :opts="opts" :chartData="chartData[index]" />
|
||||
</view>
|
||||
|
||||
<qiun-data-charts type="mix" :opts="opts" :chartData="chartData" />
|
||||
</view>
|
||||
<view class="charts-box">
|
||||
<qiun-data-charts type="mix" :opts="opts2" :chartData="chartData2" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
@ -45,151 +36,389 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
landEnvDataChartAPI
|
||||
} from "@/api/plant.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
aaa: [{
|
||||
"soil_temp": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"soil_mois": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"p_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"n_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"k_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
}, {
|
||||
"soil_temp": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"soil_mois": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"p_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"n_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"k_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
}, {
|
||||
"soil_temp": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"soil_mois": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"p_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"n_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"k_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
}, {
|
||||
"soil_temp": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"soil_mois": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"p_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"n_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"k_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
}, {
|
||||
"soil_temp": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"soil_mois": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"p_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"n_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"k_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
}, {
|
||||
"soil_temp": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"soil_mois": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"p_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"n_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"k_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
}, {
|
||||
"soil_temp": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"soil_mois": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"p_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"n_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"k_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
}, {
|
||||
"soil_temp": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"soil_mois": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"p_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"n_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
},
|
||||
{
|
||||
"k_content": [
|
||||
1
|
||||
],
|
||||
"create_time": [
|
||||
"10-23"
|
||||
]
|
||||
}
|
||||
],
|
||||
leftNum: 10,
|
||||
chartData: {},
|
||||
chartData2: {},
|
||||
baseData: [],
|
||||
xInfo: [{
|
||||
name: "土壤温度(℃)",
|
||||
|
||||
data: 'soil_temp'
|
||||
}, {
|
||||
name: "土壤湿度(%RH)",
|
||||
|
||||
data: 'soil_mois'
|
||||
}, {
|
||||
name: "磷含量%)",
|
||||
|
||||
data: 'p_content'
|
||||
}, {
|
||||
name: "氮含量(mg/l)",
|
||||
|
||||
data: 'n_content'
|
||||
}, {
|
||||
name: "钾含量(%)",
|
||||
|
||||
data: 'k_content'
|
||||
},
|
||||
|
||||
],
|
||||
chartData: [],
|
||||
|
||||
//您可以通过修改 config-ucharts.js 文件中下标为 ['mix'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
|
||||
opts: {
|
||||
color: ["#1890FF", "#91CB74"],
|
||||
color: ["#1890FF"],
|
||||
padding: [15, 15, 0, 15],
|
||||
enableScroll: false,
|
||||
legend: {},
|
||||
xAxis: {
|
||||
disableGrid: true,
|
||||
|
||||
},
|
||||
yAxis: {
|
||||
disabled: false,
|
||||
disableGrid: false,
|
||||
splitNumber: 5,
|
||||
gridType: "dash",
|
||||
dashLength: 4,
|
||||
gridColor: "#CCCCCC",
|
||||
padding: 10,
|
||||
showTitle: true,
|
||||
data: [{
|
||||
position: "left",
|
||||
title: ""
|
||||
title: "",
|
||||
min: 0,
|
||||
max: 10,
|
||||
},
|
||||
{
|
||||
position: "right",
|
||||
min: 0,
|
||||
max: 200,
|
||||
max: 10,
|
||||
title: "",
|
||||
textAlign: "left"
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
extra: {
|
||||
mix: {
|
||||
column: {
|
||||
width: 20
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
opts2: {
|
||||
color: ["#1890FF", "#91CB74"],
|
||||
padding: [15, 15, 0, 15],
|
||||
enableScroll: false,
|
||||
legend: {},
|
||||
xAxis: {
|
||||
disableGrid: true,
|
||||
|
||||
},
|
||||
yAxis: {
|
||||
disabled: false,
|
||||
disableGrid: false,
|
||||
splitNumber: 5,
|
||||
gridType: "dash",
|
||||
dashLength: 4,
|
||||
gridColor: "#CCCCCC",
|
||||
padding: 10,
|
||||
showTitle: true,
|
||||
data: [{
|
||||
position: "left",
|
||||
title: ""
|
||||
},
|
||||
{
|
||||
position: "right",
|
||||
min: 0,
|
||||
max: 200,
|
||||
title: "",
|
||||
textAlign: "left"
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
extra: {
|
||||
mix: {
|
||||
column: {
|
||||
width: 20
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
onReady() {
|
||||
let datas = [
|
||||
[20, 23, 25, 19, 23, 24],
|
||||
[30, 25, 27, 28, 24, 25],
|
||||
[40, 41, 32, 30, 32, 30],
|
||||
[20, 23, 25, 19, 23, 24],
|
||||
[100, 79, 89, 93, 98, 82],
|
||||
[18, 20, 25, 26, 30, 31],
|
||||
["12:00", "13:00", "14:00", "15:00", "16:00", "17:00"],
|
||||
["12:00", "13:00", "14:00", "15:00", "16:00", "17:00"],
|
||||
]
|
||||
|
||||
this.getServerData(datas)
|
||||
},
|
||||
onShow() {
|
||||
companyMine({
|
||||
id: 1,
|
||||
flag: 1
|
||||
}).then(res => {
|
||||
console.log(res.data)
|
||||
})
|
||||
this.initCharts('2023-10-20', '2023-10-27')
|
||||
},
|
||||
methods: {
|
||||
changeDate(num) {
|
||||
let datas = []
|
||||
this.leftNum = num
|
||||
if (num == 10) {
|
||||
datas = [
|
||||
[25, 22, 24, 19, 21, 22],
|
||||
[38, 27, 21, 30, 32, 24],
|
||||
[45, 43, 35, 33, 38, 40],
|
||||
[27, 23, 25, 27, 30, 34],
|
||||
[102, 107, 96, 95, 82, 83],
|
||||
[19, 21, 26, 25, 22, 19],
|
||||
["10-12", "10-13", "10-14", "10-15", "10-16", "10-17"],
|
||||
["10-12", "10-13", "10-14", "10-15", "10-16", "10-17"],
|
||||
]
|
||||
} else if (num == 160.7) {
|
||||
datas = [
|
||||
[29, 32, 38, 31, 23, 24],
|
||||
[36, 34, 30, 29, 27, 27],
|
||||
[41, 40, 36, 32, 29, 24],
|
||||
[29, 23, 25, 30, 34, 36],
|
||||
[94, 109, 120, 116, 110, 113],
|
||||
[18, 20, 25, 26, 30, 31],
|
||||
["5月", "6月", "7月", "8月", "9月", "10月"],
|
||||
["5月", "6月", "7月", "8月", "9月", "10月"],
|
||||
]
|
||||
}
|
||||
this.getServerData(datas)
|
||||
// this.initCharts('2023-10-23', '2023-10-27')
|
||||
},
|
||||
|
||||
|
||||
|
||||
navgo() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index3/index'
|
||||
|
@ -198,55 +427,34 @@
|
|||
backFn() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
getServerData(datas) {
|
||||
//模拟从服务器获取数据时的延时
|
||||
initCharts(start_time, end_time) {
|
||||
landEnvDataChartAPI({
|
||||
user_id: 307,
|
||||
start_time,
|
||||
end_time
|
||||
}).then(res => {
|
||||
this.baseData = res.data
|
||||
// this.baseData = this.aaa
|
||||
let datas = this.baseData
|
||||
this.baseData.forEach((item, index) => {
|
||||
this.getServerData(item, index)
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
getServerData(datas, index) {
|
||||
setTimeout(() => {
|
||||
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
|
||||
let res = {
|
||||
categories: datas[6],
|
||||
categories: datas['create_time'],
|
||||
series: [{
|
||||
name: "土壤温度(℃)",
|
||||
index: 1,
|
||||
type: "column",
|
||||
data: datas[0]
|
||||
},
|
||||
|
||||
{
|
||||
name: "降雨量(mm)",
|
||||
type: "line",
|
||||
color: "#2fc25b",
|
||||
data: datas[1]
|
||||
},
|
||||
{
|
||||
name: "湿度(WC)",
|
||||
type: "line",
|
||||
color: "pink",
|
||||
data: datas[2]
|
||||
},
|
||||
|
||||
]
|
||||
name: this.xInfo[index].name,
|
||||
index: 1,
|
||||
type: "column",
|
||||
data: datas[this.xInfo[index].data]
|
||||
}]
|
||||
};
|
||||
let res2 = {
|
||||
categories: datas[7],
|
||||
series: [
|
||||
|
||||
{
|
||||
name: "光照(lux)",
|
||||
type: "line",
|
||||
color: "#2fc25b",
|
||||
data: datas[4]
|
||||
},
|
||||
{
|
||||
name: "风速(m/h)",
|
||||
type: "line",
|
||||
color: "blue",
|
||||
data: datas[5]
|
||||
},
|
||||
|
||||
]
|
||||
};
|
||||
this.chartData = JSON.parse(JSON.stringify(res));
|
||||
this.chartData2 = JSON.parse(JSON.stringify(res2));
|
||||
this.chartData[index] = JSON.parse(JSON.stringify(res));
|
||||
}, 500);
|
||||
},
|
||||
}
|
||||
|
|
|
@ -58,11 +58,17 @@
|
|||
|
||||
<script setup>
|
||||
import {
|
||||
actionsListAPI
|
||||
actionsListAPI,
|
||||
actionsDetailAPI
|
||||
} from "@/api/plant.js"
|
||||
import myTable from "@/components/myTable/index.vue"
|
||||
actionsListAPI({
|
||||
type: 1
|
||||
// actionsListAPI({
|
||||
// type: 1
|
||||
// }).then(res => {
|
||||
// console.log(res)
|
||||
// })
|
||||
actionsDetailAPI({
|
||||
action_id: 2
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 982 B |
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -932,13 +932,9 @@ uni-view[data-v-9d58ba7c], uni-scroll-view[data-v-9d58ba7c], uni-swiper-item[dat
|
|||
margin: auto;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 0.625rem;
|
||||
border-radius: 0.65719rem 0.65719rem 0.65719rem 0.65719rem;
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
.content .card .card-li[data-v-bdc223d1] {
|
||||
margin-bottom: 0.53125rem;
|
||||
}
|
||||
.content .card .tit[data-v-bdc223d1] {
|
||||
display: flex;
|
||||
font-size: 1.04031rem;
|
||||
|
|
Loading…
Reference in New Issue