diagnosisReport copy.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. <template>
  2. <div class="diagnosis-report-page">
  3. <custom-header :name="t('agriFile.initialReport')" :isGoBack="true" @goback="handleBack" />
  4. <div class="diagnosis-report-body">
  5. <div class="report-hero">
  6. <div class="report-hero__title">{{ reportData.title }}</div>
  7. <div class="report-hero__desc">{{ reportData.intro }}</div>
  8. </div>
  9. <!-- 基本情况与种植价值 -->
  10. <div class="report-section">
  11. <div class="report-section__title">{{ reportData.basic.title }}</div>
  12. <div v-for="card in reportData.basic.cards" :key="card.title" class="info-card">
  13. <div class="info-card__title">{{ card.title }}</div>
  14. <div v-for="(para, idx) in card.paragraphs" :key="idx" class="info-card__text">
  15. {{ para }}
  16. </div>
  17. </div>
  18. </div>
  19. <!-- 决定产量的气象风险 -->
  20. <div class="report-section">
  21. <div class="report-section__title">{{ reportData.weatherRisk.title }}</div>
  22. <div class="info-card__text mb-10">{{ reportData.weatherRisk.intro }}</div>
  23. <div class="section-divider">
  24. <span>{{ reportData.weatherRisk.groupTitle }}</span>
  25. </div>
  26. <div class="info-card fertilizer-card">
  27. <div v-for="item in reportData.weatherRisk.items" :key="item.tag" class="tag-block">
  28. <span class="tag-block__tag">{{ item.tag }}</span>
  29. <div class="tag-block__text">{{ item.content }}</div>
  30. </div>
  31. <div class="suggest-card">
  32. <div class="suggest-card__title">{{ reportData.weatherRisk.suggest.title }}</div>
  33. <div v-for="row in reportData.weatherRisk.suggest.rows" :key="row.label"
  34. class="suggest-card__row">
  35. <span class="suggest-card__label">{{ row.label }}</span>
  36. <span>{{ row.content }}</span>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. <!-- 肥料供给效率分析 -->
  42. <div class="report-section">
  43. <div class="report-section__title">{{ reportData.fertilizer.title }}</div>
  44. <div class="info-card fertilizer-card">
  45. <div class="info-card__text">{{ reportData.fertilizer.intro }}</div>
  46. <div class="section-divider">
  47. <span>{{ reportData.fertilizer.groupTitle }}</span>
  48. </div>
  49. <div v-for="item in reportData.fertilizer.items" :key="item.tag" class="tag-block">
  50. <span class="tag-block__tag">{{ item.tag }}</span>
  51. <div class="tag-block__text">{{ item.content }}</div>
  52. </div>
  53. <div class="suggest-card">
  54. <div class="suggest-card__title">{{ reportData.fertilizer.suggest.title }}</div>
  55. <div v-for="row in reportData.fertilizer.suggest.rows" :key="row.label"
  56. class="suggest-card__row">
  57. <span class="suggest-card__label">{{ row.label }}</span>
  58. <span>{{ row.content }}</span>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. <div class="share-btn" @click="handleShare">{{ t("agriFile.forwardReport") }}</div>
  65. </div>
  66. </template>
  67. <script setup>
  68. import { ref } from "vue";
  69. import { useRouter, useRoute } from "vue-router";
  70. import customHeader from "@/components/customHeader.vue";
  71. import { useI18n } from "@/i18n";
  72. import wx from "weixin-js-sdk";
  73. const { t } = useI18n();
  74. const router = useRouter();
  75. const route = useRoute();
  76. /** 假数据:后续可替换为接口 */
  77. const reportData = ref({
  78. title: "《广州市从化区妃子笑荔枝初始种植诊断报告》",
  79. intro: "针对您的果园坐标、妃子笑荔枝和种植类型,飞鸟结合从化区长期种植条件,为您生成专属初始种植诊断报告",
  80. basic: {
  81. title: "基本情况与种植价值",
  82. cards: [
  83. {
  84. title: "种植基础",
  85. paragraphs: [
  86. "从化地处北回归线附近低纬度地带,属南亚热带季风气候,年均气温约20℃上下,雨量充足、光照充沛,森林覆盖率高的低山丘陵为荔枝提供了较理想的生长环境。",
  87. ],
  88. },
  89. {
  90. title: "品种价值",
  91. paragraphs: [
  92. "妃子笑为当地率先登场的早熟品种,早结、丰产稳产性好,果果大核小、肉厚清甜,商品性较好,且抗逆性和成花着果能力在同产区中表现突出。",
  93. "产期价值:本地妃子笑多在5月下旬至6月中旬成熟采收,比当地桂味、糯米糍、槐枝等中晚熟品种提早约一个月上市,能在荔枝上市初期先供应市场、填补尝鲜空档。",
  94. ],
  95. },
  96. {
  97. title: "商品定位",
  98. paragraphs: [
  99. "依托从化自然环境与当季鲜采优势,妃子笑宜以「本地早熟、果大肉厚清甜、新摘即卖」为卖点,面向本地及周边短途鲜食市场,强调产地直供与口感新鲜度。",
  100. ],
  101. }
  102. ],
  103. },
  104. weatherRisk: {
  105. title: "决定产量的气象风险",
  106. intro: "飞鸟系统基于当地多年气象与物候窗口,梳理对产量形成影响最大的关键风险,帮助提前布局应对。",
  107. groupTitle: "开花坐果期",
  108. items: [
  109. {
  110. tag: "风险判断",
  111. content:
  112. "开花坐果期阴雨涝渍年发生概率55.0%,历史强度等级4级,是制约坐果稳定的重要风险,需重点对待。",
  113. },
  114. {
  115. tag: "主要影响",
  116. content:
  117. "本物候期尚无花、果器官,研判重点放在叶和梢。高温、强光叠加缺水后,嫩叶失水速度超过根系补水速度,首先表现萎蔫与灼伤。",
  118. },
  119. {
  120. tag: "重点准备",
  121. content:
  122. "围绕排水防涝、保温防寒和抗旱灌水提前备好物资与预案,把灾害应对前移到敏感窗口来临之前。",
  123. },
  124. ],
  125. suggest: {
  126. title: "飞鸟建议",
  127. rows: [
  128. {
  129. label: "优先能力:",
  130. content:
  131. "重点提升防灾保果与应急稳产的成套管理能力,尤其是排水防涝、保温防寒和抗旱灌水的机动响应。",
  132. },
  133. {
  134. label: "管理方向:",
  135. content:
  136. "围绕开花坐果和果实膨大两大敏感窗口,把灾害应对前移到物候来临之前,守住产量形成的稳定期。",
  137. },
  138. ],
  139. },
  140. },
  141. fertilizer: {
  142. title: "肥料供给效率分析",
  143. intro: "飞鸟系统结合历史土壤、地形水文和遥感长势数据,进一步分析发现,当地肥料利用效率的主要限制在于酸性黏重土壤的通气缓冲和湿热旱交替下的根系活力波动。",
  144. groupTitle: "土壤长期供肥",
  145. items: [
  146. {
  147. tag: "主要问题",
  148. content:
  149. "当地为赤红壤黏壤土,pH约5.4偏酸,有机质水平中等,养分缓冲与保蓄能力总体偏弱。",
  150. },
  151. {
  152. tag: "形成原因",
  153. content:
  154. "暴雨涝渍年发生概率65.0%,长期强降雨易促使可移动养分淋失,进一步削弱酸性土壤的养分缓冲能力。",
  155. },
  156. {
  157. tag: "生产影响",
  158. content:
  159. "养分流失加快、供应节奏不稳,可能影响花芽分化、开花坐果和幼果稳定所需的营养基础。",
  160. },
  161. ],
  162. suggest: {
  163. title: "飞鸟建议",
  164. rows: [
  165. {
  166. label: "优先能力:",
  167. content:
  168. "重点提升排水防涝、土壤改良与分期稳肥的成套管理能力,尤其是酸性黏重土壤的通气缓冲与根系养护。",
  169. },
  170. {
  171. label: "管理方向:",
  172. content:
  173. "围绕开花坐果和果实膨大两大敏感窗口,把灾害应对前移到物候来临之前,守住产量形成的稳定期。",
  174. },
  175. ],
  176. },
  177. },
  178. });
  179. const handleBack = () => {
  180. router.back();
  181. };
  182. const handleShare = () => {
  183. const query = {
  184. askInfo: { title: "转发报告", content: "是否分享给好友" },
  185. shareText: reportData.value.title,
  186. targetUrl: "diagnosis_report",
  187. paramsPage: JSON.stringify({
  188. id: route.query.id,
  189. fromShare: 1,
  190. }),
  191. imageUrl: "https://birdseye-img.sysuimars.com/temp/field.png",
  192. };
  193. wx.miniProgram.navigateTo({
  194. url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
  195. });
  196. };
  197. </script>
  198. <style lang="scss" scoped>
  199. .diagnosis-report-page {
  200. min-height: 100vh;
  201. background: #f5f6f8;
  202. box-sizing: border-box;
  203. padding-bottom: 90px;
  204. }
  205. .diagnosis-report-body {
  206. padding: 10px 10px 60px;
  207. max-height: calc(100vh - 40px);
  208. overflow: auto;
  209. box-sizing: border-box;
  210. }
  211. .report-hero {
  212. padding: 0px 0px 10px;
  213. text-align: center;
  214. &__title {
  215. font-size: 16px;
  216. font-weight: bold;
  217. line-height: 24px;
  218. color: #000000;
  219. }
  220. &__desc {
  221. margin-top: 10px;
  222. font-size: 16px;
  223. font-weight: 350;
  224. line-height: 24px;
  225. color: rgba(6, 6, 6, 0.5);
  226. text-align: left;
  227. }
  228. }
  229. .report-section {
  230. background: #fff;
  231. padding: 10px;
  232. border-radius: 10px;
  233. &+& {
  234. margin-top: 18px;
  235. }
  236. &__title {
  237. margin-bottom: 10px;
  238. font-size: 16px;
  239. font-weight: 600;
  240. line-height: 24px;
  241. color: #000000;
  242. }
  243. }
  244. .mb-10 {
  245. margin-bottom: 10px;
  246. }
  247. .info-card {
  248. padding: 10px;
  249. border-radius: 4px;
  250. background: #F7F8FA;
  251. box-sizing: border-box;
  252. &.fertilizer-card {
  253. background: transparent;
  254. padding: 0;
  255. .info-card__text {
  256. margin-bottom: 10px;
  257. }
  258. }
  259. &+& {
  260. margin-top: 10px;
  261. }
  262. &__title {
  263. margin-bottom: 4px;
  264. font-size: 14px;
  265. font-weight: 500;
  266. line-height: 22px;
  267. color: #1D2129;
  268. }
  269. &__text {
  270. // margin-bottom: 10px;
  271. font-size: 12px;
  272. line-height: 20px;
  273. color: #4E5969;
  274. &+& {
  275. margin-top: 2px;
  276. }
  277. }
  278. }
  279. .section-divider {
  280. display: flex;
  281. align-items: center;
  282. gap: 10px;
  283. margin-bottom: 10px;
  284. color: #1D2129;
  285. font-size: 14px;
  286. font-weight: 500;
  287. line-height: 20px;
  288. &::before,
  289. &::after {
  290. content: "";
  291. flex: 1;
  292. height: 1px;
  293. background: linear-gradient(90deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
  294. }
  295. &::before {
  296. background: linear-gradient(270deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
  297. }
  298. }
  299. .tag-block {
  300. padding: 12px;
  301. border-radius: 8px;
  302. background: #f7f8fa;
  303. &+& {
  304. margin-top: 10px;
  305. }
  306. &__tag {
  307. display: inline-block;
  308. padding: 0 10px;
  309. border-radius: 2px;
  310. background: #2199f8;
  311. color: #fff;
  312. font-size: 12px;
  313. line-height: 22px;
  314. }
  315. &__text {
  316. margin-top: 4px;
  317. font-size: 12px;
  318. line-height: 20px;
  319. color: #4E5969;
  320. }
  321. }
  322. .suggest-card {
  323. margin-top: 10px;
  324. padding: 12px;
  325. border-radius: 8px;
  326. background: rgba(33, 153, 248, 0.08);
  327. &__title {
  328. margin-bottom: 8px;
  329. font-size: 14px;
  330. font-weight: 500;
  331. line-height: 20px;
  332. color: #2199f8;
  333. }
  334. &__row {
  335. font-size: 12px;
  336. line-height: 20px;
  337. color: #4E5969;
  338. &+& {
  339. margin-top: 8px;
  340. }
  341. }
  342. &__label {
  343. color: #000000;
  344. }
  345. }
  346. .share-btn {
  347. position: fixed;
  348. left: 50%;
  349. bottom: 64px;
  350. z-index: 10;
  351. transform: translateX(-50%);
  352. min-width: 120px;
  353. height: 40px;
  354. box-sizing: border-box;
  355. padding: 0 30px;
  356. border-radius: 22px;
  357. background: linear-gradient(180deg, #72C1FF 0%, #2199F8 100%);
  358. color: #fff;
  359. font-size: 14px;
  360. line-height: 40px;
  361. text-align: center;
  362. box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.1);
  363. }
  364. </style>