album.vue 39 KB

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