|
@@ -0,0 +1,354 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div class="farm-details-page">
|
|
|
|
|
+ <custom-header name="农场详情"></custom-header>
|
|
|
|
|
+ <div class="farm-details-content">
|
|
|
|
|
+ <farm-info-card
|
|
|
|
|
+ :data="{
|
|
|
|
|
+ farmName: '从化荔博园',
|
|
|
|
|
+ area: '200亩',
|
|
|
|
|
+ variety: '桂味',
|
|
|
|
|
+ address: '广东省广州市从化区从化区',
|
|
|
|
|
+ mapImage: '/map.png',
|
|
|
|
|
+ }"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #right>
|
|
|
|
|
+ <div>基本信息</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </farm-info-card>
|
|
|
|
|
+ <tabs v-model:active="activeTab" class="custom-tabs" scrollspy sticky offset-top="40" background="#f5f7fb">
|
|
|
|
|
+ <tab title="农情互动" class="tab-item">
|
|
|
|
|
+ <common-box title="农情互动">
|
|
|
|
|
+ <template #right>
|
|
|
|
|
+ <span>查看详情</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <div class="question-header">
|
|
|
|
|
+ <img class="question-icon" src="@/assets/img/home/ask-icon.png" alt="" />
|
|
|
|
|
+ <div class="question-title">在白点期,您当前农场是否出现白点?</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <template v-if="isImg">
|
|
|
|
|
+ <div class="answer-content">答:2025.05.18 已经出现白点</div>
|
|
|
|
|
+ <div class="answer-img">
|
|
|
|
|
+ <img src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png" alt="" />
|
|
|
|
|
+ <img src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png" alt="" />
|
|
|
|
|
+ <img src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png" alt="" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <div v-else class="answer-btn">
|
|
|
|
|
+ <div class="answer-btn-item">转发给客户</div>
|
|
|
|
|
+ <div class="answer-btn-item-group">
|
|
|
|
|
+ <div class="answer-btn-item">否</div>
|
|
|
|
|
+ <div class="answer-btn-item primary">是</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </common-box>
|
|
|
|
|
+ </tab>
|
|
|
|
|
+ <tab title="农事服务" class="tab-item">
|
|
|
|
|
+ <common-box title="农事服务">
|
|
|
|
|
+ <template #right>
|
|
|
|
|
+ <span>查看详情</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <tab-list
|
|
|
|
|
+ type="light"
|
|
|
|
|
+ v-model="farmServiceActiveTab"
|
|
|
|
|
+ :tabs="farmServiceTabs"
|
|
|
|
|
+ @change="handleFarmServiceTabChange"
|
|
|
|
|
+ />
|
|
|
|
|
+ <stats-box :stats-data="serviceStatsData" />
|
|
|
|
|
+ <div v-for="(section, index) in contentData" :key="index" class="content-section">
|
|
|
|
|
+ <record-item
|
|
|
|
|
+ :record-item-data="section"
|
|
|
|
|
+ onlyRecipeName
|
|
|
|
|
+ :content-mode="farmServiceActiveTab === 0 ? 'serviceDetail' : ''"
|
|
|
|
|
+ title-mode="default"
|
|
|
|
|
+ title-right-type="dot"
|
|
|
|
|
+ title-right-dot-text="2区"
|
|
|
|
|
+ class="recipe-item"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </common-box>
|
|
|
|
|
+ </tab>
|
|
|
|
|
+ <tab title="农场报告" class="tab-item">
|
|
|
|
|
+ <common-box title="农场报告">
|
|
|
|
|
+ <template #right>
|
|
|
|
|
+ <span>查看详情</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <span class="report-content"
|
|
|
|
|
+ >果园面积共XX亩,共有XX棵生产树。果园面积共XX亩,共有XX棵生产树。果园面积共XX亩,共有XX棵生产树。果园面积共XX亩,共有XX棵生产树。果园面积共XX亩,共有XX棵生产树。果园面积共XX亩,共有XX棵生产树。</span
|
|
|
|
|
+ >
|
|
|
|
|
+ </common-box>
|
|
|
|
|
+ </tab>
|
|
|
|
|
+ <tab title="农事方案" class="tab-item">
|
|
|
|
|
+ <common-box title="农事方案">
|
|
|
|
|
+ <template #right>
|
|
|
|
|
+ <span>查看更多</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <plan-list :menu-data="planMenuData" class="plan-list-wrapper" />
|
|
|
|
|
+ </common-box>
|
|
|
|
|
+ </tab>
|
|
|
|
|
+ </tabs>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="custom-bottom-fixed-btns">
|
|
|
|
|
+ <div class="bottom-btn secondary-btn">转发给客户</div>
|
|
|
|
|
+ <div class="bottom-btn primary-btn">在线沟通</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script setup>
|
|
|
|
|
+import { ref, onMounted } from "vue";
|
|
|
|
|
+import { useRoute } from "vue-router";
|
|
|
|
|
+import { Tab, Tabs } from "vant";
|
|
|
|
|
+import customHeader from "@/components/customHeader.vue";
|
|
|
|
|
+import FarmInfoCard from "@/components/pageComponents/FarmInfoCard.vue";
|
|
|
|
|
+import tabList from "@/components/pageComponents/TabList.vue";
|
|
|
|
|
+import commonBox from "@/components/pageComponents/CommonBox.vue";
|
|
|
|
|
+import StatsBox from "@/components/pageComponents/StatsBox.vue";
|
|
|
|
|
+import recordItem from "@/components/recordItem.vue";
|
|
|
|
|
+import PlanList from "@/components/pageComponents/PlanList.vue";
|
|
|
|
|
+
|
|
|
|
|
+const route = useRoute();
|
|
|
|
|
+const activeTab = ref(0);
|
|
|
|
|
+
|
|
|
|
|
+const planMenuData = ref([]);
|
|
|
|
|
+
|
|
|
|
|
+function getPlanWorkList() {
|
|
|
|
|
+ VE_API.home
|
|
|
|
|
+ .getPhenologyFarmWorkList({ farmId: 93301, containerId: route.query.containerId || 2 })
|
|
|
|
|
+ .then(({ data }) => {
|
|
|
|
|
+ planMenuData.value = data;
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ getPlanWorkList();
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+const farmServiceTabs = ["过往服务", "未来服务"];
|
|
|
|
|
+const farmServiceActiveTab = ref(0);
|
|
|
|
|
+
|
|
|
|
|
+const handleFarmServiceTabChange = (index) => {
|
|
|
|
|
+ console.log("切换到标签页:", index, farmServiceTabs[index]);
|
|
|
|
|
+ if(index === 0){
|
|
|
|
|
+ serviceStatsData.value = [
|
|
|
|
|
+ { value: "1258", unit: "元", desc: "总收益" },
|
|
|
|
|
+ { value: "1258", unit: "元", desc: "投入成本" },
|
|
|
|
|
+ { value: "118", unit: "次", desc: "服务次数" },
|
|
|
|
|
+ ];
|
|
|
|
|
+ }else{
|
|
|
|
|
+ serviceStatsData.value = [
|
|
|
|
|
+ { value: "1258", unit: "元", desc: "预计收益" },
|
|
|
|
|
+ { value: "1258", unit: "元", desc: "预计成本" },
|
|
|
|
|
+ ];
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+const serviceStatsData = ref([
|
|
|
|
|
+ { value: "1258", unit: "元", desc: "总收益" },
|
|
|
|
|
+ { value: "1258", unit: "元", desc: "投入成本" },
|
|
|
|
|
+ { value: "118", unit: "次", desc: "服务次数" },
|
|
|
|
|
+]);
|
|
|
|
|
+
|
|
|
|
|
+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 isImg = ref(false);
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<style scoped lang="scss">
|
|
|
|
|
+.farm-details-page {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 100vh;
|
|
|
|
|
+ background: #f2f3f5;
|
|
|
|
|
+ .farm-details-content {
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ padding: 10px 12px 70px 12px;
|
|
|
|
|
+ overflow: auto;
|
|
|
|
|
+ height: calc(100% - 40px);
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ .custom-tabs {
|
|
|
|
|
+ ::v-deep {
|
|
|
|
|
+ .van-tabs__wrap {
|
|
|
|
|
+ height: auto;
|
|
|
|
|
+ }
|
|
|
|
|
+ .van-tabs__nav {
|
|
|
|
|
+ .van-tab {
|
|
|
|
|
+ color: #8b8b8b;
|
|
|
|
|
+ background: #f7f8fa;
|
|
|
|
|
+ height: 34px;
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ border-radius: 25px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .van-tab--active {
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ background: #2199f8;
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .van-tabs__line {
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ }
|
|
|
|
|
+ .van-tabs__nav--line {
|
|
|
|
|
+ padding: 12px 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .tab-item + .tab-item {
|
|
|
|
|
+ margin-top: 12px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .question-header {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ margin-bottom: 6px;
|
|
|
|
|
+ gap: 8px;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ .question-icon {
|
|
|
|
|
+ width: 22px;
|
|
|
|
|
+ height: 20px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .answer-content {
|
|
|
|
|
+ color: #333333;
|
|
|
|
|
+ margin: 6px 0 10px 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ .answer-img {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ gap: 5px;
|
|
|
|
|
+ img {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ height: 105px;
|
|
|
|
|
+ border-radius: 5px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .content-section {
|
|
|
|
|
+ .recipe-item {
|
|
|
|
|
+ border: 1px solid rgba(0, 0, 0, 0.1);
|
|
|
|
|
+ margin: 12px 0 0 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .plan-list-wrapper {
|
|
|
|
|
+ height: 500px;
|
|
|
|
|
+ margin-top: 12px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .report-content {
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .answer-btn {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ margin-top: 10px;
|
|
|
|
|
+ > div {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ gap: 10px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .answer-btn-item {
|
|
|
|
|
+ padding: 7px 12px;
|
|
|
|
|
+ border-radius: 25px;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ background: rgba(33, 153, 248, 0.1);
|
|
|
|
|
+ color: #2199f8;
|
|
|
|
|
+ min-width: 52px;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ &.primary {
|
|
|
|
|
+ background: #2199f8;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|