2 次代码提交 1be92e9ae1 ... c1af9e814a

作者 SHA1 备注 提交日期
  lxf c1af9e814a Merge branch 'master' of http://www.sysuimars.cn:3000/feiniao/feiniao-farm-h5 1 周之前
  lxf 15438d59c5 feat: 农资农服农情需求,需求大厅 1 周之前

+ 28 - 4
src/App.vue

@@ -46,7 +46,19 @@
                 />
             </template>
         </tabbar-item>
-        <tabbar-item replace to="/plan">
+        <tabbar-item replace to="/task_condition" v-if="curRole == 2">
+            <span>农情需求</span>
+            <template #icon="props">
+                <img
+                    :src="
+                        props.active
+                            ? require('@/assets/img/tab_bar/service-active.png')
+                            : require('@/assets/img/tab_bar/service.png')
+                    "
+                />
+            </template>
+        </tabbar-item>
+        <tabbar-item replace to="/plan" v-if="curRole != 2">
             <span>农事方案</span>
             <template #icon="props">
                 <img
@@ -58,8 +70,8 @@
                 />
             </template>
         </tabbar-item>
-        <tabbar-item replace to="/message">
-            <span>农服农资</span>
+        <tabbar-item replace to="/message" v-if="curRole == 0">
+            <span>农资农服</span>
             <template #icon="props">
                 <img
                     :src="
@@ -70,6 +82,18 @@
                 />
             </template>
         </tabbar-item>
+        <tabbar-item replace to="/user" v-if="curRole != 0">
+            <span>用户管理</span>
+            <template #icon="props">
+                <img
+                    :src="
+                        props.active
+                            ? require('@/assets/img/tab_bar/user-active.png')
+                            : require('@/assets/img/tab_bar/user.png')
+                    "
+                />
+            </template>
+        </tabbar-item>
         <tabbar-item replace to="/mine">
             <span>个人中心</span>
             <template #icon="props">
@@ -102,7 +126,7 @@ const router = useRouter();
 // 首页loading加载完才显示底部导航栏
 const showTab = ref(false);
 // 0: 农户, 1: 专家, 2:农资农服
-const curRole = ref(1);
+const curRole = ref(2);
 
 let tabBarHeight = 0;
 onMounted(() => {

二进制
src/assets/img/home/share-icon.png


二进制
src/assets/img/home/user-icon.png


二进制
src/assets/img/map/garden-border.png


二进制
src/assets/img/tab_bar/user-active.png


二进制
src/assets/img/tab_bar/user.png


+ 121 - 7
src/components/taskItem.vue

@@ -1,13 +1,127 @@
 <template>
-    <div>
-
+    <div class="farm-item">
+        <div class="item-top">
+            <div class="top-l">
+                <div class="item-name">梢期杀虫</div>
+                <div class="item-time">2025.08.27</div>
+            </div>
+            <div class="top-r">查看药物处方</div>
+        </div>
+        <div class="item-box">
+            <div class="title-wrap">
+                <div class="title-l">
+                    <div class="item-title">未命名农场</div>
+                    <div class="setting-text">设为特别关注</div>
+                </div>
+                <div class="title-r">最近服务过</div>
+            </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>
+            <slot name="footer"></slot>
+        </div>
     </div>
 </template>
 
-<script setup>
-
-</script>
+<script setup></script>
 
 <style lang="scss" scoped>
-
-</style>
+.farm-item {
+    background: #cfe9ff;
+    border-radius: 14px;
+    .item-top {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        padding: 10px 12px;
+        color: #2199f8;
+        font-size: 14px;
+        .top-l {
+            display: flex;
+            align-items: center;
+            font-size: 16px;
+            color: #000000;
+        }
+        .item-name {
+            margin-right: 5px;
+            color: #ffffff;
+            padding: 0 10px;
+            height: 29px;
+            border-radius: 4px;
+            line-height: 29px;
+            background: linear-gradient(180deg, #7bc5ff, #2199f8);
+        }
+    }
+    .item-box {
+        background: #fff;
+        border-radius: 10px 10px 14px 14px;
+        padding: 10px 12px;
+    }
+    .title-wrap {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        .title-l {
+            display: flex;
+            align-items: center;
+            .setting-text {
+                padding-left: 11px;
+                font-size: 12px;
+                color: #2199f8;
+            }
+        }
+        .title-r {
+            color: rgba(255, 131, 29, 0.36);
+            font-size: 12px;
+        }
+    }
+    .item-title {
+        font-size: 16px;
+        font-weight: 500;
+        margin: 2px 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;
+            }
+        }
+    }
+}
+</style>

+ 7 - 0
src/router/globalRoutes.js

@@ -112,4 +112,11 @@ export default [
         name: "FarmRecords",
         component: () => import("@/views/old_mini/mine/pages/farmRecords.vue"),
     },
+    // 农资农服-农情需求
+    {
+        path: "/task_condition",
+        name: "TaskCondition",
+        meta: { showTabbar: true, keepAlive: true },
+        component: () => import("@/views/old_mini/task_condition/index.vue"),
+    }
 ];

