Forráskód Böngészése

feat:修改农情互动列表页面

wangsisi 2 napja
szülő
commit
c19ab69825

+ 0 - 39
src/router/globalRoutes.js

@@ -62,13 +62,6 @@ export default [
         name: "Recognize",
         component: () => import("@/views/old_mini/home/subPages/recognize.vue"),
     },
-    // 农场管理
-    {
-        path: "/farm_manage",
-        name: "FarmManage",
-        meta: { showTabbar: true, keepAlive: true },
-        component: () => import("@/views/old_mini/farm_manage/index.vue"),
-    },
     // 农场管理详情
     {
         path: "/farm_manage_detail",
@@ -96,13 +89,6 @@ export default [
         meta: { keepAlive: true },
         component: () => import("@/views/old_mini/modify_work/detailWork.vue"),
     },
-    // 农资农服
-    {
-        path: "/agri_services",
-        name: "AgriServices",
-        meta: { showTabbar: true, keepAlive: true },
-        component: () => import("@/views/old_mini/agri_services/index.vue"),
-    },
     // 专家-农事方案
     {
         path: "/expert_prescription",
@@ -202,43 +188,18 @@ export default [
         meta: { keepAlive: true },
         component: () => import("@/views/old_mini/plan/index.vue"),
     },
-    // 农事管理
-    {
-        path: "/agri_services_manage",
-        name: "AgriServicesManage",
-        component: () => import("@/views/old_mini/agri_services/index.vue"),
-    },
     // 农场卡片
     {
         path: "/farm_card",
         name: "FarmCard",
         component: () => import("@/views/old_mini/plan/farmCard.vue"),
     },
-    // 相册识别
-    {
-        path: "/album_recognize",
-        name: "AlbumRecognize",
-        meta: { keepAlive: true },
-        component: () => import("@/views/old_mini/album_recognize/index.vue"),
-    },
     // 编辑农事方案
     {
         path: "/edit_plan",
         name: "EditPlan",
         component: () => import("@/views/old_mini/plan/editPlan.vue"),
     },
-    // 农场列表
-    {
-        path: "/farm_list",
-        name: "FarmList",
-        component: () => import("@/views/old_mini/user/subPages/farmList.vue"),
-    },
-    // 农事服务列表
-    {
-        path: "/service_list",
-        name: "ServiceList",
-        component: () => import("@/views/old_mini/user/subPages/serviceList.vue"),
-    },
     // 处方页面
     {
         path: "/prescription",

+ 0 - 618
src/views/old_mini/agri_services/components/servicesHall.vue

@@ -1,618 +0,0 @@
-<template>
-    <div class="services-hall" :style="{ height: `calc(100vh - ${tabBarHeight}px - 50px)` }">
-        <!-- 地图 -->
-        <div class="map-container" ref="mapContainer"></div>
-
-        <div class="search-wrap">
-            <location-search
-                class="search"
-                :userLocation="userLocation"
-                @change="handleLocationChange"
-            />
-        </div>
-
-        <floating-panel
-            class="floating-panel"
-            v-model:height="height"
-            :anchors="anchors"
-            :content-draggable="false"
-            @height-change="handleHeightChange"
-        >
-            <template #header>
-                <div class="header-bar"></div>
-                <div class="select-group">
-                    <el-select class="select-item" v-model="paramsPage.distance" placeholder="距离" @change="resetList">
-                        <el-option
-                            v-for="item in distanceOptions"
-                            :key="item.value"
-                            :label="item.label"
-                            :value="item.value"
-                        />
-                    </el-select>
-                    <el-select class="select-item" v-model="paramsPage.serviceType" placeholder="服务类型" @change="resetList">
-                        <el-option
-                            v-for="item in serviceTypeList"
-                            :key="item.id"
-                            :label="item.name"
-                            :value="item.id"
-                        />
-                    </el-select>
-                </div>
-            </template>
-            <div class="hall-content">
-                <List
-                    v-model:loading="loading"
-                    :finished="finished"
-                    finished-text="没有更多了"
-                    :immediate-check="false"
-                    @load="onLoad"
-                    class="van-list-container"
-                    :style="{ height: `${cardContentHeight}px` }"
-                    ref="cardContentRef"
-                >
-                    <div class="farm-list">
-                        <div class="task-item" v-for="item in agriculturalStoreList" :key="item.id" @click="handleDetail(item)">
-                        <div class="task-content">
-                            <div class="content-t">
-                                <img class="content-img" :src="item.bgUrl || require('@/assets/img/home/nz.png')" alt="" />
-                                <div class="content-info">
-                                    <div class="content-name">{{ item.storeName }} <span>{{ item.score || 5 }}分</span></div>
-                                    <div class="content-text">
-                                        <div class="text-item van-ellipsis">
-                                            <span>服务类型:</span>
-                                            <span class="text-value" v-for="(ele, index) in item.serviceTypeList" :key="ele"
-                                                >{{ ele }}{{ index !== item.serviceTypeList.length - 1 ? "、" : "" }}</span>
-                                        </div>
-                                        <div class="text-item van-ellipsis">
-                                            <span>服务品种:</span>
-                                            <span class="text-value" v-for="(ele, index) in item.speciesList" :key="ele"
-                                                >{{ ele }}{{ index !== item.speciesList.length - 1 ? "、" : "" }}</span>
-                                        </div>
-                                        <div class="text-item van-ellipsis">
-                                            <span>服务区域:</span>
-                                            <span class="text-value">{{ item.address||'无' }}</span>
-                                        </div>
-                                        <div class="text-item van-ellipsis">
-                                            <span>服务设备:</span>
-                                            <span class="text-value" v-for="(ele, index) in item.equipmentList" :key="ele"
-                                                >{{ ele
-                                                }}{{ index !== item.equipmentList.length - 1 ? "、" : "" }}</span>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                            <!-- <div class="content-b">
-                                <div class="hot-evaluate">
-                                    <span>热门评价</span>
-                                    <el-icon><CaretRight /></el-icon>
-                                </div>
-                                <div class="evaluate-content">
-                                    <span class="van-ellipsis evaluate-text">“ 很用心,服务的很到位,下次还... ”</span>
-                                    <span class="more">查看更多</span>
-                                </div>
-                            </div> -->
-                        </div>
-                        <div class="btn-group">
-                            <div class="btn-group-l">查看详情</div>
-                            <div class="btn-group-r">
-                                <!-- <div class="r-item">
-                                    <Icon name="phone-o" />
-                                    <span>电话联系</span>
-                                </div> -->
-                                <div class="r-item" @click.stop="handleOnlineChat(item)">
-                                    <!-- <Icon name="chat-o" /> -->
-                                    <span>线上沟通</span>
-                                </div>
-                            </div>
-                        </div>
-                        </div>
-                    </div>
-                </List>
-            </div>
-        </floating-panel>
-    </div>
-</template>
-
-<script setup>
-import { FloatingPanel, Icon, List } from "vant";
-import { computed, nextTick, onMounted, ref, onActivated } from "vue";
-import { useStore } from "vuex";
-import IndexMap from "../map/index";
-import LocationSearch from "@/components/pageComponents/LocationSearch.vue";
-import { Point } from "ol/geom";
-import Feature from "ol/Feature";
-import * as util from "@/common/ol_common.js";
-import { useRouter } from "vue-router";
-const router = useRouter();
-const props = defineProps({
-    isCapital: {
-        type: Boolean,
-        default: false,
-    },
-    active: {
-        type: Number,
-        default: 0,
-    },
-});
-
-const store = useStore();
-const tabBarHeight = computed(() => store.state.home.tabBarHeight);
-
-const anchors = ref([310 + tabBarHeight.value, Math.round(1 * window.innerHeight) - 44]);
-const height = ref(anchors.value[0]);
-
-const indexMap = new IndexMap();
-const mapContainer = ref(null);
-const mapPoint = ref(null);
-const userLocation = localStorage.getItem("MINI_USER_LOCATION");
-
-onMounted(() => {
-    mapPoint.value = store.state.home.miniUserLocationPoint;
-    nextTick(() => {
-        indexMap.initMap(mapPoint.value, mapContainer.value, props.isCapital);
-        // 设置服务大厅图层点击事件回调
-        indexMap.setGardenHallClickCallback((featureData,) => {
-            router.push(`/expert_homepage?isStore=true&id=${featureData.id}`);
-        });
-        
-        // 添加初始位置图标
-        if (indexMap.clickPointLayer && mapPoint.value) {
-            const initialPoint = util.wktCastGeom(mapPoint.value).getFirstCoordinate();
-            const point = new Feature(new Point(initialPoint));
-            indexMap.clickPointLayer.addFeature(point);
-        }
-    });
-    // 手动触发首次加载
-    getStoreList(false);
-    initMap();
-});
-
-const initMap = async () => {
-    const params = {
-        limit: 999,
-        page: 1,
-        type: 1,
-    };
-    const res = await VE_API.farm.getStoreList(params);
-    if(res.data.length > 0){
-        indexMap.initDataHall(res.data);
-    }
-};
-
-onActivated(() => {
-    if(props.active == 1){
-        resetList();
-        initMap();
-    }
-});
-
-const handleDetail = (item) => {
-    router.push(`/expert_homepage?isStore=true&id=${item.id}`);
-};
-
-const paramsPage = ref({
-    serviceType: "全部类型",
-    distance:"不限范围"
-})
-
-const agriculturalStoreList = ref([]);
-const loading = ref(false);
-const finished = ref(false);
-const page = ref(1);
-const limit = ref(10); // 每页加载数量
-const resetTimer = ref(null); // 防抖定时器
-const currentRequestKey = ref(null); // 当前请求的唯一标识
-
-// 生成请求的唯一标识
-const generateRequestKey = (params) => {
-    return JSON.stringify({
-        point: params.point,
-        page: params.page,
-        limit: params.limit,
-        type: params.type,
-        serviceType: params.serviceType || '',
-        distance: params.distance || '',
-    });
-};
-
-// 加载列表数据
-const getStoreList = async (isLoadMore = false) => {
-    const params = {
-        point: mapPoint.value,
-        page: page.value,
-        limit: limit.value,
-        type: 1,
-        ...paramsPage.value,
-    };
-    
-    // 如果服务类型为空字符串,不传该参数
-    if (params.serviceType === "全部类型") {
-        delete params.serviceType;
-    }
-    if (params.distance === "不限范围") {
-        delete params.distance;
-    }
-    
-    // 生成请求的唯一标识
-    const requestKey = generateRequestKey(params);
-    // 如果正在加载相同的请求,直接返回
-    if (loading.value && currentRequestKey.value === requestKey) {
-        return;
-    }
-    
-    // 如果正在加载,直接返回(防止不同参数的请求重叠)
-    if (loading.value) {
-        return;
-    }
-    // 设置当前请求标识和加载状态
-    currentRequestKey.value = requestKey;
-    loading.value = true;
-    
-    try {
-        const res = await VE_API.farm.getStoreList(params);
-        // 获取总数和当前页数据
-        const totalCount = res.count || 0;
-        const currentData = res.data || [];
-        
-        if (currentData.length > 0) {
-            const newList = currentData.map((item) => {
-                return {
-                    ...item,
-                    speciesList: JSON.parse(item.serviceSpecies || "[\"--\"]"),
-                    equipmentList: JSON.parse(item.serviceEquipment || "[\"--\"]"),
-                    serviceTypeList: JSON.parse(item.serviceType || "[\"--\"]"),
-                };
-            });
-            
-            if (isLoadMore) {
-                // 加载更多时追加数据
-                agriculturalStoreList.value = [...agriculturalStoreList.value, ...newList];
-            } else {
-                // 首次加载或刷新时替换数据
-                agriculturalStoreList.value = newList;
-            }
-            
-            // 使用 count 判断是否还有更多数据
-            // 如果当前已加载的数据量 >= 总数,说明没有更多数据了
-            const loadedCount = agriculturalStoreList.value.length;
-            if (totalCount > 0 && loadedCount >= totalCount) {
-                finished.value = true;
-            } else if (totalCount === 0) {
-                // 如果没有总数信息,使用原来的判断方式
-                if (currentData.length < limit.value) {
-                    finished.value = true;
-                }
-            }
-            
-        } else {
-            finished.value = true;
-        }
-    } catch (error) {
-        console.error('获取列表失败:', error);
-        finished.value = true;
-    } finally {
-        // 加载完成后,设置 loading = false 告诉 List 组件加载完成
-        loading.value = false;
-        // 清除当前请求标识
-        currentRequestKey.value = null;
-    }
-};
-
-// 滚动加载更多
-const onLoad = async () => {
-    if (finished.value) return;
-    const isLoadMore = page.value > 1;
-    loading.value = false;
-    await getStoreList(isLoadMore);
-    // 加载完成后再增加页码
-    if (!finished.value) {
-        page.value++;
-    }
-};
-
-// 重置列表(筛选条件变化时调用)
-const resetList = () => {
-    // 清除之前的定时器
-    if (resetTimer.value) {
-        clearTimeout(resetTimer.value);
-        resetTimer.value = null;
-    }
-    
-    // 使用防抖,延迟执行,避免快速连续触发
-    resetTimer.value = setTimeout(() => {
-        // 清除当前请求标识,确保可以重新请求
-        currentRequestKey.value = null;
-        page.value = 1;
-        finished.value = false;
-        agriculturalStoreList.value = [];
-        getStoreList(false);
-        resetTimer.value = null;
-    }, 100);
-};
-
-// 更新地图位置和图标
-const updateMapLocation = (coordinateArray) => {
-    if (!indexMap || !indexMap.kmap) return;
-    
-    // 更新地图位置
-    indexMap.kmap.getView().animate({
-        center: coordinateArray,
-        zoom: 16,
-        duration: 500,
-    });
-    
-    // 更新点击点图标
-    if (indexMap.clickPointLayer) {
-        indexMap.clickPointLayer.source.clear();
-        const point = new Feature(new Point(coordinateArray));
-        indexMap.clickPointLayer.addFeature(point);
-    }
-};
-
-// 处理位置搜索变化
-function handleLocationChange(data) {
-    if (data && data.coordinateArray) {
-        // 搜索到新位置
-        mapPoint.value = data.point;
-        paramsPage.value.distance = "5000";
-        updateMapLocation(data.coordinateArray);
-        resetList();
-    } else {
-        // 重置为初始位置
-        mapPoint.value = store.state.home.miniUserLocationPoint;
-        paramsPage.value.distance = "不限范围";
-        
-        // 获取初始位置的坐标
-        const initialPoint = util.wktCastGeom(mapPoint.value).getFirstCoordinate();
-        updateMapLocation(initialPoint);
-        
-        resetList();
-        initMap();
-    }
-}
-
-const cardContentHeight = ref(245);
-
-const distanceOptions = [
-    { value: "不限范围", label: "不限范围" },
-    { value: "5000", label: "5km" },
-    { value: "3000", label: "3km" },
-    { value: "1000", label: "1km" },
-];
-const serviceTypeList = ref([
-    {id: "全部类型", name: "全部类型"},
-    {id: "嫁接", name: "嫁接"},
-    {id: "修剪", name: "修剪"},
-    {id: "施肥打药", name: "施肥打药"},
-]);
-
-const cardContentRef = ref(null);
-const handleHeightChange = ({ height }) => {
-    if (height === anchors.value[0]) {
-        cardContentHeight.value = 245;
-        if (cardContentRef.value && cardContentRef.value.$el) {
-            cardContentRef.value.$el.scrollTo({ top: 0, behavior: "smooth" });
-        }
-    } else if (height === anchors.value[1]) {
-        cardContentHeight.value = Math.round(1 * window.innerHeight) - (tabBarHeight.value - 40) - 170;
-    }
-};
-
-const handleOnlineChat = ({miniUserIds}) => {
-    router.push(`/chat_frame?userId=${miniUserIds[0]}`);
-};
-
-defineExpose({
-    getStoreList: resetList,
-});
-
-</script>
-
-<style lang="scss" scoped>
-.services-hall {
-    width: 100%;
-    height: 100%;
-    position: relative;
-    overflow: hidden;
-    .map-container {
-        width: 100%;
-        height: calc(100% - 290px);
-    }
-
-    .search {
-        position: absolute;
-        top: 8px;
-        width: calc(100% - 24px);
-        left: 12px;
-        ::v-deep {
-            .el-input__wrapper {
-                box-shadow: none;
-                border-radius: 20px;
-            }
-        }
-    }
-
-    .expand-btn-wrap {
-        position: absolute;
-        bottom: 12px;
-        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;
-        }
-    }
-
-    .hall-content {
-        height: 100%;
-        position: relative;
-        .van-list-container {
-            overflow-y: auto;
-        }
-        .farm-list {
-            padding: 0 12px;
-            .task-item {
-                border-top: 1px solid rgba(0, 0, 0, 0.1);
-                padding-top: 10px;
-                .task-content {
-                    .content-t {
-                        display: flex;
-                        gap: 8px;
-                        .content-img {
-                            width: 90px;
-                            height: 90px;
-                            border-radius: 8px;
-                        }
-                        .content-info {
-                            width: calc(100% - 98px);
-                            .content-name {
-                                font-size: 16px;
-                                font-weight: 500;
-                                span {
-                                    color: #ff953d;
-                                }
-                            }
-                            .content-text {
-                                font-size: 12px;
-                                color: #bbbbbb;
-                                .text-item {
-                                    width: calc(100% - 10px);
-                                    .text-value {
-                                        color: #666666;
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    .content-b {
-                        margin: 10px 0;
-                        font-size: 12px;
-                        display: flex;
-                        font-weight: 500;
-                        .hot-evaluate {
-                            display: flex;
-                            align-items: center;
-                            color: #574300;
-                            padding: 5px 8px;
-                            border-radius: 6px;
-                            background: rgba(243, 193, 29, 0.1);
-                            margin-right: 8px;
-                        }
-                        .evaluate-content {
-                            width: calc(100% - 89px);
-                            display: flex;
-                            align-items: center;
-                            .evaluate-text {
-                                width: calc(100% - 62px);
-                            }
-                            .more {
-                                color: #b6b6b6;
-                                font-weight: 400;
-                                margin-left: 10px;
-                            }
-                        }
-                    }
-                }
-                .btn-group {
-                    display: flex;
-                    justify-content: space-between;
-                    align-items: center;
-                    font-size: 12px;
-                    margin-top: 10px;
-                    .btn-group-r {
-                        display: flex;
-                        align-items: center;
-                        gap: 10px;
-                        .r-item {
-                            border-radius: 25px;
-                            padding: 7px 12px;
-                            border: 1px solid #8b8b8b;
-                            color: #8b8b8b;
-
-                            display: flex;
-                            align-items: center;
-                            gap: 4px;
-                        }
-                    }
-                }
-            }
-            .task-item + .task-item {
-                margin-top: 10px;
-            }
-        }
-    }
-
-    .select-group {
-        display: flex;
-        padding: 0 12px;
-        .select-item {
-            width: 100%;
-            ::v-deep {
-                .el-select__wrapper {
-                    text-align: center;
-                    gap: 2px;
-                    box-shadow: none;
-                    justify-content: center;
-                    background: none;
-                }
-                .el-select__selection {
-                    flex: none;
-                    width: fit-content;
-                }
-                .el-select__placeholder {
-                    position: static;
-                    transform: none;
-                    width: fit-content;
-                    color: rgba(0, 0, 0, 0.2);
-                }
-                .el-select__caret {
-                    color: rgba(0, 0, 0, 0.2);
-                }
-            }
-        }
-    }
-
-    .header-bar {
-        width: 20px;
-        height: 3px;
-        margin: 10px auto 10px auto;
-        border-radius: 4px;
-        background: #969799;
-    }
-}
-
-.floating-panel {
-    width: 100%;
-    background: #ffffff;
-    ::v-deep {
-        .van-floating-panel__content {
-            background: transparent;
-            overflow: hidden;
-        }
-        .van-floating-panel__header {
-            position: relative;
-            &::after {
-                content: "";
-                height: 100px;
-                width: 100%;
-                position: absolute;
-                top: 0px;
-                left: 0;
-            }
-        }
-    }
-}
-</style>

+ 0 - 75
src/views/old_mini/agri_services/index.vue

@@ -1,75 +0,0 @@
-<template>
-    <div class="agri-services" :style="{ height: type !== 'manage' ? `calc(100vh - ${tabBarHeight}px - 50px)` : '100vh' }">
-        <custom-header name="农事管理" v-if="type === 'manage'"></custom-header>
-        <tabs v-model:active="active" class="tabs" v-if="type !== 'manage'" @change="handleTabChange">
-            <tab title="农事管理">
-                <farm-dynamics ref="farmDynamicsRef" :active="active" />
-            </tab>
-            <tab title="服务大厅">
-                <services-hall ref="servicesHallRef" :active="active" />
-            </tab>
-        </tabs>
-        <!-- <div v-else class="farm-dynamics-container">
-            <farm-dynamics ref="farmDynamicsRef" :type="type" />
-        </div> -->
-    </div>
-</template>
-
-<script setup>
-import { ref, computed } from "vue";
-import { useRoute } from "vue-router";
-import { useStore } from "vuex";
-import { Tab, Tabs } from "vant";
-import servicesHall from "./components/servicesHall.vue";
-// import farmDynamics from "./components/farmDynamics.vue";
-import customHeader from "@/components/customHeader.vue";
-
-const route = useRoute();
-const store = useStore();
-const tabBarHeight = computed(() => store.state.home.tabBarHeight);
-const active = ref(route.query.active ? 1 : 0);
-
-const type = ref(route.query.type);
-
-const servicesHallRef = ref(null);
-const farmDynamicsRef = ref(null);
-const handleTabChange = (index) => {
-    if (index === 1) {
-        servicesHallRef.value && servicesHallRef.value.getStoreList();
-    }else{
-        farmDynamicsRef.value && farmDynamicsRef.value.getContentData();
-    }
-}
-
-</script>
-<style lang="scss" scoped>
-.agri-services {
-    width: 100%;
-    height: 100vh;
-    .farm-dynamics-container {
-        ::v-deep{
-            .task-content{
-                height: calc(100% - 80px);
-            }
-        }
-    }
-    .tabs {
-        ::v-deep {
-            .van-tabs__wrap {
-                margin-bottom: 8px;
-            }
-            .van-tabs__line {
-                width: 24px;
-                height: 4px;
-            }
-            .van-tab {
-                width: 100px;
-                flex: none;
-            }
-            .van-tabs__nav {
-                justify-content: center;
-            }
-        }
-    }
-}
-</style>

+ 0 - 159
src/views/old_mini/agri_services/map/index.js

@@ -1,159 +0,0 @@
-import * as KMap from "@/utils/ol-map/KMap";
-import * as util from "@/common/ol_common.js";
-import config from "@/api/config.js";
-import { Point } from 'ol/geom';
-import Feature from "ol/Feature";
-import Style from "ol/style/Style";
-import Photo from "ol-ext/style/Photo";
-import { Fill, Text, Icon, Stroke } from "ol/style.js";
-import { newPoint } from "@/utils/map";
-import VectorLayer from "ol/layer/Vector";
-
-/**
- * @description 地图层对象
- */
-class IndexMap {
-  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, 1],
-          }),
-        });
-      },
-    });
-
-    this.gardenHallLayer = new KMap.VectorLayer("gardenHallLayer", 99, {
-      minZoom: 6,
-      maxZoom: 22,
-      style: (feature) => {
-        let style2 = new Style({
-          image: new Icon({
-            src: require("@/assets/img/home/farm-point.png"),
-            scale: 0.5,
-            anchor: [0.5, 1],
-            displacement: [0, -36],
-          }),
-        });
-        let style3 = new Style({
-          text: new Text({
-            text: feature.get('shortName') || '--',
-            offsetX: 0,
-            offsetY: -30,
-            font: "bold 12px sans-serif",
-            fill: new Fill({ color: "#2199F8" }), // 字体颜色
-          }),
-        });
-
-        const canvas = document.createElement('canvas');
-        const ctx = canvas.getContext('2d');
-
-        // 矩形的参数
-        const x = 150; // 矩形中心点的x坐标
-        const y = 100; // 矩形中心点的y坐标
-        const width = 58; // 矩形的宽度
-        const height = 20; // 矩形的高度
-        const cornerRadius = 4; // 圆角半径
-
-        // 创建渐变
-        const gradient = ctx.createLinearGradient(x - width / 2, y, x + width / 2, y);
-        gradient.addColorStop(0, '#fff');   // 渐变起始颜色
-        gradient.addColorStop(1, '#fff');  // 渐变结束颜色
-
-        // 绘制圆角矩形
-        ctx.beginPath();
-        ctx.moveTo(x - width / 2 + cornerRadius, y - height / 2); // 左上角
-        ctx.lineTo(x + width / 2 - cornerRadius, y - height / 2); // 上边
-        ctx.arc(x + width / 2 - cornerRadius, y - height / 2 + cornerRadius, cornerRadius, -Math.PI / 2, 0); // 右上角
-        ctx.lineTo(x + width / 2, y + height / 2 - cornerRadius); // 右边
-        ctx.arc(x + width / 2 - cornerRadius, y + height / 2 - cornerRadius, cornerRadius, 0, Math.PI / 2); // 右下角
-        ctx.lineTo(x - width / 2 + cornerRadius, y + height / 2); // 下边
-        ctx.arc(x - width / 2 + cornerRadius, y + height / 2 - cornerRadius, cornerRadius, Math.PI / 2, Math.PI); // 左下角
-        ctx.lineTo(x - width / 2, y - height / 2 + cornerRadius); // 左边
-        ctx.arc(x - width / 2 + cornerRadius, y - height / 2 + cornerRadius, cornerRadius, Math.PI, -Math.PI / 2); // 左上角
-        ctx.closePath();
-
-        // 填充颜色
-        ctx.fillStyle = gradient;
-        ctx.fill();
-        const newStyle = new Style({
-          image: new Icon({
-            src: canvas.toDataURL(),
-            displacement: [0, 56],
-          }),
-        });
-
-
-        return [style2, newStyle, style3];
-      },
-    });
-  }
-
-  initMap(location, target, isCapital) {
-    let level = 16;
-    let coordinate = util.wktCastGeom(location).getFirstCoordinate();
-    this.kmap = new KMap.Map(target, level, coordinate[0], coordinate[1], null, 6, 22, isCapital ? "img" : "vec");
-    this.kmap.addLayer(this.clickPointLayer.layer);
-    this.kmap.addLayer(this.gardenHallLayer.layer);
-    if (isCapital) {
-      this.initData()
-      const point = ["113.61652616170711,23.58399613872042", "113.61767554789421, 23.590079887444034", "113.62757101477101, 23.590796948574365", "113.62240816252164, 23.59499176519138"]
-    } else {
-      let point = new Feature(new Point(coordinate))
-      this.clickPointLayer.addFeature(point)
-    }
-    
-    // 添加点击事件
-    this.addGardenHallClick();
-  }
-
-  // 添加服务大厅图层点击事件
-  addGardenHallClick() {
-    let that = this;
-    this.kmap.on("singleclick", (evt) => {
-      that.kmap.map.forEachFeatureAtPixel(evt.pixel, function (feature, layer) {
-        if (layer instanceof VectorLayer && layer.get("name") === "gardenHallLayer") {
-          // 获取点击的要素数据
-          const featureData = feature.getProperties();
-          // 触发点击事件回调
-          if (that.onGardenHallClick) {
-            that.onGardenHallClick(featureData, evt);
-          }
-          return feature;
-        }
-      });
-    });
-  }
-
-  // 设置点击事件回调
-  setGardenHallClickCallback(callback) {
-    this.onGardenHallClick = callback;
-  }
-
-  initDataHall(taskList) {
-    this.gardenHallLayer.source.clear();
-    if (taskList.length > 0) {  // 如果任务列表不为空,则添加任务点
-      for (let item of taskList) {
-        try{
-          this.gardenHallLayer.source.addFeature(newPoint(item, "point", "hallGarden"))
-        }catch(error){
-          console.log('error');
-        }
-      }
-      this.kmap.getView().fit(this.gardenHallLayer.source.getExtent(), { padding: [60, 40, 30, 40] });
-      const finalZoom = this.kmap.getView().getZoom();
-      if (finalZoom > 18) {
-        this.kmap.getView().setZoom(18);
-      }
-    }
-  }
-}
-
-export default IndexMap;

