Pārlūkot izejas kodu

fix: 黑金,对接选项

刘秀芳 54 minūtes atpakaļ
vecāks
revīzija
558dbf93fa

+ 2 - 2
src/components/allGarden.vue

@@ -87,9 +87,9 @@
                     <div class="phenology-box">
                         {{ t("garden.currentPhenology") }}
                         <span class="phenology-text">{{ item.phenologyText || t("garden.phenologyPlaceholder") }}</span>
-                        <div class="phenology-desc">
+                        <!-- <div class="phenology-desc">
                             待完善待完善待完善预计 11 月上旬第二次秋梢叶色转绿、叶片逐步老熟
-                        </div>
+                        </div> -->
                     </div>
 
                     <div class="task-bar" v-if="item.taskName">

+ 34 - 14
src/components/popup/restorePlantingPopup.vue

@@ -179,11 +179,19 @@ const showSuccessPopup = ref(false);
 // ---------------------------------------------------------------------------
 // 计算属性
 // ---------------------------------------------------------------------------
-const phenologyOptions = computed(() => [
-    { value: "not_reached", label: t("agriFile.notReached") },
-    { value: "reached", label: t("agriFile.reached") },
-    { value: "passed", label: t("agriFile.passed") },
-]);
+/** interact_options 顺序:还未到达 / 顺利到达 / 已过 */
+const PHENOLOGY_ACTIONS = ["not_reached", "reached", "passed"];
+
+const phenologyOptions = computed(() => {
+    const options = interactMap.value[currentInteractKey.value]?.interact_options;
+    if (!Array.isArray(options)) return [];
+    return options
+        .filter((label) => label != null && String(label).trim() !== "")
+        .map((label, index) => ({
+            value: PHENOLOGY_ACTIONS[index] || `option_${index}`,
+            label: String(label),
+        }));
+});
 
 const interactKeys = computed(() =>
     Object.keys(interactMap.value).sort((a, b) => Number(a) - Number(b))
@@ -292,19 +300,28 @@ const applyPhenologyByKey = (key) => {
     selectedPeriodCode.value = "";
 };
 
-/** 暂未到达 → 前一个;已过 → 后一个 */
+const hasInteractOptions = (key) => {
+    const options = interactMap.value[key]?.interact_options;
+    return Array.isArray(options) && options.some((label) => label != null && String(label).trim() !== "");
+};
+
+/** 暂未到达 → 前一个有选项的物候期;已过 → 后一个 */
 const movePhenology = (direction) => {
     const keys = interactKeys.value;
     const idx = keys.indexOf(String(currentInteractKey.value));
     if (idx < 0) return false;
-    const nextIdx = direction === "prev" ? idx - 1 : idx + 1;
-    if (nextIdx < 0 || nextIdx >= keys.length) {
-        showWarning(direction === "prev" ? "已是最早物候期" : "已是最晚物候期");
-        return false;
+    const step = direction === "prev" ? -1 : 1;
+    let nextIdx = idx + step;
+    while (nextIdx >= 0 && nextIdx < keys.length) {
+        if (hasInteractOptions(keys[nextIdx])) {
+            applyPhenologyByKey(keys[nextIdx]);
+            phenologyAnswer.value = "";
+            return true;
+        }
+        nextIdx += step;
     }
-    applyPhenologyByKey(keys[nextIdx]);
-    phenologyAnswer.value = "";
-    return true;
+    showWarning(direction === "prev" ? "已是最早物候期" : "已是最晚物候期");
+    return false;
 };
 
 const applyQuestionData = (data) => {
@@ -317,7 +334,10 @@ const applyQuestionData = (data) => {
 
     if (hasOptionsInteract.value) {
         interactMap.value = data.options_interact.interact || {};
-        const startKey = String(data.options_interact.start_with ?? interactKeys.value[0] ?? "");
+        const preferred = String(data.options_interact.start_with ?? "");
+        const startKey = hasInteractOptions(preferred)
+            ? preferred
+            : interactKeys.value.find((key) => hasInteractOptions(key)) || preferred;
         applyPhenologyByKey(startKey);
     }
 

+ 239 - 105
src/views/old_mini/agri_file/pages/diagnosisReport.vue

@@ -1,16 +1,29 @@
 <template>
     <div
         class="diagnosis-report-page"
-        v-loading="pageLoading"
-        :element-loading-text="loadingText"
+        v-loading="loading"
+        element-loading-background="rgba(15, 15, 15, 0.55)"
     >
+        <div v-if="reportGenerating" class="report-progress">
+            <el-progress
+                :percentage="progressPercent"
+                :stroke-width="15"
+                status="warning"
+                striped
+                striped-flow
+            />
+        </div>
+        <template v-else>
         <div class="diagnosis-header">
             <div class="diagnosis-header__title-row">
-                <span class="diagnosis-header__title">种植报告</span>
-                <img class="diagnosis-header__icon" src="@/assets/img/report/star.png" alt="" />
+                <div class="diagnosis-header__title">
+                    <div>一份报告</div>
+                    <div>看懂你的农场</div>
+                </div>
+                <!-- <img class="diagnosis-header__icon" src="@/assets/img/report/star.png" alt="" /> -->
             </div>
             <div class="diagnosis-header__desc">{{ headerDesc }}</div>
-            <div class="diagnosis-header__base">{{ headerBase }}</div>
+            <!-- <div class="diagnosis-header__base">{{ headerBase }}</div> -->
         </div>
         <div class="diagnosis-content">
             <div class="variety-bar">
@@ -20,16 +33,17 @@
                         {{ item.name }}
                     </div>
                 </div>
-                <div class="variety-bar__add">
+                <!-- <div class="variety-bar__add">
                     <el-icon>
                         <Plus />
                     </el-icon>
                     <span>新增品种</span>
-                </div>
+                </div> -->
             </div>
             <div class="base-data">
                 <div class="base-data__title">
-                    <img class="base-data__icon" src="@/assets/img/report/base-icon.png" alt="" />
+                    <!-- <img class="base-data__icon" src="@/assets/img/report/base-icon.png" alt="" /> -->
+                     <span class="title-dot"></span>
                     <span>基本信息</span>
                 </div>
                 <div class="base-data__body">
@@ -38,17 +52,17 @@
                         <div class="base-info-item__row">
                             <span class="base-info-item__label">{{ item.label }}</span>
                             <span class="base-info-item__value">{{ item.value }}</span>
-                            <span v-if="item.actionInline" class="base-info-action"
+                            <!-- <span v-if="item.actionInline" class="base-info-action"
                                 @click="handleBaseAction(item.actionInline.key)">
                                 {{ item.actionInline.text }}
                                 <el-icon><Edit /></el-icon>
-                            </span>
+                            </span> -->
                         </div>
-                        <div v-if="item.actionBlock" class="base-info-action base-info-action--block"
+                        <!-- <div v-if="item.actionBlock" class="base-info-action base-info-action--block"
                             @click="handleBaseAction(item.actionBlock.key)">
                             {{ item.actionBlock.text }}
                             <el-icon><Edit /></el-icon>
-                        </div>
+                        </div> -->
                     </div>
                 </div>
             </div>
@@ -76,6 +90,7 @@
                 </div>
             </div>
         </div>
+        </template>
 
         <adjustPhenologyPopup ref="adjustPhenologyPopupRef" @confirm="handlePhenologyConfirm" />
         <restingDatePopup
@@ -125,6 +140,8 @@ const router = useRouter();
 // ---------------------------------------------------------------------------
 /** 报告未生成时轮询间隔(ms) */
 const REPORT_POLL_INTERVAL = 6000;
+/** exists=0 时进度条走满的模拟时长 */
+const PROGRESS_DURATION_MS = 2 * 60 * 1000;
 /** 无农场时默认作物编码:水稻 */
 const NO_FARM_CROP = "PAD";
 /** 无定位时的默认点位(与录入页一致) */
@@ -133,7 +150,7 @@ const DEFAULT_POINT = "POINT(113.6142086995688 23.585836479509055)";
 /** module1_basic 字段标签 → 基本信息展示项(labels 含接口原文别名) */
 const BASE_FIELD_META = [
     { key: "crop", labels: ["作物品种", "种植作物"], label: "种植作物:", actionInline: { key: "changeVariety", text: "更改品种" } },
-    { key: "trait", labels: ["品种特质", "品种优势"], label: "品种特质:" },
+    // { key: "trait", labels: ["品种特质", "品种优势"], label: "品种特质:" },
     { key: "phenology", labels: ["物候信息", "物候期"], label: "物候信息:", actionInline: { key: "adjustPhenology", text: "调整物候" } },
     { key: "soil", labels: ["土壤条件"], label: "土壤条件:", actionBlock: { key: "soilSense", text: "土壤感知" } },
     { key: "terrain", labels: ["地形条件"], label: "地形条件:", actionInline: { key: "editLocation", text: "修改定位" } },
@@ -159,8 +176,9 @@ const reportTabs = [
 // ---------------------------------------------------------------------------
 // 页面状态
 // ---------------------------------------------------------------------------
-const loading = ref(false); // 首次拉取中
-const reportGenerating = ref(false); // 报告尚未生成,持续 loading + 轮询
+const loading = ref(false); // 接口尚未返回:只转圈,不带文字
+const reportGenerating = ref(false); // exists=0:模拟进度条,并继续轮询
+const progressPercent = ref(0);
 const varietyList = ref([]);
 const activeVarietyId = ref(null);
 const headerDesc = ref("");
@@ -174,16 +192,16 @@ const restingDatePopupRef = ref(null);
 const editPlantPointPopupRef = ref(null);
 // const showCompleteFarmPopup = ref(false); // 无农场时展示「完善农场信息」
 let pollTimer = null;
+let progressTimer = null;
 /** 当前轮询方式:farm | latlon */
 let pollMode = null;
 let pollParams = null;
+/** 离开页面或重新拉取时作废尚未结束的完成动画 */
+let viewToken = 0;
 
 // ---------------------------------------------------------------------------
 // 计算属性
 // ---------------------------------------------------------------------------
-const pageLoading = computed(() => loading.value || reportGenerating.value);
-const loadingText = "报告生成中,请稍后...";
-
 const activeReportTabMeta = computed(
     () => reportTabs.find((tab) => tab.key === activeReportTab.value) || reportTabs[0]
 );
@@ -353,8 +371,8 @@ function markdownToHtml(markdown = "") {
 function applyReportData(report, farm) {
     const region = report.region || farm.rawAddress || farm.farm_address || farm.city || "";
     const farmName = farm.farm_name || farm.name || "";
-    headerDesc.value = region ? `${region}的飞鸟智慧农业` : "飞鸟智慧农业";
-    headerBase.value = farmName || "我的基地";
+    headerDesc.value = region ? `${region}的${farmName || '飞鸟智慧农业'}` : "飞鸟智慧农业";
+    // headerBase.value = farmName || "我的基地";
 
     const cropName = report.variety || report.crop || farm.variety_name || farm.categoryLabel || "作物";
     varietyList.value = [{ id: report.id || 1, name: cropName }];
@@ -412,52 +430,95 @@ function stopReportPolling() {
     pollParams = null;
 }
 
+function stopProgressTimer() {
+    if (progressTimer) {
+        clearInterval(progressTimer);
+        progressTimer = null;
+    }
+}
+
+/** exists=0 才走进度条;两分钟内匀速走到 99,返回前一直停在进度条上 */
+function beginProgress() {
+    reportGenerating.value = true;
+    if (progressTimer) return;
+    const startedAt = Date.now();
+    progressPercent.value = 0;
+    progressTimer = setInterval(() => {
+        const ratio = Math.min((Date.now() - startedAt) / PROGRESS_DURATION_MS, 1);
+        progressPercent.value = Math.min(99, Math.floor(ratio * 99));
+    }, 200);
+}
+
+/** 进度条进行中才先收到 100;首次就有报告则直接出正文 */
+async function revealReport(report, farm, token) {
+    if (token !== viewToken) return;
+    stopReportPolling();
+    const showComplete = reportGenerating.value;
+    stopProgressTimer();
+    if (!showComplete) {
+        reportGenerating.value = false;
+        applyReportData(report || {}, farm);
+        return;
+    }
+    progressPercent.value = 100;
+    await new Promise((resolve) => setTimeout(resolve, 400));
+    if (token !== viewToken) return;
+    reportGenerating.value = false;
+    applyReportData(report || {}, farm);
+}
+
+/** 有 exists 时以它为准;没有该字段时看是否已经有报告体 */
+function isReportPending(res, report) {
+    const exists = res?.data?.exists;
+    if (exists != null && exists !== "") return Number(exists) === 0;
+    return !report;
+}
+
 /** 报告未就绪时保持 loading,并定时重试 */
-function startReportPolling(mode, params) {
+function startReportPolling(mode, params, token) {
     stopReportPolling();
     pollMode = mode;
     pollParams = params;
     pollTimer = setInterval(() => {
+        if (token !== viewToken) return;
         if (pollMode === "farm") {
-            pollFarmReport(pollParams);
+            pollFarmReport(pollParams, token);
         } else if (pollMode === "latlon") {
-            pollLatlonReport(pollParams);
+            pollLatlonReport(pollParams, token);
         }
     }, REPORT_POLL_INTERVAL);
 }
 
-async function pollFarmReport({ farmId, zoneId }) {
+async function pollFarmReport({ farmId, zoneId }, token) {
     try {
         const raw = await VE_API.questionnaire.checkReportGenerated({
             farm_id: farmId,
             zone_id: zoneId,
         });
+        if (token !== viewToken) return;
         const res = Array.isArray(raw) ? raw[0] : raw;
         const report = res?.data?.report;
-        if (res?.code === 200 && report) {
+        if (res?.code === 200 && !isReportPending(res, report)) {
             // 进入报告页并拿到数据:标记该农场弹窗已读,避免再弹
             markDiagnosisPopupShown(farmId, zoneId);
-            stopReportPolling();
-            reportGenerating.value = false;
-            applyReportData(report, getSelectedFarm());
+            revealReport(report, getSelectedFarm(), token);
         }
     } catch (error) {
         console.warn("[diagnosisReport] farm poll failed", error);
     }
 }
 
-async function pollLatlonReport({ pointText, crop }) {
+async function pollLatlonReport({ pointText, crop }, token) {
     try {
         const raw = await VE_API.report.report6Latlon({
             point_text: pointText,
             crop: '水稻',
         });
+        if (token !== viewToken) return;
         const res = Array.isArray(raw) ? raw[0] : raw;
         const report = pickLatlonReport(res);
-        if (res?.code === 200 && report) {
-            stopReportPolling();
-            reportGenerating.value = false;
-            applyReportData(report, {});
+        if (res?.code === 200 && !isReportPending(res, report)) {
+            revealReport(report, {}, token);
         }
     } catch (error) {
         console.warn("[diagnosisReport] latlon poll failed", error);
@@ -465,7 +526,7 @@ async function pollLatlonReport({ pointText, crop }) {
 }
 
 /** 无农场:按定位点 + 水稻拉取 / 轮询六模块报告 */
-async function fetchLatlonReport() {
+async function fetchLatlonReport(token) {
     const pointText = getPointText();
     const crop = NO_FARM_CROP;
     const params = { pointText, crop };
@@ -476,26 +537,29 @@ async function fetchLatlonReport() {
             point_text: pointText,
             crop: '水稻',
         });
+        if (token !== viewToken) return;
         const res = Array.isArray(raw) ? raw[0] : raw;
         const report = pickLatlonReport(res);
-        if (res?.code === 200 && report) {
-            applyReportData(report, {});
+        if (res?.code === 200 && !isReportPending(res, report)) {
+            revealReport(report, {}, token);
             return;
         }
         resetReportView({});
-        reportGenerating.value = true;
-        startReportPolling("latlon", params);
+        beginProgress();
+        startReportPolling("latlon", params, token);
     } catch (error) {
+        if (token !== viewToken) return;
         console.error("fetchLatlonReport failed", error);
         resetReportView({});
         reportGenerating.value = false;
+        stopProgressTimer();
         ElMessage.error("报告加载失败");
     } finally {
-        loading.value = false;
+        if (token === viewToken) loading.value = false;
     }
 }
 
-async function fetchFarmReport(farm) {
+async function fetchFarmReport(farm, token) {
     const farmId = farm.farm_id ?? farm.id;
     const zoneId = farm.zone_id ?? farm.zoneId;
 
@@ -505,36 +569,44 @@ async function fetchFarmReport(farm) {
             farm_id: farmId,
             zone_id: zoneId,
         });
+        if (token !== viewToken) return;
         const res = Array.isArray(raw) ? raw[0] : raw;
         const report = res?.data?.report;
-        if (res?.code === 200 && report) {
+        if (res?.code === 200 && !isReportPending(res, report)) {
             markDiagnosisPopupShown(farmId, zoneId);
-            applyReportData(report, farm);
+            revealReport(report, farm, token);
             return;
         }
         resetReportView(farm);
-        reportGenerating.value = true;
-        startReportPolling("farm", { farmId, zoneId });
+        beginProgress();
+        startReportPolling("farm", { farmId, zoneId }, token);
     } catch (error) {
+        if (token !== viewToken) return;
         console.error("fetchFarmReport failed", error);
         resetReportView(farm);
         reportGenerating.value = false;
+        stopProgressTimer();
         ElMessage.error("报告加载失败");
     } finally {
-        loading.value = false;
+        if (token === viewToken) loading.value = false;
     }
 }
 
 async function fetchDiagnosisReport() {
     const farm = getSelectedFarm();
+    viewToken += 1;
+    const token = viewToken;
     stopReportPolling();
+    stopProgressTimer();
     reportGenerating.value = false;
+    progressPercent.value = 0;
+    loading.value = true;
 
     if (!hasFarmZone(farm)) {
-        await fetchLatlonReport();
+        await fetchLatlonReport(token);
         return;
     }
-    await fetchFarmReport(farm);
+    await fetchFarmReport(farm, token);
 }
 
 // ---------------------------------------------------------------------------
@@ -583,11 +655,15 @@ onActivated(() => {
 });
 
 onDeactivated(() => {
+    viewToken += 1;
     stopReportPolling();
+    stopProgressTimer();
 });
 
 onBeforeUnmount(() => {
+    viewToken += 1;
     stopReportPolling();
+    stopProgressTimer();
 });
 </script>
 
@@ -597,15 +673,40 @@ onBeforeUnmount(() => {
     height: calc(100vh - 50px);
     overflow: auto;
     -webkit-overflow-scrolling: touch;
-    background: #f5f6fe;
+    background: #0a0a0a url("@/assets/img/agricultural/report-bg.png") no-repeat top center;
+    background-size: 100% 250px;
     box-sizing: border-box;
     padding-bottom: 20px;
 
+    ::v-deep {
+        .el-loading-spinner .path {
+            stroke: rgba(255, 212, 137, 0.8);
+        }
+    }
+
+    .report-progress {
+        display: flex;
+        align-items: center;
+        min-height: calc(100vh - 70px);
+        padding: 0 36px;
+        box-sizing: border-box;
+
+        :deep(.el-progress) {
+            width: 100%;
+        }
+
+        :deep(.el-progress-bar__outer) {
+            background: rgba(255, 255, 255, 0.08);
+        }
+
+        :deep(.el-progress__text) {
+            color: #ffd489;
+        }
+    }
+
     .diagnosis-header {
-        height: 148px;
-        padding: 26px 0 0 14px;
+        padding: 42px 14px 8px;
         box-sizing: border-box;
-        background: url("@/assets/img/report/title-bg.png") no-repeat center center / 100% 100%;
         color: #fff;
 
         &__title-row {
@@ -615,27 +716,52 @@ onBeforeUnmount(() => {
         }
 
         &__title {
-            font-size: 35px;
-            font-family: "pangmenzhengdao";
+            font-size: 25px;
+            line-height: 31px;
+            font-weight: 600;
+            // background: linear-gradient(180deg, #ffe2ae 0%, #ffd489 100%);
+            // -webkit-background-clip: text;
+            // background-clip: text;
+            // -webkit-text-fill-color: transparent;
+            color: #F7ECD3;
         }
 
         &__icon {
             width: 24px;
             height: 24px;
         }
+
+        &__desc {
+            width: fit-content;
+            margin-top: 9px;
+            font-size: 12px;
+            line-height: 20px;
+            padding: 5px 8px;
+            color: #A8A094;
+            background: rgba(20, 16, 8, 0.89);
+            border: 1px solid rgba(201, 164, 79, 0.6);
+            border-radius: 10px;
+        }
+
+        &__base {
+            margin-top: 2px;
+            font-size: 12px;
+            line-height: 18px;
+            color: #ffd489;
+        }
     }
 
     .diagnosis-content {
-        padding: 0 10px;
+        padding: 0 12px;
 
         .variety-bar {
             display: flex;
             align-items: center;
             justify-content: space-between;
-            padding: 10px 6px;
-            background: #fff;
+            padding: 10px;
+            background: linear-gradient(180deg, #1a191d 0%, #121216 100%);
+            border: 1px solid rgba(255, 255, 255, 0.1);
             border-radius: 8px;
-            margin-top: -20px;
 
             &__tags {
                 display: flex;
@@ -647,12 +773,12 @@ onBeforeUnmount(() => {
             &__tag {
                 padding: 5px 16px;
                 border-radius: 4px;
-                background: #f2f3f5;
-                color: #4e5969;
+                background: rgba(255, 255, 255, 0.05);
+                color: rgba(255, 255, 255, 0.5);
 
                 &.active {
-                    background: #2199f8;
-                    color: #fff;
+                    background: linear-gradient(90deg, #ffebc9 0%, #ffca6d 100%);
+                    color: #1a1408;
                 }
             }
 
@@ -662,63 +788,65 @@ onBeforeUnmount(() => {
                 gap: 2px;
                 padding: 5px 10px;
                 border-radius: 4px;
-                border: 1px solid #2199f8;
-                background: rgba(33, 153, 248, 0.1);
-                color: #2199f8;
+                border: 1px solid rgba(255, 212, 137, 0.4);
+                background: rgba(255, 212, 137, 0.1);
+                color: #ffd489;
             }
         }
 
         .base-data {
             margin: 10px 0;
-            padding: 5px;
-            // min-height: 382px;
+            padding: 12px;
             min-height: auto;
-            background: url("@/assets/img/report/base-bg.png") no-repeat center top / 100% 100%;
+            background: linear-gradient(180deg, #1a191d 0%, #121216 100%);
+            border: 1px solid rgba(255, 255, 255, 0.1);
+            border-radius: 12px;
             box-sizing: border-box;
 
             &__title {
                 display: flex;
                 align-items: center;
-                gap: 5px;
+                gap: 6px;
                 font-size: 17px;
                 color: #fff;
-                margin: -3px 0 0 -3px;
+                .title-dot {
+                    width: 2px;
+                    height: 16px;
+                    background: #FFD489;
+                    border-radius: 2px;
+                    margin-top: 2px;
+                }
             }
 
             &__icon {
-                width: 44px;
-                height: 44px;
-            }
-
-            &__title>span {
-                margin-top: -4px;
+                width: 28px;
+                height: 28px;
             }
 
             &__body {
-                margin-top: -8px;
-                padding: 10px;
-                background: #fff;
-                border-radius: 8px;
+                margin-top: 8px;
 
                 .base-data__empty {
                     padding: 20px 0;
                     text-align: center;
-                    color: #999;
+                    color: rgba(255, 255, 255, 0.45);
                     font-size: 13px;
                 }
 
                 .base-info-item {
                     margin-bottom: 8px;
+
                     &__row {
-                        color: #333;
+                        color: rgba(255, 255, 255, 0.88);
+                        line-height: 22px;
                     }
 
                     &__label {
-                        color: #999;
+                        color: rgba(255, 255, 255, 0.45);
                     }
 
                     &__value {
-                        color: #333;
+                        color: rgba(255, 255, 255, 0.88);
                     }
                 }
 
@@ -729,8 +857,8 @@ onBeforeUnmount(() => {
                     margin-left: 6px;
                     padding: 2px 8px;
                     border-radius: 20px;
-                    background: rgba(33, 153, 248, 0.1);
-                    color: #2199f8;
+                    background: rgba(255, 212, 137, 0.12);
+                    color: #ffd489;
                     font-size: 12px;
 
                     .el-icon {
@@ -767,19 +895,24 @@ onBeforeUnmount(() => {
                 flex-direction: column;
                 align-items: center;
                 justify-content: center;
-                padding: 5px 5px 14px;
+                gap: 4px;
+                min-height: 64px;
+                padding: 8px 4px;
                 box-sizing: border-box;
-                color: #ADADAD;
-                background: url("@/assets/img/report/tab-bg.png") no-repeat center center / 100% 100%;
+                border-radius: 8px;
+                border: 1px solid rgba(255, 255, 255, 0.1);
+                // background: rgba(255, 255, 255, 0.05);
+                background: rgb(22 22 22);
+                color: rgba(255, 255, 255, 0.5);
+                font-size: 12px;
 
                 &.active {
-                    background: url("@/assets/img/report/tab-act-bg.png") no-repeat center center / 100% 100%;
-                    &::after {
-                        opacity: 1;
-                    }
+                    border-color: transparent;
+                    background: linear-gradient(180deg, #ffebc9 0%, #ffca6d 100%);
+                    color: #1a1408;
 
                     .report-tabs__icon {
-                        filter: none;
+                        filter: brightness(0);
                         opacity: 1;
                     }
                 }
@@ -789,22 +922,23 @@ onBeforeUnmount(() => {
                 width: 22px;
                 height: 22px;
                 filter: grayscale(1);
-                opacity: 0.45;
+                opacity: 0.55;
             }
         }
 
         .report-panel {
             margin-top: 10px;
             padding: 16px 14px 18px;
-            background: #fff;
-            border-radius: 10px;
+            background: linear-gradient(180deg, #1a191d 0%, #121216 100%);
+            border: 1px solid rgba(255, 255, 255, 0.1);
+            border-radius: 12px;
 
             &__title {
                 position: relative;
                 display: inline-block;
                 font-size: 18px;
                 font-weight: 600;
-                color: #1d2129;
+                color: #fff;
                 line-height: 1.3;
                 z-index: 1;
 
@@ -812,11 +946,11 @@ onBeforeUnmount(() => {
                     content: "";
                     position: absolute;
                     left: 0;
-                    bottom: 2px;
+                    bottom: 1px;
                     width: 36px;
                     height: 8px;
                     border-radius: 8px;
-                    background: linear-gradient(90deg, #8ed0ff 0%, rgba(142, 208, 255, 0.35) 100%);
+                    background: linear-gradient(90deg, rgba(255, 212, 137, 0.85) 0%, rgba(255, 212, 137, 0.15) 100%);
                     z-index: -1;
                 }
             }
@@ -825,13 +959,13 @@ onBeforeUnmount(() => {
                 margin-top: 14px;
                 padding: 24px 0;
                 text-align: center;
-                color: #999;
+                color: rgba(255, 255, 255, 0.45);
                 font-size: 13px;
             }
 
             &__body {
                 margin-top: 12px;
-                color: #333;
+                color: rgba(255, 255, 255, 0.75);
                 font-size: 14px;
                 line-height: 1.7;
                 word-break: break-word;
@@ -840,21 +974,21 @@ onBeforeUnmount(() => {
                     margin: 0 0 10px;
                     font-size: 16px;
                     font-weight: 600;
-                    color: #1d2129;
+                    color: #ffd489;
                 }
 
                 :deep(h3) {
                     margin: 14px 0 8px;
                     font-size: 15px;
                     font-weight: 600;
-                    color: #1d2129;
+                    color: #fff;
                 }
 
                 :deep(h4) {
                     margin: 12px 0 6px;
                     font-size: 14px;
                     font-weight: 600;
-                    color: #4e5969;
+                    color: rgba(255, 255, 255, 0.85);
                 }
 
                 :deep(p) {
@@ -872,7 +1006,7 @@ onBeforeUnmount(() => {
 
                 :deep(strong) {
                     font-weight: 600;
-                    color: #1d2129;
+                    color: #ffd489;
                 }
             }
         }

+ 1 - 1
src/views/old_mini/entry_information/components/entryComplete.vue

@@ -81,7 +81,7 @@ const STEP_DEFS = [
     {
         key: "phenology",
         title: "物候起点已校准",
-        desc: "按 1 月中旬来白点,推算全年节点",
+        desc: "按照物候起点推算全年节点",
     },
     {
         key: "weather",

+ 64 - 63
src/views/old_mini/growth_report/components/CropAlertPanel.vue

@@ -17,7 +17,7 @@
                             <el-avatar class="crop-avatar" shape="square" :size="42" :src="resolvedCropAvatar" />
                             <div class="crop-detail">
                                 <div class="crop-name">{{ currentCropName }}</div>
-                                <div class="crop-subtitle">休眠期待完善</div>
+                                <!-- <div class="crop-subtitle">休眠期待完善</div> -->
                             </div>
                         </div>
                         <div class="switch-wrap">
@@ -68,10 +68,10 @@
 
                     <div class="alert-list" v-show="!isBackground">
                         <div
-                            v-if="reportGenerating"
+                            v-if="alertsLoading || reportGenerating"
                             class="alert-generating"
                             v-loading="true"
-                            element-loading-text="报告生成中,请稍后..."
+                            :element-loading-text="reportGenerating ? '报告生成中,请稍后...' : '加载中...'"
                             element-loading-background="rgba(0, 0, 0, 0.5)"
                         ></div>
                         <template v-else>
@@ -167,13 +167,6 @@ const emit = defineEmits(["viewDetail", "heightChange", "zoneChange"]);
 
 const weatherIcon = require("@/assets/img/report/icon-weather.png");
 const stressIcon = require("@/assets/img/report/icon-warning.png");
-/** 卡片占位文案(接口字段待补) */
-const PLACEHOLDER = {
-    riskLevel: "待完善",
-    metricValue: "8",
-    metricUnit: "待完善",
-    timeText: "待完善待完善待完善",
-};
 
 /** 面板 bottom:取 tabBar 顶边距视口底的距离,避免 offsetHeight 偏差留缝 */
 const resolveTabBarHeight = () => {
@@ -205,6 +198,8 @@ const guideVisible = ref(false);
 let reloadToken = 0;
 /** 有农场报告生成中:空数据轮询 */
 const reportGenerating = ref(false);
+/** 预警接口尚未返回时展示 loading,避免先闪空卡片 */
+const alertsLoading = ref(true);
 let reportPollTimer = null;
 let reportPollStartedAt = 0;
 
@@ -381,10 +376,10 @@ const alertCards = ref([
         title: "",
         icon: weatherIcon,
         content: "",
-        riskLevel: PLACEHOLDER.riskLevel,
-        metricValue: PLACEHOLDER.metricValue,
-        metricUnit: PLACEHOLDER.metricUnit,
-        timeText: PLACEHOLDER.timeText,
+        riskLevel: "",
+        metricValue: "",
+        metricUnit: "",
+        timeText: "",
     },
     {
         id: CARD_ID.STRESS,
@@ -394,10 +389,10 @@ const alertCards = ref([
         title: "",
         icon: stressIcon,
         content: "",
-        riskLevel: PLACEHOLDER.riskLevel,
-        metricValue: PLACEHOLDER.metricValue,
-        metricUnit: PLACEHOLDER.metricUnit,
-        timeText: PLACEHOLDER.timeText,
+        riskLevel: "",
+        metricValue: "",
+        metricUnit: "",
+        timeText: "",
     },
 ]);
 
@@ -501,6 +496,7 @@ const scheduleReportPoll = (token, queryParams) => {
 const reloadFarmAlerts = async () => {
     const token = ++reloadToken;
     stopReportPoll();
+    alertsLoading.value = true;
     selectedZoneId.value = null;
     activeIndex.value = 0;
     zoneList.value = [];
@@ -569,64 +565,69 @@ const fetchAlertCards = async (token = reloadToken, options = {}) => {
     const queryParams = options.queryParams || getQueryParams();
     const hasFarm = queryParams.farm_id != null && queryParams.farm_id !== "";
     const fromPoll = !!options.fromPoll;
+    if (!fromPoll) alertsLoading.value = true;
 
     let riskRes;
     let stressRes;
-    if (hasFarm) {
-        pointCropName.value = "";
-        [riskRes, stressRes] = await Promise.allSettled([
-            VE_API.questionnaire.getWeatherRisk(queryParams),
-            VE_API.questionnaire.getWeatherStress(queryParams),
-        ]);
-    } else {
-        stopReportPoll();
-        const countyParams = getCountyAlertParams();
-        if (!countyParams) {
-            if (token !== reloadToken) return;
+    try {
+        if (hasFarm) {
+            pointCropName.value = "";
+            [riskRes, stressRes] = await Promise.allSettled([
+                VE_API.questionnaire.getWeatherRisk(queryParams),
+                VE_API.questionnaire.getWeatherStress(queryParams),
+            ]);
+        } else {
+            stopReportPoll();
+            const countyParams = getCountyAlertParams();
+            if (!countyParams) {
+                if (token !== reloadToken) return;
+                applyWeatherRisk(null);
+                applyWeatherStress(null);
+                pointCropName.value = "";
+                syncCropNameDisplay();
+                syncNoFarmCropOptions();
+                nextTick(() => syncMidAnchor());
+                return;
+            }
+            [riskRes, stressRes] = await Promise.allSettled([
+                VE_API.questionnaire.getPointRiskReport(countyParams),
+                VE_API.questionnaire.getPointStressReport(countyParams),
+            ]);
+        }
+        // 切换农场期间若有更新请求,丢弃旧回包
+        if (token !== reloadToken) return;
+
+        const riskRecord = riskRes.status === "fulfilled" ? pickFirstRecord(riskRes.value) : null;
+        const stressRecord = stressRes.status === "fulfilled" ? pickFirstRecord(stressRes.value) : null;
+
+        // 有农场且双接口均为空:展示生成中并轮询(5s,最长 3 分钟)
+        if (hasFarm && !riskRecord && !stressRecord) {
             applyWeatherRisk(null);
             applyWeatherStress(null);
-            pointCropName.value = "";
-            syncCropNameDisplay();
-            syncNoFarmCropOptions();
+            scheduleReportPoll(token, queryParams);
             nextTick(() => syncMidAnchor());
             return;
         }
-        [riskRes, stressRes] = await Promise.allSettled([
-            VE_API.questionnaire.getPointRiskReport(countyParams),
-            VE_API.questionnaire.getPointStressReport(countyParams),
-        ]);
-    }
-    // 切换农场期间若有更新请求,丢弃旧回包
-    if (token !== reloadToken) return;
 
-    const riskRecord = riskRes.status === "fulfilled" ? pickFirstRecord(riskRes.value) : null;
-    const stressRecord = stressRes.status === "fulfilled" ? pickFirstRecord(stressRes.value) : null;
-
-    // 有农场且双接口均为空:展示生成中并轮询(5s,最长 3 分钟)
-    if (hasFarm && !riskRecord && !stressRecord) {
-        applyWeatherRisk(null);
-        applyWeatherStress(null);
-        scheduleReportPoll(token, queryParams);
-        nextTick(() => syncMidAnchor());
-        return;
-    }
+        if (hasFarm || fromPoll) {
+            stopReportPoll();
+        }
 
-    if (hasFarm || fromPoll) {
-        stopReportPoll();
-    }
+        // 成功但无数据时清空旧卡片,避免切换农场后残留
+        applyWeatherRisk(riskRecord);
+        applyWeatherStress(stressRecord);
 
-    // 成功但无数据时清空旧卡片,避免切换农场后残留
-    applyWeatherRisk(riskRecord);
-    applyWeatherStress(stressRecord);
+        // 无农场:作物名取任一接口返回的 crop_name;切换列表同步为该作物
+        if (!hasFarm) {
+            pointCropName.value = riskRecord?.crop_name || stressRecord?.crop_name || "";
+            syncCropNameDisplay();
+            syncNoFarmCropOptions();
+        }
 
-    // 无农场:作物名取任一接口返回的 crop_name;切换列表同步为该作物
-    if (!hasFarm) {
-        pointCropName.value = riskRecord?.crop_name || stressRecord?.crop_name || "";
-        syncCropNameDisplay();
-        syncNoFarmCropOptions();
+        nextTick(() => syncMidAnchor());
+    } finally {
+        if (!fromPoll && token === reloadToken) alertsLoading.value = false;
     }
-
-    nextTick(() => syncMidAnchor());
 };
 
 const handleViewDetail = (item) => {

+ 2 - 2
src/views/old_mini/work_execute/index.vue

@@ -21,12 +21,12 @@
                         已完成 {{ completedCount }}
                     </div>
                 </div>
-                <div class="task-sort" :class="{ active: sortByUrgency }" @click="sortByUrgency = !sortByUrgency">
+                <!-- <div class="task-sort" :class="{ active: sortByUrgency }" @click="sortByUrgency = !sortByUrgency">
                     <span class="task-sort__icon">
                         <i /><i /><i />
                     </span>
                     <span>按紧急程度(待完善)</span>
-                </div>
+                </div> -->
             </div>
 
             <div v-if="zoneList.length" class="zone-chips">