+ 130 - 145
src/views/old_mini/farm_manage/components/demandHall.vue

@@ -3,69 +3,64 @@
         <!-- 地图 -->
         <div class="map-container" ref="mapContainer"></div>
 
-        <floating-panel class="floating-panel" v-model:height="height" :anchors="anchors" :content-draggable="false">
-            <div class="hall-content">
+        <div class="search-wrap">
+            <el-input
+                class="search"
+                v-model="searchValue"
+                placeholder="搜索位置"
+                @search="search"
+                :prefix-icon="Search"
+            />
+        </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="dateValue" placeholder="Select">
-                        <el-option v-for="item in dateOptions" :key="item.value" :label="item.label" :value="item.value" />
+                        <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-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-option
+                            v-for="item in areaOptions1"
+                            :key="item.value"
+                            :label="item.label"
+                            :value="item.value"
+                        />
                     </el-select>
                 </div>
-                <div class="farm-list">
-                    <div class="farm-item" v-for="item in 3" :key="item">
-                        <div class="item-top">
-                            <div class="top-l">
-                                <div class="item-name">梢期杀虫</div>
-                                <div class="item-time">2025.08.27</div>
-                            </div>
-                            <div class="top-r">查看药物处方</div>
-                        </div>
-                        <div class="item-box">
-                            <div class="title-wrap">
-                                <div class="title-l">
-                                    <div class="item-title">
-                                        未命名农场
-                                    </div>
-                                    <div class="setting-text">设为特别关注</div>
-                                </div>
-                                <div class="title-r">最近服务过</div>
-                            </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 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 10" :key="item">
+                        <task-item></task-item>
                     </div>
                 </div>
             </div>
         </floating-panel>
-        <div class="expand-btn-wrap" v-show="height === defalutHeight">
-            <span>需求</span>
-            <div class="expand-btn" @click="handleExpandBtnClick">
-                <span>展开</span>
-                <el-icon><ArrowUpBold /></el-icon>
-            </div>
-        </div>
     </div>
 </template>
 
@@ -74,19 +69,23 @@ import { FloatingPanel } from "vant";
 import { computed, nextTick, onMounted, ref } from "vue";
 import { useStore } from "vuex";
 import IndexMap from "../map/index";
+import taskItem from "@/components/taskItem.vue";
+import { Search } from "@element-plus/icons-vue";
+const props = defineProps({
+    isCapital: {
+        type: Boolean,
+        default: false
+    }
+})
 
 const store = useStore();
 const tabBarHeight = computed(() => store.state.home.tabBarHeight);
 
 // const tabBarHeight = ref(localStorage.getItem("tabBarHeight") * 1 || 50);
 
-const defalutHeight = ref(0);
-const anchors = ref([defalutHeight.value, 310 + tabBarHeight.value, Math.round(1 * window.innerHeight) - 40]);
-const height = ref(anchors.value[1]);
+const anchors = ref([310 + tabBarHeight.value, Math.round(1 * window.innerHeight) - 44]);
+const height = ref(anchors.value[0]);
 