+ 0 - 464
src/views/old_mini/album_recognize/index-fn.vue

@@ -1,464 +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">
-                <Swipe class="card-swipe-wrapper" :show-indicators="imgKey && imgKey.length > 1" :loop="false">
-                    <SwipeItem v-for="(img, index) in imgKey" :key="index">
-                        <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="displayUrls[index]" />
-                            <div class="card-content" v-if="!isRecognize && resultsByIndex[index]?.status === 'ok'">
-                                <div class="title-ques">
-                                    <div class="ques-text">病虫名称:{{ resultsByIndex[index]?.data?.name }}</div>
-                                </div>
-                                <div class="dialog-famous">管理方法:</div>
-                                <div class="dialog-answer">
-                                    {{ resultsByIndex[index]?.data?.cure }}
-                                </div>
-                                <div v-if="resultsByIndex[index]?.data?.info" class="advice-wrap">
-                                    <div class="item-tag">基本信息</div>
-                                    <div v-html="resultsByIndex[index]?.data?.info"></div>
-                                </div>
-                                <div class="famous-info" @click="toDetail(index)">
-                                    <img src="@/assets/img/home/link-icon.png" />
-                                    <span>点击查看农事详情</span>
-                                </div>
-                            </div>
-                            <div class="card-content no-data" v-if="!isRecognize && resultsByIndex[index]?.status === 'nodata'">
-                                <img src="@/assets/img/home/good-fill.png" />
-                                长势良好,并未发现病虫害
-                            </div>
-                        </div>
-                    </SwipeItem>
-                </Swipe>
-            </div>
-            <div class="btn-wrap" v-if="!isRecognize">
-                <div class="btn primary" @click="goBack">咨询专家</div>
-            </div>
-        </div>
-    </div>
-    <!-- 农事信息弹窗 -->
-    <detail-dialog ref="detailDialogRef" :show-success-only="true"></detail-dialog>
-    <!-- 上传弹窗组件 -->
-    <active-upload-popup></active-upload-popup>
-</template>
-
-<script setup>
-import { onMounted, ref } from "vue";
-import { Swipe, SwipeItem } from "vant";
-import { useRouter, useRoute } from "vue-router";
-import { base_img_url2 } from "@/api/config.js";
-import { ElMessage } from "element-plus";
-import MqttClient from "@/mqtt/MqttClient";
-import detailDialog from "@/components/detailDialog.vue";
-import activeUploadPopup from "@/components/popup/activeUploadPopup.vue";
-
-let resize = "?x-oss-process=image/resize,w_300";
-const route = useRoute();
-const json = JSON.parse(route.query.json || "{}");
-// const json = JSON.parse(
-//     `{"imgKey":["birdseye-look-mini/766/1761968109259.png","birdseye-look-mini/766/1761968110225.png"],"farmId":766,"id":"65","imageIds":["772470289337421824","772470289337421825"],"token":"bcc0e12d-bff6-4f1f-8edc-2ab80b19af41"}`)
-const imgKey = json.imgKey;
-const farmId = json.farmId;
-const imageIds = json.imageIds || [];
-
-const isRecognize = ref(true);
-const noData = ref(false);
-const resultsByIndex = ref({});
- 
-// 存储每张图片的 farmWorkLibId,用于后续接口请求
-const farmWorkLibIdsByIndex = ref({});
-
-// 预置显示地址:默认使用传入的 cloudFilename
-const displayUrls = ref(imgKey.map((p) => base_img_url2 + p + resize));
-const detailDialogRef = ref(null);
-onMounted(() => {
-    const mqttClient = new MqttClient(["farm/pest_recognition/task/" + farmId], mqttListener);
-    mqttClient.connect();
-});
-
-const mqttListener = (topic, message) => {
-    let resData = JSON.parse(message);
-    if (json.id == resData.taskId) {
-        if (resData.status === 1) {
-            const resultMap = resData.result || {};
-            // 初始化每张图片的结果状态
-            const fetchPromises = [];
-            imageIds.forEach((imgId, index) => {
-                const resultData = resultMap[imgId];
-                // 新数据结构:可能是 null 或数组,数组中的对象包含 farmWorkLibId 和 pestDiseaseId
-                if (Array.isArray(resultData) && resultData.length > 0) {
-                    // 提取 pestDiseaseId 和 farmWorkLibId
-                    const pestDiseaseIds = [];
-                    const farmWorkLibIdList = [];
-                    
-                    resultData.forEach((item) => {
-                        if (item && item.pestDiseaseId) {
-                            pestDiseaseIds.push(item.pestDiseaseId);
-                        }
-                        if (item && item.farmWorkLibId) {
-                            farmWorkLibIdList.push(item.farmWorkLibId);
-                        }
-                    });
-                    
-                    // 按索引保存 farmWorkLibId 数组
-                    if (farmWorkLibIdList.length > 0) {
-                        farmWorkLibIdsByIndex.value[index] = farmWorkLibIdList;
-                    }
-                    
-                    // 使用 pestDiseaseId 调用病虫详情接口
-                    if (pestDiseaseIds.length > 0) {
-                        const p = VE_API.home.fetchDiseaseDetail(pestDiseaseIds).then(({ data, code: respCode }) => {
-                            if (respCode === 0) {
-                                const detail = Array.isArray(data) ? data[0] : data;
-                                resultsByIndex.value = {
-                                    ...resultsByIndex.value,
-                                    [index]: { status: 'ok', data: detail }
-                                };
-                            } else {
-                                resultsByIndex.value = {
-                                    ...resultsByIndex.value,
-                                    [index]: { status: 'nodata' }
-                                };
-                            }
-                        }).catch(() => {
-                            resultsByIndex.value = {
-                                ...resultsByIndex.value,
-                                [index]: { status: 'nodata' }
-                            };
-                        });
-                        fetchPromises.push(p);
-                    } else {
-                        // 没有 pestDiseaseId,但有 farmWorkLibId,可能只有农事信息
-                        resultsByIndex.value = {
-                            ...resultsByIndex.value,
-                            [index]: { status: 'nodata' }
-                        };
-                    }
-                } else {
-                    // 结果为 null 或空数组
-                    resultsByIndex.value = {
-                        ...resultsByIndex.value,
-                        [index]: { status: 'nodata' }
-                    };
-                }
-            });
-
-            VE_API.farm.listByIds(resData.imageIds).then(({ data, code: respCode }) => {
-                if (respCode === 0) {
-                    // 按 imageIds 顺序,为每张图优先选择 cloudResFilename,否则 cloudFilename
-                    const idToRecord = {};
-                    (data || []).forEach((item) => {
-                        if (item && item.id) idToRecord[item.id] = item;
-                    });
-                    const urls = [...displayUrls.value];
-                    imageIds.forEach((id, idx) => {
-                        const rec = idToRecord[id];
-                        if (rec) {
-                            const path = (rec.cloudResFilename && rec.cloudResFilename.trim() !== '')
-                                ? rec.cloudResFilename
-                                : (rec.cloudFilename || imgKey[idx]);
-                            urls[idx] = base_img_url2 + path + resize;
-                        }
-                    });
-                    displayUrls.value = urls;
-                }
-            });
-
-            if (fetchPromises.length > 0) {
-                Promise.allSettled(fetchPromises).finally(() => {
-                    isRecognize.value = false;
-                });
-            } else {
-                // 全部无病虫
-                noData.value = true;
-                isRecognize.value = false;
-            }
-        }
-    }
-};
-
-const router = useRouter();
-const goBack = () => {
-    // router.go(-1);
-    router.push(`/home`);
-};
-
-const toDetail = (index) => {
-    // 根据当前图片的索引获取对应的 farmWorkLibId
-    const farmWorkLibIdList = farmWorkLibIdsByIndex.value[index];
-    const farmWorkLibId = Array.isArray(farmWorkLibIdList) && farmWorkLibIdList.length > 0 
-        ? farmWorkLibIdList[0] 
-        : null;
-    
-    // 调用子组件方法,传递 farmWorkLibId 参数
-    if (farmWorkLibId) {
-        detailDialogRef.value.showDialog(farmWorkLibId);
-    } else {
-        ElMessage.warning('暂无农事详情');
-    }
-};
-</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-swipe-wrapper {
-                width: 100%;
-                height: 100%;
-                border-radius: 24px 0 36px 4px;
-                overflow: hidden;
-                :deep(.van-swipe-item) {
-                    width: 100%;
-                    height: 100%;
-                    display: flex;
-                    flex-direction: column;
-                }
-                :deep(.van-swipe__indicators) {
-                    bottom: 10px;
-                }
-                :deep(.van-swipe__indicator) {
-                    width: 6px;
-                    height: 6px;
-                    background-color: #cccccc;
-                    border-radius: 50%;
-                    margin: 0 4px;
-                    transition: all 0.3s;
-                }
-                :deep(.van-swipe__indicator--active) {
-                    width: 20px;
-                    height: 6px;
-                    background-color: #2199f8;
-                    border-radius: 3px;
-                }
-            }
-            .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;
-                    z-index: 10;
-                }
-                .card-bg {
-                    border-radius: 24px 0 36px 4px;
-                    width: 100%;
-                    height: 100%;
-                    object-fit: cover;
-                }
-                .no-data {
-                    color: #fff;
-                    text-align: center;
-                    display: flex;
-                    align-items: center;
-                    justify-content: center;
-                    img {
-                        width: 17px;
-                        margin-right: 4px;
-                    }
-                }
-                .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;
-                    &.no-data {
-                        padding: 16px 0 20px 0;
-                    }
-                    .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;
-                    }
-                    .advice-wrap {
-                        padding-top: 12px;
-                    }
-                    .item-tag {
-                        width: fit-content;
-                        padding: 4px 10px;
-                        border-radius: 20px;
-                        color: #ffd786;
-                        background: rgba(255, 215, 134, 0.2);
-                        margin-bottom: 6px;
-                    }
-                    .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;
-                        img {
-                            width: 16px;
-                            height: 16px;
-                            margin-right: 4px;
-                        }
-                    }
-                }
-            }
-        }
-        .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: 4px;
-                &.primary {
-                    flex: 1;
-                    color: #fff;
-                    background: #2199f8;
-                }
-                &.share {
-                    background: #fff;
-                    width: 20%;
-                    min-width: 80px;
-                    text-align: center;
-                    border: 1px solid #8e8e8e;
-                }
-            }
-            .btn + .btn {
-                margin-left: 15px;
-            }
-        }
-        .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;
-            }
-        }
-    }
-}
-</style>

+ 0 - 384
src/views/old_mini/album_recognize/index.vue

