wangsisi 4 дней назад
Родитель
Сommit
d6580b408e

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

@@ -12,7 +12,7 @@
             <uploader
                 class="album-upload-popup__uploader"
                 v-model="fileList"
-                multiple
+                :multiple="maxCount > 1"
                 :max-count="maxCount"
                 :after-read="afterRead"
                 @delete="onDelete"

+ 6 - 22
src/views/old_mini/agri_file/pages/diagnosisReport.vue

@@ -38,14 +38,14 @@
                     </div>
                 </div>
             </div>
-            <!-- 锚点导航 -->
+            <!-- Tab 切换 -->
             <div class="report-tabs">
                 <div
                     v-for="tab in tabs"
                     :key="tab.key"
                     class="report-tabs__item"
                     :class="{ active: activeTab === tab.key }"
-                    @click="scrollToSection(tab.key)"
+                    @click="activeTab = tab.key"
                 >
                     <svg class="report-tabs__icon" viewBox="0 0 24 24" fill="none">
                         <path
@@ -63,19 +63,14 @@
                 </div>
             </div>
 
-            <div
-                v-for="tab in tabs"
-                :id="`report-section-${tab.key}`"
-                :key="tab.key"
-                class="report-panel"
-            >
+            <div class="report-panel">
                 <div class="report-panel__title">
-                    <span>{{ tab.label }}</span>
+                    <span>{{ tabs.find((t) => t.key === activeTab)?.label }}</span>
                 </div>
 
                 <div
-                    v-for="(section, sIdx) in SECTION_MAP[tab.key]"
-                    :key="sIdx"
+                    v-for="(section, sIdx) in SECTION_MAP[activeTab]"
+                    :key="`${activeTab}-${sIdx}`"
                     class="report-block"
                 >
                     <div v-if="section.title" class="report-block__divider">
@@ -310,16 +305,6 @@ const route = useRoute();
 const activeTab = ref("weather");
 const tabs = TABS;
 
-// ---------------------------------------------------------------------------
-// 锚点定位
-// ---------------------------------------------------------------------------
-const scrollToSection = (key) => {
-    activeTab.value = key;
-    const el = document.getElementById(`report-section-${key}`);
-    if (!el) return;
-    el.scrollIntoView({ behavior: "smooth", block: "start" });
-};
-
 const handleShare = () => {
     const query = {
         askInfo: { title: "转发报告", content: "是否分享给好友" },
@@ -490,7 +475,6 @@ const handleShare = () => {
     border-radius: 12px;
     background: #fff;
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
-    scroll-margin-top: 8px;
 
     &__title {
         position: relative;

+ 5 - 1
src/views/old_mini/agri_file/pages/growthTrack.vue

@@ -101,7 +101,11 @@
             <span>{{ t("agriFile.uploadPhoto") }}</span>
         </div>
 
-        <album-upload-popup v-model:show="showUploadPopup" @confirm="handleUploadConfirm" />
+        <album-upload-popup
+            v-model:show="showUploadPopup"
+            :max-count="1"
+            @confirm="handleUploadConfirm"
+        />
         <tip-popup v-model:show="showSuccessPopup" type="executeSuccess" text="您已上传成功" text2="请等待诊断报告生成" hideBtn>
             <template #footer>
                 <div class="bottom-btn-container">

+ 22 - 6
src/views/old_mini/growth_report/alert_detail.vue

@@ -256,7 +256,13 @@ function normalizeTitleDescList(raw) {
                 item.description ||
                 "";
             const image = resolveImageUrl(
-                item.url || item.image || item.img || item.pic || item.pic_url || ""
+                item.url ||
+                    item.image ||
+                    item.img ||
+                    item.pic ||
+                    item.pic_url ||
+                    item.cover_url ||
+                    ""
             );
             if (!title && !desc && !image) return null;
             return { id: item.id ?? index, title: String(title), desc: String(desc), image };
@@ -319,7 +325,18 @@ function applyAbnormalReport(report) {
         middleLabel: "气象预警",
         middleValue: report.stress_desc,
     });
-    applyResultAndAnalysis(report);
+
+    // 巡园结果与分析:优先 result,否则用 analysis;封面统一用 cover_url
+    const coverUrl = resolveImageUrl(report.cover_url || "");
+    const hasResult = report.result != null && report.result !== "";
+    const rawResult = hasResult ? report.result : report.analysis;
+    resultList.value = normalizeTitleDescList(rawResult).map((item) => ({
+        ...item,
+        image: item.image || coverUrl,
+    }));
+    // 已用 analysis 作为巡园结果时,不再重复展示诊断研判
+    analysisList.value = hasResult ? normalizeTitleDescList(report.analysis) : [];
+
     importanceDesc.value = "";
     adviceList.value = normalizeTitleDescList(report.farmwork_info);
 }
@@ -612,10 +629,9 @@ onActivated(fetchAlertDetail);
     box-sizing: border-box;
 
     &__img {
-        flex: none;
-        width: 72px;
-        height: 72px;
-        border-radius: 6px;
+        width: 95px;
+        height: 86px;
+        border-radius: 5px;
         object-fit: cover;
         background: #e8e8e8;
     }