-const handleExpandBtnClick = () => {
-    height.value = anchors.value[1];
-};
 
 const indexMap = new IndexMap();
 const mapContainer = ref(null);
@@ -94,11 +93,11 @@ const mapContainer = ref(null);
 onMounted(() => {
     const point = store.state.home.miniUserLocationPoint;
     nextTick(() => {
-        indexMap.initMap(point, mapContainer.value);
+        indexMap.initMap(point, mapContainer.value, props.isCapital);
     });
 });
 
-
+const cardContentHeight = ref(230);
 const searchValue = ref("");
 const search = () => {
     console.log(searchValue.value);
@@ -121,6 +120,21 @@ const areaOptions1 = [
     { value: "2", label: "2" },
     { value: "3", label: "3" },
 ];
+
+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;
+    }
+};
+
+function toPage() {
+    console.log('topage');
+}
+
 </script>
 
 <style lang="scss" scoped>
@@ -131,7 +145,20 @@ const areaOptions1 = [
     overflow: hidden;
     .map-container {
         width: 100%;
-        height: 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 {
@@ -159,97 +186,19 @@ const areaOptions1 = [
     }
 
     .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;
         }
-        .farm-item {
-            background: #CFE9FF;
-            border-radius: 14px;
-            .item-top {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                padding: 10px 12px;
-                color: #2199F8;
-                font-size: 14px;
-                .top-l {
-                    display: flex;
-                    align-items: center;
-                    font-size: 16px;
-                    color: #000000;
-                }
-                .item-name {
-                    margin-right: 5px;
-                    color: #FFFFFF;
-                    padding: 0 10px;
-                    height: 29px;
-                    border-radius: 4px;
-                    line-height: 29px;
-                    background: linear-gradient(180deg, #7BC5FF, #2199F8);
-                }
-            }
-            .item-box {
-                background: #fff;
-                border-radius: 10px 10px 14px 14px;
-                padding: 10px 12px;
-            }
-            .title-wrap {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                .title-l {
-                    display: flex;
-                    align-items: center;
-                    .setting-text {
-                        padding-left: 11px;
-                        font-size: 12px;
-                        color: #2199F8;
-                    }
-                }
-                .title-r {
-                    color: rgba(255, 131, 29, 0.36);
-                    font-size: 12px;
-                }
-            }
-            .item-title {
-                font-size: 16px;
-                font-weight: 500;
-                margin: 2px 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;
-                    }
-                }
-            }
-        }
-        .farm-item + .farm-item {
+        .task-item + .task-item {
             margin-top: 10px;
         }
-
-        
+    }
+    
     .select-group {
         display: flex;
         padding: 0 12px;
@@ -279,8 +228,33 @@ const areaOptions1 = [
             }
         }
     }
+
+    .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%;
@@ -290,6 +264,17 @@ const areaOptions1 = [
             background: transparent;
             overflow: hidden;
         }
+        .van-floating-panel__header {
+            position: relative;
+            &::after {
+                content: "";
+                height: 100px;
+                width: 100%;
+                position: absolute;
+                top: 0px;
+                left: 0;
+            }
+        }
     }
 }
 </style>

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

@@ -34,6 +34,13 @@ const active = ref(0);
                 width: 24px;
                 height: 4px;
             }
+            .van-tab {
+                width: 80px;
+                flex: none;
+            }
+            .van-tabs__nav {
+                justify-content: center;
+            }
         }
     }
 }

+ 392 - 5
src/views/old_mini/farm_manage/map/index.js

@@ -4,7 +4,10 @@ import config from "@/api/config.js";
 import { Point } from 'ol/geom';
 import Feature from "ol/Feature";
 import Style from "ol/style/Style";
-import Icon from "ol/style/Icon";
+import Photo from "ol-ext/style/Photo";
+import { Fill, Text, Icon, Stroke } from "ol/style.js";
+import { newPoint} from "@/utils/map";
+
 /**
  * @description 地图层对象
  */
