album.vue 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923
  1. <template>
  2. <div class="album-page">
  3. <div class="album-wrap" ref="scrollContainer">
  4. <div class="barrage-title">
  5. <img src="@/assets/images/common/chart-icon.png" />
  6. 智慧农场
  7. </div>
  8. <div class="album-content">
  9. <div class="album-top" v-if="farmDetail?.name">
  10. <div class="album-img">
  11. <img src="@/assets/images/warningHome/t.png" />
  12. <!-- <img :src="farmDetail.icon" /> -->
  13. </div>
  14. <div class="garden-content">
  15. <div class="garden-name">
  16. 农场名称:{{ farmDetail.name }}
  17. <div class="tag-wrap">
  18. <div class="type-tag">{{ farmDetail.speciesName }}</div>
  19. <div class="type-tag item-type">{{ farmDetail.typeName }}</div>
  20. </div>
  21. </div>
  22. <div class="garden-desc">农场面积:{{ farmDetail.mianji }}亩</div>
  23. <div class="garden-desc">农场位置:{{ farmDetail.address }}</div>
  24. </div>
  25. </div>
  26. <div class="album-bottom">
  27. <el-affix :offset="44" target=".album-bottom">
  28. <div class="album-l">
  29. <el-menu default-active="0" class="el-menu-vertical-demo">
  30. <el-menu-item
  31. v-for="(item, index) in farmWorkList"
  32. :key="index"
  33. :index="index.toString()"
  34. :id="'menu' + index"
  35. :class="{ active: activeSection === index }"
  36. @click="scrollToSection(index)"
  37. v-show="item.menu"
  38. >
  39. <img
  40. class="menu-icon"
  41. :src="
  42. require('@/assets/images/warningHome/gallery/icon-' +
  43. item.icon +
  44. (item.statuss === 0 ? '-no' : '') +
  45. '.png')
  46. "
  47. />
  48. <div
  49. :class="[
  50. 'menu-name',
  51. {
  52. noTime: item.status === 0,
  53. onTime: item.status === 2,
  54. now: item.status === 1,
  55. },
  56. ]"
  57. >
  58. {{ item.farmWorkName }}
  59. </div>
  60. </el-menu-item>
  61. </el-menu>
  62. </div>
  63. </el-affix>
  64. <!-- <div class="export-btn">
  65. <div class="btn-item"><img src="@/assets/img/old_mini/export.png" />导出</div>
  66. </div> -->
  67. <div class="album-r" @scroll="debouncedHandleScroll2">
  68. <div
  69. class="done-card section"
  70. v-for="(card, cardI) in farmWorkList"
  71. :key="cardI"
  72. :class="{ flashing: card.status === 1 && isFlashing }"
  73. >
  74. <div class="card-dom" :id="'section' + cardI"></div>
  75. <!-- <div v-if="card.status === 1" class="log-wrap">
  76. <div class="log-box">
  77. <div class="log-title PangMenZhengDao-FONT">果园日志</div>
  78. <div class="log-content">
  79. <div class="log-desc" v-html="indicatorChartData?.content">
  80. </div>
  81. <indicatorChart
  82. :key="cardI + 'log'"
  83. :indexName="card.indexName"
  84. type="feature"
  85. :chartData="indicatorChartData"
  86. ></indicatorChart>
  87. </div>
  88. </div>
  89. </div> -->
  90. <div class="card-wrap" :class="{ noCarousel: card.status !== 0 }">
  91. <div
  92. class="card-content"
  93. :class="{ push: card.status === 1, hasBg: card.status === 2 && !card.hasBg }"
  94. >
  95. <div
  96. class="card-top"
  97. @click="showDetail(card)"
  98. :class="{ noChart: !card.indexChart.length }"
  99. >
  100. <div class="card-title serve-title">
  101. <div class="title-name">{{ card.farmWorkName }}</div>
  102. <div v-if="card.type === 1" class="status-tag standard">标准农事</div>
  103. <div v-if="card.type === 2" class="status-tag advice">推荐农事</div>
  104. <div v-if="card.type === 0" class="status-tag warning">预警农事</div>
  105. <!-- 右上角角标 -->
  106. <div v-if="card.status === 2 && card.execute === 0" class="add-btn">
  107. 未触发
  108. </div>
  109. <div
  110. v-if="card.status === 2 && card.execute === 2"
  111. class="add-btn unactive"
  112. >
  113. 未激活
  114. </div>
  115. <div v-if="card.execute === 3" class="add-btn">待执行</div>
  116. <div v-if="card.status === 0 && card.execute === 4" class="add-btn recheck">
  117. 已完成
  118. </div>
  119. <div v-if="card.status === 0 && card.reCheck === 1" class="add-btn recheck">
  120. 已复核
  121. </div>
  122. <div v-if="card.execute === 1" class="add-btn unactive">已失效</div>
  123. </div>
  124. <div class="card-desc">
  125. <span class="desc-title">触发条件:</span>
  126. {{ card.condition }}
  127. </div>
  128. <div class="card-desc">
  129. <span class="desc-title">农事编号:</span>
  130. {{ card.code }}
  131. </div>
  132. <div v-if="card.status === 2" class="card-desc">
  133. <span class="desc-title">推荐时间:</span>
  134. {{ card.solarName }}
  135. </div>
  136. <div v-if="card.status === 1" class="card-desc">
  137. <span class="desc-title">推荐时间:</span>
  138. {{ card.executeDate }}
  139. </div>
  140. <div v-if="card.status === 0" class="card-desc">
  141. <span class="desc-title">{{
  142. card.reCheck ? "复核时间:" : "执行时间:"
  143. }}</span>
  144. {{ card.executeDate }}
  145. </div>
  146. <div class="card-desc last-desc">
  147. <span class="desc-title">药物处方:</span>
  148. <div class="rescription-wrap">
  149. <div class="rescription">
  150. <span
  151. v-for="(
  152. fertilizer, fertilizerI
  153. ) in card.prescriptionList"
  154. :key="fertilizerI"
  155. >
  156. <span v-for="(pest, pestI) in fertilizer.pesticideFertilizerList" :key="'sub' + pestI">
  157. {{ pest.defaultName }}
  158. <span
  159. v-if="
  160. (pestI !== fertilizer.pesticideFertilizerList.length - 1) || (fertilizerI !== card.prescriptionList.length - 1)
  161. "
  162. >
  163. +
  164. </span>
  165. </span>
  166. </span>
  167. </div>
  168. <div class="detail-text">查看详情></div>
  169. </div>
  170. </div>
  171. <div class="card-link">
  172. <img src="@/assets/images/warningHome/expert-icon.png" />
  173. <div class="expert-name">
  174. {{ card.expertName
  175. }}<el-icon size="12" class="icon"><ArrowRightBold /></el-icon>
  176. </div>
  177. </div>
  178. </div>
  179. <chart
  180. v-if="card.status !== 2 && card.indexChart.length"
  181. :key="cardI"
  182. :indexName="card.indexName"
  183. :type="card.status !== 1 ? 'normal' : 'feature'"
  184. :chartData="card.indexChart"
  185. ></chart>
  186. </div>
  187. </div>
  188. <div v-if="card.status !== 2" :class="['over-img']">
  189. <!-- 图片列表 -->
  190. <album-carousel7d
  191. :sampleId="sampleId"
  192. :farmId="farmId"
  193. :farmWork="card"
  194. ></album-carousel7d>
  195. </div>
  196. </div>
  197. </div>
  198. </div>
  199. </div>
  200. </div>
  201. <detail-dailog></detail-dailog>
  202. </div>
  203. </template>
  204. <script setup>
  205. import { onMounted, ref, computed, onUnmounted, nextTick, onActivated, onDeactivated } from "vue";
  206. import { useStore } from "vuex";
  207. import { useRoute, useRouter } from "vue-router";
  208. import eventBus from "@/api/eventBus";
  209. import chart from "./chart.vue";
  210. import indicatorChart from "./indicatorChart.vue";
  211. const store = useStore();
  212. import AlbumCarousel7d from "./album_compoents/albumCarousel7d";
  213. import detailDailog from "./album_compoents/detailDailog";
  214. import { SET_TOKEN } from "@/store/modules/app/type";
  215. const route = useRoute();
  216. // 监听页面滚动,更新当前激活的锚点
  217. const handleScroll = () => {
  218. const scrollPosition = window.scrollY; // 加上头部偏移量
  219. farmWorkList.value.forEach((_, index) => {
  220. const section = document.getElementById(`section${index}`);
  221. if (section && section.offsetTop <= scrollPosition) {
  222. activeSection.value = index;
  223. }
  224. });
  225. };
  226. const handleRightScroll = () => {
  227. activeSection.value = null;
  228. };
  229. // 防抖函数
  230. function debounce(func, wait) {
  231. let timeout;
  232. return function (...args) {
  233. const later = () => {
  234. clearTimeout(timeout);
  235. func.apply(this, args);
  236. };
  237. clearTimeout(timeout);
  238. timeout = setTimeout(later, wait);
  239. };
  240. }
  241. const debouncedHandleScroll = debounce(handleScroll, 100);
  242. const debouncedHandleScroll2 = debounce(handleRightScroll, 500);
  243. // onMounted(() => {
  244. // window.addEventListener("scroll", debouncedHandleScroll);
  245. // // myPushChart = echarts.init(chartPushRef.value);
  246. // // myPushChart.setOption(galleryLine);
  247. // getFarmDetail(farmId);
  248. // getFarmWorkList(farmId);
  249. // });
  250. const sampleId = ref(route.query.sampleId);
  251. const farmId = ref(route.query.farmId);
  252. const indicatorChartData = ref({
  253. content: "\n从化的荔博园\n 该果园荔枝处于花芽萌动期,估算当前约为1.0,综合生长异常风险为0.0%,病虫风险为0.33%。\n (目前没有无人机飞巡监测,结果根据气象与地形条件与周边飞巡点推断获得。)\n\n",
  254. dates: [
  255. "2024-12-31",
  256. "2025-01-01",
  257. "2025-01-02",
  258. "2025-01-03",
  259. "2025-01-04",
  260. "2025-01-05",
  261. "2025-01-06",
  262. "2025-01-07",
  263. "2025-01-08",
  264. "2025-01-09",
  265. "2025-01-10",
  266. "2025-01-11",
  267. "2025-01-12",
  268. "2025-01-13",
  269. ],
  270. disease_risk: [15, 7, 12, 3, 18, 9, 14, 6, 11, 4, 0.33, 0.33, 0.33, 19],
  271. disease_risk_name: "病虫异常",
  272. growth_risk: [8, 16, 2, 10, 5, 17, 13, 1, 20, 7, 12, 3, 18, 9],
  273. growth_risk_name: "生长异常",
  274. pheno_param1: [1.0, 1.0, 1.0, 1.0, 1.0, 14, 6, 11, 4, 19, 15, 7, 12, 3],
  275. pheno_param1_name: "褪绿率",
  276. pheno_param2: [18, 9, 14, 6, 11, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
  277. pheno_param2_name: "花芽率",
  278. pheno_param3: [5, 17, 13, 1, 20, 7, 12, 3, 18, 9, 14, 6, 11, 4],
  279. pheno_param3_name: "花蕾率",
  280. });
  281. onMounted(() => {
  282. sampleId.value = 766;
  283. farmId.value = 88388;
  284. eventBus.on("MockFarmLayer:click", ({ sampleIdVal, farmIdVal }) => {
  285. sampleId.value = sampleIdVal;
  286. farmId.value = farmIdVal;
  287. getFarmDetail(farmId.value);
  288. getFarmWorkList(farmId.value);
  289. });
  290. getFarmDetail(farmId.value);
  291. getFarmWorkList(farmId.value);
  292. window.addEventListener("scroll", debouncedHandleScroll);
  293. });
  294. // onActivated(() => {
  295. // sampleId.value = route.query.sampleId;
  296. // farmId.value = route.query.farmId;
  297. // window.addEventListener("scroll", debouncedHandleScroll);
  298. // getFarmDetail(farmId.value);
  299. // getFarmWorkList(farmId.value);
  300. // });
  301. // onDeactivated(() => {
  302. // farmDetail.value = {};
  303. // farmWorkList.value = [];
  304. // window.removeEventListener("scroll", debouncedHandleScroll);
  305. // });
  306. // 移除滚动事件监听
  307. onUnmounted(() => {
  308. window.removeEventListener("scroll", debouncedHandleScroll);
  309. });
  310. // 农场详情
  311. const farmDetail = ref({});
  312. const getFarmDetail = async (id) => {
  313. VE_API.mini_farm.fetchFarmDetail({ id }).then(({ data }) => {
  314. farmDetail.value = data;
  315. });
  316. };
  317. // 农事列表
  318. const farmWorkList = ref([]);
  319. const getFarmWorkList = (farmId) => {
  320. VE_API.mini_farm.fetchFarmWorkList({ farmId }).then(({ data }) => {
  321. getSecondLastIndex(data);
  322. // farmWorkList.value = data;
  323. nextTick(() => {
  324. initScrollToSection(secondLastIndex.value);
  325. });
  326. setTimeout(() => {
  327. startFlashing();
  328. }, 100);
  329. });
  330. };
  331. const activeSection = ref(0);
  332. const scrollContainer = ref(null);
  333. // 点击左侧菜单项,滚动到对应内容
  334. const scrollToSection = (index) => {
  335. // const section = farmWorkList.value[index];
  336. const sectionElement = document.getElementById(`section${index}`);
  337. if (sectionElement) {
  338. sectionElement.scrollIntoView({ behavior: "smooth" });
  339. activeSection.value = index;
  340. setTimeout(() => {
  341. // 获取滚动容器的当前滚动位置
  342. let scrollTop = scrollContainer.value.scrollTop;
  343. scrollTop += 44; // 加多 44px,头部的高度
  344. // 滚动至目标位置
  345. scrollContainer.value.scrollTop = scrollTop;
  346. }, 300);
  347. }
  348. };
  349. // 点击左侧菜单项,滚动到对应内容
  350. const initScrollToSection = (index) => {
  351. const menuElement = document.getElementById(`menu${index}`);
  352. if (menuElement) {
  353. menuElement.scrollIntoView({ behavior: "smooth" });
  354. activeSection.value = index;
  355. setTimeout(() => {
  356. scrollToSection(index);
  357. }, 0);
  358. }
  359. };
  360. const secondLastIndex = ref(-1); // 初始化索引值
  361. const getSecondLastIndex = (data) => {
  362. // 过滤出 status 为 2 的项
  363. const filteredItems = data.filter((item) => item.status === 1);
  364. // 获取倒数第二项
  365. if (filteredItems.length >= 1) {
  366. const secondLastItem = filteredItems[filteredItems.length - 1];
  367. // 获取该项在原数组中的索引
  368. secondLastIndex.value = data.indexOf(secondLastItem);
  369. const lastTwoItems = filteredItems.slice(-1);
  370. farmWorkList.value = data.map((item) => {
  371. // 如果是最后两项之一,则添加 feature 属性
  372. if (lastTwoItems.includes(item)) {
  373. return { ...item, hasBg: true };
  374. }
  375. return item;
  376. });
  377. } else {
  378. secondLastIndex.value = -1; // 如果没有足够的项,设置为 -1
  379. }
  380. };
  381. const isFlashing = ref(false);
  382. const startFlashing = () => {
  383. isFlashing.value = true;
  384. // 使用 setTimeout 在一段时间后停止闪动
  385. setTimeout(() => {
  386. isFlashing.value = false;
  387. }, 3000); // 3 秒后停止闪动
  388. };
  389. // 显示详情
  390. const showDetail = (card) => {
  391. const pageParams = {
  392. activeIndex: activeSection.value,
  393. card,
  394. };
  395. eventBus.emit("detailDialog:showDialog", pageParams);
  396. };
  397. </script>
  398. <style lang="scss" scoped>
  399. .album-page {
  400. position: relative;
  401. width: 100%;
  402. height: calc(100% - 30px);
  403. overflow: hidden;
  404. margin-top: 34px;
  405. background: #232323;
  406. border: 1px solid #666666;
  407. border-radius: 4px;
  408. .album-wrap {
  409. width: 100%;
  410. height: 100%;
  411. .barrage-title {
  412. height: 44px;
  413. line-height: 44px;
  414. text-align: center;
  415. font-size: 17px;
  416. font-weight: bold;
  417. border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  418. width: 100%;
  419. position: sticky;
  420. background: #232323;
  421. top: 0;
  422. left: 0;
  423. z-index: 9;
  424. .title-icon {
  425. cursor: pointer;
  426. position: absolute;
  427. left: 16px;
  428. top: 13px;
  429. }
  430. }
  431. .album-content {
  432. height: calc(100% - 44px);
  433. // overflow: auto;
  434. // margin-top: 45px;
  435. .album-top {
  436. display: flex;
  437. padding: 12px 10px 16px 10px;
  438. width: 100%;
  439. overflow: hidden;
  440. box-sizing: border-box;
  441. .album-img {
  442. img {
  443. width: 78px;
  444. height: 78px;
  445. object-fit: cover;
  446. border-radius: 6px;
  447. }
  448. }
  449. .garden-content {
  450. padding-left: 12px;
  451. display: flex;
  452. flex-direction: column;
  453. justify-content: center;
  454. .garden-name {
  455. font-weight: bold;
  456. font-size: 16px;
  457. color: #fff;
  458. display: flex;
  459. align-items: center;
  460. flex-wrap: wrap;
  461. .tag-wrap {
  462. display: flex;
  463. flex-wrap: wrap;
  464. flex: 1;
  465. margin-left: 6px;
  466. }
  467. .type-tag {
  468. margin-top: 2px;
  469. font-weight: normal;
  470. margin-left: 4px;
  471. padding: 0 6px;
  472. height: 21px;
  473. line-height: 21px;
  474. border-radius: 2px;
  475. border: 0.5px solid #ffd489;
  476. font-size: 12px;
  477. color: #ffd489;
  478. }
  479. }
  480. .garden-desc {
  481. padding-top: 4px;
  482. font-size: 13px;
  483. color: #9f9f9f;
  484. }
  485. }
  486. }
  487. .album-camera {
  488. width: 100%;
  489. padding: 0 10px 10px;
  490. box-sizing: border-box;
  491. position: relative;
  492. .tips-text {
  493. position: absolute;
  494. left: calc(50% + 20px);
  495. top: 8px;
  496. height: 17px;
  497. padding: 1px 5px 2px 8px;
  498. color: #fff;
  499. font-size: 12px;
  500. border-radius: 24px 20px 20px 0;
  501. line-height: 18px;
  502. background: linear-gradient(45deg, #00d4ff, #008eff);
  503. }
  504. img {
  505. width: 100%;
  506. }
  507. }
  508. .album-bottom {
  509. display: flex;
  510. // height: calc(100% - 106px);
  511. position: relative;
  512. background: rgba(73, 73, 73, 0.3);
  513. height: calc(100% - 105px);
  514. overflow: hidden;
  515. .export-btn {
  516. position: fixed;
  517. z-index: 999;
  518. left: 0;
  519. bottom: 0px;
  520. height: 60px;
  521. padding-top: 10px;
  522. background: rgba(73, 73, 73, 0.3);
  523. .btn-item {
  524. font-size: 14px;
  525. color: #fff;
  526. display: flex;
  527. align-items: center;
  528. justify-content: center;
  529. background: linear-gradient(45deg, #00d4ff, #008eff);
  530. width: 98px;
  531. height: 36px;
  532. }
  533. img {
  534. width: 24px;
  535. }
  536. }
  537. .album-l {
  538. width: 98px;
  539. // height: calc(100vh - 114px);
  540. height: 100%;
  541. overflow: auto;
  542. background: rgba(73, 73, 73, 0.3);
  543. border-radius: 0 4px 4px 0;
  544. .menu-icon {
  545. width: 16px;
  546. margin-right: 4px;
  547. }
  548. .menu-name {
  549. max-width: 80px;
  550. white-space: nowrap;
  551. overflow: hidden;
  552. text-overflow: ellipsis;
  553. }
  554. ::v-deep {
  555. .el-menu {
  556. background: rgba(73, 73, 73, 0.3);
  557. border-right: 0;
  558. .el-menu-item {
  559. height: 32px;
  560. line-height: 32px;
  561. justify-content: center;
  562. color: #cecece;
  563. margin: 10px 0;
  564. padding: 4px;
  565. &:hover {
  566. background: transparent;
  567. }
  568. &.is-active {
  569. background: transparent;
  570. color: #cecece;
  571. .menu-name {
  572. // color: #666666;
  573. }
  574. }
  575. &.active {
  576. background: #232323;
  577. color: #f0ac37;
  578. .menu-name {
  579. color: #f0ac37;
  580. }
  581. }
  582. }
  583. }
  584. }
  585. .noTime {
  586. // color: #cccccc;
  587. }
  588. .now {
  589. color: rgba(33, 153, 248, 1);
  590. }
  591. .onTime {
  592. color: rgba(255, 212, 137, 0.6);
  593. }
  594. }
  595. ::v-deep {
  596. .el-affix {
  597. background: rgba(73, 73, 73, 0.3);
  598. border-radius: 0 4px 4px 0;
  599. width: 98px !important;
  600. height: 100%;
  601. & > div {
  602. height: 100%;
  603. }
  604. }
  605. }
  606. .album-r {
  607. padding: 0 10px 34px 10px;
  608. flex: 1;
  609. background: #232323;
  610. height: 100%;
  611. overflow: auto;
  612. box-sizing: border-box;
  613. .common-btn {
  614. background: #f7be5a;
  615. border-radius: 4px;
  616. color: #fff;
  617. padding: 8px 10px;
  618. text-align: center;
  619. }
  620. .card-wrap {
  621. // border: 1px solid #FFDA66;
  622. border-radius: 8px;
  623. // padding: 8px 8px;
  624. position: relative;
  625. z-index: 2;
  626. // margin-top: -20px;
  627. &.noCarousel {
  628. padding: 0;
  629. // margin-top: 12px;
  630. // padding-top: 10px;
  631. border: none;
  632. .card-top .card-link {
  633. top: 24px;
  634. }
  635. }
  636. }
  637. .card-content {
  638. background: rgba(105, 73, 13, 0.1);
  639. border-radius: 8px;
  640. padding: 0 8px 8px;
  641. border: 1px solid #ffda66;
  642. &.push {
  643. padding: 0 8px 12px 8px;
  644. // margin-bottom: 8px;
  645. // border: 1px solid rgba(102, 102, 102, 0.38);
  646. }
  647. &.hasBg {
  648. padding: 0 8px 12px 8px;
  649. background: #232323;
  650. border: 1px solid rgba(102, 102, 102, 0.38);
  651. .card-top {
  652. border-bottom: none;
  653. padding-bottom: 0;
  654. }
  655. }
  656. .card-top {
  657. cursor: pointer;
  658. padding-bottom: 12px;
  659. border-bottom: 1px solid rgba(255, 238, 208, 0.4);
  660. position: relative;
  661. &.noChart {
  662. border-bottom: 0;
  663. padding-bottom: 0;
  664. }
  665. .card-title {
  666. display: flex;
  667. align-items: center;
  668. padding-bottom: 8px;
  669. .serve-btn {
  670. padding: 3px 10px;
  671. background: #f7be5a;
  672. border-radius: 22px;
  673. color: #fff;
  674. text-align: center;
  675. }
  676. .title-name {
  677. color: #fff;
  678. font-size: 16px;
  679. padding-right: 8px;
  680. font-weight: 600;
  681. }
  682. img {
  683. width: 24px;
  684. }
  685. .status-tag {
  686. color: #f3a302;
  687. font-size: 12px;
  688. padding: 2px 6px;
  689. border-radius: 2px;
  690. border: 0.2px solid transparent;
  691. &.blue {
  692. color: #f7be5a;
  693. background: rgba(33, 153, 248, 0.2);
  694. }
  695. &.good-wrap {
  696. margin-left: 4px;
  697. display: flex;
  698. align-items: center;
  699. .good {
  700. margin-left: 3px;
  701. width: 13px;
  702. }
  703. }
  704. &.standard {
  705. color: #f7be5a;
  706. border-color: #ffd489;
  707. }
  708. &.advice {
  709. color: rgba(252, 167, 3, 0.9);
  710. background: rgba(255, 220, 104, 0.38);
  711. }
  712. &.warning {
  713. color: #ff4221;
  714. background: rgba(255, 175, 160, 0.24);
  715. }
  716. }
  717. &.serve-title {
  718. padding: 12px 0 8px 0;
  719. display: flex;
  720. align-items: center;
  721. position: relative;
  722. .add-btn {
  723. position: absolute;
  724. right: -8px;
  725. top: 0;
  726. background: #f7be5a;
  727. color: #fff;
  728. font-size: 12px;
  729. border-radius: 0 8px 0 8px;
  730. padding: 1px 6px;
  731. &.unactive {
  732. background: #494949;
  733. color: #9f9f9f;
  734. }
  735. }
  736. .tag {
  737. display: flex;
  738. align-items: center;
  739. color: #ff7000;
  740. font-size: 10px;
  741. .desc {
  742. position: relative;
  743. left: -4px;
  744. }
  745. .photo-grid {
  746. display: flex;
  747. .photo {
  748. position: relative;
  749. img {
  750. width: 18px; /* 示例宽度,你可以根据需要调整 */
  751. height: 18px;
  752. object-fit: cover;
  753. border-radius: 50%;
  754. display: block; /* 去除图片底部的空白间隙 */
  755. }
  756. }
  757. }
  758. }
  759. }
  760. }
  761. .card-desc {
  762. color: #9f9f9f;
  763. font-size: 12px;
  764. line-height: 18.2px;
  765. .desc-title {
  766. color: #494949;
  767. }
  768. .rescription-wrap {
  769. display: flex;
  770. align-items: center;
  771. .detail-text {
  772. color: #f7be5a;
  773. padding-left: 6px;
  774. }
  775. }
  776. .rescription {
  777. max-width: 100px;
  778. white-space: nowrap;
  779. overflow: hidden;
  780. text-overflow: ellipsis;
  781. }
  782. }
  783. .card-link {
  784. display: flex;
  785. flex-direction: column;
  786. align-items: center;
  787. justify-content: center;
  788. color: #a46700;
  789. font-size: 12px;
  790. position: absolute;
  791. right: 6px;
  792. top: 20px;
  793. .expert-name {
  794. background: #ffd489;
  795. border-radius: 4px;
  796. padding: 2px 6px 3px 10px;
  797. margin-top: 4px;
  798. display: flex;
  799. align-items: center;
  800. }
  801. img {
  802. width: 64px;
  803. }
  804. .icon {
  805. padding-right: 2px;
  806. }
  807. }
  808. }
  809. .card-chart {
  810. padding: 8px 4px 0 4px;
  811. height: 130px;
  812. }
  813. }
  814. .done-card {
  815. margin-bottom: 14px;
  816. }
  817. .card-dom {
  818. position: relative;
  819. // top: -50px;
  820. }
  821. .over-img {
  822. transition: all 0.2s ease-in-out;
  823. position: relative;
  824. z-index: 3;
  825. ::v-deep {
  826. img {
  827. border-radius: 8px;
  828. }
  829. }
  830. }
  831. .log-wrap {
  832. padding: 4px 0 10px 0;
  833. .log-box {
  834. // background: #fff8e0;
  835. border-radius: 8px;
  836. border: 0.5px solid #ffd489;
  837. .log-title {
  838. position: relative;
  839. top: -4px;
  840. background: url("@/assets/images/warningHome/log-bg.png") no-repeat top center / cover;
  841. width: 74px;
  842. height: 32px;
  843. line-height: 26px;
  844. text-align: center;
  845. font-size: 14px;
  846. color: #fff;
  847. }
  848. .log-content {
  849. padding-bottom: 10px;
  850. color: #ffd489;
  851. .log-desc {
  852. padding: 0 10px;
  853. font-size: 12px;
  854. }
  855. }
  856. }
  857. }
  858. }
  859. }
  860. .flashing {
  861. position: relative;
  862. &::after {
  863. content: "";
  864. position: absolute;
  865. top: 0;
  866. left: -2px;
  867. width: 100%;
  868. height: calc(100% - 2px);
  869. border: 2px solid rgba(255, 238, 208, 0.1);
  870. animation: flash 0.4s infinite alternate;
  871. border-radius: 8px;
  872. pointer-events: none;
  873. }
  874. }
  875. @keyframes flash {
  876. 0% {
  877. box-shadow: 0 0 5px #f7be5a;
  878. border-color: #f7be5a;
  879. }
  880. 100% {
  881. box-shadow: 0 0 20px #f7be5a;
  882. border: 2px solid #f7be5a;
  883. }
  884. }
  885. }
  886. .farm-icon {
  887. position: fixed;
  888. bottom: 100px;
  889. left: 120px;
  890. width: 183px;
  891. height: 45px;
  892. z-index: 10;
  893. }
  894. }
  895. }
  896. </style>