|
|
@@ -5,11 +5,12 @@
|
|
|
<farm-info-card
|
|
|
class="record-box"
|
|
|
:data="{
|
|
|
- farmName: '从化荔博园',
|
|
|
- area: '200亩',
|
|
|
- variety: '桂味',
|
|
|
- address: '广东省广州市从化区从化区',
|
|
|
+ farmName: farmDetail.name,
|
|
|
+ area: farmDetail.mianji + '亩',
|
|
|
+ variety: farmDetail.typeName,
|
|
|
+ address: farmDetail.address,
|
|
|
mapImage: '/map.png',
|
|
|
+ maxWidth: '58px',
|
|
|
}"
|
|
|
>
|
|
|
<template #right>
|
|
|
@@ -21,8 +22,8 @@
|
|
|
<img src="@/assets/img/home/label-icon.png" alt="" />
|
|
|
<span>农事服务</span>
|
|
|
</div>
|
|
|
- <stats-box :stats-data="statsData" />
|
|
|
- <div v-for="(section, index) in contentData" :key="index" class="content-section">
|
|
|
+ <stats-box :stats-data="serviceStatsData" />
|
|
|
+ <div v-for="(section, index) in detailList" :key="index" class="content-section">
|
|
|
<record-item
|
|
|
:record-item-data="section"
|
|
|
:onlyRecipeName="true"
|
|
|
@@ -32,6 +33,13 @@
|
|
|
class="recipe-item"
|
|
|
/>
|
|
|
</div>
|
|
|
+ <empty
|
|
|
+ v-if="detailList.length === 0"
|
|
|
+ image="https://birdseye-img.sysuimars.com/birdseye-look-mini/custom-empty-image.png"
|
|
|
+ image-size="80"
|
|
|
+ description="暂无数据"
|
|
|
+ class="empty-state"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -41,110 +49,50 @@
|
|
|
import customHeader from "@/components/customHeader.vue";
|
|
|
import FarmInfoCard from "@/components/pageComponents/FarmInfoCard.vue";
|
|
|
import StatsBox from "@/components/pageComponents/StatsBox.vue";
|
|
|
-import { ref } from "vue";
|
|
|
+import { ref, onMounted } from "vue";
|
|
|
+import { useRoute } from "vue-router";
|
|
|
import recordItem from "@/components/recordItem.vue";
|
|
|
+import { Empty } from "vant";
|
|
|
+const route = useRoute();
|
|
|
|
|
|
-const statsData = ref([
|
|
|
- { value: "1258", unit: "元", desc: "总收益" },
|
|
|
- { value: "1258", unit: "元", desc: "投入成本" },
|
|
|
- { value: "118", unit: "次", desc: "服务次数" },
|
|
|
-]);
|
|
|
+const farmIdVal = ref(null);
|
|
|
+onMounted(() => {
|
|
|
+ farmIdVal.value = route.query.farmId;
|
|
|
+ getFarmDetail();
|
|
|
+ getFarmPastServiceCost();
|
|
|
+ getDetailList();
|
|
|
+});
|
|
|
|
|
|
-const contentData = ref([
|
|
|
- {
|
|
|
- targetId: "part1",
|
|
|
- title: "巡园农事",
|
|
|
- parentTitle: "秋梢期",
|
|
|
- isExpanded: false, // 添加展开状态
|
|
|
- hasApplied: false, // 是否已发起需求
|
|
|
- reCheckText: "通过精准农业技术的应用,作物产量实现了两位数的增长,病虫害的发生率大幅下降,土壤肥力的提升",
|
|
|
- beforeImage: "https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png",
|
|
|
- afterImage: "https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png",
|
|
|
- expert: 91356,
|
|
|
- orderStatus: 3,
|
|
|
- activeStatus: 0,
|
|
|
- regionId: 2,
|
|
|
- speciesId: "1",
|
|
|
- speciesName: "荔枝",
|
|
|
- farmWorkId: "699343457474318336",
|
|
|
- farmWorkLibId: "699343457474318336",
|
|
|
- farmWorkLibName: "梢期防虫",
|
|
|
- farmWorkName: "梢期防虫",
|
|
|
- expertIcon:
|
|
|
- "https://birdseye-img.sysuimars.com/birdseye-look-vue/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20250411150343.png",
|
|
|
- expertName: "韦帮稳",
|
|
|
- icon: 4,
|
|
|
- beforeExecuteDate: "2025-08-01",
|
|
|
- executeDate: "2025-08-15",
|
|
|
- code: "BZ-BC-04-SQFC-20",
|
|
|
- expertPrescription: "",
|
|
|
- condition: "单树嫩叶率大于20.0%",
|
|
|
- defaultFarmWork: 0,
|
|
|
- farmWorkType: 3,
|
|
|
- farmWorkTypeName: "病虫",
|
|
|
- usageMode: "叶面施",
|
|
|
- serviceMain: "广州泽秾丰农资有限公司",
|
|
|
- updateDate6: null,
|
|
|
- confirmPicture: [],
|
|
|
- executeMain: "广州泽秾丰农资有限公司",
|
|
|
- storeShortName: "泽秾丰",
|
|
|
- serviceRegion: "广州市从化区荔枝博览园",
|
|
|
- prescriptionList: [
|
|
|
- {
|
|
|
- name: "营养",
|
|
|
- pesticideFertilizerList: [
|
|
|
- {
|
|
|
- defaultDroneRatio: null,
|
|
|
- defaultName: "尿素",
|
|
|
- defaultRatio: 0,
|
|
|
- id: null,
|
|
|
- muPrice: null,
|
|
|
- muUsage: 15000.0,
|
|
|
- muUsage2: 15000.0,
|
|
|
- ratio: 0,
|
|
|
- ratio2: 0,
|
|
|
- remark: "",
|
|
|
- usageMode: "",
|
|
|
- usageModeList: ["叶面施、根部施"],
|
|
|
- orderId: null,
|
|
|
- pesticideFertilizerCode: "1001",
|
|
|
- pesticideFertilizerId: "1",
|
|
|
- pesticideFertilizerName: "尿素",
|
|
|
- brand: "山东联盟",
|
|
|
- typeName: "营养",
|
|
|
- price: 132,
|
|
|
- unit: "g",
|
|
|
- executeStyle: null,
|
|
|
- },
|
|
|
- {
|
|
|
- defaultDroneRatio: null,
|
|
|
- defaultName: "15-15-15复合肥",
|
|
|
- defaultRatio: 0,
|
|
|
- id: null,
|
|
|
- muPrice: null,
|
|
|
- muUsage: 45000.0,
|
|
|
- muUsage2: 45000.0,
|
|
|
- ratio: 0,
|
|
|
- ratio2: 0,
|
|
|
- remark: "",
|
|
|
- usageMode: "",
|
|
|
- usageModeList: ["根部施"],
|
|
|
- orderId: null,
|
|
|
- pesticideFertilizerCode: "1002",
|
|
|
- pesticideFertilizerId: "2",
|
|
|
- pesticideFertilizerName: "15-15-15复合肥",
|
|
|
- brand: "金正大",
|
|
|
- typeName: "营养",
|
|
|
- price: 220,
|
|
|
- unit: "g",
|
|
|
- executeStyle: null,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
-]);
|
|
|
+const farmDetail = ref({});
|
|
|
+const getFarmDetail = () => {
|
|
|
+ VE_API.user.getFarmDetail({ farmId: farmIdVal.value }).then(({ data }) => {
|
|
|
+ farmDetail.value = data || {};
|
|
|
+ });
|
|
|
+};
|
|
|
|
|
|
+const serviceStatsData = ref([]);
|
|
|
+const getFarmPastServiceCost = () => {
|
|
|
+ VE_API.user.getFarmPastServiceCost({ farmId: farmIdVal.value }).then(({ data }) => {
|
|
|
+ serviceStatsData.value = [
|
|
|
+ { value: data.totalCost, unit: "元", desc: "总收益" },
|
|
|
+ { value: data.totalCost, unit: "元", desc: "投入成本" },
|
|
|
+ { value: data.serviceCount, unit: "次", desc: "服务次数" },
|
|
|
+ ];
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+const detailList = ref([]);
|
|
|
+const getDetailList = () => {
|
|
|
+ const params = {
|
|
|
+ farmId: farmIdVal.value,
|
|
|
+ limit: 99,
|
|
|
+ page: 1,
|
|
|
+ flowStatus: "4,5",
|
|
|
+ };
|
|
|
+ VE_API.user.getDetailList(params).then(({ data }) => {
|
|
|
+ detailList.value = data || [];
|
|
|
+ });
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|