@@ -1,384 +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">
-                <Swipe class="card-swipe-wrapper" :show-indicators="imgKey && imgKey.length > 1" :loop="false">
-                    <SwipeItem v-for="(img, index) in imgKey" :key="index">
-                        <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="displayUrls[index]" />
-                            <div class="card-content" v-if="!isRecognize">
-                                <div class="title-ques">
-                                    <div class="ques-text">病虫名称:{{ recognizeResult[index]?.diseaseName }}</div>
-                                </div>
-                                <div class="dialog-famous">管理方法:</div>
-                                <div class="dialog-answer">
-                                    {{ recognizeResult[index]?.managementMethod }}
-                                </div>
-                                <div v-if="recognizeResult[index]?.basicInfo" class="advice-wrap">
-                                    <div class="item-tag">基本信息</div>
-                                    <div v-html="recognizeResult[index]?.basicInfo"></div>
-                                </div>
-                                <!-- <div class="famous-info" @click="toDetail(index)">
-                                    <img src="@/assets/img/home/link-icon.png" />
-                                    <span>点击查看农事详情</span>
-                                </div> -->
-                            </div>
-                            <!-- <div class="card-content no-data" v-if="!isRecognize && recognizeResult[index]?.status === 'nodata'">
-                                <img src="@/assets/img/home/good-fill.png" />
-                                长势良好,并未发现病虫害
-                            </div> -->
-                        </div>
-                    </SwipeItem>
-                </Swipe>
-            </div>
-            <!-- <div class="btn-wrap" v-if="!isRecognize">
-                <div class="btn share" @click="toConsult">咨询专家</div>
-            </div> -->
-        </div>
-    </div>
-    <!-- 农事信息弹窗 -->
-    <detail-dialog ref="detailDialogRef" :show-success-only="true"></detail-dialog>
-    <!-- 上传弹窗组件 -->
-    <active-upload-popup></active-upload-popup>
-</template>
-
-<script setup>
-import { onMounted, ref } from "vue";
-import { Swipe, SwipeItem } from "vant";
-import { useRouter, useRoute } from "vue-router";
-import { base_img_url2 } from "@/api/config.js";
-import { ElMessage } from "element-plus";
-import detailDialog from "@/components/detailDialog.vue";
-import activeUploadPopup from "@/components/popup/activeUploadPopup.vue";
-import { toRaw } from 'vue'
-
-let resize = "?x-oss-process=image/resize,w_300";
-const route = useRoute();
-const miniJson = toRaw(route.query.miniJson);
-const json = JSON.parse(miniJson || "{}");
-// const json = JSON.parse(
-//     `{"imgKey":["birdseye-look-mini/766/1761968109259.png","birdseye-look-mini/766/1761968110225.png"],"farmId":766,"id":"65","imageIds":["772470289337421824","772470289337421825"],"token":"bcc0e12d-bff6-4f1f-8edc-2ab80b19af41"}`)
-const imgKey = json.imgKey?.split(",") || [];
-
-const isRecognize = ref(true);
- 
-// 存储每张图片的 farmWorkLibId,用于后续接口请求
-const farmWorkLibIdsByIndex = ref({});
-
-// 预置显示地址:默认使用传入的 cloudFilename
-const displayUrls = imgKey.map((p) => base_img_url2 + p + resize);
-const detailDialogRef = ref(null);
-
-const recognizeResult = ref([]);
-onMounted(() => {
-    VE_API.ali.AIRecognize({
-        imageUrls: displayUrls,
-    }).then(({data}) => {
-        recognizeResult.value = data;
-        isRecognize.value = false;
-    });
-});
-
-
-const router = useRouter();
-const goBack = () => {
-    // router.go(-1);
-    router.push(`/home`);
-};
-
-const toDetail = (index) => {
-    // 根据当前图片的索引获取对应的 farmWorkLibId
-    const farmWorkLibIdList = farmWorkLibIdsByIndex.value[index];
-    const farmWorkLibId = Array.isArray(farmWorkLibIdList) && farmWorkLibIdList.length > 0 
-        ? farmWorkLibIdList[0] 
-        : null;
-    
-    // 调用子组件方法,传递 farmWorkLibId 参数
-    if (farmWorkLibId) {
-        detailDialogRef.value.showDialog(farmWorkLibId);
-    } else {
-        ElMessage.warning('暂无农事详情');
-    }
-};
-
-const currentFarmId = localStorage.getItem('selectedFarmId')
-const toConsult = async () => {
-    const userId = await getNearStore();
-    router.push(`/chat_frame?userId=${userId}&farmId=${currentFarmId}`);
-};
-
-async function getNearStore() {
-    const params = {
-        farmId: currentFarmId,
-    };
-    const {data} = await VE_API.z_agricultural_store.getStoreItem(params);
-    return data.miniUserId;
-}
-</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);
-        overflow: auto;
-        .detail-img {
-            height: calc(100% - 34px);
-            position: relative;
-            padding: 4px 16px 30px 16px;
-            .card-swipe-wrapper {
-                width: 100%;
-                height: 100%;
-                border-radius: 24px 0 36px 4px;
-                overflow: hidden;
-                :deep(.van-swipe-item) {
-                    width: 100%;
-                    height: 100%;
-                    display: flex;
-                    flex-direction: column;
-                }
-                :deep(.van-swipe__indicators) {
-                    bottom: 10px;
-                }
-                :deep(.van-swipe__indicator) {
-                    width: 6px;
-                    height: 6px;
-                    background-color: #cccccc;
-                    border-radius: 50%;
-                    margin: 0 4px;
-                    transition: all 0.3s;
-                }
-                :deep(.van-swipe__indicator--active) {
-                    width: 20px;
-                    height: 6px;
-                    background-color: #2199f8;
-                    border-radius: 3px;
-                }
-            }
-            .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;
-                    z-index: 10;
-                }
-                .card-bg {
-                    border-radius: 24px 0 36px 4px;
-                    width: 100%;
-                    height: 100%;
-                    object-fit: cover;
-                }
-                .no-data {
-                    color: #fff;
-                    text-align: center;
-                    display: flex;
-                    align-items: center;
-                    justify-content: center;
-                    img {
-                        width: 17px;
-                        margin-right: 4px;
-                    }
-                }
-                .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;
-                    &.no-data {
-                        padding: 16px 0 20px 0;
-                    }
-                    .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;
-                    }
-                    .advice-wrap {
-                        padding-top: 12px;
-                    }
-                    .item-tag {
-                        width: fit-content;
-                        padding: 4px 10px;
-                        border-radius: 20px;
-                        color: #ffd786;
-                        background: rgba(255, 215, 134, 0.2);
-                        margin-bottom: 6px;
-                    }
-                    .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;
-                        img {
-                            width: 16px;
-                            height: 16px;
-                            margin-right: 4px;
-                        }
-                    }
-                }
-            }
-        }
-        .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: 4px;
-                &.primary {
-                    flex: 1;
-                    color: #fff;
-                    background: #2199f8;
-                }
-                &.share {
-                    flex: 1;
-                    background: #fff;
-                    // width: 20%;
-                    min-width: 80px;
-                    text-align: center;
-                    border: 1px solid #8E8E8E;
-                    color: #000;
-                    border-radius: 20px;
-                }
-            }
-            .btn + .btn {
-                margin-left: 15px;
-            }
-        }
-        .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;
-            }
-        }
-    }
-}
-</style>

+ 0 - 531
src/views/old_mini/farm_manage/components/demandHall.vue

@@ -1,531 +0,0 @@
-<template>
-    <div class="demand-hall" :style="{ height: `calc(100vh - ${tabBarHeight}px - 50px)` }">
-        <!-- 地图 -->
-        <div class="map-container" ref="mapContainer"></div>
-
-        <div class="search-wrap">
-            <location-search
-                class="search"
-                user-location="113.61702297075017,23.584863449735067"
-                @change="handleLocationChange"
-            />
-        </div>
-
-        <floating-panel
-            class="floating-panel"
-            v-model:height="height"
-            :anchors="anchors"
-            :content-draggable="false"
-            @height-change="handleHeightChange"
-        >
-            <template #header>
-                <div class="header-bar"></div>
-                <div class="select-group">
-                    <el-select
-                        class="select-item"
-                        v-model="selectParma.farmWorkTypeId"
-                        placeholder="农事类型"
-                        @change="getSimpleList"
-                    >
-                        <el-option
-                            v-for="item in farmWorkTypeList"
-                            :key="item.id"
-                            :label="item.name"
-                            :value="item.id"
-                        />
-                    </el-select>
-                    <el-select
-                        class="select-item"
-                        v-model="selectParma.districtCode"
-                        placeholder="区域筛选"
-                        @change="getSimpleList"
-                    >
-                        <el-option
-                            v-for="item in districtList"
-                            :key="item.code"
-                            :label="item.name"
-                            :value="item.code"
-                        />
-                    </el-select>
-                </div>
-                <div class="user-btn" v-if="height === anchors[0]" @click.stop="toPage">
-                    <img class="user-icon" src="@/assets/img/home/user-icon.png" alt="" />
-                    新增用户
-                </div>
-            </template>
-            <div class="hall-content">
-                <div class="farm-list" ref="cardContentRef" :style="{ height: `${cardContentHeight}px` }">
-                    <div class="task-item" v-for="item in taskList" :key="item">
-                        <!-- <task-item :item-data="item" :isHall="true" @handleFollowSuccess="getSimpleList">
-                            <template #footer>
-                                <div class="item-footer">
-                                    <div class="footer-l" @click="toDetail(item)">查看详情</div>
-                                    <div class="footer-r">
-                                        <div class="btn second" @click="showIgnore(item)">
-                                            忽略
-                                        </div>
-                                        <div class="btn primary" @click="showPriceSheetPopup(item)">确认并报价</div>
-                                    </div>
-                                </div>
-                            </template>
-                        </task-item> -->
-                    </div>
-
-                    <div class="no-data" v-if="taskList.length === 0">暂无数据</div>
-                </div>
-            </div>
-        </floating-panel>
-    </div>
-    <!-- 服务报价单 -->
-    <price-sheet-popup ref="priceSheetPopupRef"></price-sheet-popup>
-
-    <popup v-model:show="showIgnorePopup" round class="task-tips-popup">
-            <img class="create-farm-icon" src="@/assets/img/home/create-farm-icon.png" alt="" />
-            <div class="create-farm-text">
-                <div>
-                    您确认忽略 <span class="main-text">{{ currentTask?.farmName }}</span> 的
-                    <span class="main-text">{{ currentTask?.farmWorkName }}</span> 农事吗
-                </div>
-            </div>
-        <div class="create-farm-btn" @click="handleIgnore">
-            确认忽略
-        </div>
-    </popup>
-</template>
-
-<script setup>
-import { FloatingPanel } from "vant";
-import { computed, nextTick, onActivated, onDeactivated, onMounted, ref } from "vue";
-import { useStore } from "vuex";
-import IndexMap from "../map/index";
-// import taskItem from "@/components/taskItem.vue";
-import priceSheetPopup from "@/components/popup/priceSheetPopup.vue";
-import { useRouter } from "vue-router";
-import LocationSearch from "@/components/pageComponents/LocationSearch.vue";
-import { Point } from "ol/geom";
-import Feature from "ol/Feature";
-import { Popup } from "vant";
-import { ElMessage } from "element-plus";
-const props = defineProps({
-    isCapital: {
-        type: Boolean,
-        default: false,
-    },
-});
-
-const store = useStore();
-const tabBarHeight = computed(() => store.state.home.tabBarHeight);
-const router = useRouter();
-// const tabBarHeight = ref(localStorage.getItem("tabBarHeight") * 1 || 50);
-
-const anchors = ref([310 + tabBarHeight.value, Math.round(1 * window.innerHeight) - 44]);
-const height = ref(anchors.value[0]);
-
-const indexMap = new IndexMap();
-const mapContainer = ref(null);
-const mapPoint = ref(null);
-
-onMounted(() => {
-    mapPoint.value = store.state.home.miniUserLocationPoint;
-    getFarmWorkTypeList();
-    getDistrictListByCity();
-    nextTick(() => {
-        indexMap.initMap(mapPoint.value, mapContainer.value, props.isCapital);
-        getStatisticsAreaByDistrict();
-    });
-});
-
-onActivated(() => {
-    showIgnorePopup.value = false;
-    getSimpleList();
-});
-onDeactivated(() => {
-    showIgnorePopup.value = false;
-});
-
-defineExpose({
-    getSimpleList,
-});
-
-//根据城市的坐标返回区县列表
-const districtList = ref([]);
-function getDistrictListByCity() {
-    VE_API.z_farm_work_record.getDistrictListByCity({ point: mapPoint.value }).then(({ data }) => {
-        districtList.value = data || [];
-        if(data.length > 0){
-            const cityCode = data[0].code.slice(0, -2);
-            districtList.value.unshift({ code: cityCode, name: data[0].cityName });
-            selectParma.value.districtCode = cityCode;
-            getSimpleList()
-        }else{
-            selectParma.value.districtCode = null;
-            getSimpleList()
-        }
-    });
-}
-
-//农事类型列表
-const farmWorkTypeList = ref([]);
-function getFarmWorkTypeList() {
-    VE_API.z_farm_work_record.getFarmWorkTypeList().then(({ data }) => {
-        farmWorkTypeList.value = data;
-        farmWorkTypeList.value.unshift({ id: 0, name: "全部" });
-    });
-}
-const selectParma = ref({
-    farmWorkTypeId: null,
-    districtCode: null,
-});
-
-//需求大厅接单简单农事记录列表
-const taskList = ref([]);
-function getSimpleList() {
-    const params = {
-        ...selectParma.value,
-        farmWorkTypeId: selectParma.value.farmWorkTypeId || null,
-        location: mapPoint.value,
-    };
-    VE_API.z_farm_work_record
-        .getOrderReceivingSimpleList(params)
-        .then(({ data }) => {
-            const filteredData = data.filter(item => item.isIgnored !== 1);
-            taskList.value = filteredData || [];
-        })
-        .catch((error) => {
-            taskList.value = [];
-        });
-}
-
-const toPage = () => {
-    router.push("/create_farm?type=client&isReload=true&from=task_condition");
-};
-
-//按区县统计服务亩数
-function getStatisticsAreaByDistrict() {
-    VE_API.z_farm_work_record.statisticsAreaByDistrict({ flowStatus: "1,2,3" }).then(({ data }) => {
-        if (data && data.length > 0) {
-            indexMap.initDataHall(data);
-        }
-    });
-}
-
-function toDetail(item) {
-    router.push({
-        path: "/completed_work",
-        query: { miniJson: JSON.stringify({ id: item.id }) },
-    });
-}
-
-const cardContentHeight = ref(230);
-
-// 处理位置搜索变化
-function handleLocationChange(data) {
-    if (data && data.coordinateArray) {
-        mapPoint.value = data.point;
-        // 更新地图位置
-        if (indexMap && indexMap.kmap) {
-            indexMap.kmap.getView().animate({
-                center: data.coordinateArray,
-                zoom: 16,
-                duration: 500,
-            });
-            // 更新点击点
-            if (indexMap.clickPointLayer) {
-                indexMap.clickPointLayer.source.clear();
-                const point = new Feature(new Point(data.coordinateArray));
-                indexMap.clickPointLayer.addFeature(point);
-            }
-        }
-        // 更新区县列表
-        getDistrictListByCity();
-    } else {
-        // 重置为初始位置
-        mapPoint.value = store.state.home.miniUserLocationPoint;
-        indexMap.clickPointLayer.source.clear();
-        // 更新区县列表
-        getDistrictListByCity();
-        getStatisticsAreaByDistrict();
-    }
-}
-
-const cardContentRef = ref(null);
-const handleHeightChange = ({ height }) => {
-    if (height === anchors.value[0]) {
-        cardContentHeight.value = 230;
-        cardContentRef.value.scrollTo({ top: 0, behavior: "smooth" });
-    } else if (height === anchors.value[1]) {
-        cardContentHeight.value = Math.round(1 * window.innerHeight) - (tabBarHeight.value - 40) - 170;
-    }
-};
-
-const priceSheetPopupRef = ref(null);
-const showPriceSheetPopup = (item) => {
-    VE_API.z_farm_work_record.getDetail({ id: item.id }).then(({ data }) => {
-        const res = data[0];
-        priceSheetPopupRef.value.handleShowPopup(res);
-    });
-};
-
-const showIgnorePopup = ref(false);
-const showIgnore = (item) => {
-    currentTask.value = item;
-    showIgnorePopup.value = true;
-};
-
-const currentTask = ref({});
-const handleIgnore = () => {
-    showIgnorePopup.value = false;
-    VE_API.z_farm_work_record.ignoreFarmWorkRecord({ farmWorkRecordId: currentTask.value.id }).then((res) => {
-        if (res.code === 0) {
-            ElMessage.success("操作成功");
-            getSimpleList();
-        }
-    });
-};
-</script>
-
-<style lang="scss" scoped>
-.demand-hall {
-    width: 100%;
-    height: 100%;
-    position: relative;
-    overflow: hidden;
-    .map-container {
-        width: 100%;
-        height: calc(100% - 290px);
-    }
-
-    .search {
-        position: absolute;
-        top: 8px;
-        width: calc(100% - 24px);
-        left: 12px;
-        ::v-deep {
-            .el-input__wrapper,
-            .el-select__wrapper {
-                box-shadow: none;
-                border-radius: 20px;
-            }
-        }
-    }
-
-    .expand-btn-wrap {
-        position: absolute;
-        bottom: 12px;
-        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;
-        }
-    }
-
-    .hall-content {
-        height: 100%;
-        position: relative;
-        .farm-list {
-            overflow: auto;
-            height: calc(100% - 60px);
-            border-top: 1px solid rgba(0, 0, 0, 0.1);
-            padding: 8px 12px 12px 12px;
-        }
-        .task-item + .task-item {
-            margin-top: 10px;
-        }
-        .no-data {
-            text-align: center;
-            font-size: 14px;
-            color: #999999;
-            padding-top: 20px;
-        }
-
-        .item-footer {
-            margin-top: 10px;
-            padding-top: 11px;
-            border-top: 1px solid rgba(0, 0, 0, 0.1);
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            font-size: 12px;
-            .footer-l {
-                // display: inline-flex;
-                // align-items: center;
-                // border: 1px solid #2199F8;
-                // background: rgba(33, 153, 248, 0.1);
-                // padding: 0 12px;
-                // height: 32px;
-                // box-sizing: border-box;
-                // display: flex;
-                // align-items: center;
-                // border-radius: 20px;
-                // color: #2199F8;
-                color: #8b8b8b;
-                font-size: 12px;
-                .share-icon {
-                    width: 12px;
-                    padding-right: 4px;
-                }
-            }
-            .footer-r {
-                display: flex;
-                align-items: center;
-                gap: 8px;
-                .btn {
-                    height: 32px;
-                    line-height: 32px;
-                    padding: 0 12px;
-                    border-radius: 20px;
-                    display: flex;
-                    align-items: center;
-                    box-sizing: border-box;
-                    &.second {
-                        // border: 1px solid #8B8B8B;
-                        // color: #8B8B8B;
-                        color: #2199f8;
-                        background: rgba(33, 153, 248, 0.1);
-                    }
-                    &.primary {
-                        background: #2199f8;
-                        color: #fff;
-                    }
-                }
-            }
-        }
-    }
-
-    .select-group {
-        display: flex;
-        padding: 0 12px;
-        .select-item {
-            width: 100%;
-            ::v-deep {
-                .el-select__wrapper {
-                    text-align: center;
-                    gap: 2px;
-                    box-shadow: none;
-                    justify-content: center;
-                    background: none;
-                }
-                .el-select__selection {
-                    flex: none;
-                    width: fit-content;
-                }
-                .el-select__placeholder {
-                    position: static;
-                    transform: none;
-                    width: fit-content;
-                    color: rgba(0, 0, 0, 0.2);
-                }
-                .el-select__caret {
-                    color: rgba(0, 0, 0, 0.2);
-                }
-            }
-        }
-    }
-
-    .header-bar {
-        width: 20px;
-        height: 3px;
-        margin: 10px auto 10px auto;
-        border-radius: 4px;
-        background: #969799;
-    }
-}
-.user-btn {
-    position: absolute;
-    z-index: 10;
-    top: -42px;
-    right: 12px;
-    background: #fff;
-    height: 32px;
-    display: flex;
-    align-items: center;
-    border-radius: 5px;
-    padding: 0 8px;
-    font-size: 12px;
-    color: #2199f8;
-    .user-icon {
-        width: 16px;
-        margin-right: 4px;
-    }
-}
-
-.floating-panel {
-    width: 100%;
-    background: #ffffff;
-    ::v-deep {
-        .van-floating-panel__content {
-            background: transparent;
-            overflow: hidden;
-        }
-        .van-floating-panel__header {
-            position: relative;
-            &::after {
-                content: "";
-                height: 100px;
-                width: 100%;
-                position: absolute;
-                top: 0px;
-                left: 0;
-            }
-        }
-    }
-}
-
-
-.task-tips-popup {
-    width: 75%;
-    padding: 28px 28px 20px;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: center;
-    .create-farm-icon {
-        width: 40px;
-        height: 40px;
-        margin-bottom: 12px;
-    }
-    .farm-check-icon {
-        width: 68px;
-        height: 68px;
-        margin-bottom: 12px;
-    }
-    .create-farm-text {
-        font-size: 20px;
-        font-weight: 500;
-        line-height: 40px;
-        margin-bottom: 32px;
-        text-align: center;
-        &.success-text {
-            font-size: 23px;
-            font-weight: 400;
-        }
-    }
-    .main-text {
-        color: #2199f8;
-    }
-    .create-farm-btn {
-        width: 100%;
-        box-sizing: border-box;
-        padding: 8px;
-        border-radius: 25px;
-        font-size: 16px;
-        background: #2199f8;
-        color: #fff;
-        text-align: center;
-    }
-}
-</style>

