lxf 3 週間 前
親
コミット
9617347dde

+ 3 - 3
src/components/allGarden.vue

@@ -87,16 +87,16 @@
                         {{ t("garden.currentPhenology") }}{{ item.phenologyText || t("garden.phenologyPlaceholder") }}
                     </div>
 
-                    <div class="task-bar">
+                    <div class="task-bar" v-if="item.taskName">
                         <div class="task-bar__left">
                             <img class="task-icon" src="@/assets/img/home/task.png" alt="" />
                             <span class="task-name van-ellipsis">{{ item.taskName || t("garden.taskNamePlaceholder") }}</span>
                             <span class="task-status">{{ item.taskStatus || t("garden.pendingExecute") }}</span>
                         </div>
-                        <div class="task-bar__forward" @click.stop="handleForward(item)">
+                        <!-- <div class="task-bar__forward" @click.stop="handleForward(item)">
                             <Icon size="14" color="#2199F8" name="share" />
                             <span>{{ t("garden.forward") }}</span>
-                        </div>
+                        </div> -->
                     </div>
                 </div>
 

+ 39 - 2
src/components/popup/restorePlantingPopup.vue

@@ -103,6 +103,14 @@
             </div>
         </div>
     </popup>
+
+    <tip-popup v-model:show="showSuccessPopup" type="executeSuccess" text="物候期已确认" text2="正在生成专属农事方案" hideBtn>
+            <template #footer>
+                <div class="bottom-btn-container">
+                    <div class="bottom-btn primary-btn" @click="showSuccessPopup=false">完成</div>
+                </div>
+            </template>
+    </tip-popup>
 </template>
 
 <script setup>
@@ -112,6 +120,7 @@ import { Check } from "@element-plus/icons-vue";
 import { ElMessage } from "element-plus";
 import { useI18n } from "@/i18n";
 import { base_img_url2 } from "@/api/config";
+import tipPopup from "@/components/popup/tipPopup.vue";
 
 const { t } = useI18n();
 
@@ -164,7 +173,7 @@ const sampleImage = ref(DEFAULT_SAMPLE_IMAGE);
 const phenologyQuestion = ref("");
 const phenologyHighlight = ref("");
 const phenologyImage = ref(DEFAULT_PHENOLOGY_IMAGE);
-
+const showSuccessPopup = ref(false);
 // ---------------------------------------------------------------------------
 // 计算属性
 // ---------------------------------------------------------------------------
