index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762
  1. <template>
  2. <div class="growth-report-page" :style="{ height: `calc(100vh - ${tabBarHeight}px)` }">
  3. <div class="report-content">
  4. <div class="map-container" ref="mapContainer"></div>
  5. </div>
  6. <!-- 浮窗:长势互动 -->
  7. <div v-if="showInteractCard" class="interact-float">
  8. <div class="interact-card">
  9. <div class="interact-card__head">
  10. <div class="interact-card__tab">
  11. <img class="interact-card__star" src="@/assets/img/agricultural/start.png" alt="" />
  12. <span>异常互动</span>
  13. </div>
  14. <el-icon class="interact-card__close" @click="showInteractCard = false"><Close /></el-icon>
  15. </div>
  16. <div class="interact-card__qa">
  17. <div class="interact-card__question">{{ interactQuestionText }}</div>
  18. <div @click="handleGoPatrol" class="interact-card__btn">去巡园</div>
  19. </div>
  20. </div>
  21. </div>
  22. <!-- 左上角:位置切换 -->
  23. <!-- <div v-if="!showInteractCard" class="location-bar">
  24. <el-icon class="location-bar__icon"><LocationFilled /></el-icon>
  25. <span class="location-bar__name van-ellipsis">{{ locationName }}</span>
  26. <span class="location-bar__action" @click="handleSwitchLocation">切换位置</span>
  27. </div> -->
  28. <!-- <div class="map-legend" :style="{ bottom: `${inviteBottom}px` }">
  29. <div
  30. v-for="item in mapLegendItems"
  31. :key="item.key"
  32. class="map-legend__item"
  33. >
  34. <span class="map-legend__pill" :class="item.pillClass"></span>
  35. <span class="map-legend__text">{{ item.label }}</span>
  36. </div>
  37. </div> -->
  38. <crop-alert-panel
  39. :crop-name="currentCropName"
  40. :weather-risk="weatherRisk"
  41. :weather-stress="weatherStress"
  42. :weather-risk-explain="weatherRiskExplain"
  43. :weather-stress-explain="weatherStressExplain"
  44. @switch-category="handleSwitchCategory"
  45. @view-detail="handleViewDetail"
  46. @patrol-tip="handlePatrolTip"
  47. @height-change="handlePanelHeightChange"
  48. />
  49. </div>
  50. <!-- 诊断报告弹窗 -->
  51. <diagnosis-report-popup ref="diagnosisReportPopupRef" />
  52. <!-- 恢复种植弹窗:确认已到达后触发诊断报告弹窗检查 -->
  53. <restore-planting-popup @phenology-reached="onPhenologyReached" />
  54. <!-- 录入信息邀请弹窗:分享链接带 showInviteEntry 时展示 -->
  55. <invite-entry-popup ref="invitePopupRef" />
  56. </template>
  57. <script setup>
  58. import { computed, nextTick, onActivated, onMounted, ref } from "vue";
  59. import { useRoute, useRouter } from "vue-router";
  60. import { useStore } from "vuex";
  61. import { Close, LocationFilled } from "@element-plus/icons-vue";
  62. import { convertPointToArray } from "@/utils/index";
  63. import GrowthReportMap from "./growthReportMap.js";
  64. import RestorePlantingPopup from "@/components/popup/restorePlantingPopup.vue";
  65. import CropAlertPanel from "./components/CropAlertPanel.vue";
  66. import inviteEntryPopup from "@/views/old_mini/entry_information/components/inviteEntryPopup.vue";
  67. import DiagnosisReportPopup from "@/components/popup/diagnosisReportPopup.vue";
  68. import wx from "weixin-js-sdk";
  69. import { useI18n } from "@/i18n";
  70. const { t } = useI18n();
  71. const router = useRouter();
  72. const route = useRoute();
  73. const diagnosisReportPopupRef = ref(null);
  74. /** 恢复种植确认「已到达」后,再检查是否弹出诊断报告 */
  75. const onPhenologyReached = () => {
  76. diagnosisReportPopupRef.value?.checkShouldShow?.();
  77. };
  78. const DEFAULT_MAP_POINT = "POINT(113.6142086995688 23.585836479509055)";
  79. const MAP_KEY = "CZLBZ-LJICQ-R4A5J-BN62X-YXCRJ-GNBUT";
  80. const LOCATION_SESSION_KEY = "GROWTH_REPORT_LOCATION";
  81. const MAP_POINT_STORAGE_KEY = "GROWTH_REPORT_MAP_POINT";
  82. const ENTRY_FARM_DATA_KEY = "ENTRY_FARM_DATA";
  83. function readEntryFarmData() {
  84. try {
  85. return JSON.parse(localStorage.getItem(ENTRY_FARM_DATA_KEY) || "null");
  86. } catch {
  87. return null;
  88. }
  89. }
  90. const entryFarmData = readEntryFarmData();
  91. const menuIcon = require("@/assets/img/common/farm-active.png");
  92. const mapLegendItems = computed(() => [
  93. { key: "zone", label: "胁迫", pillClass: "map-legend__pill--zone" },
  94. { key: "growth", label: "长势", pillClass: "map-legend__pill--growth" },
  95. { key: "pest", label: "病虫害", pillClass: "map-legend__pill--pest" },
  96. ]);
  97. const store = useStore();
  98. const tabBarHeight = computed(() => store.state.home.tabBarHeight);
  99. const mapContainer = ref(null);
  100. const growthReportMap = new GrowthReportMap();
  101. const locationName = ref("");
  102. const currentMapPoint = ref(
  103. entryFarmData?.point ||
  104. localStorage.getItem(MAP_POINT_STORAGE_KEY) ||
  105. localStorage.getItem("selectedFarmPoint") ||
  106. store.state.home.miniUserLocationPoint ||
  107. DEFAULT_MAP_POINT
  108. );
  109. const currentCropName = ref(entryFarmData?.crop || "水稻");
  110. const weatherRisk = ref(entryFarmData?.weatherRisk || "具体预警");
  111. const weatherStress = ref(entryFarmData?.weatherStress || "某某胁迫");
  112. /** 未来预警正文:risk_report.explain_simple */
  113. const weatherRiskExplain = ref("");
  114. /** 当下胁迫正文:stress_report.explain_simple */
  115. const weatherStressExplain = ref("");
  116. const activeMenuKey = ref("hot-drought-2");
  117. const panelHeight = ref(280);
  118. const inviteBottom = computed(() => panelHeight.value);
  119. const invitePopupRef = ref(null);
  120. const showInteractCard = ref(false);
  121. const interactQuestionText = ref("");
  122. function resolveUserTel() {
  123. const entry = readEntryFarmData();
  124. if (entry?.phone) return String(entry.phone).trim();
  125. try {
  126. const userInfo = JSON.parse(localStorage.getItem("localUserInfo") || "{}");
  127. return String(userInfo.tel || userInfo.phone || userInfo.mobile || "").trim();
  128. } catch {
  129. return "";
  130. }
  131. }
  132. /** 未来预警卡片:risk_report → explain_simple */
  133. async function fetchRiskReport() {
  134. // TODO: 接口有正式数据后改回 resolveUserTel()
  135. const tel = resolveUserTel();
  136. if (!tel) {
  137. weatherRiskExplain.value = "";
  138. return;
  139. }
  140. try {
  141. const raw = await VE_API.questionnaire.riskReport({ tel });
  142. const res = Array.isArray(raw) ? raw[0] : raw;
  143. if (Number(res?.code) !== 200 || !res.data) {
  144. weatherRiskExplain.value = "";
  145. return;
  146. }
  147. const data = res.data;
  148. const item = Array.isArray(data) ? data[0] : data;
  149. weatherRiskExplain.value =
  150. item?.explain_simple || item?.interact_explain || "";
  151. } catch {
  152. weatherRiskExplain.value = "";
  153. }
  154. }
  155. /** 当下胁迫卡片:stress_report → explain_simple */
  156. async function fetchStressReport() {
  157. // TODO: 接口有正式数据后改回 resolveUserTel()
  158. const tel = resolveUserTel();
  159. if (!tel) {
  160. weatherStressExplain.value = "";
  161. return;
  162. }
  163. try {
  164. const raw = await VE_API.questionnaire.stressReport({ tel });
  165. const res = Array.isArray(raw) ? raw[0] : raw;
  166. if (Number(res?.code) !== 200 || !res.data) {
  167. weatherStressExplain.value = "";
  168. return;
  169. }
  170. const data = res.data;
  171. const item = Array.isArray(data) ? data[0] : data;
  172. weatherStressExplain.value =
  173. item?.explain_simple || item?.interact_explain || "";
  174. } catch {
  175. weatherStressExplain.value = "";
  176. }
  177. }
  178. /** 异常互动:parse_anormal */
  179. async function fetchAbnormalContent() {
  180. const entry = readEntryFarmData();
  181. const cropCategoryName = entry?.crop;
  182. const phenophaseCode = entry?.cropCode;
  183. const riskName = entry?.weatherStress;
  184. if (!cropCategoryName || !phenophaseCode || !riskName) {
  185. showInteractCard.value = false;
  186. return;
  187. }
  188. try {
  189. const res = await VE_API.questionnaire.abnormalContent({
  190. crop_category_name: cropCategoryName,
  191. phenophase_code: String(phenophaseCode),
  192. risk_name: riskName,
  193. });
  194. if (res?.code !== 200 || !res.data) {
  195. showInteractCard.value = false;
  196. return;
  197. }
  198. const title = res.data.interaction_title || "";
  199. const theme = res.data.interaction_theme || "";
  200. interactQuestionText.value = [title, theme].filter(Boolean).join(":");
  201. showInteractCard.value = !!interactQuestionText.value;
  202. } catch {
  203. showInteractCard.value = false;
  204. }
  205. }
  206. function handleGoPatrol() {
  207. router.push({
  208. path: "/growth_track",
  209. query: {
  210. type: "abnormal",
  211. pageName: t("agriFile.patrolAbnormalTitle"),
  212. },
  213. });
  214. }
  215. function getLocationName(point = currentMapPoint.value) {
  216. const locationPoint = point || localStorage.getItem("selectedFarmPoint") || store.state.home.miniUserLocationPoint;
  217. if (!locationPoint) return;
  218. const farmLocation = convertPointToArray(locationPoint);
  219. if (!farmLocation?.length) return;
  220. const params = {
  221. key: MAP_KEY,
  222. location: `${farmLocation[1]},${farmLocation[0]}`,
  223. };
  224. VE_API.old_mini_map.location(params).then(({ result }) => {
  225. locationName.value = result?.address_component
  226. ? result.address_component.city + result.address_component.district
  227. : result?.address + "";
  228. });
  229. }
  230. function saveCurrentMapPoint(point) {
  231. if (!point) return;
  232. currentMapPoint.value = point;
  233. localStorage.setItem(MAP_POINT_STORAGE_KEY, point);
  234. }
  235. function syncEntryFarmData() {
  236. const data = readEntryFarmData();
  237. if (!data) return;
  238. if (data.crop) currentCropName.value = data.crop;
  239. if (data.weatherRisk) weatherRisk.value = data.weatherRisk;
  240. if (data.weatherStress) weatherStress.value = data.weatherStress;
  241. if (data.point) saveCurrentMapPoint(data.point);
  242. }
  243. const initMap = async () => {
  244. await nextTick();
  245. if (!mapContainer.value) return;
  246. if (growthReportMap.kmap) {
  247. growthReportMap.kmap.map?.updateSize?.();
  248. const coordinate = convertPointToArray(currentMapPoint.value)?.map(Number);
  249. if (coordinate?.length === 2) {
  250. growthReportMap.setMapPosition(coordinate);
  251. }
  252. return;
  253. }
  254. const location = currentMapPoint.value || store.state.home.miniUserLocationPoint || DEFAULT_MAP_POINT;
  255. currentMapPoint.value = location;
  256. growthReportMap.initMap(location, mapContainer.value);
  257. };
  258. function applySelectedLocation() {
  259. const raw = sessionStorage.getItem(LOCATION_SESSION_KEY);
  260. if (!raw) return false;
  261. sessionStorage.removeItem(LOCATION_SESSION_KEY);
  262. let saved = null;
  263. try {
  264. saved = JSON.parse(raw);
  265. } catch {
  266. return false;
  267. }
  268. if (!saved?.point && !saved?.coordinate) return false;
  269. const point = saved.point || `POINT(${saved.coordinate[0]} ${saved.coordinate[1]})`;
  270. const coordinate = (saved.coordinate || convertPointToArray(point)).map(Number);
  271. saveCurrentMapPoint(point);
  272. if (growthReportMap.kmap && coordinate?.length === 2) {
  273. growthReportMap.setMapPosition(coordinate);
  274. }
  275. getLocationName(point);
  276. return true;
  277. }
  278. const handleSwitchLocation = () => {
  279. // 以已确认的 currentMapPoint 为准,避免地图临时中心覆盖已选位置
  280. const mapCenter =
  281. currentMapPoint.value ||
  282. store.state.home.miniUserLocationPoint ||
  283. DEFAULT_MAP_POINT;
  284. router.push({
  285. path: "/entry_select_location",
  286. query: {
  287. mapCenter,
  288. iconType: "current",
  289. from: "growth_report",
  290. },
  291. });
  292. };
  293. const handleSelectMenu = (key) => {
  294. if (!key) return;
  295. activeMenuKey.value = key;
  296. };
  297. const handleInvite = (type) => {
  298. const isService = type === "service";
  299. let inviteName = "好友";
  300. try {
  301. const userInfo = JSON.parse(localStorage.getItem("localUserInfo") || "{}");
  302. inviteName = userInfo.nickName || userInfo.userName || userInfo.name || inviteName;
  303. } catch {
  304. // ignore
  305. }
  306. const inviteType = isService ? "service" : "farmer";
  307. const query = {
  308. askInfo: { title: "邀请完善信息", content: "是否分享该邀请给好友" },
  309. shareText: isService ? "邀请您完善农服信息" : "邀请您完善地块种植信息",
  310. targetUrl: `growth_report`,
  311. paramsPage: JSON.stringify({ inviteName, showInviteEntry: 1, inviteType }),
  312. imageUrl: 'https://birdseye-img.sysuimars.com/temp/field.png',
  313. };
  314. wx.miniProgram.navigateTo({
  315. url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
  316. });
  317. }
  318. function isTruthyFlag(value) {
  319. return value === 1 || value === "1" || value === true || value === "true";
  320. }
  321. function parseMaybeJson(value) {
  322. if (!value) return null;
  323. if (typeof value === "object") return value;
  324. try {
  325. return JSON.parse(value);
  326. } catch {
  327. return null;
  328. }
  329. }
  330. function getInviteTypeFromRoute() {
  331. const candidates = [
  332. route.query.inviteType,
  333. parseMaybeJson(route.query.paramsPage)?.inviteType,
  334. parseMaybeJson(route.query.miniJson)?.inviteType,
  335. parseMaybeJson(parseMaybeJson(route.query.miniJson)?.paramsPage)?.inviteType,
  336. ];
  337. return candidates.find((item) => item === "service" || item === "farmer") || "farmer";
  338. }
  339. function shouldShowInviteEntryPopup() {
  340. if (isTruthyFlag(route.query.showInviteEntry)) return true;
  341. const miniJson = parseMaybeJson(route.query.miniJson);
  342. if (miniJson) {
  343. if (isTruthyFlag(miniJson.showInviteEntry)) return true;
  344. const nested = parseMaybeJson(miniJson.paramsPage);
  345. if (isTruthyFlag(nested?.showInviteEntry)) return true;
  346. }
  347. const paramsPage = parseMaybeJson(route.query.paramsPage);
  348. if (isTruthyFlag(paramsPage?.showInviteEntry)) return true;
  349. return false;
  350. }
  351. function clearInviteEntryQuery() {
  352. if (!shouldShowInviteEntryPopup()) return;
  353. const newQuery = { ...(route.query || {}) };
  354. delete newQuery.showInviteEntry;
  355. if (newQuery.paramsPage) {
  356. const paramsPage = parseMaybeJson(newQuery.paramsPage);
  357. if (paramsPage && typeof paramsPage === "object") {
  358. delete paramsPage.showInviteEntry;
  359. newQuery.paramsPage = JSON.stringify(paramsPage);
  360. }
  361. }
  362. if (newQuery.miniJson) {
  363. const miniJson = parseMaybeJson(newQuery.miniJson);
  364. if (miniJson && typeof miniJson === "object") {
  365. delete miniJson.showInviteEntry;
  366. if (miniJson.paramsPage) {
  367. const nested = parseMaybeJson(miniJson.paramsPage);
  368. if (nested && typeof nested === "object") {
  369. delete nested.showInviteEntry;
  370. miniJson.paramsPage = JSON.stringify(nested);
  371. }
  372. }
  373. newQuery.miniJson = JSON.stringify(miniJson);
  374. }
  375. }
  376. router.replace({ path: route.path, query: newQuery });
  377. }
  378. function tryOpenInviteEntryPopup() {
  379. if (!shouldShowInviteEntryPopup()) return;
  380. const inviteType = getInviteTypeFromRoute();
  381. nextTick(() => {
  382. invitePopupRef.value?.open(inviteType);
  383. clearInviteEntryQuery();
  384. });
  385. }
  386. const handleSwitchCategory = (cropName) => {
  387. if (!cropName) return;
  388. currentCropName.value = cropName;
  389. };
  390. const handleViewDetail = (item) => {
  391. router.push({
  392. path: "/alert_detail",
  393. query: {
  394. title: item?.title || "具体预警",
  395. detailType: item?.detailType || ''
  396. },
  397. });
  398. };
  399. const handlePatrolTip = () => {
  400. };
  401. const handlePanelHeightChange = (height) => {
  402. panelHeight.value = Number(height) || 0;
  403. };
  404. onMounted(() => {
  405. syncEntryFarmData();
  406. getLocationName();
  407. initMap();
  408. tryOpenInviteEntryPopup();
  409. fetchAbnormalContent();
  410. fetchRiskReport();
  411. fetchStressReport();
  412. });
  413. onActivated(() => {
  414. syncEntryFarmData();
  415. const applied = applySelectedLocation();
  416. if (!applied) getLocationName();
  417. initMap();
  418. tryOpenInviteEntryPopup();
  419. fetchAbnormalContent();
  420. fetchRiskReport();
  421. fetchStressReport();
  422. });
  423. </script>
  424. <style lang="scss" scoped>
  425. .growth-report-page {
  426. width: 100%;
  427. height: 100%;
  428. background: #f5f7fb;
  429. box-sizing: border-box;
  430. .interact-float {
  431. position: fixed;
  432. top: 10px;
  433. left: 10px;
  434. right: 10px;
  435. z-index: 30;
  436. pointer-events: none;
  437. .interact-card {
  438. pointer-events: auto;
  439. overflow: hidden;
  440. border-radius: 12px;
  441. background: #fff;
  442. box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  443. }
  444. .interact-card__head {
  445. position: relative;
  446. background: linear-gradient(180deg, #e5f4ff 0%, #ffffff 72%);
  447. }
  448. .interact-card__tab {
  449. display: inline-flex;
  450. align-items: center;
  451. gap: 5px;
  452. height: 32px;
  453. padding: 0 32px 10px 8px;
  454. color: #fff;
  455. font-size: 16px;
  456. font-family: "PangMenZhengDao";
  457. background: url("@/assets/img/agricultural/title-bg.png") no-repeat center / 100% 100%;
  458. span {
  459. margin-top: -3px;
  460. }
  461. }
  462. .interact-card__star {
  463. width: 16px;
  464. height: 14px;
  465. }
  466. .interact-card__close {
  467. position: absolute;
  468. top: 8px;
  469. right: 10px;
  470. font-size: 16px;
  471. color: #9c9c9c;
  472. cursor: pointer;
  473. }
  474. .interact-card__qa {
  475. margin: 0 10px 10px;
  476. border-radius: 8px;
  477. }
  478. .interact-card__question {
  479. font-size: 16px;
  480. color: #000;
  481. font-weight: 500;
  482. }
  483. .interact-card__btn {
  484. margin: 10px auto 0;
  485. height: 32px;
  486. line-height: 32px;
  487. background: #2199F8;
  488. color: #fff;
  489. width: 100px;
  490. text-align: center;
  491. border-radius: 4px;
  492. font-size: 15px;
  493. font-weight: 500;
  494. cursor: pointer;
  495. }
  496. }
  497. .location-bar {
  498. position: fixed;
  499. top: 12px;
  500. left: 12px;
  501. z-index: 16;
  502. display: inline-flex;
  503. align-items: center;
  504. gap: 4px;
  505. max-width: calc(100% - 24px);
  506. height: 32px;
  507. padding: 0 12px;
  508. border-radius: 16px;
  509. background: rgba(0, 0, 0, 0.4);
  510. backdrop-filter: blur(4px);
  511. color: #fff;
  512. font-size: 14px;
  513. box-sizing: border-box;
  514. &__icon {
  515. font-size: 16px;
  516. flex-shrink: 0;
  517. }
  518. &__name {
  519. max-width: calc(100vw - 80px);
  520. }
  521. &__action {
  522. flex-shrink: 0;
  523. color: #2199f8;
  524. }
  525. }
  526. .side-menu {
  527. position: fixed;
  528. top: 58px;
  529. z-index: 15;
  530. display: flex;
  531. flex-direction: column;
  532. align-items: center;
  533. gap: 12px;
  534. padding: 10px 6px;
  535. border-radius: 6px;
  536. background: #fff;
  537. box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
  538. box-sizing: border-box;
  539. &--left {
  540. left: 10px;
  541. }
  542. &--right {
  543. right: 10px;
  544. }
  545. &__item {
  546. display: flex;
  547. flex-direction: column;
  548. align-items: center;
  549. gap: 4px;
  550. width: 26px;
  551. color: #8a8a8a;
  552. cursor: pointer;
  553. &.active {
  554. color: #2199f8;
  555. .side-menu__icon {
  556. opacity: 1;
  557. filter: brightness(0) saturate(100%) invert(48%) sepia(98%) saturate(1805%) hue-rotate(178deg) brightness(98%) contrast(97%);
  558. }
  559. }
  560. }
  561. &__icon {
  562. width: 16px;
  563. height: 16px;
  564. object-fit: contain;
  565. opacity: 0.55;
  566. filter: grayscale(1);
  567. }
  568. &__text {
  569. display: flex;
  570. flex-direction: column;
  571. align-items: center;
  572. font-size: 12px;
  573. line-height: 14px;
  574. text-align: center;
  575. }
  576. }
  577. .invite-group {
  578. position: fixed;
  579. right: 16px;
  580. z-index: 20;
  581. pointer-events: none;
  582. transition: bottom 0.2s ease;
  583. .invite-btn {
  584. pointer-events: auto;
  585. height: 32px;
  586. display: flex;
  587. align-items: center;
  588. justify-content: center;
  589. border-radius: 5px;
  590. background: #fff;
  591. box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.1);
  592. gap: 4px;
  593. padding: 0 8px;
  594. color: #2199F8;
  595. font-weight: 500;
  596. font-size: 12px;
  597. .invite-icon {
  598. width: 16px;
  599. }
  600. }
  601. .invite-btn + .invite-btn {
  602. margin-top: 10px;
  603. }
  604. }
  605. .map-legend {
  606. position: fixed;
  607. left: 10px;
  608. z-index: 20;
  609. pointer-events: none;
  610. transition: bottom 0.2s ease;
  611. display: flex;
  612. align-items: center;
  613. gap: 10px;
  614. padding: 4px 10px;
  615. background: rgba(0, 0, 0, 0.46);
  616. backdrop-filter: blur(4px);
  617. border-radius: 4px;
  618. box-sizing: border-box;
  619. &--en {
  620. flex-direction: column;
  621. align-items: flex-start;
  622. gap: 6px;
  623. padding: 8px 10px;
  624. background: rgba(0, 0, 0, 0.72);
  625. border-radius: 6px;
  626. .map-legend__item {
  627. gap: 6px;
  628. }
  629. .map-legend__pill {
  630. width: 18px;
  631. height: 4px;
  632. flex-shrink: 0;
  633. }
  634. .map-legend__text {
  635. font-size: 11px;
  636. line-height: 1.2;
  637. white-space: nowrap;
  638. }
  639. }
  640. &__item {
  641. display: flex;
  642. align-items: center;
  643. gap: 5px;
  644. }
  645. &__pill {
  646. width: 16px;
  647. height: 5px;
  648. border-radius: 10px;
  649. &--zone {
  650. background: #13a27f;
  651. }
  652. &--growth {
  653. background: #ff9138;
  654. }
  655. &--pest {
  656. background: #e62e2d;
  657. }
  658. }
  659. &__text {
  660. font-size: 12px;
  661. color: #fff;
  662. }
  663. }
  664. .report-content {
  665. position: relative;
  666. height: 100%;
  667. box-sizing: border-box;
  668. .map-container {
  669. width: 100%;
  670. height: 100%;
  671. }
  672. }
  673. }
  674. </style>