index有认养管理.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096
  1. <template>
  2. <div class="base-container no-events">
  3. <fnHeader showDate></fnHeader>
  4. <div class="content">
  5. <navigation @handleTab="handleTab"></navigation>
  6. <div class="left yes-events">
  7. <tool-list direction="left" :list="leftToolList" @handleActive="handleActiveLeft"></tool-list>
  8. <component :is="components[currentComponent]" />
  9. <!-- 箭头 -->
  10. <div class="arrow" @click="handleShrink('left')">
  11. <el-icon class="icon" color="#141414"><DArrowLeft /></el-icon>
  12. </div>
  13. </div>
  14. <div class="home-bottom">
  15. <div class="garden-file" :class="{ isShrink: isShrink }">
  16. <home-file></home-file>
  17. </div>
  18. </div>
  19. <div class="right yes-events">
  20. <div class="list adopt-list-wrap">
  21. <chart-box name="认养管理" arrow="">
  22. <el-tabs v-model="activeName" class="demo-tabs">
  23. <el-tab-pane label="认养列表" name="认养列表">
  24. <adopt-list></adopt-list>
  25. </el-tab-pane>
  26. <el-tab-pane label="客户列表" name="客户列表">
  27. <client-list></client-list>
  28. </el-tab-pane>
  29. <el-tab-pane label="认养申请" name="认养申请">
  30. <apply-list></apply-list>
  31. </el-tab-pane>
  32. <el-tab-pane label="确认地址" name="确认地址">
  33. <address-list></address-list>
  34. </el-tab-pane>
  35. </el-tabs>
  36. </chart-box>
  37. </div>
  38. </div>
  39. <!-- 图例 -->
  40. <!-- <img class="legend yes-events" src="@/assets/images/home/legend-img.png" alt="" /> -->
  41. <div v-if="legendArr && legendArr.length" class="map-bg map-legend yes-events">
  42. <div class="item" v-for="(legend, legendI) in legendArr" :key="legendI">
  43. <span class="legend-block" :style="{background: legend.color}"></span>
  44. {{ legend.name }}
  45. </div>
  46. </div>
  47. <div v-else class="map-bg map-legend yes-events">
  48. <div class="item">
  49. <img src="@/assets/images/map/status/status-bh.png" alt="" />
  50. 病害异常
  51. </div>
  52. <div class="item">
  53. <img src="@/assets/images/map/status/status-ch.png" alt="" />
  54. 虫害异常
  55. </div>
  56. <div class="item">
  57. <img src="@/assets/images/map/status/status-zc.png" alt="" />
  58. 正常
  59. </div>
  60. <!-- <div class="item">
  61. <img src="@/assets/images/map/status/defalut-icon.png" alt="" />
  62. 无照片
  63. </div> -->
  64. </div>
  65. </div>
  66. </div>
  67. <div ref="mapRef" class="bottom-map"></div>
  68. <!-- 图片弹窗 -->
  69. <PicturePreview :imageUrl="urls" :curIndex="urlsIndex"></PicturePreview>
  70. <album-carousel></album-carousel>
  71. <PdfDialog title="果园报告"></PdfDialog>
  72. <ImageDialog title="溯源报告"></ImageDialog>
  73. <!-- 对比 -->
  74. <compareDialog></compareDialog>
  75. <div class="compare-start-btn yes-events" v-show="showCompareBtn" @click="showCompare">
  76. <img src="@/assets/images/home/compare-btn.png" alt="" />
  77. </div>
  78. <!-- 作物档案 -->
  79. <div class="file-wrap map-file" id="popup-file">
  80. <div class="file-title">
  81. <img src="@/assets/images/common/chart-yellow.png" alt="" />
  82. 作物档案
  83. <span id="tag-nh" class="tag">小农户</span>
  84. </div>
  85. <div class="overview-file">
  86. <div class="box-title">总体档案</div>
  87. <div class="base-data" id="file-overview">
  88. </div>
  89. <div class="list" id="file-text">
  90. <div class="list-item" v-for="item in photoList" :key="item.key">
  91. <div class="list-name">
  92. <img src="@/assets/images/common/title-icon.png" alt="" />
  93. {{ item.key }}
  94. </div>
  95. {{ item.statement }}
  96. </div>
  97. </div>
  98. </div>
  99. <div class="overview-file">
  100. <div class="box-title">产量信息</div>
  101. <div class="box-wrap" id="file-output">
  102. <div class="box-item">
  103. <div class="item-name"></div>
  104. <div class="item-val"></div>
  105. </div>
  106. </div>
  107. </div>
  108. <div class="overview-file">
  109. <div class="box-title">生态评估</div>
  110. <div class="box-wrap" id="file-quality">
  111. <div class="box-item">
  112. <div class="item-name"></div>
  113. <div class="item-val"></div>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. </template>
  119. <script setup>
  120. import { onMounted, onUnmounted, ref } from "vue";
  121. import config from "@/api/config.js";
  122. import timeLine from "@/components/timeLine.vue";
  123. import PicturePreview from "@/components/PicturePreview.vue";
  124. import fnHeader from "@/components/fnHeader.vue";
  125. import navigation from "@/components/navigation.vue";
  126. import chartBox from "@/components/chartBox.vue";
  127. import toolList from "@/components/toolList.vue";
  128. import fileBar from "@/components/fileBar.vue";
  129. import HomeMap from "./map/homeMap";
  130. import homePage from "./components/homePage.vue";
  131. import weatherPage from "./components/weatherPage.vue";
  132. import phenologyPage from "./components/phenologyPage.vue";
  133. import indicatorChart from "./components/indicatorChart.vue";
  134. import homeFile from "./components/homeFile - 副本副本.vue";
  135. import { useRouter } from "vue-router";
  136. import SamplePointLayer from "./map/samplePointLayer";
  137. import { useStore } from "vuex";
  138. import RegionLayer from "./map/regionLayer";
  139. import BlueRegionLayer from "./map/blueRegionLayer";
  140. import eventBus from "@/api/eventBus";
  141. import AlbumCarousel from "./album_compoents/albumCarousel.vue";
  142. import compareDialog from "./album_compoents/compareDialog.vue";
  143. import album from "./album/index.vue";
  144. import PdfDialog from "../../components/PdfDialog";
  145. import StaticMapLayers from "@/components/static_map_change/Layers.js"
  146. import adoptList from "./components/foster/adoptList.vue";
  147. import clientList from "./components/foster/clientList.vue";
  148. import applyList from "./components/foster/applyList.vue";
  149. import addressList from "./components/foster/addressList.vue";
  150. import ImageDialog from "../../components/ImageDialog";
  151. let store = useStore();
  152. const components = {
  153. homePage,
  154. weatherPage,
  155. phenologyPage,
  156. };
  157. //当前农场
  158. const currentFarm = {
  159. id: store.getters.userinfo.curFarmId,
  160. name: store.getters.userinfo.curFarmName,
  161. };
  162. const activeName = ref('认养列表')
  163. //当前区域
  164. const currentRegion = {
  165. id: null,
  166. name: null,
  167. };
  168. let homeMap = new HomeMap();
  169. let staticMapLayers = null;
  170. let samplePointLayer = null;
  171. let regionLayer = null;
  172. let blueRegionLayer = null;
  173. const router = useRouter();
  174. const mapRef = ref();
  175. onMounted(() => {
  176. homeMap.initMap("POINT(113.61448114737868 23.585550924763083)", mapRef.value);
  177. // homeMap.initMap(store.getters.userinfo.location, mapRef.value);
  178. // regionLayer = new RegionLayer(homeMap.kmap.map, currentFarm, currentRegion)
  179. samplePointLayer = new SamplePointLayer(homeMap.kmap);
  180. VE_API.warning.fetchWarningLayer({
  181. k: "feiniao_static_map",
  182. resultType: "json",
  183. }).then(({data}) => {
  184. staticMapLayers = new StaticMapLayers(homeMap.kmap, data)
  185. })
  186. blueRegionLayer = new BlueRegionLayer(homeMap.kmap);
  187. function changeStaticMapLayers(e){
  188. // staticMapLayers.
  189. }
  190. getYellow();
  191. // getFarmLog()
  192. //区域切换监听事件
  193. eventBus.on("area:id", areaId);
  194. //选项卡子项事件监听
  195. // eventBus.on("handleTabItem", handleTabItem);
  196. // 是否开启指标对比
  197. eventBus.on("compareTree", handleCompare)
  198. eventBus.on("clickToCompare:point", toggleCompare);
  199. });
  200. onUnmounted(() => {
  201. eventBus.off("area:id", areaId);
  202. // eventBus.off("handleTabItem", handleTabItem);
  203. eventBus.off("compareTree", handleCompare)
  204. eventBus.off("clickToCompare:point", toggleCompare);
  205. });
  206. function handleCompare(v) {
  207. isShrink.value = v
  208. if (v === false) {
  209. showCompareBtn.value = v
  210. }
  211. }
  212. const blueList = ref([]);
  213. const getBlueRegionList = (callback) => {
  214. let selectAll = undefined;
  215. if (regionId.value === 0) {
  216. selectAll = 1;
  217. }
  218. const areaId = selectAll ? undefined : regionId.value;
  219. VE_API.farm.blueRegionList({ farmId: organId.value, regionId: areaId, selectAll }).then(({ data }) => {
  220. blueList.value = data.map((item) => {
  221. let color = "rgba(255, 255, 255, 0.5)"; //失效区域
  222. if (item.status === 2) {
  223. //物候期风险
  224. // color = "rgba(63, 255, 53, 0.5)";
  225. color = "#2BFE00";
  226. }
  227. if (item.status === 3) {
  228. //生长异常
  229. // color = "rgba(255, 252, 61, 0.5)";
  230. color = "#FF7410";
  231. }
  232. if (item.status === 4) {
  233. //病虫害
  234. // color = "rgba(255, 73, 73, 0.5)";
  235. color = "#F82121";
  236. }
  237. return {
  238. ...item,
  239. color,
  240. };
  241. });
  242. blueRegionLayer.initData(blueList.value);
  243. callback && callback();
  244. });
  245. };
  246. // 图例
  247. const legendArr = ref([])
  248. const organId = ref(null);
  249. const regionId = ref(null);
  250. const tabName = ref("");
  251. const tabId = ref(0);
  252. eventBus.off("changePointLegend", toggleLegend)
  253. eventBus.on("changePointLegend", toggleLegend)
  254. function toggleLegend({colorObj}) {
  255. legendArr.value = colorObj?.list
  256. }
  257. //选项卡事件监听
  258. const handleTab = async ({ name, id, isUpdate, params, legend, colorObj }) => {
  259. eventBus.emit("changePointType", {legend, colorObj})
  260. legendArr.value = colorObj?.list
  261. console.log('name, id, isUpdate, params', name, id, isUpdate, params, legend, colorObj);
  262. tabName.value = name;
  263. tabId.value = id;
  264. if (id === 0) {
  265. getBlueRegionList(() => {
  266. if (isUpdate) {
  267. handleTabItem(params);
  268. }
  269. });
  270. } else {
  271. getFarmIndexReport(() => {
  272. if (isUpdate) {
  273. handleTabItem(params);
  274. }
  275. });
  276. }
  277. // 切换点位数据
  278. // samplePointLayer.changePointType(name, params)
  279. };
  280. //区域切换监听事件
  281. function areaId({ areaId, farmId }) {
  282. organId.value = farmId;
  283. regionId.value = areaId;
  284. samplePointLayer.initData(farmId, areaId);
  285. if (tabId.value === 0) {
  286. getBlueRegionList();
  287. } else {
  288. getFarmIndexReport();
  289. }
  290. }
  291. //选项卡子项事件监听
  292. const handleTabItem = (e) => {
  293. console.log('eeeeeeeeee', e, reportData.value);
  294. // if (reportData.value.blueZoneList) {
  295. // const index = reportData.value.blueZoneList.findIndex((item) => item.key === e);
  296. // let arr = [];
  297. // if (reportData.value.blueZoneList.length) {
  298. // arr = blueListConvert(reportData.value.blueZoneList[index].obj, index);
  299. // }
  300. // blueRegionLayer.initData(arr, "87");
  301. // }
  302. };
  303. const reportData = ref({});
  304. const blueListConvert = (data, index) => {
  305. const list = [];
  306. for (let key in data) {
  307. const filterData = reportData.value.blueZoneLegendList[index].list.filter((item) => item.val === key);
  308. const arr = data[key];
  309. arr.forEach((item) => {
  310. const listObj = blueList.value.filter((ele) => ele.blueZoneCode === item);
  311. const updateList = listObj.map((ele) => {
  312. return {
  313. ...ele,
  314. level: key,
  315. name: filterData[0].name,
  316. color: filterData[0].color,
  317. };
  318. });
  319. list.push(...updateList);
  320. });
  321. }
  322. return list;
  323. };
  324. const getFarmIndexReport = (callback) => {
  325. // const params = { farmId:organId.value,regionId:regionId.value, type: tabName.value };
  326. // VE_API.farm.farmIndexReport(params).then(({data,code}) => {
  327. // if (code === 0) {
  328. // reportData.value = data || {};
  329. // let arr = []
  330. // if(data.blueZoneList.length){
  331. // arr = blueListConvert(data.blueZoneList[0].obj,0)
  332. // }
  333. // blueRegionLayer.initData(arr,'87')
  334. // callback && callback()
  335. // }
  336. // });
  337. };
  338. const indicatorChartData = ref({});
  339. const blueZone = ref("ws0y1meyhxp4");
  340. const getFarmLog = () => {
  341. console.log("getfarmlog");
  342. const params = {
  343. id: null,
  344. farmId: 766,
  345. blueZone: blueZone.value,
  346. };
  347. VE_API.warning.fetchFarmLog(params).then(({ data }) => {
  348. indicatorChartData.value = data || {};
  349. eventBus.emit("chart:updateOption", data);
  350. });
  351. };
  352. const urls = ref([]);
  353. const urlsIndex = ref(0);
  354. const getYellow = () => {
  355. VE_API.home.getYellowList().then((res) => {
  356. // urls.value = res.data.map(item =>{
  357. // return {
  358. // ...item,
  359. // imgPath:config.base_img_url2+item.cloudFilename
  360. // }
  361. // })
  362. // urls.value = [
  363. // "@/assets/images/home/HB-ws0y1menggxv/HB-ws0y1menggxv2025-01-07.jpg",
  364. // "@/assets/images/home/HB-ws0y1menggxv/HB-ws0y1menggxv2025-01-08.jpg",
  365. // "@/assets/images/home/HB-ws0y1menggxv/HB-ws0y1menggxv2025-01-09.jpg",
  366. // "@/assets/images/home/HB-ws0y1menggxv/HB-ws0y1menggxv2025-01-10.jpg",
  367. // "@/assets/images/home/HB-ws0y1menggxv/HB-ws0y1menggxv2025-01-11.jpg",
  368. // "@/assets/images/home/HB-ws0y1menggxv/HB-ws0y1menggxv2025-01-12.jpg",
  369. // "@/assets/images/home/HB-ws0y1menggxv/HB-ws0y1menggxv2025-01-13.jpg",
  370. // ]
  371. });
  372. };
  373. const btnIndex = ref(null);
  374. const btnName = ref("");
  375. const handleBtn = (e) => {
  376. btnName.value = "";
  377. btnIndex.value = e;
  378. eventBus.emit("clear:area");
  379. samplePointLayer.updateAreaStatus(e === 0 ? true : false);
  380. regionLayer.resetData();
  381. samplePointLayer.resetPoint();
  382. };
  383. //点击果园日志
  384. const handleSelectArea = () => {
  385. btnName.value = "";
  386. btnIndex.value = null;
  387. eventBus.emit("clear:area");
  388. regionLayer.resetData();
  389. samplePointLayer.resetPoint();
  390. samplePointLayer.updateAreaStatus(true);
  391. };
  392. //农事点击高亮
  393. const act = ref(null);
  394. const handleAct = (v) => {
  395. act.value = v;
  396. samplePointLayer.resetPoint();
  397. if (v === 1) {
  398. regionLayer.selectAreaMultiple([
  399. { value: 2, color: "blue" },
  400. { value: 4, color: "blue1" },
  401. { value: 5, color: "blue2" },
  402. { value: 7, color: "blue" },
  403. { value: 13, color: "blue2" },
  404. ]);
  405. }
  406. if (v === 2) {
  407. regionLayer.selectAreaMultiple([
  408. { value: 1, color: "blue" },
  409. { value: 2, color: "blue1" },
  410. { value: 9, color: "blue2" },
  411. { value: 12, color: "blue2" },
  412. ]);
  413. }
  414. };
  415. //柱状图点击事件监听
  416. eventBus.on("echart:barClick", (e) => {
  417. btnName.value = "";
  418. btnIndex.value = null;
  419. eventBus.emit("clear:area");
  420. samplePointLayer.updateAreaStatus(false);
  421. const arr = ["花穗伸长", "啃食虫害", "毛毡病"];
  422. const isDraw = arr.includes(e);
  423. const index = arr.indexOf(e);
  424. if (isDraw) {
  425. if (index === 0) {
  426. regionLayer.selectAreaMultiple([
  427. { value: 0, color: "green" },
  428. { value: 1, color: "green" },
  429. { value: 2, color: "green" },
  430. { value: 3, color: "green1" },
  431. { value: 4, color: "green1" },
  432. { value: 5, color: "green2" },
  433. { value: 6, color: "green1" },
  434. { value: 7, color: "green2" },
  435. { value: 8, color: "green2" },
  436. { value: 9, color: "green" },
  437. { value: 10, color: "green" },
  438. { value: 11, color: "green1" },
  439. { value: 12, color: "green2" },
  440. { value: 13, color: "green" },
  441. { value: 14, color: "green2" },
  442. ]);
  443. } else if (index === 1) {
  444. regionLayer.selectAreaMultiple([{ value: 6, color: "red" }]);
  445. } else {
  446. regionLayer.selectAreaMultiple([
  447. { value: 12, color: "red2" },
  448. { value: 10, color: "red" },
  449. { value: 1, color: "red" },
  450. ]);
  451. }
  452. }
  453. });
  454. //黄板点击事件监听
  455. eventBus.on("click:yellowBlock", (e) => {
  456. const arr = ["113.61396985128522", "113.61390710255375", "113.61491218688275"];
  457. if (arr[0] == e) {
  458. urls.value = ["HB-ws0y1menggxv"];
  459. urlsIndex.value = 0;
  460. }
  461. if (arr[1] == e) {
  462. urls.value = ["HB-ws0y1mg0pvd"];
  463. urlsIndex.value = 3;
  464. }
  465. if (arr[2] == e) {
  466. urls.value = ["HB-ws0y1mg9wpcp"];
  467. urlsIndex.value = 6;
  468. }
  469. eventBus.emit("dialog:show", true);
  470. });
  471. const showPoint = ref(true);
  472. const showType = ref("point");
  473. eventBus.on("click:updateArea", (e) => {
  474. blueZone.value = e.value;
  475. btnName.value = e.name;
  476. regionLayer.selectArea(e.name * 1 === 0 ? 0 : e.name * 1 - 1, "blue");
  477. //getFarmLog()
  478. });
  479. const currentComponent = ref("homePage");
  480. const handleActiveLeft = (e) => {
  481. currentComponent.value = e.componentName;
  482. if (e.title === "首页") {
  483. router.push("/warningHome");
  484. }
  485. };
  486. const leftToolList = [
  487. {
  488. title: "首页",
  489. name: "home",
  490. componentName: "homePage",
  491. },
  492. {
  493. title: "气象预警",
  494. componentName: "weatherPage",
  495. },
  496. {
  497. title: "物候调节",
  498. componentName: "phenologyPage",
  499. },
  500. {
  501. title: "病虫测报",
  502. },
  503. {
  504. title: "营养评估",
  505. },
  506. ];
  507. const rightIndex = ref(0);
  508. const handleActiveRight = ({ index }) => {
  509. rightIndex.value = index;
  510. btnIndex.value = null;
  511. btnName.value = "";
  512. samplePointLayer.updateAreaStatus(false);
  513. regionLayer.resetData();
  514. samplePointLayer.resetPoint();
  515. if (index !== 0) {
  516. act.value = null;
  517. }
  518. };
  519. const hanleRightIndex = (num) => {
  520. rightIndex.value = num;
  521. eventBus.emit("tool:updateAct", num);
  522. };
  523. const rightToolList = [
  524. {
  525. title: "农事列表",
  526. index: 0,
  527. },
  528. {
  529. title: "处方分析",
  530. index: 2,
  531. },
  532. {
  533. title: "复核对比",
  534. index: 1,
  535. },
  536. ];
  537. // 跳转果园档案
  538. const toFilePage = () => {
  539. router.push("/garden-file");
  540. };
  541. // 地图图例
  542. const showMapLegend = ref(true);
  543. const handleLegend = (e) => {
  544. blueRegionLayer.toggleLayer(e);
  545. };
  546. // 对比
  547. const compareData = ref([]);
  548. const showCompareBtn = ref(false);
  549. function toggleCompare(arr) {
  550. // eventBus.emit("clickToCompare:point",{farmId:fs.get("farmId"),sampleId:fs.get("sampleId"), data: fs.getProperties()})
  551. compareData.value = [];
  552. arr.map((fs) => {
  553. compareData.value.push({ farmId: fs.get("farmId"), sampleId: fs.get("id"), data: fs.getProperties() });
  554. });
  555. console.log("compareData", compareData.value);
  556. showCompareBtn.value = compareData.value.length > 1 ? true : false;
  557. }
  558. function showCompare() {
  559. eventBus.emit("showCompareDialog", compareData.value);
  560. }
  561. const isShrink = ref(false);
  562. const isLeftShrink = ref(false);
  563. const isRightShrink = ref(false);
  564. const handleShrink = (position) => {
  565. switch (position) {
  566. case "bottom":
  567. isShrink.value = !isShrink.value;
  568. break;
  569. case "left":
  570. isLeftShrink.value = !isLeftShrink.value;
  571. break;
  572. case "rigth":
  573. isRightShrink.value = !isRightShrink.value;
  574. break;
  575. }
  576. };
  577. const photoList = ref([
  578. {key: "病虫", statement: "病虫 2025年02月19日,发现毛毡病异常1级"},
  579. {key: "异常", statement: "2025年03月17日,发现花量大异常3级"},
  580. {key: "营养", statement: "无营养异常"},
  581. ]);
  582. </script>
  583. <style lang="scss" scoped>
  584. .base-container {
  585. width: 100%;
  586. height: 100vh;
  587. color: #fff;
  588. position: absolute;
  589. box-sizing: border-box;
  590. z-index: 1;
  591. .content {
  592. width: 100%;
  593. height: calc(100% - 74px - 48px);
  594. display: flex;
  595. justify-content: space-between;
  596. box-sizing: border-box;
  597. .left,
  598. .right {
  599. width: calc(376px + 54px);
  600. height: 100%;
  601. margin-top: 10px;
  602. box-sizing: border-box;
  603. display: flex;
  604. position: relative;
  605. }
  606. .left {
  607. background: #101010;
  608. border-radius: 4px;
  609. border: 1px solid #444444;
  610. .arrow {
  611. position: absolute;
  612. right: -16px;
  613. top: calc(50% - 40px);
  614. background: #fff;
  615. width: 16px;
  616. height: 80px;
  617. line-height: 80px;
  618. border-radius: 0 5px 5px 0;
  619. text-align: center;
  620. cursor: pointer;
  621. }
  622. }
  623. .right {
  624. width: calc(376px + 54px + 10px);
  625. .adopt-list-wrap {
  626. ::v-deep {
  627. .el-tabs {
  628. height: 100%;
  629. }
  630. .el-tabs__content {
  631. height: calc(100% - 40px - 15px);
  632. position: static;
  633. }
  634. .el-tabs__item {
  635. color: #727272;
  636. }
  637. .el-tabs__active-bar {
  638. background-color: #FFFFFF;
  639. height: 1px;
  640. }
  641. .el-tabs__item.is-active {
  642. color: #fff;
  643. }
  644. .el-tabs__nav-wrap:after {
  645. height: 1px;
  646. background-color: rgba(127, 127, 127, 0.3);
  647. }
  648. .el-tabs__nav {
  649. left: 50%;
  650. transform: translateX(-50%) !important;
  651. }
  652. .el-tab-pane {
  653. height: 100%;
  654. }
  655. }
  656. }
  657. .album-r {
  658. .list-wrap {
  659. width: 375px;
  660. }
  661. }
  662. .list {
  663. width: 100%;
  664. height: 100%;
  665. .btn-wrap {
  666. width: 100%;
  667. height: 25px;
  668. line-height: 25px;
  669. margin: 10px 0;
  670. display: flex;
  671. align-items: center;
  672. justify-content: space-between;
  673. div {
  674. width: 48%;
  675. height: 100%;
  676. color: #ffd489;
  677. border: 1px solid rgba(255, 213, 137, 0.6);
  678. border-radius: 2px;
  679. text-align: center;
  680. font-size: 12px;
  681. cursor: pointer;
  682. &.active {
  683. background: #ffd489;
  684. color: #000;
  685. }
  686. }
  687. }
  688. .img-box {
  689. width: 100%;
  690. height: calc(100% - 35px);
  691. overflow: auto;
  692. }
  693. .img-box1 {
  694. width: 100%;
  695. height: calc(100% - 10px);
  696. overflow: auto;
  697. margin-top: 10px;
  698. }
  699. .img-box2 {
  700. width: 100%;
  701. height: calc(100% - 45px);
  702. overflow: auto;
  703. margin-top: 10px;
  704. }
  705. img {
  706. width: 100%;
  707. height: auto;
  708. object-fit: cover;
  709. margin-bottom: 12px;
  710. cursor: pointer;
  711. }
  712. .mt {
  713. margin-top: -12px;
  714. }
  715. .list-wrap {
  716. ::v-deep {
  717. .chart-content {
  718. padding: 16px 0 0 0;
  719. }
  720. }
  721. }
  722. }
  723. }
  724. .overflow {
  725. overflow: auto;
  726. }
  727. .home-bottom {
  728. display: flex;
  729. align-items: flex-end;
  730. width: calc(100% - 20px - 430px * 2);
  731. height: 152px;
  732. align-self: flex-end;
  733. .time-wrap {
  734. height: 85px;
  735. }
  736. .fly-icon {
  737. width: 148px;
  738. height: 100%;
  739. margin-left: 27px;
  740. }
  741. .log-box {
  742. height: 34%;
  743. width: calc(100% - 340px - 28px);
  744. margin-right: 28px;
  745. .box-name {
  746. width: 89px;
  747. height: 22px;
  748. text-align: center;
  749. line-height: 22px;
  750. border-radius: 20px;
  751. margin: 10px 0 5px 6px;
  752. cursor: pointer;
  753. background: linear-gradient(0deg, #bba269 0%, #3d3523 100%);
  754. }
  755. .log-content {
  756. font-size: 12px;
  757. line-height: 1.5;
  758. padding: 0 18px;
  759. }
  760. .chart-wrap {
  761. width: 100%;
  762. height: calc(100% - 50px);
  763. .line {
  764. margin-top: 10px;
  765. margin-bottom: 12px;
  766. }
  767. img {
  768. width: 100%;
  769. margin-bottom: 10px;
  770. }
  771. }
  772. }
  773. .garden-file {
  774. position: relative;
  775. top: 10px;
  776. // height: 30%;
  777. // min-height: 210px;
  778. // width: 640px;
  779. transition: all 0.3s;
  780. // width: 800px;
  781. // height: 320px;
  782. width: 100vw;
  783. height: 100vh;
  784. overflow: hidden;
  785. &.isShrink {
  786. height: 66px;
  787. width: 450px;
  788. overflow: hidden;
  789. .arrow {
  790. .icon {
  791. transform: rotate(90deg);
  792. }
  793. }
  794. }
  795. .arrow {
  796. position: absolute;
  797. right: 56px;
  798. top: 36px;
  799. background: #fff;
  800. height: 16px;
  801. width: 80px;
  802. line-height: 16px;
  803. border-radius: 0 0 5px 5px;
  804. text-align: center;
  805. cursor: pointer;
  806. .icon {
  807. transform: rotate(270deg);
  808. }
  809. }
  810. }
  811. .file-box {
  812. height: 25%;
  813. min-height: 210px;
  814. width: 340px;
  815. position: relative;
  816. img {
  817. width: 100%;
  818. margin-top: 12px;
  819. }
  820. .arrow-icon {
  821. top: -32px;
  822. left: 50%;
  823. position: absolute;
  824. background: #fff;
  825. width: 16px;
  826. height: 80px;
  827. line-height: 80px;
  828. border-radius: 5px 0 0 5px;
  829. text-align: center;
  830. transform: translateX(-50%) rotate(270deg);
  831. }
  832. .edit-btn {
  833. padding: 2px 24px;
  834. background: #ffd489;
  835. border-radius: 4px;
  836. color: #000;
  837. }
  838. }
  839. }
  840. .legend {
  841. position: fixed;
  842. bottom: 8px;
  843. right: 64px;
  844. // width: 525px;
  845. height: 20px;
  846. }
  847. .map-bg {
  848. position: fixed;
  849. z-index: 2;
  850. background: rgba(35, 35, 35, 0.8);
  851. border-radius: 18px;
  852. padding: 7px 16px;
  853. right: 460px;
  854. }
  855. .map-btn {
  856. top: 19px;
  857. cursor: pointer;
  858. }
  859. .map-legend {
  860. bottom: 34px;
  861. .item {
  862. display: flex;
  863. align-items: center;
  864. font-size: 14px;
  865. img {
  866. width: 16px;
  867. margin-right: 6px;
  868. }
  869. .legend-block {
  870. width: 16px;
  871. height: 16px;
  872. box-sizing: border-box;
  873. border-radius: 50%;
  874. border: 2px solid #fff;
  875. margin-right: 6px;
  876. }
  877. }
  878. .legend-title {
  879. border-bottom: 1px solid rgba(102, 102, 102, 0.35);
  880. }
  881. .item + .item {
  882. padding-top: 10px;
  883. }
  884. }
  885. }
  886. }
  887. .bottom-map {
  888. width: 100%;
  889. height: 100vh;
  890. position: absolute;
  891. z-index: 0;
  892. }
  893. .compare-start-btn {
  894. position: absolute;
  895. z-index: 2;
  896. left: 50%;
  897. transform: translateX(-50%);
  898. cursor: pointer;
  899. bottom: 106px;
  900. // right: 445px;
  901. img {
  902. height: 55px;
  903. }
  904. }
  905. </style>
  906. <style lang="less">
  907. .file-wrap {
  908. &.map-file {
  909. width: 367px;
  910. position: relative;
  911. background: url("@/assets/images/home/file-bg.png") no-repeat top center / 100% 100%;
  912. margin-left: 12px;
  913. padding: 12px;
  914. .file-title {
  915. font-size: 20px;
  916. color: #ffd489;
  917. .tag {
  918. border: 1px solid #FFD489;
  919. border-radius: 4px;
  920. font-size: 12px;
  921. display: inline-block;
  922. width: 44px;
  923. height: 20px;
  924. text-align: center;
  925. line-height: 18px;
  926. margin-left: 8px;
  927. padding: 1px 4px;
  928. }
  929. }
  930. .overview-file {
  931. padding-top: 20px;
  932. .box-title {
  933. font-size: 16px;
  934. padding-left: 13px;
  935. margin-bottom: 16px;
  936. position: relative;
  937. display: flex;
  938. justify-content: space-between;
  939. color: #fff;
  940. &::before {
  941. content: "";
  942. position: absolute;
  943. left: 0;
  944. top: 3px;
  945. width: 3px;
  946. height: 16px;
  947. background: #fff;
  948. border-radius: 11px;
  949. }
  950. }
  951. .title {
  952. color: #f3c11d;
  953. font-size: 16px;
  954. font-family: "PangMenZhengDao";
  955. margin-bottom: 20px;
  956. .big {
  957. width: 13px;
  958. height: 13px;
  959. margin: -10px 0 0 4px;
  960. }
  961. .small {
  962. width: 7px;
  963. height: 7px;
  964. margin-left: -3px;
  965. }
  966. }
  967. .base-data {
  968. background: rgba(207, 207, 207, 0.1);
  969. border-radius: 4px;
  970. padding: 6px 0;
  971. display: flex;
  972. .base-item {
  973. flex: 1;
  974. text-align: center;
  975. .label {
  976. font-size: 12px;
  977. color: #666666;
  978. }
  979. .value {
  980. padding-top: 2px;
  981. font-size: 16px;
  982. color: #ffffff;
  983. }
  984. }
  985. .base-item + .base-item {
  986. border-left: 1px solid rgba(102, 102, 102, 0.42);
  987. }
  988. }
  989. .list {
  990. margin-top: 15px;
  991. width: max-content;
  992. font-size: 14px;
  993. .list-item {
  994. color: #bbbbbb;
  995. display: flex;
  996. margin-bottom: 8px;
  997. .list-name {
  998. color: #f3c11d;
  999. margin-right: 6px;
  1000. img {
  1001. width: 17px;
  1002. height: 13px;
  1003. }
  1004. }
  1005. }
  1006. }
  1007. }
  1008. .overview-file + .overview-file {
  1009. margin-top: 8px;
  1010. }
  1011. .box-wrap {
  1012. display: flex;
  1013. .box-item {
  1014. // flex: 1;
  1015. min-width: 109px;
  1016. display: flex;
  1017. flex-direction: column;
  1018. justify-content: center;
  1019. align-items: center;
  1020. padding: 6px;
  1021. box-sizing: border-box;
  1022. background: rgba(207, 207, 207, 0.1);
  1023. border-radius: 4px;
  1024. border: 1px solid rgba(207, 207, 207, 0.1);
  1025. cursor: pointer;
  1026. .item-name {
  1027. font-size: 12px;
  1028. color: #666666;
  1029. width: max-content;
  1030. }
  1031. .item-val {
  1032. font-size: 18px;
  1033. color: #fff;
  1034. width: max-content;
  1035. padding-top: 3px;
  1036. }
  1037. &.active {
  1038. background: rgba(255, 212, 137, 0.16);
  1039. border: 1px solid #ffd489;
  1040. .item-name {
  1041. color: #bbbbbb;
  1042. }
  1043. }
  1044. }
  1045. .box-item + .box-item {
  1046. margin-left: 8px;
  1047. }
  1048. }
  1049. }
  1050. }
  1051. </style>