@@ -422,6 +431,7 @@ const submitInteractResult = async (type = "time", { closeOnSuccess = true } = {
                 showMessage(res.msg || "提交成功", "success");
                 visible.value = false;
                 resetForm();
+                showSuccessPopup.value = true;
                 emit("success");
             }
             return true;
@@ -546,12 +556,14 @@ defineExpose({
         margin: 12px 0;
         border-radius: 8px;
         overflow: hidden;
-        background: #dfeaf5;
+        height: 148px;
+        // background: #dfeaf5;
 
         img {
             display: block;
             width: 100%;
             height: 148px;
+            border-radius: 8px;
             object-fit: cover;
         }
 
@@ -676,6 +688,31 @@ defineExpose({
         }
     }
 }
+
+
+.bottom-btn-container {
+    display: flex;
+    justify-content: space-between;
+    gap: 12px;
+    width: 100%;
+
+    .bottom-btn {
+        padding: 0 25px;
+        border-radius: 4px;
+        font-size: 16px;
+        height: 40px;
+        line-height: 40px;
+        box-sizing: border-box;
+        font-weight: 500;
+        text-align: center;
+
+        &.primary-btn {
+            flex: 1;
+            background: #2199f8;
+            color: #fff;
+        }
+    }
+}
 </style>
 
 <!-- 日期面板 / 图片预览 / Message teleport 到 body,需高于弹窗 z-index: 20000 -->

+ 3 - 1
src/views/old_mini/agri_file/components/patrolPanel.vue

@@ -589,11 +589,13 @@ defineExpose({
             display: flex;
             align-items: center;
             gap: 4px;
-            padding: 1px 4px;
+            padding: 0 4px;
             border-radius: 2px;
             background: #fff;
             color: #ff6a6a;
             font-size: 12px;
+            height: 20px;
+            line-height: 20px;
         }
 
         &__title {

+ 7 - 2
src/views/old_mini/agri_file/pages/addZone.vue

@@ -18,7 +18,11 @@
             <div class="bottom-btn secondary-btn" @click="handleClearDraw">{{ t("agriFile.cancelSelect") }}</div>
             <div class="bottom-btn primary-btn" @click="handleConfirmDraw">{{ t("agriFile.confirmArea") }}</div>
         </div>
-        <RegionNamePopup v-model:show="showRegionNamePopup" @confirm="handleFarmNameConfirm" />
+        <RegionNamePopup
+            v-model:show="showRegionNamePopup"
+            :default-name="getFarmType"
+            @confirm="handleFarmNameConfirm"
+        />
         <add-zone-info-popup
             v-model:show="showZoneInfoPopup"
             :polygon="drawnPolygon"
@@ -183,7 +187,7 @@ function getFarmMapLocation() {
     return DEFAULT_MAP_LOCATION;
 }
 
-const getFarmType = computed(() => getFarmData().variety_name);
+const getFarmType = computed(() => getFarmData().crop_variety);
 
 function getDefaultMapLocation() {
     return (
@@ -505,6 +509,7 @@ onDeactivated(() => {
         background: rgba(0, 0, 0, 0.5);
         color: #7CC5FF;
         font-size: 12px;
+        width: max-content;
 
         &.normal-text {
             color: #fff;

+ 2 - 0
src/views/old_mini/agri_file/pages/diagnosisReport.vue

@@ -80,6 +80,7 @@
             @switchGrowing="handleSwitchGrowing"
         />
         <editPlantPointPopup ref="editPlantPointPopupRef" @confirm="handlePlantPointConfirm" />
+        <restore-planting-popup />
     </div>
 </template>
 
@@ -96,6 +97,7 @@ import tab2Icon from "@/assets/img/report/tab-2.png";
 import tab3Icon from "@/assets/img/report/tab-3.png";
 import tab4Icon from "@/assets/img/report/tab-4.png";
 import tab5Icon from "@/assets/img/report/tab-5.png";
+import restorePlantingPopup from "@/components/popup/restorePlantingPopup.vue";
 
 // ---------------------------------------------------------------------------
 // Props / Emits — 无

+ 24 - 13
src/views/old_mini/agri_file/pages/growthTrack.vue

@@ -41,19 +41,24 @@
                     </div>
                 </div>
                 <div class="interact-card__qa">
-                    <div class="interact-card__question">{{ interactProblem }}</div>
-                    <div class="interact-card__options">
-                        <div
-                            v-for="item in interactOptions"
-                            :key="item.id"
-                            class="interact-option"
-                            :class="{ selected: selectedOptionId === item.id }"
-                            @click="selectedOptionId = item.id"
-                        >
-                            <span class="interact-option__text">{{ item.name }}</span>
-                        </div>
+                    <div v-if="currentTask?.interact_feedback" class="interact-card__phenology">
+                        {{ currentTask.interact_feedback }}
                     </div>
-                    <div class="interact-card__submit" @click="handleSubmit">{{ t("agriFile.submit") }}</div>
+                    <template v-else>
+                        <div class="interact-card__question">{{ interactProblem }}</div>
+                        <div class="interact-card__options">
+                            <div
+                                v-for="item in interactOptions"
+                                :key="item.id"
+                                class="interact-option"
+                                :class="{ selected: selectedOptionId === item.id }"
+                                @click="selectedOptionId = item.id"
+                            >
+                                <span class="interact-option__text">{{ item.name }}</span>
+                            </div>
+                        </div>
+                        <div class="interact-card__submit" @click="handleSubmit">{{ t("agriFile.submit") }}</div>
+                    </template>
                 </div>
             </div>
             <div class="guide-card">
@@ -314,7 +319,7 @@ const handleComplete = () => {
 };
 
 const handleBack = () => {
-    if (!hasAnswered()) {
+    if (!hasAnswered() && !currentTask.value?.interact_feedback) {
         showLeavePopup.value = true;
         return;
     }
@@ -478,6 +483,12 @@ onActivated(() => {
             font-weight: 500;
         }
 
+        &__phenology {
+            color: #2199f8;
+            font-size: 14px;
+            line-height: 20px;
+        }
+
         &__options {
             display: flex;
             gap: 8px;

+ 6 - 1
src/views/old_mini/growth_report/index.vue

@@ -100,6 +100,10 @@
 
     <!-- 录入信息邀请弹窗:分享链接带 showInviteEntry 时展示 -->
     <invite-entry-popup ref="invitePopupRef" />
+
+    
+        <!-- 恢复种植弹窗 -->
+        <restore-planting-popup />
 </template>
 
 <script setup>
@@ -113,6 +117,7 @@ import GrowthReportMap from "./growthReportMap.js";
 import CropAlertPanel from "./components/CropAlertPanel.vue";
 import inviteEntryPopup from "@/views/old_mini/entry_information/components/inviteEntryPopup.vue";
 import wx from "weixin-js-sdk";
+import restorePlantingPopup from "@/components/popup/restorePlantingPopup.vue";
 
 const router = useRouter();
 const route = useRoute();
@@ -1057,7 +1062,7 @@ onActivated(() => {
 
         &__img {
             display: block;
-            max-width: 120px;
+            max-width: 180px;
             max-height: 160px;
             object-fit: contain;
         }

+ 6 - 1
src/views/old_mini/recordDetails/components/RegionNamePopup.vue

@@ -31,6 +31,11 @@ const props = defineProps({
         type: Boolean,
         default: false,
     },
+    /** 打开时的默认区域名(如勾画页作物类型) */
+    defaultName: {
+        type: String,
+        default: "",
+    },
 });
 
 const emit = defineEmits(["update:show", "confirm"]);
@@ -46,7 +51,7 @@ watch(
     () => props.show,
     (val) => {
         if (val) {
-            regionName.value = "";
+            regionName.value = props.defaultName || "";
         }
     },
 );

+ 19 - 1
src/views/old_mini/work_execute/index.vue

@@ -431,10 +431,28 @@ const handleSurveyConfirm = () => {
     router.push("/survey_entry");
 };
 
+/** 当前选中农场的 farm_location(POINT) */
+function resolveSelectedFarmLocationPoint() {
+    const farm = getSelectedFarm();
+    const candidates = [
+        farm.farm_location,
+        farm.wkt,
+        farm.geom_wkt,
+        localStorage.getItem("selectedFarmPoint"),
+    ];
+    for (const item of candidates) {
+        if (typeof item === "string" && /^POINT\s*\(/i.test(item.trim())) {
+            return item.trim();
+        }
+    }
+    return "";
+}
+
 const initMap = () => {
     if (!mapContainer.value) return;
+    // 中心点:接口分区中心 → 选中农场 farm_location → 登录定位 → 兜底
     const fallback = store.state.home.miniUserLocationPoint || "POINT(113.746646 22.970229)";
-    const point = mapCenterPoint.value || fallback;
+    const point = mapCenterPoint.value || resolveSelectedFarmLocationPoint() || fallback;
     if (!indexMap.kmap) {
         indexMap.initMap(point, mapContainer.value, true);
     }