@@ -25,17 +28,401 @@ class IndexMap {
         });
       },
     });
+
+    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: '2.18 农事1',
+            text: 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];
+      },
+    });
   }
 
-  initMap(location, target) {
+  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, 8, 22, "vec" );
+    this.kmap = new KMap.Map(target, level, coordinate[0], coordinate[1], null, 8, 22, isCapital ? "img" : "vec");
     let xyz2 = config.base_img_url3 + "map/lby/{z}/{x}/{y}.png";
     this.kmap.addXYZLayer(xyz2, { minZoom: 8, maxZoom: 22 }, 2);
     this.kmap.addLayer(this.clickPointLayer.layer);
-    let point = new Feature(new Point(coordinate))
-    this.clickPointLayer.addFeature(point)
+    this.kmap.addLayer(this.gardenPointLayer.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() {
+    const gardenList = [{
+      "consequenceText": "如果不做本次农事,会导致您的产量、质量下降15%,管理得分降低5分",
+      "id": "274655",
+      "reCheckText": "本次农事复核成效优异,作物产量潜力实现大幅增长,虫害风险控制优异,未发现虫害风险",
+      "farmName": "荔枝博览园",
+      "farmPoint": "POINT(113.61652616170711 23.58399613872042)",
+      "orderId": "745923635683790848",
+      "area": 2.719998598098755,
+      "expert": 91356,
+      "orderStatus": 4,
+      "activeStatus": 0,
+      "farmId": 766,
+      "regionId": 2,
+      "speciesId": "1",
+      "speciesName": "荔枝",
+      "agriculturalId": 24,
+      "farmWorkId": "699343457474318336",
+      "farmWorkLibId": "699343457474318336",
+      "farmWorkLibName": "梢期防虫",
+      "farmWorkName": "梢期防虫",
+      "expertIcon": "https://birdseye-img.sysuimars.com/birdseye-look-vue/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20250411150343.png",
+      "expertName": "韦帮稳",
+      "expertUserIcon": "",
+      "expertUserName": "韦帮稳",
+      "icon": 4,
+      "indexChart": [],
+      "indexName": "",
+      "beforeExecuteDate": "2024-12-03",
+      "checkDate": null,
+      "executeDate": "2025-08-15",
+      "indexJson": "",
+      "code": "BZ-BC-04-SQFC-20",
+      "expertPrescription": "",
+      "condition": "单树嫩叶率大于20.0%",
+      "solarName": "",
+      "reCheck": null,
+      "menu": 1,
+      "isEdit": 0,
+      "isMaster": null,
+      "num": null,
+      "purpose": "",
+      "selfExec": null,
+      "defaultFarmWork": 0,
+      "farmWorkType": 3,
+      "farmWorkTypeName": "病虫",
+      "type": 1,
+      "execute": 4,
+      "updateDate0": "2025-08-20",
+      "updateDate1": null,
+      "updateDate2": null,
+      "updateDate3": null,
+      "updateDate4": null,
+      "updateDate5": null,
+      "usageMode": "叶面施",
+      "serviceMain": "广州泽秾丰农资有限公司",
+      "updateDate6": null,
+      "confirmPicture": [],
+      "executeMain": "广州泽秾丰农资有限公司",
+      "storeShortName": "泽秾丰",
+      "weatherWarningMsg": "",
+      "executeEvidence": [],
+      "userEvaluation": null,
+      "reviewDate": null,
+      "reviewDate2": null,
+      "reviewImage": [],
+      "reviewImage2": [],
+      "serviceRegion": "广州市从化区荔枝博览园",
+      "cost": null,
+    },
+    {
+      "consequenceText": "如果不做本次农事,会导致您的产量、质量下降15%,管理得分降低5分",
+      "id": "274656",
+      "reCheckText": "本次农事复核成效优异,作物产量潜力实现大幅增长,控梢情况优秀,叶芽绿在5%以内",
+      "farmName": "荔枝博览园",
+      "farmPoint": "POINT(113.61767554789421 23.590079887444034)",
+      "orderId": "745923638623997952",
+      "area": 2.719998598098755,
+      "expert": 91356,
+      "orderStatus": 4,
+      "activeStatus": 0,
+      "farmId": 766,
+      "regionId": 2,
+      "speciesId": "1",
+      "speciesName": "荔枝",
+      "agriculturalId": 24,
+      "farmWorkId": "699343457474318337",
+      "farmWorkLibId": "699343457474318337",
+      "farmWorkLibName": "控梢",
+      "farmWorkName": "控梢",
+      "expertIcon": "https://birdseye-img.sysuimars.com/birdseye-look-vue/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20250411150343.png",
+      "expertName": "韦帮稳",
+      "expertUserIcon": "",
+      "expertUserName": "韦帮稳",
+      "icon": 4,
+      "indexChart": [],
+      "indexName": "",
+      "beforeExecuteDate": "2024-12-15",
+      "checkDate": null,
+      "executeDate": "2024-12-03",
+      "indexJson": "",
+      "code": "YJ-TJ-04-KS-14",
+      "expertPrescription": "",
+      "condition": "园区叶芽率大于10.0%",
+      "solarName": "",
+      "reCheck": null,
+      "menu": 1,
+      "isEdit": 0,
+      "isMaster": null,
+      "num": null,
+      "purpose": "",
+      "selfExec": null,
+      "defaultFarmWork": 0,
+      "farmWorkType": 1,
+      "farmWorkTypeName": "调节",
+      "type": 0,
+      "execute": 4,
+      "updateDate0": "2025-08-20",
+      "updateDate1": null,
+      "updateDate2": null,
+      "updateDate3": null,
+      "updateDate4": null,
+      "updateDate5": null,
+      "usageMode": "叶面施",
+      "serviceMain": "广州泽秾丰农资有限公司",
+      "updateDate6": null,
+      "confirmPicture": [],
+      "executeMain": "广州泽秾丰农资有限公司",
+      "storeShortName": "泽秾丰",
+      "weatherWarningMsg": "",
+      "executeEvidence": [],
+      "userEvaluation": null,
+      "reviewDate": null,
+      "reviewDate2": null,
+      "reviewImage": [],
+      "reviewImage2": [],
+      "serviceRegion": "广州市从化区荔枝博览园",
+      "cost": null,
+    },
+    {
+      "consequenceText": "如果不做本次农事,会导致您的产量、质量下降50%,管理得分降低15分",
+      "id": "274657",
+      "reCheckText": "本次农事复核成效优异,作物产量潜力实现大幅增长,树体营养较充足,土壤肥力增加",
+      "farmName": "荔枝博览园",
+      "farmPoint": "POINT(113.62757101477101 23.590796948574365)",
+      "orderId": "745923641274798080",
+      "area": 2.719998598098755,
+      "expert": 91356,
+      "orderStatus": 4,
+      "activeStatus": 0,
+      "farmId": 766,
+      "regionId": 2,
+      "speciesId": "1",
+      "speciesName": "荔枝",
+      "agriculturalId": 24,
+      "farmWorkId": "699343457474318338",
+      "farmWorkLibId": "699343457474318338",
+      "farmWorkLibName": "基肥",
+      "farmWorkName": "基肥",
+      "expertIcon": "https://birdseye-img.sysuimars.com/birdseye-look-vue/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20250411150343.png",
+      "expertName": "韦帮稳",
+      "expertUserIcon": "",
+      "expertUserName": "韦帮稳",
+      "icon": 4,
+      "indexChart": [],
+      "indexName": "",
+      "beforeExecuteDate": "2024-12-15",
+      "checkDate": null,
+      "executeDate": "2024-12-15",
+      "indexJson": "",
+      "code": "BZ-YY-04-JF-300",
+      "expertPrescription": "",
+      "condition": "基肥日期大于1215",
+      "solarName": "",
+      "reCheck": null,
+      "menu": 1,
+      "isEdit": 0,
+      "isMaster": null,
+      "num": null,
+      "purpose": "",
+      "selfExec": null,
+      "defaultFarmWork": 0,
+      "farmWorkType": 2,
+      "farmWorkTypeName": "营养",
+      "type": 1,
+      "execute": 4,
+      "updateDate0": "2025-08-20",
+      "updateDate1": null,
+      "updateDate2": null,
+      "updateDate3": null,
+      "updateDate4": null,
+      "updateDate5": null,
+      "usageMode": "根部施",
+      "serviceMain": "广州泽秾丰农资有限公司",
+      "updateDate6": null,
+      "confirmPicture": [],
+      "executeMain": "广州泽秾丰农资有限公司",
+      "storeShortName": "泽秾丰",
+      "weatherWarningMsg": "",
+      "executeEvidence": [],
+      "userEvaluation": null,
+      "reviewDate": null,
+      "reviewDate2": null,
+      "reviewImage": [],
+      "reviewImage2": [],
+      "serviceRegion": "广州市从化区荔枝博览园",
+      "cost": null,
+    },
+    {
+      "consequenceText": "如果不做本次农事,会导致您的产量、质量下降10%,管理得分降低3分",
+      "id": "274658",
+      "reCheckText": "本次农事复核成效优异,作物产量潜力实现大幅增长,病虫害基数得到大幅下降,未发现病虫害风险",
+      "farmName": "荔枝博览园",
+      "farmPoint": "POINT(113.62240816252164 23.59499176519138)",
+      "orderId": "745923644080787456",
+      "area": 2.719998598098755,
+      "expert": 91356,
+      "orderStatus": 4,
+      "activeStatus": 0,
+      "farmId": 766,
+      "regionId": 2,
+      "speciesId": "1",
+      "speciesName": "荔枝",
+      "agriculturalId": 24,
+      "farmWorkId": "699343457474318339",
+      "farmWorkLibId": "699343457474318339",
+      "farmWorkLibName": "清园",
+      "farmWorkName": "清园",
+      "expertIcon": "https://birdseye-img.sysuimars.com/birdseye-look-vue/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20250411150343.png",
+      "expertName": "韦帮稳",
+      "expertUserIcon": "",
+      "expertUserName": "韦帮稳",
+      "icon": 4,
+      "indexChart": [],
+      "indexName": "",
+      "beforeExecuteDate": "2024-12-27",
+      "checkDate": null,
+      "executeDate": "2024-12-15",
+      "indexJson": "",
+      "code": "BZ-BC-04-QY-100",
+      "expertPrescription": "",
+      "condition": "清园日期大于1215",
+      "solarName": "",
+      "reCheck": null,
+      "menu": 1,
+      "isEdit": 0,
+      "isMaster": null,
+      "num": null,
+      "purpose": "",
+      "selfExec": null,
+      "defaultFarmWork": 0,
+      "farmWorkType": 3,
+      "farmWorkTypeName": "病虫",
+      "type": 1,
+      "execute": 4,
+      "updateDate0": "2025-08-20",
+      "updateDate1": null,
+      "updateDate2": null,
+      "updateDate3": null,
+      "updateDate4": null,
+      "updateDate5": null,
+      "usageMode": "叶面施",
+      "serviceMain": "广州泽秾丰农资有限公司",
+      "updateDate6": null,
+      "confirmPicture": [],
+      "executeMain": "广州泽秾丰农资有限公司",
+      "storeShortName": "泽秾丰",
+      "weatherWarningMsg": "",
+      "executeEvidence": [],
+      "userEvaluation": null,
+      "reviewDate": null,
+      "reviewDate2": null,
+      "reviewImage": [],
+      "reviewImage2": [],
+      "serviceRegion": "广州市从化区荔枝博览园",
+      "cost": null,
+    }]
+    for (let item of gardenList) {
+      item.mapInfo = item.executeDate?.replace(/^\d{4}-(\d{2})-(\d{2})$/, '$1.$2') + '  ' + item.farmWorkName
+      this.gardenPointLayer.source.addFeature(newPoint(item, "farmPoint", "myGarden"))
+    }
+    this.kmap.getView().fit(this.gardenPointLayer.source.getExtent(), { padding: [20, 2, 20, 2] });
+    // const finalZoom = this.kmap.getView().getZoom();
+    // if (finalZoom > 18) {
+    //   this.kmap.getView().setZoom(18);
+    // }
   }
 }
 

