|
@@ -1,112 +1,136 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div
|
|
|
|
|
- class="diagnosis-report-page"
|
|
|
|
|
- v-loading="loading"
|
|
|
|
|
- element-loading-background="rgba(15, 15, 15, 0.55)"
|
|
|
|
|
- >
|
|
|
|
|
- <div v-if="reportGenerating" class="report-progress">
|
|
|
|
|
- <div class="report-progress__content">
|
|
|
|
|
- <div>
|
|
|
|
|
- <el-progress
|
|
|
|
|
- :percentage="progressPercent"
|
|
|
|
|
- :stroke-width="15"
|
|
|
|
|
- :duration="30"
|
|
|
|
|
- status="warning"
|
|
|
|
|
- striped
|
|
|
|
|
- striped-flow
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="report-progress__desc">
|
|
|
|
|
- 依据您的定位和作物品类,
|
|
|
|
|
- <div>正在生成专属报告,预计耗时2分钟...</div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <template v-else>
|
|
|
|
|
- <div class="diagnosis-header">
|
|
|
|
|
- <div class="diagnosis-header__title-row">
|
|
|
|
|
- <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>
|
|
|
|
|
- <div class="diagnosis-content">
|
|
|
|
|
- <div class="variety-bar">
|
|
|
|
|
- <div class="variety-bar__tags">
|
|
|
|
|
- <div v-for="item in varietyList" :key="item.id" class="variety-bar__tag"
|
|
|
|
|
- :class="{ active: item.id === activeVarietyId }" @click="activeVarietyId = item.id">
|
|
|
|
|
- {{ item.name }}
|
|
|
|
|
|
|
+ <div class="diagnosis-report-page" v-loading="loading" element-loading-background="rgba(15, 15, 15, 0.55)">
|
|
|
|
|
+ <div class="page-content">
|
|
|
|
|
+ <div v-if="reportGenerating" class="report-progress">
|
|
|
|
|
+ <div class="report-progress__content">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <el-progress :percentage="progressPercent" :stroke-width="15" :duration="30" status="warning"
|
|
|
|
|
+ striped striped-flow />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="report-progress__desc">
|
|
|
|
|
+ 依据您的定位和作物品类,
|
|
|
|
|
+ <div>正在生成专属报告,预计耗时2分钟...</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- <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="" /> -->
|
|
|
|
|
- <span class="title-dot"></span>
|
|
|
|
|
- <span>基本信息</span>
|
|
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ <div class="diagnosis-header">
|
|
|
|
|
+ <div class="diagnosis-header__title-row">
|
|
|
|
|
+ <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>
|
|
</div>
|
|
|
- <div class="base-data__body">
|
|
|
|
|
- <div v-if="!loading && !baseInfoList.length" class="base-data__empty">暂无基本信息</div>
|
|
|
|
|
- <div v-for="item in baseInfoList" :key="item.key" class="base-info-item">
|
|
|
|
|
- <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"
|
|
|
|
|
- @click="handleBaseAction(item.actionInline.key)">
|
|
|
|
|
- {{ item.actionInline.text }}
|
|
|
|
|
- <el-icon><Edit /></el-icon>
|
|
|
|
|
- </span> -->
|
|
|
|
|
|
|
+ <div class="diagnosis-content">
|
|
|
|
|
+ <div class="variety-bar">
|
|
|
|
|
+ <div class="variety-bar__tags">
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-for="item in zoneList"
|
|
|
|
|
+ :key="item.zone_id"
|
|
|
|
|
+ class="variety-bar__tag"
|
|
|
|
|
+ :class="{ active: String(item.zone_id) === String(selectedZoneId) }"
|
|
|
|
|
+ @click="handleSelectZone(item)"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ item.zone_name }}
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- <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 class="variety-bar__add">
|
|
|
|
|
+ <el-icon>
|
|
|
|
|
+ <Plus />
|
|
|
|
|
+ </el-icon>
|
|
|
|
|
+ <span>新增品种</span>
|
|
|
|
|
+ </div> -->
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="base-data">
|
|
|
|
|
+ <!-- <div class="base-data__title">
|
|
|
|
|
+ <span class="title-dot"></span>
|
|
|
|
|
+ <span>基本信息</span>
|
|
|
</div> -->
|
|
</div> -->
|
|
|
|
|
+ <div class="base-data__body">
|
|
|
|
|
+ <div v-if="!loading && !baseInfoList.length" class="base-data__empty">暂无基本信息</div>
|
|
|
|
|
+ <div v-for="item in baseInfoList" :key="item.key" class="base-info-item">
|
|
|
|
|
+ <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"
|
|
|
|
|
+ @click="handleBaseAction(item.actionInline.key)">
|
|
|
|
|
+ {{ item.actionInline.text }}
|
|
|
|
|
+ <el-icon><Edit /></el-icon>
|
|
|
|
|
+ </span> -->
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- <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>
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="report-module">
|
|
|
|
|
- <div class="report-tabs">
|
|
|
|
|
- <div
|
|
|
|
|
- v-for="tab in reportTabs"
|
|
|
|
|
- :key="tab.key"
|
|
|
|
|
- class="report-tabs__item"
|
|
|
|
|
- :class="{ active: tab.key === activeReportTab }"
|
|
|
|
|
- @click="activeReportTab = tab.key"
|
|
|
|
|
- >
|
|
|
|
|
- <img class="report-tabs__icon" :src="tab.icon" alt="" />
|
|
|
|
|
- <span class="report-tabs__label">{{ tab.label }}</span>
|
|
|
|
|
|
|
+ <div class="report-module">
|
|
|
|
|
+ <div class="report-tabs">
|
|
|
|
|
+ <div v-for="tab in reportTabs" :key="tab.key" class="report-tabs__item"
|
|
|
|
|
+ :class="{ active: tab.key === activeReportTab }" @click="activeReportTab = tab.key">
|
|
|
|
|
+ {{ tab.label }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="report-panel">
|
|
|
|
|
+ <template v-if="activeModule">
|
|
|
|
|
+ <div v-if="activeModule.lead" class="core-card">
|
|
|
|
|
+ <div class="core-card__head">
|
|
|
|
|
+ <img class="core-card__star" src="@/assets/img/home/start-icon.png" alt="" />
|
|
|
|
|
+ <span>核心结论</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="core-card__body">{{ activeModule.lead }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div v-for="(block, bi) in activeModule.blocks" :key="`${block.no}-${bi}`"
|
|
|
|
|
+ class="point-block" :class="`point-block--s${bi % 3}`">
|
|
|
|
|
+ <div class="point-block__head">
|
|
|
|
|
+ <span class="point-block__no">{{ block.no }}</span>
|
|
|
|
|
+ <span class="point-block__title">{{ block.title }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-if="block.sub?.length" class="point-block__card">
|
|
|
|
|
+ <div v-for="(sub, si) in block.sub" :key="`${bi}-${si}`" class="point-sub">
|
|
|
|
|
+ <!-- 样式 0:金色描边标签 -->
|
|
|
|
|
+ <template v-if="bi % 3 === 0">
|
|
|
|
|
+ <span class="point-sub__badge">{{ sub.title }}</span>
|
|
|
|
|
+ <div class="point-sub__text">{{ sub.text }}</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 样式 1:纯白标题 -->
|
|
|
|
|
+ <template v-else-if="bi % 3 === 1">
|
|
|
|
|
+ <div class="point-sub__plain">{{ sub.title }}</div>
|
|
|
|
|
+ <div class="point-sub__text">{{ sub.text }}</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 样式 2:图标 + 标题 -->
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ <div class="point-sub__icon-row">
|
|
|
|
|
+ <span class="point-sub__icon">
|
|
|
|
|
+ <el-icon>
|
|
|
|
|
+ <List />
|
|
|
|
|
+ </el-icon>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span class="point-sub__icon-title">{{ sub.title }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="point-sub__text">{{ sub.text }}</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <div v-else class="report-panel__empty">暂无报告内容</div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="report-panel">
|
|
|
|
|
- <div class="report-panel__title">{{ activeReportTabMeta.label }}</div>
|
|
|
|
|
- <div
|
|
|
|
|
- v-if="activeReportHtml"
|
|
|
|
|
- class="report-panel__body"
|
|
|
|
|
- v-html="activeReportHtml"
|
|
|
|
|
- ></div>
|
|
|
|
|
- <div v-else class="report-panel__empty">暂无报告内容</div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ </template>
|
|
|
</div>
|
|
</div>
|
|
|
- </template>
|
|
|
|
|
|
|
|
|
|
<adjustPhenologyPopup ref="adjustPhenologyPopupRef" @confirm="handlePhenologyConfirm" />
|
|
<adjustPhenologyPopup ref="adjustPhenologyPopupRef" @confirm="handlePhenologyConfirm" />
|
|
|
- <restingDatePopup
|
|
|
|
|
- ref="restingDatePopupRef"
|
|
|
|
|
- @confirm="handleRestingDateConfirm"
|
|
|
|
|
- @switchGrowing="handleSwitchGrowing"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <restingDatePopup ref="restingDatePopupRef" @confirm="handleRestingDateConfirm"
|
|
|
|
|
+ @switchGrowing="handleSwitchGrowing" />
|
|
|
<editPlantPointPopup ref="editPlantPointPopupRef" @confirm="handlePlantPointConfirm" />
|
|
<editPlantPointPopup ref="editPlantPointPopupRef" @confirm="handlePlantPointConfirm" />
|
|
|
<!-- 暂无农场时不弹「完善农场信息」,逻辑保留备用
|
|
<!-- 暂无农场时不弹「完善农场信息」,逻辑保留备用
|
|
|
<complete-farm-info-popup
|
|
<complete-farm-info-popup
|
|
@@ -125,16 +149,11 @@ import { computed, onActivated, onDeactivated, onBeforeUnmount, ref } from "vue"
|
|
|
import { useRouter } from "vue-router";
|
|
import { useRouter } from "vue-router";
|
|
|
// import { useStore } from "vuex";
|
|
// import { useStore } from "vuex";
|
|
|
import { ElMessage } from "element-plus";
|
|
import { ElMessage } from "element-plus";
|
|
|
-import { Plus, Edit } from "@element-plus/icons-vue";
|
|
|
|
|
|
|
+import { Plus, Edit, List } from "@element-plus/icons-vue";
|
|
|
import adjustPhenologyPopup from "../components/adjustPhenologyPopup.vue";
|
|
import adjustPhenologyPopup from "../components/adjustPhenologyPopup.vue";
|
|
|
import restingDatePopup from "../components/restingDatePopup.vue";
|
|
import restingDatePopup from "../components/restingDatePopup.vue";
|
|
|
import editPlantPointPopup from "../components/editPlantPointPopup.vue";
|
|
import editPlantPointPopup from "../components/editPlantPointPopup.vue";
|
|
|
// import completeFarmInfoPopup from "@/components/popup/completeFarmInfoPopup.vue";
|
|
// import completeFarmInfoPopup from "@/components/popup/completeFarmInfoPopup.vue";
|
|
|
-import tab1Icon from "@/assets/img/report/tab-1.png";
|
|
|
|
|
-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 completeFarmPopupImage from "@/assets/img/common/empty-bg-3.png";
|
|
// import completeFarmPopupImage from "@/assets/img/common/empty-bg-3.png";
|
|
|
import restorePlantingPopup from "@/components/popup/restorePlantingPopup.vue";
|
|
import restorePlantingPopup from "@/components/popup/restorePlantingPopup.vue";
|
|
|
|
|
|
|
@@ -161,45 +180,36 @@ const NO_FARM_CROP = "PAD";
|
|
|
/** 无定位时的默认点位(与录入页一致) */
|
|
/** 无定位时的默认点位(与录入页一致) */
|
|
|
const DEFAULT_POINT = "POINT(113.6142086995688 23.585836479509055)";
|
|
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: "phenology", labels: ["物候信息", "物候期"], label: "物候信息:", actionInline: { key: "adjustPhenology", text: "调整物候" } },
|
|
|
|
|
- { key: "soil", labels: ["土壤条件"], label: "土壤条件:", actionBlock: { key: "soilSense", text: "土壤感知" } },
|
|
|
|
|
- { key: "terrain", labels: ["地形条件"], label: "地形条件:", actionInline: { key: "editLocation", text: "修改定位" } },
|
|
|
|
|
|
|
+/** 报告分模块:tab 文案取自各 module JSON 的 tab 字段 */
|
|
|
|
|
+const MODULE_DEFS = [
|
|
|
|
|
+ { key: "weather", field: "module2_weather", fallbackLabel: "关键物候风险" },
|
|
|
|
|
+ { key: "pest", field: "module3_pest", fallbackLabel: "病虫害风险" },
|
|
|
|
|
+ { key: "input", field: "module5_input", fallbackLabel: "建议必要投入" },
|
|
|
|
|
+ { key: "quality", field: "module4_quality", fallbackLabel: "潜力品质分析" },
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
-/** Tab key → report/check 返回字段 */
|
|
|
|
|
-const REPORT_TAB_FIELD = {
|
|
|
|
|
- weather: "module2_weather",
|
|
|
|
|
- pest: "module3_pest",
|
|
|
|
|
- quality: "module4_quality",
|
|
|
|
|
- input: "module5_input",
|
|
|
|
|
- manage: "module6_management",
|
|
|
|
|
|
|
+/** rows.label → 基本信息展示 */
|
|
|
|
|
+const BASE_ROW_LABEL_MAP = {
|
|
|
|
|
+ 物候信息: { key: "phenology", label: "物候信息" },
|
|
|
|
|
+ 物候期: { key: "phenology", label: "物候信息" },
|
|
|
|
|
+ 土壤条件: { key: "soil", label: "土壤条件" },
|
|
|
|
|
+ 地形条件: { key: "terrain", label: "地形条件" },
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-const reportTabs = [
|
|
|
|
|
- { key: "weather", label: "气象风险", icon: tab1Icon },
|
|
|
|
|
- { key: "pest", label: "病虫风险", icon: tab2Icon },
|
|
|
|
|
- { key: "quality", label: "品质潜力", icon: tab3Icon },
|
|
|
|
|
- { key: "input", label: "必要投入", icon: tab4Icon },
|
|
|
|
|
- { key: "manage", label: "农事管理", icon: tab5Icon },
|
|
|
|
|
-];
|
|
|
|
|
-
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------------
|
|
|
// 页面状态
|
|
// 页面状态
|
|
|
// ---------------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------------
|
|
|
const loading = ref(false); // 接口尚未返回:只转圈,不带文字
|
|
const loading = ref(false); // 接口尚未返回:只转圈,不带文字
|
|
|
const reportGenerating = ref(false); // exists=0:模拟进度条,并继续轮询
|
|
const reportGenerating = ref(false); // exists=0:模拟进度条,并继续轮询
|
|
|
const progressPercent = ref(10);
|
|
const progressPercent = ref(10);
|
|
|
-const varietyList = ref([]);
|
|
|
|
|
-const activeVarietyId = ref(null);
|
|
|
|
|
|
|
+/** 分区列表(getZones) */
|
|
|
|
|
+const zoneList = ref([]);
|
|
|
|
|
+const selectedZoneId = ref(null);
|
|
|
const headerDesc = ref("");
|
|
const headerDesc = ref("");
|
|
|
const headerBase = ref("");
|
|
const headerBase = ref("");
|
|
|
const baseInfoList = ref([]);
|
|
const baseInfoList = ref([]);
|
|
|
-/** 各 Tab 对应的 markdown 原文 */
|
|
|
|
|
-const moduleMarkdownMap = ref({});
|
|
|
|
|
|
|
+/** key → 解析后的模块对象 { id, tab, lead, blocks } */
|
|
|
|
|
+const moduleMap = ref({});
|
|
|
const activeReportTab = ref("weather");
|
|
const activeReportTab = ref("weather");
|
|
|
const adjustPhenologyPopupRef = ref(null);
|
|
const adjustPhenologyPopupRef = ref(null);
|
|
|
const restingDatePopupRef = ref(null);
|
|
const restingDatePopupRef = ref(null);
|
|
@@ -218,15 +228,18 @@ let viewToken = 0;
|
|
|
// ---------------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------------
|
|
|
// 计算属性
|
|
// 计算属性
|
|
|
// ---------------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------------
|
|
|
-const activeReportTabMeta = computed(
|
|
|
|
|
- () => reportTabs.find((tab) => tab.key === activeReportTab.value) || reportTabs[0]
|
|
|
|
|
|
|
+const reportTabs = computed(() =>
|
|
|
|
|
+ MODULE_DEFS.map((def) => {
|
|
|
|
|
+ const mod = moduleMap.value[def.key];
|
|
|
|
|
+ if (!mod) return null;
|
|
|
|
|
+ return {
|
|
|
|
|
+ key: def.key,
|
|
|
|
|
+ label: mod.tab || def.fallbackLabel,
|
|
|
|
|
+ };
|
|
|
|
|
+ }).filter(Boolean),
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
-const activeReportHtml = computed(() => {
|
|
|
|
|
- const field = REPORT_TAB_FIELD[activeReportTab.value];
|
|
|
|
|
- const md = moduleMarkdownMap.value[field] || "";
|
|
|
|
|
- return md ? markdownToHtml(md) : "";
|
|
|
|
|
-});
|
|
|
|
|
|
|
+const activeModule = computed(() => moduleMap.value[activeReportTab.value] || null);
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------------
|
|
|
// 工具函数
|
|
// 工具函数
|
|
@@ -251,12 +264,6 @@ function markDiagnosisPopupShown(farmId, zoneId) {
|
|
|
localStorage.setItem(key, "1");
|
|
localStorage.setItem(key, "1");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function hasFarmZone(farm = {}) {
|
|
|
|
|
- const farmId = farm.farm_id ?? farm.id;
|
|
|
|
|
- const zoneId = farm.zone_id ?? farm.zoneId;
|
|
|
|
|
- return farmId != null && farmId !== "" && zoneId != null && zoneId !== "";
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
/** 无农场报告用点位:优先用户定位 */
|
|
/** 无农场报告用点位:优先用户定位 */
|
|
|
function getPointText() {
|
|
function getPointText() {
|
|
|
return localStorage.getItem("MINI_USER_LOCATION_POINT") || DEFAULT_POINT;
|
|
return localStorage.getItem("MINI_USER_LOCATION_POINT") || DEFAULT_POINT;
|
|
@@ -269,141 +276,84 @@ function pickLatlonReport(res) {
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/** 解析 module1_basic:兼容 `**标签**:` 与纯文本 `标签:`(内容可跨行) */
|
|
|
|
|
-function parseBasicSections(markdown = "") {
|
|
|
|
|
- const text = String(markdown).replace(/\r\n/g, "\n").trim();
|
|
|
|
|
- if (!text) return {};
|
|
|
|
|
-
|
|
|
|
|
- const collect = (re) => {
|
|
|
|
|
- const matches = [...text.matchAll(re)];
|
|
|
|
|
- if (!matches.length) return null;
|
|
|
|
|
- const sections = {};
|
|
|
|
|
- matches.forEach((match, index) => {
|
|
|
|
|
- const label = String(match[1] || "").trim();
|
|
|
|
|
- const start = match.index + match[0].length;
|
|
|
|
|
- const end = index + 1 < matches.length ? matches[index + 1].index : text.length;
|
|
|
|
|
- if (label) sections[label] = text.slice(start, end).trim();
|
|
|
|
|
- });
|
|
|
|
|
- return sections;
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- // 1) markdown:**作物品种**:xxx
|
|
|
|
|
- const mdSections = collect(/\*\*([^*]+)\*\*[::]\s*/g);
|
|
|
|
|
- if (mdSections) return mdSections;
|
|
|
|
|
-
|
|
|
|
|
- // 2) 纯文本:作物品种:xxx(按已知标签切分,避免正文里的冒号误伤)
|
|
|
|
|
- const knownLabels = [...new Set(BASE_FIELD_META.flatMap((meta) => meta.labels))];
|
|
|
|
|
- const escaped = knownLabels
|
|
|
|
|
- .map((label) => label.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"))
|
|
|
|
|
- .join("|");
|
|
|
|
|
- if (!escaped) return {};
|
|
|
|
|
- return collect(new RegExp(`(?:^|\\n)(${escaped})[::]\\s*`, "g")) || {};
|
|
|
|
|
|
|
+/** 模块字段可能是 JSON 字符串或对象 */
|
|
|
|
|
+function parseModuleJson(raw) {
|
|
|
|
|
+ if (raw == null || raw === "") return null;
|
|
|
|
|
+ if (typeof raw === "object") return raw;
|
|
|
|
|
+ try {
|
|
|
|
|
+ return JSON.parse(raw);
|
|
|
|
|
+ } catch {
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function findSectionValue(sections, labels) {
|
|
|
|
|
- for (const label of labels) {
|
|
|
|
|
- if (sections[label]) return sections[label];
|
|
|
|
|
- }
|
|
|
|
|
- return "";
|
|
|
|
|
|
|
+function normalizeModule(raw) {
|
|
|
|
|
+ const data = parseModuleJson(raw);
|
|
|
|
|
+ if (!data || typeof data !== "object") return null;
|
|
|
|
|
+ const blocks = Array.isArray(data.blocks)
|
|
|
|
|
+ ? data.blocks.map((block) => ({
|
|
|
|
|
+ no: block?.no || "",
|
|
|
|
|
+ title: block?.title || "",
|
|
|
|
|
+ text: block?.text || "",
|
|
|
|
|
+ sub: Array.isArray(block?.sub)
|
|
|
|
|
+ ? block.sub.map((item) => ({
|
|
|
|
|
+ title: item?.title || "",
|
|
|
|
|
+ text: item?.text || "",
|
|
|
|
|
+ }))
|
|
|
|
|
+ : [],
|
|
|
|
|
+ }))
|
|
|
|
|
+ : [];
|
|
|
|
|
+ return {
|
|
|
|
|
+ id: data.id || "",
|
|
|
|
|
+ tab: data.tab || "",
|
|
|
|
|
+ lead: data.lead || "",
|
|
|
|
|
+ blocks,
|
|
|
|
|
+ };
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function buildBaseInfoList(sections, report = {}) {
|
|
|
|
|
- return BASE_FIELD_META.map((meta) => {
|
|
|
|
|
- let value = findSectionValue(sections, meta.labels);
|
|
|
|
|
- // 种植作物兜底:接口顶层 crop / variety
|
|
|
|
|
- if (!value && meta.key === "crop") {
|
|
|
|
|
- const crop = report.crop || "";
|
|
|
|
|
- const variety = report.variety || "";
|
|
|
|
|
- value = [crop, variety].filter(Boolean).join("-");
|
|
|
|
|
- }
|
|
|
|
|
- return {
|
|
|
|
|
|
|
+function buildBaseInfoList(basic, report = {}) {
|
|
|
|
|
+ const list = [];
|
|
|
|
|
+ const crop = report.crop || "";
|
|
|
|
|
+ const variety = basic?.variety || report.variety || "";
|
|
|
|
|
+ const cropValue = [crop, variety].filter(Boolean).join("-");
|
|
|
|
|
+ list.push({
|
|
|
|
|
+ key: "crop",
|
|
|
|
|
+ label: "种植作物",
|
|
|
|
|
+ value: cropValue || "—",
|
|
|
|
|
+ });
|
|
|
|
|
+ const rows = Array.isArray(basic?.rows) ? basic.rows : [];
|
|
|
|
|
+ rows.forEach((row, index) => {
|
|
|
|
|
+ const labelText = String(row?.label || "").trim();
|
|
|
|
|
+ const meta = BASE_ROW_LABEL_MAP[labelText] || {
|
|
|
|
|
+ key: `row-${index}`,
|
|
|
|
|
+ label: labelText ? `${labelText}:` : "信息:",
|
|
|
|
|
+ };
|
|
|
|
|
+ list.push({
|
|
|
key: meta.key,
|
|
key: meta.key,
|
|
|
label: meta.label,
|
|
label: meta.label,
|
|
|
- value: value || "—",
|
|
|
|
|
- actionInline: meta.actionInline,
|
|
|
|
|
- actionBlock: meta.actionBlock,
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ value: row?.text || "—",
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
|
|
+ return list;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/** 轻量 markdown → HTML(标题 / 粗体 / 列表) */
|
|
|
|
|
-function markdownToHtml(markdown = "") {
|
|
|
|
|
- const escapeHtml = (str) =>
|
|
|
|
|
- String(str)
|
|
|
|
|
- .replace(/&/g, "&")
|
|
|
|
|
- .replace(/</g, "<")
|
|
|
|
|
- .replace(/>/g, ">");
|
|
|
|
|
-
|
|
|
|
|
- const lines = String(markdown).replace(/\r\n/g, "\n").split("\n");
|
|
|
|
|
- const html = [];
|
|
|
|
|
- let inList = false;
|
|
|
|
|
-
|
|
|
|
|
- const flushList = () => {
|
|
|
|
|
- if (!inList) return;
|
|
|
|
|
- html.push("</ul>");
|
|
|
|
|
- inList = false;
|
|
|
|
|
- };
|
|
|
|
|
|
|
+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}的${farmName || "飞鸟智慧农业"}` : "飞鸟智慧农业";
|
|
|
|
|
|
|
|
- const inline = (str) =>
|
|
|
|
|
- escapeHtml(str).replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>");
|
|
|
|
|
|
|
+ const basic = parseModuleJson(report.module1_basic) || {};
|
|
|
|
|
+ baseInfoList.value = buildBaseInfoList(basic, report);
|
|
|
|
|
|
|
|
- lines.forEach((raw) => {
|
|
|
|
|
- const line = raw.trimEnd();
|
|
|
|
|
- const trimmed = line.trim();
|
|
|
|
|
- if (!trimmed) {
|
|
|
|
|
- flushList();
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (/^###\s+/.test(trimmed)) {
|
|
|
|
|
- flushList();
|
|
|
|
|
- html.push(`<h4>${inline(trimmed.replace(/^###\s+/, ""))}</h4>`);
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (/^##\s+/.test(trimmed)) {
|
|
|
|
|
- flushList();
|
|
|
|
|
- html.push(`<h3>${inline(trimmed.replace(/^##\s+/, ""))}</h3>`);
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (/^#\s+/.test(trimmed)) {
|
|
|
|
|
- flushList();
|
|
|
|
|
- html.push(`<h2>${inline(trimmed.replace(/^#\s+/, ""))}</h2>`);
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (/^[-*]\s+/.test(trimmed)) {
|
|
|
|
|
- if (!inList) {
|
|
|
|
|
- html.push("<ul>");
|
|
|
|
|
- inList = true;
|
|
|
|
|
- }
|
|
|
|
|
- html.push(`<li>${inline(trimmed.replace(/^[-*]\s+/, ""))}</li>`);
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- flushList();
|
|
|
|
|
- html.push(`<p>${inline(trimmed)}</p>`);
|
|
|
|
|
|
|
+ const nextModules = {};
|
|
|
|
|
+ MODULE_DEFS.forEach((def) => {
|
|
|
|
|
+ const mod = normalizeModule(report[def.field]);
|
|
|
|
|
+ if (mod) nextModules[def.key] = mod;
|
|
|
});
|
|
});
|
|
|
- flushList();
|
|
|
|
|
- return html.join("");
|
|
|
|
|
-}
|
|
|
|
|
|
|
+ moduleMap.value = nextModules;
|
|
|
|
|
|
|
|
-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}的${farmName || '飞鸟智慧农业'}` : "飞鸟智慧农业";
|
|
|
|
|
- // headerBase.value = farmName || "我的基地";
|
|
|
|
|
-
|
|
|
|
|
- const cropName = report.variety || report.crop || farm.variety_name || farm.categoryLabel || "作物";
|
|
|
|
|
- varietyList.value = [{ id: report.id || 1, name: cropName }];
|
|
|
|
|
- activeVarietyId.value = varietyList.value[0].id;
|
|
|
|
|
-
|
|
|
|
|
- const sections = parseBasicSections(report.module1_basic || "");
|
|
|
|
|
- baseInfoList.value = buildBaseInfoList(sections, report);
|
|
|
|
|
-
|
|
|
|
|
- moduleMarkdownMap.value = {
|
|
|
|
|
- module2_weather: report.module2_weather || "",
|
|
|
|
|
- module3_pest: report.module3_pest || "",
|
|
|
|
|
- module4_quality: report.module4_quality || "",
|
|
|
|
|
- module5_input: report.module5_input || "",
|
|
|
|
|
- module6_management: report.module6_management || "",
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ const firstTab = MODULE_DEFS.find((def) => nextModules[def.key]);
|
|
|
|
|
+ activeReportTab.value = firstTab?.key || "weather";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function resetReportView(farm = {}) {
|
|
function resetReportView(farm = {}) {
|
|
@@ -411,10 +361,30 @@ function resetReportView(farm = {}) {
|
|
|
? `${farm.rawAddress || farm.farm_address || farm.city}的飞鸟智慧农业`
|
|
? `${farm.rawAddress || farm.farm_address || farm.city}的飞鸟智慧农业`
|
|
|
: "飞鸟智慧农业";
|
|
: "飞鸟智慧农业";
|
|
|
headerBase.value = farm.farm_name || farm.name || "我的基地";
|
|
headerBase.value = farm.farm_name || farm.name || "我的基地";
|
|
|
- varietyList.value = [];
|
|
|
|
|
- activeVarietyId.value = null;
|
|
|
|
|
baseInfoList.value = [];
|
|
baseInfoList.value = [];
|
|
|
- moduleMarkdownMap.value = {};
|
|
|
|
|
|
|
+ moduleMap.value = {};
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/** 拉取分区;优先沿用当前选中 / 农场缓存分区 */
|
|
|
|
|
+async function fetchZoneList(farmId) {
|
|
|
|
|
+ if (farmId == null || farmId === "") {
|
|
|
|
|
+ zoneList.value = [];
|
|
|
|
|
+ selectedZoneId.value = null;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ try {
|
|
|
|
|
+ const res = await VE_API.questionnaire.getZones({ farm_id: farmId });
|
|
|
|
|
+ const zones = Array.isArray(res?.data?.zones) ? res.data.zones : [];
|
|
|
|
|
+ zoneList.value = zones;
|
|
|
|
|
+ const farm = getSelectedFarm();
|
|
|
|
|
+ const prefer = selectedZoneId.value ?? farm.zone_id ?? farm.zoneId;
|
|
|
|
|
+ const matched = zones.find((z) => String(z.zone_id) === String(prefer));
|
|
|
|
|
+ selectedZoneId.value = (matched || zones[0])?.zone_id ?? null;
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ console.warn("[diagnosisReport] getZones failed", e);
|
|
|
|
|
+ zoneList.value = [];
|
|
|
|
|
+ selectedZoneId.value = null;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------------
|
|
@@ -637,7 +607,7 @@ async function fetchLatlonReport(token) {
|
|
|
|
|
|
|
|
async function fetchFarmReport(farm, token) {
|
|
async function fetchFarmReport(farm, token) {
|
|
|
const farmId = farm.farm_id ?? farm.id;
|
|
const farmId = farm.farm_id ?? farm.id;
|
|
|
- const zoneId = farm.zone_id ?? farm.zoneId;
|
|
|
|
|
|
|
+ const zoneId = selectedZoneId.value ?? farm.zone_id ?? farm.zoneId;
|
|
|
|
|
|
|
|
loading.value = true;
|
|
loading.value = true;
|
|
|
try {
|
|
try {
|
|
@@ -678,16 +648,40 @@ async function fetchDiagnosisReport() {
|
|
|
reportGenerating.value = false;
|
|
reportGenerating.value = false;
|
|
|
loading.value = true;
|
|
loading.value = true;
|
|
|
|
|
|
|
|
- if (!hasFarmZone(farm)) {
|
|
|
|
|
|
|
+ const farmId = farm.farm_id ?? farm.id;
|
|
|
|
|
+ if (farmId == null || farmId === "") {
|
|
|
|
|
+ zoneList.value = [];
|
|
|
|
|
+ selectedZoneId.value = null;
|
|
|
await fetchLatlonReport(token);
|
|
await fetchLatlonReport(token);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ await fetchZoneList(farmId);
|
|
|
|
|
+ if (token !== viewToken) return;
|
|
|
|
|
+ if (selectedZoneId.value == null || selectedZoneId.value === "") {
|
|
|
|
|
+ resetReportView(farm);
|
|
|
|
|
+ loading.value = false;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
await fetchFarmReport(farm, token);
|
|
await fetchFarmReport(farm, token);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------------
|
|
|
// 事件处理 / 生命周期
|
|
// 事件处理 / 生命周期
|
|
|
// ---------------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
+/** 切换分区后按新 zone_id 重拉报告 */
|
|
|
|
|
+const handleSelectZone = (zone) => {
|
|
|
|
|
+ if (!zone || String(zone.zone_id) === String(selectedZoneId.value)) return;
|
|
|
|
|
+ selectedZoneId.value = zone.zone_id;
|
|
|
|
|
+ viewToken += 1;
|
|
|
|
|
+ const token = viewToken;
|
|
|
|
|
+ stopReportPolling();
|
|
|
|
|
+ saveProgressSnapshot();
|
|
|
|
|
+ stopProgressTimer();
|
|
|
|
|
+ reportGenerating.value = false;
|
|
|
|
|
+ fetchFarmReport(getSelectedFarm(), token);
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
const handleBaseAction = (key) => {
|
|
const handleBaseAction = (key) => {
|
|
|
if (key === "adjustPhenology") {
|
|
if (key === "adjustPhenology") {
|
|
|
adjustPhenologyPopupRef.value?.open();
|
|
adjustPhenologyPopupRef.value?.open();
|
|
@@ -751,10 +745,26 @@ onBeforeUnmount(() => {
|
|
|
height: calc(100vh - 50px);
|
|
height: calc(100vh - 50px);
|
|
|
overflow: auto;
|
|
overflow: auto;
|
|
|
-webkit-overflow-scrolling: touch;
|
|
-webkit-overflow-scrolling: touch;
|
|
|
- background: #0a0a0a url("@/assets/img/agricultural/report-bg.png") no-repeat top center;
|
|
|
|
|
- background-size: 100% 250px;
|
|
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
padding-bottom: 20px;
|
|
padding-bottom: 20px;
|
|
|
|
|
+ background: #060300;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+
|
|
|
|
|
+ &::before {
|
|
|
|
|
+ content: "";
|
|
|
|
|
+ height: 250px;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: 0;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ background: #0a0a0a url("@/assets/img/agricultural/report-bg.png") no-repeat top center;
|
|
|
|
|
+ background-size: 100% 250px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .page-content {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ z-index: 2;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
::v-deep {
|
|
::v-deep {
|
|
|
.el-loading-spinner .path {
|
|
.el-loading-spinner .path {
|
|
@@ -782,9 +792,11 @@ onBeforeUnmount(() => {
|
|
|
color: #ffd489;
|
|
color: #ffd489;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.report-progress__content {
|
|
.report-progress__content {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.report-progress__desc {
|
|
.report-progress__desc {
|
|
|
margin-top: 16px;
|
|
margin-top: 16px;
|
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
@@ -845,16 +857,14 @@ onBeforeUnmount(() => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.diagnosis-content {
|
|
.diagnosis-content {
|
|
|
- padding: 0 12px;
|
|
|
|
|
|
|
+ padding: 12px 12px;
|
|
|
|
|
+ background: #060300;
|
|
|
|
|
+ background: linear-gradient(180deg, rgba(6, 3, 0, 0.1) 0%, rgba(6, 3, 0, 0.8) 2%, #060300 100%);
|
|
|
|
|
|
|
|
.variety-bar {
|
|
.variety-bar {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
|
|
- padding: 10px;
|
|
|
|
|
- background: linear-gradient(180deg, #1a191d 0%, #121216 100%);
|
|
|
|
|
- border: 1px solid rgba(255, 255, 255, 0.1);
|
|
|
|
|
- border-radius: 8px;
|
|
|
|
|
|
|
+ // justify-content: space-between;
|
|
|
|
|
|
|
|
&__tags {
|
|
&__tags {
|
|
|
display: flex;
|
|
display: flex;
|
|
@@ -864,14 +874,18 @@ onBeforeUnmount(() => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
&__tag {
|
|
&__tag {
|
|
|
- padding: 5px 16px;
|
|
|
|
|
- border-radius: 4px;
|
|
|
|
|
|
|
+ padding: 5px 14px;
|
|
|
|
|
+ border-radius: 30px;
|
|
|
background: rgba(255, 255, 255, 0.05);
|
|
background: rgba(255, 255, 255, 0.05);
|
|
|
color: rgba(255, 255, 255, 0.5);
|
|
color: rgba(255, 255, 255, 0.5);
|
|
|
|
|
+ border: 1px solid rgba(255, 255, 255, 0.12);
|
|
|
|
|
|
|
|
&.active {
|
|
&.active {
|
|
|
- background: linear-gradient(90deg, #ffebc9 0%, #ffca6d 100%);
|
|
|
|
|
- color: #1a1408;
|
|
|
|
|
|
|
+ background: rgba(255, 255, 255, 0.1);
|
|
|
|
|
+ // background: linear-gradient(90deg, #ffebc9 0%, #ffca6d 100%);
|
|
|
|
|
+ color: rgba(255, 255, 255, 1);
|
|
|
|
|
+ border-color: rgba(255, 255, 255, 0.4);
|
|
|
|
|
+ font-weight: 500;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -902,6 +916,7 @@ onBeforeUnmount(() => {
|
|
|
gap: 6px;
|
|
gap: 6px;
|
|
|
font-size: 17px;
|
|
font-size: 17px;
|
|
|
color: #fff;
|
|
color: #fff;
|
|
|
|
|
+
|
|
|
.title-dot {
|
|
.title-dot {
|
|
|
width: 2px;
|
|
width: 2px;
|
|
|
height: 16px;
|
|
height: 16px;
|
|
@@ -917,7 +932,6 @@ onBeforeUnmount(() => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
&__body {
|
|
&__body {
|
|
|
- margin-top: 8px;
|
|
|
|
|
|
|
|
|
|
.base-data__empty {
|
|
.base-data__empty {
|
|
|
padding: 20px 0;
|
|
padding: 20px 0;
|
|
@@ -935,11 +949,20 @@ onBeforeUnmount(() => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
&__label {
|
|
&__label {
|
|
|
- color: rgba(255, 255, 255, 0.45);
|
|
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ padding: 1px 6px;
|
|
|
|
|
+ background: rgba(204, 204, 204, 0.1);
|
|
|
|
|
+ border: 1px solid rgba(255, 255, 255, 0.16);
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ height: 19px;
|
|
|
|
|
+ line-height: 22px;
|
|
|
|
|
+ margin-right: 10px;
|
|
|
|
|
+ color: rgba(225, 225, 225, 1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
&__value {
|
|
&__value {
|
|
|
- color: rgba(255, 255, 255, 0.88);
|
|
|
|
|
|
|
+ color: rgba(255, 255, 255, 0.8);
|
|
|
|
|
+ line-height: 24px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -972,81 +995,41 @@ onBeforeUnmount(() => {
|
|
|
|
|
|
|
|
.report-tabs {
|
|
.report-tabs {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- align-items: stretch;
|
|
|
|
|
- gap: 8px;
|
|
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 4px;
|
|
|
|
|
+ padding: 4px;
|
|
|
overflow-x: auto;
|
|
overflow-x: auto;
|
|
|
-webkit-overflow-scrolling: touch;
|
|
-webkit-overflow-scrolling: touch;
|
|
|
scrollbar-width: none;
|
|
scrollbar-width: none;
|
|
|
|
|
+ border-radius: 12px;
|
|
|
|
|
+ background: rgba(255, 255, 255, 0.06);
|
|
|
|
|
+ border: 1px solid rgba(255, 255, 255, 0.08);
|
|
|
|
|
|
|
|
&::-webkit-scrollbar {
|
|
&::-webkit-scrollbar {
|
|
|
display: none;
|
|
display: none;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
&__item {
|
|
&__item {
|
|
|
- flex: 0 0 calc((100% - 24px) / 4);
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- justify-content: center;
|
|
|
|
|
- gap: 4px;
|
|
|
|
|
- min-height: 64px;
|
|
|
|
|
- padding: 8px 4px;
|
|
|
|
|
- box-sizing: border-box;
|
|
|
|
|
|
|
+ flex: 0 0 auto;
|
|
|
|
|
+ padding: 8px 12px;
|
|
|
border-radius: 8px;
|
|
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;
|
|
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+ line-height: 18px;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ color: rgba(255, 255, 255, 0.45);
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
|
|
|
&.active {
|
|
&.active {
|
|
|
- border-color: transparent;
|
|
|
|
|
- background: linear-gradient(180deg, #ffebc9 0%, #ffca6d 100%);
|
|
|
|
|
- color: #1a1408;
|
|
|
|
|
-
|
|
|
|
|
- .report-tabs__icon {
|
|
|
|
|
- filter: brightness(0);
|
|
|
|
|
- opacity: 1;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ background: rgba(255, 255, 255, 0.12);
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ font-weight: 500;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- &__icon {
|
|
|
|
|
- width: 22px;
|
|
|
|
|
- height: 22px;
|
|
|
|
|
- filter: grayscale(1);
|
|
|
|
|
- opacity: 0.55;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.report-panel {
|
|
.report-panel {
|
|
|
- margin-top: 10px;
|
|
|
|
|
- padding: 16px 14px 18px;
|
|
|
|
|
- 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: #fff;
|
|
|
|
|
- line-height: 1.3;
|
|
|
|
|
- z-index: 1;
|
|
|
|
|
-
|
|
|
|
|
- &::after {
|
|
|
|
|
- content: "";
|
|
|
|
|
- position: absolute;
|
|
|
|
|
- left: 0;
|
|
|
|
|
- bottom: 1px;
|
|
|
|
|
- width: 36px;
|
|
|
|
|
- height: 8px;
|
|
|
|
|
- border-radius: 8px;
|
|
|
|
|
- background: linear-gradient(90deg, rgba(255, 212, 137, 0.85) 0%, rgba(255, 212, 137, 0.15) 100%);
|
|
|
|
|
- z-index: -1;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ margin-top: 12px;
|
|
|
|
|
+ padding-bottom: 8px;
|
|
|
|
|
|
|
|
&__empty {
|
|
&__empty {
|
|
|
margin-top: 14px;
|
|
margin-top: 14px;
|
|
@@ -1055,52 +1038,134 @@ onBeforeUnmount(() => {
|
|
|
color: rgba(255, 255, 255, 0.45);
|
|
color: rgba(255, 255, 255, 0.45);
|
|
|
font-size: 13px;
|
|
font-size: 13px;
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .core-card {
|
|
|
|
|
+ padding: 14px;
|
|
|
|
|
+ border-radius: 12px;
|
|
|
|
|
+ background: linear-gradient(90.51deg, #1A191D 0%, rgba(76, 68, 53, 0.4) 102.25%);
|
|
|
|
|
+
|
|
|
|
|
+ border: 1px solid rgba(255, 212, 137, 0.24);
|
|
|
|
|
+
|
|
|
|
|
+ &__head {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 6px;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ color: #ffd489;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ &__star {
|
|
|
|
|
+ width: 11px;
|
|
|
|
|
+ // height: 16px;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
&__body {
|
|
&__body {
|
|
|
- margin-top: 12px;
|
|
|
|
|
- color: rgba(255, 255, 255, 0.75);
|
|
|
|
|
|
|
+ margin-top: 10px;
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
- line-height: 1.7;
|
|
|
|
|
|
|
+ line-height: 22px;
|
|
|
|
|
+ color: rgba(255, 255, 255, 0.88);
|
|
|
word-break: break-word;
|
|
word-break: break-word;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- :deep(h2) {
|
|
|
|
|
- margin: 0 0 10px;
|
|
|
|
|
- font-size: 16px;
|
|
|
|
|
- font-weight: 600;
|
|
|
|
|
- color: #ffd489;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .point-block {
|
|
|
|
|
+ margin-top: 18px;
|
|
|
|
|
|
|
|
- :deep(h3) {
|
|
|
|
|
- margin: 14px 0 8px;
|
|
|
|
|
- font-size: 15px;
|
|
|
|
|
- font-weight: 600;
|
|
|
|
|
- color: #fff;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ &__head {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: baseline;
|
|
|
|
|
+ gap: 8px;
|
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- :deep(h4) {
|
|
|
|
|
- margin: 12px 0 6px;
|
|
|
|
|
- font-size: 14px;
|
|
|
|
|
- font-weight: 600;
|
|
|
|
|
- color: rgba(255, 255, 255, 0.85);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ &__no {
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ color: #ffd489;
|
|
|
|
|
+ font-variant-numeric: tabular-nums;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- :deep(p) {
|
|
|
|
|
- margin: 0 0 8px;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ &__title {
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ line-height: 22px;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- :deep(ul) {
|
|
|
|
|
- margin: 0 0 10px;
|
|
|
|
|
- padding-left: 18px;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 样式 0:整行标题金色
|
|
|
|
|
+ &--s0 &__title {
|
|
|
|
|
+ color: #ffd489;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- :deep(li) {
|
|
|
|
|
- margin-bottom: 4px;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ &__card {
|
|
|
|
|
+ padding: 14px;
|
|
|
|
|
+ border-radius: 12px;
|
|
|
|
|
+ background: rgba(255, 255, 255, 0.05);
|
|
|
|
|
+ border: 1px solid rgba(255, 255, 255, 0.1);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- :deep(strong) {
|
|
|
|
|
- font-weight: 600;
|
|
|
|
|
- color: #ffd489;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .point-sub {
|
|
|
|
|
+ &+& {
|
|
|
|
|
+ margin-top: 12px;
|
|
|
|
|
+ padding-top: 12px;
|
|
|
|
|
+ border-top: 1px solid rgba(255, 255, 255, 0.08);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ &__badge {
|
|
|
|
|
+ display: inline-flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ padding: 2px 8px;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ border: 1px solid rgba(255, 212, 137, 0.55);
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ line-height: 18px;
|
|
|
|
|
+ color: #ffd489;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ &__plain {
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ line-height: 22px;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ &__icon-row {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: flex-start;
|
|
|
|
|
+ gap: 8px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ &__icon {
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
|
+ width: 28px;
|
|
|
|
|
+ height: 28px;
|
|
|
|
|
+ border-radius: 6px;
|
|
|
|
|
+ border: 1px solid rgba(255, 212, 137, 0.55);
|
|
|
|
|
+ display: inline-flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ color: #ffd489;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ &__icon-title {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ font-size: 15px;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ line-height: 22px;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ padding-top: 3px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ &__text {
|
|
|
|
|
+ margin-top: 8px;
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+ line-height: 20px;
|
|
|
|
|
+ color: rgba(255, 255, 255, 0.55);
|
|
|
|
|
+ word-break: break-word;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|