mkm
/
yanzhiAPP
Template
2
0
Fork 0
yanzhiAPP/pages/feedIng/SingleDetail.vue

161 lines
3.3 KiB
Vue
Raw Normal View History

2023-10-26 19:02:26 +08:00
<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>
2023-10-26 20:18:04 +08:00
<view style="display: flex;" @click="navgo(`/pages/feedIng/histroyFeed?id=${animal_id}`)">
2023-10-26 19:02:26 +08:00
查看历史条件 <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"
2023-10-26 20:18:04 +08:00
import {
ref
} from "vue"
import {
onLoad
} from "@dcloudio/uni-app"
2023-10-26 19:02:26 +08:00
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
// 输出日期字符串
}
2023-10-26 20:18:04 +08:00
const animal_id = ref(0)
onLoad((option) => {
animal_id.value = option.id
})
2023-10-26 19:02:26 +08:00
</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>