+ 0 - 212
src/views/old_mini/farm_manage/components/farmManage.vue

@@ -1,212 +0,0 @@
-<template>
-    <div class="farm-manage-content" :style="{ height: `calc(100vh - ${tabBarHeight}px - 50px)` }">
-        <div class="manage-top">
-            <el-input class="search" v-model="searchValue" placeholder="搜索位置" @search="search" :prefix-icon="Search" />
-            <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>
-                <el-select class="select-item" v-model="areaValue1" placeholder="Select">
-                    <el-option v-for="item in areaOptions1" :key="item.value" :label="item.label" :value="item.value" />
-                </el-select>
-            </div>
-        </div>
-        <div class="farm-list">
-            <div :class="['farm-item', { 'is-default': item === 3 }]" v-for="item in 10" :key="item" @click="handleItemClick(item)">
-                <div class="item-top"><span class="num">2</span> 条农事待确认</div>
-                <div class="item-title">未命名农场</div>
-                <div class="item-desc">
-                    <div class="desc-info">
-                        <div class="desc-info-item">
-                            <span>农场品种:</span>
-                            <span class="value">荔枝-桂味</span>
-                        </div>
-                        <div class="desc-info-item">
-                            <span>农场面积:</span>
-                            <span class="value">500亩</span>
-                        </div>
-                    </div>
-                    <div class="desc-info copy-info">
-                        <div class="address van-ellipsis">
-                            <span>农场位置:</span>
-                            <span class="value">广东省广州市从化区市从化区从广东省广州市从化区市从化区从</span>
-                        </div>
-                        <span class="copy-text">点击复制</span>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { computed, ref } from "vue";
-import { Search } from "@element-plus/icons-vue";
-import { useRouter } from "vue-router";
-import { useStore } from "vuex";
-
-const store = useStore();
-const tabBarHeight = computed(() => store.state.home.tabBarHeight);
-
-const router = useRouter();
-const searchValue = ref("");
-const search = () => {
-    console.log(searchValue.value);
-};
-const dateValue = ref("1");
-const dateOptions = [
-    { value: "1", label: "农事类型" },
-    { value: "2", label: "2" },
-    { value: "3", label: "3" },
-];
-const areaValue = ref("1");
-const areaOptions = [
-    { value: "1", label: "距离" },
-    { value: "2", label: "2" },
-    { value: "3", label: "3" },
-];
-const areaValue1 = ref("1");
-const areaOptions1 = [
-    { value: "1", label: "区域筛选" },
-    { value: "2", label: "2" },
-    { value: "3", label: "3" },
-];
-
-const handleItemClick = (item) => {
-    console.log(item);
-    router.push(`/farm_manage_detail?type=EXPERT`);
-};
-</script>
-
-<style lang="scss" scoped>
-.farm-manage-content {
-    width: 100%;
-    height: calc(100vh - 52px - 50px);
-    background: #f5f7fb;
-    padding: 8px 0 0 12px;
-    overflow: auto;
-    box-sizing: border-box;
-    .search {
-        ::v-deep {
-            .el-input__wrapper {
-                box-shadow: none;
-                border-radius: 20px;
-            }
-        }
-    }
-    .select-group {
-        display: flex;
-        gap: 12px;
-        margin: 5px 0;
-        .select-item {
-            width: 100%;
-            ::v-deep {
-                .el-select__wrapper {
-                    text-align: center;
-                    gap: 2px;
-                    box-shadow: none;
-                    justify-content: center;
-                    background: none;
-                }
-                .el-select__selection {
-                    flex: none;
-                    width: fit-content;
-                }
-                .el-select__placeholder {
-                    position: static;
-                    transform: none;
-                    width: fit-content;
-                    color: rgba(0, 0, 0, 0.2);
-                }
-                .el-select__caret {
-                    color: rgba(0, 0, 0, 0.2);
-                }
-            }
-        }
-    }
-    .manage-top {
-        padding-right: 12px;
-    }
-    .farm-list {
-        height: calc(100% - 74px);
-        padding: 0 12px 26px 0;
-        box-sizing: border-box;
-        overflow: auto;
-        .farm-item {
-            background: #fff;
-            border-radius: 10px;
-            padding: 10px 12px;
-            border: 1px solid rgba(255, 149, 61, 0.5);
-            .item-top {
-                background-image: linear-gradient(90deg, rgba(255, 149, 61, 0.3) 0%, transparent 88%);
-                color: #bf5600;
-                padding: 5px 10px;
-                border-radius: 5px;
-                position: relative;
-                &::before {
-                    content: "";
-                    width: 6px;
-                    height: 6px;
-                    background: #ff953d;
-                    border-radius: 50%;
-                    top: 5px;
-                    left: 110px;
-                    position: absolute;
-                }
-                .num {
-                    font-size: 18px;
-                }
-            }
-            .item-title {
-                font-size: 16px;
-                font-weight: 500;
-                margin: 10px 0 5px 0;
-            }
-            .item-desc {
-                font-size: 13px;
-                color: #bbbbbb;
-                line-height: 18px;
-                .desc-info {
-                    display: flex;
-                    .desc-info-item {
-                        flex: 1;
-                        .value {
-                            color: #666666;
-                        }
-                    }
-                }
-                .copy-info {
-                    margin-top: 4px;
-                    .address {
-                        max-width: 80%;
-                        .value {
-                            color: #666666;
-                        }
-                    }
-                    .copy-text {
-                        margin-left: 8px;
-                        color: #2199f8;
-                    }
-                }
-            }
-
-            &.is-default {
-                border-color: transparent;
-                .item-top {
-                    color: #505050;
-                    background-image: linear-gradient(90deg, rgba(171, 171, 171, 0.2) 0%, transparent 88%);
-                    &::before {
-                        background: #909090;
-                    }
-                }
-            }
-        }
-        .farm-item + .farm-item {
-            margin-top: 10px;
-        }
-    }
-}
-</style>

+ 0 - 134
src/views/old_mini/farm_manage/components/systemReminder.vue

@@ -1,134 +0,0 @@
-<template>
-    <Popup v-model:show="show" class="system-reminder-popup">
-        <div class="system-reminder-title">
-            <img class="title-img" src="@/assets/img/home/bulb-icon.png" alt="" />
-            <span class="title-text">飞鸟系统提醒</span>
-        </div>
-        <div class="system-reminder-content">
-            <div class="content-text">
-                <span>从化荔博园</span> 8月8日有 <span>剪枝农事</span> 需求,快去联系看看吧!
-            </div>
-            <div class="content-box">
-                <div class="address">
-                    <span>位置:广东省广州市从化区</span>
-                    <div class="distance">距离2.0km</div>
-                </div>
-                <div class="map"></div>
-            </div>
-        </div>
-        <div class="bottom-buttons">
-            <div class="bottom-btn no-btn">查看详情</div>
-            <div class="bottom-btn yes-btn" @click="handleContact">立即联系</div>
-        </div>
-    </Popup>
-    <action-sheet
-        class="action-sheet"
-        style="bottom: 50px;padding-top: 10px;"
-        title=" "
-        closeable
-        v-model:show="contactShow"
-        :actions="actions"
-        @select="onSelect"
-    />
-</template>
-
-<script setup>
-import { Popup, ActionSheet } from "vant";
-import { ref } from "vue";
-const show = ref(false);
-const contactShow = ref(false);
-
-const handleContact = () => {
-    show.value = false;
-    contactShow.value = true;
-};
-
-const actions = [{ name: "在线联系" }, { name: "电话联系" }];
-const onSelect = (item) => {
-    contactShow.value = false;
-};
-</script>
-
-<style lang="scss" scoped>
-.system-reminder-popup {
-    width: 100%;
-    border-radius: 12px;
-    padding: 16px 12px;
-    background-image: linear-gradient(180deg, #d1e7fd 0%, #ffffff 25%);
-    .system-reminder-title {
-        display: flex;
-        align-items: center;
-        padding: 4px;
-        border-radius: 5px 0 0 5px;
-        background: linear-gradient(90deg, #2199f8 0%, transparent 100%);
-
-        .title-img {
-            width: 22px;
-            height: 22px;
-            margin-right: 4px;
-        }
-        .title-text {
-            font-size: 20px;
-            color: #fff;
-            font-family: "PangMenZhengDao";
-        }
-    }
-    .system-reminder-content {
-        .content-text {
-            font-size: 16px;
-            color: #1d1e1f;
-            font-weight: 500;
-            margin: 5px 0 12px 0;
-            span {
-                color: #2199f8;
-            }
-        }
-        .content-box {
-            border: 1px solid #ececec;
-            border-radius: 8px;
-            padding: 10px 8px;
-            .address {
-                display: flex;
-                justify-content: space-between;
-                color: #1d1e1f;
-                font-weight: 500;
-                .distance {
-                    background: #f2f2f2;
-                    color: #999999;
-                    padding: 3px 10px;
-                    border-radius: 25px;
-                    font-weight: 400;
-                }
-            }
-            .map {
-                width: 100%;
-                height: 140px;
-                border-radius: 6px;
-                background: #f5f5f5;
-                margin-top: 12px;
-            }
-        }
-    }
-    .bottom-buttons {
-        display: flex;
-        gap: 12px;
-        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;
-            }
-        }
-    }
-}
-</style>

+ 0 - 47
src/views/old_mini/farm_manage/index.vue

@@ -1,47 +0,0 @@
-<template>
-    <div class="farm-manage">
-        <tabs v-model:active="active" class="tabs">
-            <tab title="农场管理">
-                <farm-manage />
-            </tab>
-            <tab title="需求大厅">
-                <demand-hall />
-            </tab>
-        </tabs>
-        <system-reminder />
-    </div>
-</template>
-
-<script setup>
-import { ref } from "vue";
-import { Tab, Tabs } from "vant";
-import farmManage from "./components/farmManage.vue";
-import demandHall from "./components/demandHall.vue";
-import systemReminder from "./components/systemReminder.vue";
-const active = ref(0);
-</script>
-
-<style lang="scss" scoped>
-.farm-manage {
-    width: 100%;
-    height: 100%;
-    .tabs{
-        ::v-deep{
-            .van-tabs__wrap{
-                margin-bottom: 8px;
-            }
-            .van-tabs__line{
-                width: 24px;
-                height: 4px;
-            }
-            .van-tab {
-                width: 80px;
-                flex: none;
-            }
-            .van-tabs__nav {
-                justify-content: center;
-            }
-        }
-    }
-}
-</style>

+ 0 - 244
src/views/old_mini/farm_manage/map/index.js

@@ -1,244 +0,0 @@
-import * as KMap from "@/utils/ol-map/KMap";
-import * as util from "@/common/ol_common.js";
-import config from "@/api/config.js";
-import { Point } from 'ol/geom';
-import Feature from "ol/Feature";
-import Style from "ol/style/Style";
-import Photo from "ol-ext/style/Photo";
-import { Fill, Text, Icon, Stroke } from "ol/style.js";
-import { newPoint } from "@/utils/map";
-
-/**
- * @description 地图层对象
- */
-class IndexMap {
-  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, 1],
-          }),
-        });
-      },
-    });
-
-    this.gardenPointLayer = new KMap.VectorLayer("gardenPointLayer", 99, {
-      minZoom: 6,
-      maxZoom: 22,
-      style: (feature) => {
-        let style1 = new Style({
-          image: new Photo({
-            src: "https://birdseye-img.sysuimars.com/ai_result/2023/11/20/tree_4414/img_27572.jpg" + '?imageView2/1/w/300/interlace/1',
-            radius: 19,
-            shadow: 0,
-            crop: true,
-            onload: function () {
-              that.gardenPointLayer.layer.changed();
-            },
-            displacement: [-1, -1],
-            stroke: new Stroke({
-              width: 2,
-              color: "#fdfcfc00",
-            }),
-          }),
-        });
-        let style2 = new Style({
-          image: new Photo({
-            src: require("@/assets/img/map/garden-border.png"),
-            radius: 24,
-            shadow: 0,
-            crop: false,
-            onload: function () {
-              that.gardenPointLayer.layer.changed();
-            },
-            displacement: [0, -6],
-            stroke: new Stroke({
-              width: 0,
-              color: "#fdfcfc00",
-            }),
-          }),
-        });
-        let style3 = new Style({
-          text: new Text({
-            text: feature.get('farmName') || feature.get('mapInfo'),
-            offsetX: 0,
-            offsetY: -30,
-            font: "bold 12px sans-serif",
-            fill: new Fill({ color: "#fff" }), // 字体颜色
-          }),
-        });
-
-        const canvas = document.createElement('canvas');
-        const ctx = canvas.getContext('2d');
-
-        // 矩形的参数
-        const x = 150; // 矩形中心点的x坐标
-        const y = 100; // 矩形中心点的y坐标
-        const width = 98; // 矩形的宽度
-        const height = 20; // 矩形的高度
-        const cornerRadius = 8; // 圆角半径
-
-        // 创建渐变
-        const gradient = ctx.createLinearGradient(x - width / 2, y, x + width / 2, y);
-        gradient.addColorStop(0, '#2199F8');   // 渐变起始颜色
-        gradient.addColorStop(1, '#2199F8');  // 渐变结束颜色
-
-        // 绘制圆角矩形
-        ctx.beginPath();
-        ctx.moveTo(x - width / 2 + cornerRadius, y - height / 2); // 左上角
-        ctx.lineTo(x + width / 2 - cornerRadius, y - height / 2); // 上边
-        ctx.arc(x + width / 2 - cornerRadius, y - height / 2 + cornerRadius, cornerRadius, -Math.PI / 2, 0); // 右上角
-        ctx.lineTo(x + width / 2, y + height / 2 - cornerRadius); // 右边
-        ctx.arc(x + width / 2 - cornerRadius, y + height / 2 - cornerRadius, cornerRadius, 0, Math.PI / 2); // 右下角
-        ctx.lineTo(x - width / 2 + cornerRadius, y + height / 2); // 下边
-        ctx.arc(x - width / 2 + cornerRadius, y + height / 2 - cornerRadius, cornerRadius, Math.PI / 2, Math.PI); // 左下角
-        ctx.lineTo(x - width / 2, y - height / 2 + cornerRadius); // 左边
-        ctx.arc(x - width / 2 + cornerRadius, y - height / 2 + cornerRadius, cornerRadius, Math.PI, -Math.PI / 2); // 左上角
-        ctx.closePath();
-
-        // 填充颜色
-        ctx.fillStyle = gradient;
-        ctx.fill();
-        const newStyle = new Style({
-          image: new Icon({
-            src: canvas.toDataURL(),
-            displacement: [0, 56],
-          }),
-        });
-
-
-        return [style1, style2, newStyle, style3];
-      },
-    });
-
-    this.gardenHallLayer = new KMap.VectorLayer("gardenHallLayer", 99, {
-      minZoom: 6,
-      maxZoom: 22,
-      style: (feature) => {
-        let style2 = new Style({
-          image: new Icon({
-            src: require("@/assets/img/map/hall.png"),
-            scale: 0.4,
-            anchor: [0.5, 1],
-            displacement: [0, -36],
-          }),
-        });
-        let style3 = new Style({
-          text: new Text({
-            text: feature.get('totalArea') ? feature.get('totalArea').toFixed(2) + '亩' : '--',
-            offsetX: 0,
-            offsetY: -30,
-            font: "bold 12px sans-serif",
-            fill: new Fill({ color: "#fff" }), // 字体颜色
-          }),
-        });
-        let style4 = new Style({
-          text: new Text({
-            text: feature.get('districtName'),
-            offsetX: 0,
-            offsetY: -6,
-            font: "bold 14px sans-serif",
-            fill: new Fill({ color: "#2199F8" }), // 字体颜色
-          }),
-        });
-
-        const canvas = document.createElement('canvas');
-        const ctx = canvas.getContext('2d');
-
-        // 矩形的参数
-        const x = 150; // 矩形中心点的x坐标
-        const y = 100; // 矩形中心点的y坐标
-        const width = 58; // 矩形的宽度
-        const height = 20; // 矩形的高度
-        const cornerRadius = 4; // 圆角半径
-
-        // 创建渐变
-        const gradient = ctx.createLinearGradient(x - width / 2, y, x + width / 2, y);
-        gradient.addColorStop(0, '#2199F8');   // 渐变起始颜色
-        gradient.addColorStop(1, '#2199F8');  // 渐变结束颜色
-
-        // 绘制圆角矩形
-        ctx.beginPath();
-        ctx.moveTo(x - width / 2 + cornerRadius, y - height / 2); // 左上角
-        ctx.lineTo(x + width / 2 - cornerRadius, y - height / 2); // 上边
-        ctx.arc(x + width / 2 - cornerRadius, y - height / 2 + cornerRadius, cornerRadius, -Math.PI / 2, 0); // 右上角
-        ctx.lineTo(x + width / 2, y + height / 2 - cornerRadius); // 右边
-        ctx.arc(x + width / 2 - cornerRadius, y + height / 2 - cornerRadius, cornerRadius, 0, Math.PI / 2); // 右下角
-        ctx.lineTo(x - width / 2 + cornerRadius, y + height / 2); // 下边
-        ctx.arc(x - width / 2 + cornerRadius, y + height / 2 - cornerRadius, cornerRadius, Math.PI / 2, Math.PI); // 左下角
-        ctx.lineTo(x - width / 2, y - height / 2 + cornerRadius); // 左边
-        ctx.arc(x - width / 2 + cornerRadius, y - height / 2 + cornerRadius, cornerRadius, Math.PI, -Math.PI / 2); // 左上角
-        ctx.closePath();
-
-        // 填充颜色
-        ctx.fillStyle = gradient;
-        ctx.fill();
-        const newStyle = new Style({
-          image: new Icon({
-            src: canvas.toDataURL(),
-            displacement: [0, 56],
-          }),
-        });
-
-
-        return [style2, newStyle, style3, style4];
-      },
-    });
-  }
-
-  initMap(location, target, isCapital) {
-    let level = 16;
-    let coordinate = util.wktCastGeom(location).getFirstCoordinate();
-    this.kmap = new KMap.Map(target, level, coordinate[0], coordinate[1], null, 6, 22, isCapital ? "img" : "vec");
-    let xyz2 = config.base_img_url3 + "map/lby/{z}/{x}/{y}.png";
-    this.kmap.addXYZLayer(xyz2, { minZoom: 6, maxZoom: 22 }, 2);
-    this.kmap.addLayer(this.clickPointLayer.layer);
-    this.kmap.addLayer(this.gardenPointLayer.layer);
-    this.kmap.addLayer(this.gardenHallLayer.layer);
-    if (isCapital) {
-      // this.initData()
-      const point = ["113.61652616170711,23.58399613872042", "113.61767554789421, 23.590079887444034", "113.62757101477101, 23.590796948574365", "113.62240816252164, 23.59499176519138"]
-    } else {
-      let point = new Feature(new Point(coordinate))
-      this.clickPointLayer.addFeature(point)
-    }
-  }
-
-  initData(taskList, label,pointType='point') {
-    this.gardenPointLayer.source.clear();
-    if (taskList.length > 0) {  // 如果任务列表不为空,则添加任务点
-      for (let item of taskList) {
-        item.mapInfo = label ? item[label] : (item.executeDeadlineDate || item.executeDate)?.replace(/^\d{4}-(\d{2})-(\d{2})$/, '$1.$2') + '  ' + item.farmWorkName
-        this.gardenPointLayer.source.addFeature(newPoint(item, pointType, "myGarden"))
-      }
-      this.kmap.getView().fit(this.gardenPointLayer.source.getExtent(), { padding: [42, 20, 30, 20] });
-      const finalZoom = this.kmap.getView().getZoom();
-      if (finalZoom > 18) {
-        this.kmap.getView().setZoom(18);
-      }
-    }
-  }
-
-  initDataHall(taskList) {
-    this.gardenHallLayer.source.clear();
-    if (taskList.length > 0) {  // 如果任务列表不为空,则添加任务点
-      for (let item of taskList) {
-        this.gardenHallLayer.source.addFeature(newPoint(item, "centerPoint", "hallGarden"))
-      }
-      this.kmap.getView().fit(this.gardenHallLayer.source.getExtent(), { padding: [60, 40, 30, 40] });
-      const finalZoom = this.kmap.getView().getZoom();
-      if (finalZoom > 18) {
-        this.kmap.getView().setZoom(18);
-      }
-    }
-  }
-}
-
-export default IndexMap;

