TraceabilityAPP/components/poultry/farmersCard.vue

88 lines
1.9 KiB
Vue
Raw Normal View History

2023-10-27 18:38:25 +08:00
<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>
2023-10-28 18:28:10 +08:00
</view>
<view class="card-li">
<view class="">
地址: {{userInfo.area_name}}{{userInfo.street_name}}{{userInfo.village_name}}{{userInfo.brigade_name}}
</view>
2023-10-27 18:38:25 +08:00
</view>
</view>
</template>
<script setup>
import {
reactive,
watch
} from "vue";
2023-10-27 19:26:03 +08:00
// import {
// userInfoAPI
// } from "@/api/plant.js"
2023-10-27 18:38:25 +08:00
import {
2023-10-27 19:26:03 +08:00
userInfoStore
} from '@/store/userInfo'
const userInfoStores = userInfoStore()
2023-10-27 18:38:25 +08:00
const userInfo = reactive({})
const objFn = (res, data) => {
for (let key in res) {
data[key] = res[key]
}
}
2023-10-27 19:26:03 +08:00
// userInfoAPI({
// user_id: 307
// }).then(res => {
// objFn(res.data, userInfo)
// })
objFn(userInfoStores.userInfo, userInfo)
2023-10-27 18:38:25 +08:00
</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>