浏览代码

feat:修改我的页面和农事服务页面

wangsisi 3 周之前
父节点
当前提交
db65def70b

二进制
src/assets/img/mine/drone-icon.png


二进制
src/assets/img/mine/figure-icon.png


二进制
src/assets/img/mine/label-icon.png


+ 18 - 0
src/router/globalRoutes.js

@@ -218,4 +218,22 @@ export default [
         name: "ExpertDetail",
         component: () => import("@/views/old_mini/home/subPages/expertDetail.vue"),
     },
+    //认证身份页面
+    {
+        path: "/authentication",
+        name: "Authentication",
+        meta: {
+            keepAlive: true,
+        },
+        component: () => import("@/views/old_mini/mine/pages/authentication.vue"),
+    },
+    //注册页面
+    {
+        path: "/register",
+        name: "Register",
+        meta: {
+            keepAlive: true,
+        },
+        component: () => import("@/views/old_mini/mine/pages/register.vue"),
+    },
 ];

+ 180 - 104
src/views/old_mini/agri_services/components/farmDynamics.vue

@@ -12,7 +12,7 @@
             </div>
         </div>
         <div class="task-content">
-            <div class="plan-menu">
+            <!-- <div class="plan-menu">
                 <el-anchor :container="containerRef" direction="vertical" type="default" @click="handleClick">
                     <el-menu :default-active="defaultActive" class="el-menu-vertical-demo">
                         <el-sub-menu v-for="(menu, index) in menuData" :key="index" :index="String(menu.id)">
@@ -26,7 +26,7 @@
                         </el-sub-menu>
                     </el-menu>
                 </el-anchor>
-            </div>
+            </div> -->
             <div class="expert-content" ref="containerRef">
                 <div v-for="(section, index) in contentData" :key="index" class="content-section">
                     <div class="section-id" :id="section.targetId"></div>
@@ -44,41 +44,56 @@
                             </div>
                         </template>
                         <template #footer>
-                            <div class="apply-wrap" v-if="section.orderStatus === 3">
+                            <div class="info-item" v-if="activePlanIndex === 1 || activePlanIndex === 2">
+                                服务报价:
+                                <span class="info-val">农资农资组织</span>
+                                <div class="info-price">
+                                    <span>¥ 5,642</span>
+                                    <el-icon><ArrowRight /></el-icon>
+                                </div>
+                            </div>
+                            <div class="apply-wrap" v-if="activePlanIndex === 0">
                                 <div class="apply-title">申请列表</div>
                                 <div class="apply-list">
-                                    <div class="apply-item" v-for="(item, index) in 2" :key="index">
+                                    <div class="apply-item" v-for="(item, itemIndex) in (section.isExpanded ? 4 : 2)" :key="itemIndex">
                                         <div class="apply-info">
                                             <el-avatar
-                                                :size="17"
+                                                :size="36"
                                                 src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"
                                             />
-                                            <span class="apply-name">农资农服农资1</span>
-                                            <span class="apply-score">5.0分</span>
+                                            <div class="apply-text">
+                                                <div>农资农服农资{{ itemIndex + 1 }}</div>
+                                                <span>位于广东省广州市</span>
+                                            </div>
                                         </div>
-                                        <div class="apply-text">服务设备:无人机、水肥一体机、水肥</div>
-                                        <div class="action-r apply-action">
-                                            <div class="action-item default-item">联系他们</div>
-                                            <div class="action-item primary-item">接受申请</div>
+                                        <div class="action-r apply-price">
+                                            <span>¥ 5,642</span>
+                                            <el-icon><ArrowRight /></el-icon>
                                         </div>
                                     </div>
                                 </div>
+                                <div class="expand-more" @click="toggleExpand(index)">
+                                    <span>展开更多</span>
+                                    <el-icon :class="{ 'rotate': section.isExpanded }">
+                                        <ArrowDown />
+                                    </el-icon>
+                                </div>
                             </div>
-                            <div class="action-group">
-                                <div class="action-l">查看详情</div>
+                            <div class="action-group" :class="{'flex-end': activePlanIndex === 0}">
+                                <div class="action-l" v-if="activePlanIndex !== 0">查看详情</div>
                                 <div class="action-r" v-if="section.orderStatus === 0">
                                     <div class="action-item second-item">拍照识别</div>
                                     <div class="action-item primary-item">去确认</div>
                                 </div>
-                                <div class="action-r" v-if="section.orderStatus === 1">
+                                <div class="action-r" v-if="activePlanIndex === 1">
                                     <div class="action-item warning-item">发起需求</div>
                                     <div class="action-item primary-item">确认完成</div>
                                 </div>
-                                <div class="action-r" v-if="section.orderStatus === 2">
+                                <div class="action-r" v-if="activePlanIndex === 2">
                                     <div class="action-item warning-item">发起需求</div>
                                     <div class="action-item primary-item">去复核</div>
                                 </div>
-                                <div class="action-r" v-if="section.orderStatus === 3 || section.orderStatus === 4">
+                                <div class="action-r" v-if="activePlanIndex === 0">
                                     <div class="action-item cancel-item">取消发起</div>
                                 </div>
                             </div>
@@ -91,14 +106,20 @@
 </template>
 <script setup>
 import { ref } from "vue";
+import { ArrowRight, ArrowDown } from "@element-plus/icons-vue";
 import recordItem from "@/components/recordItem.vue";
 
-const filterType = ref(["申请列表", "未接单", "待触发"]);
+const filterType = ref(["待支付", "待执行", "已完成","售后"]);
 const activePlanIndex = ref(0);
+
 const handlePlanClick = (index) => {
     activePlanIndex.value = index;
 };
 
