浏览代码

feat:添加分区管理页面

wangsisi 4 天之前
父节点
当前提交
c3f7f8fbef

二进制
src/assets/img/map/map-icon.png


+ 122 - 0
src/components/pageComponents/locationSearch.vue

@@ -0,0 +1,122 @@
+<template>
+    <el-select class="location-search" v-model="locationVal" filterable remote clearable reserve-keyword placeholder="搜索位置"
+        :remote-method="remoteMethod" :loading="loading" @change="handleSearchRes" popper-class="location-search-popper"
+        :class="customClass" @clear="handleClear">
+        <el-option v-for="(item, index) in locationOptions.list" :key="index" :label="item.title"
+            :value="{ value: item.point, item }">
+            <span>{{ item.title }}</span>
+            <span class="sub-title">{{ item.province }}{{ item.city }}{{ item.district }}</span>
+        </el-option>
+        <template #prefix>
+            <el-icon><Search /></el-icon>
+        </template>
+    </el-select>
+</template>
+
+<script setup>
+import { ref, reactive } from "vue";
+import { transformFromGCJToWGS } from "@/utils/WSCoordinate.js";
+
+const MAP_KEY = "CZLBZ-LJICQ-R4A5J-BN62X-YXCRJ-GNBUT";
+
+const props = defineProps({
+    userLocation: {
+        type: String,
+        default: "113.61702297075017,23.584863449735067",
+    },
+    customClass: {
+        type: String,
+        default: "",
+    },
+});
+
+const emit = defineEmits(["change"]);
+
+const locationVal = ref(null);
+const locationOptions = reactive({
+    list: [],
+});
+const loading = ref(false);
+
+const remoteMethod = async (keyword) => {
+    if (keyword) {
+        locationOptions.list = [];
+        loading.value = true;
+        const params = {
+            key: MAP_KEY,
+            keyword,
+            location: props.userLocation,
+        };
+        await VE_API.old_mini_map.getCtiyList({ word: keyword }).then(({ data }) => {
+            if (data && data.length) {
+                data.forEach((item) => {
+                    item.point = item.location.lat + "," + item.location.lng;
+                    locationOptions.list.push(item);
+                });
+            }
+        });
+        VE_API.old_mini_map.search(params).then(({ data }) => {
+            loading.value = false;
+            data.forEach((item) => {
+                item.point = item.location.lat + "," + item.location.lng;
+                locationOptions.list.push(item);
+            });
+        });
+    } else {
+        locationOptions.list = [];
+    }
+};
+
+const handleSearchRes = (v) => {
+    if (!v) return;
+    const parts = v.value.split(",");
+    let { latitude, longitude } = transformFromGCJToWGS(parseFloat(parts[0]), parseFloat(parts[1]));
+    const coordinateArray = [longitude, latitude];
+
+    emit("change", {
+        coordinateArray,
+        point: `POINT (${coordinateArray[0]} ${coordinateArray[1]})`,
+        address: v.item?.title || v.item?.address,
+        pointAddress: v.item?.province + v.item?.city + v.item?.district,
+        city: v.item?.city + v.item?.district || '',
+        item: v.item,
+    });
+};
+
+const handleClear = () => {
+    emit("change", {
+        coordinateArray: null,
+        point: null,
+        address: null,
+    });
+    locationVal.value = null;
+    locationOptions.list = [];
+    loading.value = false;
+};
+</script>
+
+<style lang="scss">
+.location-search {
+    .el-select__wrapper {
+        background: rgba(0, 0, 0, 0.3);
+        box-shadow: none;
+        border-radius: 25px;
+        border: 1px solid rgba(255, 255, 255, 0.4);
+    }
+    .el-select__placeholder{
+        color: rgba(255, 255, 255, 0.7);
+    }
+}
+.location-search-popper {
+    .el-select-dropdown__list {
+        max-width: 96vw;
+        overflow-x: auto;
+    }
+
+    .sub-title {
+        padding-left: 6px;
+        font-size: 12px;
+        color: #ccc;
+    }
+}
+</style>

+ 7 - 57
src/router/globalRoutes.js