+ 1 - 1
src/views/old_mini/home/index.vue

@@ -105,7 +105,7 @@ const handleAddClientSelf = () => {
 };
 const handleAddClientInvite = () => {
     showAddClient.value = false;
-    router.push("/create_farm?type=add");
+    router.push("/interaction_list?farmId=98113");
 };
 
 const handleAddClient = () => {

+ 455 - 420
src/views/old_mini/interactionList/index.vue

@@ -1,144 +1,153 @@
 <template>
     <custom-header name="农情互动" bgColor="#f2f4f5"></custom-header>
-    <div class="interaction-list" ref="interactionListRef">
-        <div class="list-item" v-for="(item, index) in listData" :key="item.id || index"
-            :class="{ 'uploaded-item': item.questionStatus !== 3 }">
-            <!-- 标题区域 -->
-            <div class="item-header-wrapper" :class="{ 'has-status': item.questionStatus !== 3 }">
-                <div class="item-header">
-                    <div class="title">{{ item.interactionTypeName }}</div>
-                    <div class="status" :class="['urgent-' + item.urgent]" v-if="item.questionStatus === 3">{{
-                        urgentType[item.urgent] }}</div>
-                </div>
-                <div class="upload-status" v-show="item.questionStatus !== 3">
-                    <el-icon class="status-icon">
-                        <SuccessFilled />
-                    </el-icon>
-                    <span class="status-text">提交成功</span>
-                </div>
+    <div class="interaction-list-wrapper">
+        <div class="interaction-card">
+            <img src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg" alt="">
+            <div class="card-content">
+                <div class="card-title">互动主题:新梢长势评估</div>
+                <span class="card-desc">秋梢健壮是来年成花的关键,及时记录新梢萌动时间,可精准预测嫩叶旺长期,便于及时补充营养,防治病虫,培养健壮秋梢。 </span>
             </div>
-
-            <!-- 未上传状态内容 -->
-            <div class="uploaded-content" v-show="item.questionStatus === 3 || item.expanded">
-                <div class="content-wrapper">
-                    <span>{{ item.remark }}</span>
-                    <text-ellipsis class="item-desc" rows="0" :content="item.reason" expand-text="展开"
-                        collapse-text="收起" />
-                    <div class="tip-box">如果不确定是否发生,直接上传照片即可</div>
-                    <div class="example-wrapper">
-                        <div class="example-header">
-                            <div>示例照片</div>
-                            <div class="more" v-if="item.exampleImageWithAnnotations.length > 3"
-                                @click="openMorePopup(item)">查看更多</div>
-                        </div>
-                        <div class="example-list" v-if="item.exampleImageWithAnnotations.length > 0">
-                            <div class="image-item-wrapper"
-                                v-for="(example, exIndex) in item.exampleImageWithAnnotations"
-                                :key="example.exampleImageUrl" @click="showExample(item, exIndex)">
-                                <img class="image-item" :src="example.exampleImageUrl" alt="" />
+        </div>
+        <div class="interaction-list" ref="interactionListRef">
+            <div class="list-item" v-for="(item, index) in listData" :key="item.id || index"
+                :class="{ 'uploaded-item': item.questionStatus !== 3 }">
+                <!-- 标题区域 -->
+                <div class="item-header-wrapper" :class="{ 'has-status': item.questionStatus !== 3 }">
+                    <div class="item-header">
+                        <div class="title">{{ item.interactionTypeName }}</div>
+                        <div class="status" :class="['urgent-' + item.urgent]" v-if="item.questionStatus === 3">{{
+                            urgentType[item.urgent] }}</div>
+                    </div>
+                    <div class="upload-status" v-show="item.questionStatus !== 3">
+                        <el-icon class="status-icon">
+                            <SuccessFilled />
+                        </el-icon>
+                        <span class="status-text">提交成功</span>
+                    </div>
+                </div>
+    
+                <!-- 未上传状态内容 -->
+                <div class="uploaded-content" v-show="item.questionStatus === 3 || item.expanded">
+                    <div class="content-wrapper">
+                        <span>{{ item.remark }}</span>
+                        <text-ellipsis class="item-desc" rows="0" :content="item.reason" expand-text="展开"
+                            collapse-text="收起" />
+                        <div class="tip-box">如果不确定是否发生,直接上传照片即可</div>
+                        <div class="example-wrapper">
+                            <div class="example-header">
+                                <div>示例照片</div>
+                                <div class="more" v-if="item.exampleImageWithAnnotations.length > 3"
+                                    @click="openMorePopup(item)">查看更多</div>
+                            </div>
+                            <div class="example-list" v-if="item.exampleImageWithAnnotations.length > 0">
+                                <div class="image-item-wrapper"
+                                    v-for="(example, exIndex) in item.exampleImageWithAnnotations"
+                                    :key="example.exampleImageUrl" @click="showExample(item, exIndex)">
+                                    <img class="image-item" :src="example.exampleImageUrl" alt="" />
+                                </div>
                             </div>
                         </div>
+                        <text-ellipsis class="patrol-suggestion" rows="2" :content="'巡园建议:' + item.patrolSuggestion">
+                            <template #action="{ expanded }"><span class="action-text">{{ expanded ? '收起' : '展开'
+                                    }}</span></template>
+                        </text-ellipsis>
                     </div>
-                    <text-ellipsis class="patrol-suggestion" rows="2" :content="'巡园建议:' + item.patrolSuggestion">
-                        <template #action="{ expanded }"><span class="action-text">{{ expanded ? '收起' : '展开'
-                                }}</span></template>
-                    </text-ellipsis>
-                </div>
-
-                <!-- 展开状态内容 -->
-                <div class="expanded-content" v-show="item.imagePaths.length > 0">
-                    <!-- 原因说明 -->
-                    <div class="reason-text">上传照片({{ item.imagePaths.length }}张)</div>
-                    <!-- 图片展示 -->
-                    <div class="uploaded-images">
-                        <div class="uploaded-img-wrap" v-for="(image, imgIndex) in item.imagePaths" :key="image"
-                            @click="showExample(item, imgIndex, { hideLabel: true })">
-                            <img class="uploaded-img" :src="base_img_url2 + image" alt="" />
-                            <span v-show="item.questionStatus === 3" class="uploaded-img-remove"
-                                @click.stop="removeUploadedImage(item, imgIndex)">×</span>
+    
+                    <!-- 展开状态内容 -->
+                    <div class="expanded-content" v-show="item.imagePaths.length > 0">
+                        <!-- 原因说明 -->
+                        <div class="reason-text">上传照片({{ item.imagePaths.length }}张)</div>
+                        <!-- 图片展示 -->
+                        <div class="uploaded-images">
+                            <div class="uploaded-img-wrap" v-for="(image, imgIndex) in item.imagePaths" :key="image"
+                                @click="showExample(item, imgIndex, { hideLabel: true })">
+                                <img class="uploaded-img" :src="base_img_url2 + image" alt="" />
+                                <span v-show="item.questionStatus === 3" class="uploaded-img-remove"
+                                    @click.stop="removeUploadedImage(item, imgIndex)">×</span>
+                            </div>
                         </div>
+                        <uploader v-show="item.questionStatus === 3" class="upload-wrap continue-upload-btn"
+                            @click="handleUploadClick(item)" multiple :max-count="10" :after-read="afterReadUpload">
+                            <div class="upload-btn">
+                                <el-icon>
+                                    <Plus />
+                                </el-icon>
+                                <span>继续上传照片</span>
+                            </div>
+                        </uploader>
                     </div>
-                    <uploader v-show="item.questionStatus === 3" class="upload-wrap continue-upload-btn"
-                        @click="handleUploadClick(item)" multiple :max-count="10" :after-read="afterReadUpload">
+    
+                    <!-- 上传按钮 -->
+                    <uploader v-if="item.imagePaths.length === 0 && item.questionStatus === 3"
+                        @click="handleUploadClick(item)" class="upload-wrap" multiple :max-count="10"
+                        :after-read="afterReadUpload">
                         <div class="upload-btn">
                             <el-icon>
                                 <Plus />
                             </el-icon>
-                            <span>继续上传照片</span>
+                            <span>点击上传照片</span>
                         </div>
                     </uploader>
-                </div>
-
-                <!-- 上传按钮 -->
-                <uploader v-if="item.imagePaths.length === 0 && item.questionStatus === 3"
-                    @click="handleUploadClick(item)" class="upload-wrap" multiple :max-count="10"
-                    :after-read="afterReadUpload">
-                    <div class="upload-btn">
-                        <el-icon>
-                            <Plus />
-                        </el-icon>
-                        <span>点击上传照片</span>
+    
+                    <div class="question-wrapper" v-if="item.imagePaths.length">
+                        <div class="question-cont">
+                            <div class="question-text"
+                                v-for="(q, qIdx) in (item.questionList || [item.question].filter(Boolean))" :key="qIdx">
+                                <span class="text-title">{{ q }}</span>
+                                <el-input v-model="item.answerValues[qIdx]" :disabled="item.questionStatus !== 3"
+                                    type="number" style="width: 70px">
+                                    <template #suffix>
+                                        <span class="text-unit">{{ item.indicators[qIdx]?.unit ?? item.indicators[0]?.unit
+                                            ?? '%' }}</span>
+                                    </template>
+                                </el-input>
+                            </div>
+                        </div>
+                        <div class="draw-region-btn" v-if="item.interactionTypeId != 1 && item.questionStatus === 3"
+                            @click="handleDrawRegion(item)">
+                            编辑发生区域</div>
+                        <div class="draw-region-btn" v-if="item.rangeWkt && item.questionStatus !== 3"
+                            @click="handleViewRegion(item)">
+                            查看发生区域</div>
                     </div>
-                </uploader>
-
-                <div class="question-wrapper" v-if="item.imagePaths.length">
-                    <div class="question-cont">
-                        <div class="question-text"
-                            v-for="(q, qIdx) in (item.questionList || [item.question].filter(Boolean))" :key="qIdx">
-                            <span class="text-title">{{ q }}</span>
-                            <el-input v-model="item.answerValues[qIdx]" :disabled="item.questionStatus !== 3"
-                                type="number" style="width: 70px">
-                                <template #suffix>
-                                    <span class="text-unit">{{ item.indicators[qIdx]?.unit ?? item.indicators[0]?.unit
-                                        ?? '%' }}</span>
-                                </template>
-                            </el-input>
+    
+                    <!-- 输入框 -->
+                    <div class="input-wrapper">
+                        <el-input v-model="item.replyText" :disabled="item.questionStatus !== 3" placeholder="请输入您咨询的问题"
+                            clearable />
+                    </div>
+    
+                    <!-- 按钮区域 -->
+                    <div class="button-group" v-show="item.questionStatus === 3">
+                        <div class="btn-not-reached" @click="handleConfirm(item, false)">{{ item.cancelButtonName }}</div>
+                        <div class="btn-default" :class="{ 'btn-confirm': item.imagePaths.length > 0 }"
+                            @click="handleConfirm(item, true)">
+                            确认提交
                         </div>
                     </div>
-                    <div class="draw-region-btn" v-if="item.interactionTypeId != 1 && item.questionStatus === 3"
-                        @click="handleDrawRegion(item)">
-                        编辑发生区域</div>
-                    <div class="draw-region-btn" v-if="item.rangeWkt && item.questionStatus !== 3"
-                        @click="handleViewRegion(item)">
-                        查看发生区域</div>
                 </div>
-
-                <!-- 输入框 -->
-                <div class="input-wrapper">
-                    <el-input v-model="item.replyText" :disabled="item.questionStatus !== 3" placeholder="请输入您咨询的问题"
-                        clearable />
-                </div>
-
-                <!-- 按钮区域 -->
-                <div class="button-group" v-show="item.questionStatus === 3">
-                    <div class="btn-not-reached" @click="handleConfirm(item, false)">{{ item.cancelButtonName }}</div>
-                    <div class="btn-default" :class="{ 'btn-confirm': item.imagePaths.length > 0 }"
-                        @click="handleConfirm(item, true)">
-                        确认提交
+    
+                <!-- 比例信息(已上传状态显示) -->
+                <div class="proportion-info" v-show="item.questionStatus !== 3"
+                    :style="{ justifyContent: item.expanded ? 'center' : 'space-between' }">
+                    <template v-if="!item.expanded">
+                        <span class="proportion-text">{{(item.questionList && item.questionList.length
+                            ? item.questionList.map((q, i) => q + ':' + (item.answerValues[i] ?? '') +
+                                (item.indicators[i]?.unit
+                                    ?? item.indicators[0]?.unit ?? '%')).join('')
+                            : item.question + ':' + (item.answerValues[0] ?? '') + (item.indicators[0]?.unit ?? '%'))
+                            }}</span>
+                    </template>
+                    <div class="toggle-btn" @click="toggleExpand(item)">
+                        <span>{{ item.expanded ? "收起" : "展开" }}</span>
+                        <el-icon :class="{ rotate: !item.expanded }">
+                            <CaretTop />
+                        </el-icon>
                     </div>
                 </div>
             </div>
-
-            <!-- 比例信息(已上传状态显示) -->
-            <div class="proportion-info" v-show="item.questionStatus !== 3"
-                :style="{ justifyContent: item.expanded ? 'center' : 'space-between' }">
-                <template v-if="!item.expanded">
-                    <span class="proportion-text">{{(item.questionList && item.questionList.length
-                        ? item.questionList.map((q, i) => q + ':' + (item.answerValues[i] ?? '') +
-                            (item.indicators[i]?.unit
-                                ?? item.indicators[0]?.unit ?? '%')).join('')
-                        : item.question + ':' + (item.answerValues[0] ?? '') + (item.indicators[0]?.unit ?? '%'))
-                        }}</span>
-                </template>
-                <div class="toggle-btn" @click="toggleExpand(item)">
-                    <span>{{ item.expanded ? "收起" : "展开" }}</span>
-                    <el-icon :class="{ rotate: !item.expanded }">
-                        <CaretTop />
-                    </el-icon>
-                </div>
-            </div>
+            <div class="empty-data" v-if="!loading && listData.length === 0">暂无数据</div>
         </div>
-        <div class="empty-data" v-if="!loading && listData.length === 0">暂无数据</div>
     </div>
 
     <!-- <div class="custom-bottom-fixed-btns" :class="{ 'center-btn': false }">
