index.vue 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345
  1. <template>
  2. <div class="base-container no-events">
  3. <fnHeader showDate :autoGo="true" hideSwitch></fnHeader>
  4. <div class="content">
  5. <div class="warning-l left">
  6. <div class="warning-top">
  7. <div class="top-l yes-events">
  8. <div>
  9. <el-cascader
  10. style="width: 184px"
  11. :show-all-levels="false"
  12. v-model="areaVal"
  13. :props="props1"
  14. :options="areaListOptions"
  15. @change="toggleArea"
  16. popper-class="area-cascader"
  17. />
  18. </div>
  19. </div>
  20. <div class="top-r yes-events">
  21. <div class="data-box" :class="{ active: activeBoxName === '面积' }">
  22. <div class="data-value">
  23. <span>{{ areaVal.includes("3186") ? 31.2 : 419.89 }}</span
  24. >万亩
  25. </div>
  26. <div class="data-name">种植面积</div>
  27. </div>
  28. <div
  29. class="data-box"
  30. v-if="areaVal.includes('3186')"
  31. :class="{ active: activeBoxName === '从化荔枝' }"
  32. >
  33. <div class="data-value"><span>11.9</span>万亩</div>
  34. <div class="data-name">疑似失管面积</div>
  35. </div>
  36. <div class="data-box" :class="{ active: activeBoxName === '产量' }">
  37. <div class="data-value">
  38. <span>{{ areaVal.includes("3186") ? 10.4 : 192.12 }}</span
  39. >万吨
  40. </div>
  41. <div class="data-name">预估产量</div>
  42. </div>
  43. </div>
  44. </div>
  45. <div class="warning-alarm yes-events" v-show="activeBaseTab === '预警分布'">
  46. <alarm-list></alarm-list>
  47. </div>
  48. <div class="time-wrap yes-events">
  49. <time-line></time-line>
  50. </div>
  51. </div>
  52. <div class="action-legend" v-if="activeBaseTab !== '农场分布' && activeBaseTab !== '农服管理'">
  53. <el-tree
  54. ref="treeRef"
  55. class="yes-events"
  56. style="max-width: 250px"
  57. :data="treeActionData"
  58. show-checkbox
  59. node-key="id"
  60. :default-expanded-keys="defaultExpandedKeys"
  61. :default-checked-keys="defaultCheckedKeys"
  62. :props="defaultProps"
  63. @check="getTreeChecks"
  64. >
  65. <template #default="{ node, data }">
  66. <div class="custom-tree-node">
  67. <span>{{ node.label }}</span>
  68. <div v-if="node.level === 1" class="level-legend">
  69. <span class="legend-dot" :style="{ backgroundColor: data.color }"></span>
  70. <span class="legend-text" :style="{ color: data.color }">图例</span>
  71. </div>
  72. </div>
  73. </template>
  74. </el-tree>
  75. </div>
  76. <div v-if="!showDetail" class="warning-r right chart-wrap yes-events">
  77. <chart-list :activeBaseTab="activeBaseTab"></chart-list>
  78. <!-- <farmInfoGroup></farmInfoGroup> -->
  79. </div>
  80. <div v-else class="warning-r right yes-events">
  81. <farmInfoGroup></farmInfoGroup>
  82. </div>
  83. <!-- 地图图例 -->
  84. <map-legend :type="activeBaseTab"></map-legend>
  85. <!-- 地图搜索 -->
  86. <div class="warning-search yes-events">
  87. <el-select
  88. v-model="locationVal"
  89. filterable
  90. remote
  91. reserve-keyword
  92. placeholder="搜索地区"
  93. :remote-method="remoteMethod"
  94. :loading="loading"
  95. @change="handleSearchRes"
  96. class="v-select"
  97. popper-class="focus-farm-select"
  98. style="width: 375px"
  99. >
  100. <template #prefix>
  101. <el-icon class="el-input__icon"><search /></el-icon>
  102. </template>
  103. <el-option
  104. v-for="(item, index) in locationOptions.list"
  105. :key="index"
  106. :label="item.title"
  107. :value="item.point"
  108. >
  109. <span>{{ item.title }}</span>
  110. <span class="sub-title">{{ item.province }}{{ item.city }}{{ item.district }}</span>
  111. </el-option>
  112. </el-select>
  113. </div>
  114. <div class="base-tabs yes-events">
  115. <div
  116. v-for="item in baseTabs"
  117. :key="item"
  118. class="tab-item"
  119. :class="{ active: item === activeBaseTab }"
  120. @click="handleTabClick(item)"
  121. >
  122. {{ item }}
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. <div ref="mapRef" class="bottom-map"></div>
  128. <div id="popup" class="ol-popup-warning">
  129. <div class="warning-info-title">
  130. <div class="icon">
  131. <img src="@/assets/images/common/chart-icon.png" />
  132. </div>
  133. <div id="popup-title"></div>
  134. <div class="close" @click="destroyPopup">
  135. <img src="@/assets/images/warningHome/close-btn.png" />
  136. </div>
  137. </div>
  138. <div id="popup-content" class="info-content"></div>
  139. </div>
  140. <track-dialog></track-dialog>
  141. </template>
  142. <script setup>
  143. import "./map/mockFarmLayer";
  144. import StaticMapLayers from "@/components/static_map_change/Layers.js";
  145. import StaticMapPointLayers from "@/components/static_map_change/pointLayer.js";
  146. import { onMounted, onUnmounted, ref, reactive, nextTick } from "vue";
  147. import fnHeader from "@/components/fnHeader.vue";
  148. import WarningMap from "./warningMap";
  149. import AlarmLayer from "./map/alarmLayer";
  150. import DistributionLayer from "./map/distributionLayer";
  151. import trackDialog from "./components/trackDialog.vue";
  152. import alarmList from "./components/alarmList.vue";
  153. import timeLine from "./components/timeLine.vue";
  154. import eventBus from "@/api/eventBus";
  155. import { areaListOptions } from "./area";
  156. import { useStore } from "vuex";
  157. import farmInfoGroup from "./components/farmInfoGroup.vue";
  158. import mapLegend from "./components/mapLegend.vue";
  159. import chartList from "./components/chart_components/chartList.vue";
  160. let store = useStore();
  161. let warningMap = new WarningMap();
  162. let alarmLayer = null;
  163. let staticMapLayers = null;
  164. let staticMapPointLayers = null;
  165. let distributionLayer = null;
  166. const areaVal = ref(["3"]);
  167. const mapRef = ref(null);
  168. const showDetail = ref(false);
  169. const treeRef = ref(null);
  170. const defaultProps = {
  171. children: "items",
  172. label: "name",
  173. };
  174. import lz from "@/assets/images/map/type/荔枝.png";
  175. import ly from "@/assets/images/map/type/龙眼.png";
  176. import sd from "@/assets/images/map/type/水稻.png";
  177. import xm from "@/assets/images/map/type/小麦.png";
  178. import bc from "@/assets/images/map/type/小麦.png";
  179. import lb from "@/assets/images/map/type/小麦.png";
  180. // 冷链冷库、加工厂图标(与图例保持一致)
  181. import coldChainIcon from "@/assets/images/common/legend-icon-1.png";
  182. import factoryIcon from "@/assets/images/common/legend-icon-2.png";
  183. const originTreeData = [
  184. {
  185. id: 1,
  186. label: "果类",
  187. color: "#51B2FF",
  188. fillColor: "rgba(5, 49, 84, 0.5)",
  189. geom: "MULTIPOLYGON (((113.58668302396221 23.244659822289524, 113.32095411231998 23.24298858095617, 112.99338890476295 23.002328435946534, 113.13878785387456 22.604570799124076, 113.59503930394511 22.86862839611681, 113.58668302396221 23.244659822289524)))",
  190. children: [
  191. {
  192. id: 4,
  193. label: "荔枝",
  194. color: "#2199F8",
  195. imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E8%8D%94%E6%9E%9D.png",
  196. imgName: lz,
  197. wktArr: [
  198. "POINT(113.33722309500006 23.204074978290652)",
  199. "POINT(113.53593237057355 23.188789823486065)",
  200. "POINT(113.36970447853234 23.064596505297875)",
  201. ],
  202. },
  203. {
  204. id: 55,
  205. label: "龙眼",
  206. color: "#2199F8",
  207. imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E7%99%BD%E7%B3%96.png",
  208. imgName: ly,
  209. wktArr: [
  210. "POINT(113.29900983080294 22.949956545068478)",
  211. "POINT(113.10412186488536 22.800924630297875)",
  212. "POINT(113.32384842738536 22.776086033715462)",
  213. "POINT(113.22640444442656 22.90983245840535)",
  214. ],
  215. },
  216. ],
  217. },
  218. {
  219. id: 2,
  220. label: "粮食",
  221. color: "#FF8E1C",
  222. fillColor: "rgba(83, 46, 8, 0.5)",
  223. geom: "MULTIPOLYGON (((112.42256410334443 23.14863707066071, 112.09584019992684 22.842930537988664, 112.25060416300033 22.62511471413565, 112.80278650958275 22.749307864685775, 112.75119857777094 23.13144100957107, 112.42256410334443 23.14863707066071)))",
  224. children: [
  225. {
  226. id: 5,
  227. label: "水稻",
  228. color: "#FAA53D",
  229. imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E6%8C%82%E7%BB%BF.png",
  230. imgName: sd,
  231. wktArr: [
  232. "POINT(112.70843577567298 22.969169477864167)",
  233. "POINT(112.23636397199755 22.85839626464389)",
  234. "POINT(112.35889247053002 23.008153324438585)",
  235. "POINT(112.47894566011911 22.9017143340381)",
  236. ],
  237. },
  238. {
  239. id: 6,
  240. label: "小麦",
  241. color: "#FAA53D",
  242. imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E6%97%A0%E6%A0%B8.png",
  243. imgName: xm,
  244. wktArr: [
  245. "POINT(112.36777193304151 22.73892833157863)",
  246. "POINT(112.26684873669083 22.71150357559281)",
  247. "POINT(112.65408646638161 22.84862740364581)",
  248. ],
  249. },
  250. ],
  251. },
  252. {
  253. id: 3,
  254. label: "蔬菜",
  255. color: "#25BC07",
  256. fillColor: "rgba(0, 69, 4, 0.5)",
  257. children: [
  258. {
  259. id: 7,
  260. label: "白菜",
  261. color: "#7ABB00",
  262. imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E7%99%BD%E8%8F%9C.png",
  263. imgName: bc,
  264. wktArr: [
  265. "POINT(110.34100329503417 21.516399336978793)",
  266. "POINT(113.89499662443995 22.653799122199416)",
  267. "POINT(113.9329988323152 22.653600638732314)",
  268. "POINT(113.94400024786592 22.614900553599)",
  269. ],
  270. },
  271. {
  272. id: 8,
  273. label: "萝卜",
  274. color: "#7ABB00",
  275. imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E8%90%9D%E8%8F%9C.png",
  276. imgName: lb,
  277. wktArr: [
  278. "POINT(110.34100329503417 21.516399336978793)",
  279. "POINT(113.89499662443995 22.653799122199416)",
  280. "POINT(113.9329988323152 22.653600638732314)",
  281. "POINT(113.94400024786592 22.614900553599)",
  282. ],
  283. },
  284. ],
  285. },
  286. ];
  287. const phenologyData = [
  288. {
  289. id: 1,
  290. label: "果类",
  291. color: "#51B2FF",
  292. fillColor: "rgba(5, 49, 84, 0.5)",
  293. geom: "MULTIPOLYGON (((113.58668302396221 23.244659822289524, 113.32095411231998 23.24298858095617, 112.99338890476295 23.002328435946534, 113.13878785387456 22.604570799124076, 113.59503930394511 22.86862839611681, 113.58668302396221 23.244659822289524)))",
  294. children: [
  295. {
  296. id: 4,
  297. label: "荔枝",
  298. color: "#2199F8",
  299. imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E8%8D%94%E6%9E%9D.png",
  300. imgName: lz,
  301. children: [
  302. {
  303. id: 13,
  304. label: "秋梢期",
  305. color: "#58B5FF",
  306. imgName: lz,
  307. wktArr: [
  308. "POINT(113.33722309500006 23.204074978290652)",
  309. "POINT(113.53593237057355 23.188789823486065)",
  310. ],
  311. },
  312. {
  313. id: 14,
  314. label: "膨果期",
  315. color: "#1688E3",
  316. imgName: lz,
  317. wktArr: [
  318. "POINT(113.32095411231998 23.24298858095617)",
  319. ],
  320. },
  321. {
  322. id: 15,
  323. label: "成熟期",
  324. color: "#3D8CCB",
  325. imgName: lz,
  326. wktArr: [
  327. "POINT(113.36970447853234 23.064596505297875)",
  328. ],
  329. },
  330. ],
  331. },
  332. {
  333. id: 55,
  334. label: "龙眼",
  335. color: "#2199F8",
  336. imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E7%99%BD%E7%B3%96.png",
  337. imgName: ly,
  338. children: [
  339. {
  340. id: 16,
  341. label: "秋梢期",
  342. color: "#5986AA",
  343. imgName: ly,
  344. wktArr: [
  345. "POINT(113.29900983080294 22.949956545068478)",
  346. "POINT(113.10412186488536 22.800924630297875)",
  347. ],
  348. },
  349. {
  350. id: 17,
  351. label: "膨果期",
  352. color: "#79ABD3",
  353. imgName: ly,
  354. wktArr: [
  355. "POINT(113.32384842738536 22.776086033715462)",
  356. "POINT(113.22640444442656 22.90983245840535)",
  357. ],
  358. },
  359. ],
  360. },
  361. ],
  362. },
  363. {
  364. id: 2,
  365. label: "粮食",
  366. color: "#FF8E1C",
  367. fillColor: "rgba(83, 46, 8, 0.5)",
  368. geom: "MULTIPOLYGON (((112.42256410334443 23.14863707066071, 112.09584019992684 22.842930537988664, 112.25060416300033 22.62511471413565, 112.80278650958275 22.749307864685775, 112.75119857777094 23.13144100957107, 112.42256410334443 23.14863707066071)))",
  369. children: [
  370. {
  371. id: 5,
  372. label: "水稻",
  373. color: "#FAA53D",
  374. imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E6%8C%82%E7%BB%BF.png",
  375. imgName: sd,
  376. children: [
  377. {
  378. id: 10,
  379. label: "拔节期",
  380. color: "#985400",
  381. imgName: sd,
  382. wktArr: [
  383. "POINT(112.36777193304151 22.73892833157863)",
  384. ],
  385. },
  386. {
  387. id: 11,
  388. label: "孕穗期",
  389. color: "#512D00",
  390. imgName: sd,
  391. wktArr: [
  392. "POINT(112.26684873669083 22.71150357559281)",
  393. ],
  394. },
  395. {
  396. id: 12,
  397. label: "抽穗期",
  398. color: "#DD871D",
  399. imgName: sd,
  400. wktArr: [
  401. "POINT(112.65408646638161 22.84862740364581)",
  402. ],
  403. },
  404. ],
  405. },
  406. {
  407. id: 6,
  408. label: "小麦",
  409. color: "#FAA53D",
  410. imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E6%97%A0%E6%A0%B8.png",
  411. imgName: xm,
  412. children: [
  413. {
  414. id: 18,
  415. label: "拔节期",
  416. color: "#FAA53D",
  417. imgName: xm,
  418. wktArr: [
  419. "POINT(112.36777193304151 22.73892833157863)",
  420. ],
  421. },
  422. ],
  423. },
  424. ],
  425. },
  426. {
  427. id: 3,
  428. label: "蔬菜",
  429. color: "#25BC07",
  430. fillColor: "rgba(0, 69, 4, 0.5)",
  431. children: [
  432. {
  433. id: 7,
  434. label: "白菜",
  435. color: "#7ABB00",
  436. imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E7%99%BD%E8%8F%9C.png",
  437. imgName: bc,
  438. children: [
  439. {
  440. id: 19,
  441. label: "拔节期",
  442. color: "#7ABB00",
  443. imgName: bc,
  444. wktArr: [
  445. "POINT(110.34100329503417 21.516399336978793)",
  446. "POINT(113.89499662443995 22.653799122199416)",
  447. "POINT(113.9329988323152 22.653600638732314)",
  448. "POINT(113.94400024786592 22.614900553599)",
  449. ],
  450. },
  451. ],
  452. },
  453. {
  454. id: 8,
  455. label: "萝卜",
  456. color: "#7ABB00",
  457. imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E8%90%9D%E8%8F%9C.png",
  458. imgName: lb,
  459. children: [
  460. {
  461. id: 20,
  462. label: "拔节期",
  463. color: "#7ABB00",
  464. imgName: lb,
  465. wktArr: [
  466. "POINT(110.34100329503417 21.516399336978793)",
  467. "POINT(113.89499662443995 22.653799122199416)",
  468. "POINT(113.9329988323152 22.653600638732314)",
  469. "POINT(113.94400024786592 22.614900553599)",
  470. ],
  471. },
  472. ],
  473. },
  474. ],
  475. },
  476. ];
  477. const treeActionData = ref(originTreeData);
  478. // 物候期分布下,当前激活的“二级”节点(只允许一个)
  479. const activePhenologySecondId = ref(null);
  480. // 树的默认展开与默认选中(展开/选中第一个“果类”及其子节点)
  481. const defaultExpandedKeys = ref();
  482. const defaultCheckedKeys = ref();
  483. // 顶部基础 tabs
  484. const baseTabs = ["作物分布", "物候期分布", "预警分布", "农场分布", "农服管理"];
  485. const activeBaseTab = ref("作物分布");
  486. const legendImg = ref("");
  487. const warningLayers = ref({});
  488. onMounted(async () => {
  489. warningMap.initMap(store.getters.userinfo.location, mapRef.value);
  490. alarmLayer = new AlarmLayer(warningMap.kmap);
  491. staticMapLayers = new StaticMapLayers(warningMap.kmap);
  492. staticMapPointLayers = new StaticMapPointLayers(warningMap.kmap);
  493. distributionLayer = new DistributionLayer(warningMap.kmap);
  494. await getSpeciesListData();
  495. // 作物分布默认选中
  496. handleDistributionTreeDefault()
  497. await handleDistributionLayer();
  498. eventBus.emit("warningMap:init", warningMap.kmap);
  499. // 图例数据
  500. eventBus.on("alarmList:warningLayers", (data) => {
  501. warningLayers.value = data;
  502. });
  503. // 预警分布图层联动:仅在“预警分布”tab 显示时,才在地图上显示对应图层
  504. eventBus.on("alarmList:changeMapLayer", ({ name, legendUrl }) => {
  505. // 47 行:只在 activeBaseTab === '预警分布' 时显示预警列表
  506. // 这里保持一致:只有在该 tab 下才显示地图图层,否则直接隐藏
  507. if (activeBaseTab.value !== "预警分布") {
  508. staticMapLayers && staticMapLayers.hideAll();
  509. legendImg.value = "";
  510. return;
  511. }
  512. if (legendUrl) {
  513. legendImg.value = legendUrl;
  514. staticMapLayers && staticMapLayers.showSingle(name, true);
  515. } else {
  516. legendImg.value = warningLayers.value[`${name}图例`];
  517. let text = "";
  518. if (name === "日间温度") {
  519. text = "从化地块日温";
  520. } else if (name === "夜间温度") {
  521. text = "从化地块夜温";
  522. } else if (name === "土壤水分") {
  523. text = "从化地块水分";
  524. }
  525. if (text !== "") {
  526. staticMapLayers && staticMapLayers.showSingle(text, true);
  527. } else {
  528. staticMapLayers && staticMapLayers.hideAll();
  529. }
  530. }
  531. });
  532. // ai与地图交互
  533. eventBus.off("chat:showMapLayer", handleMapLayer);
  534. eventBus.on("chat:showMapLayer", handleMapLayer);
  535. });
  536. sessionStorage.removeItem("farmId");
  537. onUnmounted(() => {
  538. eventBus.off("alarmList:changeMapLayer");
  539. });
  540. // 作物分布默认选中并展开第一个节点,在地图上显示对应分布图层
  541. const handleDistributionLayer = async () => {
  542. // 默认选中并展开第一个"果类"节点,在地图上显示对应分布图层
  543. const firstCategory = treeActionData.value[0];
  544. if (firstCategory) {
  545. // 递归查找最后一层的节点(没有子节点的叶子节点)
  546. const getLastLevelNodes = (node) => {
  547. const lastLevelNodes = [];
  548. if ((!node.items || node.items.length === 0) && (!node.children || node.children.length === 0)) {
  549. lastLevelNodes.push(node);
  550. } else {
  551. const children = node.items || node.children || [];
  552. children.forEach((child) => {
  553. lastLevelNodes.push(...getLastLevelNodes(child));
  554. });
  555. }
  556. return lastLevelNodes;
  557. };
  558. const lastLevelNodes = getLastLevelNodes(firstCategory);
  559. const lastLevelIds = lastLevelNodes.map((n) => n.id);
  560. // 并发请求所有数据
  561. const promises = lastLevelIds.map((id) => getDistributionData(id));
  562. const results = await Promise.all(promises);
  563. const finalMapData = results.flat();
  564. distributionLayer.initData(finalMapData);
  565. }
  566. };
  567. // 作物分布树形结构默认展开与默认选中
  568. const handleDistributionTreeDefault = () => {
  569. defaultExpandedKeys.value = [treeActionData.value[0]?.id];
  570. defaultCheckedKeys.value = [
  571. treeActionData.value[0]?.id,
  572. ...(treeActionData.value[0]?.children?.map((c) => c.id) || []),
  573. ];
  574. };
  575. // 物候期分布默认选中并展开第一个节点,在地图上显示对应分布图层
  576. const handlePhenologyLayer = async () => {
  577. const firstCategory = treeActionData.value[0].children[0];
  578. if (firstCategory) {
  579. // 递归查找最后一层的节点(没有子节点的叶子节点)
  580. const getLastLevelNodes = (node) => {
  581. const lastLevelNodes = [];
  582. if ((!node.items || node.items.length === 0) && (!node.children || node.children.length === 0)) {
  583. lastLevelNodes.push(node);
  584. } else {
  585. const children = node.items || node.children || [];
  586. children.forEach((child) => {
  587. lastLevelNodes.push(...getLastLevelNodes(child));
  588. });
  589. }
  590. return lastLevelNodes;
  591. };
  592. const lastLevelNodes = getLastLevelNodes(firstCategory);
  593. const lastLevelIds = lastLevelNodes.map((n) => n.id);
  594. // 并发请求所有数据
  595. const promises = lastLevelIds.map((id) => getDistributionData(id));
  596. const results = await Promise.all(promises);
  597. const finalMapData = results.flat();
  598. distributionLayer.initData(finalMapData);
  599. }
  600. };
  601. // 物候期分布树形结构默认展开与默认选中
  602. const handlePhenologyTreeDefault = () => {
  603. defaultCheckedKeys.value = [
  604. treeActionData.value[0]?.children[0]?.id,
  605. ...(treeActionData.value[0]?.children[0]?.children?.map((c) => c.id) || []),
  606. ];
  607. defaultExpandedKeys.value = [treeActionData.value[0]?.children[0]?.id];
  608. };
  609. // 预警分布默认选中并展开第一个节点,在地图上显示对应分布图层
  610. const handleAlarmLayer = async () => {
  611. const firstCategory = treeActionData.value[0].children[0];
  612. if (firstCategory) {
  613. // 递归查找最后一层的节点(没有子节点的叶子节点)
  614. const getLastLevelNodes = (node) => {
  615. const lastLevelNodes = [];
  616. if ((!node.items || node.items.length === 0) && (!node.children || node.children.length === 0)) {
  617. lastLevelNodes.push(node);
  618. } else {
  619. const children = node.items || node.children || [];
  620. children.forEach((child) => {
  621. lastLevelNodes.push(...getLastLevelNodes(child));
  622. });
  623. }
  624. return lastLevelNodes;
  625. };
  626. const lastLevelNodes = getLastLevelNodes(firstCategory);
  627. const lastLevelIds = lastLevelNodes.map((n) => n.id);
  628. // 并发请求所有数据
  629. const promises = lastLevelIds.map((id) => getDistributionData(id));
  630. const results = await Promise.all(promises);
  631. const finalMapData = results.flat();
  632. distributionLayer.initData(finalMapData);
  633. }
  634. };
  635. // 预警分布树形结构默认展开与默认选中
  636. const handleAlarmTreeDefault = () => {
  637. defaultCheckedKeys.value = [
  638. treeActionData.value[0]?.children[0]?.id
  639. ];
  640. defaultExpandedKeys.value = [treeActionData.value[0]?.id];
  641. };
  642. // ai与地图交互
  643. const hideChatMapLayer = ref(true);
  644. const handleMapLayer = ({ mapName, isHome }) => {
  645. if (!isHome) {
  646. hideChatMapLayer.value = false;
  647. }
  648. staticMapPointLayers.hidePoint();
  649. staticMapLayers.hideAll();
  650. // 重置时间轴
  651. // eventBus.emit("map_click_alarm")
  652. if (mapName === "植保机") {
  653. staticMapLayers.show("分散种植", true);
  654. staticMapPointLayers.showPoint();
  655. } else if (mapName) {
  656. // staticMapLayers.show("作物种类")
  657. if (isHome) {
  658. staticMapLayers.show(mapName, true);
  659. } else {
  660. staticMapLayers.showSingle(mapName, true);
  661. }
  662. }
  663. };
  664. const toggleChatMapLayer = () => {
  665. hideChatMapLayer.value = true;
  666. eventBus.emit("chat:hideMapLayer");
  667. staticMapLayers.hideAll();
  668. };
  669. const destroyPopup = () => {
  670. eventBus.emit("map:destroyPopup");
  671. };
  672. const handleTabClick = (item) => {
  673. activeBaseTab.value = item;
  674. // 切换 Tab 时,先清空农场分布图层上的旧数据
  675. if (distributionLayer) {
  676. distributionLayer.clear();
  677. }
  678. // 所有操作前,先清空图层和选中项
  679. legendImg.value = "";
  680. staticMapLayers && staticMapLayers.hideAll();
  681. // 通知预警列表组件清空默认选中项
  682. eventBus.emit("warningHome:clearAlarm");
  683. // 使用 nextTick 确保树组件数据更新后再设置选中状态
  684. nextTick(() => {
  685. if (treeRef.value) {
  686. // 先清空所有选中项
  687. treeRef.value.setCheckedKeys([]);
  688. // 再设置新的选中项
  689. treeRef.value.setCheckedKeys(defaultCheckedKeys.value);
  690. }
  691. });
  692. switch (item) {
  693. case "作物分布":
  694. handleDistributionTreeDefault();
  695. handleDistributionLayer();
  696. break;
  697. case "物候期分布":
  698. treeActionData.value = phenologyData;
  699. handlePhenologyTreeDefault()
  700. handlePhenologyLayer();
  701. break;
  702. case "预警分布":
  703. handleAlarmTreeDefault()
  704. handleAlarmLayer();
  705. // 通知预警列表组件默认选中第一个(因子)项
  706. eventBus.emit("warningHome:activeFirstAlarmFactor");
  707. break;
  708. case "农场分布":
  709. const cropData = [
  710. {
  711. id: 4,
  712. label: "荔枝-物候期",
  713. color: "#2199F8",
  714. farmName: "荔博园",
  715. imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E8%8D%94%E6%9E%9D.png",
  716. imgName: lz,
  717. wktArr: [
  718. "POINT(113.33722309500006 23.204074978290652)",
  719. "POINT(113.53593237057355 23.188789823486065)",
  720. "POINT(113.36970447853234 23.064596505297875)",
  721. ],
  722. },
  723. {
  724. id: 55,
  725. label: "荔枝-秋梢期",
  726. color: "#FF8E1C",
  727. farmName: "荔博园",
  728. imgUrl: "https://birdseye-img.sysuimars.com/temp/pz/%E7%99%BD%E7%B3%96.png",
  729. imgName: lz,
  730. wktArr: [
  731. "POINT(113.29900983080294 22.949956545068478)",
  732. "POINT(113.22640444442656 22.90983245840535)",
  733. ],
  734. },
  735. ];
  736. // 设施图层测试数据
  737. const facilityData = [
  738. {
  739. id: 201,
  740. label: "冷链冷库",
  741. imgName: coldChainIcon,
  742. wktArr: ["POINT(113.35 23.10)"],
  743. },
  744. {
  745. id: 202,
  746. label: "加工厂",
  747. imgName: factoryIcon,
  748. wktArr: ["POINT(113.25 23.02)"],
  749. },
  750. ];
  751. distributionLayer.initData(cropData);
  752. distributionLayer.initFacilityData(facilityData);
  753. break;
  754. default:
  755. break;
  756. }
  757. };
  758. const getSpeciesListData = async () => {
  759. const res = await VE_API.species.speciesList();
  760. treeActionData.value = res.data;
  761. };
  762. const getDistributionData = async (speciesId) => {
  763. const {data} = await VE_API.agri_land_crop.queryDistribution({
  764. year: 2025,
  765. quarter: 1,
  766. speciesId
  767. });
  768. return data;
  769. };
  770. const props1 = {
  771. checkStrictly: true,
  772. };
  773. const toggleArea = (v) => {
  774. activeBoxName.value = null;
  775. const val = v[v.length - 1];
  776. if (val === "3" || val === "3186") {
  777. eventBus.emit("warningHome:toggleArea", val);
  778. }
  779. };
  780. const activeBoxName = ref(null);
  781. const toggleBox = (name) => {
  782. activeBoxName.value = name;
  783. legendImg.value = warningLayers.value[`${name}图例`];
  784. eventBus.emit("warningHome:toggleMapLayer", name);
  785. };
  786. // 搜索
  787. const locationVal = ref("");
  788. const loading = ref(false);
  789. const MAP_KEY = "CZLBZ-LJICQ-R4A5J-BN62X-YXCRJ-GNBUT";
  790. const handleSearchRes = (v) => {
  791. warningMap.setMapCenter(v);
  792. // onRest();
  793. };
  794. const locationOptions = reactive({
  795. list: [],
  796. });
  797. const remoteMethod = async (keyword) => {
  798. if (keyword) {
  799. locationOptions.list = [];
  800. loading.value = true;
  801. const params = {
  802. key: MAP_KEY,
  803. keyword,
  804. // location: location.value,
  805. location: "22.574540836684672,113.1093017627431",
  806. };
  807. await VE_API.old_mini_map.getCtiyList({ word: keyword }).then(({ data }) => {
  808. if (data && data.length) {
  809. data.forEach((item) => {
  810. item.point = item.location.lat + "," + item.location.lng;
  811. locationOptions.list.push(item);
  812. });
  813. }
  814. });
  815. VE_API.old_mini_map.search(params).then(({ data }) => {
  816. loading.value = false;
  817. data.forEach((item) => {
  818. item.point = item.location.lat + "," + item.location.lng;
  819. locationOptions.list.push(item);
  820. });
  821. });
  822. } else {
  823. locationOptions.list = [];
  824. }
  825. };
  826. // 根据节点 id 在当前树数据中计算其层级(1/2/3)及所属的二级节点 id
  827. const getNodeLevelInfo = (id) => {
  828. const roots = treeActionData.value || [];
  829. for (const root of roots) {
  830. if (root.id === id) {
  831. return { level: 1, secondId: null };
  832. }
  833. if (root.children) {
  834. for (const second of root.children) {
  835. if (second.id === id) {
  836. return { level: 2, secondId: second.id };
  837. }
  838. if (second.children) {
  839. for (const third of second.children) {
  840. if (third.id === id) {
  841. return { level: 3, secondId: second.id };
  842. }
  843. }
  844. }
  845. }
  846. }
  847. }
  848. return { level: 0, secondId: null };
  849. };
  850. const getTreeChecks = async (nodeData, data) => {
  851. const { checkedNodes } = data;
  852. let finalCheckedNodes = checkedNodes;
  853. // 物候期分布:限制"二级只能选一个,三级不限个数"
  854. if ((activeBaseTab.value === "物候期分布" || activeBaseTab.value === "预警分布") && treeRef.value) {
  855. const tree = treeRef.value;
  856. const { level, secondId } = getNodeLevelInfo(nodeData.id);
  857. if (level === 2 || level === 3) {
  858. const currentSecondId = secondId;
  859. // 判断当前这个二级分支下,是否还有被选中的节点(包含二级自己或其子级)
  860. const hasAnyCheckedInCurrentSecond = checkedNodes.some((n) => {
  861. const info = getNodeLevelInfo(n.id);
  862. return info.secondId === currentSecondId || (info.level === 2 && n.id === currentSecondId);
  863. });
  864. if (hasAnyCheckedInCurrentSecond) {
  865. // 仍有节点被选中 → 保证只有当前这个二级分支被选中,其它分支全部取消
  866. activePhenologySecondId.value = currentSecondId;
  867. const roots = treeActionData.value || [];
  868. roots.forEach((root) => {
  869. (root.children || []).forEach((second) => {
  870. if (second.id !== currentSecondId) {
  871. // 取消其它二级及其所有子级勾选
  872. tree.setChecked(second.id, false, true);
  873. } else {
  874. // 保持当前二级选中,子级按用户选择
  875. tree.setChecked(second.id, true, false);
  876. }
  877. });
  878. });
  879. } else {
  880. // 当前二级分支已经被全部取消勾选 → 清空激活记录,允许"全部不选"
  881. activePhenologySecondId.value = null;
  882. }
  883. }
  884. // 对树进行了 setChecked 操作后,重新从树组件拿一次最新的选中节点列表
  885. // 这里只需要最后一层(叶子节点 / 有 wktArr 的节点),不用父级节点
  886. const allCheckedNodes = treeRef.value.getCheckedNodes(false, true);
  887. finalCheckedNodes = allCheckedNodes.filter((n) => !n.children || n.children.length === 0 || n.wktArr);
  888. }
  889. // 任意 tab 下,最终都用当前选中的节点驱动地图渲染
  890. // 提取最后一级节点的 id 到数组(没有子节点的叶子节点)
  891. const lastLevelIds = finalCheckedNodes
  892. .filter((n) => (!n.items || n.items.length === 0) && (!n.children || n.children.length === 0))
  893. .map((n) => n.id);
  894. // 并发请求所有数据,等待所有 Promise 完成
  895. const promises = lastLevelIds.map((id) => {
  896. const node = finalCheckedNodes.find((n) => n.id === id);
  897. if (node) {
  898. return getDistributionData(node.id);
  899. }
  900. return Promise.resolve([]);
  901. });
  902. // 等待所有请求完成,并将结果扁平化
  903. const results = await Promise.all(promises);
  904. const finalMapData = results.flat();
  905. distributionLayer.initData(finalMapData);
  906. };
  907. </script>
  908. <style lang="scss" scoped>
  909. .base-container {
  910. width: 100%;
  911. height: 100vh;
  912. color: #fff;
  913. position: absolute;
  914. box-sizing: border-box;
  915. z-index: 1;
  916. ::v-deep {
  917. .focus-farm {
  918. top: 42px;
  919. }
  920. }
  921. .content {
  922. width: 100%;
  923. height: calc(100% - 74px - 48px);
  924. padding: 16px 20px 0 27px;
  925. display: flex;
  926. justify-content: space-between;
  927. box-sizing: border-box;
  928. position: relative;
  929. .left,
  930. .right {
  931. width: calc(376px + 54px);
  932. height: 100%;
  933. box-sizing: border-box;
  934. // display: flex;
  935. }
  936. .right {
  937. // width: 395px;
  938. width: 376px;
  939. overflow: auto;
  940. position: relative;
  941. .list {
  942. width: 100%;
  943. height: 100%;
  944. }
  945. }
  946. .chart-wrap {
  947. padding: 8px;
  948. background: #101010;
  949. border: 1px solid #444444;
  950. }
  951. .action-legend {
  952. flex: 1;
  953. padding: 0 13px;
  954. display: flex;
  955. justify-content: flex-end;
  956. align-items: baseline;
  957. ::v-deep {
  958. .el-tree {
  959. background: #232323;
  960. border: 1px solid #444444;
  961. border-radius: 5px;
  962. padding: 10px 0;
  963. --el-tree-node-content-height: 34px;
  964. --el-tree-node-hover-bg-color: rgba(255, 212, 137, 0.05);
  965. --el-tree-text-color: #ffd489;
  966. --el-tree-expand-icon-color: #ffd489;
  967. .el-checkbox {
  968. --el-checkbox-bg-color: transparent;
  969. --el-checkbox-input-border: 1px solid #ffd489;
  970. --el-checkbox-checked-input-border-color: #ffd489;
  971. --el-checkbox-checked-bg-color: #ffd489;
  972. --el-checkbox-checked-icon-color: #000;
  973. --el-checkbox-input-border-color-hover: #ffd489;
  974. }
  975. }
  976. .el-tree-node__content {
  977. padding-right: 30px;
  978. }
  979. }
  980. .custom-tree-node {
  981. display: flex;
  982. align-items: center;
  983. justify-content: space-between;
  984. gap: 8px;
  985. }
  986. .level-legend {
  987. display: flex;
  988. align-items: center;
  989. gap: 4px;
  990. padding: 0 5px;
  991. height: 17px;
  992. background: rgba(255, 255, 255, 0.1);
  993. border-radius: 2px;
  994. font-size: 10px;
  995. .legend-dot {
  996. width: 4px;
  997. height: 4px;
  998. border-radius: 50%;
  999. }
  1000. }
  1001. }
  1002. .warning-r {
  1003. .map-legend {
  1004. position: absolute;
  1005. bottom: -33px;
  1006. left: -360px;
  1007. width: 340px;
  1008. img {
  1009. width: 340px;
  1010. opacity: 0.6;
  1011. }
  1012. }
  1013. .chat-legend {
  1014. bottom: -12px;
  1015. }
  1016. }
  1017. .base-tabs {
  1018. position: fixed;
  1019. top: 32px;
  1020. left: 390px;
  1021. display: flex;
  1022. align-items: center;
  1023. .tab-item {
  1024. padding: 7px 12px 9px;
  1025. margin-right: 28px;
  1026. text-align: center;
  1027. font-family: "PangMenZhengDao";
  1028. font-size: 16px;
  1029. color: #fff;
  1030. background: rgba(28, 36, 41, 0.8);
  1031. border-radius: 4px;
  1032. cursor: pointer;
  1033. border: 1px solid transparent;
  1034. &.active {
  1035. color: #ffdf9a;
  1036. background: rgba(19, 22, 16, 0.8);
  1037. border: 1px solid #ffd489;
  1038. }
  1039. }
  1040. }
  1041. .warning-search {
  1042. position: fixed;
  1043. right: 207px;
  1044. top: 28px;
  1045. display: flex;
  1046. align-items: center;
  1047. .focus-farm {
  1048. padding-left: 15px;
  1049. }
  1050. ::v-deep {
  1051. .el-select__wrapper {
  1052. background: #1d1d1d;
  1053. box-shadow: 0 0 0 1px rgba(255, 212, 137, 0.3) inset;
  1054. height: 50px;
  1055. line-height: 50px;
  1056. .el-select__caret,
  1057. .el-select__prefix {
  1058. color: rgba(255, 212, 137, 0.6);
  1059. }
  1060. }
  1061. .el-select__input {
  1062. color: rgba(255, 212, 137, 0.6);
  1063. }
  1064. .el-select__placeholder {
  1065. color: rgba(255, 212, 137, 0.6);
  1066. font-size: 20px;
  1067. font-family: "PangMenZhengDao";
  1068. // text-align: center;
  1069. }
  1070. }
  1071. }
  1072. .warning-top {
  1073. display: flex;
  1074. width: max-content;
  1075. align-items: center;
  1076. .top-l {
  1077. display: flex;
  1078. flex-direction: column;
  1079. align-items: center;
  1080. .type-box {
  1081. margin-top: 10px;
  1082. background: rgba(29, 29, 29, 0.54);
  1083. border: 1px solid rgba(255, 212, 137, 0.3);
  1084. border-radius: 2px;
  1085. text-align: center;
  1086. line-height: 48px;
  1087. height: 48px;
  1088. width: 184px;
  1089. }
  1090. ::v-deep {
  1091. .el-input__wrapper {
  1092. background: rgba(29, 29, 29, 0.54);
  1093. box-shadow: 0 0 0 1px rgba(255, 212, 137, 0.3) inset;
  1094. height: 50px;
  1095. line-height: 50px;
  1096. padding: 0 10px;
  1097. .el-input__inner {
  1098. color: #f7be5a;
  1099. font-size: 20px;
  1100. font-family: "PangMenZhengDao";
  1101. text-align: center;
  1102. }
  1103. }
  1104. .el-select__wrapper {
  1105. background: rgba(29, 29, 29, 0.54);
  1106. box-shadow: 0 0 0 1px rgba(255, 212, 137, 0.3) inset;
  1107. height: 50px;
  1108. line-height: 50px;
  1109. .el-select__caret {
  1110. color: #ffd489;
  1111. }
  1112. }
  1113. .el-select__placeholder {
  1114. color: #f7be5a;
  1115. font-size: 20px;
  1116. font-family: "PangMenZhengDao";
  1117. text-align: center;
  1118. }
  1119. }
  1120. }
  1121. .top-r {
  1122. display: flex;
  1123. .data-box {
  1124. cursor: pointer;
  1125. margin-left: 20px;
  1126. width: 200px;
  1127. height: 104px;
  1128. background: url("@/assets/images/warningHome/box-bg.png") no-repeat center center / 100% 100%;
  1129. display: flex;
  1130. flex-direction: column;
  1131. align-items: center;
  1132. &.active {
  1133. position: relative;
  1134. &::before {
  1135. content: "";
  1136. position: absolute;
  1137. bottom: -26px;
  1138. left: 0;
  1139. right: 0;
  1140. width: 35px;
  1141. height: 17px;
  1142. margin: 0 auto;
  1143. background: url("@/assets/images/warningHome/triangle.png") no-repeat center center / cover;
  1144. }
  1145. }
  1146. .data-value {
  1147. padding-top: 15px;
  1148. font-size: 20px;
  1149. color: rgba(255, 212, 137, 0.4);
  1150. font-family: "PangMenZhengDao";
  1151. span {
  1152. font-size: 38px;
  1153. color: #f7be5a;
  1154. padding-right: 2px;
  1155. }
  1156. }
  1157. .data-name {
  1158. color: #cecece;
  1159. font-size: 16px;
  1160. }
  1161. }
  1162. }
  1163. }
  1164. .warning-alarm {
  1165. width: 88px;
  1166. padding-top: 14px;
  1167. }
  1168. .time-wrap {
  1169. position: fixed;
  1170. bottom: 20px;
  1171. left: 20px;
  1172. width: 1080px;
  1173. height: 71px;
  1174. }
  1175. }
  1176. }
  1177. .bottom-map {
  1178. width: 100%;
  1179. height: 100vh;
  1180. position: absolute;
  1181. z-index: 0;
  1182. }
  1183. </style>
  1184. <style lang="less">
  1185. .ol-scale-line {
  1186. left: auto;
  1187. right: 435px;
  1188. bottom: 13px;
  1189. .ol-scale-line-inner {
  1190. max-width: 80px;
  1191. width: 80px !important;
  1192. color: #fff;
  1193. border-color: #fff;
  1194. }
  1195. }
  1196. .focus-farm-select {
  1197. &.el-popper.is-light {
  1198. background: #232323;
  1199. border-color: rgba(255, 212, 137, 0.3);
  1200. box-shadow: 0px 0px 12px rgba(255, 212, 137, 0.3);
  1201. .el-select-dropdown__item {
  1202. background: none;
  1203. color: rgba(255, 212, 137, 0.6);
  1204. }
  1205. .el-select-dropdown__item.is-selected {
  1206. background: rgba(255, 212, 137, 0.2);
  1207. color: #ffd489;
  1208. }
  1209. }
  1210. &.el-popper.is-light .el-popper__arrow:before {
  1211. background: #232323;
  1212. border-color: rgba(255, 212, 137, 0.3);
  1213. }
  1214. }
  1215. .ol-popup-warning {
  1216. position: relative;
  1217. width: 295px;
  1218. background: rgb(35, 35, 35, 0.86);
  1219. color: #fff;
  1220. font-size: 16px;
  1221. border-radius: 4px;
  1222. .warning-info-title {
  1223. display: flex;
  1224. padding: 6px 10px;
  1225. background: rgba(255, 255, 255, 0.05);
  1226. font-size: 18px;
  1227. border-radius: 4px 4px 0 0;
  1228. .icon {
  1229. padding-right: 6px;
  1230. }
  1231. .close {
  1232. position: absolute;
  1233. right: 12px;
  1234. top: 4px;
  1235. }
  1236. }
  1237. .info-content {
  1238. padding: 16px 20px 40px 20px;
  1239. line-height: 26px;
  1240. text-indent: 2em;
  1241. }
  1242. }
  1243. .area-cascader {
  1244. &.el-popper.is-light {
  1245. background: #232323;
  1246. border-color: rgba(255, 212, 137, 0.3);
  1247. box-shadow: 0px 0px 12px rgba(255, 212, 137, 0.3);
  1248. .el-cascader-menu {
  1249. color: rgba(255, 212, 137, 0.6);
  1250. border-color: rgba(255, 212, 137, 0.3);
  1251. }
  1252. .el-cascader-node.in-active-path,
  1253. .el-cascader-node.is-active,
  1254. .el-cascader-node.is-selectable.in-checked-path {
  1255. color: #f7be5a;
  1256. background: transparent;
  1257. }
  1258. .el-radio__input.is-checked .el-radio__inner {
  1259. background: #f7be5a;
  1260. border-color: #f7be5a;
  1261. }
  1262. .el-cascader-node:not(.is-disabled):hover,
  1263. .el-cascader-node:not(.is-disabled):focus,
  1264. .el-cascader-node:not(.is-disabled):hover {
  1265. background: rgba(255, 212, 137, 0.2);
  1266. }
  1267. }
  1268. .el-radio__inner {
  1269. background-color: rgba(255, 212, 137, 0.3);
  1270. border-color: rgba(255, 212, 137, 0.6);
  1271. }
  1272. &.el-popper.is-light .el-popper__arrow:before {
  1273. background: #232323;
  1274. border-color: rgba(255, 212, 137, 0.3);
  1275. }
  1276. }
  1277. </style>