@@ -13,12 +13,6 @@ export default [
         component: () => import("@/views/old_mini/dev_login.vue"),
     },
     {
-        path: "/home",
-        name: "Home",
-        meta: { showTabbar: true, keepAlive: true },
-        component: () => import("@/views/old_mini/home/index.vue"),
-    },
-    {
         path: "/monitor",
         name: "Monitor",
         meta: { showTabbar: true, keepAlive: true },
@@ -45,49 +39,12 @@ export default [
         meta: { keepAlive: true },
         component: () => import("@/views/old_mini/create_farm/editMap.vue"),
     },
-    // 农场照片
-    {
-        path: "/farm_photo",
-        name: "FarmPhoto",
-        component: () => import("@/views/old_mini/home/patrolPhoto.vue"),
-    },
     // 聊天
     {
         path: "/chat_frame",
         name: "ChatFrame",
         meta: { keepAlive: true },
         component: () => import("@/views/old_mini/chat_frame/index.vue"),
-    },// 咨询专家
-    {
-        path: "/expert_list",
-        name: "ExpertList",
-        component: () => import("@/views/old_mini/home/subPages/expertList.vue"),
-    },
-    // 识别结果
-    {
-        path: "/recognize",
-        name: "Recognize",
-        component: () => import("@/views/old_mini/home/subPages/recognize.vue"),
-    },
-    // 农场管理详情
-    {
-        path: "/farm_manage_detail",
-        name: "FarmManageDetail",
-        component: () => import("@/views/old_mini/home/index.vue"),
-    },
-    // 气象预警详情/农事预警详情
-    {
-        path: "/warning_detail",
-        name: "WarningDetail",
-        meta: { keepAlive: true },
-        component: () => import("@/views/old_mini/home/subPages/warningDetail.vue"),
-    },
-    // 专家问答详情
-    {
-        path: "/expert_detail",
-        name: "ExpertDetail",
-        meta: { keepAlive: true },
-        component: () => import("@/views/old_mini/home/subPages/expertDetail.vue"),
     },
     // 农事规划
     {
@@ -108,20 +65,6 @@ export default [
         meta: { keepAlive: true },
         component: () => import("@/views/old_mini/monitor/subPages/agriculturalDetail.vue"),
     },
-    // 处方页面
-    {
-        path: "/prescription",
-        name: "Prescription",
-        meta: { keepAlive: true },
-        component: () => import("@/views/old_mini/home/subPages/prescriptionPage.vue"),
-    },
-    // 知识库
-    {
-        path: "/knowledge_list",
-        name: "KnowledgeList",
-        meta: { keepAlive: true },
-        component: () => import("@/views/old_mini/home/subPages/knowledgeList.vue"),
-    },
     // 成果报告
     {
         path: "/achievement_report",
@@ -238,4 +181,11 @@ export default [
         meta: { keepAlive: true },
         component: () => import("@/views/old_mini/recordDetails/index.vue"),
     },
+    // 地图管理
+    {
+        path: "/map_manage",
+        name: "MapManage",
+        meta: { keepAlive: true },
+        component: () => import("@/views/old_mini/recordDetails/mapManage.vue"),
+    },
 ];

+ 0 - 0
src/views/old_mini/common_map/drawMap.js


+ 0 - 455
src/views/old_mini/home/components/AgriculturalDynamics.vue

@@ -1,455 +0,0 @@
-<template>
-    <div class="agricultural-dynamics">
-        <!-- 任务列表 -->
-        <div class="task-list">
-            <div v-for="(task, index) in taskList" :key="index" class="task-item">
-                <div class="task-content" @click="handleTaskAction(task)">
-                    <div class="task-header">
-                        <div class="task-status-tag">{{ task.flowStatus === 4 ? '待完成' : '待复核' }}</div>
-                        <div class="task-title">{{ task.farmWorkName }}</div>
-                    </div>
-                    <div class="task-time" v-if="task.flowStatus === 5">
-                        复核时间 
-                    {{ task.reviewDate }}</div>
-                    <div class="task-time" v-if="task.flowStatus === 4 && task.expectedExecuteDate">执行时间 {{ task.expectedExecuteDate }}</div>
-                    <div class="task-time deadline" v-if="task.flowStatus === 4 && !task.expectedExecuteDate">截止时间 {{ task.executeDeadlineDate }}</div>
-                </div>
-                <div v-if="task.flowStatus === 5" class="task-action" :class="{ 'call-text': getButtonText(task) }" @click="handleAction(task)">
-                    {{ getButtonText(task) ? '提醒复核' : '上传复核照片' }}
-                </div>
-                <div v-else-if="task.flowStatus === 4 && task.expectedExecuteDate" class="task-action" :class="{ 'call-text': getButtonText(task) }" @click="showOfferPopup(task)">
-                    {{ getButtonText(task) ? "提醒执行" : "上传照片" }}
-                </div>
-                <div v-else-if="task.flowStatus === 4 && !task.expectedExecuteDate" class="task-action orange" :class="{ 'call-text': getButtonText(task) }" @click="selectExecuteTime(task)">
-                    {{ getButtonText(task) ? "提醒确认执行时间" : "确认执行时间" }}
-                </div>
-            </div>
-        </div>
-
-        <div class="title">农情互动</div>
-        <!-- 内容区域 -->
-        <div class="agricultural-list">
-            <div v-if="!unansweredList.length" class="empty-block">暂无数据</div>
-            <template v-else>
-                <div class="agricultural-item" v-for="(item, index) in unansweredList" :key="index">
-                    <!-- 头部区域 -->
-                    <div class="header-section">
-                        <div class="header-left">
-                            <div class="farm-name van-ellipsis">{{ item.farmName }}</div>
-                            <div class="tag-group">
-                                <div class="tag tag-blue">{{ item.typeName }}</div>
-                                <div class="tag" :class="{'tag-orange': item.userType === 2}">{{ item.userType === 1 ? '普通客户' : '托管客户' }}</div>
-                            </div>
-                        </div>
-                        <div class="remind-btn" @click="handleRemind(item)">提醒客户</div>
-                    </div>
-                    <!-- 警告通知块 -->
-                    <div
-                        class="warning-block"
-                        v-if="item.latestPhenologyProgressBroadcast"
-                        v-html="item.latestPhenologyProgressBroadcast?.content"
-                    ></div>
-
-                    <!-- 时间轴组件,只负责时间轴区域 -->
-                    <AgriculturalInteractionCard :item="item" @updateList="updateAllData" />
-                </div>
-            </template>
-        </div>
-    </div>
-    <offer-popup ref="offerPopupRef" @uploadSuccess="getTaskList"></offer-popup>
-
-    <!-- 确认执行时间 -->
-    <calendar
-        teleport="#app"
-        v-model:show="showCalendar"
-        @confirm="onConfirmExecuteTime"
-        :min-date="minDate"
-        :max-date="maxDate"
-    />
-
-    <!-- 上传复核照片 -->
-    <upload-execute ref="uploadExecuteRef" :onlyShare="false" @uploadSuccess="handleUploadSuccess" />
-</template>
-
-<script setup>
-import router from "@/router";
-import { ref, onMounted, onActivated } from "vue";
-import { Calendar } from "vant";
-import wx from "weixin-js-sdk";
-import { ElMessage } from "element-plus";
-import offerPopup from "@/components/popup/offerPopup.vue";
-import AgriculturalInteractionCard from "@/components/pageComponents/AgriculturalInteractionCard.vue";
-import { formatDate } from "@/common/commonFun";
-import uploadExecute from "@/views/old_mini/task_condition/components/uploadExecute.vue";
-// 任务列表数据
-const taskList = ref([]);
-
-const handleTaskAction = (item) => {
-    router.push({
-        path: "/completed_work",
-        query: { miniJson: JSON.stringify({ id: item.id }) },
-    });
-};
-
-// 计算复核时间:executeDate + reviewIntervalDays
-const calculateReviewDate = (task) => {
-    if (!task?.executeDate) {
-        return "--";
-    }
-
-    const executeDate = new Date(task.executeDate);
-    const reviewIntervalDays = Number(task?.reviewIntervalDays || 0);
-
-    // 将执行日期加上间隔天数
-    executeDate.setDate(executeDate.getDate() + reviewIntervalDays);
-
-    // 格式化为 YYYY-MM-DD
-    const year = executeDate.getFullYear();
-    const month = String(executeDate.getMonth() + 1).padStart(2, "0");
-    const day = String(executeDate.getDate()).padStart(2, "0");
-
-    return `${year}-${month}-${day}`;
-};
-
-onMounted(() => {
-    const userInfo = JSON.parse(localStorage.getItem("localUserInfo"));
-    agriculturalRole.value = userInfo.agriculturalRole;
-    userId.value = userInfo.id;
-});
-
-const agriculturalRole = ref(null);
-const userId = ref(null);
-
-const offerPopupRef = ref(null);
-const showOfferPopup = (item) => {
-    if(getButtonText(item)) {
-        const query = {
-            askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
-            shareText: '向您分享了一条农事执行提醒,请您尽快执行',
-            targetUrl: `completed_work`,
-            paramsPage: JSON.stringify({id: item.id}),
-            imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/invite_bg.png',
-        };
-        wx.miniProgram.navigateTo({
-            url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
-        });
-    }else{
-        offerPopupRef.value.openPopup(item);
-    }
-};
-
-const uploadExecuteRef = ref(null);
-function handleAction(item) {
-    if(getButtonText(item)) {
-        const query = {
-            askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
-            shareText: '向您分享了一条农事复核提醒,请您尽快复核',
-            targetUrl: `review_work`,
-            paramsPage: JSON.stringify({id: item.id}),
-            imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/invite_bg.png',
-        };
-        wx.miniProgram.navigateTo({
-            url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
-        });
-    }else{
-        setTimeout(() => {
-            uploadExecuteRef.value.showPopup(item, "share-sheet");
-        }, 10);
-    }
-}
-
-function handleUploadSuccess() {
-    getTaskList();
-}
-
-const selectExecuteTime = (item) => {
-    if (getButtonText(item)) {
-        const query = {
-            askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
-            shareText: '向您分享了一条农事提醒,请您尽快确认执行时间',
-            targetUrl: `completed_work`,
-            paramsPage: JSON.stringify({id: item.id}),
-            imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/invite_bg.png',
-        };
-        wx.miniProgram.navigateTo({
-            url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
-        });
-    } else {
-        executeItem.value = item;
-        maxDate.value = new Date(item.executeDeadlineDate);
-        showCalendar.value = true;
-    }
-};
-
-// 获取上传按钮的文本(计算属性方式)
-const getButtonText = (item) => {
-    return agriculturalRole.value === 1 || (agriculturalRole.value === 2 && item.executorUserId != userId.value);
-};
-
-const showCalendar = ref(false);
-const maxDate = ref();
-// 最小日期设置为今天,今天可以选择
-const minDate = new Date();
-const executeItem = ref(null);
-
-const onConfirmExecuteTime = (date) => {
-    showCalendar.value = false;
-    VE_API.z_farm_work_record
-        .updateExpectedExecuteDate({ recordId: executeItem.value.id, expectedExecuteDate: formatDate(date) })
-        .then((res) => {
-            if (res.code === 0) {
-                ElMessage.success("操作成功");
-                getTaskList();
-            }
-        });
-};
-
-const handleRemind = (item) => {
-    router.push(`/remind_customer?farmId=${item.farmId}`);
-};
-
-onActivated(() => {
-    updateAllData();
-});
-
-const updateAllData = () => {
-    getUnansweredFarms();
-    getTaskList();
-};
-//农情互动的农场列表接口(分页)
-const getTaskList = async () => {
-    // 同时获取待完成(4)和待复核(5)的任务
-    const [res4, res5] = await Promise.all([
-        VE_API.z_farm_work_record.generalPendingFarmWork({ role: 2, flowStatus: 4 }),
-        VE_API.z_farm_work_record.generalPendingFarmWork({ role: 2, flowStatus: 5 })
-    ]);
-    
-    const tasks4 = (res4.data || []).map(task => ({
-        ...task,
-        reviewDate: calculateReviewDate(task)
-    }));
-    
-    const tasks5 = (res5.data || []).map(task => ({
-        ...task,
-        reviewDate: calculateReviewDate(task)
-    }));
-    
-    // 合并两种状态的任务,总共取前2个
-    taskList.value = [...tasks4, ...tasks5].slice(0, 2);
-};
-
-const unansweredList = ref([]);
-const getUnansweredFarms = async () => {
-    const params = {
-        page: 0,
-        limit: 3,
-        flowStatus: 5,
-    };
-    const res = await VE_API.home.listUnansweredFarms(params);
-    unansweredList.value = (res.data || []).map((item) => ({
-        ...item,
-        timelineList: [],
-    }));
-
-    // 串行请求,一个完成后再请求下一个
-    if (unansweredList.value.length) {
-        for (let i = 0; i < unansweredList.value.length; i++) {
-            await getFutureFarmWorkWarning(unansweredList.value[i]);
-        }
-    }
-
-    unansweredList.value = unansweredList.value.filter(item => item.timelineList.length > 0);
-};
-
-//查询未来农事预警
-const getFutureFarmWorkWarning = async (item) => {
-    const res = await VE_API.home.listFutureFarmWorkWarning({ farmId: item.farmId });
-    item.timelineList = res.data || [];
-};
-</script>
-
-<style scoped lang="scss">
-.agricultural-dynamics {
-    padding: 0 10px;
-
-    // 任务列表样式
-    .task-list {
-        .task-item {
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            background-color: #ffffff;
-            border-radius: 8px;
-            padding: 12px;
-            margin-top: 10px;
-            position: relative;
-            overflow: hidden;
-            &::after {
-                content: "";
-                position: absolute;
-                top: -10px;
-                right: 0;
-                width: 72px;
-                height: 72px;
-                pointer-events: none;
-                background: url("@/assets/img/home/task-icon.png") no-repeat center center / 100% 100%;
-            }
-
-            .task-content {
-                flex: 1;
-                .task-header {
-                    display: flex;
-                    align-items: center;
-                    margin-bottom: 4px;
-                    gap: 8px;
-                }
-
-                .task-status-tag {
-                    background-color: rgba(33, 153, 248, 0.1);
-                    color: #2199f8;
-                    font-size: 12px;
-                    padding: 1px 6px;
-                    border-radius: 2px;
-                }
-
-                .task-title {
-                    font-size: 16px;
-                    font-weight: 500;
-                    color: #1d2129;
-                }
-
-                .task-time {
-                    font-size: 12px;
-                    color: rgba(78, 89, 105, 0.5);
-                    &.deadline {
-                        color: rgba(255, 85, 85, 0.7);
-                    }
-                }
-            }
-
-            .task-action {
-                flex: none;
-                background-color: rgba(33, 153, 248, 0.1);
-                color: #2199f8;
-                border-radius: 25px;
-                padding: 0px 14px;
-                font-size: 12px;
-                height: 28px;
-                box-sizing: border-box;
-                line-height: 28px;
-                &.orange {
-                    color: #ff953d;
-                    background: rgba(255, 149, 61, 0.1);
-                }
-                &.call-text {
-                    color: #868686;
-                    background: none;
-                    border: 0.5px solid #D1D1D1;
-                }
-            }
-        }
-    }
-
-    .title {
-        font-size: 16px;
-        font-weight: 500;
-        color: #1d2129;
-        margin-top: 10px;
-    }
-
-    .agricultural-list {
-        .empty-block {
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            height: 120px;
-            color: #a0a0a0;
-            font-size: 14px;
-            background-color: #ffffff;
-            border-radius: 8px;
-            margin-top: 8px;
-        }
-
-        .agricultural-item {
-            background-color: #ffffff;
-            border-radius: 8px;
-            padding: 8px 12px;
-            margin-top: 8px;
-
-            // 头部区域样式
-            .header-section {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                padding-bottom: 5px;
-                border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
-
-                .header-left {
-                    display: flex;
-                    align-items: center;
-                    gap: 8px;
-                    width: calc(100% - 80px);
-                    .farm-name {
-                        font-size: 16px;
-                        font-weight: 500;
-                        color: #1d2129;
-                        max-width: calc(100% - 130px);
-                    }
-
-                    .tag-group {
-                        display: flex;
-                        gap: 4px;
-                        .tag {
-                            padding: 2px 8px;
-                            border-radius: 2px;
-                            font-size: 12px;
-                            color: #848282;
-                            background-color: rgba(148, 148, 148, 0.1);
-
-                            &.tag-blue {
-                                background-color: #e8f3ff;
-                                color: #2199f8;
-                            }
-
-                            &.tag-orange {
-                                background-color: rgba(255, 149, 61, 0.1);
-                                color: #ff953d;
-                            }
-                        }
-                    }
-                }
-
-                .remind-btn {
-                    background-color: #2199f8;
-                    color: #ffffff;
-                    border-radius: 25px;
-                    padding: 7px 12px;
-                    font-size: 12px;
-                }
-            }
-
-            // 警告通知块样式
-            .warning-block {
-                background-color: rgba(33, 153, 248, 0.1);
-                border-radius: 5px;
-                padding: 5px;
-                margin-top: 8px;
-                font-size: 12px;
-                color: #252525;
-                ::v-deep {
-                    p {
-                        padding: 0;
-                        margin: 0;
-                    }
-                }
-            }
-        }
-    }
-}
-</style>
-
-<style lang="scss">
-.van-calendar__popup {
-    z-index: 9999 !important;
-}
-</style>

+ 0 - 424
src/views/old_mini/home/components/homeFloatingPanel.vue

@@ -1,424 +0,0 @@
-<template>
-    <div class="home-floating-panel">
-        <floating-panel
-            class="floating-panel"
-            :class="{ 'background-panel': isBackground }"
-            v-model:height="height"
-            :anchors="anchors"
-            :content-draggable="false"
-            @height-change="handleHeightChange"
-        >
-            <template #header>
-                <div class="floating-panel-header" :class="{ 'file-header-active': activeTab === 0 }">
-                    <div class="tabs">
-                        <div
-                            :class="['tab-item', activeTab === index ? 'active' : '']"
-                            v-for="(tab, index) in tabs"
-                            :key="tab"
-                            @click="handleTabClick(index)"
-                        >
-                            {{ tab }}
-                        </div>
-                    </div>
-                    <div class="file-header" v-if="activeTab === 1">
-                        <div class="select-group">
-                            <el-select class="select-item" v-model="dateValue" placeholder="Select">
-                                <el-option
-                                    v-for="item in dateOptions"
-                                    :key="item.value"
-                                    :label="item.label"
-                                    :value="item.value"
-                                />
-                            </el-select>
-                            <el-select class="select-item" v-model="areaValue" placeholder="Select">
-                                <el-option
-                                    v-for="item in areaOptions"
-                                    :key="item.value"
-                                    :label="item.label"
-                                    :value="item.value"
-                                />
-                            </el-select>
-                        </div>
-                        <el-anchor
-                            :container="containerRef"
-                            class="tabs-content-group"
-                            direction="horizontal"
-                            type="default"
-                            :offset="0"
-                            @click="handleClick"
-                        >
-                            <el-anchor-link
-                                class="tabs-content-item"
-                                v-for="(tab, index) in tabsContent"
-                                :key="tab"
-                                @click="handleTabsContentClick(index)"
-                                :href="'#part' + (index + 1)"
-                                :title="tab"
-                            ></el-anchor-link>
-                        </el-anchor>
-                    </div>
-                </div>
-            </template>
-            <div class="floating-panel-content" v-show="activeTab === 0">
-                <record-task :cardContentHeight="cardContentHeight"></record-task>
-            </div>
-            <div class="floating-panel-content" ref="cardContentRef" v-show="activeTab === 1">
-                <div class="card-content-group" ref="containerRef" :style="{ height: `${cardContentHeight}px` }">
-                    <div class="card-content-item" id="part1">
-                        <div class="card-content-item-title">果园总览</div>
-                        <div class="card-content-item-content">
-                            <div class="card-text">果园面积共XX亩,共有XX棵生产树。</div>
-                            <div class="card-text">
-                                本次飞巡拍摄了XX张照片,包括了XX棵树,目前为施用根部有机肥阶段,根据树体冠幅大小,果园预计施用有机肥XXkg。
-                            </div>
-                            <div class="card-text">
-                                目前XX%的树体暂未萌动新梢,需要进行剪枝农事,提高树体光合效率与通风效率。
-                            </div>
-                        </div>
-                    </div>
-                    <div class="card-content-item" id="part2">
-                        <div class="card-content-item-title">整体园相</div>
-                        <div class="card-content-item-content">
-                            <div class="card-name">透光率</div>
-                            <div class="card-value">
-                                透光率体现树体自身郁闭程度,当前XX%的树体透光性较差,可能造成整体减产XX%,需立即执行剪枝农事;XX%的树体透光正常,建议继续保持现有管理措施并及时巡园。
-                            </div>
-                        </div>
-                        <div class="card-content-item-content">
-                            <div class="card-name">通风率</div>
-                            <div class="card-value">
-                                透光率体现树体自身郁闭程度,当前XX%的树体透光性较差,可能造成整体减产XX%,需立即执行剪枝农事;XX%的树体透光正常,建议继续保持现有管理措施并及时巡园。
-                            </div>
-                            <div class="map-wrap">
-                                <img class="map-img" src="@/assets/img/home/map.png" alt="" />
-                                <div class="map-text">剪枝农事地图</div>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="card-content-item" id="part3">
-                        <div class="card-content-item-title">营养管理</div>
-                        <div class="card-content-item-content">
-                            <div class="card-name">根肥</div>
-                            <div class="card-value">
-                                生产树中,树体冠幅平均表面积XX平方米,预计需要使用有机肥XXkg(或者平衡肥+尿素XXkg)用来培养健壮秋梢。如遭遇持续阴雨,可配合芸苔素增强光合作用。
-                            </div>
-                            <div class="map-wrap">
-                                <img class="map-img" src="@/assets/img/home/map.png" alt="" />
-                                <div class="map-text">根肥农事地图</div>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="card-content-item" id="part4">
-                        <div class="card-content-item-title">病虫管理</div>
-                        <div class="card-content-item-content">
-                            <div class="card-value">
-                                在以萌动新梢的树体中,2%的树体新梢小叶变为红黄色,长度10-15cm,极易被病虫啃食,预计XX月XX日果园进入虫害爆发高峰期,需要做好虫害预防工作。
-                            </div>
-                            <div class="map-wrap">
-                                <img class="map-img" src="@/assets/img/home/map.png" alt="" />
-                                <div class="map-text">防虫农事地图</div>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="card-content-item" id="part5">
-                        <div class="card-content-item-title">农事记录</div>
-                        <div class="card-content-item-content">农事记录</div>
-                    </div>
-                </div>
-            </div>
-        </floating-panel>
-        <div class="expand-btn-wrap" v-show="height === defalutHeight">
-            <span>农事任务/农事档案</span>
-            <div class="expand-btn" @click="handleExpandBtnClick">
-                <span>展开</span>
-                <el-icon><ArrowUpBold /></el-icon>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { FloatingPanel } from "vant";
-import { useStore } from "vuex";
-import { computed, ref } from "vue";
-import RecordTask from "./recordTask.vue";
-const props = defineProps({
-    isExpert: {
-        type: Boolean,
-        default: false,
-    },
-});
-
-const store = useStore();
-// const tabBarHeight = computed(() => store.state.home.tabBarHeight);
-const tabBarHeight = ref(localStorage.getItem("tabBarHeight") * 1 || 50);
-
-const defalutHeight = ref(0);
-const anchors = ref([defalutHeight.value, 310 + tabBarHeight.value, Math.round(1 * window.innerHeight) - (props.isExpert ? 40 : 0)]);
-const height = ref(anchors.value[1]);
-
-const containerRef = ref(null);
-const handleClick = (e) => {
-    e.preventDefault();
-};
-
-const activeTab = ref(0);
-const tabs = ref(["农事任务", "农场档案"]);
-
-const handleTabClick = (index) => {
-    activeTab.value = index;
-};
-
-const dateValue = ref("2025-08-28");
-const dateOptions = [
-    {
-        value: "2025-08-28",
-        label: "2025-08-28",
-    },
-];
-
-const areaValue = ref("1");
-const areaOptions = [
-    {
-        value: "1",
-        label: "全部区域",
-    },
-];
-
-const tabsContent = ref(["果园总览", "整体园相", "营养管理", "病虫管理", "农事记录"]);
-
-const activeTabsContent = ref(0);
-const handleTabsContentClick = (index) => {
-    activeTabsContent.value = index;
-};
-
-const emit = defineEmits(["heightChange"]);
-
-const cardContentRef = ref(null);
-const isBackground = ref(false);
-const handleHeightChange = ({ height }) => {
-    isBackground.value = false;
-    if (height > anchors.value[1]) {
-        isBackground.value = true;
-    }
-    if (height === anchors.value[1]) {
-        cardContentHeight.value = 180;
-        cardContentRef.value.scrollTo({ top: 0, behavior: "smooth" });
-    } else if (height === anchors.value[2]) {
-        cardContentHeight.value = Math.round(1 * window.innerHeight) - (tabBarHeight.value - (props.isExpert ? 40 : 0)) - 180;
-    }
-    emit("heightChange", height);
-};
-
-const cardContentHeight = ref(180);
-const handleExpandBtnClick = () => {
-    cardContentHeight.value = 180;
-    height.value = anchors.value[1];
-    cardContentRef.value.scrollTo({ top: 0, behavior: "smooth" });
-    emit("heightChange", anchors.value[1]);
-};
-</script>
-
-<style lang="scss" scoped>
-.van-floating-panel {
-    border-radius: 0;
-}
-.floating-panel {
-    width: 100%;
-    background: linear-gradient(180deg, transparent 0%, #f5f7fb 14%);
-    ::v-deep {
-        .van-floating-panel__content {
-            background: transparent;
-            overflow: hidden;
-        }
-    }
-    .floating-panel-header {
-        width: calc(100% - 24px);
-        border-radius: 14px;
-        margin: 0 auto 10px;
-        background: #fff;
-        &.file-header-active{
-            border-radius: 14px 14px 0 0;
-            margin-bottom: 0;
-        }
-        .tabs {
-            display: flex;
-            .tab-item {
-                flex: 1;
-                text-align: center;
-                font-size: 16px;
-                color: rgba(0, 0, 0, 0.5);
-                font-weight: 500;
-                padding: 10px 0;
-                &.active {
-                    color: #2199f8;
-                    border-radius: 14px 14px 0 0;
-                    background: linear-gradient(180deg, #cee5fb 0%, #fff 80%);
-                }
-            }
-        }
-        .file-header {
-            .select-group {
-                display: flex;
-                justify-content: center;
-                padding-top: 5px;
-                .select-item {
-                    width: 115px;
-                    ::v-deep {
-                        .el-select__wrapper {
-                            text-align: center;
-                            gap: 2px;
-                            box-shadow: none;
-                            justify-content: center;
-                        }
-                        .el-select__selection {
-                            flex: none;
-                            width: fit-content;
-                        }
-                        .el-select__placeholder {
-                            position: static;
-                            transform: none;
-                            width: fit-content;
-                            color: #000;
-                        }
-                        .el-select__caret {
-                            color: #000;
-                        }
-                    }
-                }
-                .select-item:first-child {
-                    margin-right: 10px;
-                }
-            }
-            ::v-deep{
-                .el-anchor{
-                    --el-anchor-line-height: auto;
-                }
-                .el-anchor__marker{
-                    height: 0;
-                }
-                .el-anchor.el-anchor--horizontal .el-anchor__list{
-                    width: 100%;
-                }
-                .el-anchor__link.is-active{
-                    background: rgba(33, 153, 248, 0.2);
-                }
-            }
-            .tabs-content-group {
-                display: flex;
-                justify-content: space-evenly;
-                padding: 5px 8px;
-                background-color: transparent;
-                .tabs-content-item {
-                    flex: 1;
-                    font-size: 14px;
-                    color: rgba(0, 0, 0, 0.5);
-                    font-weight: 500;
-                    padding: 1px 0;
-                    border-radius: 14px;
-                    text-align: center;
-                }
-            }
-        }
-    }
-    .floating-panel-content {
-        width: calc(100% - 24px);
-        height: 100%;
-        margin: 0 auto;
-        .card-content-group {
-            padding-bottom: 12px;
-            height: 100%;
-            box-sizing: border-box;
-            overflow: auto;
-            .card-content-item {
-                border-radius: 14px;
-                padding: 12px;
-                background: #fff;
-                color: #171717;
-
-                .card-content-item-title {
-                    font-size: 16px;
-                    font-weight: 500;
-                    text-align: center;
-                    position: relative;
-                    &::before {
-                        content: "";
-                        position: absolute;
-                        left: 50%;
-                        transform: translateX(-50%);
-                        bottom: -1px;
-                        width: 66px;
-                        height: 8px;
-                        background: rgba(33, 153, 248, 0.3);
-                        border-radius: 4px;
-                    }
-                }
-                .card-content-item-content {
-                    margin-top: 12px;
-                    border-radius: 8px;
-                    background: rgba(238, 238, 238, 0.3);
-                    padding: 10px;
-                    line-height: 21px;
-                    .card-name {
-                        font-weight: 500;
-                    }
-                    .card-value {
-                        font-size: 12px;
-                        color: rgba(23, 23, 23, 0.6);
-                    }
-                    .map-wrap {
-                        margin-top: 10px;
-                        .map-img {
-                            width: 100%;
-                            height: 137px;
-                        }
-                        .map-text {
-                            font-size: 12px;
-                            color: rgba(23, 23, 23, 0.6);
-                            text-align: center;
-                            margin-top: 5px;
-                        }
-                    }
-                    .card-text + .card-text {
-                        margin-top: 5px;
-                    }
-                }
-            }
-
-            .card-content-item + .card-content-item {
-                margin-top: 10px;
-            }
-        }
-    }
-    &.background-panel {
-        background: #f5f7fb;
-        .floating-panel-header {
-            margin-top: 12px;
-        }
-    }
-}
-
-.expand-btn-wrap{
-    position: absolute;
-    bottom: 62px;
-    left: 12px;
-    width: calc(100% - 24px);
-    background-image: linear-gradient(180deg, #d7eafc 0%, #ffffff 100%);
-    border-radius: 14px;
-    padding: 15px 12px;
-    box-sizing: border-box;
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    font-weight: 500;
-    font-size: 15px;
-    .expand-btn{
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        gap: 4px;
-        font-size: 13px;
-        color: #2199f8;
-    }
-}
-</style>

+ 0 - 284
src/views/old_mini/home/components/knowledgeCard.vue

@@ -1,284 +0,0 @@
-<template>
-    <div class="knowledge-card">
-        <div class="knowledge-header">
-            <div class="knowledge-title">
-                <div class="title-item" :class="{ active: activeKnowledgeId === 8 }" @click="handleKnowledgeClick(8)">
-                    焦点话题
-                </div>
-                <div class="title-item" :class="{ active: activeKnowledgeId === 6 }" @click="handleKnowledgeClick(6)">
-                    种植精华
-                </div>
-                <!-- <div class="title-item" :class="{ active: activeKnowledgeId === 7 }" @click="handleKnowledgeClick(7)">
-                    实战操作
-                </div> -->
-            </div>
-            <!-- <div class="more-text" @click="handleMoreClick">
-                更多<el-icon class="more-icon"><ArrowRight /></el-icon>
-            </div> -->
-        </div>
-        <div class="knowledge-content focus-content" v-if="activeKnowledgeId === 8">
-            <div
-                class="focus-item"
-                @click="handleBannerClick(item.id)"
-                v-for="(item, index) in knowledgeList"
-                :key="index"
-            >
-                <img class="thumb" :src="item.media?.[0]" alt="" />
-                <div class="focus-content">
-                    <div class="title van-ellipsis">{{ item.title }}</div>
-                    <div class="focus-expert">
-                        <div class="expert-name">
-                            <el-avatar :size="22" :src="item.expertAvatar+resize_300" />
-                            {{ item.expertName || '专家' }}
-                            <span class="expert-text">发表了回复,点击查看</span>
-                        </div>
-                        <div class="date">{{ formatDate(item.createTime) }}</div>
-                    </div>
-                    <!-- <div class="focus-answer">
-                        <div class="answer-icon">
-                            答
-                        </div>
-                        {{ item.summary }}
-                    </div> -->
-                </div>
-            </div>
-            <div class="no-data" v-if="knowledgeList.length === 0">暂无数据</div>
-        </div>
-        <div class="knowledge-content" v-else>
-            <div
-                class="knowledge-item"
-                @click="handleBannerClick(item.id)"
-                v-for="(item, index) in knowledgeList"
-                :key="index"
-            >
-                <img class="thumb" :src="item.media?.[0]" alt="" />
-                <div class="card-body-left">
-                    <div class="title van-multi-ellipsis--l2">{{ item.title }}</div>
-                    <div class="date">{{ formatDate(item.createTime) }}</div>
-                </div>
-            </div>
-            <div class="no-data" v-if="knowledgeList.length === 0">暂无数据</div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { onMounted, ref, watch } from "vue";
-import { useRouter } from "vue-router";
-import { useStore } from "vuex";
-import { resize_300 } from "@/api/config";
-
-const router = useRouter();
-const store = useStore();
-const activeKnowledgeId = ref(8);
-
-// 按 topicId 缓存知识列表,避免每次切换都请求接口
-const knowledgeCache = ref({});
-
-const handleKnowledgeClick = (index) => {
-    activeKnowledgeId.value = index;
-
-    // 如果已经有缓存,直接用缓存数据
-    if (knowledgeCache.value[index]) {
-        knowledgeList.value = knowledgeCache.value[index];
-        return;
-    }
-
-    // 没有缓存时再发起请求
-    getKnowledgeList();
-};
-
-const handleBannerClick = (id) => {
-    router.push(`/warning_detail?id=${id}&showImage=true`);
-};
-
-const handleMoreClick = () => {
-    router.push(`/knowledge_list?topicId=${activeKnowledgeId.value}`);
-};
-
-const knowledgeList = ref([]);
-onMounted(() => {
-    // 默认 topicId 首次进入时请求一次
-    getKnowledgeList();
-});
-watch(
-    () => store.state.home.gardenId,
-    (newGardenId) => {
-        if (newGardenId) {
-            getKnowledgeList();
-        }
-    }
-);
-
-const formatDate = (dateString) => {
-    if (!dateString) return "";
-    // 将 2026-01-06T00:00:00 格式转换为 2026-01-06
-    return dateString.split("T")[0];
-};
-
-const getKnowledgeList = async () => {
-    try {
-        let data = [];
-        // 实战知识库:使用原接口
-        const params = {
-            page: 1,
-            limit: 10,
-            topicId: activeKnowledgeId.value,
-        };
-        const { data: result } = await VE_API.home.warningPageList(params);
-        data = result || [];
-
-        knowledgeList.value = data;
-        // 按当前 topicId 缓存,后续切换直接读取
-        knowledgeCache.value[activeKnowledgeId.value] = data;
-    } catch (error) {
-        console.error("获取知识列表失败:", error);
-        knowledgeList.value = [];
-    }
-};
-</script>
-
-<style lang="scss" scoped>
-.knowledge-card {
-    padding: 0 10px;
-    .knowledge-header {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        padding: 6px 0 2px 0;
-        .knowledge-title {
-            display: flex;
-            align-items: center;
-            gap: 10px;
-            color: #bfbfbf;
-            .title-item {
-                cursor: pointer;
-                font-size: 18px;
-                font-family: "PangMenZhengDao";
-                &.active {
-                    color: #2199f8;
-                }
-            }
-        }
-        .more-text {
-            font-size: 13px;
-            color: #4e5969;
-            cursor: pointer;
-            display: flex;
-            align-items: center;
-        }
-    }
-    .knowledge-content {
-        padding: 8px 0;
-        .knowledge-item {
-            display: flex;
-            gap: 12px;
-            // padding: 12px 10px;
-            // background: #ffffff;
-            border-radius: 12px;
-            align-items: center;
-            height: 74px;
-            box-sizing: border-box;
-            .thumb {
-                width: 112px;
-                height: 74px;
-                border-radius: 8px;
-                object-fit: cover;
-                flex: none;
-            }
-            .card-body-left {
-                flex: 1;
-                height: 95%;
-                display: flex;
-                flex-direction: column;
-                justify-content: space-between;
-                font-size: 14px;
-                line-height: 22px;
-                .date {
-                    font-size: 13px;
-                    color: #86909c;
-                    margin-top: 4px;
-                }
-            }
-        }
-        .knowledge-item + .knowledge-item {
-            margin-top: 12px;
-        }
-        .item-content {
-            font-size: 14px;
-            color: #666666;
-        }
-        .focus-item {
-            margin-bottom: 8px;
-            border: 1px solid rgba(142, 142, 142, 0.2);
-            border-radius: 12px;
-            padding: 5px 10px;
-            .thumb {
-                width: 100%;
-                height: 123px;
-                border-radius: 5px;
-                object-fit: cover;
-            }
-            .focus-content {
-                .title {
-                    font-weight: 500;
-                    font-size: 16px;
-                    line-height: 22px;
-                    color: #1d2129;
-                    padding: 8px 0;
-                }
-                .focus-expert {
-                    padding: 0 5px;
-                    margin-bottom: 5px;
-                    display: flex;
-                    align-items: center;
-                    justify-content: space-between;
-                    font-size: 12px;
-                    color: #666666;
-                    height: 32px;
-                    border-radius: 5px;
-                    background: rgba(33, 153, 248, 0.05);
-                    .expert-name {
-                        display: flex;
-                        align-items: center;
-                        gap: 6px;
-                        .expert-text {
-                            padding-left: 2px;
-                            color: #2199F8;
-                        }
-                    }
-                }
-                .focus-answer {
-                    padding: 5px;
-                    background: rgba(33, 153, 248, 0.05);
-                    border-radius: 5px;
-                    font-size: 13px;
-                    line-height: 22px;
-                    color: #86909C;
-                    text-align: justify;
-                    display: flex;
-                    gap: 8px;
-                    .answer-icon {
-                        margin-top: 2px;
-                        flex: none;
-                        width: 18px;
-                        height: 18px;
-                        background: #2199f8;
-                        border-radius: 2px;
-                        font-size: 12px;
-                        color: #fff;
-                        text-align: center;
-                        line-height: 18px;
-                    }
-                }
-            }
-        }
-    }
-    .no-data {
-        font-size: 14px;
-        color: #999999;
-        text-align: center;
-        margin-top: 20px;
-    }
-}
-</style>

+ 0 - 383
src/views/old_mini/home/components/problemReminder.vue

@@ -1,383 +0,0 @@
-<template>
-    <Popup v-model:show="show" class="problem-reminder-popup">
-        <div class="problem-reminder">
-            <!-- 标题区域 -->
-            <div class="problem-reminder-header">
-                <div class="title-section">
-                    <div class="main-title">填写以下问题</div>
-                    <div class="sub-title">为您定制农事提醒</div>
-                </div>
-                <img class="header-icon" src="@/assets/img/home/file-icon.png" alt="" />
-            </div>
-            <div class="question-section-wrapper">
-                <div class="question-text">请问 <span style="color: #2199f8;">{{ farmName }}</span> {{ questPopupData.quest }}</div>
-                <div class="img">
-                    <img :src="questPopupData.backgroundImage" alt="" />
-                </div>
-                <div class="options-section">
-                    <span class="options-label">您可以选择</span>
-                    <div class="options-buttons">
-                        <div class="option-btn" @click="toUpload">拍照识别</div>
-                        <div class="option-btn" @click="toPage" v-if="curRole == 0">咨询专家</div>
-                    </div>
-                </div>
-            </div>
-            <!-- 底部按钮区域 -->
-            <div class="bottom-buttons">
-                <div
-                    v-for="(opt, idx) in bottomAnswerOptions"
-                    :key="idx"
-                    class="bottom-btn"
-                    :class="{ 'yes-btn': isYesOption(opt), 'no-btn': !isYesOption(opt) }"
-                    @click="onBottomOptionClick(opt)"
-                >
-                    {{ getOptionLabel(opt) }}
-                </div>
-            </div>
-            <!-- <div class="forward-btn bottom-btn" v-if="curRole == 2" @click="handleForward">转发给客户</div> -->
-        </div>
-    </Popup>
-    <Popup v-model:show="noShow" class="no-popup">
-        <div class="no-popup-title">
-            <span>感谢您的配合</span>
-            <div class="no-popup-title-sub">飞鸟将会记录下您当前的农场情况</div>
-        </div>
-        <div class="no-popup-btn" @click="noShow = false">我知道了</div>
-    </Popup>
-    <!-- 农事信息弹窗 -->
-    <detail-dialog ref="detailDialogRef" showSuccessOnly @triggerFarmWork="triggerFarmWork" @noPopupBtn="noPopupBtn"></detail-dialog>
-    <!-- 新增:激活上传弹窗 -->
-    <active-upload-popup ref="activeUploadPopupRef" @handleUploadSuccess="handleUploadSuccess"></active-upload-popup>
-</template>
-<script setup>
-import { Popup } from "vant";
-import { ref,onActivated } from "vue";
-import wx from "weixin-js-sdk";
-import { base_img_url2 } from "@/api/config";
-import activeUploadPopup from "@/components/popup/activeUploadPopup.vue";
-import detailDialog from "@/components/detailDialog.vue";
-import eventBus from "@/api/eventBus";
-import { useRouter } from "vue-router";
-import { ElMessage } from "element-plus";
-const router = useRouter();
-
-const show = ref(false);
-const noShow = ref(false);
-const dropdownGardenItem = ref({
-    organId: 93490,
-    periodId: 1,
-    wktVal: "wktVal",
-    address: "address",
-    district: "district",
-    name: "荔博园",
-});
-const toUpload = () => {
-    if(curRole == 0){
-        wx.miniProgram.navigateTo({
-            url: `/pages/subPages/carmera/index?gardenData=${JSON.stringify(dropdownGardenItem.value)}`,
-        });
-    }else{
-        ElMessage.warning("该功能正在升级中,敬请期待");
-    }
-};
-
-function toPage() {
-    const expertId = sessionStorage.getItem('expertId');
-    if(expertId){
-        router.push(`/chat_frame?userId=${expertId}`);
-    }else{
-        ElMessage.warning("专家信息不存在,请联系管理员");
-    }
-}
-const detailDialogRef = ref(null);
-
-const curRole = localStorage.getItem("SET_USER_CUR_ROLE");
-
-const farmName = ref('');
-const farmIdVal = ref(null);
-
-onActivated(() => {
-    if(curRole == 0){
-        if(localStorage.getItem('selectedFarmId')){
-            farmIdVal.value = localStorage.getItem('selectedFarmId');
-            fetchQuestPopup();
-        }
-    }else{
-        fetchQuestPopup();
-    }
-});
-
-
-const questPopupData = ref({});
-const bottomAnswerOptions = ref([]);
-//弹出问卷接口
-const fetchQuestPopup = () => {
-    const api = curRole == 0 ? VE_API.home.fetchQuestPopup({ farmId: farmIdVal.value }) : VE_API.home.popupByAgriculturalUserFarms();
-    api.then(({ data }) => {
-        if (Array.isArray(data) && data.length > 0) {
-            show.value = true;
-            farmName.value = data[0].farm?.name;
-            farmIdVal.value = data[0].farm?.id;
-            questPopupData.value = data[0];
-            bottomAnswerOptions.value = transformAnswerOptions(questPopupData.value?.answerOptions);
-        }
-    })
-    .catch(() => {});
-};
-
-function transformAnswerOptions(raw) {
-    let parsed = raw;
-    if (typeof raw === "string") {
-        try {
-            parsed = JSON.parse(raw);
-        } catch (e) {
-            parsed = [raw];
-        }
-    }
-    if (Array.isArray(parsed)) {
-        return parsed.map((item) => {
-            if (item && typeof item === "object") {
-                const label = item.name;
-                const value = item.value;
-                return { label, value };
-            }
-            return { label: String(item), value: item };
-        });
-    }
-    return [];
-}
-
-function getOptionLabel(opt) {
-    return opt?.label ?? String(opt ?? "");
-}
-
-function isYesOption(opt) {
-    const label = (opt?.label ?? "").toString();
-    const value = opt?.value;
-    if (typeof value === "boolean") return value === true;
-    if (typeof value === "number") return value === 1;
-    if (typeof value === "string") {
-        const v = value.trim().toLowerCase();
-        if (v === "1" || v === "true" || v === "yes") return true;
-    }
-    const yesKeywords = ["是", "yes", "确认", "同意", "有", "发生"];
-    return yesKeywords.some((k) => label.toLowerCase().includes(k.toLowerCase()));
-}
-
-const optValue = ref(null);
-function onBottomOptionClick(opt) {
-    show.value = false;
-    optValue.value = opt.value;
-    if (opt.value == 1) {
-        eventBus.emit("activeUpload:show", {
-            gardenIdVal: farmIdVal.value,
-            arrangeIdVal: questPopupData.value.arrangeId,
-            problemTitleVal: `请选择您出现${questPopupData.value.phenologyName}的时间`,
-            typeVal: "question",
-        });
-    } else {
-        saveQuestPopup(opt.label);
-    }
-}
-
-function saveQuestPopup(label) {
-    const agriDate = getTodayStr();
-    const params = {
-        farmId: farmIdVal.value,
-        phenologyId: questPopupData.value.phenologyId,
-        indicatorId: questPopupData.value.indicatorId,
-        answerValue: optValue.value,
-        agriDate: agriDate,
-    };
-    params.imagePaths = images.value;
-    VE_API.home.saveQuestPopup(params).then((res) => {
-        if (res.code === 0) {
-            show.value = false;
-            if (optValue.value != 1 && label != '未知') {
-                noShow.value = true;
-            }
-        }
-    });
-}
-
-function getTodayStr() {
-    const d = new Date();
-    const y = d.getFullYear();
-    const m = String(d.getMonth() + 1).padStart(2, "0");
-    const day = String(d.getDate()).padStart(2, "0");
-    return `${y}-${m}-${day}`;
-}
-const images = ref([]);
-const currentParams = ref({});
-function handleUploadSuccess(params) {
-    currentParams.value = params;
-    images.value = params.imagePaths;
-    detailDialogRef.value.showDialog(questPopupData.value.farmWorkLibId, "转发");
-}
-
-const activeUploadPopupRef = ref(null);
-function triggerFarmWork() {
-    activeUploadPopupRef.value.triggerFarmWork(currentParams.value);
-    saveQuestPopup();
-}
-
-// 获取触发图片
-const triggerImg = ref([]);
-const getTriggerImg = async () => {
-    const { data } = await VE_API.z_farm_work_record.getTriggerImg({ farmWorkRecordId: questPopupData.value.id });
-    triggerImg.value = data || [];
-}
-const noPopupBtn = async () => {
-    // await getTriggerImg();
-    // const query = {
-    //     askInfo: { title: "分享农事", content: "是否分享该农事给好友" },
-    //     shareText: `您的农事要做${questPopupData.value.farm}了 请查看!`,
-    //     id: questPopupData.value?.farmWorkLibId,
-    //     farmWorkOrderId: questPopupData.value?.farm?.orderId,
-    //     postImg: triggerImg.value.length ? base_img_url2 + triggerImg.value[triggerImg.value.length - 1].cloudFilename : ''
-    // };
-    // wx.miniProgram.navigateTo({
-    //     url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=priceSheet`,
-    // });
-};
-
-const handleForward = () => {
-    // noPopupBtn();
-};
-
-</script>
-<style lang="scss" scoped>
-.problem-reminder-popup {
-    width: 100%;
-    border-radius: 14px;
-    padding: 20px 15px;
-    box-sizing: border-box;
-    background-image: linear-gradient(180deg, #d1e7fd 0%, #ffffff 25%);
-    .problem-reminder {
-        display: flex;
-        flex-direction: column;
-        // 标题区域样式
-        .problem-reminder-header {
-            display: flex;
-            justify-content: space-between;
-            align-items: flex-start;
-            gap: 15px;
-
-            .title-section {
-                flex: 1;
-                font-size: 22px;
-                color: #1d1e1f;
-                line-height: 1.2;
-                div {
-                    font-family: "PangMenZhengDao";
-                }
-            }
-
-            .header-icon {
-                width: 88px;
-                height: 88px;
-                margin-top: -10px;
-                margin-right: -5px;
-            }
-        }
-        .question-section-wrapper {
-            border: 1px solid #ececec;
-            border-radius: 8px;
-            padding: 10px 8px;
-            margin-top: -10px;
-            background-color: #fff;
-            .question-text {
-                font-size: 16px;
-                color: #252525;
-                font-weight: 500;
-            }
-            .img {
-                margin: 12px 0;
-                width: 100%;
-                height: 140px;
-                img {
-                    width: 100%;
-                    height: 100%;
-                    border-radius: 6px;
-                    object-fit: cover;
-                }
-            }
-            .options-section {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                background-color: rgba(33, 153, 248, 0.1);
-                border-radius: 8px;
-                padding: 7px 8px;
-                font-weight: 500;
-                .options-label {
-                    font-size: 14px;
-                    color: #2199f8;
-                }
-
-                .options-buttons {
-                    display: flex;
-                    flex-wrap: wrap;
-                    gap: 10px;
-                    .option-btn {
-                        padding: 5px 14px;
-                        border-radius: 20px;
-                        background: #fff;
-                        color: #252525;
-                        flex: 1;
-                    }
-                }
-            }
-        }
-        // 底部按钮区域样式
-        .bottom-buttons {
-            display: flex;
-            gap: 12px;
-            margin-top: 10px;
-        }
-        .forward-btn{
-            margin-top: 10px;
-        }
-        .bottom-btn {
-            flex: 1;
-            padding: 8px 0;
-            border-radius: 25px;
-            font-size: 16px;
-            text-align: center;
-            background: #fff;
-            border: 1px solid #e5e5e5;
-
-            &.yes-btn {
-                background-image: linear-gradient(180deg, #76c3ff 0%, #2199f8 100%);
-                color: #fff;
-                border: none;
-            }
-        }
-    }
-}
-
-.no-popup {
-    width: 76%;
-    border-radius: 14px;
-    padding: 28px 15px 20px;
-    box-sizing: border-box;
-    .no-popup-title {
-        font-size: 24px;
-        font-weight: 500;
-        text-align: center;
-        .no-popup-title-sub {
-            font-size: 16px;
-            margin-top: 8px;
-        }
-    }
-    .no-popup-btn {
-        background-color: #2199f8;
-        padding: 8px;
-        border-radius: 20px;
-        color: #fff;
-        font-size: 16px;
-        margin-top: 32px;
-        text-align: center;
-    }
-}
-</style>

+ 0 - 1402
src/views/old_mini/home/components/recordTask.vue

@@ -1,1402 +0,0 @@
-<template>
-    <div class="record-task">
-        <div class="task-top">
-            <div class="record-filter">
-                <div
-                    class="filter-item"
-                    v-for="(item, index) in filterType"
-                    :key="index"
-                    @click="handlePlanClick(index)"
-                    :class="{ active: activePlanIndex === index }"
-                >
-                    {{ item }}
-                </div>
-            </div>
-            <div class="select-box">
-                <div class="select-item">
-                    <el-select v-model="typeVal" placeholder="农事类型">
-                        <el-option
-                            v-for="item in typeOptions"
-                            :key="item.value"
-                            :label="item.label"
-                            :value="item.value"
-                        />
-                    </el-select>
-                </div>
-                <div class="select-item">
-                    <el-select v-model="regionVal" placeholder="执行区域">
-                        <el-option
-                            v-for="item in regionOptions"
-                            :key="item.value"
-                            :label="item.label"
-                            :value="item.value"
-                        />
-                    </el-select>
-                </div>
-                <div class="select-item">
-                    <el-select v-model="levelVal" placeholder="紧急程度">
-                        <el-option
-                            v-for="item in levelOptions"
-                            :key="item.value"
-                            :label="item.label"
-                            :value="item.value"
-                        />
-                    </el-select>
-                </div>
-            </div>
-        </div>
-        <div class="task-content" :style="cardContentHeight ? `height: ${cardContentHeight + (curRole == 0 ? 0 : 40)}px` : ''">
-            <div class="plan-menu">
-                <el-anchor :container="containerRef" direction="vertical" type="default" @click="handleClick">
-                    <el-menu :default-active="defaultActive" class="el-menu-vertical-demo">
-                        <el-sub-menu v-for="(menu, index) in menuData" :key="index" :index="String(menu.id)">
-                            <template #title>
-                                <img class="menu-icon" :src="require(`@/assets/img/gallery/icon-${index}.png`)" />
-                                <span class="menu-text">{{ menu.title }}</span>
-                            </template>
-                            <el-menu-item v-for="item in menu.children" :key="item.id" :index="`${menu.id}-${item.id}`">
-                                <el-anchor-link :href="item.href" :title="item.title" />
-                            </el-menu-item>
-                        </el-sub-menu>
-                    </el-menu>
-                </el-anchor>
-            </div>
-            <div class="expert-content" ref="containerRef">
-                <div v-for="(section, index) in contentData" :key="index" class="content-section">
-                    <div class="section-id" :id="section.targetId"></div>
-                    <record-item :record-item-data="section" :onlyRecipeName="true" class="recipe-item">
-                        <template #title>
-                            <div class="box-title">
-                                <div class="title-l">
-                                    {{ section.title }}
-                                    <span class="parent-text">{{ section.parentTitle || "秋梢期" }}</span>
-                                </div>
-                                <div class="title-r">
-                                    <span class="r-dot"></span>
-                                    2区
-                                </div>
-                            </div>
-                        </template>
-                        <template #footer>
-                            <div class="action-group">
-                                <div class="action-l">查看详情</div>
-                                <div class="action-r" v-if="section.orderStatus === 0">
-                                    <div class="action-item second-item">拍照识别</div>
-                                    <div class="action-item primary-item">去确认</div>
-                                </div>
-                                <div class="action-r" v-if="section.orderStatus === 1">
-                                    <div class="action-item warning-item">发起需求</div>
-                                    <div class="action-item primary-item">确认完成</div>
-                                </div>
-                                <div class="action-r" v-if="section.orderStatus === 2">
-                                    <div class="action-item warning-item">发起需求</div>
-                                    <div class="action-item primary-item">去复核</div>
-                                </div>
-                            </div>
-                        </template>
-                    </record-item>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { ref, watch } from "vue";
-import recordItem from "@/components/recordItem.vue";
-
-const props = defineProps({
-    cardContentHeight: {
-        type: Number,
-        default: null,
-    },
-});
-
-// 角色
-// const curRole = store.state.app.curRole
-const curRole = 0
-
-const filterType = ref(["待触发", "待执行", "已完成", "发起的需求"]);
-
-const typeVal = ref(null);
-const regionVal = ref(null);
-const levelVal = ref(null);
-const typeOptions = ref([
-    { label: "全部", value: "all" },
-    { label: "施肥", value: "1" },
-    { label: "用药", value: "2" },
-    { label: "修剪", value: "3" },
-    { label: "其他", value: "4" },
-]);
-
-const regionOptions = ref([
-    {
-        label: "全部",
-        value: "all",
-    },
-    {
-        label: "区域1",
-        value: "1",
-    },
-    {
-        label: "区域2",
-        value: "2",
-    },
-    {
-        label: "区域3",
-        value: "3",
-    },
-]);
-
-const levelOptions = ref([
-    { label: "全部", value: "all" },
-    { label: "紧急", value: "1" },
-    { label: "一般", value: "2" },
-    { label: "不紧急", value: "3" },
-]);
-
-const activePlanIndex = ref(0);
-const handlePlanClick = (index) => {
-    activePlanIndex.value = index;
-};
-
-const containerRef = ref(null);
-const handleClick = (e) => {
-    e.preventDefault();
-};
-
-// 菜单
-const defaultActive = ref("1-1");
-
-const menuData = [
-    {
-        id: 1,
-        title: "秋梢期",
-        children: [
-            { id: 1, title: "巡园农事", href: "#part1" },
-            { id: 2, title: "梢期防虫", href: "#part2" },
-            { id: 3, title: "梢期营养", href: "#part3" },
-        ],
-    },
-    {
-        id: 2,
-        title: "开花期",
-        children: [
-            { id: 1, title: "巡园农事", href: "#part4" },
-            { id: 2, title: "摇花吹花", href: "#part5" },
-            { id: 3, title: "花期防治", href: "#part6" },
-        ],
-    },
-];
-
-const contentData = ref([
-    {
-        targetId: "part1",
-        title: "巡园农事",
-        parentTitle: "秋梢期",
-        reCheckText: "本次农事复核成效优异,作物产量潜力实现大幅增长,虫害风险控制优异,未发现虫害风险",
-        expert: 91356,
-        orderStatus: 0,
-        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: "广州市从化区荔枝博览园",
-        attention: "当前为秋梢期,建议巡园,重点关注叶片、嫩梢等部位",
-    },
-    {
-        targetId: "part2",
-        title: "梢期防虫",
-        parentTitle: "秋梢期",
-        consequenceText: "如果不做本次农事,会导致您的产量、质量下降30%,管理得分降低10分",
-        id: "274654",
-        reCheckText: "本次农事复核成效优异,作物产量潜力实现大幅增长,树体营养较充足,土壤肥力增加",
-        farmName: "荔枝博览园",
-        farmPoint: "POINT(113.61702297075017 23.584863449735067)",
-        orderId: "745923632567422976",
-        area: 2.719998598098755,
-        expert: 91356,
-        orderStatus: 1,
-        activeStatus: 0,
-        farmId: 766,
-        regionId: 2,
-        speciesId: "1",
-        speciesName: "荔枝",
-        agriculturalId: 24,
-        farmWorkId: "699343457444958208",
-        farmWorkLibId: "699343457444958208",
-        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: "韦帮稳",
-        expertUserIcon: "",
-        expertUserName: "韦帮稳",
-        icon: 4,
-        indexChart: [],
-        indexName: "",
-        beforeExecuteDate: "2025-05-26",
-        checkDate: null,
-        executeDate: "2025-08-01",
-        indexJson: "",
-        code: "BZ-YY-04-SQYY-20",
-        expertPrescription: "",
-        condition: "园区叶芽率大于20.0%",
-        solarName: "",
-        reCheck: null,
-        executeBlueZones: [
-            {
-                id: "ws0y1m6x7cjz",
-                level: null,
-            },
-            {
-                id: "ws0y1md9v3ht",
-                level: null,
-            },
-            {
-                id: "ws0y1mdspbk7",
-                level: null,
-            },
-            {
-                id: "ws0y1mdvvdsz",
-                level: null,
-            },
-            {
-                id: "ws0y1me545tg",
-                level: null,
-            },
-        ],
-        menu: 1,
-        isEdit: 0,
-        isMaster: null,
-        num: null,
-        purpose: "",
-        selfExec: null,
-        defaultFarmWork: 0,
-        farmWorkType: 2,
-        farmWorkTypeName: "营养",
-        type: 1,
-        execute: 4,
-        updateDate0: "2025-08-20",
-        updateDate1: null,
-        updateDate2: null,
-        updateDate3: null,
-        updateDate4: null,
-        updateDate5: null,
-        usageMode: "根部施",
-        serviceMain: "广州泽秾丰农资有限公司",
-        updateDate6: null,
-        confirmPicture: [],
-        executeMain: "广州泽秾丰农资有限公司",
-        storeShortName: "泽秾丰",
-        weatherWarningMsg: "",
-        executeEvidence: [],
-        userEvaluation: null,
-        reviewDate: null,
-        reviewDate2: null,
-        reviewImage: [],
-        reviewImage2: [],
-        serviceRegion: "广州市从化区荔枝博览园",
-        users: [
-            {
-                id: null,
-                orderId: null,
-                serviceType: null,
-                userType: null,
-                userId: 81881,
-                joinStatus: null,
-                icon: "https://birdseye-img.sysuimars.com/birdseye-look-mini/Group%201321316260.png",
-                userName: "飞鸟种植助手",
-                area: "",
-                point: "",
-                farmName: "",
-                selected: null,
-            },
-        ],
-        cost: null,
-        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,
-                    },
-                ],
-            },
-        ],
-        conditionList: [
-            {
-                index: "1-2-001-02-02-02-01-0008",
-                name: "园区叶芽率",
-                type: 1,
-                value: "0.2",
-            },
-        ],
-    },
-    {
-        targetId: "part3",
-        title: "梢期营养",
-        consequenceText: "如果不做本次农事,会导致您的产量、质量下降5%,管理得分降低2分",
-        reCheckText: "本次农事复核成效优异,作物产量潜力实现大幅增长,树体营养较充足,转色速度非常稳定,转色率超过80%",
-        farmName: "荔枝博览园",
-        farmPoint: "POINT(113.61702297075017 23.584863449735067)",
-        orderId: "745923697054846976",
-        area: 2.719998598098755,
-        expert: 91356,
-        orderStatus: 2,
-        activeStatus: 0,
-        farmId: 766,
-        regionId: 2,
-        speciesId: "1",
-        speciesName: "荔枝",
-        agriculturalId: 24,
-        farmWorkId: "699343457482706947",
-        farmWorkLibId: "699343457482706947",
-        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: "韦帮稳",
-        expertUserIcon: "",
-        expertUserName: "韦帮稳",
-        icon: 0,
-        indexChart: [],
-        indexName: "",
-        beforeExecuteDate: "2025-05-26",
-        checkDate: null,
-        executeDate: "2025-05-26",
-        indexJson: "",
-        code: "BZ-YY-06-ZSYY-100",
-        expertPrescription: "",
-        condition: "园区转色率大于20.0%",
-        solarName: "",
-        reCheck: null,
-        executeBlueZones: [
-            {
-                id: "ws0y1m6x7cjz",
-                level: null,
-            },
-            {
-                id: "ws0y1md9v3ht",
-                level: null,
-            },
-            {
-                id: "ws0y1mdspbk7",
-                level: null,
-            },
-            {
-                id: "ws0y1mdvvdsz",
-                level: null,
-            },
-            {
-                id: "ws0y1me545tg",
-                level: null,
-            },
-        ],
-        menu: 1,
-        isEdit: 0,
-        isMaster: null,
-        num: null,
-        purpose: "",
-        selfExec: null,
-        defaultFarmWork: 0,
-        farmWorkType: 2,
-        farmWorkTypeName: "营养",
-        type: 1,
-        execute: 4,
-        updateDate0: "2025-08-20",
-        updateDate1: null,
-        updateDate2: null,
-        updateDate3: null,
-        updateDate4: null,
-        updateDate5: null,
-        usageMode: "根部施",
-        serviceMain: "广州泽秾丰农资有限公司",
-        updateDate6: null,
-        confirmPicture: [],
-        executeMain: "广州泽秾丰农资有限公司",
-        storeShortName: "泽秾丰",
-        weatherWarningMsg: "",
-        executeEvidence: [],
-        userEvaluation: null,
-        reviewDate: null,
-        reviewDate2: null,
-        reviewImage: [],
-        reviewImage2: [],
-        serviceRegion: "广州市从化区荔枝博览园",
-        users: [
-            {
-                id: null,
-                orderId: null,
-                serviceType: null,
-                userType: null,
-                userId: 81881,
-                joinStatus: null,
-                icon: "https://birdseye-img.sysuimars.com/birdseye-look-mini/Group%201321316260.png",
-                userName: "飞鸟种植助手",
-                area: "",
-                point: "",
-                farmName: "",
-                selected: null,
-            },
-        ],
-        cost: null,
-        prescriptionList: [
-            {
-                name: "营养",
-                pesticideFertilizerList: [
-                    {
-                        defaultDroneRatio: null,
-                        defaultName: "矿源黄腐酸钾",
-                        defaultRatio: 2000,
-                        id: null,
-                        muPrice: null,
-                        muUsage: 4.0,
-                        muUsage2: 4.0,
-                        ratio: 2000,
-                        ratio2: 200,
-                        remark: "",
-                        usageMode: "",
-                        usageModeList: ["叶面施、根部施"],
-                        orderId: null,
-                        pesticideFertilizerCode: "1166",
-                        pesticideFertilizerId: "166",
-                        pesticideFertilizerName: "矿源黄腐酸钾",
-                        brand: "广州大炎",
-                        typeName: "营养",
-                        price: 15000,
-                        unit: "g",
-                        executeStyle: null,
-                    },
-                    {
-                        defaultDroneRatio: null,
-                        defaultName: "有机质水溶肥",
-                        defaultRatio: 5000,
-                        id: null,
-                        muPrice: null,
-                        muUsage: 10.0,
-                        muUsage2: 10.0,
-                        ratio: 5000,
-                        ratio2: 500,
-                        remark: "",
-                        usageMode: "",
-                        usageModeList: ["叶面施"],
-                        orderId: null,
-                        pesticideFertilizerCode: "1167",
-                        pesticideFertilizerId: "167",
-                        pesticideFertilizerName: "有机质水溶肥",
-                        brand: "广州大炎",
-                        typeName: "营养",
-                        price: 10000,
-                        unit: "g",
-                        executeStyle: null,
-                    },
-                    {
-                        defaultDroneRatio: null,
-                        defaultName: "磷酸二氢钾",
-                        defaultRatio: 5000,
-                        id: null,
-                        muPrice: null,
-                        muUsage: 10.0,
-                        muUsage2: 10.0,
-                        ratio: 5000,
-                        ratio2: 500,
-                        remark: "",
-                        usageMode: "",
-                        usageModeList: ["叶面施、根部施"],
-                        orderId: null,
-                        pesticideFertilizerCode: "1168",
-                        pesticideFertilizerId: "168",
-                        pesticideFertilizerName: "磷酸二氢钾",
-                        brand: "广州大炎",
-                        typeName: "营养",
-                        price: 12000,
-                        unit: "g",
-                        executeStyle: null,
-                    },
-                    {
-                        defaultDroneRatio: null,
-                        defaultName: "高钾复合肥",
-                        defaultRatio: 5000,
-                        id: null,
-                        muPrice: null,
-                        muUsage: 10.0,
-                        muUsage2: 10.0,
-                        ratio: 5000,
-                        ratio2: 500,
-                        remark: "",
-                        usageMode: "",
-                        usageModeList: ["根部施"],
-                        orderId: null,
-                        pesticideFertilizerCode: "1169",
-                        pesticideFertilizerId: "169",
-                        pesticideFertilizerName: "高钾复合肥",
-                        brand: "未知",
-                        typeName: "营养",
-                        price: 245,
-                        unit: "g",
-                        executeStyle: null,
-                    },
-                    {
-                        defaultDroneRatio: null,
-                        defaultName: "红牛硫酸钾",
-                        defaultRatio: 5000,
-                        id: null,
-                        muPrice: null,
-                        muUsage: 10.0,
-                        muUsage2: 10.0,
-                        ratio: 5000,
-                        ratio2: 500,
-                        remark: "",
-                        usageMode: "",
-                        usageModeList: ["根部施"],
-                        orderId: null,
-                        pesticideFertilizerCode: "1170",
-                        pesticideFertilizerId: "170",
-                        pesticideFertilizerName: "红牛硫酸钾",
-                        brand: "广州大炎",
-                        typeName: "营养",
-                        price: 230,
-                        unit: "g",
-                        executeStyle: null,
-                    },
-                ],
-            },
-        ],
-        conditionList: [
-            {
-                index: "1-2-016-02-02-02-01-0008",
-                name: "园区转色率",
-                type: 1,
-                value: "0.2",
-            },
-        ],
-    },
-    {
-        targetId: "part4",
-        title: "巡园农事",
-        parentTitle: "开花期",
-        consequenceText: "如果不做本次农事,会导致您的产量、质量下降20%,管理得分降低8分",
-        id: "274672",
-        reCheckText: "本次农事复核成效优异,作物产量潜力实现大幅增长,病虫害基数得到大幅下降,未发现病虫害风险",
-        farmName: "荔枝博览园",
-        farmPoint: "POINT(113.61702297075017 23.584863449735067)",
-        orderId: "745923690209742848",
-        area: 2.719998598098755,
-        expert: 91356,
-        orderStatus: 3,
-        activeStatus: 0,
-        farmId: 766,
-        regionId: 2,
-        speciesId: "1",
-        speciesName: "荔枝",
-        agriculturalId: 24,
-        farmWorkId: "699343457478512646",
-        farmWorkLibId: "699343457478512646",
-        farmWorkLibName: "果期防治II",
-        farmWorkName: "果期防治II",
-        expertIcon:
-            "https://birdseye-img.sysuimars.com/birdseye-look-vue/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20250411150343.png",
-        expertName: "韦帮稳",
-        expertUserIcon: "",
-        expertUserName: "韦帮稳",
-        icon: 1,
-        indexChart: [],
-        indexName: "",
-        beforeExecuteDate: "2025-05-06",
-        checkDate: null,
-        executeDate: "2025-05-12",
-        indexJson: "",
-        code: "BZ-BC-06-GQFZ2-100",
-        expertPrescription: "",
-        condition: "园区膨果率大于20.0%",
-        solarName: "",
-        reCheck: null,
-        executeBlueZones: [
-            {
-                id: "ws0y1m6x7cjz",
-                level: null,
-            },
-            {
-                id: "ws0y1md9v3ht",
-                level: null,
-            },
-            {
-                id: "ws0y1mdspbk7",
-                level: null,
-            },
-            {
-                id: "ws0y1mdvvdsz",
-                level: null,
-            },
-            {
-                id: "ws0y1me545tg",
-                level: null,
-            },
-        ],
-        menu: 1,
-        isEdit: 0,
-        isMaster: null,
-        num: null,
-        purpose: "",
-        selfExec: null,
-        defaultFarmWork: 0,
-        farmWorkType: 3,
-        farmWorkTypeName: "病虫",
-        type: 1,
-        execute: 4,
-        updateDate0: "2025-08-20",
-        updateDate1: null,
-        updateDate2: null,
-        updateDate3: null,
-        updateDate4: null,
-        updateDate5: null,
-        usageMode: "叶面施",
-        serviceMain: "广州泽秾丰农资有限公司",
-        updateDate6: null,
-        confirmPicture: [],
-        executeMain: "广州泽秾丰农资有限公司",
-        storeShortName: "泽秾丰",
-        weatherWarningMsg: "",
-        executeEvidence: [],
-        userEvaluation: null,
-        reviewDate: null,
-        reviewDate2: null,
-        reviewImage: [],
-        reviewImage2: [],
-        serviceRegion: "广州市从化区荔枝博览园",
-        users: [
-            {
-                id: null,
-                orderId: null,
-                serviceType: null,
-                userType: null,
-                userId: 81881,
-                joinStatus: null,
-                icon: "https://birdseye-img.sysuimars.com/birdseye-look-mini/Group%201321316260.png",
-                userName: "飞鸟种植助手",
-                area: "",
-                point: "",
-                farmName: "",
-                selected: null,
-            },
-        ],
-        cost: null,
-        prescriptionList: [
-            {
-                name: "病虫",
-                pesticideFertilizerList: [
-                    {
-                        defaultDroneRatio: null,
-                        defaultName: "威远.绿凯",
-                        defaultRatio: 150000,
-                        id: null,
-                        muPrice: null,
-                        muUsage: 150.0,
-                        muUsage2: 150.0,
-                        ratio: 150000,
-                        ratio2: 15000,
-                        remark: "",
-                        usageMode: "",
-                        usageModeList: ["叶面施"],
-                        orderId: null,
-                        pesticideFertilizerCode: "1147",
-                        pesticideFertilizerId: "147",
-                        pesticideFertilizerName: "威远.绿凯",
-                        brand: "利民控股绿凯",
-                        typeName: "病虫",
-                        price: 90,
-                        unit: "g",
-                        executeStyle: null,
-                    },
-                    {
-                        defaultDroneRatio: null,
-                        defaultName: "微量元素益元液",
-                        defaultRatio: 150000,
-                        id: null,
-                        muPrice: null,
-                        muUsage: 300.0,
-                        muUsage2: 300.0,
-                        ratio: 150000,
-                        ratio2: 15000,
-                        remark: "",
-                        usageMode: "",
-                        usageModeList: ["叶面施"],
-                        orderId: null,
-                        pesticideFertilizerCode: "1174",
-                        pesticideFertilizerId: "174",
-                        pesticideFertilizerName: "微量元素益元液",
-                        brand: "广州大炎",
-                        typeName: "营养",
-                        price: 60,
-                        unit: "ml",
-                        executeStyle: null,
-                    },
-                    {
-                        defaultDroneRatio: null,
-                        defaultName: "中量元素益元液",
-                        defaultRatio: 150000,
-                        id: null,
-                        muPrice: null,
-                        muUsage: 300.0,
-                        muUsage2: 300.0,
-                        ratio: 150000,
-                        ratio2: 15000,
-                        remark: "",
-                        usageMode: "",
-                        usageModeList: ["叶面施"],
-                        orderId: null,
-                        pesticideFertilizerCode: "1175",
-                        pesticideFertilizerId: "175",
-                        pesticideFertilizerName: "中量元素益元液",
-                        brand: "广州大炎",
-                        typeName: "营养",
-                        price: 30,
-                        unit: "ml",
-                        executeStyle: null,
-                    },
-                    {
-                        defaultDroneRatio: null,
-                        defaultName: "济南中科翠剑",
-                        defaultRatio: 150000,
-                        id: null,
-                        muPrice: null,
-                        muUsage: 150.0,
-                        muUsage2: 150.0,
-                        ratio: 150000,
-                        ratio2: 15000,
-                        remark: "",
-                        usageMode: "",
-                        usageModeList: ["叶面施"],
-                        orderId: null,
-                        pesticideFertilizerCode: "1149",
-                        pesticideFertilizerId: "149",
-                        pesticideFertilizerName: "吡唑醚菌酯",
-                        brand: "济南中科翠剑",
-                        typeName: "病虫",
-                        price: 60,
-                        unit: "g",
-                        executeStyle: null,
-                    },
-                    {
-                        defaultDroneRatio: null,
-                        defaultName: "佳果天成",
-                        defaultRatio: 150000,
-                        id: null,
-                        muPrice: null,
-                        muUsage: 300.0,
-                        muUsage2: 300.0,
-                        ratio: 150000,
-                        ratio2: 15000,
-                        remark: "",
-                        usageMode: "",
-                        usageModeList: ["叶面施"],
-                        orderId: null,
-                        pesticideFertilizerCode: "1171",
-                        pesticideFertilizerId: "171",
-                        pesticideFertilizerName: "佳果天成",
-                        brand: "广州大炎",
-                        typeName: "营养",
-                        price: 120,
-                        unit: "ml",
-                        executeStyle: null,
-                    },
-                    {
-                        defaultDroneRatio: null,
-                        defaultName: "高效氟氯氰菊酯",
-                        defaultRatio: 150000,
-                        id: null,
-                        muPrice: null,
-                        muUsage: 150.0,
-                        muUsage2: 150.0,
-                        ratio: 150000,
-                        ratio2: 15000,
-                        remark: "",
-                        usageMode: "",
-                        usageModeList: ["叶面施"],
-                        orderId: null,
-                        pesticideFertilizerCode: "1155",
-                        pesticideFertilizerId: "155",
-                        pesticideFertilizerName: "高效氟氯氰菊酯",
-                        brand: "广东立威.立功",
-                        typeName: "病虫",
-                        price: 50,
-                        unit: "ml",
-                        executeStyle: null,
-                    },
-                    {
-                        defaultDroneRatio: null,
-                        defaultName: "联苯噻虫嗪",
-                        defaultRatio: 150000,
-                        id: null,
-                        muPrice: null,
-                        muUsage: 150.0,
-                        muUsage2: 150.0,
-                        ratio: 150000,
-                        ratio2: 15000,
-                        remark: "",
-                        usageMode: "",
-                        usageModeList: ["叶面施"],
-                        orderId: null,
-                        pesticideFertilizerCode: "1156",
-                        pesticideFertilizerId: "156",
-                        pesticideFertilizerName: "联苯噻虫嗪",
-                        brand: "青岛金正飞灵",
-                        typeName: "病虫",
-                        price: 60,
-                        unit: "ml",
-                        executeStyle: null,
-                    },
-                ],
-            },
-        ],
-        conditionList: [
-            {
-                index: "1-2-014-02-02-02-01-0008",
-                name: "园区膨果率",
-                type: 1,
-                value: "0.2",
-            },
-        ],
-    },
-    {
-        id: "part5",
-        title: "摇花吹花",
-        parentTitle: "开花期",
-        consequenceText: "如果不做本次农事,会导致您的产量、质量下降15%,管理得分降低5分",
-        id: "274671",
-        reCheckText: "本次农事复核成效优异,作物产量潜力实现大幅增长,树体营养较充足,膨果速度非常稳定,膨果率超过80%",
-        farmName: "荔枝博览园",
-        farmPoint: "POINT(113.61702297075017 23.584863449735067)",
-        orderId: "745923686854299648",
-        area: 2.719998598098755,
-        expert: 91356,
-        orderStatus: 4,
-        activeStatus: 0,
-        farmId: 766,
-        regionId: 2,
-        speciesId: "1",
-        speciesName: "荔枝",
-        agriculturalId: 24,
-        farmWorkId: "699343457482706944",
-        farmWorkLibId: "699343457482706944",
-        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: "韦帮稳",
-        expertUserIcon: "",
-        expertUserName: "韦帮稳",
-        icon: 2,
-        indexChart: [],
-        indexName: "",
-        beforeExecuteDate: "2025-05-01",
-        checkDate: null,
-        executeDate: "2025-05-06",
-        indexJson: "",
-        code: "BZ-YY-06-PGYY-100",
-        expertPrescription: "",
-        condition: "园区膨果率大于10.0%",
-        solarName: "",
-        reCheck: null,
-        executeBlueZones: [
-            {
-                id: "ws0y1m6x7cjz",
-                level: null,
-            },
-            {
-                id: "ws0y1md9v3ht",
-                level: null,
-            },
-            {
-                id: "ws0y1mdspbk7",
-                level: null,
-            },
-            {
-                id: "ws0y1mdvvdsz",
-                level: null,
-            },
-            {
-                id: "ws0y1me545tg",
-                level: null,
-            },
-        ],
-        menu: 1,
-        isEdit: 0,
-        isMaster: null,
-        num: null,
-        purpose: "",
-        selfExec: null,
-        defaultFarmWork: 0,
-        farmWorkType: 2,
-        farmWorkTypeName: "营养",
-        type: 1,
-        execute: 4,
-        updateDate0: "2025-08-20",
-        updateDate1: null,
-        updateDate2: null,
-        updateDate3: null,
-        updateDate4: null,
-        updateDate5: null,
-        usageMode: "根部施",
-        serviceMain: "广州泽秾丰农资有限公司",
-        updateDate6: null,
-        confirmPicture: [],
-        executeMain: "广州泽秾丰农资有限公司",
-        storeShortName: "泽秾丰",
-        weatherWarningMsg: "",
-        executeEvidence: [],
-        userEvaluation: null,
-        reviewDate: null,
-        reviewDate2: null,
-        reviewImage: [],
-        reviewImage2: [],
-        serviceRegion: "广州市从化区荔枝博览园",
-        users: [
-            {
-                id: null,
-                orderId: null,
-                serviceType: null,
-                userType: null,
-                userId: 81881,
-                joinStatus: null,
-                icon: "https://birdseye-img.sysuimars.com/birdseye-look-mini/Group%201321316260.png",
-                userName: "飞鸟种植助手",
-                area: "",
-                point: "",
-                farmName: "",
-                selected: null,
-            },
-        ],
-        cost: null,
-        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: "1162",
-                        pesticideFertilizerId: "162",
-                        pesticideFertilizerName: "硝酸铵钙",
-                        brand: "未知",
-                        typeName: "营养",
-                        price: 2000,
-                        unit: "g",
-                        executeStyle: null,
-                    },
-                    {
-                        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: "1163",
-                        pesticideFertilizerId: "163",
-                        pesticideFertilizerName: "氯化钾",
-                        brand: "未知",
-                        typeName: "营养",
-                        price: 4500,
-                        unit: "g",
-                        executeStyle: null,
-                    },
-                    {
-                        defaultDroneRatio: null,
-                        defaultName: "高氮水溶肥",
-                        defaultRatio: 5000,
-                        id: null,
-                        muPrice: null,
-                        muUsage: 10.0,
-                        muUsage2: 10.0,
-                        ratio: 5000,
-                        ratio2: 500,
-                        remark: "",
-                        usageMode: "",
-                        usageModeList: ["叶面施"],
-                        orderId: null,
-                        pesticideFertilizerCode: "1165",
-                        pesticideFertilizerId: "165",
-                        pesticideFertilizerName: "高氮水溶肥",
-                        brand: "广州大炎",
-                        typeName: "营养",
-                        price: 8500,
-                        unit: "g",
-                        executeStyle: null,
-                    },
-                    {
-                        defaultDroneRatio: null,
-                        defaultName: "矿源黄腐酸钾",
-                        defaultRatio: 2000,
-                        id: null,
-                        muPrice: null,
-                        muUsage: 4.0,
-                        muUsage2: 4.0,
-                        ratio: 2000,
-                        ratio2: 200,
-                        remark: "",
-                        usageMode: "",
-                        usageModeList: ["叶面施、根部施"],
-                        orderId: null,
-                        pesticideFertilizerCode: "1166",
-                        pesticideFertilizerId: "166",
-                        pesticideFertilizerName: "矿源黄腐酸钾",
-                        brand: "广州大炎",
-                        typeName: "营养",
-                        price: 15000,
-                        unit: "g",
-                        executeStyle: null,
-                    },
-                ],
-            },
-        ],
-        conditionList: [
-            {
-                index: "1-2-014-02-02-02-01-0008",
-                name: "园区膨果率",
-                type: 1,
-                value: "0.1",
-            },
-        ],
-    },
-]);
-
-watch(
-    () => props.cardContentHeight,
-    (newValue) => {
-        if (newValue) {
-            // console.log('new', newValue);
-        }
-    }
-);
-</script>
-
-<style lang="scss" scoped>
-.record-task {
-    height: 100%;
-    width: 100%;
-    .task-top {
-        padding: 0 12px 12px 12px;
-        background: #fff;
-        border-radius: 0 0 14px 14px;
-        .record-filter {
-            display: flex;
-            justify-content: space-between;
-            align-items: center;
-            .filter-item {
-                color: rgba(0, 0, 0, 0.5);
-                padding: 0 12px;
-                height: 28px;
-                line-height: 28px;
-                border-radius: 20px;
-                &.active {
-                    background: rgba(33, 153, 248, 0.2);
-                    color: #2199f8;
-                }
-            }
-            .filter-item + .filter-item {
-                margin-left: 10px;
-            }
-        }
-        .select-box {
-            padding-top: 5px;
-            width: 100%;
-            display: flex;
-            justify-content: space-around;
-            .select-item {
-                width: fit-content;
-                ::v-deep {
-                    .el-input__wrapper {
-                        background: none;
-                        box-shadow: none;
-                    }
-                    .el-input__inner {
-                        font-size: 14px;
-                        color: rgba(0, 0, 0, 0.5);
-                    }
-                    .el-select__wrapper {
-                        background: none;
-                        box-shadow: none;
-                        gap: 2px;
-                        padding: 4px 2px;
-                        justify-content: center;
-                    }
-                    .el-select__selection {
-                        flex: none;
-                        width: fit-content;
-                    }
-                    .el-select__placeholder {
-                        color: rgba(0, 0, 0, 0.5);
-                        position: static;
-                        transform: none;
-                        width: fit-content;
-                    }
-                }
-            }
-        }
-    }
-    .task-content {
-        display: flex;
-        padding-top: 10px;
-        height: calc(100% - 140px);
-        .plan-menu {
-            width: 90px;
-            height: 100%;
-            overflow: auto;
-            padding: 10px 0;
-            box-sizing: border-box;
-            background: #fff;
-            border-radius: 0 10px 10px 0;
-            .menu-icon {
-                width: 13px;
-            }
-            .menu-text {
-                padding: 0 4px;
-            }
-            ::v-deep {
-                .el-anchor {
-                    height: 100%;
-                    background: none;
-                }
-                .el-anchor__marker {
-                    display: none;
-                }
-                .el-menu {
-                    background: none;
-                    border: none;
-                    .el-sub-menu__title {
-                        background: none;
-                        padding: 0 2px;
-                        justify-content: center;
-                    }
-                    .el-sub-menu__title {
-                        height: 32px;
-                    }
-                    .el-sub-menu .el-sub-menu__icon-arrow {
-                        position: static;
-                        padding-top: 6px;
-                    }
-                    .el-sub-menu {
-                        margin-bottom: 16px;
-                        &.is-opened {
-                            .el-sub-menu__icon-arrow {
-                                padding-bottom: 6px;
-                                padding-top: 0;
-                            }
-                        }
-                        .el-menu-item {
-                            height: 32px;
-                            line-height: 32px;
-                            margin: 4px 8px;
-                            padding: 0 2px;
-                            justify-content: center;
-                            background: none;
-                        }
-                        .el-menu-item.is-active {
-                            background: none;
-                            color: #fff;
-                        }
-                        .el-anchor__item {
-                            width: 100%;
-                            text-align: center;
-                        }
-                        .el-anchor__link {
-                            color: #666666;
-                        }
-                        .el-anchor__link.is-active {
-                            background: linear-gradient(180deg, #70bffe, #2199f8);
-                            border-radius: 20px;
-                            color: #fff;
-                        }
-                    }
-                }
-                .el-anchor__list {
-                    padding-left: 0;
-                }
-            }
-        }
-        .expert-content {
-            width: calc(100% - 90px);
-            height: 100%;
-            overflow: auto;
-            padding-bottom: 10px;
-            box-sizing: border-box;
-            .content-section {
-                position: relative;
-                .section-id {
-                    position: absolute;
-                    // top: -6px;
-                    top: 0;
-                    width: 100%;
-                    height: 1px;
-                }
-                .recipe-item {
-                    margin-right: 0;
-                }
-            }
-            .box-title {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                padding-bottom: 8px;
-                .title-l {
-                    font-size: 16px;
-                    font-weight: 600;
-                    color: #000;
-                    .parent-text {
-                        margin-left: 5px;
-                        font-size: 12px;
-                        font-weight: normal;
-                        padding: 4px 6px;
-                        border-radius: 14px;
-                        background: rgba(119, 119, 119, 0.1);
-                    }
-                }
-                .title-btn {
-                    width: 24px;
-                    height: 24px;
-                    border-radius: 50%;
-                    background: #2199f8;
-                    display: flex;
-                    align-items: center;
-                    justify-content: center;
-                }
-                .title-r {
-                    display: flex;
-                    align-items: center;
-                    color: #ff8a2a;
-                    font-size: 12px;
-                    .r-dot {
-                        width: 6px;
-                        height: 6px;
-                        border-radius: 50%;
-                        background: #ff8a2a;
-                        margin-right: 5px;
-                    }
-                }
-            }
-
-            .action-group {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                padding-top: 8px;
-                margin-top: 8px;
-                border-top: 1px solid #f5f5f5;
-                .action-l {
-                    font-size: 12px;
-                }
-                .action-r {
-                    display: flex;
-                    align-items: center;
-                    .action-item {
-                        padding: 0 11px;
-                        height: 30px;
-                        line-height: 30px;
-                        border-radius: 14px;
-                        font-size: 12px;
-                        &.second-item {
-                            border: 1px solid #2199f8;
-                            color: #2199f8;
-                        }
-                        &.primary-item {
-                            background: #2199f8;
-                            color: #fff;
-                        }
-                        &.warning-item {
-                            background: rgba(255, 131, 29, 0.1);
-                            color: #ff831d;
-                        }
-                    }
-                    .action-item + .action-item {
-                        margin-left: 5px;
-                    }
-                }
-            }
-        }
-    }
-}
-</style>

+ 0 - 345
src/views/old_mini/home/index copy.vue

@@ -1,345 +0,0 @@
-<template>
-    <div class="home-index" :style="{ height: `calc(100vh - ${tabBarHeight}px)` }">
-        <div class="banner-wrap">
-            <img class="banner-img" @click="handleBannerClick" :src="bannerObj?.media?.[0]" alt="" />
-            <div class="banner-title">
-                <span class="van-multi-ellipsis--l2">{{ bannerObj?.title }}</span>
-            </div>
-        </div>
-        <!-- 天气遮罩 -->
-        <div class="weather-mask" v-show="isExpanded" @click="handleMaskClick"></div>
-        <!-- 天气 -->
-        <weather-info
-            ref="weatherInfoRef"
-            class="weather-info"
-            @weatherExpanded="weatherExpanded"
-            :isGarden="false"
-            @changeGarden="changeGarden"
-        ></weather-info>
-        <div class="farm-monitor-container" :class="{ 'container-role': curRole == 2 }">
-            <div class="farm-monitor-left" @click="handleCardClick(monitorCards.left)">
-                <div class="title">
-                    <span>{{ monitorCards.left.title }}</span>
-                    <el-icon v-if="curRole == 2" class="icon"><ArrowRightBold /></el-icon>
-                </div>
-                <div class="content">{{ monitorCards.left.content }}</div>
-                <div class="arrow" v-if="curRole != 2">
-                    <el-icon class="icon"><ArrowRightBold /></el-icon>
-                </div>
-            </div>
-            <div class="farm-monitor-right">
-                <div
-                    v-for="(item, index) in monitorCards.right"
-                    :key="index"
-                    class="right-item"
-                    :class="{ expert: index === 1 }"
-                    @click="handleCardClick(item)"
-                >
-                    <div class="title">
-                        <span>{{ item.title }}</span>
-                        <el-icon class="icon"><ArrowRightBold /></el-icon>
-                    </div>
-                    <div class="content">{{ item.content }}</div>
-                </div>
-            </div>
-        </div>
-        <!-- <AgriculturalDynamics /> -->
-    </div>
-    <!-- 创建农场弹窗 -->
-    <tip-popup
-        v-model:show="showFarmPopup"
-        :type="farmPopupType"
-        :text="farmPopupType === 'create' ? ['您当前还没有农场', '请先创建农场'] : '农场创建成功'"
-        @confirm="handleBtn"
-    />
-    <!-- 问题提醒 -->
-    <problem-reminder></problem-reminder>
-</template>
-
-<script setup>
-import { ref, computed, onActivated } from "vue";
-import { useStore } from "vuex";
-import weatherInfo from "@/components/weatherInfo.vue";
-// import AgriculturalDynamics from "./components/AgriculturalDynamics.vue";
-import { useRouter, useRoute } from "vue-router";
-import wx from "weixin-js-sdk";
-import problemReminder from "./components/problemReminder.vue";
-import { ElMessage } from "element-plus";
-import tipPopup from "@/components/popup/tipPopup.vue";
-
-const curRole = localStorage.getItem("SET_USER_CUR_ROLE");
-const store = useStore();
-const tabBarHeight = computed(() => store.state.home.tabBarHeight);
-const router = useRouter();
-const route = useRoute();
-
-const showFarmPopup = ref(false);
-const farmPopupType = ref("create");
-
-const gardenId = ref(null);
-
-const isGarden = ref(false);
-const changeGarden = ({ id }) => {
-    gardenId.value = id;
-    getExpertBySubjectId();
-};
-
-const expertInfo = ref({});
-const getExpertBySubjectId = () => {
-    VE_API.home.getExpertBySubjectId({ subjectId: gardenId.value }).then(({ data }) => {
-        expertInfo.value = data[0] || {};
-        sessionStorage.setItem("expertId", data[0].appUserId);
-    });
-};
-
-// 监测卡片数据
-const monitorCards = ref({
-    left: {
-        title: "农场监测",
-        content: "实时监测农场状态",
-        route: "/monitor",
-    },
-    right: [
-        {
-            title: "病虫识别",
-            content: "精准识别病虫",
-            route: "/pest",
-        },
-        {
-            title: "专家咨询",
-            content: "专家多年经验指导",
-            route: "/chat_frame",
-        },
-    ],
-});
-
-// 卡片点击事件
-const handleCardClick = (card) => {
-    if (curRole == 0) {
-        if (!isGarden.value) {
-            showFarmPopup.value = true;
-            return;
-        }
-    }
-    if (card.route === "/pest") {
-        // ElMessage.warning("该功能正在升级中,敬请期待");
-        // if (curRole == 2) {
-        //     ElMessage.warning("该功能正在升级中,敬请期待");
-        // } else {
-            const dropdownGardenItem = ref({
-                organId: 766,
-                periodId: 1,
-                wktVal: "wktVal",
-                address: "address",
-                district: "district",
-                name: "荔博园",
-            });
-            wx.miniProgram.navigateTo({
-                url: `/pages/subPages/new_recognize/index?gardenData=${JSON.stringify(dropdownGardenItem.value)}`,
-            });
-        // }
-    } else {
-        if (card.route === "/chat_frame") {
-            router.push("/agri_services?active=1");
-            // router.push(`/chat_frame?userId=${expertInfo.value.appUserId}`);
-        } else {
-            router.push(card.route);
-        }
-    }
-};
-
-const handleBtn = () => {
-    if (farmPopupType.value === "create") {
-        router.push("/create_farm?isReload=true&from=home");
-    }
-};
-
-onActivated(() => {
-    getBannerList();
-    isGarden.value = Boolean(localStorage.getItem("isGarden"));
-    // 检测是否从创建农场页面成功返回
-    if (route.query.showSuccess === "true") {
-        farmPopupType.value = "success";
-        showFarmPopup.value = true;
-
-        // 清除URL参数,避免刷新页面时再次显示弹窗
-        router.replace({
-            path: "/home",
-            query: { reload: route.query.reload },
-        });
-    }
-    if (curRole == 2) {
-        monitorCards.value.left = {
-            title: "新增客户",
-            content: "实时监测农场状态",
-            route: "/create_farm?type=client&isReload=true&from=home",
-        };
-        monitorCards.value.right = [
-            {
-                title: "病虫识别",
-                content: "精准识别病虫",
-                route: "/pest",
-            },
-        ];
-    }
-});
-
-const bannerObj = ref({});
-const getBannerList = () => {
-    const params = {
-        page: 1,
-        limit: 1,
-        topicId: 5,
-    };
-    VE_API.home.warningPageList(params).then(({ data }) => {
-        bannerObj.value = data[0] || {};
-    });
-};
-
-const isExpanded = ref(false);
-const weatherInfoRef = ref(null);
-const weatherExpanded = (isExpandedValue) => {
-    isExpanded.value = isExpandedValue;
-};
-
-// 点击遮罩时收起天气
-const handleMaskClick = () => {
-    if (weatherInfoRef.value && weatherInfoRef.value.toggleExpand) {
-        weatherInfoRef.value.toggleExpand();
-    }
-};
-
-const handleBannerClick = () => {
-    router.push(`/warning_detail?id=${bannerObj.value.id}`);
-};
-</script>
-
-<style scoped lang="scss">
-.home-index {
-    width: 100%;
-    height: 100vh;
-    overflow: auto;
-    position: relative;
-    .banner-wrap {
-        width: 100%;
-        height: 200px;
-        position: relative;
-        z-index: 1;
-        .banner-img {
-            width: 100%;
-            height: 100%;
-            object-fit: cover;
-        }
-        .banner-title {
-            position: absolute;
-            bottom: 0;
-            left: 0;
-            width: 100%;
-            padding: 10px 12px 34px 12px;
-            box-sizing: border-box;
-            background: linear-gradient(
-                180deg,
-                rgba(102, 102, 102, 0) -64.3%,
-                rgba(0, 0, 0, 0.0074) -1.43%,
-                rgba(0, 0, 0, 0.684747) 39.67%,
-                rgba(0, 0, 0, 0.74) 40.09%,
-                rgba(0, 0, 0, 0.74) 83.2%
-            );
-            color: #fff;
-            font-weight: bold;
-            backdrop-filter: blur(2px);
-        }
-    }
-    .weather-mask {
-        position: fixed;
-        top: 0;
-        left: 0;
-        width: 100%;
-        height: 100%;
-        background-color: rgba(0, 0, 0, 0.52);
-        z-index: 2;
-    }
-    .weather-info {
-        width: calc(100% - 20px);
-        position: absolute;
-        top: calc(200px - 28px);
-        left: 10px;
-        z-index: 3;
-    }
-    .farm-monitor-container {
-        padding-top: 60px;
-        display: flex;
-        align-items: center;
-        gap: 7px;
-        margin: 10px;
-        height: 170px;
-        .farm-monitor-left,
-        .farm-monitor-right {
-            .title {
-                font-size: 16px;
-                color: #1d2129;
-                font-weight: 500;
-                .icon {
-                    font-size: 12px;
-                    margin-left: 2px;
-                }
-            }
-            .content {
-                margin-top: 6px;
-                font-size: 12px;
-                color: rgba(29, 33, 41, 0.5);
-                line-height: 1.5;
-            }
-            .arrow {
-                border-radius: 5px;
-                background: #fff;
-                display: flex;
-                align-items: center;
-                justify-content: center;
-                width: 34px;
-                height: 25px;
-                margin-top: 10px;
-                font-size: 11px;
-            }
-        }
-        .farm-monitor-left {
-            flex: 1;
-            height: 100%;
-            padding: 25px 10px;
-            box-sizing: border-box;
-            background: url("@/assets/img/home/farm-bg-1.png") no-repeat center center / 100% 100%;
-        }
-        .farm-monitor-right {
-            flex: 1;
-            height: 100%;
-            display: flex;
-            flex-direction: column;
-            gap: 7px;
-            .right-item {
-                padding: 10px;
-                box-sizing: border-box;
-                display: flex;
-                flex-direction: column;
-                justify-content: center;
-                flex: 1;
-                background: url("@/assets/img/home/farm-bg-2.png") no-repeat center center / 100% 100%;
-            }
-            .expert {
-                background: url("@/assets/img/home/farm-bg-3.png") no-repeat center center / 100% 100%;
-            }
-        }
-
-        &.container-role {
-            height: 104px;
-            .farm-monitor-left {
-                background: url("@/assets/img/home/farm-bg-4.png") no-repeat center center / 100% 100%;
-            }
-            .farm-monitor-right {
-                .right-item {
-                    background: url("@/assets/img/home/farm-bg-5.png") no-repeat center center / 100% 100%;
-                }
-            }
-        }
-    }
-}
-</style>

+ 0 - 523
src/views/old_mini/home/index.vue

@@ -1,523 +0,0 @@
-<template>
-    <div class="home-index" :style="{ height: `calc(100vh - ${tabBarHeight}px)` }">
-        <!-- <div class="banner-wrap" @click="handleBannerClick">
-            <img class="banner-img" :src="bannerObj?.media?.[0]" alt="" />
-            <div class="banner-title">
-                <span class="van-multi-ellipsis--l2">{{ bannerObj?.title }}</span>
-            </div>
-        </div> -->
-        <!-- 天气遮罩 -->
-        <div class="weather-mask" v-show="isExpanded" @click="handleMaskClick"></div>
-        <!-- 天气 -->
-        <weather-info ref="weatherInfoRef" class="weather-info" @weatherExpanded="weatherExpanded" :isGarden="false"
-            @changeGarden="changeGarden"></weather-info>
-        <div class="expert-home">
-            <div class="expert-banner" @click="handleExpertBannerClick">
-                <img class="expert-banner-img" src="@/assets/img/home/banner.png" alt="">
-                <div class="expert-desc">
-                    <img class="expert-desc-icon" src="@/assets/img/home/expert-text.png" alt="">
-                    <!-- <div class="desc-text"><span class="dotted"></span>您有一条长势报告,请查看</div> -->
-                    <div class="desc-text"><span class="dotted"></span>点击查看农情互动采集</div>
-                </div>
-            </div>
-        </div>
-
-        <!-- <div class="task-list">
-            <div class="task-title">待办任务</div>
-            <div class="bottom-tag">
-                <div class="tag-card">
-                    <div class="card-content">
-                        <div class="card-main-text">干旱风险</div>
-                        <div class="card-sub-text">
-                            气象风险
-                        </div>
-                    </div>
-                </div>
-                <div class="tag-card active">
-                    <div class="card-content">
-                        <div class="card-main-text">当天</div>
-                        <div class="card-sub-text">新梢长势评估</div>
-                    </div>
-                </div>
-                <div class="tag-card">
-                    <div class="card-content">
-                        <div class="card-main-text">3天后</div>
-                        <div class="card-sub-text">白点催醒</div>
-                    </div>
-                </div>
-            </div>
-        </div> -->
-
-        <knowledge-card />
-        <!-- <template v-if="userType == 2">
-        </template> -->
-    </div>
-    <tip-popup v-model:show="showTipPopup" type="warning" text="请设置" highlightText="种植方案" buttonText="去设置"
-        @confirm="handleBtn" :closeOnClickOverlay="false" :zIndex="9999" />
-
-    <tip-popup v-model:show="showDronePhotoPopup" font type="success" text="无人机照片已上传完毕请您确认" buttonText="去确认"
-        @confirm="hanldeDrone" :zIndex="9999" />
-
-    <!-- 农事执行弹窗 -->
-    <agri-execute-popup v-model:show="showAgriExecutePopup" :popupData="agriExecuteData" @later="handleAgriLater"
-        @executed="handleAgriExecuted" />
-
-    <!-- 提醒时间选择弹窗 -->
-    <reminder-time-popup v-model:show="showReminderTimePopup" @confirm="handleReminderTimeConfirm" />
-
-    <!-- 执行轨迹弹窗 -->
-    <execute-trace-popup v-model:show="showExecuteTracePopup" @later="handleTraceLater" @confirm="handleTraceConfirm" />
-
-    <tip-popup v-model:show="showReportPopup" type="success" text="请查看" buttonText="去查看" @confirm="handleReportBtn"
-        :zIndex="9999">
-        <template #default>
-            <div class="report-text">您的农情报告已生成</div>
-        </template>
-    </tip-popup>
-</template>
-
-<script setup>
-import { ref, computed, onActivated, onMounted } from "vue";
-import { useStore } from "vuex";
-import weatherInfo from "@/components/weatherInfo.vue";
-import { useRouter, useRoute } from "vue-router";
-import wx from "weixin-js-sdk";
-import tipPopup from "@/components/popup/tipPopup.vue";
-import agriExecutePopup from "@/components/popup/agriExecutePopup.vue";
-import reminderTimePopup from "@/components/popup/reminderTimePopup.vue";
-import executeTracePopup from "@/components/popup/executeTracePopup.vue";
-import knowledgeCard from "./components/knowledgeCard.vue";
-
-const store = useStore();
-const tabBarHeight = computed(() => store.state.home.tabBarHeight);
-const router = useRouter();
-const route = useRoute();
-
-const showDronePhotoPopup = ref(false)
-const hanldeDrone = () => {
-    console.log('111')
-}
-
-const showTipPopup = ref(false);
-const handleBtn = () => {
-    router.push("/plan?pageType=plant&headerTitle=请设置您的种植方案");
-};
-
-const handleReportBtn = () => {
-    router.push({
-        path: "/growth_report",
-        query: { farmId: gardenId.value },
-    });
-}
-
-// 农事执行弹窗相关
-const showAgriExecutePopup = ref(false); // 农事执行弹窗
-const agriExecuteData = ref({
-    expertName: "韦帮稳",
-    title: "梢期杀虫 农事执行",
-    abnormalText: "由于***异常的出现,由于***异常的出现,由于***异常的出现,由于***异常的出现,",
-    imageUrl: "",
-    laterBtn: true,
-});
-
-// 农事执行弹窗相关方法
-const handleAgriLater = () => {
-    console.log("稍后执行");
-    // 可以在这里添加稍后执行的逻辑
-    // 关闭当前弹窗
-    showAgriExecutePopup.value = false;
-    // 显示提醒时间选择弹窗
-    showReminderTimePopup.value = true;
-};
-
-const handleAgriExecuted = () => {
-    if (agriExecuteData.value.executedButtonText === '开始采集') {
-        router.push("/interaction_list?expertMiniUserId=81881&oldUser=true");
-    } else {
-        // 显示执行轨迹弹窗
-        showExecuteTracePopup.value = true;
-    }
-    // 关闭当前弹窗
-    showAgriExecutePopup.value = false;
-};
-
-// 提醒时间选择弹窗相关
-const showReminderTimePopup = ref(false);
-
-// 确认提醒时间
-const handleReminderTimeConfirm = (time) => {
-    console.log("选择的提醒时间:", time);
-    // 可以在这里添加提交提醒时间的逻辑
-};
-
-// 执行轨迹弹窗相关
-const showExecuteTracePopup = ref(false);
-
-// 稍后上传
-const handleTraceLater = () => {
-    console.log("稍后上传");
-    // 可以在这里添加稍后上传的逻辑
-};
-
-// 确认上传
-const handleTraceConfirm = () => {
-    console.log("确认上传");
-    // 可以在这里添加确认上传的逻辑
-};
-
-//判断是否存在可用方案
-async function checkExistsEnabledScheme() {
-    const { data } = await VE_API.home.existsEnabledScheme({ containerId: null });
-    if (!data && localStorage.getItem("SET_USER_CUR_ROLE") == 2) {
-        showTipPopup.value = true;
-    }
-}
-
-const gardenId = ref(null);
-const changeGarden = ({ id }) => {
-    gardenId.value = id;
-    getExpertBySubjectId();
-    getReport();
-};
-
-const expertInfo = ref({});
-const getExpertBySubjectId = () => {
-    VE_API.home.getExpertBySubjectId({ subjectId: gardenId.value }).then(({ data, code }) => {
-       if(code === 0) {
-            expertInfo.value = data || {};
-            sessionStorage.setItem("expertId", data.appUserId);
-        }
-    });
-};
-
-const showReportPopup = ref(false);
-const getReport = () => {
-    if (!gardenId.value) return;
-    VE_API.farm.growthReportBySubject({ subjectId: gardenId.value, limit: 20, isRead: 0 ,generateStatus:1}).then(({ data }) => {
-        if (data && data.length > 0) {
-            showReportPopup.value = true;
-        } else {
-            showReportPopup.value = false;
-        }
-    });
-}
-
-// 监测卡片数据
-const monitorCards = ref({
-    left: {
-        title: "农情采集",
-        content: "精准监测  科学决策",
-        route: "/pest",
-    },
-    right: [
-        {
-            title: "病虫识别",
-            content: "智能识别  快速诊断",
-            route: "/pest",
-        },
-        // {
-        //     title: "新增客户",
-        //     content: "农情先知  高效管理",
-        //     route: "/create_farm?type=client&isReload=true&from=home",
-        // },
-    ],
-});
-
-// 卡片点击事件
-const handleCardClick = (card) => {
-    const dropdownGardenItem = ref({
-        organId: 766,
-        periodId: 1,
-        name: "荔博园",
-    });
-    if (card.title === "农情采集") {
-        dropdownGardenItem.value.page = "create_farm";
-        wx.miniProgram.navigateTo({
-            url: `/pages/subPages/new_recognize/index?gardenData=${JSON.stringify(dropdownGardenItem.value)}`,
-        });
-    } else if (card.title === "病虫识别") {
-        dropdownGardenItem.value.page = "album_recognize";
-        wx.miniProgram.navigateTo({
-            url: `/pages/subPages/new_recognize/index?gardenData=${JSON.stringify(dropdownGardenItem.value)}`,
-        });
-    } else {
-        router.push(card.route);
-    }
-};
-
-onActivated(() => {
-    getManagerList();
-    // if (userType.value != 2) {
-    //     checkExistsEnabledScheme()
-    // }
-    getBannerList();
-    // 检测是否从创建农场页面成功返回
-    if (route.query.showSuccess === "true") {
-        // 清除URL参数,避免刷新页面时再次显示弹窗
-        router.replace({
-            path: "/home",
-            query: { reload: route.query.reload },
-        });
-    }
-    sessionStorage.removeItem('interactionListScrollTop');
-});
-
-const userType = ref(localStorage.getItem("USER_TYPE"));
-onMounted(() => {
-    if (userType.value != 2) {
-        monitorCards.value.right.push({
-            title: "新增客户",
-            content: "农情先知  高效管理",
-            route: "/create_farm?type=client&isReload=true&from=home",
-        });
-    }
-});
-
-// 查询当前农资店的成员列表(只保留有"任务接单"权限的成员)
-const getManagerList = async () => {
-    const { data } = await VE_API.mine.listManagerList({ onlyExecutor: true });
-    if (data && data.length > 0) {
-        // 过滤 permissionList 中包含"任务接单"的成员,并过滤掉超管(role为1)
-        const executorList = data.filter((item) => item.role !== 1);
-        sessionStorage.setItem("executorList", JSON.stringify(executorList));
-    }
-};
-
-const bannerObj = ref({});
-const getBannerList = () => {
-    const params = {
-        page: 1,
-        limit: 1,
-        topicId: 5,
-    };
-    VE_API.home.warningPageList(params).then(({ data }) => {
-        bannerObj.value = data[0] || {};
-    });
-};
-
-const isExpanded = ref(false);
-const weatherInfoRef = ref(null);
-const weatherExpanded = (isExpandedValue) => {
-    isExpanded.value = isExpandedValue;
-};
-
-// 点击遮罩时收起天气
-const handleMaskClick = () => {
-    if (weatherInfoRef.value && weatherInfoRef.value.toggleExpand) {
-        weatherInfoRef.value.toggleExpand();
-    }
-};
-
-const handleExpertBannerClick = () => {
-    // router.push("/consult?userId=81881");
-    router.push("/interaction_list?expertMiniUserId=81881");
-};
-
-const handleBannerClick = () => {
-    router.push(`/warning_detail?id=${bannerObj.value.id}`);
-};
-</script>
-
-<style scoped lang="scss">
-.home-index {
-    width: 100%;
-    height: 100vh;
-    overflow: auto;
-    position: relative;
-    // background: linear-gradient(180deg, #f4f9fd 0%, #f9f9f9 100%);
-    background: linear-gradient(180deg, #F9F9F9 0%, #F0F8FF 31.47%, #F9F9F9 46.81%, #F9F9F9 100%);
-
-    .banner-wrap {
-        width: 100%;
-        height: 200px;
-        position: relative;
-        z-index: 1;
-
-        .banner-img {
-            width: 100%;
-            height: 100%;
-            object-fit: cover;
-        }
-
-        .banner-title {
-            position: absolute;
-            bottom: 0;
-            left: 0;
-            width: 100%;
-            padding: 10px 12px 34px 12px;
-            box-sizing: border-box;
-            background: linear-gradient(180deg,
-                    rgba(102, 102, 102, 0) -64.3%,
-                    rgba(0, 0, 0, 0.0074) -1.43%,
-                    rgba(0, 0, 0, 0.684747) 39.67%,
-                    rgba(0, 0, 0, 0.74) 40.09%,
-                    rgba(0, 0, 0, 0.74) 83.2%);
-            color: #fff;
-            font-weight: bold;
-            backdrop-filter: blur(2px);
-        }
-    }
-
-    .weather-mask {
-        position: fixed;
-        top: 0;
-        left: 0;
-        width: 100%;
-        height: 100%;
-        background-color: rgba(0, 0, 0, 0.52);
-        z-index: 2;
-    }
-
-    .weather-info {
-        width: calc(100% - 20px);
-        position: absolute;
-        // top: calc(200px - 28px);
-        top: 8px;
-        left: 10px;
-        z-index: 3;
-    }
-
-    .expert-home {
-        padding: 90px 10px 10px 10px;
-
-        .expert-banner {
-            position: relative;
-
-            .expert-banner-img {
-                width: 100%;
-            }
-
-            .expert-desc {
-                position: absolute;
-                bottom: 0;
-                left: 0;
-                width: 100%;
-                border-radius: 0 0 8px 8px;
-                padding: 6px 8px;
-                box-sizing: border-box;
-                background: rgba(0, 0, 0, 0.5);
-                color: #fff;
-                backdrop-filter: blur(4px);
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-
-                .expert-desc-icon {
-                    width: 91px;
-                }
-
-                .desc-text {
-                    font-family: "PangMenZhengDao";
-                    font-size: 14px;
-                    color: #fff;
-                    display: flex;
-                    align-items: center;
-                    justify-content: center;
-                    gap: 6px;
-
-                    .dotted {
-                        width: 5px;
-                        height: 5px;
-                        background: #fff;
-                        border-radius: 50%;
-                    }
-                }
-            }
-        }
-    }
-
-    .task-list {
-        padding: 0 10px 10px;
-
-        .task-title {
-            color: #000;
-            margin: 6px 0 14px 0;
-            font-weight: 500;
-            font-size: 16px;
-            line-height: 22px;
-            position: relative;
-            padding-left: 9px;
-
-            &::after {
-                content: "";
-                position: absolute;
-                left: 0;
-                top: 50%;
-                transform: translateY(-50%);
-                width: 3px;
-                height: 15px;
-                background: #2199f8;
-                border-radius: 20px;
-            }
-        }
-
-        .bottom-tag {
-            display: flex;
-            gap: 4px;
-
-            .tag-card {
-                flex: 1;
-                border-radius: 6px;
-                padding: 8px 4px;
-                box-sizing: border-box;
-                background: rgba(201, 201, 201, 0.1);
-                border: 0.5px solid transparent;
-
-                .card-content {
-                    display: flex;
-                    flex-direction: column;
-                    align-items: center;
-                    justify-content: center;
-                    text-align: center;
-                    height: 100%;
-
-                    .card-main-text {
-                        font-size: 18px;
-                        line-height: 28px;
-                        font-weight: 400;
-                        color: #1D2129;
-                        margin-bottom: 2px;
-                    }
-
-                    .card-sub-text {
-                        font-size: 14px;
-                        line-height: 22px;
-                        color: #4E5969;
-                        display: flex;
-                        align-items: center;
-                        gap: 4px;
-
-                        .card-icon {
-                            display: inline-flex;
-                            align-items: center;
-                            justify-content: center;
-                            width: 12px;
-                            height: 12px;
-                            color: #2199f8;
-                        }
-                    }
-                }
-
-                &.active {
-                    background: rgba(33, 153, 248, 0.1);
-                    border-color: #2199f8;
-
-                    .card-content {
-                        .card-main-text {
-                            color: #2199f8;
-                        }
-
-                        .card-sub-text {
-                            color: #2199f8;
-                        }
-                    }
-                }
-            }
-        }
-    }
-}
-
-.report-text {
-    font-size: 20px;
-}
-</style>

+ 0 - 486
src/views/old_mini/home/patrolPhoto.vue

@@ -1,486 +0,0 @@
-<template>
-    <div class="patrol-photo">
-        <custom-header name="农场照片"></custom-header>
-        <div class="patrol-content">
-            <div class="photo-header">
-                <el-date-picker style="width: 120px" v-model="value1" type="date" placeholder="全部日期" />
-                <div class="select-wrap">
-                    <div
-                        :class="['select-item', { active: tabActive === index }]"
-                        v-for="(item, index) in tabsList"
-                        :key="index"
-                        @click="handleTabAct(index)"
-                    >
-                        {{ item }}
-                    </div>
-                </div>
-            </div>
-            <div class="photo-wrap">
-                <List
-                    class="photo-list"
-                    v-model:loading="loading"
-                    :finished="finished"
-                    :immediate-check="false"
-                    finished-text="没有更多了"
-                    @load="getPhotoList"
-                >
-                    <div class="photo-item" v-for="(dateItem, dateIndex) in photoListByDate" :key="dateIndex">
-                        <div class="photo-item-top">
-                            <span class="date-text">{{ dateItem.dateText }}</span>
-                            <div class="weather-wrap">
-                                <div class="weather-item">
-                                    <i :class="'qi-'+ dateItem.weather.iconDay + '-fill'"></i>
-                                    <span>{{ dateItem.weather.textDay }}</span>
-                                </div>
-                                <div class="weather-item">
-                                    <img src="@/assets/img/home/temperature.png" alt="">
-                                    <span>{{ dateItem.weather.tempMax }}℃</span>
-                                </div>
-                                <div class="weather-item">
-                                    <img src="@/assets/img/home/humidity.png" alt="">
-                                    <span>{{ dateItem.weather.humidity }}%</span>
-                                </div>
-                            </div>
-                        </div>
-                        <div class="photo-img-wrap">
-                            <photo-provider :photo-closable="true">
-                                <photo-consumer
-                                    v-for="src in dateItem.images"
-                                    intro="执行照片"
-                                    :key="src.uid || src.path"
-                                    :src="src.path"
-                                >
-                                    <div
-                                        class="photo-img"
-                                        :class="{
-                                            'is-disabled': isCheck && selectedImageIds.length >= MAX_SELECT_COUNT && !isImageSelected(src.uid)
-                                        }"
-                                        @click="handleImageClick($event, src)"
-                                    >
-                                        <img :src="src.path" />
-                                        <div class="photo-check" v-if="isCheck" @click.stop="toggleImageSelect(src)">
-                                            <span class="check-icon" :class="{ checked: isImageSelected(src.uid) }"></span>
-                                        </div>
-                                    </div>
-                                </photo-consumer>
-                            </photo-provider>
-                        </div>
-                    </div>
-                </List>
-            </div>
-        </div>
-        <div class="custom-bottom-fixed-btns" v-if="isCheck">
-            <div class="secondary-btn">已选择 {{ selectedImageIds.length }} 项</div>
-            <div class="bottom-btn primary-btn" @click="handleSend">发送</div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { ref, onMounted, nextTick, watch } from "vue";
-import { useRouter, useRoute } from "vue-router";
-import { List } from "vant";
-import { ElMessage } from "element-plus";
-import { base_img_url2,resize_300 } from "@/api/config";
-import customHeader from "@/components/customHeader.vue";
-
-
-const router = useRouter();
-const route = useRoute();
-const tabActive = ref(0);
-const tabsList = ["物候", "病虫", "生长"];
-const handleTabAct = (index) => {
-    tabActive.value = index;
-};
-
-const value1 = ref("");
-
-// 按日期分组的图片列表
-const photoListByDate = ref([]);
-const loading = ref(false);
-const finished = ref(false);
-// 日期列表
-const dateList = ref([]);
-// 当前加载的日期索引
-const currentDateIndex = ref(0);
-// 是否正在加载日期列表
-const isLoadingDates = ref(false);
-// 是否正在请求图片数据(独立标志,避免与 List 组件的 loading 冲突)
-const isRequestingImages = ref(false);
-// 当前页码
-const currentPageIndex = ref(0);
-const farmId = ref(766);
-const selectedImageIds = ref([]);
-const MAX_SELECT_COUNT = 3; // 最多选择3张
-const buildImageUid = (image) =>
-    image?.id ?? image?.resId ?? image?.resFilename ?? image?.filename ?? image?.path;
-const isImageSelected = (uid) => selectedImageIds.value.includes(uid);
-const toggleImageSelect = (image) => {
-    
-    if (!image?.uid) return;
-    const uid = image.uid;
-    if (isImageSelected(uid)) {
-        // 取消选择
-        selectedImageIds.value = selectedImageIds.value.filter((item) => item !== uid);
-    } else {
-        // 尝试选择新图片
-        if (selectedImageIds.value.length >= MAX_SELECT_COUNT) {
-            ElMessage.warning(`最多只能选择${MAX_SELECT_COUNT}张图片`);
-            return;
-        }
-        selectedImageIds.value = [...selectedImageIds.value, uid];
-    }
-};
-const handleImageClick = (event, image) => {
-    if (!isCheck.value) return;
-    event?.preventDefault();
-    event?.stopPropagation();
-    toggleImageSelect(image);
-};
-
-// 格式化日期显示
-const formatDate = (dateStr) => {
-    if (!dateStr) return "";
-    const date = new Date(dateStr);
-    const year = date.getFullYear();
-    const month = date.getMonth() + 1;
-    const day = date.getDate();
-    return `${year}年${month}月${day}日`;
-};
-
-// 获取有图片的日期列表
-const findHasImagesDate = (isLoadMore = false) => {
-    if (isLoadingDates.value) return Promise.resolve();
-
-    isLoadingDates.value = true;
-    const params = {
-        farmId: farmId.value,
-        pageIndex: currentPageIndex.value,
-        limit: 10,
-    };
-    return VE_API.farm
-        .findHasImagesDate(params)
-        .then(({ data }) => {
-            if (data && Array.isArray(data) && data.length > 0) {
-                if (isLoadMore) {
-                    // 如果是加载更多,追加到现有日期列表
-                    dateList.value = [...dateList.value, ...data];
-                } else {
-                    // 首次加载,重置日期列表
-                    dateList.value = data;
-                    currentDateIndex.value = 0;
-                    currentPageIndex.value = 1;
-                }
-                
-                finished.value = false;
-                loading.value = false;
-                isLoadingDates.value = false;
-
-                // 如果是首次加载,等待 List 组件触发加载
-                if (!isLoadMore && data.length > 0) {
-                    loading.value = false;
-                    finished.value = false;
-                    isRequestingImages.value = false;
-                    // 使用 nextTick 确保 DOM 更新后,List 组件能检测到需要加载
-                    nextTick(() => {
-                        if (!finished.value && currentDateIndex.value < dateList.value.length) {
-                            getPhotoList();
-                        }
-                    });
-                }
-            } else {
-                // 没有更多日期了
-                finished.value = true;
-                isLoadingDates.value = false;
-            }
-        })
-        .catch((error) => {
-            console.error("findHasImagesDate 请求失败:", error);
-            isLoadingDates.value = false;
-            finished.value = true;
-        });
-};
-
-// 加载下一个日期的图片
-const loadNextDateImages = () => {
-    // 如果已经加载完所有日期,尝试加载更多日期
-    if (currentDateIndex.value >= dateList.value.length) {
-        // 不是直接设置 finished,而是尝试获取更多日期
-        loadMoreDates();
-        return;
-    }
-
-    // 如果已经标记为完成,直接返回
-    if (finished.value) {
-        return;
-    }
-
-    // 如果正在请求,直接返回(避免重复请求)
-    if (isRequestingImages.value) {
-        return;
-    }
-
-    // 设置请求标志和 loading 状态
-    isRequestingImages.value = true;
-    loading.value = true;
-    const currentDate = dateList.value[currentDateIndex.value];
-
-    const params = {
-        farmId: farmId.value,
-        date: currentDate,
-    };
-
-    VE_API.farm
-        .getImageInfo(params)
-        .then(({ data }) => {
-            if (data.images.length > 0) {
-                // 处理图片数据,添加图片路径
-                const photoArr = data.images.map((item) => ({
-                    ...item,
-                    uid: buildImageUid(item),
-                    path: base_img_url2 + (item.resFilename || item.filename) + resize_300,
-                }));
-
-                // 将当前日期的图片数据添加到列表中
-                photoListByDate.value.push({
-                    date: currentDate,
-                    dateText: formatDate(currentDate),
-                    images: photoArr,
-                    weather: data.weather,
-                });
-            }
-            
-            // 移动到下一个日期
-            currentDateIndex.value++;
-        })
-        .catch((error) => {
-            console.error("获取图片失败:", error);
-            // 请求失败时也移动到下一个日期,避免卡住
-            currentDateIndex.value++;
-        })
-        .finally(() => {
-            // 使用 finally 确保状态总是被重置
-            isRequestingImages.value = false;
-            loading.value = false;
-            
-            // 检查是否还有更多日期需要加载
-            if (currentDateIndex.value >= dateList.value.length) {
-                // 当前日期列表已加载完,尝试加载更多日期
-                loadMoreDates();
-            }
-        });
-};
-
-// 加载更多日期
-const loadMoreDates = () => {
-    if (isLoadingDates.value || finished.value) {
-        return;
-    }
-    
-    // pageIndex + 1,获取下一页日期
-    currentPageIndex.value++;
-    loading.value = true;
-    
-    findHasImagesDate(true).then(() => {
-        // 如果获取到新日期,继续加载图片
-        if (currentDateIndex.value < dateList.value.length) {
-            loadNextDateImages();
-        }
-    });
-};
-
-// 滚动加载触发
-const getPhotoList = () => {
-    // 如果已经完成,直接返回
-    if (finished.value) {
-        loading.value = false; // 确保 loading 状态被重置
-        return;
-    }
-
-    // 调用加载函数(loadNextDateImages 内部会检查 loading 状态)
-    loadNextDateImages();
-};
-
-const isCheck = ref(false);
-onMounted(() => {
-    isCheck.value = route.query.isCheck;
-    farmId.value = route.query.farmId;
-    findHasImagesDate();
-});
-
-const handleSend = () => {
-    const selectedFilenames = [];
-    // 遍历所有日期的图片,找到选中的图片
-    photoListByDate.value.forEach((dateItem) => {
-        dateItem.images.forEach((image) => {
-            if (isImageSelected(image.uid)) {
-                selectedFilenames.push(base_img_url2 + image.filename);
-            }
-        });
-    });
-    router.push(`/chat_frame?userId=${route.query.userId}&farmId=${farmId.value}&formPage=monitor&selectedImgs=${JSON.stringify(selectedFilenames)}`);
-};
-</script>
-
-<style lang="scss" scoped>
-::v-deep {
-    .van-list__finished-text {
-        width: 100%;
-    }
-    .el-input__wrapper {
-        box-shadow: none;
-        border: 1px solid #2199f8;
-        --el-input-placeholder-color: #2199f8;
-    }
-    .el-input__inner,
-    .el-input__prefix {
-        color: #2199f8;
-    }
-}
-.patrol-photo {
-    width: 100%;
-    height: 100vh;
-    background: #fff;
-    .patrol-content {
-        padding: 0 12px;
-        width: 100%;
-        height: calc(100vh - 50px);
-        box-sizing: border-box;
-        margin-top: 10px;
-        .photo-header {
-            display: flex;
-            width: 100%;
-            margin-bottom: 20px;
-            .select-wrap {
-                display: flex;
-                width: calc(100% - 120px);
-                .select-item {
-                    margin-left: 12px;
-                    flex: 1;
-                    color: #666666;
-                    padding: 6px 0;
-                    text-align: center;
-                    background: #f5f5f5;
-                    border-radius: 5px;
-                    &.active {
-                        color: #2199f8;
-                        background: #e0f1fe;
-                    }
-                }
-            }
-        }
-        .photo-wrap {
-            width: 100%;
-            height: calc(100vh - 95px);
-            overflow: auto;
-            .photo-list {
-                width: 100%;
-                .photo-item {
-                    width: 100%;
-                    .photo-item-top {
-                        display: flex;
-                        align-items: center;
-                        margin-bottom: 12px;
-                        .date-text {
-                            font-weight: 500;
-                            font-size: 14px;
-                            color: #333;
-                            margin-right: 20px;
-                        }
-                        .weather-wrap {
-                            display: flex;
-                            align-items: center;
-                            .weather-item {
-                                display: flex;
-                                gap: 4px;
-                                align-items: center;
-                                font-size: 12px;
-                                margin-right: 10px;
-                                img {
-                                    width: 16px;
-                                    height: 16px;
-                                }
-                            }
-                        }
-                    }
-                    .photo-img-wrap {
-                        display: flex;
-                        flex-wrap: wrap;
-                        gap: 10px;
-                        // .region-text {
-                        //     width: 68px;
-                        //     text-align: center;
-                        //     font-weight: 500;
-                        //     font-size: 12px;
-                        //     padding: 5px 0;
-                        //     border-radius: 4px;
-                        //     border: 1px solid #bbbbbb;
-                        //     color: #666;
-                        //     margin-bottom: 8px;
-                        // }
-                        .photo-img {
-                            width: 110px;
-                            height: 110px;
-                            position: relative;
-                            box-sizing: border-box;
-                            border: 2px solid transparent;
-                            border-radius: 8px;
-                            overflow: hidden;
-                            transition: border-color 0.2s ease, opacity 0.2s ease;
-                            &.is-disabled {
-                                opacity: 0.5;
-                                cursor: not-allowed;
-                            }
-                            img {
-                                width: 100%;
-                                height: 100%;
-                                border-radius: 8px;
-                                object-fit: cover;
-                            }
-                            .photo-check {
-                                position: absolute;
-                                top: 5px;
-                                right: 5px;
-                                width: 20px;
-                                height: 20px;
-                                border: 2px solid #fff;
-                                border-radius: 50%;
-                                background: rgba(217, 217, 217, 0.4);
-                                display: flex;
-                                align-items: center;
-                                justify-content: center;
-                                overflow: hidden;
-                                .check-icon {
-                                    width: 100%;
-                                    height: 100%;
-                                    position: relative;
-                                    border-radius: 50%;
-                                    &.checked {
-                                        background: #2199f8;
-                                        border-color: #2199f8;
-                                        &::after {
-                                            content: "";
-                                            position: absolute;
-                                            top: 3px;
-                                            left: 7px;
-                                            width: 4px;
-                                            height: 8px;
-                                            border: 2px solid #fff;
-                                            border-top: 0;
-                                            border-left: 0;
-                                            transform: rotate(45deg);
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-                .photo-item + .photo-item {
-                    margin-top: 20px;
-                }
-            }
-        }
-    }
-}
-</style>

+ 0 - 128
src/views/old_mini/home/subPages/expertDetail.vue

@@ -1,128 +0,0 @@
-<template>
-    <div class="expert-detail">
-        <custom-header name="问答详情"></custom-header>
-        <div class="expert-content">
-            <div class="question-header">
-                <img class="question-icon" src="@/assets/img/home/ask-icon.png" alt="" />
-                <div class="question-title">{{ expertDetail.title }}</div>
-            </div>
-            <div class="expert-info">
-                <el-avatar
-                    class="expert-avatar"
-                    :size="16"
-                    :src="expertDetail.icon"
-                />
-                <div class="expert-details">
-                    <span class="expert-name">{{ expertDetail.name }}</span>
-                    <span class="expert-title">{{ expertDetail.belongEnterprise }}</span>
-                    <span class="qa-date">{{ expertDetail?.createTime && expertDetail?.createTime?.slice(0, 10) }}</span>
-                </div>
-            </div>
-
-            <!-- 专家信息卡片 -->
-            <div class="expert-card">
-                <el-avatar :size="36" :src="expertDetail.icon" />
-                <div class="expert-card-info">
-                    <div class="expert-card-name">{{ expertDetail.name }}</div>
-                    <div class="expert-card-title">{{ expertDetail.belongEnterprise }}</div>
-                </div>
-            </div>
-
-            <div class="answer-content" v-html="expertDetail.content"></div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import customHeader from "@/components/customHeader.vue";
-import { ref,onActivated } from "vue";
-import { useRoute } from "vue-router";
-
-const route = useRoute();
-
-const expertDetail = ref({});
-onActivated(() => {
-    getExpertDetail();
-});
-
-const getExpertDetail = () => {
-    const params = {
-        id: route.query.id,
-    };
-
-    VE_API.home.expertDetail(params).then((res) => {
-        expertDetail.value = res.data[0] || {};
-    });
-}
-</script>
-
-<style scoped lang="scss">
-.expert-detail {
-    position: relative;
-    width: 100%;
-    height: 100vh;
-    .expert-content {
-        padding: 8px 16px;
-        .question-header {
-            display: flex;
-            align-items: center;
-            margin-bottom: 6px;
-            gap: 8px;
-            .question-icon {
-                width: 20px;
-                height: 20px;
-            }
-
-            .question-title {
-                font-size: 16px;
-                font-weight: 600;
-            }
-        }
-
-        .expert-info {
-            display: flex;
-            align-items: center;
-            gap: 6px;
-            padding-bottom: 14px;
-            border-bottom: 1px solid #f5f5f5;
-            .expert-details {
-                display: flex;
-                align-items: center;
-                gap: 6px;
-                font-size: 13px;
-                color: #666666;
-            }
-        }
-
-        // 专家信息卡片样式
-        .expert-card {
-            margin: 13px 0;
-            display: flex;
-            align-items: center;
-            gap: 12px;
-
-            .expert-card-info {
-                .expert-card-name {
-                    font-weight: 600;
-                }
-
-                .expert-card-title {
-                    font-size: 12px;
-                    color: #666666;
-                }
-            }
-        }
-
-        .answer-content {
-            ::v-deep{
-                img {
-                    width: 100%;
-                    height: 175px;
-                    border-radius: 5px;
-                    object-fit: cover;
-                }
-            }
-        }
-    }
-}
-</style>

+ 0 - 483
src/views/old_mini/home/subPages/expertList.vue

@@ -1,483 +0,0 @@
-<template>
-    <div class="prescription-list">
-        <custom-header v-if="!isShowHeader" :name="isToSelect ? '选择专家' : '咨询专家'"></custom-header>
-        <div class="prescription-filter">
-            <div class="filter-search">
-                <el-input v-model="keyword" style="width: 100%" placeholder="搜索位置" :prefix-icon="Search" />
-            </div>
-            <div class="select-box">
-                <div class="select-item width-30">
-                    <el-select v-model="typeVal" placeholder="品种" @change="getList">
-                        <el-option v-for="item in typeOptions" :key="item.id" :label="item.name" :value="item.id" />
-                    </el-select>
-                </div>
-                <div class="select-item width-20">
-                    <el-select v-model="regionVal" placeholder="城市">
-                        <el-option
-                            v-for="item in regionOptions"
-                            :key="item.value"
-                            :label="item.label"
-                            :value="item.value"
-                        />
-                    </el-select>
-                </div>
-                <div class="select-item width-30">
-                    <el-select v-model="levelVal" placeholder="专家擅长">
-                        <el-option
-                            v-for="item in levelOptions"
-                            :key="item.value"
-                            :label="item.label"
-                            :value="item.value"
-                        />
-                    </el-select>
-                </div>
-                <div class="select-item width-20">
-                    <el-select v-model="levelVal" placeholder="筛选">
-                        <el-option
-                            v-for="item in levelOptions"
-                            :key="item.value"
-                            :label="item.label"
-                            :value="item.value"
-                        />
-                    </el-select>
-                </div>
-            </div>
-        </div>
-        <div class="prescription-content">
-            <div class="list">
-                <div class="list-item" v-for="(item, index) in list" :key="index">
-                    <div class="list-top">
-                        <div class="user">
-                            <!-- <img :src="item.pic" alt="" /> -->
-                            <img v-show="index === 0" :src="require(`@/assets/img/home/zj-1.png`)" alt="" />
-                            <img v-show="index === 1" :src="require(`@/assets/img/home/zj-2.png`)" alt="" />
-                            <img v-show="index === 2" :src="require(`@/assets/img/home/zj-3.png`)" alt="" />
-                            <!-- <div class="checkbox" @click.stop="handleCheck(item)">
-                                <el-icon class="icon" v-if="item.isDefault"><Select /></el-icon>
-                                <el-icon class="icon rotate" v-else><CloseBold /></el-icon>
-                            </div> -->
-                        </div>
-                        <div class="info">
-                            <div class="text">
-                                <div class="info-flex">
-                                    <span class="name">{{ item.name }}</span>
-                                    <!-- <span class="expert-tag">
-                                        <img class="expert-img" src="@/assets/img/home/expert-icon.png" alt="">
-                                        专家
-                                    </span> -->
-                                    <div class="fruit-tag" v-for="(ele, eleIndex) in item.tagList" :key="eleIndex">
-                                        {{ ele.name }}
-                                    </div>
-                                </div>
-                                <div class="add-btn">
-                                    <el-icon size="16" color="#fff"><Plus /></el-icon>
-                                </div>
-                            </div>
-                            <div class="van-multi-ellipsis--l2 ellipsis">擅长:{{ item.strongPoint }}</div>
-
-                            <div class="list-btn">
-                                <div class="btn-primary" @click.stop="toPage(item)">
-                                    <span>免费咨询</span>
-                                </div>
-                                <div class="btn-plain" @click.stop="handlePage(item)">查看处方</div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-                <empty
-                    v-show="list.length < 1"
-                    image="https://fastly.jsdelivr.net/npm/@vant/assets/custom-empty-image.png"
-                    image-size="80"
-                    description="暂无数据"
-                />
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import customHeader from "@/components/customHeader.vue";
-import { Empty } from "vant";
-import { onMounted, ref } from "vue";
-import { useRouter, useRoute } from "vue-router";
-import { useStore } from "vuex";
-import { ElMessage } from "element-plus";
-import { Search } from "@element-plus/icons-vue";
-const store = useStore();
-const router = useRouter();
-const route = useRoute();
-
-const props = defineProps({
-    isShowHeader: {
-        type: Boolean,
-        default: false,
-    },
-});
-
-const isToSelect = route.query.isToSelect ? true : false;
-
-const handlePage = ({ isDefault, userId }) => {
-    if (isDefault == null) {
-        console.log("isDefault", isDefault);
-        // router.push(`/expert_prescription?userId=${userId}&disabled=true`)
-    } else {
-        router.push("/expert_prescription");
-    }
-};
-
-const typeOptions = ref([]);
-
-function getSpecieList() {
-    VE_API.farm.fetchSpecieList().then(({ data }) => {
-        typeOptions.value = data;
-
-        // getList(data[0].id);
-    });
-}
-
-const list = ref([
-    {
-        containerId: "9",
-        expertId: "739294587868155904",
-        name: "冼继东",
-        strongPoint: "擅长:长期从事农业昆虫与害虫防治教学与研究工作。取得成果和奖励10项,发表学术论文50余篇。多年来一直致力于果树、蔬菜以及水稻主要病虫害非化学防控技术的推广工作,为有机荔枝龙眼、稻米、蔬菜以及多种水果的高效、安全生产提供技术指导。",
-        tagList: [
-            {
-                id: 825,
-                name: "荔枝",
-                remark: "花穗生长速度过慢",
-            },
-            {
-                id: 829,
-                name: "病虫害",
-                remark: "防止落果",
-            },
-        ],
-        userId: 81881,
-    },
-    {
-        containerId: "9",
-        expertId: "739294587868155904",
-        name: "韦帮稳",
-        pic: "https://birdseye-img-ali-cdn.sysuimars.com//expert/1757473957076.png",
-        strongPoint: "擅长:深耕果树栽培领域达30年,在荔枝、龙眼、柑橘、番茄、木瓜等多个品类果树具有非常丰富的种植栽培经验;自管荔枝果园超2000亩,每年指导海南、湛江、茂名、广州、汕尾、惠州、广西等多地的种植户超百户,面积超1万亩!",
-        tagList: [
-            {
-                id: 825,
-                name: "荔枝",
-                remark: "花穗生长速度过慢",
-            },
-            {
-                id: 829,
-                name: "龙眼",
-                remark: "防止落果",
-            },
-        ],
-        userId: 81881,
-    },
-    {
-        containerId: "9",
-        expertId: "739294587868155904",
-        name: "黄旭明",
-        pic: "https://birdseye-img-ali-cdn.sysuimars.com//expert/1757473957076.png",
-        strongPoint: "擅长:长期从事南方果树生理学研究,研究领域包括常绿果树枝梢生长节奏及调控、具假种皮果实果皮发育、细胞壁代谢和钙营养与生理病害发生关系、果实膨大生长与水分关系等。研究方向为果树生态生理学。1998年获华南农业大学植物生理学博士学位,现任南方果树研究室主任。",
-        tagList: [
-            {
-                id: 825,
-                name: "荔枝",
-                remark: "花穗生长速度过慢",
-            },
-            {
-                id: 829,
-                name: "龙眼",
-                remark: "防止落果",
-            },
-        ],
-        userId: 81881,
-    },
-]);
-
-const getList = (speciesId) => {
-    VE_API.home.fetchExpertList({ speciesId }).then(({ data }) => {
-        list.value = data || [];
-    });
-};
-
-onMounted(() => {
-    getSpecieList();
-});
-
-function toPage({ containerId, userId, name }) {
-    if (isToSelect) {
-        router.push(`/expert_homepage?containerId=${containerId}`);
-        // router.replace(`/expert_homepage?containerId=${containerId}`)
-    } else {
-        router.push(`/chat_frame?userId=${userId}`);
-    }
-}
-
-// 搜索
-const keyword = ref(null);
-const typeVal = ref(null);
-const regionVal = ref(null);
-const levelVal = ref(null);
-
-const regionOptions = ref([
-    {
-        label: "全部",
-        value: "all",
-    },
-    {
-        label: "区域1",
-        value: "1",
-    },
-    {
-        label: "区域2",
-        value: "2",
-    },
-    {
-        label: "区域3",
-        value: "3",
-    },
-]);
-
-const levelOptions = ref([
-    { label: "全部", value: "all" },
-    { label: "荔枝", value: "1" },
-    { label: "龙眼", value: "2" },
-    { label: "枇杷", value: "3" },
-]);
-</script>
-
-<style lang="scss" scoped>
-.prescription-list {
-    position: relative;
-    width: 100%;
-    height: 100vh;
-    background-color: #f5f7fb;
-    .prescription-filter {
-        padding: 12px 12px 0 12px;
-        .filter-search {
-            padding-bottom: 6px;
-            ::v-deep {
-                .el-input__wrapper {
-                    box-shadow: 0 0 0 1px #fff inset;
-                    border-radius: 20px;
-                }
-            }
-        }
-        .select-box {
-            width: 100%;
-            display: flex;
-            justify-content: space-around;
-            .select-item {
-                width: fit-content;
-                ::v-deep {
-                    .el-input__wrapper {
-                        background: none;
-                        box-shadow: none;
-                    }
-                    .el-input__inner {
-                        font-size: 14px;
-                        color: rgba(0, 0, 0, 0.5);
-                    }
-                    .el-select__wrapper {
-                        background: none;
-                        box-shadow: none;
-                        gap: 2px;
-                        padding: 4px 2px;
-                        justify-content: center;
-                    }
-                    .el-select__selection {
-                        flex: none;
-                        width: fit-content;
-                    }
-                    .el-select__placeholder {
-                        color: rgba(0, 0, 0, 0.5);
-                        position: static;
-                        transform: none;
-                        width: fit-content;
-                    }
-                }
-            }
-            .width-30 {
-                width: 30%;
-            }
-            .width-20 {
-                width: 20%;
-            }
-        }
-    }
-    .prescription-content {
-        overflow-y: auto;
-        height: calc(100% - 40px);
-        padding: 6px 12px 12px;
-        box-sizing: border-box;
-        width: 100%;
-        .list {
-            position: relative;
-            .list-item {
-                background: #fff;
-                padding: 16px 12px 12px;
-                border-radius: 8px;
-                .user {
-                    width: 68px;
-                    height: 68px;
-                    margin-right: 12px;
-                    position: relative;
-                    img {
-                        width: 100%;
-                        height: 100%;
-                        border-radius: 8px;
-                        object-fit: scale-down;
-                    }
-                    .checkbox {
-                        position: absolute;
-                        bottom: -2px;
-                        right: -1px;
-                        width: 25px;
-                        height: 25px;
-                        background: #2199f8;
-                        border-radius: 50%;
-                        display: flex;
-                        align-items: center;
-                        justify-content: center;
-                        .icon {
-                            color: #fff;
-                            font-size: 16px;
-                        }
-                        .rotate {
-                            transform: rotate(45deg);
-                        }
-                    }
-                }
-                .list-top {
-                    display: flex;
-                    img{
-                        border-radius: 50%;
-                        object-fit: cover;
-                    }
-                }
-                .list-btn {
-                    display: flex;
-                    // justify-content: center;
-                    font-size: 12px;
-                    margin-top: 8px;
-                    .btn-primary {
-                        background: rgba(33, 153, 248, 0.12);
-                        padding: 0 12px;
-                        color: #2199f8;
-                        border-radius: 20px;
-                        height: 32px;
-                        line-height: 32px;
-                        display: flex;
-                        span {
-                            margin-left: 3px;
-                        }
-                    }
-                    .btn-plain {
-                        background: rgba(162, 162, 162, 0.12);
-                        color: rgba(0, 0, 0, 0.5);
-                        padding: 0px 12px;
-                        border-radius: 20px;
-                        height: 32px;
-                        line-height: 32px;
-                        margin-left: 8px;
-                    }
-                }
-                .info {
-                    width: calc(100% - 78px);
-                    line-height: 1.6;
-                    .ellipsis {
-                        max-width: 255px;
-                        color: #666666;
-                    }
-                    .text {
-                        display: flex;
-                        color: #666666;
-                        align-items: center;
-                        justify-content: space-between;
-                        .info-flex {
-                            display: flex;
-                            align-items: center;
-                        }
-                        .add-btn {
-                            width: 26px;
-                            height: 26px;
-                            border-radius: 50%;
-                            background: #2199f8;
-                            text-align: center;
-                            display: flex;
-                            align-items: center;
-                            justify-content: center;
-                        }
-                        .name {
-                            color: #000;
-                            font-size: 16px;
-                            font-weight: bold;
-                        }
-                        .expert-tag {
-                            height: 20px;
-                            width: 48px;
-                            display: flex;
-                            align-items: center;
-                            justify-content: center;
-                            color: #c77d05;
-                            background: #ffecad;
-                            border-radius: 4px;
-                            font-size: 12px;
-                            margin-left: 8px;
-                            line-height: 20px;
-                            .expert-img {
-                                width: 12px;
-                                padding-right: 2px;
-                            }
-                        }
-                        .btn-text {
-                            font-size: 12px;
-                            color: #a8a8a8;
-                            padding: 2px 12px;
-                            border-radius: 20px;
-                            border: 1px solid #a8a8a8;
-                            background: rgba(220, 220, 220, 0.1);
-                            &.actice {
-                                color: #f3c11d;
-                                border-color: #f3c11d;
-                                background: rgba(243, 193, 29, 0.1);
-                            }
-                        }
-                    }
-                    .fruit-tag {
-                        margin-left: 5px;
-                        padding: 0 8px;
-                        height: 20px;
-                        line-height: 20px;
-                        background: #cae7ff;
-                        border-radius: 2px;
-                        font-size: 12px;
-                        color: #2199f8;
-                        // &.pest {
-                        //     background: #eedaff;
-                        //     color: #ac4dff;
-                        // }
-                        &:nth-child(3) {
-                            background: #eedaff;
-                            color: #ac4dff;
-                        }
-                    }
-                    .ellipsis {
-                        font-size: 12px;
-                        color: #999;
-                        margin-top: 4px;
-                    }
-                }
-            }
-            .list-item + .list-item {
-                margin-top: 16px;
-                padding-top: 16px;
-                border-top: 1px solid #f5f5f5;
-            }
-        }
-    }
-}
-</style>

+ 0 - 205
src/views/old_mini/home/subPages/knowledgeList.vue

@@ -1,205 +0,0 @@
-<template>
-    <div class="service-records-page">
-        <custom-header name="知识库"></custom-header>
-        <div class="record-list">
-            <list v-model:loading="listLoading" :finished="listFinished" finished-text="" @load="getKnowledgeList">
-                <div v-for="(item, index) in knowledgeList" :key="index" class="record-card">
-                    <img class="thumb" :src="item.media && item.media[0]" alt="暂无图片" />
-                    <div class="card-body" @click="handleItemClick(item)">
-                        <div class="card-body-left">
-                            <div class="title van-multi-ellipsis--l2">{{ item.title }}</div>
-                            <div class="date">{{ formatDate(item.createTime) }}</div>
-                        </div>
-                    </div>
-                </div>
-
-                <!-- 加载完成且无数据时的空状态 -->
-                <div v-if="!knowledgeList.length && listFinished" class="empty-wrap">
-                    <div class="empty-text">暂无数据</div>
-                </div>
-            </list>
-        </div>
-    </div>
-</template>
-<script setup>
-import { ref, onMounted, watch, onActivated } from "vue";
-import customHeader from "@/components/customHeader.vue";
-import { List } from "vant";
-import { useRouter, useRoute } from "vue-router";
-import { useStore } from "vuex";
-
-const router = useRouter();
-const route = useRoute();
-const store = useStore();
-
-// 服务记录列表数据
-const knowledgeList = ref([]);
-const topicId = ref(6);
-
-// 分页与滚动加载状态
-const page = ref(1);
-const pageSize = ref(10);
-const listLoading = ref(false);
-const listFinished = ref(false);
-// 存储全部数据(用于 topicId === 6 时的前端分页)
-const allDataCache = ref([]);
-
-// 重置列表状态
-const resetListState = () => {
-    knowledgeList.value = [];
-    page.value = 1;
-    listFinished.value = false;
-    allDataCache.value = [];
-};
-
-// 初始化或重置时加载数据
-const initList = () => {
-    resetListState();
-    // 重置后触发首次加载
-    getKnowledgeList();
-};
-
-onMounted(() => {
-    // 从路由获取当前知识库类型
-    topicId.value = Number(route.query.topicId) || 6;
-    // 不主动请求,交给 vant List 的 @load 触发首次加载
-});
-
-// 监听路由参数变化
-watch(
-    () => route.query.topicId,
-    (newTopicId) => {
-        const newId = Number(newTopicId) || 6;
-        if (newId !== topicId.value) {
-            topicId.value = newId;
-            initList();
-        }
-    }
-);
-
-// 页面激活时也检查参数变化
-onActivated(() => {
-    const newId = Number(route.query.topicId) || 6;
-    if (newId !== topicId.value) {
-        topicId.value = newId;
-        initList();
-    }
-});
-
-const getKnowledgeList = async () => {
-    if (listFinished.value) return;
-
-    listLoading.value = true;
-
-    try {
-        let list = [];
-        // 实战知识库:使用原接口(支持分页)
-        const params = {
-            page: page.value,
-            limit: pageSize.value,
-            topicId: topicId.value,
-        };
-        const { data } = await VE_API.home.warningPageList(params);
-        list = data || [];
-
-        if (page.value === 1) {
-            knowledgeList.value = list;
-        } else {
-            knowledgeList.value = [...knowledgeList.value, ...list];
-        }
-
-        // 如果返回数量小于页大小,认为没有更多数据了
-        if (list.length < pageSize.value) {
-            listFinished.value = true;
-        } else {
-            page.value += 1;
-        }
-    } catch (error) {
-        console.error("获取知识列表失败:", error);
-        listFinished.value = true;
-    } finally {
-        listLoading.value = false;
-    }
-};
-
-const formatDate = (dateStr) => {
-    if (!dateStr) return "";
-    // 将 2026-01-06T00:00:00 格式转换为 2026-01-06
-    return dateStr.split("T")[0];
-};
-
-const handleItemClick = (item) => {
-    router.push(`/warning_detail?id=${item.id}&showImage=true`);
-};
-</script>
-<style lang="scss" scoped>
-.service-records-page {
-    width: 100%;
-    background: #f5f5f5;
-    height: 100vh;
-
-    .record-list {
-        padding: 10px 12px;
-        display: flex;
-        flex-direction: column;
-        gap: 10px;
-        height: calc(100% - 60px);
-        overflow-y: auto;
-    }
-
-    .record-card {
-        display: flex;
-        gap: 12px;
-        padding: 12px 10px;
-        background: #ffffff;
-        border-radius: 12px;
-        align-items: center;
-        height: 98px;
-        box-sizing: border-box;
-
-        .thumb {
-            width: 112px;
-            height: 74px;
-            border-radius: 8px;
-            object-fit: cover;
-            flex: none;
-        }
-
-        .card-body {
-            flex: 1;
-            height: 100%;
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-
-            .card-body-left {
-                width: 100%;
-                height: 95%;
-                display: flex;
-                flex-direction: column;
-                justify-content: space-between;
-
-                .date {
-                    font-size: 13px;
-                    color: #86909c;
-                    margin-top: 4px;
-                }
-            }
-        }
-    }
-
-    .record-card+.record-card {
-        margin-top: 10px;
-    }
-
-    .empty-wrap {
-        padding-top: 40px;
-        text-align: center;
-
-        .empty-text {
-            font-size: 14px;
-            color: #86909c;
-        }
-    }
-}
-</style>

+ 0 - 1411
src/views/old_mini/home/subPages/prescriptionPage copy.vue

@@ -1,1411 +0,0 @@
-<template>
-    <div class="prescription-page">
-        <custom-header name="基本信息" isGoBack @goback="goBack"></custom-header>
-        <div class="page-content">
-            <div class="prescription-title">
-                <!-- <img @click="goBack" src="@/assets/img/home/back.png" alt="" /> -->
-                <div class="title-name">农场基本信息</div>
-                <div class="title-desc">请认真核对一下内容</div>
-            </div>
-            <div class="prescription-box" v-loading="loadingPage">
-                <!-- <div class="box-title">
-                <img src="@/assets/img/home/label-icon.png" />
-                农场情况
-            </div> -->
-                <div class="box-content">
-                    <div class="box-item">
-                        <div class="item-name">
-                            <span>请选择您的果园土壤类型</span>
-                        </div>
-                        <div class="tips">土壤类型确认最佳施肥策略</div>
-                        <div class="item-checkbox">
-                            <el-radio-group v-model="basicForm.soilTypes">
-                                <el-radio-button v-for="(item, index) in basicFarmFormData.soilTypes" :key="index"
-                                    :label="item.name" :value="item.code" />
-                            </el-radio-group>
-                        </div>
-                    </div>
-                    <div class="box-item">
-                        <div class="item-name">
-                            <span>请选择您的灌溉方式</span>
-                            <span class="sub-name"> (可多选)</span>
-                        </div>
-                        <div class="tips">灌溉方式确认药肥最佳配比</div>
-                        <div class="item-checkbox">
-                            <div class="tag-group add-tag-group">
-                                <div class="tag-item" :class="{ self: item.custom === true, selected: item.selected }"
-                                    @click="handleSelect('irrigationMethods', idx, item.custom)"
-                                    v-for="(item, idx) in basicFarmFormData.irrigationMethods" :key="'ce-' + idx">
-                                    <span class="text">{{ item.name }}</span>
-                                </div>
-                                <div class="tag-item last-add" @click="handleAdd('irrigationMethods')"><el-icon
-                                        class="add-icon">
-                                        <Plus />
-                                    </el-icon>其它方式</div>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="box-item">
-                        <div class="item-name">
-                            <span>请选择您的农机设备</span>
-                            <span class="sub-name"> (可多选)</span>
-                        </div>
-                        <div class="tips">农闲时可将闲置农机加入农事服务联盟,获取额外服务收益</div>
-                        <div class="item-checkbox">
-                            <div class="tag-group add-tag-group">
-                                <div class="tag-item" :class="{ self: item.custom === true, selected: item.selected }"
-                                    @click="handleMachinerySelect('machinery', idx, item)"
-                                    v-for="(item, idx) in basicFarmFormData.machinery" :key="'nj-' + idx">
-                                    <span class="text">{{ item.name }}</span>
-                                    <span class="quantity-text" v-show="item.quantity">{{ item.quantity }}</span>
-                                </div>
-                                <div class="tag-item last-add" @click="handleMachineryAdd('machinery', item)"><el-icon
-                                        class="add-icon">
-                                        <Plus />
-                                    </el-icon>其它设备</div>
-                            </div>
-                        </div>
-                    </div>
-                    <!-- 农场规模 -->
-                    <!-- <div class="farm-scale-header">
-                    <div class="farm-scale-title">请填写您的农场规模</div>
-                    <div class="farm-scale-desc">农闲时可以提供农事服务,获取额外收益</div>
-                </div>
-                <div class="farm-scale-form">
-                    <div class="farm-scale-item">
-                        <div class="farm-scale-label">
-                            农场固定长工
-                            <div class="sub-label">(会操作各种小型农机)</div>
-                        </div>
-                        <el-input v-model="farmScale.regularWorkerCount" placeholder="请输入人数" class="farm-scale-input">
-                            <template #append>人</template>
-</el-input>
-</div>
-<div class="farm-scale-item">
-    <label class="farm-scale-label">无人机植保人员</label>
-    <el-input v-model="farmScale.plantProtectionWorkerCount" placeholder="请输入人数" class="farm-scale-input">
-        <template #append>人</template>
-    </el-input>
-</div>
-<div class="farm-scale-item">
-    <label class="farm-scale-label">专业树形修剪人员</label>
-    <el-input v-model="farmScale.pruningWorkerCount" placeholder="请输入人数" class="farm-scale-input">
-        <template #append>人</template>
-    </el-input>
-</div>
-<div class="farm-scale-item">
-    <label class="farm-scale-label">专业嫁接换种人员</label>
-    <el-input v-model="farmScale.graftingWorkerCount" placeholder="请输入人数" class="farm-scale-input">
-        <template #append>人</template>
-    </el-input>
-</div>
-<div class="farm-scale-item">
-    <label class="farm-scale-label">农忙可调度人员</label>
-    <el-input v-model="farmScale.tempDispatchWorkerCount" placeholder="请输入人数" class="farm-scale-input">
-        <template #append>人</template>
-    </el-input>
-</div>
-</div> -->
-                    <div class="box-item">
-                        <div class="item-name">
-                            <span>希望专家帮助解决的种植难题</span>
-                            <span class="sub-name"> (可多选)</span>
-                        </div>
-                        <div class="item-checkbox">
-
-                            <div class="tag-group add-tag-group">
-                                <div class="tag-item" :class="{ self: item.custom === true, selected: item.selected }"
-                                    @click="handleSelect('improvementAreas', idx, item.custom)"
-                                    v-for="(item, idx) in basicFarmFormData.improvementAreas" :key="'wt-' + idx">
-                                    <span class="text">{{ item.name }}</span>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="box-item">
-                        <div class="item-name">
-                            <span>您最希望得到哪位荔枝专家的农事处方</span>
-                        </div>
-                        <div class="item-checkbox">
-                            <el-radio-group v-model="basicForm.expertCode">
-                                <el-radio-button v-for="(item, index) in basicFarmFormData.expertOptions" :key="index"
-                                    :label="item.name" :value="item.code" />
-                            </el-radio-group>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-
-        <!-- 按钮 -->
-        <div class="custom-bottom-fixed-btns">
-            <!-- <div class="bottom-btn secondary-btn" @click="handlePage">跳过</div> -->
-            <el-button class="bottom-btn primary-btn" :loading="loading" @click.stop="submit" @touchstart.stop @touchend.stop>确认信息</el-button>
-        </div>
-    </div>
-
-    <popup class="add-tag-popup" round v-model:show="showAddPopup">
-        <div class="tag-item" v-if="addTypeKey !== 'machinery' || (addTypeKey === 'machinery' && isMachineSelf)">
-            <div class="popup-title">编辑<span class="name-text">{{ formNameObj[addTypeKey] }}</span><span
-                    class="ml-2">名称</span></div>
-            <el-input class="popup-input" v-model="popupInputVal" :placeholder="'请输入' + formNameObj[addTypeKey]"
-                size="large" />
-        </div>
-        <div class="device-item" v-if="addTypeKey === 'machinery'">
-            <div class="popup-title">编辑
-                <span class="name-text" v-show="isMachineSelf">{{ formNameObj[addTypeKey] }}</span>
-                <span class="name-text" v-show="!isMachineSelf">{{ popupInputVal }}</span>
-                <span class="ml-2">数量</span>
-            </div>
-            <el-input type="number" class="popup-input" v-model="popupInputNum"
-                :placeholder="'请输入' + formNameObj[addTypeKey] + '数量'" size="large">
-                <template #append>{{ machineryUnit || '辆' }}</template>
-            </el-input>
-        </div>
-        <div class="popup-button">
-            <div class="delete" v-if="isEditPopup && isMachineSelf" @click="handleDelete">删除</div>
-            <div class="delete" v-else-if="isEditPopup && !isMachineSelf" @click="handleCancelSelect">取消选中</div>
-            <div class="cancel" v-else @click="showAddPopup = false">取消</div>
-            <div :class="{ disabled: isPopupConfirmDisabled() }" @click="handleConfirm">确认</div>
-        </div>
-    </popup>
-
-    <!-- 物候期信息 -->
-    <popup class="period-popup" round v-model:show="showPeriodPopup">
-        <div class="period-header">为了{{ basicForm?.expertInfo?.name }}专家的处方体系适用于您的果园管理,请完善基本物候信息</div>
-        <div class="period-content">
-            <div class="period-item" v-for="(item, i) in phenologyList" :key="i">
-                <div class="period-item-name">{{ item.typeName }}</div>
-                <div class="period-item-label">
-                    <div class="label-item-group">
-                        <div class="label-item">当下物候期</div>
-                        <div class="label-item-value period-display">{{ item.phenologyName }}</div>
-                    </div>
-                    <div class="label-item-group">
-                        <div class="label-item">{{ item.startDateLabel || '起始时间' }}</div>
-                        <div class="label-item-value">
-                            <el-date-picker v-model="item.phenologyStartDate" type="date"
-                                :default-value="new Date(2026, 1, 1)" placeholder="选择时间" :disabled-date="disabledDate"
-                                :clearable="false" :editable="false" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
-                                style="width: 100%" />
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-        <div class="period-footer">
-            <div class="period-footer-btn" @click="handlePage">确认信息</div>
-        </div>
-    </popup>
-
-    <tip-popup v-model:show="showSuccessPopup" type="success" text="专属处方已经生成" buttonText="点击查看"
-        @closedPopup="handleSuccessConfirm" @confirm="handleSuccessConfirm">
-        <template #default>
-            <div class="expert-info">
-                <!-- <img class="expert-img" src="@/assets/img/home/zj-1.png" alt=""> -->
-                <el-avatar class="expert-img" :size="26" :src="basicForm?.expertInfo?.avatar" />
-                {{ basicForm?.expertInfo?.name }} 专家的
-            </div>
-        </template>
-    </tip-popup>
-</template>
-
-<script setup>
-import { ref, onActivated, onBeforeUnmount, onDeactivated, onMounted } from "vue";
-import { ElMessage } from "element-plus";
-import { useRouter, useRoute } from "vue-router";
-import tipPopup from "@/components/popup/tipPopup.vue";
-import customHeader from "@/components/customHeader.vue";
-import { Popup } from "vant";
-import { useStore } from "vuex";
-const router = useRouter();
-const route = useRoute();
-const store = useStore();
-
-// 农场规模
-const farmScale = ref({
-    regularWorkerCount: "",
-    plantProtectionWorkerCount: "",
-    pruningWorkerCount: "",
-    graftingWorkerCount: "",
-    tempDispatchWorkerCount: "",
-});
-// 初始化默认选中第一项
-onActivated(() => {
-    getBasicFarmFormData();
-    // 为 productList 的每个 group 设置默认选中第一项
-});
-
-// onMounted(() => {
-//     getCurrentAndNextPhenology();
-// });
-
-const loadingPage = ref(false);
-const basicForm = ref({
-    soilTypes: "",
-    irrigationMethods: [],
-    machineryWithQuantity: [],
-    improvementAreas: [],
-    expertCode: "",
-    expertInfo: {},
-});
-
-const basicFarmFormData = ref({});
-/** @param {{ machineryMerge?: { name: string, quantity?: string, unit?: string } }} [options] */
-const getBasicFarmFormData = (options = {}) => {
-    const machineryMerge = options.machineryMerge;
-    loadingPage.value = true;
-    VE_API.basic_farm.fetchBasicFarmFormData({ subjectId: route.query?.subjectId }).then(({ data }) => {
-        basicFarmFormData.value = data;
-
-        // 根据返回的数据进行默认赋值
-        // 1. 土壤类型 - 找到 selected: true 的项
-        if (data.soilTypes && Array.isArray(data.soilTypes)) {
-            const selectedSoilType = data.soilTypes.find(item => item.selected);
-            if (selectedSoilType) {
-                basicForm.value.soilTypes = selectedSoilType.code;
-            }
-        }
-
-        // 2. 专家选项 - 找到 selected: true 的项
-        if (data.expertOptions && Array.isArray(data.expertOptions)) {
-            const selectedExpert = data.expertOptions.find(item => item.selected);
-            if (selectedExpert) {
-                basicForm.value.expertCode = selectedExpert.code;
-                basicForm.value.expertInfo = selectedExpert;
-            }
-        }
-
-        // 3. 农场规模数据
-        if (data.farmScale) {
-            farmScale.value = {
-                regularWorkerCount: data.farmScale.regularWorkerCount || "",
-                plantProtectionWorkerCount: data.farmScale.plantProtectionWorkerCount || "",
-                pruningWorkerCount: data.farmScale.pruningWorkerCount || "",
-                tempDispatchWorkerCount: data.farmScale.tempDispatchWorkerCount || "",
-                graftingWorkerCount: data.farmScale.graftingWorkerCount || "",
-            };
-        }
-
-        // 4. irrigationMethods, improvementAreas, machinery 的 selected 状态已经在 data 中设置好了
-        // 这些数据会直接显示在页面上,因为页面是通过 basicFarmFormData 来渲染的
-
-        // 新增「其它设备」时接口只存名称,刷新后把弹窗里填写的数量写回对应自定义项
-        if (machineryMerge && Array.isArray(basicFarmFormData.value.machinery)) {
-            const nameKey = (machineryMerge.name || "").trim();
-            const row = basicFarmFormData.value.machinery.find(
-                (m) => m.custom && String(m.name || "").trim() === nameKey
-            );
-            if (row) {
-                row.selected = true;
-                const q = (machineryMerge.quantity || "").trim();
-                row.quantity = q || null;
-                if (machineryMerge.unit) {
-                    row.unit = machineryMerge.unit;
-                }
-            }
-        }
-    }).finally(() => {
-        loadingPage.value = false;
-    });
-}
-
-// 收集表单数据并保存草稿
-const saveDraft = async () => {
-    try {
-        const draftData = handleSubmit();
-
-        // 调用保存草稿接口
-        await VE_API.basic_farm.saveDraft(draftData);
-    } catch (error) {
-        console.error("保存草稿失败:", error);
-        // 静默失败,不显示错误提示
-    }
-};
-
-// 离开页面时保存草稿
-onBeforeUnmount(() => {
-    // saveDraft();
-});
-
-onDeactivated(() => {
-    saveDraft();
-    loading.value = false;
-});
-
-const formNameObj = ref({
-    irrigationMethods: '灌溉方式',
-    crops: '作物',
-    machinery: '农机设备',
-    improvementAreas: '希望专家帮助解决的种植难题',
-    soilTypes: '土壤类型',
-});
-const showAddPopup = ref(false);
-const addTypeKey = ref("");
-const popupInputVal = ref("");
-// 农机设备数量
-const popupInputNum = ref("");
-const machineryUnit = ref("");
-const isEditPopup = ref(false);
-const currentEditIndex = ref(-1);
-function handleAdd(type) {
-    isEditPopup.value = false;
-    showAddPopup.value = true;
-    addTypeKey.value = type;
-    popupInputVal.value = "";
-    popupInputNum.value = "";
-}
-
-function handleMachineryAdd(type) {
-    handleAdd(type);
-    isMachineSelf.value = true;
-}
-
-function handleSelect(type, index, custom) {
-    isMachineSelf.value = custom;
-    if (custom === true) {
-        showAddPopup.value = true;
-        isEditPopup.value = true;
-        addTypeKey.value = type;
-        popupInputVal.value = basicFarmFormData.value[type][index].name;
-        currentEditIndex.value = index;
-    }
-    basicFarmFormData.value[type][index].selected = !basicFarmFormData.value[type][index].selected;
-}
-
-// 农机设备
-const isMachineSelf = ref(false);
-function handleMachinerySelect(type, index, item) {
-    showAddPopup.value = true;
-    isMachineSelf.value = item.custom;
-    isEditPopup.value = item.selected || item.custom;
-    addTypeKey.value = type;
-    popupInputVal.value = item.name;
-    popupInputNum.value = item.quantity;
-    machineryUnit.value = item.unit;
-    currentEditIndex.value = index;
-}
-
-function isPopupConfirmDisabled() {
-    const nameFilled = String(popupInputVal.value ?? "").trim().length > 0;
-    const quantityFilled = String(popupInputNum.value ?? "").trim().length > 0;
-
-    // 仅需名称:非农机场景
-    if (addTypeKey.value !== "machinery") {
-        return !nameFilled;
-    }
-    // 仅需数量:选择已有农机(非自定义)
-    if (!isMachineSelf.value) {
-        return !quantityFilled;
-    }
-    // 名称 + 数量都必填:自定义农机
-    return !(nameFilled && quantityFilled);
-}
-
-function handleConfirm() {
-    if (isPopupConfirmDisabled()) {
-        return;
-    }
-    if (addTypeKey.value === 'machinery') {
-        if (isMachineSelf.value && !isEditPopup.value) {
-            if (!popupInputVal.value.trim()) {
-                return;
-            }
-            const nameTrim = popupInputVal.value.trim();
-            saveCustomOption(nameTrim, {
-                quantity: popupInputNum.value.trim(),
-                unit: machineryUnit.value || undefined,
-            });
-        } else {
-            const option = basicFarmFormData.value[addTypeKey.value][currentEditIndex.value]
-            option.name = popupInputVal.value;
-            const qtyTrim = (popupInputNum.value || "").trim();
-            option.quantity = qtyTrim || null;
-            option.selected = true;
-            // 更新名称
-            if (option.custom) {
-                // updateCustomOption(popupInputVal.value, option.id || option.code);
-                updateCustomOption(popupInputVal.value, basicFarmFormData.value[addTypeKey.value][currentEditIndex.value].id);
-            }
-        }
-        currentEditIndex.value = -1;
-        isEditPopup.value = false;
-        showAddPopup.value = false;
-        return;
-    }
-    if (!popupInputVal.value.trim()) {
-        return;
-    }
-    if (isEditPopup.value) {
-        const option = basicFarmFormData.value[addTypeKey.value][currentEditIndex.value]
-        option.name = popupInputVal.value;
-        currentEditIndex.value = -1;
-        isEditPopup.value = false;
-        showAddPopup.value = false;
-        updateCustomOption(popupInputVal.value, option.id || option.code);
-        return;
-    }
-    // basicFarmFormData.value[addTypeKey.value].push({ name: popupInputVal.value, code: popupInputVal.value, selected: true, custom: true });
-    saveCustomOption(popupInputVal.value);
-
-    showAddPopup.value = false;
-}
-
-const configTypeObj = {
-    irrigationMethods: 'IRRIGATION',
-    machinery: 'MACHINERY',
-}
-/** @param {{ quantity?: string, unit?: string }} [machineryMeta] 仅新增自定义农机时传入,用于刷新表单后合并数量 */
-function saveCustomOption(name, machineryMeta) {
-    const cfgKey = addTypeKey.value;
-    VE_API.basic_farm.addCustomOption({ configType: configTypeObj[cfgKey], name: name }).then(({ data }) => {
-        ElMessage.success('保存成功');
-        if (cfgKey === "machinery" && machineryMeta) {
-            getBasicFarmFormData({
-                machineryMerge: {
-                    name,
-                    quantity: machineryMeta.quantity,
-                    unit: machineryMeta.unit,
-                },
-            });
-        } else {
-            getBasicFarmFormData();
-        }
-    });
-}
-
-function updateCustomOption(name, id) {
-    VE_API.basic_farm.updateCustomOption({ id, configType: configTypeObj[addTypeKey.value], name: name }).then(({ data }) => {
-        ElMessage.success('保存成功');
-    });
-}
-
-function handleDelete() {
-    const option = basicFarmFormData.value[addTypeKey.value][currentEditIndex.value]
-    VE_API.basic_farm.deleteCustomOption({ optionId: option.id || option.code }).then(({ data }) => {
-        ElMessage.success('删除成功');
-        basicFarmFormData.value[addTypeKey.value].splice(currentEditIndex.value, 1);
-        currentEditIndex.value = -1;
-        showAddPopup.value = false;
-    });
-}
-
-function handleCancelSelect() {
-    const option = basicFarmFormData.value[addTypeKey.value][currentEditIndex.value]
-    option.selected = false;
-    option.quantity = null;
-    currentEditIndex.value = -1;
-    showAddPopup.value = false;
-}
-
-const goBack = () => {
-    // saveDraft();
-    // router.go(-1);
-    if (route.query.subjectId) {
-        router.go(-1);
-    } else {
-        // router.replace(`/create_farm?from=${route.query.from}&type=edit`);
-        router.replace(`/create_farm?from=${route.query.from}&type=${route.query.type}`);
-    }
-};
-
-function handleSubmit() {
-    // 收集土壤类型(转换为数组)
-    const soilTypes = basicForm.value.soilTypes
-        ? (Array.isArray(basicForm.value.soilTypes) ? basicForm.value.soilTypes : [basicForm.value.soilTypes])
-        : [];
-
-    // 收集灌溉方式(获取选中的 code)
-    const irrigationMethods = (basicFarmFormData.value.irrigationMethods || [])
-        .filter(item => item.selected || item.custom)
-        .map(item => item.code || item.id);
-    // 收集农机设备(包含 code 和 quantity)
-    const machineryWithQuantity = (basicFarmFormData.value.machinery || [])
-        .filter(item => item.selected)
-        .map(item => ({
-            code: item.code || item.id,
-            quantity: Number(item.quantity) || 0
-        }));
-
-    // 收集希望专家帮助解决的种植难题(获取选中的 code)
-    const improvementAreas = (basicFarmFormData.value.improvementAreas || [])
-        .filter(item => item.selected)
-        .map(item => item.code || item.id);
-
-    // 收集农场规模数据
-    const draftData = {
-        soilTypes: soilTypes.map(code => Number(code)),
-        irrigationMethods: irrigationMethods.map(code => Number(code)),
-        machineryWithQuantity: machineryWithQuantity.map(item => ({
-            code: Number(item.code),
-            quantity: item.quantity
-        })),
-        regularWorkerCount: Number(farmScale.value.regularWorkerCount) || 0,
-        plantProtectionWorkerCount: Number(farmScale.value.plantProtectionWorkerCount) || 0,
-        pruningWorkerCount: Number(farmScale.value.pruningWorkerCount) || 0,
-        graftingWorkerCount: Number(farmScale.value.graftingWorkerCount) || 0,
-        tempDispatchWorkerCount: Number(farmScale.value.tempDispatchWorkerCount) || 0,
-        improvementAreas: improvementAreas.map(code => Number(code)),
-    };
-
-    // 如果有选择的专家,添加 preferredExpertCode
-    if (basicForm.value.expertCode) {
-        draftData.preferredExpertCode = Number(basicForm.value.expertCode);
-    }
-
-    return draftData;
-}
-
-// 校验必填项
-function validateForm() {
-    // 校验土壤类型
-    if (!basicForm.value.soilTypes) {
-        ElMessage.warning('请选择您的果园土壤类型');
-        return false;
-    }
-
-    // 校验灌溉方式
-    const irrigationMethods = (basicFarmFormData.value.irrigationMethods || [])
-        .filter(item => item.selected);
-    if (irrigationMethods.length === 0) {
-        ElMessage.warning('请选择您的灌溉方式');
-        return false;
-    }
-
-    // 校验农机设备(仅要求有选中项,数量选填)
-    const machinerySelected = (basicFarmFormData.value.machinery || [])
-        .filter(item => item.selected);
-    if (machinerySelected.length === 0) {
-        ElMessage.warning('请选择您的农机设备');
-        return false;
-    }
-
-    // 校验希望专家帮助解决的种植难题
-    const improvementAreas = (basicFarmFormData.value.improvementAreas || [])
-        .filter(item => item.selected);
-    if (improvementAreas.length === 0) {
-        ElMessage.warning('请选择希望专家帮助解决的种植难题');
-        return false;
-    }
-
-    // 校验专家选项
-    if (!basicForm.value.expertCode) {
-        ElMessage.warning('请选择您最希望得到哪位荔枝专家的农事处方');
-        return false;
-    }
-
-    return true;
-}
-const showSuccessPopup = ref(false);
-const handleSuccessConfirm = () => {
-    router.push('/agri_record');
-}
-
-
-const loading = ref(false);
-async function submit() {
-    try {
-        // 正式提交
-        const draftData = handleSubmit();
-        // const params = {
-        //     ...route.query,
-        //     phenologyId: phenologyList.value[0].phenologyId,
-        //     phenologyStartDate: phenologyList.value[0].phenologyStartDate,
-        //     basicInfo: draftData,
-        //     expertMiniUserId: '81881',
-        // }
-        // const res = await VE_API.basic_farm.saveBasicFarmInfoByExpert(params);
-        let paramsData = null
-        if (route.query.subjectId) {
-            paramsData = {
-                ...draftData,
-                subjectId: route.query.subjectId,
-            }
-        } else {
-            paramsData = {
-                ...route.query,
-                expertMiniUserId: '81881',
-                basicInfo: draftData,
-                speciesContainer: JSON.parse(route.query.speciesContainer),
-            }
-        }
-
-        loading.value = true;
-
-        const apiCall = route.query.subjectId ? VE_API.basic_farm.saveBasicFarmInfo(paramsData) : VE_API.basic_farm.saveBasicFarmInfoByExpertV3(paramsData);
-        apiCall.then((res) => {
-            loading.value = false;
-            if (res.code === 0) {
-                // showSuccessPopup.value = true;
-                if (route.query.subjectId) {
-                    router.go(-1);
-                } else {
-                    // 设置选中当前新增的农场
-                    localStorage.setItem("selectedFarmId", res.data.id);
-                    localStorage.setItem("selectedFarmName", res.data.name);
-                    router.replace('/growth_report');
-                }
-                ElMessage.success('创建成功');
-                // return true;
-            } else {
-                ElMessage.error(res.msg || '提交失败,请重试');
-                return false;
-            }
-        })
-    } catch (error) {
-        loading.value = false;
-        console.error('提交失败:', error);
-        ElMessage.error('提交失败,请重试');
-        return false;
-    }
-}
-
-const showPeriodPopup = ref(false);
-const phenologyList = ref([]);
-const disabledDate = (time) => {
-    // 获取今天的开始时间(00:00:00)
-    const today = new Date();
-    today.setHours(0, 0, 0, 0);
-
-    // 获取明天的开始时间(00:00:00)
-    const tomorrow = new Date(today);
-    tomorrow.setDate(tomorrow.getDate() + 1);
-
-    // 设置最小日期为 2025-01-01
-    const minDate = new Date(2025, 10, 1); // 月份从0开始,0表示1月
-    minDate.setHours(0, 0, 0, 0);
-
-    // 如果时间 < 2025-10-01 或 >= 明天的开始时间,则禁用
-    // 只能选择 2025-10-01 到今天的日期范围
-    return time.getTime() < minDate.getTime() || time.getTime() >= tomorrow.getTime();
-}
-const handlePage = async () => {
-    try {
-        // 先进行校验
-        if (!validateForm()) {
-            return;
-        }
-
-        // 安全解析 typeNames
-        // let typeNames = [];
-        // try {
-        //     if (route.query.typeNames) {
-        //         typeNames = JSON.parse(route.query.typeNames);
-        //     } else {
-        //         ElMessage.warning('缺少必要参数,请重新进入页面');
-        //         return;
-        //     }
-        // } catch (e) {
-        //     console.error('解析 typeNames 失败:', e);
-        //     ElMessage.warning('参数格式错误,请重新进入页面');
-        //     return;
-        // }
-
-        // // 检查 firstPhenology 是否已初始化
-        // if (!firstPhenology.value || !firstPhenology.value.phenologyId) {
-        //     ElMessage.warning('物候期数据未加载完成,请稍候再试');
-        //     return;
-        // }
-
-        // phenologyList.value = typeNames.map(item => ({
-        //     typeName: item,
-        //     phenologyId: firstPhenology.value.phenologyId,
-        //     startDateLabel: firstPhenology.value.startDateLabel,
-        //     phenologyName: firstPhenology.value.phenologyName,
-        //     phenologyStartDate: '2026-01-01',
-        // }));
-
-        // 如果有选择的专家,添加 preferredExpertCode
-        if (basicForm.value.expertCode) {
-            const selectedExpert = basicFarmFormData.value.expertOptions?.find(item => item.code === basicForm.value.expertCode);
-            if (selectedExpert) {
-                basicForm.value.expertInfo = selectedExpert;
-            }
-        }
-
-        showPeriodPopup.value = true;
-    } catch (error) {
-        console.error('handlePage 执行失败:', error);
-        ElMessage.error('操作失败,请重试');
-    }
-};
-
-
-// 获取当前日期(YYYY-MM-DD格式)
-const getTodayDate = () => {
-    const today = new Date();
-    const year = today.getFullYear();
-    const month = String(today.getMonth() + 1).padStart(2, "0");
-    const day = String(today.getDate()).padStart(2, "0");
-    return `${year}-${month}-${day}`;
-};
-
-const firstPhenology = ref({});
-const phenologyData = ref({});
-// 从 query 中解析 containerId(支持 speciesContainer 数组/对象或 JSON 字符串)
-const getContainerIdFromQuery = () => {
-    const sc = route.query.speciesContainer;
-    if (sc != null) {
-        const parsed = typeof sc === 'string' ? (tryParse(sc) || []) : sc;
-        const first = Array.isArray(parsed) ? parsed[0] : parsed;
-        return first?.containerId ?? route.query.containerId;
-    }
-    return route.query.containerId;
-};
-const tryParse = (str) => {
-    try { return JSON.parse(str); } catch { return null; }
-};
-
-// 获取当前和下一个物候期
-const getCurrentAndNextPhenology = async () => {
-    try {
-        const { data } = await VE_API.home.getCurrentAndNextPhenology({
-            expertMiniUserId: '81881',
-            containerId: getContainerIdFromQuery(),
-        });
-        if (data && Array.isArray(data)) {
-            // 初始化物候期表单数据,日期使用第一个物候期的 startDate
-            firstPhenology.value = data[0];
-        }
-    } catch (error) {
-        console.error("获取物候期数据失败", error);
-        ElMessage.error("获取物候期数据失败");
-    }
-};
-
-// 确认物候期信息
-const handlePeriodConfirm = async () => {
-    // 校验所有物候期信息是否填写完整
-    const hasEmptyDate = phenologyList.value.some(item => !item.phenologyStartDate);
-    if (hasEmptyDate) {
-        ElMessage.warning('请选择时间');
-        return;
-    }
-
-    // 关闭弹窗并提交表单
-    showPeriodPopup.value = false;
-    loadingPage.value = true;
-    // 正式提交
-    const success = await submit();
-    loadingPage.value = false;
-    if (!success) {
-        return;
-    }
-
-    // 提交成功后跳转
-    // if (route.query.type === 'farmer') {
-    //     router.push('/agri_record')
-    //     return
-    // }
-
-    // // 获取所有需要传递的参数,包括 from 参数
-    // const queryParams = {
-    //     containerId: route.query.containerId,
-    // };
-
-    // // 如果存在 from 参数,继续传递
-    // if (route.query.from) {
-    //     queryParams.from = route.query.from;
-    // }
-
-    // // 传递所有农场相关的参数,以便在 agricultural_plan 页面创建农场
-    // const farmParams = ['wkt', 'speciesId', 'containerId', 'agriculturalCreate', 'geom', 'address', 'mu', 'name', 'fzr', 'tel', 'defaultFarm', 'typeId', 'speciesName', 'userType'];
-    // farmParams.forEach(key => {
-    //     if (route.query[key] !== undefined) {
-    //         queryParams[key] = route.query[key];
-    //     }
-    // });
-    // router.push({
-    //     path: '/agricultural_plan',
-    //     query: queryParams
-    // });
-};
-</script>
-
-<style lang="scss" scoped>
-.prescription-page {
-    position: relative;
-    width: 100%;
-    height: calc(100vh - 62px);
-    overflow: auto;
-    box-sizing: border-box;
-    background: linear-gradient(to left, #e6f2ff, #8fc5fe);
-
-    .page-content {
-        height: calc(100% - 40px);
-        overflow: auto;
-        box-sizing: border-box;
-    }
-
-    .prescription-title {
-        padding: 26px 14px 10px 14px;
-        background: url("@/assets/img/home/page-bg.png") no-repeat bottom right / 141px 116px;
-        background-position-y: 7px;
-
-        img {
-            width: 24px;
-        }
-
-        .title-name {
-            font-size: 22px;
-            color: #2e2e2e;
-            text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
-            font-weight: 500;
-            padding: 0 0 4px 6px;
-        }
-
-        .title-desc {
-            font-size: 14px;
-            color: rgba(49, 49, 49, 0.56);
-            padding-left: 6px;
-        }
-    }
-
-    .prescription-box {
-        background: #ffffff;
-        box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.1);
-        border-radius: 10px;
-        margin: 0 10px 30px 10px;
-        box-sizing: border-box;
-        padding-bottom: 10px;
-
-        .box-title {
-            margin: 0 10px;
-            box-sizing: border-box;
-            border-bottom: 1px solid rgba(0, 0, 0, 0.15);
-            font-weight: 800;
-            font-size: 18px;
-            color: #222222;
-            padding: 15px 0 10px;
-
-            img {
-                width: 14px;
-                height: 9px;
-            }
-        }
-
-        .pt-16 {
-            padding-top: 16px;
-        }
-
-        .box-content {
-            padding: 0 10px;
-
-            .box-item {
-                padding-top: 16px;
-
-                .item-name {
-                    display: flex;
-                    align-items: center;
-                    font-size: 14px;
-                    color: rgba(0, 0, 0, 0.9);
-                    font-weight: 500;
-
-                    .required-icon {
-                        color: #ff0000;
-                        font-size: 16px;
-                        margin-right: 4px;
-                    }
-
-                    .sub-name {
-                        font-size: 12px;
-                        font-weight: 400;
-                    }
-                }
-
-                .tips {
-                    // margin-left: 10px;
-                    font-size: 12px;
-                    color: rgba(0, 0, 0, 0.4);
-                }
-
-                .item-checkbox {
-                    .tag-group {
-                        display: grid;
-                        grid-template-columns: repeat(3, 1fr);
-                        gap: 0 7px;
-                        font-size: 14px;
-
-                        .tag-item {
-                            margin-top: 10px;
-                            position: relative;
-                            border-radius: 4px;
-                            color: #2199f8;
-                            // padding: 0 4px;
-                            box-sizing: border-box;
-                            // min-width: 26vw;
-                            height: 40px;
-                            text-align: center;
-                            line-height: 40px;
-                            cursor: pointer;
-                            transition: all 0.3s;
-
-                            .quantity-text {
-                                font-size: 10px;
-                                color: #fff;
-                                position: absolute;
-                                right: -7px;
-                                top: -7px;
-                                width: 14px;
-                                text-align: center;
-                                line-height: 14px;
-                                height: 14px;
-                                border-radius: 50%;
-                                background: #2199F8;
-                            }
-
-                            .text {
-                                display: inline-flex;
-                                align-items: center;
-                            }
-
-                            .edit-icon {
-                                margin-left: 8px;
-                            }
-
-                            .del-icon {
-                                position: absolute;
-                                right: -8px;
-                                top: -8px;
-                                background: #2199F8;
-                                border-radius: 50%;
-                                width: 16px;
-                                height: 16px;
-                                font-size: 10px;
-                                display: flex;
-                                align-items: center;
-                                justify-content: center;
-                                color: #fff;
-                            }
-
-                            &.selected {
-                                border: 1px solid #2199F8;
-                                background: #E8F5FF;
-                                color: #2199F8;
-
-                                &::after {
-                                    content: "";
-                                    position: absolute;
-                                    z-index: 9;
-                                    bottom: -1px;
-                                    right: 0;
-                                    width: 18px;
-                                    height: 13px;
-                                    background: url("@/assets/img/home/checked-bg.png") no-repeat bottom right / 18px 13px;
-                                }
-                            }
-                        }
-
-                        &.add-tag-group {
-                            .tag-item {
-                                color: #000000;
-                                background: rgba(241, 241, 241, 0.12);
-                                border: 1px solid #EBEBEB;
-                                cursor: pointer;
-
-                                &.self {
-                                    border: 1px solid #2199F8;
-                                    background: #E8F5FF;
-                                    color: #2199F8;
-
-                                    &::after {
-                                        content: "";
-                                        position: absolute;
-                                        z-index: 9;
-                                        bottom: -1px;
-                                        right: 0;
-                                        width: 18px;
-                                        height: 13px;
-                                        background: url("@/assets/img/home/checked-bg.png") no-repeat bottom right / 18px 13px;
-                                    }
-                                }
-
-                                &.selected {
-                                    border: 1px solid #2199F8;
-                                    background: #E8F5FF;
-                                    color: #2199F8;
-                                }
-
-                                &.last-add {
-                                    // background: #F7F7F7;
-                                    // color: #343434;
-                                    // border: none;
-                                    display: flex;
-                                    align-items: center;
-                                    justify-content: center;
-                                    cursor: pointer;
-
-                                    .add-icon {
-                                        font-size: 14px;
-                                        font-weight: bold;
-                                        margin-right: 3px;
-                                    }
-                                }
-                            }
-                        }
-                    }
-
-                    ::v-deep {
-
-                        .el-radio-button,
-                        .el-checkbox-button {
-                            margin: 10px 0 0 7px;
-
-                            .el-radio-button__inner,
-                            .el-checkbox-button__inner {
-                                border: none;
-                                border-radius: 6px;
-                                // padding: 13px 21px;
-                                height: 40px;
-                                width: 104px;
-                                display: flex;
-                                align-items: center;
-                                justify-content: center;
-                                border: 1px solid #EBEBEB;
-                                color: #000000;
-                                background: rgba(241, 241, 241, 0.12);
-                                font-weight: 400;
-                            }
-
-                            &.is-active,
-                            &.is-checked {
-                                &::after {
-                                    content: "";
-                                    position: absolute;
-                                    z-index: 9;
-                                    bottom: -0.5px;
-                                    right: 0;
-                                    width: 18px;
-                                    height: 13px;
-                                    background: url("@/assets/img/home/checked-bg.png") no-repeat bottom right / 18px 13px;
-                                }
-
-                                .el-radio-button__inner,
-                                .el-checkbox-button__inner {
-                                    background: rgba(33, 153, 248, 0.1) !important;
-                                    color: #2199f8 !important;
-                                    border: 1px solid #2199f8 !important;
-                                    box-shadow: none;
-                                }
-                            }
-
-                            &.is-active {
-                                .el-radio-button__original-radio:not(:disabled)+.el-radio-button__inner {
-                                    background: rgba(33, 153, 248, 0.1) !important;
-                                    color: #2199f8 !important;
-                                    border: 1px solid #2199f8 !important;
-                                    box-shadow: none;
-                                    font-weight: 500;
-                                }
-                            }
-
-                            &.is-checked {
-                                .el-checkbox-button__original-checkbox:not(:disabled)+.el-checkbox-button__inner {
-                                    background: rgba(33, 153, 248, 0.1) !important;
-                                    color: #2199f8 !important;
-                                    border: 1px solid #2199f8 !important;
-                                    box-shadow: none;
-                                    font-weight: 500;
-                                }
-                            }
-                        }
-
-                        .el-radio-button:nth-child(3n-2) {
-                            margin-left: 0;
-                        }
-                    }
-                }
-            }
-        }
-
-        /* 农场规模(与农场情况同一卡片内) */
-        .farm-scale-header {
-            margin-top: 16px;
-
-            .farm-scale-title {
-                font-size: 15px;
-                font-weight: 500;
-                color: rgba(0, 0, 0, 0.9);
-            }
-
-            .farm-scale-desc {
-                font-size: 13px;
-                color: rgba(0, 0, 0, 0.4);
-            }
-        }
-
-        .farm-scale-form {
-            margin-top: 10px;
-            border: 0.5px solid rgba(33, 153, 248, 0.5);
-            border-radius: 8px;
-            padding: 10px;
-
-            .farm-scale-item {
-                display: flex;
-                align-items: center;
-                margin-bottom: 14px;
-
-                &:last-child {
-                    margin-bottom: 0;
-                }
-
-                .farm-scale-label {
-                    flex-shrink: 0;
-                    width: 116px;
-                    font-size: 14px;
-                    color: rgba(0, 0, 0, 0.9);
-                    // text-align: right;
-                    margin-right: 10px;
-
-                    .sub-label {
-                        font-size: 10px;
-                        color: rgba(0, 0, 0, 0.4);
-                        line-height: 15px;
-                    }
-                }
-
-                .farm-scale-input {
-                    flex: 1;
-
-                    ::v-deep .el-input-group__append {
-                        padding: 0 12px;
-                        background: #f5f7fa;
-                        color: rgba(0, 0, 0, 0.65);
-                        border-color: #dcdfe6;
-                        border-radius: 0 4px 4px 0;
-                    }
-
-                    ::v-deep .el-input__inner {
-                        border-radius: 4px 0 0 4px;
-                    }
-                }
-            }
-        }
-    }
-
-    .disaster-desc-box {
-        padding: 10px;
-        display: flex;
-        align-items: center;
-
-        span {
-            font-size: 14px;
-            color: rgba(0, 0, 0, 0.9);
-            width: 80px;
-        }
-    }
-}
-
-
-.add-tag-popup {
-    width: 90%;
-    padding: 24px 16px 20px 16px;
-    background: linear-gradient(360deg, #FFFFFF 74.2%, #D1EBFF 100%);
-
-    .popup-title {
-        font-size: 16px;
-        font-weight: 400;
-        margin-bottom: 12px;
-        color: #000000;
-
-        .name-text {
-            font-weight: 500;
-            color: #2199F8;
-            padding: 0 2px;
-        }
-    }
-
-    .ml-2 {
-        margin-left: 3px;
-    }
-
-    .popup-input {
-        margin-bottom: 24px;
-    }
-
-    .popup-button {
-        display: flex;
-
-        div {
-            flex: 1;
-            font-size: 16px;
-            padding: 9px;
-            border-radius: 20px;
-            background: #2199F8;
-            color: #fff;
-            text-align: center;
-            cursor: pointer;
-        }
-
-        .cancel {
-            margin-right: 13px;
-            color: #000;
-            background: #fff;
-            border: 1px solid #999999;
-        }
-
-        .disabled {
-            opacity: 0.5;
-            cursor: not-allowed;
-        }
-
-        .delete {
-            margin-right: 13px;
-            color: #FF3D3D;
-            background: #fff;
-            border: 1px solid rgba(255, 61, 61, 0.4);
-        }
-    }
-}
-
-.period-popup {
-    width: 90%;
-    padding: 24px 16px 20px 16px;
-    background: linear-gradient(360deg, #FFFFFF 74.2%, #D1EBFF 100%);
-
-    .period-header {
-        font-size: 16px;
-        font-weight: 400;
-        margin-bottom: 16px;
-        color: #121212;
-        line-height: 22px;
-    }
-
-    .period-content {
-        margin-bottom: 16px;
-
-        .period-item {
-            background: rgba(33, 153, 248, 0.05);
-            border: 1px solid rgba(33, 153, 248, 0.2);
-            border-radius: 5px;
-            padding: 10px;
-            margin-bottom: 16px;
-            position: relative;
-
-            &:last-child {
-                margin-bottom: 0;
-            }
-
-            .period-item-name {
-                background: rgba(33, 153, 248, 0.1);
-                font-size: 12px;
-                color: #2199F8;
-                padding: 2px 10px;
-                border-radius: 2px;
-                font-weight: 400;
-                width: fit-content;
-            }
-
-            .period-item-label {
-                margin-top: 10px;
-
-                .label-item-group {
-                    display: flex;
-                    align-items: center;
-                    margin-bottom: 12px;
-
-                    &:last-child {
-                        margin-bottom: 0;
-                    }
-
-                    .label-item {
-                        font-size: 14px;
-                        color: #1D2129;
-                        min-width: 100px;
-                        flex-shrink: 0;
-                        padding-right: 10px;
-                    }
-
-                    .label-item-value {
-                        border-radius: 2px;
-                        flex: 1;
-                        font-size: 14px;
-                        color: #1D2129;
-                        min-height: 31px;
-                        line-height: 31px;
-                        display: flex;
-                        align-items: center;
-
-                        &.period-display {
-                            background: #FFFFFF;
-                            border: 0.5px solid rgba(0, 0, 0, 0.2);
-                            padding: 0 8px;
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    .period-footer {
-        .period-footer-btn {
-            width: 100%;
-            background: #2199F8;
-            color: #ffffff;
-            font-size: 16px;
-            text-align: center;
-            height: 40px;
-            line-height: 40px;
-            border-radius: 4px;
-            cursor: pointer;
-            font-weight: 500;
-
-            &:active {
-                opacity: 0.8;
-            }
-        }
-    }
-}
-
-.expert-info {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    font-size: 20px;
-    line-height: 36px;
-
-    .expert-img {
-        // width: 26px;
-        // height: 26px;
-        // border-radius: 50%;
-        // object-fit: cover;
-        margin-right: 5px;
-    }
-}
-
-// 优化按钮点击体验,解决移动端点击无响应问题
-.custom-bottom-fixed-btns {
-    z-index: 99 !important; // 提高 z-index,确保不被其他元素遮挡
-    pointer-events: auto; // 确保可以接收点击事件
-
-    .bottom-btn {
-        
-        height: 40px;
-        padding: 0 30px;
-        line-height: 40px;
-        cursor: pointer;
-        user-select: none; // 防止文本选择
-        touch-action: manipulation; // 优化移动端触摸响应
-        -webkit-tap-highlight-color: transparent; // 移除移动端点击高亮
-        position: relative; // 确保点击区域正确
-        z-index: 1;
-
-        // 添加点击反馈效果
-        &:active {
-            opacity: 0.8;
-            transform: scale(0.98);
-        }
-
-        &.primary-btn {
-            // 确保按钮可点击
-            pointer-events: auto;
-        }
-    }
-}
-</style>
-
-<style lang="scss">
-.el-message--warning .el-message__content {
-    line-height: 20px;
-}
-</style>

+ 0 - 616
src/views/old_mini/home/subPages/prescriptionPage.vue

@@ -1,616 +0,0 @@
-<template>
-    <div class="prescription-page">
-        <custom-header name="基本信息" isGoBack @goback="goBack"></custom-header>
-        <div class="page-content">
-            <div class="prescription-title">
-                <div class="title-name">农场基本信息</div>
-                <div class="title-desc">请确定您的果园设施以及内容</div>
-            </div>
-            <div class="prescription-box" v-loading="loadingPage">
-                <div class="box-content">
-                    <div class="box-item">
-                        <div class="item-name">
-                            <span>请选择您的灌溉方式</span>
-                            <span class="sub-name"> (可多选)</span>
-                        </div>
-                        <div class="tips">灌溉方式确认药肥最佳配比</div>
-                        <div class="item-checkbox">
-                            <div class="tag-group add-tag-group">
-                                <div class="tag-item" :class="{ self: item.custom === true && item.selected, selected: item.selected }"
-                                    @click="handleSelect('irrigationMethods', idx, item.custom)"
-                                    v-for="(item, idx) in basicFarmFormData.irrigationMethods" :key="'ce-' + idx">
-                                    <span class="text">{{ item.name }}</span>
-                                </div>
-                                <div class="tag-item last-add" @click="handleAdd('irrigationMethods')"><el-icon
-                                        class="add-icon">
-                                        <Plus />
-                                    </el-icon>其它方式</div>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="box-item">
-                        <div class="item-name">
-                            <span>您是否接受植保服务</span>
-                        </div>
-                        <div class="item-checkbox">
-                            <el-radio-group v-model="basicForm.needZbCode" @change="handleNeedZbChange">
-                                <el-radio-button v-for="item in (basicFarmFormData.needZbOptions || [])"
-                                    :key="item.code" :label="item.name" :value="item.code" />
-                            </el-radio-group>
-                        </div>
-                    </div>
-                </div>
-            </div>
-            <el-button class="bottom-btn" :loading="loading" @click.stop="submit" @touchstart.stop
-                @touchend.stop>确认信息</el-button>
-        </div>
-    </div>
-
-    <popup class="add-tag-popup" round v-model:show="showAddPopup">
-        <div class="tag-item">
-            <div class="popup-title">编辑<span class="name-text">{{ formNameObj[addTypeKey] }}</span><span
-                    class="ml-2">名称</span></div>
-            <el-input class="popup-input" v-model="popupInputVal" :placeholder="'请输入' + formNameObj[addTypeKey]"
-                size="large" />
-        </div>
-        <div class="popup-button">
-            <div class="delete" v-if="isEditPopup" @click="handleDelete">删除</div>
-            <div class="cancel" v-else @click="showAddPopup = false">取消</div>
-            <div :class="{ disabled: isPopupConfirmDisabled() }" @click="handleConfirm">确认</div>
-        </div>
-    </popup>
-
-</template>
-
-<script setup>
-import { ref, onActivated, onDeactivated } from "vue";
-import { ElMessage } from "element-plus";
-import { useRouter, useRoute } from "vue-router";
-import customHeader from "@/components/customHeader.vue";
-import { Popup } from "vant";
-const router = useRouter();
-const route = useRoute();
-
-onActivated(() => {
-    getBasicFarmFormData();
-});
-
-const loadingPage = ref(false);
-const basicForm = ref({
-    needZbCode: "",
-});
-
-const basicFarmFormData = ref({});
-const getBasicFarmFormData = () => {
-    loadingPage.value = true;
-    VE_API.basic_farm.fetchBasicFarmFormData({ subjectId: route.query?.subjectId }).then(({ data }) => {
-        basicFarmFormData.value = data;
-
-        if (Array.isArray(basicFarmFormData.value.needZbOptions)) {
-            const needZbOptions = basicFarmFormData.value.needZbOptions;
-            const selectedExpert = needZbOptions.find(item => item.selected);
-            const defaultOption = selectedExpert || needZbOptions[0];
-            if (defaultOption) {
-                basicForm.value.needZbCode = defaultOption.code;
-                handleNeedZbChange(defaultOption.code);
-            }
-        }
-    }).finally(() => {
-        loadingPage.value = false;
-    });
-}
-
-const saveDraft = async () => {
-    try {
-        const draftData = handleSubmit();
-        await VE_API.basic_farm.saveDraft(draftData);
-    } catch (error) {
-        console.error("保存草稿失败:", error);
-    }
-};
-
-onDeactivated(() => {
-    saveDraft();
-    loading.value = false;
-});
-
-const formNameObj = ref({
-    irrigationMethods: '灌溉方式',
-});
-const showAddPopup = ref(false);
-const addTypeKey = ref("");
-const popupInputVal = ref("");
-const isEditPopup = ref(false);
-const currentEditIndex = ref(-1);
-function handleAdd(type) {
-    isEditPopup.value = false;
-    showAddPopup.value = true;
-    addTypeKey.value = type;
-    popupInputVal.value = "";
-}
-
-function handleSelect(type, index, custom) {
-    if (custom === true) {
-        showAddPopup.value = true;
-        isEditPopup.value = true;
-        addTypeKey.value = type;
-        popupInputVal.value = basicFarmFormData.value[type][index].name;
-        currentEditIndex.value = index;
-    }
-    const optionList = basicFarmFormData.value[type] || [];
-    const currentOption = optionList[index];
-    if (!currentOption) {
-        return;
-    }
-
-    const isNoneOption = String(currentOption.name ?? "").trim() === "无";
-    if (isNoneOption) {
-        const nextSelected = !currentOption.selected;
-        optionList.forEach((item, idx) => {
-            item.selected = nextSelected ? idx === index : false;
-        });
-        return;
-    }
-
-    currentOption.selected = !currentOption.selected;
-    if (currentOption.selected) {
-        optionList.forEach((item, idx) => {
-            if (idx !== index && String(item.name ?? "").trim() === "无") {
-                item.selected = false;
-            }
-        });
-    }
-}
-
-function handleNeedZbChange(selectedCode) {
-    const selectedCodeStr = String(selectedCode ?? "");
-    if (!Array.isArray(basicFarmFormData.value.needZbOptions)) {
-        return;
-    }
-    basicFarmFormData.value.needZbOptions = basicFarmFormData.value.needZbOptions.map(item => {
-        const currentCode = String(item.code ?? item.value ?? "");
-        return {
-            ...item,
-            selected: currentCode === selectedCodeStr,
-        };
-    });
-}
-
-function isPopupConfirmDisabled() {
-    return String(popupInputVal.value ?? "").trim().length === 0;
-}
-
-function handleConfirm() {
-    if (isPopupConfirmDisabled()) {
-        return;
-    }
-    if (!popupInputVal.value.trim()) {
-        return;
-    }
-    if (isEditPopup.value) {
-        const option = basicFarmFormData.value[addTypeKey.value][currentEditIndex.value]
-        option.name = popupInputVal.value;
-        currentEditIndex.value = -1;
-        isEditPopup.value = false;
-        showAddPopup.value = false;
-        updateCustomOption(popupInputVal.value, option.id || option.code);
-        return;
-    }
-    saveCustomOption(popupInputVal.value);
-
-    showAddPopup.value = false;
-}
-
-function saveCustomOption(name) {
-    const cfgKey = addTypeKey.value;
-    VE_API.basic_farm.addCustomOption({ configType: 'IRRIGATION', name: name }).then(() => {
-        ElMessage.success('保存成功');
-        getBasicFarmFormData();
-    });
-}
-
-function updateCustomOption(name, id) {
-    VE_API.basic_farm.updateCustomOption({ id, configType: 'IRRIGATION', name: name }).then(() => {
-        ElMessage.success('保存成功');
-    });
-}
-
-function handleDelete() {
-    const option = basicFarmFormData.value[addTypeKey.value][currentEditIndex.value]
-    VE_API.basic_farm.deleteCustomOption({ optionId: option.id || option.code }).then(({ data }) => {
-        ElMessage.success('删除成功');
-        basicFarmFormData.value[addTypeKey.value].splice(currentEditIndex.value, 1);
-        currentEditIndex.value = -1;
-        showAddPopup.value = false;
-    });
-}
-
-const goBack = () => {
-    if (route.query.subjectId) {
-        router.go(-1);
-    } else {
-        router.replace(`/create_farm?from=${route.query.from}&type=${route.query.type}`);
-    }
-};
-
-function handleSubmit() {
-    const irrigationMethods = (basicFarmFormData.value.irrigationMethods || [])
-        .filter(item => item.selected)
-        .map(item => item.code || item.id);
-    const draftData = {
-        irrigationMethods: irrigationMethods.map(code => Number(code)),
-    };
-
-    if (basicForm.value.needZbCode !== undefined && basicForm.value.needZbCode !== null && basicForm.value.needZbCode !== "") {
-        draftData.needZbCode = Number(basicForm.value.needZbCode);
-    }
-
-    return draftData;
-}
-
-const loading = ref(false);
-async function submit() {
-    try {
-        const draftData = handleSubmit();
-        let paramsData = null
-        if (route.query.subjectId) {
-            paramsData = {
-                ...draftData,
-                subjectId: route.query.subjectId,
-            }
-        } else {
-            paramsData = {
-                ...route.query,
-                expertMiniUserId: '81881',
-                basicInfo: draftData,
-                speciesContainer: JSON.parse(route.query.speciesContainer),
-            }
-        }
-
-        loading.value = true;
-
-        const apiCall = route.query.subjectId ? VE_API.basic_farm.saveBasicFarmInfo(paramsData) : VE_API.basic_farm.saveBasicFarmInfoByExpertV3(paramsData);
-        apiCall.then((res) => {
-            loading.value = false;
-            if (res.code === 0) {
-                if (route.query.subjectId) {
-                    router.go(-1);
-                } else {
-                    const createdFarm = Array.isArray(res.data) ? res.data[0] : res.data;
-                    // 农场列表按 farm.id 匹配,优先缓存 id,兼容回退 subjectId
-                    localStorage.setItem("selectedFarmId", createdFarm?.id ?? createdFarm?.subjectId ?? "");
-                    localStorage.setItem("selectedFarmName", createdFarm?.name ?? "");
-                    // 创建农场成功后,进入长势报告且有分区数据时展示一次农场列表引导
-                    localStorage.setItem("GROWTH_REPORT_NEED_TAB_GUIDE", "1");
-                    router.replace('/growth_report');
-                }
-                ElMessage.success('创建成功');
-            } else {
-                ElMessage.error(res.msg || '提交失败,请重试');
-                return false;
-            }
-        })
-    } catch (error) {
-        loading.value = false;
-        console.error('提交失败:', error);
-        ElMessage.error('提交失败,请重试');
-        return false;
-    }
-}
-
-</script>
-
-<style lang="scss" scoped>
-.prescription-page {
-    position: relative;
-    width: 100%;
-    height: 100vh;
-    overflow: auto;
-    box-sizing: border-box;
-    background: linear-gradient(to left, #e6f2ff, #8fc5fe);
-
-    .page-content {
-        height: calc(100% - 40px);
-        overflow: auto;
-        box-sizing: border-box;
-    }
-
-    .prescription-title {
-        padding: 26px 14px 10px 14px;
-        background: url("@/assets/img/home/page-bg.png") no-repeat bottom right / 141px 116px;
-        background-position-y: 7px;
-
-        img {
-            width: 24px;
-        }
-
-        .title-name {
-            font-size: 22px;
-            color: #2e2e2e;
-            text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
-            font-weight: 500;
-            padding: 0 0 4px 6px;
-        }
-
-        .title-desc {
-            font-size: 14px;
-            color: rgba(49, 49, 49, 0.56);
-            padding-left: 6px;
-        }
-    }
-
-    .prescription-box {
-        background: #ffffff;
-        box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.1);
-        border-radius: 10px;
-        margin: 0 10px 30px 10px;
-        box-sizing: border-box;
-        padding-bottom: 10px;
-
-        .box-content {
-            padding: 0 10px;
-
-            .box-item {
-                padding-top: 16px;
-
-                .item-name {
-                    display: flex;
-                    align-items: center;
-                    font-size: 14px;
-                    color: rgba(0, 0, 0, 0.9);
-                    font-weight: 500;
-
-                    .sub-name {
-                        font-size: 12px;
-                        font-weight: 400;
-                    }
-                }
-
-                .tips {
-                    font-size: 12px;
-                    color: rgba(0, 0, 0, 0.4);
-                }
-
-                .item-checkbox {
-                    .tag-group {
-                        display: grid;
-                        grid-template-columns: repeat(3, 1fr);
-                        gap: 0 7px;
-                        font-size: 14px;
-
-                        .tag-item {
-                            margin-top: 10px;
-                            position: relative;
-                            border-radius: 4px;
-                            color: #2199f8;
-                            box-sizing: border-box;
-                            height: 40px;
-                            text-align: center;
-                            line-height: 40px;
-                            cursor: pointer;
-                            transition: all 0.3s;
-
-                            .text {
-                                display: inline-flex;
-                                align-items: center;
-                            }
-
-                            &.selected {
-                                border: 1px solid #2199F8;
-                                background: #E8F5FF;
-                                color: #2199F8;
-
-                                &::after {
-                                    content: "";
-                                    position: absolute;
-                                    z-index: 9;
-                                    bottom: -1px;
-                                    right: 0;
-                                    width: 18px;
-                                    height: 13px;
-                                    background: url("@/assets/img/home/checked-bg.png") no-repeat bottom right / 18px 13px;
-                                }
-                            }
-                        }
-
-                        &.add-tag-group {
-                            .tag-item {
-                                color: #000000;
-                                background: rgba(241, 241, 241, 0.12);
-                                border: 1px solid #EBEBEB;
-                                cursor: pointer;
-
-                                &.self {
-                                    border: 1px solid #2199F8;
-                                    background: #E8F5FF;
-                                    color: #2199F8;
-
-                                    &::after {
-                                        content: "";
-                                        position: absolute;
-                                        z-index: 9;
-                                        bottom: -1px;
-                                        right: 0;
-                                        width: 18px;
-                                        height: 13px;
-                                        background: url("@/assets/img/home/checked-bg.png") no-repeat bottom right / 18px 13px;
-                                    }
-                                }
-
-                                &.selected {
-                                    border: 1px solid #2199F8;
-                                    background: #E8F5FF;
-                                    color: #2199F8;
-                                }
-
-                                &.last-add {
-                                    display: flex;
-                                    align-items: center;
-                                    justify-content: center;
-                                    cursor: pointer;
-
-                                    .add-icon {
-                                        font-size: 14px;
-                                        font-weight: bold;
-                                        margin-right: 3px;
-                                    }
-                                }
-                            }
-                        }
-                    }
-
-                    ::v-deep {
-
-                        .el-radio-button,
-                        .el-checkbox-button {
-                            margin: 10px 0 0 7px;
-
-                            .el-radio-button__inner,
-                            .el-checkbox-button__inner {
-                                border: none;
-                                border-radius: 6px;
-                                height: 40px;
-                                width: 104px;
-                                display: flex;
-                                align-items: center;
-                                justify-content: center;
-                                border: 1px solid #EBEBEB;
-                                color: #000000;
-                                background: rgba(241, 241, 241, 0.12);
-                                font-weight: 400;
-                            }
-
-                            &.is-active,
-                            &.is-checked {
-                                &::after {
-                                    content: "";
-                                    position: absolute;
-                                    z-index: 9;
-                                    bottom: -0.5px;
-                                    right: 0;
-                                    width: 18px;
-                                    height: 13px;
-                                    background: url("@/assets/img/home/checked-bg.png") no-repeat bottom right / 18px 13px;
-                                }
-
-                                .el-radio-button__inner,
-                                .el-checkbox-button__inner {
-                                    background: rgba(33, 153, 248, 0.1) !important;
-                                    color: #2199f8 !important;
-                                    border: 1px solid #2199f8 !important;
-                                    box-shadow: none;
-                                }
-                            }
-
-                            &.is-active {
-                                .el-radio-button__original-radio:not(:disabled)+.el-radio-button__inner {
-                                    background: rgba(33, 153, 248, 0.1) !important;
-                                    color: #2199f8 !important;
-                                    border: 1px solid #2199f8 !important;
-                                    box-shadow: none;
-                                    font-weight: 500;
-                                }
-                            }
-
-                            &.is-checked {
-                                .el-checkbox-button__original-checkbox:not(:disabled)+.el-checkbox-button__inner {
-                                    background: rgba(33, 153, 248, 0.1) !important;
-                                    color: #2199f8 !important;
-                                    border: 1px solid #2199f8 !important;
-                                    box-shadow: none;
-                                    font-weight: 500;
-                                }
-                            }
-                        }
-
-                        .el-radio-button:nth-child(3n-2) {
-                            margin-left: 0;
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    .bottom-btn {
-        width: calc(100% - 20px);
-        margin: 0 10px;
-        border-radius: 25px;
-        border: none;
-        background: #2199F8;
-        color: #ffffff;
-        font-size: 17px;
-        padding: 8px;
-        height: 40px;
-    }
-}
-
-
-
-.add-tag-popup {
-    width: 90%;
-    padding: 24px 16px 20px 16px;
-    background: linear-gradient(360deg, #FFFFFF 74.2%, #D1EBFF 100%);
-
-    .popup-title {
-        font-size: 16px;
-        font-weight: 400;
-        margin-bottom: 12px;
-        color: #000000;
-
-        .name-text {
-            font-weight: 500;
-            color: #2199F8;
-            padding: 0 2px;
-        }
-    }
-
-    .ml-2 {
-        margin-left: 3px;
-    }
-
-    .popup-input {
-        margin-bottom: 24px;
-    }
-
-    .popup-button {
-        display: flex;
-
-        div {
-            flex: 1;
-            font-size: 16px;
-            padding: 9px;
-            border-radius: 20px;
-            background: #2199F8;
-            color: #fff;
-            text-align: center;
-            cursor: pointer;
-        }
-
-        .cancel {
-            margin-right: 13px;
-            color: #000;
-            background: #fff;
-            border: 1px solid #999999;
-        }
-
-        .disabled {
-            opacity: 0.5;
-            cursor: not-allowed;
-        }
-
-        .delete {
-            margin-right: 13px;
-            color: #FF3D3D;
-            background: #fff;
-            border: 1px solid rgba(255, 61, 61, 0.4);
-        }
-    }
-}
-</style>
-
-<style lang="scss">
-.el-message--warning .el-message__content {
-    line-height: 20px;
-}
-</style>

+ 0 - 398
src/views/old_mini/home/subPages/recognize.vue

@@ -1,398 +0,0 @@
-<template>
-    <div class="diseases-dictionary-detail">
-        <div class="page-title" @click="goBack">
-            <el-icon class="title-icon" color="rgba(0, 0, 0, 0.8)" size="16"><ArrowLeftBold /></el-icon>
-            识别结果
-        </div>
-        <div class="detail-content">
-            <div class="detail-img">
-                <div class="card-item">
-
-                    <div class="ing-wrap" v-if="isRecognize">
-                        <div>
-                            <el-icon size="20" class="is-loading">
-                                <Loading />
-                            </el-icon>
-                        </div>
-                        正在识别,请稍后...
-                    </div>
-                    <!-- <img class="card-bg" src="@/assets/img/diseases/1.jpg" /> -->
-                    <img class="card-bg" :src="base_img_url2 + imgKey + resize" />
-                    <div class="card-content" v-if="!isRecognize && !noData">
-                        <div class="title-ques">
-                            <div class="ques-text">病虫名称:{{recoginizeResult?.name}}</div>
-                        </div>
-                        <div class="dialog-famous">管理方法:</div>
-                        <div class="dialog-answer" v-html="recoginizeResult?.cure">
-
-                        </div>
-                        <div class="info">基本信息:</div>
-                        <div class="desc">
-                            {{recoginizeResult?.info}}
-                        </div>
-                        <div class="famous-info">
-                            <img src="@/assets/img/home/link-icon.png" />
-                            <span class="type-name">{{recoginizeResult?.name}}</span>
-                            <span>合作专家:韦帮稳</span>
-                        </div>
-                    </div>
-                    <div class="card-content no-data" v-if="!isRecognize && noData">
-                        <img src="@/assets/img/home/good-fill.png" />
-                        长势良好,并未发现病虫害
-                    </div>
-                </div>
-            </div>
-            <div class="btn-wrap" v-if="!isRecognize">
-                <div class="btn share" @click="toPage">咨询专家</div>
-                <div class="btn primary" @click="triggerRecord">触发农事</div>
-            </div>
-            <!-- <div class="recognizing-box" v-if="isRecognize">正在识别,请稍等~</div> -->
-        </div>
-    </div>
-    
-    
-    <Popup v-model:show="tipsShow" class="tips-popup">
-        <div class="right-icon">
-            <img class="right-img" src="@/assets/img/home/right.png" alt="">
-        </div>
-        <div class="no-popup-title">
-            <span>农事已触发成功</span>
-            <div class="no-popup-title-sub">您可以在 农场监测-农事任务 看到农事状态</div>
-        </div>
-        <div class="no-popup-btn" @click="tipsShow = false">我知道了</div>
-    </Popup>
-</template>
-
-<script setup>
-import { onMounted, ref } from "vue";
-import { useRouter, useRoute } from "vue-router";
-import { base_img_url2 } from "@/api/config.js";
-import { Popup } from "vant";
-import wx from "weixin-js-sdk";
-
-import MqttClient from "@/plugins/MqttClient";
-
-
-let resize = '?x-oss-process=image/resize,w_1300'
-const route = useRoute();
-// const json = JSON.parse(route.query.json);
-const json = {
-"imgKey":"16926861-1e20-4cbd-8bf2-90208db5a2d0/806080da-1a30-4b5b-b64b-b22e722c6cb6/DJI_202509010800_001_806080da-1a30-4b5b-b64b-b22e722c6cb6/DJI_20250901080536_0045_V_code-ws0fsmge97gh.jpeg",
-"imgId":431600}
-const imgKey = json.imgKey;
-const imgId = json.imgId;
-
-const isRecognize = ref(false);
-const recoginizeResult = ref({
-    name: "蒂蛀虫",
-    cure: " (1) 化学农药喷洒,如:乙醇草酸酯乳油‌。 <br/>(2) 最佳喷药时间:荔枝成熟期要防治蒂蛀虫,一般建议在荔枝成熟前5-8天进行喷药。 <br/>(3) 使用剂量‌:喷药时应按照说明书上的使用剂量进行使用,不要过量使用。",
-    info: "又称蛀蒂虫,属于鳞翅目细蛾科,主要危害荔枝和龙眼的果实、嫩茎、嫩叶和花穗。",
-});
-const noData = ref(false);
-onMounted(() => {
-    console.log("img", imgId, imgKey);
-
-    // 使用示例
-    const topics = ["phone/image/update/" + imgId]; // 订阅的主题数组
-    const mqttClient = new MqttClient(topics, (topic, message) => {
-          let res = message.toString();
-          console.log("接收推送信息:", res);
-          let status = JSON.parse(res).status;
-          console.log("status", status);
-          if (status === "recog_ing") {
-            console.log("recog_ing");
-          }
-          if (status === "recog_finished") {
-            let resData =  JSON.parse(message)
-            console.log("recog_finished",resData.data);
-            isRecognize.value = false;
-            if (resData.data && resData.data.length) {
-              noData.value = false
-              const formData = new FormData();
-              formData.append('code', resData.data[0]);
-              VE_API.disease.fetchDiseaseDetail(formData).then(({data}) => {
-                recoginizeResult.value = data;
-              })
-            } else {
-              noData.value = true
-            }
-          }
-    });
-    mqttClient.connect();
-});
-
-const router = useRouter();
-const goBack = () => {
-    // router.go(-1);
-    router.push('/diseases_dictionary')
-};
-
-const toDetail = () => {
-    router.push("/diseases_dictionary_detail");
-};
-
-const toRecognize = () => {
-    // router.push("/diseases_recognize")
-    const gardenData = {
-        organId: 25862,
-    };
-    wx.miniProgram.navigateTo({
-        url: `/pages/subPages/recognize_carmera/index?gardenData=${JSON.stringify(gardenData)}`,
-    });
-};
-
-const tipsShow = ref(false)
-function triggerRecord() {
-    tipsShow.value = true
-}
-
-function toPage() {
-    router.push("/expert_list")
-}
-</script>
-
-<style lang="scss" scoped>
-.diseases-dictionary-detail {
-    position: relative;
-    width: 100%;
-    height: 100vh;
-    overflow: hidden;
-    background: #fff;
-
-    .page-title {
-        height: 44px;
-        line-height: 44px;
-        text-align: center;
-        font-size: 17px;
-        font-weight: bold;
-        // border-bottom: 1px solid #ededed;
-        .title-icon {
-            cursor: pointer;
-            position: absolute;
-            left: 16px;
-            top: 13px;
-        }
-    }
-    .detail-content {
-        height: calc(100% - 44px - 20px);
-        overflow: auto;
-        .detail-img {
-            height: calc(100% - 100px);
-            position: relative;
-            padding: 4px 16px 30px 16px;
-            .card-item {
-                width: 100%;
-                height: 100%;
-                position: relative;
-                .ing-wrap {
-                    color: #fff;
-                    position: absolute;
-                    left: 0;
-                    right: 0;
-                    top: 50%;
-                    transform: translateY(-50%);
-                    margin: 0 auto;
-                    background: rgba(0, 0, 0, 0.6);
-                    border-radius: 12px;
-                    width: 164px;
-                    height: 95px;
-                    display: flex;
-                    flex-direction: column;
-                    align-items: center;
-                    justify-content: center;
-                }
-                img {
-                    border-radius: 24px 0 36px 4px;
-                    width: 100%;
-                    height: 100%;
-                    object-fit: cover;
-                }
-                .no-data {
-                    color: #fff;
-                    text-align: center;
-                    padding-top: 26px;
-                     img {
-                        width: 26px;
-                     }
-                }
-                .card-content {
-                    position: absolute;
-                    bottom: 0;
-                    left: 0;
-                    padding: 12px 12px 26px 12px;
-                    border-radius: 24px 0 36px 4px;
-                    color: #ffffff;
-                    background: rgba(0, 0, 0, 0.6);
-                    backdrop-filter: blur(4px);
-                    max-height: calc(100% - 38px);
-                    overflow: auto;
-                    width: 100%;
-                    box-sizing: border-box;
-                    .ques-text {
-                        color: #ffd786;
-                        font-size: 18px;
-                        position: relative;
-                        padding-left: 12px;
-                    }
-                    .ques-text:after {
-                        content: "";
-                        position: absolute;
-                        width: 4px;
-                        height: 15px;
-                        top: 5px;
-                        left: 0;
-                        border-radius: 2px;
-                        background: #ffd186;
-                    }
-                    .dialog-famous {
-                        padding: 8px 0 4px 0;
-                        color: #ffd786;
-                        font-size: 16px;
-                    }
-                    .dialog-answer {
-                        line-height: 24px;
-                    }
-                    .info {
-                        padding: 10px 10px 6px 0;
-                        font-size: 15px;
-                    }
-                    .desc {
-                        font-size: 14px;
-                        line-height: 24px;
-                    }
-                    .famous-info {
-                        display: flex;
-                        align-items: center;
-                        color: #ffd786;
-                        font-size: 16px;
-                        padding: 8px 0 0px 0;
-                        .type-name {
-                            padding: 0 4px 0 8px;
-                        }
-                        img {
-                            width: 16px;
-                        }
-                    }
-                }
-            }
-            .recognize-img {
-                width: 100%;
-            }
-        }
-        .btn-wrap {
-            width: 100%;
-            height: 56px;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            margin: 0 auto;
-            padding: 0 16px;
-            box-sizing: border-box;
-            .btn {
-                height: 40px;
-                line-height: 40px;
-                font-size: 16px;
-                text-align: center;
-                color: #000;
-                border-radius: 24px;
-                &.primary {
-                    flex: 1;
-                    color: #fff;
-                    background: #2199f8;
-                }
-                &.share {
-                    background: #fff;
-                    min-width: 80px;
-                    flex: 1;
-                    text-align: center;
-                    border: 1px solid #8E8E8E;
-                }
-            }
-            .btn + .btn {
-                margin-left: 15px;
-            }
-        }
-        .recognizing-box {
-            padding-top: 30px;
-            text-align: center;
-            font-size: 16px;
-        }
-        .box-title {
-            font-size: 16px;
-            font-weight: bold;
-            color: #000;
-            padding: 16px 2px 16px 0;
-        }
-        .padding-t {
-            padding-top: 26px;
-        }
-        .expert-box {
-            .expert-item {
-                display: flex;
-                justify-content: space-between;
-            }
-            .expert-l {
-                display: inline-flex;
-                align-items: center;
-                .expert-name {
-                    padding-left: 10px;
-                }
-                .expert-tag {
-                    background: #f7ecc7;
-                    padding: 2px 6px;
-                    color: #ae7d22;
-                    width: fit-content;
-                    border-radius: 4px;
-                    font-size: 12px;
-                    display: flex;
-                    align-items: center;
-                    margin-left: 10px;
-                }
-                img {
-                    width: 40px;
-                    height: 40px;
-                    border-radius: 50%;
-                }
-            }
-            .line {
-                margin: 16px;
-                width: calc(100% - 32px);
-                height: 1px;
-                background: #f1f1f1;
-            }
-        }
-    }
-}
-
-.tips-popup {
-    width: 300px;
-    border-radius: 14px;
-    padding: 28px 15px 20px;
-    box-sizing: border-box;
-    .right-icon {
-        text-align: center;
-        padding-bottom: 12px;
-        .right-img {
-            width: 68px;
-        }
-    }
-    .no-popup-title {
-        font-size: 24px;
-        font-weight: 500;
-        text-align: center;
-        .no-popup-title-sub{
-            font-size: 14px;
-            margin-top: 8px;
-        }
-    }
-    .no-popup-btn {
-        background-color: #2199F8;
-        padding: 8px;
-        border-radius: 20px;
-        color: #fff;
-        font-size: 16px;
-        margin-top: 32px;
-        text-align: center;
-    }
-}
-</style>

+ 0 - 613
src/views/old_mini/home/subPages/warningDetail.vue

@@ -1,613 +0,0 @@
-<template>
-    <div class="warning-detail">
-        <custom-header name="查看详情" :isClose="route.query.miniJson ? true : false"></custom-header>
-        <div class="article-content" :class="{ 'is-link': isLink }">
-            <div class="article-header">
-                <div class="title">{{ warningDetail.title }}</div>
-                <div class="author-info" v-if="warningDetail.source">
-                    <span class="source-name">{{ warningDetail.source }}</span>
-                </div>
-                <div class="author-info" v-else>
-                    <el-avatar :size="16" :src="warningDetail.icon" />
-                    <span class="author-name">{{ warningDetail.name }}</span>
-                    <span class="qa-date">{{
-                        warningDetail?.createTime && warningDetail?.createTime?.slice(0, 10)
-                    }}</span>
-                </div>
-            </div>
-
-            <div class="article-image" v-if="showImage">
-                <img :src="warningDetail?.media && warningDetail?.media[0]" alt="荔枝开花图片" />
-            </div>
-
-            <!-- <div class="photo-img-wrap-container" v-if="cropAlbum.length">
-                <div class="photo-img-wrap-title">
-                    <div class="title-text">
-                        <span>作物相册</span>
-                        <span class="count">({{ cropAlbum.length }})</span>
-                    </div>
-                    <span class="more" @click="handleSeeMore">查看更多</span>
-                </div>
-                <div class="photo-img-wrap">
-                    <photo-provider :photo-closable="true">
-                        <photo-consumer
-                            v-for="(src, index) in cropAlbum"
-                            intro="执行照片"
-                            :key="index"
-                            :src="base_img_url2 + src.filename"
-                        >
-                            <div class="photo-img">
-                                <img :src="base_img_url2 + src.filename + resize_300" />
-                            </div>
-                        </photo-consumer>
-                    </photo-provider>
-                </div>
-            </div> -->
-
-            <div class="article-summary" v-if="warningDetail.summary">
-                <div class="summary-writer">
-                    <el-avatar :size="36" :src="warningDetail.expertAvatar" />
-                    <div class="writer-info">
-                        <span class="writer-name">{{ warningDetail.expertName }}</span>
-                        <!-- <div class="belong-enterprise">{{ warningDetail.belongEnterprise }}</div> -->
-                    </div>
-                </div>
-                {{ warningDetail.summary }}
-            </div>
-
-            <div class="article-text">
-                <span v-html="processedContent"></span>
-            </div>
-
-            <div class="article-box" :style="{ bottom: isLink ? '10px' : '70px' }" v-if="pageParams.questTitle && showArticleBox">
-                <el-icon class="close-icon" @click="showArticleBox = false"><CloseBold /></el-icon>
-                <div class="box-top">
-                    <img class="icon" src="@/assets/img/home/ask-icon.png" alt="" />
-                    <div class="title">{{ pageParams.questTitle }}</div>
-                </div>
-                <div class="answer-text" v-if="pageParams.answer != null">
-                    <span v-if="pageParams.answer == 0">答:暂未出现{{ pageParams.expectedRisk }}</span>
-                    <template v-else>
-                        <div>答:{{ pageParams.occurrenceTime }}已出现{{ pageParams.expectedRisk }}</div>
-                        <div class="photo-img-wrap">
-                            <photo-provider :photo-closable="true">
-                                <photo-consumer
-                                    v-for="(src, index) in pageParams.imagePaths"
-                                    intro="风险照片"
-                                    :key="index"
-                                    :src="base_img_url2 + src"
-                                >
-                                    <div class="photo-img">
-                                        <img :src="base_img_url2 + src + resize_300" />
-                                    </div>
-                                </photo-consumer>
-                            </photo-provider>
-                        </div>
-                    </template>
-                </div>
-                <div v-else class="box-bottom" :style="{ justifyContent: !isLink ? 'center' : 'flex-end' }">
-                    <template v-if="!isLink"> 
-                        <div v-has-permission="'农事规划'" class="edit-btn" @click="handleEditQuestion">编辑问题</div>
-                    </template>
-                    <template v-else>
-                        <div class="edit-btn" @click="handleAnswerClick(0)">否</div>
-                        <div class="edit-btn primary-btn" @click="handleAnswerClick(1)">是</div>
-                    </template>
-                </div>
-            </div>
-
-            <div class="custom-bottom-fixed-btns" v-if="!isLink">
-                <div class="bottom-btn primary-btn" @click="showShareSheet = true">转发</div>
-            </div>
-        </div>
-    </div>
-    <active-upload-popup ref="activeUploadPopupRef" @handleUploadSuccess="handleUploadSuccess"></active-upload-popup>
-    <fn-share-sheet v-model:show="showShareSheet" :options="shareOptions" @select="handleShareSelect" />
-
-    <Popup v-model:show="showQuestionPopup" class="copy-plan-popup" round closeable :close-on-click-overlay="false">
-        <div class="copy-plan-content">
-            <div class="label">问题描述</div>
-            <el-input
-                v-model="interactionQuestion"
-                size="large"
-                placeholder="请输入问题描述"
-                type="textarea"
-                :rows="3"
-                maxlength="35"
-                show-word-limit
-                class="copy-plan-input"
-            />
-        </div>
-        <div class="copy-plan-footer">
-            <div class="btn btn-cancel" @click="showQuestionPopup = false">取消修改</div>
-            <div class="btn btn-confirm" @click="handleEdit">确认修改</div>
-        </div>
-    </Popup>
-</template>
-
-<script setup>
-import customHeader from "@/components/customHeader.vue";
-import { ref, onActivated, computed } from "vue";
-import { base_img_url2, resize_300 } from "@/api/config";
-import FnShareSheet from "@/components/pageComponents/FnShareSheet.vue";
-import activeUploadPopup from "@/components/popup/activeUploadPopup.vue";
-import { useRoute, useRouter } from "vue-router";
-import { ElMessage } from "element-plus";
-import { Popup } from "vant";
-import wx from "weixin-js-sdk";
-
-// 处理内容中的 iframe 视频标签,转换为 video 标签
-const processVideoContent = (content) => {
-    if (!content) return "";
-    
-    // 匹配 iframe 标签,提取 mp4 视频链接(支持各种属性顺序)
-    const iframeRegex = /<iframe[^>]*class=["']ql-video["'][^>]*src=["']([^"']+\.mp4[^"']*)["'][^>]*><\/iframe>/gi;
-    
-    return content.replace(iframeRegex, (match, videoUrl) => {
-        // 清理视频 URL(去除可能的双斜杠)
-        const cleanUrl = videoUrl.replace(/([^:]\/)\/+/g, "$1");
-        
-        // 将 iframe 替换为 video 标签,小程序可以播放
-        return `<video 
-            src="${cleanUrl}" 
-            controls 
-            style="width: 100%; max-width: 100%; height: auto; border-radius: 5px; margin: 10px 0;"
-            preload="metadata"
-            playsinline
-            webkit-playsinline
-            x5-playsinline
-        ></video>`;
-    });
-};
-
-// 处理后的内容
-const processedContent = computed(() => {
-    return processVideoContent(warningDetail.value.content || "");
-});
-
-const showQuestionPopup = ref(false);
-const handleEdit = () => {
-    VE_API.monitor
-        .updateFarmWorkArrange({
-            id:pageParams.value.arrangeId,
-            interactionQuestion: interactionQuestion.value,
-        })
-        .then((res) => {
-            if (res.code === 0) {
-                ElMessage.success("修改成功");
-                showQuestionPopup.value = false;
-                getAnswer();
-                getWarningDetail();
-            } else {
-                ElMessage.error(res.message || "修改失败");
-            }
-        })
-        .catch(() => {
-            ElMessage.error("修改失败,请重试");
-        })
-        .finally(() => {
-            showQuestionPopup.value = false;
-        });
-};
-const interactionQuestion = ref("");
-
-const route = useRoute();
-const router = useRouter();
-const showShareSheet = ref(false);
-const shareOptions = ref([{ name: "微信", icon: "wechat", type: "wechat" }]);
-const handleShareSelect = () => {
-    const query = {
-        askInfo: { title: "提醒客户", content: "是否分享该提醒给好友" },
-        shareText: warningDetail.value.title,
-        targetUrl: `warning_detail`,
-        paramsPage: JSON.stringify(route.query),
-        imageUrl: warningDetail.value.media[0],
-    };
-    wx.miniProgram.navigateTo({
-        url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
-    });
-};
-
-const isLink = ref(true);
-const warningDetail = ref({});
-const showImage = ref(false);
-const pageParams = ref({});
-const showArticleBox = ref(true);
-
-onActivated(() => {
-    showImage.value = route.query.showImage === "true" ? true : false;
-    isLink.value = localStorage.getItem("SET_USER_CUR_ROLE") == 2 ? false : true;
-    // isLink.value = true;
-    if (route.query.miniJson) {
-        const miniJson = JSON.parse(route.query.miniJson);
-        pageParams.value = JSON.parse(miniJson.paramsPage);
-    } else {
-        pageParams.value = route.query;
-    }
-    getAnswer();
-    // 获取图片数据
-    // getFarmPhoto();
-    getWarningDetail();
-});
-
-const getAnswer = () => {
-    VE_API.farm
-        .getFarmWorkArrangeDetail({
-            id: pageParams.value.arrangeId,
-        })
-        .then((res) => {
-            if (res.code === 0) {
-                pageParams.value.answer = res.data.answer;
-                pageParams.value.expectedRisk = res.data.expectedRisk;
-                pageParams.value.imagePaths = res.data.imagePaths;
-                pageParams.value.occurrenceTime = res.data.occurrenceTime;
-                pageParams.value.questTitle = res.data.interactionQuestion;
-            }
-        });
-};
-
-const getWarningDetail = () => {
-    const params = {
-        id: pageParams.value.id,
-    };
-    VE_API.home.warningDetail(params).then((res) => {
-        warningDetail.value = res.data || {};
-    });
-};
-
-const activeUploadPopupRef = ref(null);
-const handleAnswerClick = (value) => {
-    if (value) {
-        activeUploadPopupRef.value.showPopup({
-            gardenIdVal: pageParams.value.farmId,
-            problemTitleVal: pageParams.value.questTitle,
-            typeVal: "question",
-            arrangeIdVal: route.query.arrangeId,
-        });
-    } else {
-        handleAnswer(0);
-    }
-};
-
-const uploadParams = ref({});
-const handleUploadSuccess = (data) => {
-    uploadParams.value = {
-        occurrenceTime: data.executeDate,
-        imagePaths: data.imagePaths,
-    };
-    handleAnswer(1);
-};
-
-const handleAnswer = (value) => {
-    VE_API.home
-        .answerQuestion({
-            ...uploadParams.value,
-            arrangeId: pageParams.value.arrangeId,
-            answer: value,
-            farmId: pageParams.value.farmId,
-        })
-        .then((res) => {
-            if (res.code === 0) {
-                ElMessage.success("回答成功");
-                getAnswer();
-            }
-        });
-};
-
-const cropAlbum = ref([]);
-// 获取作物相册的三张照片(参考 patrolPhoto 的获取逻辑)
-const getFarmPhoto = async () => {
-    try {
-        // 先获取有图片的日期列表
-        const dateParams = {
-            farmId: pageParams.value.farmId,
-            pageIndex: 0,
-            limit: 10,
-        };
-        const { data: dateData } = await VE_API.farm.findHasImagesDate(dateParams);
-        const dateList = Array.isArray(dateData) ? dateData : [];
-        if (!dateList.length) {
-            cropAlbum.value = [];
-            return;
-        }
-
-        const result = [];
-        let dateIndex = 0;
-
-        // 按日期依次取图片,直到凑够 3 张或没有更多日期
-        while (result.length < 3 && dateIndex < dateList.length) {
-            const currentDate = dateList[dateIndex];
-            const imgParams = {
-                farmId: pageParams.value.farmId,
-                date: currentDate,
-            };
-            const { data } = await VE_API.farm.getImageInfo(imgParams);
-            const images = data && Array.isArray(data.images) ? data.images : [];
-
-            images.forEach((item) => {
-                if (result.length < 3) {
-                    // 统一存成 filename 字段,供模板使用
-                    result.push({
-                        ...item,
-                        filename: item.resFilename || item.filename,
-                    });
-                }
-            });
-
-            dateIndex += 1;
-        }
-
-        cropAlbum.value = result;
-    } catch (e) {
-        console.error("获取农场相册失败", e);
-        cropAlbum.value = [];
-    }
-};
-
-const handleSeeMore = () => {
-    router.push(`/farm_photo?farmId=${pageParams.value.farmId}`);
-};
-
-const handleEditQuestion = () => {
-    interactionQuestion.value = pageParams.value.questTitle;
-    showQuestionPopup.value = true;
-};
-</script>
-
-<style scoped lang="scss">
-.warning-detail {
-    position: relative;
-    width: 100%;
-    height: 100vh;
-    .article-content {
-        padding: 8px 16px;
-        overflow-y: auto;
-        height: calc(100% - 40px - 60px);
-        box-sizing: border-box;
-        &.is-link {
-            height: calc(100% - 40px);
-        }
-        .article-header {
-            .title {
-                font-size: 18px;
-                font-weight: bold;
-                margin-bottom: 6px;
-                text-align: left;
-            }
-
-            .author-info {
-                display: flex;
-                align-items: center;
-                gap: 10px;
-                padding-bottom: 12px;
-                border-bottom: 1px solid #f5f5f5;
-
-                .author-name,
-                .qa-date {
-                    font-size: 14px;
-                    color: #666;
-                    font-weight: normal;
-                }
-
-                .source-name {
-                    font-size: 12px;
-                    color: #666;
-                }
-            }
-        }
-
-        .article-image {
-            width: 100%;
-            margin: 12px 0 20px 0;
-
-            img {
-                width: 100%;
-                height: 175px;
-                border-radius: 5px;
-                object-fit: cover;
-            }
-        }
-        .article-summary {
-            padding: 10px;
-            margin: 12px 0;
-            border: 1px solid rgba(33, 153, 248, 0.1);
-            background: rgba(33, 153, 248, 0.05);
-            border-radius: 8px;
-            font-size: 14px;
-            line-height: 22px;
-            color: #333;
-            white-space: pre-line;
-        }
-        .summary-writer {
-            display: flex;
-            align-items: center;
-            gap: 12px;
-            padding-bottom: 8px;
-            .writer-info {
-                display: flex;
-                flex-direction: column;
-                .writer-name {
-                    font-size: 14px;
-                    color: #000;
-                    font-weight: 500;
-                    line-height: 21px;
-                }
-                .belong-enterprise {
-                    font-size: 12px;
-                    color: #666;
-                    line-height: 15px;
-                }
-            }
-        }
-        .article-text {
-            ::v-deep {
-                img {
-                    width: 100%;
-                    height: 175px;
-                    border-radius: 5px;
-                    object-fit: cover;
-                }
-                video {
-                    width: 100%;
-                    max-width: 100%;
-                    height: auto;
-                    border-radius: 5px;
-                    margin: 10px 0;
-                    display: block;
-                }
-                iframe {
-                    display: none;
-                }
-            }
-        }
-
-        .photo-img-wrap-container {
-            padding: 10px;
-            border-radius: 5px;
-            border: 1px solid rgba(233, 233, 233, 0.5);
-            .photo-img-wrap-title {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                font-size: 16px;
-                .title-text {
-                    display: flex;
-                    align-items: center;
-                    gap: 4px;
-                }
-                .more {
-                    color: rgba(0, 0, 0, 0.6);
-                    font-size: 12px;
-                }
-            }
-        }
-        .photo-img-wrap {
-            display: flex;
-            flex-wrap: wrap;
-            gap: 10px;
-            margin-top: 8px;
-            ::v-deep {
-                .PhotoConsumer {
-                    width: 31%;
-                    height: 92px;
-                }
-            }
-            .photo-img {
-                width: 100%;
-                height: 100%;
-                position: relative;
-                box-sizing: border-box;
-                border: 2px solid transparent;
-                border-radius: 8px;
-                overflow: hidden;
-                img {
-                    width: 100%;
-                    height: 100%;
-                    border-radius: 8px;
-                    object-fit: cover;
-                }
-            }
-        }
-
-        .article-box {
-            position: fixed;
-            bottom: 70px;
-            left: 15px;
-            right: 0;
-            padding: 10px;
-            background: #fff;
-            box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
-            border-radius: 5px;
-            border: 1px solid #F0F0F0;
-            width: calc(100% - 30px);
-            box-sizing: border-box;
-            .close-icon{
-                position: absolute;
-                right: 6px;
-                top: 6px;
-                font-size: 18px;
-                color: #000;
-            }
-            .box-top {
-                display: flex;
-                gap: 8px;
-                width: 94%;
-
-                .icon {
-                    width: 20px;
-                    height: 20px;
-                    margin-top: 4px;
-                }
-
-                .title {
-                    font-size: 16px;
-                    font-weight: 600;
-                }
-            }
-            .answer-text {
-                color: #333333;
-                margin-top: 6px;
-            }
-            .box-bottom {
-                display: flex;
-                justify-content: flex-end;
-                gap: 10px;
-                .edit-btn {
-                    padding: 7px 20px;
-                    background: rgba(33, 153, 248, 0.1);
-                    color: #2199f8;
-                    border-radius: 25px;
-                    font-size: 12px;
-                    text-align: center;
-                    margin-top: 10px;
-                    &.primary-btn {
-                        background: #2199f8;
-                        color: #fff;
-                    }
-                }
-            }
-        }
-    }
-    .custom-bottom-fixed-btns {
-        justify-content: center;
-        .primary-btn {
-            padding: 10px 34px;
-        }
-    }
-}
-
-.copy-plan-popup {
-    width: 100%;
-    padding: 50px 12px 20px 12px;
-    .copy-plan-content {
-        display: flex;
-        gap: 12px;
-        .label {
-            font-size: 16px;
-            font-weight: 500;
-        }
-        .copy-plan-input {
-            width: calc(100% - 80px);
-        }
-    }
-    .copy-plan-footer {
-        display: flex;
-        gap: 12px;
-        margin-top: 20px;
-        .btn {
-            flex: 1;
-            color: #666666;
-            border: 1px solid #999999;
-            border-radius: 25px;
-            padding: 10px 0;
-            font-size: 16px;
-            text-align: center;
-            &.btn-confirm {
-                color: #fff;
-                border: 1px solid #2199f8;
-                background: #2199f8;
-            }
-        }
-    }
-}
-</style>

+ 25 - 10
src/views/old_mini/recordDetails/index.vue

@@ -35,7 +35,10 @@
                             <div class="map-container" ref="mapContainer">
                                 <div class="tip">点击勾画新发生区域</div>
                             </div>
-                            <div class="confirm-btn">确认上传</div>
+                            <div class="confirm-btn-wrap">
+                                <div class="cancel-btn">暂未到达进程</div>
+                                <div class="confirm-btn">确认上传</div>
+                            </div>
                         </div>
                     </div>
                     <div class="phenology-track-section">
@@ -80,8 +83,7 @@ import IndexMap from "./map/index.js";
 const router = useRouter();
 
 function goPartitionManage() {
-    console.log('goPartitionManage');
-    // router.push({ name: 'Monitor' });
+    router.push({ name: 'MapManage' });
 }
 
 const indexMap = new IndexMap();
@@ -198,14 +200,27 @@ onMounted(() => {
                             }
                         }
 
-                        .confirm-btn {
-                            text-align: center;
-                            background: #2199F8;
-                            color: #fff;
-                            border-radius: 5px;
-                            font-size: 16px;
-                            padding: 8px;
+                        .confirm-btn-wrap {
+                            display: flex;
+                            gap: 13px;
+                            div{
+                                flex: 1;
+                                text-align: center;
+                                border-radius: 5px;
+                                font-size: 16px;
+                                padding: 8px 0;
+                            }
+                            .cancel-btn {
+                                border: 1px solid #D6D6D6;
+                                color: #7F7F7F;
+                            }
+                            .confirm-btn {
+                                border: 1px solid #2199F8;
+                                background: #2199F8;
+                                color: #fff;
+                            }
                         }
+
                     }
                 }
             }

+ 124 - 0
src/views/old_mini/recordDetails/map/mapManage.js

@@ -0,0 +1,124 @@
+import * as KMap from "@/utils/ol-map/KMap";
+import * as util from "@/common/ol_common.js";
+import config from "@/api/config.js";
+import Style from "ol/style/Style";
+import Icon from "ol/style/Icon";
+import { Point } from 'ol/geom';
+import Feature from "ol/Feature";
+import { reactive } from "vue";
+import WKT from "ol/format/WKT.js";
+import * as proj from "ol/proj";
+import { getArea } from "ol/sphere.js";
+
+export let mapLocation = reactive({
+  data: null,
+});
+
+/**
+ * @description 地图层对象
+ */
+class MapManage {
+  constructor() {
+    let that = this;
+    let vectorStyle = new KMap.VectorStyle();
+    this.vectorStyle = vectorStyle;
+
+    // 位置图标
+    this.clickPointLayer = new KMap.VectorLayer("clickPointLayer", 9999, {
+      style: (f) => {
+        return new Style({
+          image: new Icon({
+            src: require("@/assets/img/home/garden-point.png"),
+            scale: 0.5,
+            anchor: [0.5, 0.5],
+          }),
+        });
+      },
+    });
+  }
+
+  initMap(location, target) {
+    let level = 16;
+    let coordinate = util.wktCastGeom(location).getFirstCoordinate();
+    this.kmap = new KMap.Map(target, level, coordinate[0], coordinate[1], null, 8, 22);
+    let xyz2 = config.base_img_url3 + "map/lby/{z}/{x}/{y}.png";
+    this.kmap.addXYZLayer(xyz2, { minZoom: 8, maxZoom: 22 }, 2);
+    this.kmap.addLayer(this.clickPointLayer.layer);
+    this.setMapPoint(coordinate);
+
+    this.kmap.initDraw(() => {});
+    this.kmap.startDraw();
+    this.kmap.modifyDraw();
+  }
+
+  setMapPosition(center) {
+    this.kmap.getView().animate({
+      center,
+      zoom: 16,
+      duration: 0,
+    });
+    this.setMapPoint(center)
+  }
+
+  setMapPoint(coordinate) {
+    this.clickPointLayer.source.clear()
+    let point = new Feature(new Point(coordinate))
+    this.clickPointLayer.addFeature(point)
+  }
+
+  clearLayer() {
+    if (this.kmap?.draw && typeof this.kmap.draw.abortDrawing === "function") {
+      this.kmap.draw.abortDrawing();
+    }
+    this.kmap.polygonLayer.source.clear();
+  }
+
+  /**
+   * 地图上全部已勾画地块:WKT 列表、每块亩数、合计亩数(亩换算与互动勾画页一致)
+   */
+  getAreaGeometry() {
+    const features = this.kmap.getLayerFeatures();
+    const format = new WKT();
+    const projection = this.kmap.map.getView().getProjection();
+    const geometryArr = [];
+    const parcels = [];
+    let totalMu = 0;
+    features.forEach((item) => {
+      const geometry = item.getGeometry();
+      if (!geometry) return;
+      const wkt = format.writeGeometry(geometry, {
+        dataProjection: "EPSG:4326",
+        featureProjection: projection,
+      });
+      geometryArr.push(wkt);
+      let geom = geometry.clone();
+      geom.transform(proj.get("EPSG:4326"), proj.get("EPSG:38572"));
+      let mu = getArea(geom);
+      mu = (mu + mu / 2) / 1000;
+      totalMu += mu;
+      parcels.push({ wkt, mianji: Number(mu.toFixed(2)) });
+    });
+    return {
+      geometryArr,
+      mianji: totalMu.toFixed(2),
+      parcels,
+    };
+  }
+
+  setAreaGeometry(geometryArr) {
+    this.clearLayer()
+    let that = this
+    geometryArr.map(item => {
+      that.kmap.setLayerWkt(item)
+    })
+    this.fitView()
+  }
+
+  fitView(){
+    let extent = this.kmap.polygonLayer.source.getExtent()
+    // 地图自适应到区域可视范围
+    this.kmap.getView().fit(extent, { duration: 500, padding: [100, 100, 100, 100] });
+  }
+}
+
+export default MapManage;

+ 118 - 0
src/views/old_mini/recordDetails/mapManage.vue

@@ -0,0 +1,118 @@
+<template>
+    <div class="map-manage">
+        <custom-header name="勾画区域" />
+        <div class="map-manage-content">
+            <locationSearch class="location-search" @change="handleLocationChange"></locationSearch>
+            <div class="map-container" ref="mapContainer"></div>
+            <div class="map-icon" @click="handleMapIconClick">
+                <img src="@/assets/img/map/map-icon.png" alt="">
+            </div>
+        </div>
+        <div class="custom-bottom-fixed-btns">
+            <div class="bottom-btn secondary-btn" @click="handleClearDraw">取消勾选</div>
+            <div class="bottom-btn primary-btn" @click="handleConfirmDraw">确认区域</div>
+        </div>
+    </div>
+</template>
+
+<script setup>
+import customHeader from "@/components/customHeader.vue";
+import locationSearch from "@/components/pageComponents/locationSearch.vue";
+import MapManage from "./map/mapManage.js";
+import { ref, onMounted } from "vue";
+import { ElMessageBox, ElMessage } from "element-plus";
+import { useRouter } from "vue-router";
+
+const router = useRouter();
+
+const mapManage = new MapManage();
+
+const mapContainer = ref(null);
+
+const handleLocationChange = (location) => {
+    // console.log(location);
+    mapManage.setMapPosition(location.coordinateArray);
+};
+
+const handleMapIconClick = () => {
+    mapManage.setMapPosition([113.6142086995688, 23.585836479509055]);
+};
+
+const handleClearDraw = () => {
+    ElMessageBox.confirm("确定清除地图上已勾画的所有地块?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+    })
+        .then(() => {
+            mapManage.clearLayer();
+        })
+        .catch(() => {});
+};
+
+const handleConfirmDraw = () => {
+    const payload = mapManage.getAreaGeometry();
+    if (!payload.geometryArr.length) {
+        ElMessage.warning("请先勾画地块");
+        return;
+    }
+    console.log("地块数据", payload);
+    console.log("WKT 列表", payload.geometryArr);
+    console.log("合计亩数", payload.mianji);
+    console.log("分块明细", payload.parcels);
+    router.back();
+};
+
+onMounted(() => {
+    mapManage.initMap("POINT(113.6142086995688 23.585836479509055)", mapContainer.value);
+}); 
+</script>
+
+<style scoped lang="scss">
+.map-manage {
+    width: 100%;
+    height: 100vh;
+    .map-manage-content {
+        height: calc(100% - 120px);
+        position: relative;
+        .location-search {
+            width: calc(100% - 24px);
+            position: absolute;
+            top: 12px;
+            left: 12px;
+            z-index: 2;
+        }
+        .map-container {
+            width: 100%;
+            height: 100%;
+        }
+        .map-icon {
+            position: absolute;
+            width: 35px;
+            height: 35px;
+            bottom: 32px;
+            right: 12px;
+            z-index: 2;
+            background: #fff;
+            border-radius: 8px;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            img {
+                width: 17px;
+                height: 19px;
+            }
+        }
+    }
+    .custom-bottom-fixed-btns {
+        justify-content: space-between;
+        .bottom-btn {
+            padding: 10px 20px;
+        }
+        .primary-btn {
+            background: #2199F8;
+            color: #fff;
+        }
+    }
+}
+</style>