+ 9 - 3
src/views/old_mini/home/components/homeFloatingPanel.vue

@@ -142,13 +142,19 @@ import { FloatingPanel } from "vant";
 import { useStore } from "vuex";
 import { computed, ref } from "vue";
 import RecordTask from "./recordTask.vue";
+const props = defineProps({
+    isExpert: {
+        type: Boolean,
+        default: false,
+    },
+});
 
 const store = useStore();
 // const tabBarHeight = computed(() => store.state.home.tabBarHeight);
 const tabBarHeight = ref(localStorage.getItem("tabBarHeight") * 1 || 50);
 
 const defalutHeight = ref(0);
-const anchors = ref([defalutHeight.value, 310 + tabBarHeight.value, Math.round(1 * window.innerHeight)]);
+const anchors = ref([defalutHeight.value, 310 + tabBarHeight.value, Math.round(1 * window.innerHeight) - (props.isExpert ? 40 : 0)]);
 const height = ref(anchors.value[1]);
 
 const containerRef = ref(null);
@@ -156,7 +162,7 @@ const handleClick = (e) => {
     e.preventDefault();
 };
 
-const activeTab = ref(1);
+const activeTab = ref(0);
 const tabs = ref(["农事任务", "农场档案"]);
 
 const handleTabClick = (index) => {
@@ -200,7 +206,7 @@ const handleHeightChange = ({ height }) => {
         cardContentHeight.value = 180;
         cardContentRef.value.scrollTo({ top: 0, behavior: "smooth" });
     } else if (height === anchors.value[2]) {
-        cardContentHeight.value = Math.round(1 * window.innerHeight) - (tabBarHeight.value - 40) - 180;
+        cardContentHeight.value = Math.round(1 * window.innerHeight) - (tabBarHeight.value - (props.isExpert ? 40 : 0)) - 180;
     }
     emit("heightChange", height);
 };