+const toggleExpand = (sectionIndex) => {
+    contentData.value[sectionIndex].isExpanded = !contentData.value[sectionIndex].isExpanded;
+};
+
 const containerRef = ref(null);
 const handleClick = (e) => {
     e.preventDefault();
@@ -132,6 +153,7 @@ const contentData = ref([
         targetId: "part1",
         title: "巡园农事",
         parentTitle: "秋梢期",
+        isExpanded: false, // 添加展开状态
         reCheckText: "本次农事复核成效优异,作物产量潜力实现大幅增长,虫害风险控制优异,未发现虫害风险",
         expert: 91356,
         orderStatus: 3,
@@ -220,6 +242,7 @@ const contentData = ref([
         targetId: "part2",
         title: "梢期防虫",
         parentTitle: "秋梢期",
+        isExpanded: false, // 添加展开状态
         consequenceText: "如果不做本次农事,会导致您的产量、质量下降30%,管理得分降低10分",
         id: "274654",
         reCheckText: "本次农事复核成效优异,作物产量潜力实现大幅增长,树体营养较充足,土壤肥力增加",
@@ -391,6 +414,7 @@ const contentData = ref([
     {
         targetId: "part3",
         title: "梢期营养",
+        isExpanded: false, // 添加展开状态
         consequenceText: "如果不做本次农事,会导致您的产量、质量下降5%,管理得分降低2分",
         reCheckText: "本次农事复核成效优异,作物产量潜力实现大幅增长,树体营养较充足,转色速度非常稳定,转色率超过80%",
         farmName: "荔枝博览园",
@@ -631,6 +655,7 @@ const contentData = ref([
         targetId: "part4",
         title: "巡园农事",
         parentTitle: "开花期",
+        isExpanded: false, // 添加展开状态
         consequenceText: "如果不做本次农事,会导致您的产量、质量下降20%,管理得分降低8分",
         id: "274672",
         reCheckText: "本次农事复核成效优异,作物产量潜力实现大幅增长,病虫害基数得到大幅下降,未发现病虫害风险",
@@ -918,6 +943,7 @@ const contentData = ref([
         id: "part5",
         title: "摇花吹花",
         parentTitle: "开花期",
+        isExpanded: false, // 添加展开状态
         consequenceText: "如果不做本次农事,会导致您的产量、质量下降15%,管理得分降低5分",
         id: "274671",
         reCheckText: "本次农事复核成效优异,作物产量潜力实现大幅增长,树体营养较充足,膨果速度非常稳定,膨果率超过80%",
@@ -1164,83 +1190,83 @@ const contentData = ref([
         display: flex;
         padding-top: 10px;
         height: calc(100% - 140px);
-        .plan-menu {
-            width: 90px;
-            height: 100%;
-            padding: 10px 0;
-            box-sizing: border-box;
-            background: #fff;
-            border-radius: 0 10px 10px 0;
-            .menu-icon {
-                width: 13px;
-            }
-            .menu-text {
-                padding: 0 4px;
-            }
-            ::v-deep {
-                .el-anchor {
-                    height: 100%;
-                    background: none;
-                }
-                .el-anchor__marker {
-                    display: none;
-                }
-                .el-menu {
-                    background: none;
-                    border: none;
-                    .el-sub-menu__title {
-                        background: none;
-                        padding: 0 2px;
-                        justify-content: center;
-                    }
-                    .el-sub-menu__title {
-                        height: 32px;
-                    }
-                    .el-sub-menu .el-sub-menu__icon-arrow {
-                        position: static;
-                        padding-top: 6px;
-                    }
-                    .el-sub-menu {
-                        margin-bottom: 16px;
-                        &.is-opened {
-                            .el-sub-menu__icon-arrow {
-                                padding-bottom: 6px;
-                                padding-top: 0;
-                            }
-                        }
-                        .el-menu-item {
-                            height: 32px;
-                            line-height: 32px;
-                            margin: 4px 8px;
-                            padding: 0 2px;
-                            justify-content: center;
-                            background: none;
-                        }
-                        .el-menu-item.is-active {
-                            background: none;
-                            color: #fff;
-                        }
-                        .el-anchor__item {
-                            width: 100%;
-                            text-align: center;
-                        }
-                        .el-anchor__link {
-                            color: #666666;
-                        }
-                        .el-anchor__link.is-active {
-                            background: linear-gradient(180deg, #70bffe, #2199f8);
-                            border-radius: 20px;
-                            color: #fff;
-                        }
-                    }
-                }
-                .el-anchor__list {
-                    padding-left: 0;
-                }
-            }
-        }
+        // .plan-menu {
+        //     width: 90px;
+        //     height: 100%;
+        //     padding: 10px 0;
+        //     box-sizing: border-box;
+        //     background: #fff;
+        //     border-radius: 0 10px 10px 0;
+        //     .menu-icon {
+        //         width: 13px;
+        //     }
+        //     .menu-text {
+        //         padding: 0 4px;
+        //     }
+        //     ::v-deep {
+        //         .el-anchor {
+        //             height: 100%;
+        //             background: none;
+        //         }
+        //         .el-anchor__marker {
+        //             display: none;
+        //         }
+        //         .el-menu {
+        //             background: none;
+        //             border: none;
+        //             .el-sub-menu__title {
+        //                 background: none;
+        //                 padding: 0 2px;
+        //                 justify-content: center;
+        //             }
+        //             .el-sub-menu__title {
+        //                 height: 32px;
+        //             }
+        //             .el-sub-menu .el-sub-menu__icon-arrow {
+        //                 position: static;
+        //                 padding-top: 6px;
+        //             }
+        //             .el-sub-menu {
+        //                 margin-bottom: 16px;
+        //                 &.is-opened {
+        //                     .el-sub-menu__icon-arrow {
+        //                         padding-bottom: 6px;
+        //                         padding-top: 0;
+        //                     }
+        //                 }
+        //                 .el-menu-item {
+        //                     height: 32px;
+        //                     line-height: 32px;
+        //                     margin: 4px 8px;
+        //                     padding: 0 2px;
+        //                     justify-content: center;
+        //                     background: none;
+        //                 }
+        //                 .el-menu-item.is-active {
+        //                     background: none;
+        //                     color: #fff;
+        //                 }
+        //                 .el-anchor__item {
+        //                     width: 100%;
+        //                     text-align: center;
+        //                 }
+        //                 .el-anchor__link {
+        //                     color: #666666;
+        //                 }
+        //                 .el-anchor__link.is-active {
+        //                     background: linear-gradient(180deg, #70bffe, #2199f8);
+        //                     border-radius: 20px;
+        //                     color: #fff;
+        //                 }
+        //             }
+        //         }
+        //         .el-anchor__list {
+        //             padding-left: 0;
+        //         }
+        //     }
+        // }
         .expert-content {
-            width: calc(100% - 90px);
+            width: 100%;
             height: 100%;
             overflow: auto;
             padding-bottom: 10px;
@@ -1254,7 +1280,7 @@ const contentData = ref([
                     height: 1px;
                 }
                 .recipe-item {
-                    margin-right: 0;
+                    border: 1px solid rgba(0, 0, 0, 0.1);
                 }
             }
             .box-title {
@@ -1298,6 +1324,24 @@ const contentData = ref([
                     }
                 }
             }
+            .info-item {
+                color: #bbbbbb;
+                margin-bottom: 4px;
+                display: flex;
+                align-items: center;
+                .info-val {
+                    font-size: 12px;
+                    color: #666666;
+                }
+                .info-price {
+                    margin-left: 8px;
+                    display: flex;
+                    align-items: center;
+                    font-weight: 500;
+                    font-size: 14px;
+                    color: #1D2129;
+                }
+            }
 
             .apply-wrap {
                 .apply-title {
@@ -1307,6 +1351,9 @@ const contentData = ref([
                 }
                 .apply-list {
                     .apply-item {
+                        display: flex;
+                        align-items: center;
+                        justify-content: space-between;
                         border-radius: 8px;
                         border: 1px solid rgba(0, 0, 0, 0.1);
                         padding: 10px;
@@ -1314,24 +1361,50 @@ const contentData = ref([
                             display: flex;
                             align-items: center;
                             font-weight: 500;
-                            .apply-name{
-                                margin: 0 5px;
-                            }
-                            .apply-score{
-                                font-size: 12px;
-                                color: #FF953D;
-                            }
                         }
                         .apply-text {
-                            font-size: 12px;
-                            color: #666666;
-                            margin: 5px 0 10px 0;
+                            font-size: 14px;
+                            color: #1D2129;
+                            margin-left: 8px;
+                            span{
+                                font-weight: 400;
+                                font-size: 12px;
+                                color: rgba(29, 33, 41, 0.2);
+                            }
                         }
                     }
                     .apply-item + .apply-item {
                         margin-top: 8px;
                     }
                 }
+                .expand-more {
+                    display: flex;
+                    align-items: center;
+                    justify-content: center;
+                    margin-top: 8px;
+                    cursor: pointer;
+                    color: rgba(0, 0, 0, 0.4);
+                    font-size: 12px;
+                    span {
+                        margin-right: 4px;
+                    }
+                    .el-icon {
+                        font-size: 12px;
+                        transition: transform 0.3s ease;
+                        &.rotate {
+                            transform: rotate(180deg);
+                        }
+                    }
+                    &:hover {
+                        color: rgba(0, 0, 0, 0.6);
+                    }
+                }
+            }
+            .action-r{
+                color: #1D2129;
+            }
+            .apply-price{
+                font-weight: 500;
             }
 
             .action-group {
@@ -1341,6 +1414,9 @@ const contentData = ref([
                 padding-top: 8px;
                 margin-top: 8px;
                 border-top: 1px solid #f5f5f5;
+                &.flex-end{
+                    justify-content: flex-end;
+                }
                 .action-l {
                     font-size: 12px;
                     color: rgba(0, 0, 0, 0.4);

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

@@ -1,7 +1,7 @@
 <template>
     <div class="agri-services" :style="{ height: `calc(100vh - ${tabBarHeight}px - 50px)` }">
         <tabs v-model:active="active" class="tabs">
-            <tab title="农事动态">
+            <tab title="农事管理">
                 <farm-dynamics />
             </tab>
             <tab title="服务大厅">

+ 25 - 6
src/views/old_mini/create_farm/editMap.vue

@@ -16,6 +16,7 @@
                     <div class="address-btn" @click="goBack">修改地址</div>
                 </div>
                 <div class="edit-map-footer-btn">
+                    <div class="btn-delete" @click="deletePolygon">删除地块</div>
                     <div class="btn-cancel" @click="goBack">取消</div>
                     <div class="btn-confirm" @click="confirm">确认</div>
                 </div>
@@ -31,6 +32,7 @@ import EditMap from "./map/editMap.js";
 import { useRouter, useRoute } from "vue-router";
 import { convertPointToArray } from "@/utils/index";
 import { useStore } from "vuex";
+import { ElMessage } from "element-plus";
 
 const router = useRouter();
 const route = useRoute();
@@ -58,6 +60,11 @@ onMounted(() => {
     type.value = route.query.type
     const point = route.query.mapCenter || "POINT (113.6142086995688 23.585836479509055)"
     editMap.initMap(point, mapContainer.value);
+    
+    // 设置绘制限制回调
+    editMap.setDrawLimitCallback(() => {
+        ElMessage.warning("请先删除当前地块再重新勾画");
+    });
     // editMap.setAreaGeometry([{ featureWkt: mapData.wkt }]);
 });
 
@@ -65,13 +72,15 @@ onActivated(() => {
     pointAddress.value = route.query.pointAddress
     pointName.value = route.query.pointName
     const point = route.query.mapCenter || "POINT (113.6142086995688 23.585836479509055)"
-    editMap.setMapPosition(convertPointToArray(point))
-
-    // 绘制勾画范围
+    
+    // 先绘制地块
     const polygonData = store.state.home.polygonData;
     if (polygonData) {
         editMap.setAreaGeometry(polygonData?.geometryArr);
     }
+    
+    // 再设置地图中心位置,确保视图在 mapCenter
+    editMap.setMapPosition(convertPointToArray(point))
 })
 
 onDeactivated(() => {
@@ -101,6 +110,11 @@ function backgToCreate() {
         router.back()
     }
 }
+const deletePolygon = () => {
+    editMap.deleteCurrentPolygon();
+    ElMessage.success("地块已删除");
+};
+
 const confirm = () => {
     // getAreaGeometry
     const polygonData = editMap.getAreaGeometry()
@@ -193,19 +207,24 @@ const confirm = () => {
                 justify-content: center;
                 align-items: center;
                 width: 100%;
+                gap: 8px;
                 div {
-                    width: 92px;
+                    flex: 1;
+                    max-width: 100px;
                     text-align: center;
                     color: #666666;
-                    font-size: 16px;
+                    font-size: 14px;
                     padding: 8px 0;
                     border-radius: 25px;
                     background: #fff;
                 }
+                .btn-delete {
+                    background: #ff4d4f;
+                    color: #fff;
+                }
                 .btn-confirm {
                     background: #000;
                     background-image: linear-gradient(180deg, #76c3ff 0%, #2199f8 100%);
-                    margin-left: 16px;
                     color: #fff;
                 }
             }

+ 71 - 34
src/views/old_mini/create_farm/index.vue

@@ -53,7 +53,7 @@
                                                 v-model="ruleForm.address"
                                                 autocomplete="off"
                                             />
-                                            <div class="draw-btn" @click="toSubPage">点击勾选地块</div>
+                                            <div class="draw-btn" @click="toSubPage">{{ hasDefaultPolygon ? '点击勾选地块' : '新增地块' }}</div>
                                         </div>
                                     </el-form-item>
                                     <el-form-item label="种植作物" prop="speciesItem">
@@ -164,6 +164,9 @@ const mapContainer = ref(null);
 // 标记是否从编辑地图页面确认返回
 const isFromEditMap = ref(false);
 
+// 标记是否已创建默认地块
+const hasDefaultPolygon = ref(false);
+
 /**
  * 根据中心点生成指定边长的正方形地块WKT
  * @param {Array} center - 中心点坐标 [lng, lat]
@@ -253,23 +256,16 @@ onMounted(() => {
     // 清除上一次的地块数据,确保每次进入都是全新状态
     store.commit("home/SET_FARM_POLYGON", null);
     isFromEditMap.value = false; // 初始化时可以手动输入
+    hasDefaultPolygon.value = false; // 初始化时没有默认地块
     
     centerPoint.value = store.state.home.miniUserLocationPoint;
     const arr = convertPointToArray(centerPoint.value);
     getLocationName(`${arr[1]},${arr[0]}`);
     indexMap.initMap(centerPoint.value, mapContainer.value);
 
-    // 初始化时绘制边长200米的正方形地块
-    const squareData = generateSquarePolygonBySideLength(arr, 200);  // 200米边长
-    const geometryData = {
-        geometryArr: [squareData.wkt],
-        mianji: squareData.area,  // 自动计算的面积(亩)
-    }
-    indexMap.setAreaGeometry(geometryData?.geometryArr);
-    
-    // 保存到状态中(只保存地块几何数据,不回显面积)
-    polygonArr.value = geometryData?.geometryArr;
-    // 清空面积输入框,等待用户输入
+    // 不再初始化时绘制默认地块,等待用户点击"新增地块"按钮
+    // 清空地块和面积数据
+    polygonArr.value = null;
     ruleForm.mianji = '';
 
     getSpecieList();
@@ -285,6 +281,7 @@ onActivated(() => {
         // 清除旧的地块数据
         store.commit("home/SET_FARM_POLYGON", null);
         isFromEditMap.value = false; // 从home进入,可以手动输入
+        hasDefaultPolygon.value = false; // 重置默认地块状态
         
         centerPoint.value = store.state.home.miniUserLocationPoint;
         const arr = convertPointToArray(centerPoint.value);
@@ -293,15 +290,8 @@ onActivated(() => {
         
         indexMap.clearLayer();
         
-        // 重新生成默认地块
-        const squareData = generateSquarePolygonBySideLength(arr, 200);  // 200米边长
-        const geometryData = {
-            geometryArr: [squareData.wkt],
-            mianji: squareData.area,
-        }
-        indexMap.setAreaGeometry(geometryData?.geometryArr);
-        polygonArr.value = geometryData?.geometryArr;
-        // 清空面积输入框,等待用户输入
+        // 不再自动生成默认地块,等待用户点击"新增地块"
+        polygonArr.value = null;
         ruleForm.mianji = '';
         
         return; // 直接返回,不执行下面的逻辑
@@ -311,22 +301,42 @@ onActivated(() => {
     // 绘制勾画范围(从edit_map返回的情况)
     const polygonData = store.state.home.polygonData;
     if (polygonData) {
-        // 用户从edit_map返回
-        // 根据 isConfirmed 判断是否锁定输入框
-        if (polygonData.isConfirmed) {
-            // 用户点击了"确认"按钮,锁定输入框并显示精确面积
-            isFromEditMap.value = true;
-            ruleForm.mianji = polygonData.mianji;
+        // 检查地块数据是否有效(数组存在且不为空)
+        const hasValidGeometry = polygonData.geometryArr && 
+                                 Array.isArray(polygonData.geometryArr) && 
+                                 polygonData.geometryArr.length > 0;
+        
+        if (hasValidGeometry) {
+            // 用户从edit_map返回,且有有效的地块数据
+            // 根据 isConfirmed 判断是否锁定输入框
+            if (polygonData.isConfirmed) {
+                // 用户点击了"确认"按钮,锁定输入框并显示精确面积
+                isFromEditMap.value = true;
+                ruleForm.mianji = polygonData.mianji;
+            } else {
+                // 用户点击了"取消",不锁定输入框,面积保持原样
+                isFromEditMap.value = false;
+                // 面积输入框保持之前的值,不更新
+            }
+            indexMap.setAreaGeometry(polygonData.geometryArr);
+            polygonArr.value = polygonData.geometryArr;
+            // 有地块数据时,标记已创建默认地块
+            hasDefaultPolygon.value = true;
         } else {
-            // 用户点击了"取消",不锁定输入框,面积保持原样
+            // 用户在编辑页面删除了所有地块
+            // 重置所有状态
+            polygonArr.value = null;
+            ruleForm.mianji = '';
             isFromEditMap.value = false;
-            // 面积输入框保持之前的值,不更新
+            hasDefaultPolygon.value = false;
         }
-        indexMap.setAreaGeometry(polygonData?.geometryArr);
-        polygonArr.value = polygonData.geometryArr;
     } else if (centerPoint.value && polygonArr.value) {
         // 没有新的编辑数据,保持当前地块
-        indexMap.setAreaGeometry(polygonArr.value);
+        // 同样需要检查数据有效性
+        if (Array.isArray(polygonArr.value) && polygonArr.value.length > 0) {
+            indexMap.setAreaGeometry(polygonArr.value);
+            // 保持 hasDefaultPolygon 状态
+        }
     }
 });
 
@@ -453,14 +463,39 @@ const resetForm = (formEl) => {
     store.commit("home/SET_FARM_POLYGON", null);
     polygonArr.value = null;
     isFromEditMap.value = false;
+    hasDefaultPolygon.value = false; // 重置默认地块状态
     router.replace("/home?reload=true");
 };
 
 const centerPoint = ref(null);
 
 function toSubPage() {
-    // 如果存在默认地块数据,保存到store中以便在编辑页面回显
-    // 注意:isConfirmed 设置为 false,表示只是为了回显,还未确认
+    // 如果还没有默认地块,先创建默认地块
+    if (!hasDefaultPolygon.value) {
+        if (centerPoint.value) {
+            const arr = convertPointToArray(centerPoint.value);
+            const squareData = generateSquarePolygonBySideLength(arr, 200);  // 200米边长
+            const geometryData = {
+                geometryArr: [squareData.wkt],
+                mianji: squareData.area,
+            };
+            
+            // 绘制默认地块
+            indexMap.setAreaGeometry(geometryData.geometryArr);
+            
+            // 保存地块数据
+            polygonArr.value = geometryData.geometryArr;
+            
+            // 标记已创建默认地块
+            hasDefaultPolygon.value = true;
+            
+            // 不跳转,停留在当前页面
+            return;
+        }
+    }
+    
+    // 如果已有默认地块,则跳转到编辑页面
+    // 保存到store中以便在编辑页面回显
     if (polygonArr.value) {
         const polygonData = {
             geometryArr: polygonArr.value,
@@ -613,6 +648,8 @@ function handleMianjiInput(value) {
             
             // 更新状态
             polygonArr.value = geometryData.geometryArr;
+            // 标记已创建默认地块
+            hasDefaultPolygon.value = true;
         }
     }, 500);
 }

+ 44 - 3
src/views/old_mini/create_farm/map/editMap.js

@@ -46,17 +46,48 @@ class EditMap {
     this.setMapPoint(coordinate)
 
     this.kmap.initDraw((e) => {
-      // showContent.isShow = true
+      // drawend事件:绘制结束后的处理
     })
+    
+    // 监听drawstart事件,在开始绘制前检查是否已有地块
+    this.kmap.draw.on('drawstart', (e) => {
+      const features = this.kmap.getLayerFeatures();
+      if (features && features.length >= 1) {
+        // 提示用户先删除当前地块
+        this.onDrawLimit && this.onDrawLimit();
+        // 取消本次绘制
+        this.kmap.draw.abortDrawing();
+      }
+    });
+    
     this.kmap.startDraw()
     this.kmap.modifyDraw()
   }
 
-  setAreaGeometry(geometryArr) {
+  setAreaGeometry(geometryArr, needFitView = false) {
     let that = this
     geometryArr.map(item => {
-      that.kmap.setLayerWkt(item)
+      // 不使用 setLayerWkt,而是手动添加要素,避免自动缩放视图
+      const format = new WKT()
+      const mapProjection = that.kmap.map.getView().getProjection()
+      let geometry = format.readGeometry(item, {
+        dataProjection: 'EPSG:4326',
+        featureProjection: mapProjection
+      })
+      let f = new Feature({ geometry: geometry })
+      that.kmap.polygonLayer.source.addFeature(f)
     })
+    // 根据参数决定是否需要自适应地块范围
+    if (needFitView) {
+      this.fitView()
+    }
+  }
+
+
+  fitView(){
+    let extent = this.kmap.polygonLayer.source.getExtent()
+    // 地图自适应到区域可视范围
+    this.kmap.getView().fit(extent, { duration: 500, padding: [100, 100, 100, 100] });
   }
 
   clearLayer(){
@@ -94,6 +125,16 @@ class EditMap {
     let point = new Feature(new Point(coordinate))
     this.clickPointLayer.addFeature(point)
   }
+
+  // 删除当前地块
+  deleteCurrentPolygon() {
+    this.kmap.polygonLayer.source.clear();
+  }
+
+  // 设置绘制限制回调
+  setDrawLimitCallback(callback) {
+    this.onDrawLimit = callback;
+  }
 }
 
 export default EditMap;

+ 7 - 0
src/views/old_mini/create_farm/map/index.js

@@ -85,6 +85,13 @@ class IndexMap {
     geometryArr.map(item => {
       that.kmap.setLayerWkt(item)
     })
+    this.fitView()
+  }
+
+  fitView(){
+    let extent = this.kmap.polygonLayer.source.getExtent()
+    // 地图自适应到区域可视范围
+    this.kmap.getView().fit(extent, { duration: 500, padding: [100, 100, 100, 100] });
   }
 }
 

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

@@ -88,22 +88,22 @@ const monitorCards = ref({
 
 // 卡片点击事件
 const handleCardClick = (card) => {
-    // showFarmPopup.value = true;
-    if(card.route === "/pest"){
-        const dropdownGardenItem = ref({
-            organId:766,
-            periodId:1,
-            wktVal:'wktVal',
-            address:'address',
-            district:'district',
-            name:'荔博园',
-        });
-        wx.miniProgram.navigateTo({
-            url: `/pages/subPages/carmera/index?gardenData=${JSON.stringify(dropdownGardenItem.value)}`,
-        });
-    }else{
-        router.push(card.route);
-    }
+    showFarmPopup.value = true;
+    // if(card.route === "/pest"){
+    //     const dropdownGardenItem = ref({
+    //         organId:766,
+    //         periodId:1,
+    //         wktVal:'wktVal',
+    //         address:'address',
+    //         district:'district',
+    //         name:'荔博园',
+    //     });
+    //     wx.miniProgram.navigateTo({
+    //         url: `/pages/subPages/carmera/index?gardenData=${JSON.stringify(dropdownGardenItem.value)}`,
+    //     });
+    // }else{
+    //     router.push(card.route);
+    // }
 };
 
 const handleBtn = () => {

+ 11 - 8
src/views/old_mini/mine/index.vue

@@ -26,7 +26,7 @@
                     <span>{{ item.label }}</span>
                 </div>
             </div>
-            <div class="grid-group">
+            <!-- <div class="grid-group">
                 <div class="grid-item" v-for="(item, index) in gridItems" :key="index" @click="handleGridClick(item)">
                     <div class="grid-title">
                         <span>{{ item.title }}</span>
@@ -34,7 +34,7 @@
                     </div>
                     <span class="grid-desc">{{ item.desc }}</span>
                 </div>
-            </div>
+            </div> -->
             <div class="cell-group">
                 <div class="cell-item" v-for="(item, index) in cellItems" :key="index" @click="handleCellClick(item)">
                     <span class="item-title">{{ item.title }}</span>
@@ -45,14 +45,13 @@
     </div>
 </template>
 <script setup>
-import { Cell, CellGroup } from "vant";
 import { onActivated, ref } from "vue";
 import { useRouter } from "vue-router";
 
 const router = useRouter();
 
 // 0: 农户, 1: 专家, 2:农资农服
-const curRole = ref(1);
+const curRole = ref(0);
 
 // 网格项数据
 const gridItems = ref([]);
@@ -119,12 +118,16 @@ onActivated(() => {
 // 单元格项数据
 const cellItems = ref([
     {
-        title: "联系客服",
-        path: "/customer-service",
+        title: "我的农场",
+        path: "/my_farm",
     },
     {
-        title: "帮助中心",
-        path: "/help",
+        title: "认证农资/专家",
+        path: "/authentication",
+    },
+    {
+        title: "联系客服",
+        path: "/customer-service",
     },
     {
         title: "退出登录",

+ 121 - 0
src/views/old_mini/mine/pages/authentication.vue

@@ -0,0 +1,121 @@
+<template>
+    <div class="authentication-page">
+        <custom-header name="认证身份"></custom-header>
+        <div class="content">
+            <span class="text">请选择您要认证的身份</span>
+            <div class="card-group">
+                <div
+                    :class="['card-item', { active: active === index }]"
+                    v-for="(item, index) in list"
+                    :key="index"
+                    @click="handleActive(item, index)"
+                >
+                    <div class="info">
+                        <div class="name">{{ item.name }}</div>
+                        <span>{{ item.desc }}</span>
+                    </div>
+                    <img :src="require(`@/assets/img/mine/${item.icon}-icon.png`)" alt="" />
+                </div>
+            </div>
+            <div class="button" @click="handleOk">选好了</div>
+        </div>
+    </div>
+</template>
+
+<script setup>
+import customHeader from "@/components/customHeader.vue";
+import {ref} from 'vue'
+import { useRouter } from "vue-router";
+const router = useRouter();
+
+const list = [
+    {
+        name:"专家",
+        desc:"根据表型触发农事,确认农事处方",
+        icon:"figure",
+        identity:"EXPERT",
+        role:3
+    },
+    {
+        name:"农资农服",
+        desc:"巡飞地形,收集农情测报",
+        icon:"drone",
+        identity:"NZ",
+        role:2
+    },
+]
+    // {
+    //     name:"农服",
+    //     desc:"接单执行,服务农户",
+    //     icon:"shield",
+    //     identity:"NF",
+    //     role:1
+    // }
+
+const active = ref(0)
+const handleActive = (item,index) =>{
+    active.value = index
+}
+
+const handleOk = () =>{
+    router.push(`/register?identity=${list[active.value].identity}&role=${list[active.value].role}`)
+}
+</script>
+
+<style lang="scss" scoped>
+.authentication-page {
+    width: 100%;
+    height: 100vh;
+    background-color: #f5f7fb;
+    .content {
+        height: calc(100% - 40px);
+        padding: 60px 30px;
+        box-sizing: border-box;
+        .text {
+            font-size: 18px;
+        }
+        .card-group {
+            margin-top: 26px;
+            .card-item {
+                background: #fff;
+                display: flex;
+                align-items: center;
+                justify-content: space-between;
+                padding: 27px 20px;
+                border-radius: 2px;
+                border: 1px solid transparent;
+                &.active {
+                    background: rgba(33, 153, 248, 0.1);
+                    border: 1px solid #2199f8;
+                }
+                .info {
+                    .name {
+                        font-size: 18px;
+                        font-weight: bold;
+                        margin-bottom: 2px;
+                    }
+                    span {
+                        color: rgba(0, 0, 0, 0.2);
+                    }
+                }
+                img {
+                    width: 42px;
+                }
+            }
+
+            .card-item + .card-item {
+                margin-top: 20px;
+            }
+        }
+        .button {
+            color: #fff;
+            border-radius: 2px;
+            background: #2199f8;
+            text-align: center;
+            font-size: 16px;
+            padding: 8px 0;
+            margin-top: 50px;
+        }
+    }
+}
+</style>

+ 0 - 50
src/views/old_mini/mine/pages/farm.vue

@@ -18,9 +18,6 @@
                             </div>
                         </div>
                     </div>
-                    <el-select class="select" v-model="value">
-                        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
-                    </el-select>
                 </div>
                 <div class="item-btn">查看详情</div>
             </div>
@@ -32,30 +29,6 @@
 import customHeader from "@/components/customHeader.vue";
 import { ref } from "vue";
 
-const value = ref("Option1");
-
-const options = [
-    {
-        value: "Option1",
-        label: "选择方案1",
-    },
-    {
-        value: "Option2",
-        label: "Option2",
-    },
-    {
-        value: "Option3",
-        label: "Option3",
-    },
-    {
-        value: "Option4",
-        label: "Option4",
-    },
-    {
-        value: "Option5",
-        label: "Option5",
-    },
-];
 </script>
 
 <style scoped lang="scss">
@@ -114,29 +87,6 @@ const options = [
                         }
                     }
                 }
-                .select {
-                    width: 105px;
-                    margin-left: 80px;
-                    margin-top: 10px;
-                    ::v-deep{
-                        .el-select__wrapper{
-                            border: 1px solid #2199F8;
-                            box-shadow: none;
-                        }
-                        .el-select__placeholder,.el-select__caret{
-                            color: #2199F8;
-                        }
-                        .el-select__selection {
-                            flex: none;
-                            width: fit-content;
-                        }
-                        .el-select__placeholder {
-                            position: static;
-                            transform: none;
-                            width: fit-content;
-                        }
-                    }
-                }
             }
             .item-btn {
                 color: #a8a8a8;

+ 477 - 0
src/views/old_mini/mine/pages/register.vue

@@ -0,0 +1,477 @@
+<template>
+    <div class="register-page">
+        <custom-header :name="'注册' + pageName" bgColor="#E6F2FF"></custom-header>
+        <div class="content">
+            <Form @submit="onSubmit" required="auto" label-width="74px" ref="formRef">
+                <div class="card">
+                    <div class="card-title">
+                        <img src="@/assets/img/mine/label-icon.png" alt="" />
+                        <span>基本信息</span>
+                    </div>
+                    <div class="form">
+                        <field
+                            v-model="formData.name"
+                            label="姓名"
+                            :rules="[{ required: true, message: '请输入姓名' }]"
+                            placeholder="请输入姓名"
+                        />
+                        <field
+                            v-model="formData.tel"
+                            type="tel"
+                            name="tel"
+                            label="联系电话"
+                            :rules="[{ required: true,validator: validatorTel, message: '请输入电话号码'}]"
+                            placeholder="请输入电话号码"
+                        />
+                        <field
+                            v-show="pageType === 'NZ'"
+                            v-model="value"
+                            label="主体名称"
+                            placeholder="请输入主体名称"
+                        />
+                        <template v-if="pageType === 'EXPERT'">
+                            <field
+                                label-width="130px"
+                                readonly
+                                v-model="number"
+                                label="服务过的果园数量"
+                                placeholder="点击选择服务数量"
+                            >
+                                <template #input>
+                                    <el-dropdown trigger="click">
+                                        <div class="el-dropdown-link-text">
+                                            {{ number }}
+                                            <el-icon class="el-icon--right">
+                                                <CaretBottom />
+                                            </el-icon>
+                                        </div>
+                                        <template #dropdown>
+                                            <el-dropdown-menu class="v-dropdown-menu">
+                                                <el-dropdown-item
+                                                    v-for="(item, index) in numberList"
+                                                    :key="index"
+                                                    :class="{ active: numberActive === index }"
+                                                    @click="handleNumberDropdown(item, index)"
+                                                    >{{ item }}</el-dropdown-item
+                                                >
+                                            </el-dropdown-menu>
+                                        </template>
+                                    </el-dropdown>
+                                </template>
+                            </field>
+                            <field
+                                label-width="130px"
+                                readonly
+                                v-model="year"
+                                label="从事种植指导年数"
+                                placeholder="点击选择指导年数"
+                            >
+                                <template #input>
+                                    <el-dropdown trigger="click">
+                                        <div class="el-dropdown-link-text">
+                                            {{ year }}
+                                            <el-icon class="el-icon--right">
+                                                <CaretBottom />
+                                            </el-icon>
+                                        </div>
+                                        <template #dropdown>
+                                            <el-dropdown-menu class="v-dropdown-menu">
+                                                <el-dropdown-item
+                                                    v-for="(item, index) in yearList"
+                                                    :key="index"
+                                                    :class="{ active: yearActive === index }"
+                                                    @click="handleYearDropdown(item, index)"
+                                                    >{{ item }}</el-dropdown-item
+                                                >
+                                            </el-dropdown-menu>
+                                        </template>
+                                    </el-dropdown>
+                                </template>
+                            </field>
+                        </template>
+                        <div class="flex" v-else>
+                            <field
+                                v-model="formData.address"
+                                label="服务区域"
+                                readonly
+                                placeholder="默认位置"
+                            />
+                            <el-dropdown trigger="click">
+                                <div class="el-dropdown-link">
+                                    {{ dropdownName }}
+                                    <el-icon class="el-icon--right">
+                                        <CaretBottom />
+                                    </el-icon>
+                                </div>
+                                <template #dropdown>
+                                    <el-dropdown-menu class="v-dropdown-menu">
+                                        <el-dropdown-item
+                                            v-for="(item, index) in dropdownList"
+                                            :key="index"
+                                            :class="{ active: active === index }"
+                                            @click="handleDropdown(item, index)"
+                                            >{{ item }}</el-dropdown-item
+                                        >
+                                    </el-dropdown-menu>
+                                </template>
+                            </el-dropdown>
+                        </div>
+                    </div>
+                </div>
+                <div class="card" v-if="pageType == 'EXPERT'">
+                    <div class="card-title">
+                        <img src="@/assets/img/mine/label-icon.png" alt="" />
+                        <span>个人简介</span>
+                    </div>
+                    <div class="form">
+                        <el-input v-model="input" :rows="5" type="textarea" placeholder="描述:" />
+                    </div>
+                </div>
+                <div class="card" v-else>
+                    <div class="card-title">
+                        <img src="@/assets/img/mine/label-icon.png" alt="" />
+                        <span>服务信息</span>
+                    </div>
+                    <div class="checkbox-group">
+                        <div class="name">服务作物</div>
+                        <el-checkbox-group v-model="checkboxGroup" size="large">
+                            <el-checkbox-button
+                                @change="(e) => changeCheckBox(e, index)"
+                                v-for="(item, index) in cities"
+                                :key="index"
+                                :value="item.name"
+                            >
+                                {{ item.name }}
+                            </el-checkbox-button>
+                        </el-checkbox-group>
+                    </div>
+                    <div class="checkbox-group">
+                        <div class="name">服务类型</div>
+                        <el-checkbox-group v-model="checkboxGroup1" size="large">
+                            <el-checkbox-button
+                                @change="(e) => changeCheckBox1(e, index)"
+                                v-for="(item, index) in cities1"
+                                :key="index"
+                                :value="item.name"
+                            >
+                                {{ item.name }}
+                            </el-checkbox-button>
+                        </el-checkbox-group>
+                    </div>
+                    <div class="checkbox-group">
+                        <div class="name">农机设备</div>
+                        <el-checkbox-group v-model="checkboxGroup2" size="large">
+                            <el-checkbox-button
+                                @change="(e) => changeCheckBox2(e, index)"
+                                v-for="(item, index) in cities2"
+                                :key="index"
+                                :value="item.name"
+                            >
+                                {{ item.name }}
+                            </el-checkbox-button>
+                        </el-checkbox-group>
+                    </div>
+                </div>
+                <Button class="button" round block type="primary" native-type="submit"> 提交 </Button>
+            </Form>
+        </div>
+    </div>
+</template>
+
+<script setup>
+import customHeader from "@/components/customHeader.vue";
+import { Field, Form, Button } from "vant";
+import { onActivated, ref } from "vue";
+import { useRoute ,useRouter} from "vue-router";
+import { ElMessage } from 'element-plus'
+const route = useRoute();
+const router = useRouter();
+
+const formRef  = ref(null)
+const formData = ref({
+    role: "",
+    name: "",
+    tel: "",
+    point: "",
+});
+
+const validatorTel = (val) =>{
+    const phoneRegex = /^1[3-9]\d{9}$/;
+    if(!phoneRegex.test(val)) return '请输入正确的电话号码'
+}
+
+const onSubmit = () => {
+    formData.value.point = "POINT(113.1093017627431 22.574540836684672)"
+    formData.value.role = formData.value.role*1
+    VE_API.app.register(formData.value).then(res =>{
+        if(res.code===0){
+            ElMessage.success('注册成功,待审核')
+            router.push('/mine')
+        }else{
+            ElMessage.success('注册失败')
+        }
+    })
+};
+
+const resetForm = () =>{
+    formRef.value.resetValidation()
+}
+
+const number = ref("请选择");
+const numberList = ["请选择", "10", "20", "30", "40"];
+const numberActive = ref(0);
+const handleNumberDropdown = (item, index) => {
+    number.value = item;
+    numberActive.value = index;
+};
+
+const year = ref("请选择");
+const yearList = ["请选择", "10", "20", "30", "40"];
+const yearActive = ref(0);
+const handleYearDropdown = (item, index) => {
+    year.value = item;
+    yearActive.value = index;
+};
+
+const dropdownList = ["周边20公里", "飞防类", "技术类", "劳力类", "机械类"];
+const active = ref(0);
+const dropdownName = ref("周边20公里");
+const handleDropdown = (item, index) => {
+    dropdownName.value = item;
+    active.value = index;
+};
+
+const value = ref("");
+const input = ref("");
+
+const pageName = ref("");
+const pageType = ref("");
+const identityTyepe = {
+    EXPERT: "专家",
+    NZ: "农资农服",
+};
+// NF: "农服",
+
+const checkboxGroup = ref(["荔枝", "龙眼"]);
+const cities = ref([{ name: "荔枝" }, { name: "龙眼" }]);
+const changeCheckBox = (e, i) => {
+    console.log("e", i, e);
+    if (e === false) {
+        cities.value.splice(i, 1);
+    }
+};
+
+const checkboxGroup1 = ref(["播种"]);
+const cities1 = ref([{ name: "播种" }, { name: "收获" }]);
+const changeCheckBox1 = (e, i) => {
+    if (e === false) {
+        cities.value.splice(i, 1);
+    }
+};
+
+const checkboxGroup2 = ref(["收割机"]);
+const cities2 = ref([{ name: "收割机" }, { name: "灌溉机" }]);
+const changeCheckBox2 = (e, i) => {
+    if (e === false) {
+        cities.value.splice(i, 1);
+    }
+};
+
+onActivated(() => {
+    pageName.value = identityTyepe[route.query.identity];
+    pageType.value = route.query.identity;
+    formData.value = {}
+    resetForm()
+    formData.value.role = route.query.role;
+});
+</script>
+
+<style lang="scss" scoped>
+.register-page {
+    width: 100%;
+    height: 100vh;
+    background-color: #f5f7fb;
+    .content {
+        height: calc(100% - 40px);
+        padding: 12px;
+        overflow: auto;
+        box-sizing: border-box;
+        background: linear-gradient(180deg, #e6f2ff 0%, #8fc5fe 100%);
+        .card {
+            background: #fff;
+            border-radius: 12px;
+            padding: 15px 12px;
+            box-sizing: border-box;
+            .card-title {
+                display: flex;
+                align-items: center;
+                margin-bottom: 10px;
+                font-size: 18px;
+
+                img {
+                    width: 14px;
+                    height: 8px;
+                    margin-right: 6px;
+                }
+            }
+            .form {
+                .van-cell {
+                    background: #f5f5f5;
+                    border-radius: 8px;
+                    ::v-deep {
+                        .van-field__label {
+                            color: #666666;
+                            border-right: 1px solid #dddddd;
+                        }
+                    }
+                }
+                .van-cell + .van-cell {
+                    margin-top: 12px;
+                }
+                .btn {
+                    width: 92%;
+                    color: #2199f8;
+                    font-size: 16px;
+                    border-radius: 8px;
+                    text-align: center;
+                    padding: 12px;
+                    margin-top: 12px;
+                    border: 1px solid #2199f8;
+                }
+
+                .el-dropdown-link-text {
+                    color: #2199f8;
+                    display: flex;
+                    align-items: center;
+                }
+
+                .flex {
+                    display: flex;
+                    align-items: center;
+                    margin-top: 12px;
+                    .el-dropdown-link {
+                        display: flex;
+                        align-items: center;
+                        justify-content: center;
+                        color: #2199f8;
+                        width: 100px;
+                        font-size: 12px;
+                        padding: 14px 0;
+                        border-radius: 8px;
+                        border: 1px solid #2199f8;
+                        background: #f5f5f5;
+                        margin-left: 5px;
+                    }
+                }
+                .el-icon--right {
+                    margin-left: 4px;
+                }
+            }
+        }
+        .card + .card {
+            margin-top: 12px;
+        }
+        .card-footer {
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+            font-size: 16px;
+            .tips {
+                position: relative;
+                &::before {
+                    content: "*";
+                    position: absolute;
+                    top: 0;
+                    right: -1px;
+                    color: #ff0000;
+                    font-weight: bold;
+                }
+            }
+            .btn {
+                color: #fff;
+                background: #2199f8;
+                border-radius: 8px;
+                padding: 5px 37px;
+                text-align: center;
+                font-size: 14px;
+            }
+        }
+        .checkbox-group {
+            .name {
+                font-size: 16px;
+                color: rgba(0, 0, 0, 0.9);
+                margin-bottom: 10px;
+            }
+            ::v-deep {
+                .el-checkbox-group {
+                    .el-checkbox-button {
+                        margin-right: 12px;
+                        margin-bottom: 10px;
+                        .el-checkbox-button__inner {
+                            border-radius: 8px;
+                            background: #fff;
+                            color: #000;
+                            border: 1px solid #999999;
+                            box-shadow: none;
+                            font-size: 16px;
+                            padding: 15px;
+                            width: 101px;
+                            box-sizing: border-box;
+                        }
+                    }
+                    .is-checked {
+                        .el-checkbox-button__inner {
+                            background: #e8f5ff;
+                            color: #2199f8;
+                            border: 1px solid #2199f8;
+                            position: relative;
+                            &::before {
+                                content: "x";
+                                position: absolute;
+                                top: -10px;
+                                right: -10px;
+                                width: 20px;
+                                height: 20px;
+                                border-radius: 50%;
+                                font-size: 12px;
+                                text-align: center;
+                                line-height: 16px;
+                                color: #ffffff;
+                                background: #2199f8;
+                            }
+                        }
+                    }
+                }
+            }
+            .btn {
+                background: #2199f8;
+                border-radius: 20px;
+                color: #fff;
+                padding: 0 10px;
+                font-size: 12px;
+                height: 24px;
+                line-height: 24px;
+            }
+        }
+
+        .button {
+            border-radius: 8px;
+            font-size: 18px;
+            padding: 10px;
+            text-align: center;
+            background: #2199f8;
+            color: #fff;
+            margin-top: 12px;
+            border: none;
+        }
+    }
+}
+</style>
+
+<style lang="scss">
+.v-dropdown-menu {
+    .active {
+        color: #2199f8;
+    }
+}
+</style>