cultivationApp/components/plant/breedInfo.vue

127 lines
2.7 KiB
Vue
Raw Normal View History

2023-12-20 18:13:01 +08:00
<template>
<view class="" style="margin-top: 10rpx;">
2024-01-30 18:31:10 +08:00
<view v-if="info.fenceHouseAttr" class="" style="display: flex;align-items: center;height: 60rpx;">
2023-12-20 18:13:01 +08:00
<u-icon name="map"></u-icon>
2024-01-30 18:31:10 +08:00
{{info.fenceHouseAttr.fence_house_name}}
2023-12-20 18:13:01 +08:00
</view>
<view class="info">
<view class="info-li" style="background-image: url('/static/main/house/dong_wu_ming_cheng.png');">
耳号
<view class="">
2024-01-30 18:31:10 +08:00
{{info.sn}}
2023-12-20 18:13:01 +08:00
</view>
</view>
<view class="info-li" style="background-image: url('/static/main/house/dong_wu_lei_xing.png');">
品类
<view class="">
2024-01-30 18:31:10 +08:00
{{getAnimalType(info.animal_type)}}
2023-12-20 18:13:01 +08:00
</view>
</view>
<view class="info-li" style="background-image: url('/static/main/house/lan_she_rong_liang.png');">
品种
<view class="">
2024-01-30 18:31:10 +08:00
{{info.brand}}
2023-12-20 18:13:01 +08:00
</view>
</view>
<view class="info-li" style="background-image: url('/static/main/house/lan_she_fu_ze_ren.png');">
生理阶段
<view class="">
2024-01-30 18:31:10 +08:00
{{info.physi_stage}}
2023-12-20 18:13:01 +08:00
</view>
</view>
<view class="info-li" style="background-image: url('/static/main/house/dian_hua.png');">
体重
<view class="">
2024-01-30 18:31:10 +08:00
{{info.current_estimation}}kg
2023-12-20 18:13:01 +08:00
</view>
</view>
2024-01-30 18:31:10 +08:00
<view class="info-li-d"></view>
<!-- <view class="info-li" style="background-image: url('/static/main/house/dian_hua.png');">
2023-12-20 18:13:01 +08:00
健康状况
<view class="">
健康
</view>
2024-01-30 18:31:10 +08:00
</view> -->
2023-12-20 18:13:01 +08:00
</view>
</view>
</template>
<script setup>
import {
reactive,
2024-01-30 18:31:10 +08:00
watch,
ref
2023-12-20 18:13:01 +08:00
} from "vue";
2024-01-30 18:31:10 +08:00
import {
animalTypeLists
} from "@/api/dict.js"
2023-12-20 18:13:01 +08:00
const props = defineProps({
info: Object,
isDetail: Boolean
})
2024-01-30 18:31:10 +08:00
const animal_type_lists = ref([])
const initAnimalTypeLists = ()=>{
animalTypeLists().then(res=>{
animal_type_lists.value = res.data;
})
}
initAnimalTypeLists();
const getAnimalType = (type)=>{
return animal_type_lists.value.find(item=>item.value==type)?.name||'';
}
2023-12-20 18:13:01 +08:00
const perviewFn = (url) => {
uni.previewImage({
urls: [url]
})
}
</script>
<style lang="scss" scoped>
.info {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.info-li {
width: 223rpx;
height: 129rpx;
border-radius: 10rpx;
background-size: 100% 100%;
padding: 20rpx;
margin-bottom: 20rpx;
box-shadow: 1rpx 1rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
}
.info-li-d {
width: 223rpx;
height: 129rpx;
border-radius: 10rpx;
padding: 20rpx;
margin-bottom: 20rpx;
}
}
.card {
// width: 710rpx;
margin: 0 auto;
.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>