+ 9 - 0
src/views/old_mini/home/map/index.js

@@ -36,6 +36,15 @@ class IndexMap {
     this.kmap.addLayer(this.clickPointLayer.layer);
     let point = new Feature(new Point(coordinate))
     this.clickPointLayer.addFeature(point)
+
+    this.kmap.on("singleclick", (evt) => {
+          // that.kmap.map.forEachFeatureAtPixel(evt.pixel, function (feature, layer) {
+          //   if ( layer instanceof VectorLayer && layer.get("name") === "reportPolygonLayer" ) {
+          //     areaId.data = feature.get("id")
+          //   }
+          // });
+          console.log('evt.coordinate', evt.coordinate);
+        });
   }
 }
 

+ 232 - 0
src/views/old_mini/task_condition/components/task.vue

@@ -0,0 +1,232 @@
+<template>
+    <div class="task-page" :style="{ height: `calc(100vh - ${tabBarHeight}px - 50px)` }">
+        <div class="task-top">
+            <div class="map-container" ref="mapContainer"></div>
+            <div class="calendar-wrap">calendar</div>
+        </div>
+        <div class="task-list">
+            <div class="list-filter">
+                <div class="filter-item" :class="{ active: activeIndex === 0 }" @click="handleActiveFilter(0)">
+                    待执行
+                </div>
+                <div class="filter-item" :class="{ active: activeIndex === 1 }" @click="handleActiveFilter(1)">
+                    已完成
+                </div>
+                <div class="filter-item" :class="{ active: activeIndex === 2 }" @click="handleActiveFilter(2)">
+                    发起的需求
+                </div>
+            </div>
+            <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 class="task-content">
+                <div class="task-item" v-for="item in 10" :key="item">
+                    <task-item>
+                        <template #footer>
+                            <div class="item-footer">
+                                <div class="footer-l">
+                                    <img class="share-icon" src="@/assets/img/home/share-icon.png" alt="" />
+                                    转发
+                                </div>
+                                <div class="footer-r">
+                                    <div class="btn second">
+                                        <el-icon class="btn-icon" size="14" color="#8B8B8B"><ChatDotSquare /></el-icon>
+                                        联系果园
+                                    </div>
+                                    <div class="btn primary">
+                                        <el-icon class="btn-icon" size="14"><Plus /></el-icon>
+                                        加入任务
+                                    </div>
+                                </div>
+                            </div>
+                        </template>
+                    </task-item>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script setup>
+import { computed, nextTick, onMounted, ref } from "vue";
+import { useStore } from "vuex";
+import IndexMap from "../../farm_manage/map/index";
+import taskItem from "@/components/taskItem.vue";
+
+const store = useStore();
+const indexMap = new IndexMap();
+const mapContainer = ref(null);
+const tabBarHeight = computed(() => store.state.home.tabBarHeight);
+
+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" },
+];
+
+onMounted(() => {
+    const point = store.state.home.miniUserLocationPoint;
+    nextTick(() => {
+        indexMap.initMap(point, mapContainer.value, true);
+    });
+});
+
+const activeIndex = ref(0);
+function handleActiveFilter(i) {
+    activeIndex.value = i;
+}
+</script>
+
+<style lang="scss" scoped>
+.task-page {
+    width: 100%;
+    height: calc(100vh - 50px - 50px);
+    overflow: auto;
+    box-sizing: border-box;
+    background: #f5f7fb;
+    .map-container {
+        width: 100%;
+        height: 162px;
+        clip-path: inset(0px round 8px);
+    }
+
+    .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);
+                }
+            }
+        }
+    }
+
+    .calendar-wrap {
+        padding: 10px 0;
+        height: 130px;
+    }
+
+    .task-top {
+        padding: 10px 12px;
+    }
+
+    .task-list {
+        background: #fff;
+        padding: 8px 12px;
+    }
+    .list-filter {
+        display: flex;
+        align-items: center;
+        justify-content: space-around;
+        .filter-item {
+            padding: 0 12px;
+            height: 28px;
+            color: rgba(0, 0, 0, 0.5);
+            font-size: 14px;
+            line-height: 28px;
+            border-radius: 20px;
+            &.active {
+                color: #2199f8;
+                background: rgba(33, 153, 248, 0.2);
+            }
+        }
+    }
+
+    .task-item + .task-item {
+        margin-top: 10px;
+    }
+    
+    .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;
+            .share-icon {
+                width: 12px;
+                padding-right: 4px;
+            }
+        }
+        .footer-r {
+            display: flex;
+            align-items: center;
+            .btn {
+                height: 32px;
+                line-height: 32px;
+                padding: 0 12px;
+                border-radius: 20px;
+                display: flex;
+                align-items: center;
+                &.second {
+                    border: 1px solid #8B8B8B;
+                    color: #8B8B8B;
+                }
+                &.primary {
+                    background: #2199F8;
+                    color: #fff;
+                }
+                .btn-icon {
+                    padding-right: 4px;
+                }
+            }
+            .btn + .btn {
+                margin-left: 8px;
+            }
+        }
+    }
+}
+</style>

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

@@ -0,0 +1,47 @@
+<template>
+    <div class="farm-manage">
+        <tabs v-model:active="active" class="tabs">
+            <tab title="我的任务">
+                <task></task>
+            </tab>
+            <tab title="需求大厅">
+                <demand-hall :isCapital="true" />
+            </tab>
+        </tabs>
+        <system-reminder />
+    </div>
+</template>
+
+<script setup>
+import { ref } from "vue";
+import { Tab, Tabs } from "vant";
+import demandHall from "../farm_manage/components/demandHall.vue";
+import systemReminder from "../farm_manage/components/systemReminder.vue";
+import task from "./components/task.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>