lxf пре 4 дана
родитељ
комит
b488f3dc26

+ 3 - 0
src/components/allGarden.vue

@@ -492,6 +492,9 @@ onActivated(() => {
         .phenology-box .phenology-text {
         .phenology-box .phenology-text {
             color: #ffd489;
             color: #ffd489;
         }
         }
+        .farm-name {
+            color: #ffd489;
+        }
     }
     }
 }
 }
 
 

+ 4 - 2
src/components/popup/ImagePreviewPopup.vue

@@ -84,7 +84,7 @@
 </template>
 </template>
 
 
 <script setup>
 <script setup>
-import { computed, ref, watch } from 'vue';
+import { computed, nextTick, ref, watch } from 'vue';
 import { Popup, Swipe, SwipeItem } from 'vant';
 import { Popup, Swipe, SwipeItem } from 'vant';
 import { ArrowLeftBold, ArrowRightBold, EditPen } from '@element-plus/icons-vue';
 import { ArrowLeftBold, ArrowRightBold, EditPen } from '@element-plus/icons-vue';
 
 
@@ -160,12 +160,14 @@ const currentRemark = computed(() => {
 
 
 watch(
 watch(
     () => [props.show, props.startIndex, props.images],
     () => [props.show, props.startIndex, props.images],
-    ([show, start]) => {
+    async ([show, start]) => {
         if (!show) return;
         if (!show) return;
         const lastIndex = Math.max(normalizedImages.value.length - 1, 0);
         const lastIndex = Math.max(normalizedImages.value.length - 1, 0);
         const normalizedIndex = Math.min(Math.max(start || 0, 0), lastIndex);
         const normalizedIndex = Math.min(Math.max(start || 0, 0), lastIndex);
         activeIndex.value = normalizedIndex;
         activeIndex.value = normalizedIndex;
         remarkDraftMap.value = {};
         remarkDraftMap.value = {};
+        // 首次打开时 Popup 懒渲染,Swipe 还没挂载,需等一帧再定位
+        await nextTick();
         previewSwipeRef.value?.swipeTo(activeIndex.value);
         previewSwipeRef.value?.swipeTo(activeIndex.value);
     }
     }
 );
 );

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

@@ -397,7 +397,7 @@ const reloadBySelectedZone = () => {
 
 
 const loadPatrolData = async () => {
 const loadPatrolData = async () => {
     // 先清掉上一农场的任务数据,避免切换时残留
     // 先清掉上一农场的任务数据,避免切换时残留
-    resetPatrolList();
+    // resetPatrolList();
     await fetchZones();
     await fetchZones();
     fetchTypesTask();
     fetchTypesTask();
     fetchCropArchive();
     fetchCropArchive();

+ 19 - 9
src/views/old_mini/agri_file/pages/regionAlbums.vue

@@ -249,15 +249,25 @@ const formatPreviewDate = (dateStr) => {
 };
 };
 
 
 const previewImage = (group, index) => {
 const previewImage = (group, index) => {
-    previewImages.value = group.list.map((item) => ({
-        url: item.fullUrl || item.url,
-        date: formatPreviewDate(item.uploadDate),
-        // 临时物候标签,有正式字段后替换
-        tag: item.phenologyName || item.tag || "预测物候期",
-        remark: item.growText || item.watermarkMsg || "",
-        id: item.id,
-    }));
-    previewIndex.value = index;
+    // 跨日期组预览:把所有日期组按展示顺序拼接成一个大列表,
+    // 全局索引 = 前面各组图片数 + 组内索引,保证左右切换贯穿第一张到最后一张
+    const flat = dateGroups.value.flatMap((g) =>
+        g.list.map((item) => ({
+            url: item.fullUrl || item.url,
+            date: formatPreviewDate(item.uploadDate),
+            // 临时物候标签,有正式字段后替换
+            tag: item.phenologyName || item.tag || "预测物候期",
+            remark: item.growText || item.watermarkMsg || "",
+            id: item.id,
+        }))
+    );
+    let globalIndex = index;
+    for (const g of dateGroups.value) {
+        if (g === group) break;
+        globalIndex += g.list.length;
+    }
+    previewImages.value = flat;
+    previewIndex.value = globalIndex;
     showPreview.value = true;
     showPreview.value = true;
 };
 };
 
 

+ 1 - 1
src/views/old_mini/growth_report/components/CropAlertPanel.vue

@@ -23,7 +23,7 @@
                         <div class="switch-wrap">
                         <div class="switch-wrap">
                             <el-tooltip
                             <el-tooltip
                                 v-model:visible="cropMenuVisible"
                                 v-model:visible="cropMenuVisible"
-                                placement="bottom"
+                                :placement="isBackground ? 'top' : 'bottom'"
                                 trigger="click"
                                 trigger="click"
                                 effect="dark"
                                 effect="dark"
                                 :show-arrow="true"
                                 :show-arrow="true"