@@ -464,7 +473,7 @@ const showExample = (item, index, options = {}) => {
 const loadData = async () => {
     loading.value = true;
     try {
-        const { data } = await VE_API.home.listTriggeredByFarm({ farmId: localStorage.getItem("selectedFarmId") })
+        const { data } = await VE_API.home.listTriggeredByFarm({ farmId: 766 })
         listData.value = data.map(item => {
             // question 按 || 切割成数组,用于循环渲染
             const questionStr = item.question != null ? String(item.question) : '';
@@ -685,359 +694,385 @@ const handleSubmitAll = () => {
 
 </script>
 <style scoped lang="scss">
-.interaction-list {
+.interaction-list-wrapper{
     width: 100%;
     height: calc(100vh - 40px);
     background: #f2f4f5;
     padding: 12px;
     box-sizing: border-box;
     overflow-y: auto;
-
-    .list-item {
+    .interaction-card{
         background: #ffffff;
         border-radius: 6px;
         padding: 10px;
         border: 1px solid #ffffff;
-
-        &.uploaded-item {
-            border: 1px solid #2199f8;
+        margin-bottom: 10px;
+        img{
+            width: 100%;
+            height: 145px;
+            object-fit: cover;
+            border-radius: 2px;
         }
-
-        .item-header-wrapper {
-            .item-header {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-
-                div {
-                    font-size: 16px;
-                    color: #6f6f6f;
-                    font-family: "PangMenZhengDao";
-                    width: fit-content;
-                    background: rgba(143, 143, 143, 0.1);
-                    padding: 5px 10px;
-                    border-radius: 2px;
-                }
-
-                .status {
-                    color: #999999;
-                    background: #F1F1F1;
-
-                    &.urgent-0 {
-                        color: #2199f8;
-                        background: rgba(33, 153, 248, 0.1);
-                    }
-
-                    &.urgent-1 {
-                        color: #FF953D;
-                        background: rgba(255, 149, 61, 0.1);
-                    }
-
-                    &.urgent-2 {
-                        color: #EE4646;
-                        background: rgba(238, 70, 70, 0.1);
-                    }
-                }
+        .card-content{
+            color: #666666;
+            margin-top: 8px;
+            .card-title{
+                font-size: 16px;
+                color: #000000;
+                font-weight: 500;
+                margin-bottom: 4px;
             }
-
-            .upload-status {
-                display: flex;
-                align-items: center;
-                gap: 4px;
-                margin-left: 10px;
-
-                .status-icon {
-                    color: #2199f8;
-                    font-size: 17px;
-                }
-
-                .status-text {
-                    font-size: 14px;
-                    color: #2199f8;
-                }
+        }
+    }
+    .interaction-list {
+        width: 100%;
+        height: 100%;
+        .list-item {
+            background: #ffffff;
+            border-radius: 6px;
+            padding: 10px;
+            border: 1px solid #ffffff;
+    
+            &.uploaded-item {
+                border: 1px solid #2199f8;
             }
-
-            &.has-status {
-                display: flex;
-                justify-content: space-between;
-                align-items: center;
-
+    
+            .item-header-wrapper {
                 .item-header {
+                    display: flex;
+                    align-items: center;
+                    justify-content: space-between;
+    
                     div {
-                        color: #2199f8;
-                        background: rgba(33, 153, 248, 0.1);
+                        font-size: 16px;
+                        color: #6f6f6f;
+                        font-family: "PangMenZhengDao";
+                        width: fit-content;
+                        background: rgba(143, 143, 143, 0.1);
+                        padding: 5px 10px;
+                        border-radius: 2px;
+                    }
+    
+                    .status {
+                        color: #999999;
+                        background: #F1F1F1;
+    
+                        &.urgent-0 {
+                            color: #2199f8;
+                            background: rgba(33, 153, 248, 0.1);
+                        }
+    
+                        &.urgent-1 {
+                            color: #FF953D;
+                            background: rgba(255, 149, 61, 0.1);
+                        }
+    
+                        &.urgent-2 {
+                            color: #EE4646;
+                            background: rgba(238, 70, 70, 0.1);
+                        }
                     }
                 }
-            }
-        }
-
-        .expanded-content {
-            background: rgba(33, 153, 248, 0.1);
-            border-radius: 5px;
-            padding: 10px;
-            border: 0.5px solid #2199F8;
-            margin-top: 12px;
-
-            .uploaded-images {
-                display: flex;
-                flex-wrap: wrap;
-                gap: 8px;
-                margin-top: 8px;
-
-                .uploaded-img-wrap {
-                    position: relative;
-                    width: calc((100vw - 68px) / 4);
-                    height: calc((100vw - 68px) / 4);
-                }
-
-                .uploaded-img {
-                    width: 100%;
-                    height: 100%;
-                    border-radius: 4px;
-                    object-fit: cover;
+    
+                .upload-status {
+                    display: flex;
+                    align-items: center;
+                    gap: 4px;
+                    margin-left: 10px;
+    
+                    .status-icon {
+                        color: #2199f8;
+                        font-size: 17px;
+                    }
+    
+                    .status-text {
+                        font-size: 14px;
+                        color: #2199f8;
+                    }
                 }
-
-                .uploaded-img-remove {
-                    position: absolute;
-                    top: 0;
-                    right: 0;
-                    width: 18px;
-                    height: 18px;
+    
+                &.has-status {
                     display: flex;
-                    justify-content: center;
-                    background: rgba(0, 0, 0, 0.6);
-                    color: #fff;
-                    font-size: 14px;
-                    line-height: 16px;
-                    border-radius: 50%;
+                    justify-content: space-between;
+                    align-items: center;
+    
+                    .item-header {
+                        div {
+                            color: #2199f8;
+                            background: rgba(33, 153, 248, 0.1);
+                        }
+                    }
                 }
             }
-
-            .continue-upload-btn {
-                border: 0.5px solid rgba(33, 153, 248, 0.5);
-                border-radius: 4px;
-                background: #FFFFFF;
-                cursor: pointer;
-            }
-        }
-
-        .uploaded-content {
-            .content-wrapper {
-                border: 0.5px solid rgba(0, 0, 0, 0.1);
-                border-radius: 4px;
+    
+            .expanded-content {
+                background: rgba(33, 153, 248, 0.1);
+                border-radius: 5px;
                 padding: 10px;
+                border: 0.5px solid #2199F8;
                 margin-top: 12px;
-
-                .item-desc {
-                    color: #3C3C3C;
-                    margin-bottom: 10px;
-                    display: inline-block;
+    
+                .uploaded-images {
+                    display: flex;
+                    flex-wrap: wrap;
+                    gap: 8px;
+                    margin-top: 8px;
+    
+                    .uploaded-img-wrap {
+                        position: relative;
+                        width: calc((100vw - 68px) / 4);
+                        height: calc((100vw - 68px) / 4);
+                    }
+    
+                    .uploaded-img {
+                        width: 100%;
+                        height: 100%;
+                        border-radius: 4px;
+                        object-fit: cover;
+                    }
+    
+                    .uploaded-img-remove {
+                        position: absolute;
+                        top: 0;
+                        right: 0;
+                        width: 18px;
+                        height: 18px;
+                        display: flex;
+                        justify-content: center;
+                        background: rgba(0, 0, 0, 0.6);
+                        color: #fff;
+                        font-size: 14px;
+                        line-height: 16px;
+                        border-radius: 50%;
+                    }
                 }
-
-                .tip-box {
-                    font-size: 12px;
-                    color: #2199F8;
-                    padding: 3px 5px;
+    
+                .continue-upload-btn {
+                    border: 0.5px solid rgba(33, 153, 248, 0.5);
                     border-radius: 4px;
-                    margin-bottom: 10px;
-                    background: linear-gradient(90deg, rgba(33, 153, 248, 0.2) 0%, rgba(221, 221, 221, 0) 100%);
+                    background: #FFFFFF;
+                    cursor: pointer;
                 }
-
-                .example-wrapper {
-                    .example-header {
-                        display: flex;
-                        align-items: center;
-                        justify-content: space-between;
-                        margin-bottom: 8px;
-                        color: #BEB9B9;
-
-                        .more {
-                            font-size: 12px;
-                        }
+            }
+    
+            .uploaded-content {
+                .content-wrapper {
+                    border: 0.5px solid rgba(0, 0, 0, 0.1);
+                    border-radius: 4px;
+                    padding: 10px;
+                    margin-top: 12px;
+    
+                    .item-desc {
+                        color: #3C3C3C;
+                        margin-bottom: 10px;
+                        display: inline-block;
                     }
-
-                    .example-list {
-                        display: flex;
-                        align-items: center;
-                        overflow: hidden;
-
-                        .image-item-wrapper {
-                            position: relative;
-                            margin-right: 6px;
-
-                            &::after {
-                                content: '示例';
-                                position: absolute;
-                                top: 0;
-                                left: 0;
-                                background: rgba(0, 0, 0, 0.7);
-                                color: #F2F4F5;
-                                padding: 2px 6px;
-                                border-radius: 8px 0 2px 0;
-                                font-size: 10px;
-                                z-index: 1;
+    
+                    .tip-box {
+                        font-size: 12px;
+                        color: #2199F8;
+                        padding: 3px 5px;
+                        border-radius: 4px;
+                        margin-bottom: 10px;
+                        background: linear-gradient(90deg, rgba(33, 153, 248, 0.2) 0%, rgba(221, 221, 221, 0) 100%);
+                    }
+    
+                    .example-wrapper {
+                        .example-header {
+                            display: flex;
+                            align-items: center;
+                            justify-content: space-between;
+                            margin-bottom: 8px;
+                            color: #BEB9B9;
+    
+                            .more {
+                                font-size: 12px;
                             }
                         }
-
-                        .image-item {
-                            width: calc((100vw - 68px) / 4);
-                            height: calc((100vw - 68px) / 4);
-                            border-radius: 8px;
-                            object-fit: cover;
+    
+                        .example-list {
+                            display: flex;
+                            align-items: center;
+                            overflow: hidden;
+    
+                            .image-item-wrapper {
+                                position: relative;
+                                margin-right: 6px;
+    
+                                &::after {
+                                    content: '示例';
+                                    position: absolute;
+                                    top: 0;
+                                    left: 0;
+                                    background: rgba(0, 0, 0, 0.7);
+                                    color: #F2F4F5;
+                                    padding: 2px 6px;
+                                    border-radius: 8px 0 2px 0;
+                                    font-size: 10px;
+                                    z-index: 1;
+                                }
+                            }
+    
+                            .image-item {
+                                width: calc((100vw - 68px) / 4);
+                                height: calc((100vw - 68px) / 4);
+                                border-radius: 8px;
+                                object-fit: cover;
+                            }
+                        }
+                    }
+    
+                    .patrol-suggestion {
+                        color: rgba(60, 60, 60, 0.4);
+                        margin-top: 10px;
+    
+                        .action-text {
+                            color: #727272;
                         }
                     }
                 }
-
-                .patrol-suggestion {
-                    color: rgba(60, 60, 60, 0.4);
-                    margin-top: 10px;
-
-                    .action-text {
-                        color: #727272;
+    
+                .upload-wrap {
+                    width: 100%;
+                    margin-top: 12px;
+    
+                    ::v-deep {
+                        .van-uploader__input-wrapper {
+                            width: 100%;
+                        }
+                    }
+    
+                    .upload-btn {
+                        width: 100%;
+                        display: flex;
+                        align-items: center;
+                        justify-content: center;
+                        gap: 4px;
+                        color: #0B84E4;
+                        padding: 6px;
+                        border: 0.5px solid rgba(33, 153, 248, 0.5);
+                        border-radius: 4px;
+                        box-sizing: border-box;
                     }
                 }
             }
-
-            .upload-wrap {
-                width: 100%;
+    
+            .input-wrapper {
+                margin: 12px 0;
+            }
+    
+            .button-group {
+                display: flex;
+                gap: 12px;
+    
+                .btn-not-reached,
+                .btn-default {
+                    flex: 1;
+                    text-align: center;
+                    border-radius: 4px;
+                    padding: 6px;
+                }
+    
+                .btn-not-reached {
+                    max-width: fit-content;
+                    background: #fff;
+                    color: #585858;
+                    border: 1px solid rgba(88, 88, 88, 0.2);
+                }
+    
+                .btn-default {
+                    background: #F1F1F1;
+                    color: #999999;
+                    border: 1px solid #F1F1F1;
+                }
+    
+                .btn-confirm {
+                    background: #2199f8;
+                    color: #ffffff;
+                    border: 1px solid #2199f8;
+                }
+            }
+    
+            .proportion-info {
+                display: flex;
+                justify-content: space-between;
+                align-items: center;
                 margin-top: 12px;
-
-                ::v-deep {
-                    .van-uploader__input-wrapper {
-                        width: 100%;
-                    }
+    
+                .proportion-text {
+                    color: #969696;
+                    font-size: 14px;
+                    white-space: nowrap;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                    flex: 1;
+                    margin-right: 10px;
                 }
-
-                .upload-btn {
-                    width: 100%;
+    
+                .toggle-btn {
                     display: flex;
                     align-items: center;
-                    justify-content: center;
-                    gap: 4px;
-                    color: #0B84E4;
-                    padding: 6px;
-                    border: 0.5px solid rgba(33, 153, 248, 0.5);
-                    border-radius: 4px;
-                    box-sizing: border-box;
+                    gap: 2px;
+                    color: #8D8D8D;
+                    padding: 2px 10px;
+                    border: 1px solid rgba(0, 0, 0, 0.2);
+                    font-size: 12px;
+                    border-radius: 25px;
+                    background: #FFFFFF;
+    
+                    .rotate {
+                        transform: rotate(180deg);
+                    }
                 }
             }
         }
-
-        .input-wrapper {
-            margin: 12px 0;
+    
+        .list-item+.list-item {
+            margin-top: 12px;
         }
-
-        .button-group {
-            display: flex;
-            gap: 12px;
-
-            .btn-not-reached,
-            .btn-default {
-                flex: 1;
-                text-align: center;
-                border-radius: 4px;
-                padding: 6px;
-            }
-
-            .btn-not-reached {
-                max-width: fit-content;
-                background: #fff;
-                color: #585858;
-                border: 1px solid rgba(88, 88, 88, 0.2);
-            }
-
-            .btn-default {
-                background: #F1F1F1;
-                color: #999999;
-                border: 1px solid #F1F1F1;
-            }
-
-            .btn-confirm {
-                background: #2199f8;
-                color: #ffffff;
-                border: 1px solid #2199f8;
-            }
+    
+        .empty-data {
+            text-align: center;
+            padding: 40px 0;
+            color: #999999;
+            font-size: 14px;
         }
-
-        .proportion-info {
+    
+        .question-wrapper {
             display: flex;
+            align-items: flex-start;
             justify-content: space-between;
-            align-items: center;
-            margin-top: 12px;
-
-            .proportion-text {
-                color: #969696;
-                font-size: 14px;
-                white-space: nowrap;
-                overflow: hidden;
-                text-overflow: ellipsis;
-                flex: 1;
-                margin-right: 10px;
-            }
-
-            .toggle-btn {
+            gap: 10px;
+            margin: 12px 0 6px;
+            box-sizing: border-box;
+            width: 100%;
+    
+            .question-text {
+                background: #ffffff;
+                color: #6f6f6f;
                 display: flex;
                 align-items: center;
-                gap: 2px;
-                color: #8D8D8D;
-                padding: 2px 10px;
-                border: 1px solid rgba(0, 0, 0, 0.2);
-                font-size: 12px;
-                border-radius: 25px;
-                background: #FFFFFF;
-
-                .rotate {
-                    transform: rotate(180deg);
+    
+                .text-title {
+                    margin-right: 5px;
+                }
+    
+                .text-unit {
+                    margin-left: 4px;
                 }
             }
-        }
-    }
-
-    .list-item+.list-item {
-        margin-top: 12px;
-    }
-
-    .empty-data {
-        text-align: center;
-        padding: 40px 0;
-        color: #999999;
-        font-size: 14px;
-    }
-
-    .question-wrapper {
-        display: flex;
-        align-items: flex-start;
-        justify-content: space-between;
-        gap: 10px;
-        margin: 12px 0 6px;
-        box-sizing: border-box;
-        width: 100%;
-
-        .question-text {
-            background: #ffffff;
-            color: #6f6f6f;
-            display: flex;
-            align-items: center;
-
-            .text-title {
-                margin-right: 5px;
+    
+            .question-text+.question-text {
+                margin-top: 6px;
             }
-
-            .text-unit {
-                margin-left: 4px;
+    
+            .draw-region-btn {
+                background: rgba(33, 153, 248, 0.1);
+                border-radius: 4px;
+                padding: 6px 10px;
+                color: #2199f8;
             }
         }
-
-        .question-text+.question-text {
-            margin-top: 6px;
-        }
-
-        .draw-region-btn {
-            background: rgba(33, 153, 248, 0.1);
-            border-radius: 4px;
-            padding: 6px 10px;
-            color: #2199f8;
-        }
     }
 }
 

+ 0 - 73
src/views/old_mini/user/components/addPopup.vue

@@ -1,73 +0,0 @@
-<template>
-    <popup class="add-popup" round v-model:show="showAddPopup" :close-on-click-overlay="false">
-        <div class="popup-title">添加分组</div>
-        <el-input class="popup-input" v-model="input" placeholder="分组名" size="large" />
-        <div class="popup-button">
-            <div class="cancel" @click="showAddPopup = false">取消</div>
-            <div class="confirm" @click="handleConfirm">确定</div>
-        </div>
-    </popup>
-</template>
-
-<script setup>
-import { ref, watch } from "vue";
-import { Popup} from "vant";
-
-const props = defineProps({
-    show:{
-        type:Boolean,
-        defalut:false
-    }
-})
-const input = ref("");
-
-const showAddPopup = ref(false)
-
-watch(()=>props.show,()=>{
-    input.value = ""
-    showAddPopup.value = true
-})
-
-const emit = defineEmits(["confirm"]);
-
-const handleConfirm = () => {
-    showAddPopup.value = false;
-    emit("confirm", input.value);
-}
-</script>
-
-<style lang="scss" scoped>
-.add-popup{
-    width: 90%;
-    padding: 20px 16px;
-    .popup-title{
-        font-size: 18px;
-        font-weight: 500;
-        text-align: center;
-        margin-bottom: 12px;
-    }
-    .popup-input{
-        margin-bottom: 30px;
-    }
-    .popup-button{
-        display: flex;
-        padding-top: 20px;
-        border-top: 1px solid rgba(0, 0, 0, 0.1);
-        div{
-            flex: 1;
-            font-size: 16px;
-            padding: 9px;
-            border-radius: 20px;
-            background: #2199F8;
-            color: #fff;
-            text-align: center;
-        }
-        .cancel{
-            margin-right: 20px;
-            color: #000;
-            background: #fff;
-            border: 1px solid #999999;
-        }
-    }
-}
-</style>

+ 0 - 676
src/views/old_mini/user/farmDetails.vue

@@ -1,676 +0,0 @@
-<template>
-    <div class="farm-details-page">
-        <custom-header name="农场详情"></custom-header>
-        <div class="farm-details-content">
-            <!-- <farm-info-card
-                v-if="farmDetail.name"
-                :data="{
-                    farmName: farmDetail.name || '',
-                    userType: farmDetail.userType || '托管客户',
-                    variety: farmDetail.typeName || '',
-                    address: farmDetail.address || '',
-                }"
-                @click="handleFarmInfo"
-            >
-                <template #right>
-                    <div @click="handleDetail('plan')">农事规划</div>
-                </template>
-            </farm-info-card> -->
-            <tabs v-model:active="activeTab" class="custom-tabs" scrollspy sticky offset-top="40" background="#F2F3F5">
-                <tab title="作物档案" class="tab-item">
-                    <common-box title="作物档案">
-                        <template #right>
-                            <span @click="handleDetail('crop_record')">查看详情</span>
-                        </template>
-                        <template v-if="farmWorkData.length">
-                            <div class="farm-work-timeline">
-                                <div
-                                    class="farm-work-item"
-                                    v-for="(item, index) in farmWorkData"
-                                    :key="index"
-                                >
-                                    <div class="timeline-left">
-                                        <div class="timeline-dot"></div>
-                                        <div class="timeline-line"></div>
-                                    </div>
-                                    <div class="timeline-right">
-                                        <div class="farm-work-card" :class="['card-' + getRecordTypeText(item.speakTitleName), , {'is-future': item.isFuture}]">
-                                            <div class="type-box">{{ item.speakTitleName }}</div>
-                                            <div class="farm-work-date" v-html="item.content.renderedContent"></div>
-                                            <!-- <div class="farm-work-desc">
-                                                <span class="farm-work-action">{{ item.action }}</span>
-                                                <span class="farm-work-content">{{ item.content }}</span>
-                                                <span>{{ item.text }}</span>
-                                            </div> -->
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                        </template>
-                        <empty
-                            v-else
-                            image="https://birdseye-img.sysuimars.com/birdseye-look-mini/custom-empty-image.png"
-                            image-size="80"
-                            description="暂无数据"
-                            class="empty-state"
-                        />
-                    </common-box>
-                </tab>
-                <tab title="农事服务" class="tab-item">
-                    <common-box title="农事服务">
-                        <template #right>
-                            <span @click="handleDetail('service_list')">查看详情</span>
-                        </template>
-                        <tab-list
-                            type="light"
-                            v-model="farmServiceActiveTab"
-                            :tabs="farmServiceTabs"
-                            @change="handleFarmServiceTabChange"
-                        />
-                        <stats-box :stats-data="serviceStatsData" />
-                        <div v-for="(section, index) in detailList" :key="index" class="content-section">
-                            <record-item
-                                :record-item-data="section"
-                                onlyRecipeName
-                                :content-mode="farmServiceActiveTab === 0 ? 'serviceDetail' : ''"
-                                title-mode="default"
-                                :title-right-text="farmServiceActiveTab === 0 ? '生成成果报告' : ''"
-                                :title-right-type="farmServiceActiveTab === 1 ? 'dot' : null"
-                                :title-right-dot-text="farmServiceActiveTab === 1 ? '全区' : ''"
-                                class="recipe-item"
-                                @titleRightClick="handleTitleRightClick"
-                            />
-                        </div>
-                        <empty
-                            v-if="detailList.length === 0"
-                            image="https://birdseye-img.sysuimars.com/birdseye-look-mini/custom-empty-image.png"
-                            image-size="80"
-                            description="暂无数据"
-                            class="empty-state"
-                        />
-                    </common-box>
-                </tab>
-                <tab title="作物相册" class="tab-item">
-                    <common-box title="作物相册">
-                        <template #right>
-                            <span @click="handleShareReport()">查看更多</span>
-                        </template>
-                        <div class="photo-img-wrap" v-loading="imgsLoading">
-                            <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>
-                    </common-box>
-                </tab>
-            </tabs>
-        </div>
-        <div class="custom-bottom-fixed-btns center-btn">
-            <div class="bottom-btn primary-btn" @click="handleShareFarm">分享认领农场</div>
-            <!-- <div class="bottom-btn primary-btn" @click="handleChatFarm">在线沟通</div> -->
-        </div>
-    </div>
-    <fn-share-sheet v-model:show="showShare" @select="onSelect" :options="[{ name: '微信', icon: 'wechat' }]" />
-    <!-- 农场信息 -->
-    <farm-info-popup
-        ref="farmInfoRef"
-        :farmId="farmIdVal"
-        :showEditBtn="!farmDetail.farmersMiniUserId"
-        :showBtn="true"
-    ></farm-info-popup>
-</template>
-
-<script setup>
-import { ref, onMounted } from "vue";
-import { useRoute, useRouter } from "vue-router";
-import { Tab, Tabs, Empty } from "vant";
-import { base_img_url2, resize_300 } from "@/api/config";
-import wx from "weixin-js-sdk";
-import customHeader from "@/components/customHeader.vue";
-// import FarmInfoCard from "@/components/pageComponents/FarmInfoCard.vue";
-import tabList from "@/components/pageComponents/TabList.vue";
-import commonBox from "@/components/pageComponents/CommonBox.vue";
-import StatsBox from "@/components/pageComponents/StatsBox.vue";
-import recordItem from "@/components/recordItem.vue";
-import farmInfoPopup from "../home/components/farmInfoPopup.vue";
-import FnShareSheet from "@/components/pageComponents/FnShareSheet.vue";
-import config from "@/api/config";
-import { ElMessage } from "element-plus";
-const router = useRouter();
-const route = useRoute();
-const activeTab = ref(0);
-const farmServiceTabs = ["过往服务", "未来服务"];
-const farmServiceActiveTab = ref(0);
-
-const farmInfoRef = ref(null);
-const handleFarmInfo = () => {
-    farmInfoRef.value.handleShow();
-};
-
-const handleFarmServiceTabChange = (index) => {
-    if (index === 0) {
-        getFarmPastServiceCost();
-        getDetailList();
-    } else {
-        getFutureFarmWorkWarning()
-    }
-};
-
-const getFutureFarmWorkWarning = async () => {
-    const {data} = await VE_API.home.listFutureFarmWorkWarning({ farmId: farmIdVal.value });
-    let totalCost = 0;
-    if (data.length > 0) {
-        totalCost = data.reduce((acc, item) => acc + item.estimatedCost, 0);
-        detailList.value = data.slice(0, 1);
-    }
-    serviceStatsData.value = [
-        { value: totalCost || 0, unit: "元", desc: "预计成交额" },
-        { value: data.length || 0, unit: "次", desc: "预计服务次数" },
-    ];
-};
-
-const serviceStatsData = ref([]);
-
-onMounted(() => {
-    farmIdVal.value = route.query.farmId;
-    paramsPage.value = {
-        farmId: farmIdVal.value,
-        limit: 1,
-        page: 1,
-    };
-    getFarmDetail();
-    getFarmWorkList();
-    getDetailList();
-    getFarmPastServiceCost();
-
-    // 获取图片数据
-    getFarmPhoto();
-});
-
-const farmIdVal = ref(null);
-const farmDetail = ref({});
-const paramsPage = ref({});
-const getFarmDetail = () => {
-    VE_API.user.getFarmDetail({ farmId: farmIdVal.value }).then(({ data }) => {
-        farmDetail.value = data || {};
-    });
-};
-
-const farmWorkData = ref([]);
-const typeObj = {
-    物候: '1',
-    异常: '2',
-    病虫: '3',
-    农事: '4',
-}
-
-const getRecordTypeText = (recordType) => {
-    return typeObj[recordType];
-}
-const getFarmWorkList = () => {
-    VE_API.container_phenology.getFarmSpeakInfo({ farmId: farmIdVal.value }).then(({ data }) => {
-        const list = data || [];
-        const res = list.filter(item => item.content.hasException !== 0);
-        getPhenologyBroadcast();
-        // 只展示前三条数据
-        farmWorkData.value = res.slice(0, 3);
-    });
-};
-
-const getPhenologyBroadcast = () => {
-    VE_API.container_phenology.phenologyBroadcast({ farmId: farmIdVal.value }).then(({ data }) => {
-        farmWorkData.value.push({
-            speakTitleName: "物候",
-            isFuture: true,
-            content: {
-                renderedContent: data.content,
-            },
-        });
-    });
-};
-
-const cropAlbum = ref([]);
-const imgsLoading = ref(false);
-// 获取作物相册的三张照片(参考 patrolPhoto 的获取逻辑)
-const getFarmPhoto = async () => {
-    if (!farmIdVal.value) return;
-    imgsLoading.value = true;
-    try {
-        // 先获取有图片的日期列表
-        const dateParams = {
-            farmId: farmIdVal.value,
-            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: farmIdVal.value,
-                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 = [];
-    } finally {
-        imgsLoading.value = false;
-    }
-};
-
-const detailList = ref([]);
-const getDetailList = () => {
-    VE_API.user.farmServiceRecord({ farmId: farmIdVal.value }).then(({ data }) => {
-        if(data.length > 0) {
-            detailList.value = [data[0]];
-        } else {
-            detailList.value = [];
-        }
-    });
-};
-
-const getFarmPastServiceCost = () => {
-    VE_API.user.getFarmPastServiceCost({ farmId: farmIdVal.value }).then(({ data }) => {
-        serviceStatsData.value = [
-            { value: data?.totalCost, unit: "元", desc: "成交额" },
-            { value: data?.serviceCount, unit: "次", desc: "服务次数" },
-        ];
-    });
-};
-const handleDetail = (path) => {
-    router.push(`/${path}?farmId=${farmIdVal.value}&agriculturalStoreId=${route.query.agriculturalStoreId}`);
-};
-
-const handleShareReport = () => {
-    router.push({
-        path: "/farm_photo",
-        query: {
-            // miniJson: JSON.stringify({ farmId: farmIdVal.value }),
-            farmId: farmIdVal.value 
-        },
-    });
-};
-
-const showShare = ref(false);
-const handleShareFarm = () => {
-    showShare.value = true;
-};
-
-const handleChatFarm = () => {
-    if (route.query.receiveUserId != "null") {
-        router.push(`/chat_frame?userId=${route.query.receiveUserId}&farmId=${farmIdVal.value}`);
-    } else {
-        ElMessage.warning("尚未绑定用户,暂时无法沟通");
-    }
-};
-
-const onSelect = () => {
-    const query = {
-        agriculturalStoreId: route.query.agriculturalStoreId,
-        farmId: route.query.farmId,
-        containerId: farmDetail.value.containerId,
-        speciesName: farmDetail.value.speciesName,
-        // receiveUserId: route.query.receiveUserId,
-    };
-    wx.miniProgram.navigateTo({
-        url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=shareFarm`,
-    });
-};
-
-const handleTitleRightClick = (section) => {
-    router.push({
-        path: "/achievement_report",
-        query: { miniJson: JSON.stringify({ id: section.id }) },
-    });
-};
-</script>
-
-<style scoped lang="scss">
-.farm-details-page {
-    width: 100%;
-    height: 100vh;
-    background: #F2F3F5;
-    .center-btn {
-        justify-content: center;
-    }
-    .farm-details-content {
-        box-sizing: border-box;
-        padding: 10px 12px;
-        overflow: auto;
-        height: calc(100% - 40px - 60px);
-        box-sizing: border-box;
-        .custom-tabs {
-            ::v-deep {
-                .van-tabs__wrap {
-                    height: auto;
-                }
-                .van-tabs__nav {
-                    .van-tab {
-                        color: #8b8b8b;
-                        background: #F7F8FA;
-                        height: 34px;
-                        font-weight: 400;
-                        border-radius: 25px;
-                        width: fit-content;
-                        flex: none;
-                        padding: 0 12px;
-                        margin-right: 8px;
-                    }
-                    .van-tab--active {
-                        color: #fff;
-                        background: #2199f8;
-                        font-weight: 400;
-                    }
-                }
-
-                .van-tabs__line {
-                    display: none;
-                }
-                .van-tabs__nav--line {
-                    padding: 12px 0;
-                }
-            }
-            .tab-item + .tab-item {
-                margin-top: 12px;
-            }
-
-            .photo-img-wrap {
-                display: flex;
-                flex-wrap: wrap;
-                gap: 10px;
-                ::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;
-                    }
-                }
-            }
-        }
-        .question-header {
-            display: flex;
-            align-items: center;
-            margin-bottom: 6px;
-            gap: 8px;
-            font-weight: 500;
-            .question-icon {
-                width: 22px;
-                height: 20px;
-            }
-        }
-        .answer-content {
-            color: #333333;
-            margin: 6px 0 10px 0;
-        }
-        .answer-img {
-            display: flex;
-            gap: 5px;
-            img {
-                flex: 1;
-                max-width: 105px;
-                height: 105px;
-                border-radius: 5px;
-                object-fit: cover;
-            }
-        }
-        .content-section {
-            .recipe-item {
-                border: 1px solid rgba(0, 0, 0, 0.1);
-                margin: 12px 0 0 0;
-            }
-        }
-        .plan-tab-item {
-            .recipe-item {
-                padding: 0;
-            }
-        }
-        .plan-list-wrapper {
-            height: 500px;
-            margin-top: 12px;
-        }
-        .report-content {
-            font-size: 13px;
-        }
-        .answer-btn {
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            margin-top: 10px;
-            > div {
-                display: flex;
-                gap: 10px;
-            }
-        }
-        .answer-btn-item {
-            padding: 7px 12px;
-            border-radius: 25px;
-            font-size: 12px;
-            text-align: center;
-            background: rgba(33, 153, 248, 0.1);
-            color: #2199f8;
-            min-width: 52px;
-            box-sizing: border-box;
-            &.primary {
-                background: #2199f8;
-                color: #ffffff;
-            }
-        }
-        .empty-state {
-            ::v-deep .van-empty {
-                padding: 40px 0;
-            }
-        }
-        .footer-data {
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            gap: 12px;
-            margin-top: 12px;
-            .footer-l {
-                display: flex;
-                gap: 8px;
-                flex: 1;
-                .farm-info-footer-item {
-                    display: flex;
-                    border: 0.4px solid rgba(215, 215, 215, 0.5);
-                    padding: 8px 5px 5px;
-                    box-sizing: border-box;
-                    .farm-info-footer-item-label {
-                        font-size: 12px;
-                        color: rgba(32, 32, 32, 0.4);
-                        margin-bottom: 4px;
-                    }
-                    .farm-info-footer-item-value {
-                        font-size: 16px;
-                        color: #202020;
-                        padding-left: 2px;
-                        .unit {
-                            font-size: 12px;
-                            padding-left: 2px;
-                            color: rgba(32, 32, 32, 0.4);
-                        }
-                    }
-                }
-            }
-            .footer-action {
-                border: 0.5px solid #888B8D;
-                border-radius: 20px;
-                padding: 5px 12px;
-                font-size: 12px;
-                color: #888B8D;
-                white-space: nowrap;
-                cursor: pointer;
-                flex-shrink: 0;
-            }
-        }
-        .farm-work-timeline {
-            padding: 10px 0;
-            .farm-work-item {
-                display: flex;
-                align-items: flex-start;
-                position: relative;
-                &:not(:last-child) {
-                    margin-bottom: 20px;
-                }
-                .timeline-left {
-                    display: flex;
-                    flex-direction: column;
-                    align-items: center;
-                    margin-right: 12px;
-                    position: relative;
-                    .timeline-dot {
-                        width: 6px;
-                        height: 6px;
-                        border-radius: 50%;
-                        border: 1px solid #2199f8;
-                        flex-shrink: 0;
-                        z-index: 1;
-                    }
-                    .timeline-line {
-                        width: 1px;
-                        height: 48px;
-                        background: #e5e6eb;
-                        position: absolute;
-                        top: 8px;
-                    }
-                }
-                .timeline-right {
-                    flex: 1;
-                    .farm-work-card {
-                        border: 1px solid #8bccff;
-                        border-radius: 4px;
-                        background: #f8fcff;
-                        padding: 12px;
-                        display: flex;
-                        align-items: center;
-                        color: #1d2129;
-                        font-size: 14px;
-                        line-height: 22px;
-                        display: flex;
-                        align-items: center;
-                        &.card-1 {
-                            border: 1px solid #8BCCFF;
-                            .type-box {
-                                background: #2199F8;
-                            }
-                            .farm-work-content {
-                                color: #2199F8;
-                            }
-                        }
-                        &.card-4 {
-                            border: 1px solid #FFBB83;
-                            .type-box {
-                                background: #FF953D;
-                            }
-                            .farm-work-content {
-                                color: #FF953D;
-                            }
-                        }
-                        &.card-2, &.card-3 {
-                            border: 1px solid #FF9C9C;
-                            .type-box {
-                                background: #FD7676;
-                            }
-                            .farm-work-content {
-                                color: #FD7676;
-                            }
-                        }
-                        &.is-future {
-                            padding: 0 12px;
-                            // opacity: 0.5;
-                            background: rgba(246, 250, 255, 0.5);
-                            .type-box {
-                                background: rgba(33, 153, 248, 0.5);
-                            }
-                            .farm-work-content {
-                                color: rgba(29, 33, 41, 0.5);
-                            }
-                        }
-                        .type-box {
-                            margin-right: 12px;
-                            padding: 0 5px;
-                            height: 20px;
-                            line-height: 20px;
-                            font-size: 12px;
-                            flex: none;
-                            color: #fff;
-                            border-radius: 0 4px 0 4px;
-                        }
-                        .farm-work-date {
-                            padding-right: 4px;
-                        }
-                        .farm-work-desc {
-                            .farm-work-action {
-                                padding-right: 4px;
-                            }
-                            .farm-work-content {
-                                padding-right: 4px;
-                            }
-                        }
-                    }
-                }
-                &.is-estimated {
-                    .timeline-right {
-                        .farm-work-card {
-                            background: rgba(246, 250, 255, 0.5);
-                            border: 1px solid rgba(190, 218, 255, 0.5);
-                            .farm-work-date,
-                            .farm-work-desc {
-                                color: rgba(29, 33, 41, 0.5);
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-}
-</style>

+ 0 - 432
src/views/old_mini/user/index.vue

@@ -1,432 +0,0 @@
-<template>
-    <div class="user-index" :style="{ height: `calc(100vh - ${tabBarHeight}px)` }">
-        <div class="user-header">
-            <!-- <el-input class="search" v-model="input" placeholder="搜索">
-                <template #prefix>
-                    <el-icon><search /></el-icon>
-                </template>
-            </el-input> -->
-            <div class="button" @click="handleAddClient">
-                <img src="@/assets/img/mine/firend-icon.png" alt="" />
-                新增客户
-            </div>
-        </div>
-        <div class="list">
-            <div class="map-container" ref="mapContainer"></div>
-
-            <collapse v-model="activeNames" class="collapse-list">
-                <collapse-item :name="index" v-for="(item, index) in dataList" :key="index" :is-link="false">
-                    <template #title>
-                        <el-icon class="icon"><CaretRight /></el-icon>
-                        {{ item.name }}
-                        <span class="span">{{ item.children?.length || 0 }}</span>
-                    </template>
-                    <!-- <farm-info-card
-                        v-for="ele in item.children"
-                        :key="ele.agriculturalStoreId"
-                        class="list-item"
-                        :data="{
-                            ...ele,
-                            farmName: ele.name,
-                            userType: ele.userType || '--',
-                            variety: ele.speciesName,
-                            address: ele.address,
-                            noAction: true,
-                            maxWidth: '100%',
-                            customRight: 'tag-right',
-                        }"
-                        @click="handleItemClick(ele)"
-                    >
-                        <template #footerData>
-                            <div class="footer-data">
-                                <div class="footer-l">
-                                    <div class="farm-info-footer-item">
-                                        <div class="farm-info-footer-item-label">农事服务</div>
-                                        <div class="farm-info-footer-item-value">{{ ele.serviceCost?.serviceCount || 0 }}<span class="unit">次</span></div>
-                                    </div>
-                                    <div class="farm-info-footer-item">
-                                        <div class="farm-info-footer-item-label">总收益</div>
-                                        <div class="farm-info-footer-item-value">{{ ele.serviceCost?.totalCost || 0 }}<span class="unit">元</span></div>
-                                    </div>
-                                </div>
-                                <div class="footer-action" @click.stop="handleDetail('plan', ele.id, ele.agriculturalStoreId, ele.schemeId)">农事规划</div>
-                            </div>
-                        </template>
-                    </farm-info-card> -->
-                </collapse-item>
-            </collapse>
-        </div>
-        <!-- <div class="footer">
-            <div class="btn" @click="showPopup">新建分组</div>
-        </div> -->
-    </div>
-    <!-- 添加分组弹窗 -->
-    <add-popup :show="showGroupPopup"></add-popup>
-    <fn-share-sheet class="share-sheet" v-model:show="showShare" @select="onSelect" :options="[{ name: '微信', icon: 'wechat' }]" />
-</template>
-
-<script setup>
-import { Collapse, CollapseItem } from "vant";
-import { ref, onMounted, computed, nextTick, onActivated } from "vue";
-import wx from "weixin-js-sdk";
-import { useRouter } from "vue-router";
-import addPopup from "./components/addPopup.vue";
-// import FarmInfoCard from "@/components/pageComponents/FarmInfoCard.vue";
-import { useStore } from "vuex";
-import FnShareSheet from "@/components/pageComponents/FnShareSheet.vue";
-import IndexMap from "../farm_manage/map/index";
-
-const router = useRouter();
-const store = useStore();
-const tabBarHeight = computed(() => store.state.home.tabBarHeight);
-
-const indexMap = new IndexMap();
-const mapContainer = ref(null);
-
-onMounted(() => {
-    const point = store.state.home.miniUserLocationPoint;
-    nextTick(() => {
-        indexMap.initMap(point, mapContainer.value, true);
-    });
-});
-
-onActivated(() => {
-    // 确保地图已初始化,使用 nextTick 等待 DOM 更新
-    nextTick(() => {
-        // 检查地图实例是否已初始化,并且绑定到正确的容器
-        const isMapValid = indexMap.kmap && 
-                          indexMap.kmap.map && 
-                          mapContainer.value &&
-                          indexMap.kmap.map.getTargetElement() === mapContainer.value;
-        
-        if (!isMapValid) {
-            // 如果地图未初始化或绑定到错误的容器,重新初始化
-            if (mapContainer.value) {
-                const point = store.state.home.miniUserLocationPoint;
-                indexMap.initMap(point, mapContainer.value, true);
-                // 等待地图初始化完成后再加载数据
-                setTimeout(() => {
-                    getUserList();
-                }, 200);
-            } else {
-                getUserList();
-            }
-        } else {
-            // 如果地图已初始化且绑定正确,更新地图尺寸(解决页面切换后地图不显示的问题)
-            setTimeout(() => {
-                indexMap.kmap.map.updateSize();
-            }, 100);
-            // 地图已存在,直接加载数据(数据加载完成后会自动调用 initData 更新缩放)
-            getUserList();
-        }
-    });
-});
-
-const activeNames = ref([1]);
-const dataList = ref([
-    {
-        name: "Vip客户",
-        isGroup: 0,
-        children: [],
-    },
-    {
-        name: "农场客户",
-        isGroup: 1,
-        children: [],
-    },
-]);
-const getUserList = async () => {
-    const { data } = await VE_API.farm.userFarmSelectOption({ agriculturalQuery: true });
-    if (data.length) {
-        indexMap.initData(data, 'name','point');
-        // 清空现有的子项
-        dataList.value[0].children = [];
-        dataList.value[1].children = data || [];
-        
-        // 为每个数据项的ID请求getFarmPastServiceCost,并将返回的数据添加到每一项中
-        const promises = data.map(async (item) => {
-            const farmId = item.id || item.farmId;
-            if (farmId) {
-                try {
-                    const { data: serviceCostData } = await VE_API.user.getFarmPastServiceCost({ farmId });
-                    // 将返回的数据添加到当前项中
-                    return {
-                        ...item,
-                        serviceCost: serviceCostData || {},
-                    };
-                } catch (error) {
-                    console.error(`获取农场 ${farmId} 的服务成本失败:`, error);
-                    // 如果请求失败,返回原数据
-                    return {
-                        ...item,
-                        serviceCost: {},
-                    };
-                }
-            }
-            return item;
-        });
-        
-        // 等待所有请求完成
-        const updatedData = await Promise.all(promises);
-        // 更新数据列表
-        dataList.value[1].children = updatedData;
-    }
-};
-
-const getLatestBroadcast = () => {
-    VE_API.user.getLatestBroadcast({sourceTypes:[0,1]}).then(({ data }) => {
-        if (data && typeof data === 'object') {
-            // 遍历广播数据,key 是 farmId(字符串格式)
-            Object.keys(data).forEach(farmIdStr => {
-                const farmId = Number(farmIdStr);
-                const broadcasts = data[farmIdStr] || [];
-                
-                // 在农场列表中找到对应的农场
-                const farmItem = dataList.value[1].children.find(item => item.id === farmId || item.farmId === farmId);
-                
-                if (farmItem && broadcasts.length > 0) {
-                    // 将广播数据合并到农场项中
-                    farmItem.broadcasts = broadcasts;
-                }
-            });
-        }
-    });
-};
-
-const input = ref("");
-//新建分组
-const showGroupPopup = ref(false);
-const showPopup = () => {
-    showGroupPopup.value = !showGroupPopup.value;
-};
-
-// 新增客户
-const handleAddClient = () => {
-    router.push("/create_farm?type=client&from=user");
-};
-
-// 管理
-const hadnleManage = (value) => {
-    router.push(`/user_manage?name=${value.name}&total=${value.children.length}&isGroup=${value.isGroup}`);
-};
-
-const showShare = ref(false);
-const onSelect = () => {
-    const query = {
-        agriculturalStoreId: shareData.value.agriculturalStoreId,
-        farmId: shareData.value.id,
-        speciesName: shareData.value.speciesName,
-        containerId: shareData.value.containerId,
-    };
-    wx.miniProgram.navigateTo({
-        url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=shareFarm`,
-    });
-};
-
-const shareData = ref({});
-// 在线沟通
-const handleChat = (data) => {
-    if(data.receiveUserId){
-        router.push(`/chat_frame?userId=${data.receiveUserId}&farmId=${data.id}`);
-    }else{
-        showShare.value = true;
-        shareData.value = data;
-    }
-};
-
-// 处理列表项点击
-const handleItemClick = (data) => {
-    router.push(`/farm_details?farmId=${data.id}&agriculturalStoreId=${data.agriculturalStoreId}&receiveUserId=${data.receiveUserId}`);
-};
-
-const handleDetail = (path, farmId, agriculturalStoreId, schemeId) => {
-    router.push(`/${path}?farmId=${farmId}&agriculturalStoreId=${agriculturalStoreId}&schemeId=${schemeId}`);
-};
-</script>
-
-<style lang="scss" scoped>
-.user-index {
-    width: 100%;
-    height: 100vh;
-    box-sizing: border-box;
-    padding: 10px 12px;
-    background: #f5f7fb;
-    .user-header {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        .search {
-            width: 90px;
-            margin-right: 10px;
-            --el-input-placeholder-color: rgba(0, 0, 0, 0.5);
-            ::v-deep {
-                .el-input__wrapper {
-                    box-shadow: none;
-                    border: 1px solid rgba(0, 0, 0, 0.5);
-                    background: transparent;
-                    border-radius: 20px;
-                }
-                .el-input__prefix,
-                .el-input__inner {
-                    color: #000;
-                }
-            }
-        }
-        .button {
-            width: 100%;
-            background: #fff;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            padding: 8px;
-            border-radius: 20px;
-            img {
-                width: 20px;
-                height: 17px;
-                margin-right: 6px;
-            }
-        }
-    }
-    .list {
-        width: 100%;
-        margin-top: 12px;
-        height: calc(100% - 36px);
-        overflow: auto;
-        padding-bottom: 12px;
-        box-sizing: border-box;
-        
-        .map-container {
-            width: 100%;
-            height: 162px;
-            clip-path: inset(0px round 8px);
-            margin-bottom: 10px;
-        }
-        .collapse-list {
-            // height: 100%;
-        }
-        .text {
-            color: #7c7c7c;
-        }
-        ::v-deep {
-            .van-collapse-item__content {
-                padding: 0;
-                background: #F5F7FB;
-            }
-            .van-cell {
-                border-radius: 5px 5px 0 0;
-                justify-content: space-between;
-                .van-cell__value {
-                    flex: none;
-                }
-                .van-cell__title {
-                    display: flex;
-                    align-items: center;
-                    .icon {
-                        margin-right: 3px;
-                        color: #bfbfbf;
-                        font-size: 16px;
-                    }
-                    .span {
-                        color: rgba(0, 0, 0, 0.4);
-                        margin-left: 10px;
-                    }
-                }
-            }
-            .van-collapse-item__title--expanded {
-                .van-cell__title {
-                    .icon {
-                        transform: rotate(90deg);
-                    }
-                }
-            }
-            .van-collapse-item + .van-collapse-item {
-                margin-top: 12px;
-            }
-        }
-        .list-item {
-            margin-top: 10px;
-        }
-
-        .add-tag {
-            font-size: 12px;
-            color: #2199f8;
-            line-height: 24px;
-        }
-        
-        .footer-data {
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            gap: 12px;
-            margin-top: 12px;
-            .footer-l {
-                display: flex;
-                gap: 8px;
-                flex: 1;
-                .farm-info-footer-item {
-                    display: flex;
-                    align-items: baseline;
-                    border: 0.4px solid rgba(215, 215, 215, 0.5);
-                    padding: 8px 5px 5px;
-                    box-sizing: border-box;
-                    .farm-info-footer-item-label {
-                        font-size: 12px;
-                        color: rgba(32, 32, 32, 0.4);
-                        margin-bottom: 4px;
-                    }
-                    .farm-info-footer-item-value {
-                        font-size: 16px;
-                        color: #202020;
-                        padding-left: 2px;
-                        .unit {
-                            font-size: 12px;
-                            padding-left: 2px;
-                            color: rgba(32, 32, 32, 0.4);
-                        }
-                    }
-                }
-            }
-            .footer-action {
-                border: 0.5px solid #888B8D;
-                border-radius: 20px;
-                padding: 5px 12px;
-                font-size: 12px;
-                color: #888B8D;
-                white-space: nowrap;
-                cursor: pointer;
-                flex-shrink: 0;
-            }
-        }
-    }
-    .footer {
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-        margin-top: 12px;
-        .btn {
-            font-size: 12px;
-            color: #7f7f7f;
-            padding: 5px 45px;
-            background: rgba(201, 201, 201, 0.27);
-            border-radius: 20px;
-        }
-    }
-}
-
-
-.tag-list {
-    font-size: 14px;
-    .tag-item + .tag-item {
-        margin-top: 6px;
-    }
-    .tag-item {
-        padding: 2px 8px;
-        text-align: center;
-        &.active {
-            color: #2199f8;
-            background: rgba(33, 153, 248, 0.16);
-            border-radius: 4px;
-        }
-    }
-}
-</style>

+ 0 - 300
src/views/old_mini/user/manage.vue

@@ -1,300 +0,0 @@
-<template>
-    <div class="container">
-        <custom-header :name="headerName" :isClose="isClose" :showClose="isClose" @close="handleClose"></custom-header>
-        <div class="content" v-if="total!=='0'">
-            <el-input class="search" v-model="input" placeholder="搜索">
-                <template #prefix>
-                    <el-icon class="el-input__icon"><search /></el-icon>
-                </template>
-            </el-input>
-            <div class="list">
-                <div class="list-item" v-for="(item, index) in list" :key="index">
-                    <checkbox @change="changeCheck" v-show="setingShow" v-model="item.checked"></checkbox>
-                    <div class="item-flex">
-                        <img class="photo" :src="item.icon || 'https://birdseye-img.sysuimars.com/dinggou-mini/defalut-icon.png'" alt="" />
-                        <div class="item-text">
-                            <div class="name">{{ item.name }}</div>
-                            <div>电话:19875236548</div>
-                            <div>地址:湖北省武汉市富里唱鑫园5023</div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-        <div v-else class="no-data">
-            <span>当前列表无好友</span>
-            <div class="button-row">
-                <div class="del">删除分组</div>
-                <div>添加好友</div>
-            </div>
-        </div>
-        <div class="footer" v-show="total!=='0'">
-            <span @click="handleSeting('新增分组')" v-show="!setingShow && isGroup === '1'">批量设置</span>
-            <div v-show="!setingShow && isGroup!=='1'" class="btn-group">
-                <div class="delete" @click="handleDelete">删除分组</div>
-                <div class="btn-txt">
-                    <span @click="handleSeting('添加')" class="add">添加</span>
-                    <span @click="handleSeting('移出')">移出</span>
-                </div>
-            </div>
-            <div v-show="setingShow" class="footer-flex">
-                <div class="text-group">
-                    <div class="icon" v-show="filterList.length">
-                        <el-icon><ArrowUpBold /></el-icon>
-                    </div>
-                    <div class="text-item" v-for="(item, index) in filterList" :key="index">
-                        {{ item.name }}
-                        <span v-show="filterList.length - 1 !== index">/</span>
-                    </div>
-                </div>
-                <div class="button" @click="handleAdd">{{btnText}}({{ filterList.length }})</div>
-            </div>
-        </div>
-    </div>
-    <!-- 新增分组弹窗 -->
-    <add-popup :show="showPopup" @confirm="handleAddConfirm"></add-popup>
-    <!-- 删除弹窗 -->
-    <action-sheet class="action-sheet" v-model:show="showAction" :actions="actions" cancel-text="取消" @select="onSelect">
-        <template #description>
-            <span class="desc">该分组下还有好友存在,删除后好友会放在 未分组的好友列表里</span>
-        </template>
-    </action-sheet>
-</template>
-
-<script setup>
-import customHeader from "@/components/customHeader.vue";
-import addPopup from "./components/addPopup.vue";
-import { onActivated, onMounted, ref } from "vue";
-import { useRoute } from "vue-router";
-import { Checkbox } from "vant";
-import { ElMessage } from "element-plus";
-import { ActionSheet } from 'vant';
-const route = useRoute();
-
-const input = ref("");
-const list = ref([
-    {
-        name: "123",
-        checked: false,
-    },
-    {
-        name: "456",
-        checked: false,
-    },
-]);
-
-const showPopup = ref(false);
-//新增分组
-const handleAdd = () => {
-    if (filterList.value.length) {
-        showPopup.value = !showPopup.value;
-    } else {
-        ElMessage.warning("请选择好友");
-    }
-};
-
-const handleAddConfirm = (name) => {
-    const selectedList = list.value.filter((item) => item.checked).map((item) => item.name);
-    console.log("name", name, selectedList);
-}
-
-const isClose = ref(false);
-const handleClose = () => {
-    isClose.value = false;
-    setingShow.value = false;
-    list.value = list.value.map((item) => {
-        item.checked = false;
-        return item;
-    });
-}
-
-//批量设置
-const setingShow = ref(false);
-const btnText = ref('')
-const handleSeting = (str) => {
-    btnText.value = str
-    setingShow.value = true;
-    isClose.value = true;
-};
-
-//删除
-const showAction = ref(false)
-const actions = [{ name: '删除' ,color: '#F73C3C'},]
-const handleDelete = () =>{
-    showAction.value = true
-}
-const onSelect = (item) =>{
-    showAction.value = false
-}
-
-const filterList = ref([]);
-const changeCheck = () => {
-    filterList.value = list.value.filter((item) => item.checked);
-};
-
-const headerName = ref("");
-const isGroup = ref(null);
-const total = ref(0)
-onMounted(() => {
-    headerName.value = `${route.query.name}(${route.query.total})`;
-    total.value = route.query.total;
-    isGroup.value = route.query.isGroup;
-    // setingShow.value = false
-    // filterList.value = []
-});
-</script>
-
-<style lang="scss" scoped>
-.container {
-    width: 100%;
-    height: 100vh;
-    background: #f5f7fb;
-    .content {
-        width: 100%;
-        height: 100%;
-        position: relative;
-        padding: 20px 12px;
-        box-sizing: border-box;
-        .search {
-            width: 100%;
-            ::v-deep {
-                &.el-input {
-                    --el-input-placeholder-color: #000;
-                }
-                .el-input__prefix {
-                    color: #000;
-                }
-                .el-input__wrapper {
-                    box-shadow: none;
-                    border-radius: 20px;
-                    border: 1px solid rgba(0, 0, 0, 0.25);
-                }
-            }
-        }
-        .list {
-            .list-item {
-                padding: 12px 10px;
-                border-radius: 8px;
-                background: #fff;
-                display: flex;
-                align-items: center;
-                margin-top: 12px;
-                .item-flex {
-                    display: flex;
-                    align-items: center;
-                }
-                .item-flex {
-                    display: flex;
-                    align-items: center;
-                    margin-left: 10px;
-                }
-                .photo {
-                    width: 62px;
-                    height: 62px;
-                    border-radius: 8px;
-                    margin-right: 12px;
-                }
-                .item-text {
-                    color: #999999;
-                    font-size: 12px;
-                    line-height: 1.6;
-                    .name {
-                        font-size: 15px;
-                        color: #000;
-                        font-weight: 500;
-                    }
-                }
-            }
-        }
-    }
-     .no-data{
-        width: 100%;
-        height: 100%;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        flex-direction: column;
-        span{
-            font-size: 16px;
-            color: rgba(0, 0, 0, 0.49);
-        }
-        .button-row{
-            margin-top: 12px;
-            display: flex;
-            div{
-                padding: 7px 24px;
-                color: rgba(0, 0, 0, 0.49);
-                border-radius: 5px;
-                background: #fff;
-            }
-            .del{
-                color: #F27777;
-                margin-right: 10px;
-                background: rgba(242, 119, 119, 0.12);
-            }
-        }
-    }
-    .footer {
-        position: fixed;
-        bottom: 0;
-        background: #fff;
-        width: 100%;
-        padding: 12px;
-        box-sizing: border-box;
-        text-align: center;
-        color: #262626;
-        .btn-group{
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            .delete{
-                color: #F27777;
-                padding: 5px 12px;
-                border-radius: 20px;
-                background: rgba(242, 119, 119, 0.12);
-            }
-            .btn-txt{
-                span{
-                   padding: 5px 12px;
-                }
-                .add{
-                    color: #8F8F8F;
-                    margin-right: 5px;
-                }
-            }
-        }
-        .footer-flex {
-            display: flex;
-            justify-content: space-between;
-            .text-group {
-                display: flex;
-                align-items: center;
-                color: #2199F8;
-                .icon {
-                    width: 18px;
-                    height: 18px;
-                    background: #2199F8;
-                    border-radius: 50%;
-                    color: #fff;
-                    line-height: 22px;
-                    font-size: 13px;
-                    margin-right: 5px;
-                }
-            }
-            .button {
-                color: #fff;
-                padding: 5px 12px;
-                font-size: 12px;
-                border-radius: 2px;
-                background: #2199F8;
-            }
-        }
-    }
-}
-
-.action-sheet{
-    .desc{
-        font-size: 12px;
-    }
-}
-</style>

+ 0 - 124
src/views/old_mini/user/subPages/farmList.vue

@@ -1,124 +0,0 @@
-<template>
-    <div class="farm-page">
-        <custom-header name="农情互动"></custom-header>
-        <div class="farm-list">
-            <div class="list-item" v-for="item in farmList" :key="item.id">
-                <div class="question-header">
-                    <img class="question-icon" src="@/assets/img/home/ask-icon.png" alt="" />
-                    <div class="question-title">{{ item.quest }}</div>
-                </div>
-                <template v-if="item.images.length">
-                    <div class="answer-content">
-                        答:{{ item.agriDate }} {{ item.answerLabel }}出现{{ item.indicatorName }}
-                    </div>
-                    <div class="answer-img" >
-                        <img v-for="image in item.images" :key="image" :src="config.base_img_url2 + image.cloudFilename" alt="" />
-                    </div>
-                </template>
-                <div v-else class="answer-btn">
-                    <div class="answer-btn-item">转发给客户</div>
-                    <div class="answer-btn-item-group">
-                        <div class="answer-btn-item">否</div>
-                        <div class="answer-btn-item primary">是</div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import { ref, onMounted } from "vue";
-import customHeader from "@/components/customHeader.vue";
-import { useRoute } from "vue-router";
-import config from "@/api/config";
-
-const route = useRoute();
-onMounted(() => {
-    getFarmWorkList();
-});
-
-const farmList = ref([]);
-const paramsPage = ref(1);
-const getFarmWorkList = () => {
-    const params = {
-        farmId: route.query.farmId,
-        limit: 99,
-        page: paramsPage.value,
-    }
-    VE_API.user.getFarmWorkList(params).then(({ data }) => {
-        farmList.value = data || [];
-    });
-};
-</script>
-
-<style scoped lang="scss">
-.farm-page {
-    width: 100%;
-    height: 100vh;
-    background-color: #f7f7f7;
-    .farm-list {
-        width: 100%;
-        height: 100%;
-        box-sizing: border-box;
-        padding: 12px;
-        overflow: auto;
-        .list-item {
-            background-color: #fff;
-            border-radius: 8px;
-            padding: 10px;
-            box-sizing: border-box;
-            .question-header {
-                display: flex;
-                align-items: center;
-                margin-bottom: 6px;
-                gap: 8px;
-                font-weight: 500;
-                .question-icon {
-                    width: 22px;
-                    height: 20px;
-                }
-            }
-            .answer-content {
-                color: #333333;
-                margin: 6px 0 10px 0;
-            }
-            .answer-img {
-                display: flex;
-                gap: 5px;
-                img {
-                    flex: 1;
-                    max-width: 105px;
-                    height: 105px;
-                    border-radius: 5px;
-                    object-fit: cover;
-                }
-            }
-            .answer-btn {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                margin-top: 10px;
-                > div {
-                    display: flex;
-                    gap: 10px;
-                }
-            }
-            .answer-btn-item {
-                padding: 7px 12px;
-                border-radius: 25px;
-                font-size: 12px;
-                text-align: center;
-                background: rgba(33, 153, 248, 0.1);
-                color: #2199f8;
-                min-width: 52px;
-                box-sizing: border-box;
-                &.primary {
-                    background: #2199f8;
-                    color: #ffffff;
-                }
-            }
-        }
-    }
-}
-</style>

+ 0 - 145
src/views/old_mini/user/subPages/serviceList.vue

@@ -1,145 +0,0 @@
-<template>
-    <div class="service-list-page">
-        <custom-header name="农事服务"></custom-header>
-        <div class="service-content">
-            <tab-list
-                type="light"
-                v-model="farmServiceActiveTab"
-                :tabs="farmServiceTabs"
-                @change="handleFarmServiceTabChange"
-            />
-            <stats-box :stats-data="serviceStatsData" />
-            <div class="content-section">
-                <record-item
-                    v-for="(section, index) in detailList"
-                    :key="index"
-                    :record-item-data="section"
-                    onlyRecipeName
-                    :content-mode="farmServiceActiveTab === 0 ? 'serviceDetail' : ''"
-                    title-mode="default"
-                    :title-right-text="farmServiceActiveTab === 0 ? '生成成果报告' : ''"
-                    :title-right-type="farmServiceActiveTab === 1 ? 'dot' : null"
-                    :title-right-dot-text="farmServiceActiveTab === 1 ? '全区' : ''"
-                    class="recipe-item"
-                    @titleRightClick="handleTitleRightClick"
-                    @click="handleClick(section)"
-                />
-                <empty
-                    v-show="detailList.length === 0"
-                    image="https://birdseye-img.sysuimars.com/birdseye-look-mini/custom-empty-image.png"
-                    image-size="80"
-                    description="暂无数据"
-                />
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import customHeader from "@/components/customHeader.vue";
-import tabList from "@/components/pageComponents/TabList.vue";
-import StatsBox from "@/components/pageComponents/StatsBox.vue";
-import recordItem from "@/components/recordItem.vue";
-import { Empty } from "vant";
-import { useRoute, useRouter } from "vue-router";
-import { ref, onMounted } from "vue";
-
-const route = useRoute();
-const farmIdVal = ref(null);
-const router = useRouter();
-onMounted(() => {
-    farmIdVal.value = route.query.farmId;
-    if(sessionStorage.getItem("activeSection")){
-        farmServiceActiveTab.value = Number(sessionStorage.getItem("activeSection"));
-        sessionStorage.removeItem("activeSection");
-    }
-    handleFarmServiceTabChange(farmServiceActiveTab.value);
-});
-
-const farmServiceTabs = ["过往服务", "未来服务"];
-const farmServiceActiveTab = ref(0);
-const serviceStatsData = ref([]);
-
-const handleFarmServiceTabChange = (index) => {
-    if (index === 0) {
-        getFarmPastServiceCost();
-        getDetailList();
-    } else {
-        getFutureFarmWorkWarning()
-    }
-};
-
-const getFutureFarmWorkWarning = async () => {
-    const {data} = await VE_API.home.listFutureFarmWorkWarning({ farmId: farmIdVal.value });
-    let totalCost = 0;
-    if (data.length > 0) {
-        totalCost = data.reduce((acc, item) => acc + item.estimatedCost, 0);
-    }
-    serviceStatsData.value = [
-        { value: totalCost || 0, unit: "元", desc: "预计成交额" },
-        { value: data.length || 0, unit: "次", desc: "预计服务次数" },
-    ];
-    detailList.value = data || [];
-};
-
-const detailList = ref([]);
-const getDetailList = () => {
-    VE_API.user.farmServiceRecord({ farmId: farmIdVal.value }).then(({ data }) => {
-        detailList.value = data || [];
-    });
-};
-
-const getFarmPastServiceCost = () => {
-    VE_API.user.getFarmPastServiceCost({ farmId: farmIdVal.value }).then(({ data }) => {
-        serviceStatsData.value = [
-            { value: data.totalCost, unit: "元", desc: "成交额" },
-            { value: data.serviceCount, unit: "次", desc: "服务次数" },
-        ];
-    });
-};
-
-const handleTitleRightClick = (section) => {
-    router.push({
-        path: "/achievement_report",
-        query: { miniJson: JSON.stringify({ id: section.id }) },
-    });
-};
-
-const handleClick = (section) => {
-    sessionStorage.setItem("activeSection", farmServiceActiveTab.value);
-    if(farmServiceActiveTab.value === 0){
-        router.push({
-            path: "/review_work",
-            query: { miniJson: JSON.stringify({ id: section.id }) },
-        });
-    } else {
-        router.push({
-            path: "/detail_work",
-            query: { miniJson: JSON.stringify({ id: section.farmWorkId,arrangeId: section.arrangeId,farmId: farmIdVal.value }) },
-        });
-    }
-};
-</script>
-
-<style scoped lang="scss">
-.service-list-page {
-    width: 100%;
-    height: 100vh;
-    background-color: #f7f7f7;
-    .service-content {
-        box-sizing: border-box;
-        padding: 12px;
-        .content-section {
-            overflow: auto;
-            height: calc(100vh - 95px - 70px);
-            .recipe-item {
-                border: 1px solid rgba(0, 0, 0, 0.1);
-                margin: 12px 0 0 0;
-            }
-            ::v-deep .van-empty {
-                padding: 40px 0;
-            }
-        }
-    }
-}
-</style>