treeDetail.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  1. <template>
  2. <div class="detail-page">
  3. <chart-box name="果树介绍" arrow="">
  4. <div class="detail-content">
  5. <div class="detail-main">
  6. <div class="bubble-box">
  7. <div class="bubble old">
  8. <span>16年</span>
  9. <div>树龄</div>
  10. </div>
  11. <div class="bubble pz">
  12. <span>桂味</span>
  13. <div>品种</div>
  14. </div>
  15. <div class="bubble code">
  16. <span>A1158</span>
  17. <div>唯一编码</div>
  18. </div>
  19. <div class="bubble cl">
  20. <span>100斤</span>
  21. <div>高质产量</div>
  22. </div>
  23. <div class="bubble date">
  24. <span>2025.06.08</span>
  25. <div>上市时间</div>
  26. </div>
  27. <div class="bubble zb">
  28. <span>92分</span>
  29. <div>生态指标</div>
  30. </div>
  31. </div>
  32. <img class="tree" src="@/assets/images/foster-home/tree.png" alt="" />
  33. <div class="photo-box">
  34. <div class="photo-title">
  35. <span>溯源照片</span>
  36. <span class="more" @click="handleMore">更多></span>
  37. </div>
  38. <div class="photo-list">
  39. <div class="photo-item" v-for="(item, index) in photoList" :key="index">
  40. <img class="img" :src="require(`@/assets/images/foster-home/tree/photo-img-${index}.jpeg`)" alt="" />
  41. <div class="date">{{ item.date }}</div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. <div class="source-wrap">
  47. <div class="source-title">
  48. <sub-title name="农事记录">
  49. <template v-slot:title-right>
  50. <div class="title-right">
  51. 更多
  52. <el-icon class="sub-icon"><ArrowRight /></el-icon>
  53. </div>
  54. </template>
  55. </sub-title>
  56. </div>
  57. <div class="tabs">
  58. <div
  59. class="tabs-item"
  60. :class="{ active: active === index }"
  61. v-for="(item, index) in tabsList"
  62. :key="index"
  63. @click="handleActive(index)"
  64. >
  65. {{ item }}
  66. </div>
  67. </div>
  68. <div class="list-item" v-for="(ele, idx) in sourceList" :key="idx">
  69. <div class="item-flex">
  70. <div class="photo">
  71. <img src="@/assets/images/foster-home/tree/source.png" alt="" />
  72. <div class="date">{{ ele.date }}</div>
  73. </div>
  74. <div class="item-text">
  75. <div class="item-title">{{ ele.name }}</div>
  76. <!-- <div class="name">
  77. 触发原因:<span class="val">{{ ele.reason }}</span>
  78. </div> -->
  79. <div class="name">
  80. 农事效果:<span class="val">{{ ele.effect }}</span>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </chart-box>
  88. </div>
  89. </template>
  90. <script setup>
  91. import { ref } from "vue";
  92. import { useRouter } from "vue-router";
  93. import chartBox from "@/components/chartBox.vue";
  94. import subTitle from "@/components/subTitle.vue";
  95. const router = useRouter();
  96. const active = ref(0);
  97. const tabsList = ["全部", "标准", "气象"];
  98. const handleActive = (index) => {
  99. active.value = index;
  100. handleItem(index);
  101. };
  102. const photoList = ref([
  103. {
  104. date: "2025.06.07",
  105. },
  106. {
  107. date: "2025.05.28",
  108. },
  109. {
  110. date: "2025.05.25",
  111. },
  112. {
  113. date: "2025.05.22",
  114. },
  115. {
  116. date: "2025.05.20",
  117. },
  118. ]);
  119. const sourceList1 = ref([
  120. {
  121. name: "梢期根肥",
  122. reason: "梢期需需要营养时机",
  123. effect: "增强树体营养,促进新梢健壮,增强病虫抗性",
  124. date: "2024.07.14",
  125. },
  126. {
  127. name: "壮果根肥",
  128. reason: "果期要营养时机",
  129. effect: "促进果实快速膨大,提升单果重;减少生理落果与裂果,改善果实均匀度;增强抗高温/暴雨能力",
  130. date: "2024.05.07",
  131. },
  132. {
  133. name: "壮花追肥",
  134. reason: "花期需要营养时机",
  135. effect: "促进花穗健壮,提高雌花比例;增强花期抗低温/阴雨能力",
  136. date: "2024.03.07",
  137. },
  138. {
  139. name: "梢期高温干旱",
  140. reason: "梢期需需要营养时机",
  141. effect: "每日早晚树冠喷水降温(避开正午高温),以缓解高温抑制新梢生长,促进新梢抽发整齐、根系吸水效率提升",
  142. date: "2024.10.26",
  143. },
  144. {
  145. name: "果期阴雨寡照",
  146. reason: "果期要营养时机",
  147. effect: "补充叶面肥,增强光合作用,促进养分转运,避免光照不足影响,确保果实饱满、甜度高、风味佳",
  148. date: "2024.05.24",
  149. },
  150. {
  151. name: "花期连续阴雨",
  152. reason: "花期需要营养时机",
  153. effect: "雨停间隙人工施粉或放蜂授粉,轻摇树枝排出花穗积水,防止雨水冲刷花粉和霜疫霉病蔓延,确保坐果率恢复",
  154. date: "2024.04.01",
  155. },
  156. ]);
  157. const sourceList = ref([
  158. {
  159. name: "梢期根肥",
  160. reason: "梢期需需要营养时机",
  161. effect: "增强树体营养,促进新梢健壮,增强病虫抗性",
  162. date: "2024.07.14",
  163. },
  164. {
  165. name: "壮果根肥",
  166. reason: "果期要营养时机",
  167. effect: "促进果实快速膨大,提升单果重;减少生理落果与裂果,改善果实均匀度;增强抗高温/暴雨能力",
  168. date: "2024.05.07",
  169. },
  170. {
  171. name: "壮花追肥",
  172. reason: "花期需要营养时机",
  173. effect: "促进花穗健壮,提高雌花比例;增强花期抗低温/阴雨能力",
  174. date: "2024.03.07",
  175. },
  176. {
  177. name: "梢期高温干旱",
  178. reason: "梢期需需要营养时机",
  179. effect: "每日早晚树冠喷水降温(避开正午高温),以缓解高温抑制新梢生长,促进新梢抽发整齐、根系吸水效率提升",
  180. date: "2024.10.26",
  181. },
  182. {
  183. name: "果期阴雨寡照",
  184. reason: "果期要营养时机",
  185. effect: "补充叶面肥,增强光合作用,促进养分转运,避免光照不足影响,确保果实饱满、甜度高、风味佳",
  186. date: "2024.05.24",
  187. },
  188. {
  189. name: "花期连续阴雨",
  190. reason: "花期需要营养时机",
  191. effect: "雨停间隙人工施粉或放蜂授粉,轻摇树枝排出花穗积水,防止雨水冲刷花粉和霜疫霉病蔓延,确保坐果率恢复",
  192. date: "2024.04.01",
  193. },
  194. ]);
  195. const handleItem = (index) => {
  196. if (index === 0) {
  197. sourceList.value = sourceList1.value;
  198. }
  199. if (index === 1) {
  200. sourceList.value = sourceList1.value.slice(0, 3);
  201. }
  202. if (index === 2) {
  203. sourceList.value = sourceList1.value.slice(3);
  204. }
  205. };
  206. const handleMore = () => {
  207. // router.push("/photo");
  208. };
  209. </script>
  210. <style lang="scss" scoped>
  211. .detail-page {
  212. position: relative;
  213. width: 100%;
  214. height: 100%;
  215. .detail-content {
  216. height: 100%;
  217. overflow: auto;
  218. .detail-main {
  219. width: 100%;
  220. height: 466px;
  221. display: flex;
  222. flex-direction: column;
  223. align-items: center;
  224. justify-content: flex-end;
  225. .bubble-box {
  226. position: relative;
  227. width: 100%;
  228. .bubble {
  229. color: #fff;
  230. padding: 20px 24px;
  231. font-size: 12px;
  232. text-align: center;
  233. background: url("@/assets/images/foster-home/tree/bubble-bg.png") no-repeat center center / 100% 100%;
  234. span {
  235. font-size: 13px;
  236. font-weight: 500;
  237. }
  238. &.pz {
  239. position: absolute;
  240. bottom: -76px;
  241. left: 0;
  242. padding: 22px 28px;
  243. }
  244. &.old {
  245. position: absolute;
  246. left: 270px;
  247. bottom: -78px;
  248. }
  249. &.code {
  250. position: absolute;
  251. left: 110px;
  252. bottom: 0;
  253. padding: 38px 16px;
  254. }
  255. &.cl {
  256. position: absolute;
  257. left: 25px;
  258. bottom: 30px;
  259. padding: 24px 18px;
  260. }
  261. &.date {
  262. position: absolute;
  263. right: 60px;
  264. bottom: -15px;
  265. padding: 32px 16px;
  266. }
  267. &.zb {
  268. position: absolute;
  269. right: 40px;
  270. bottom: -90px;
  271. padding: 24px 16px;
  272. }
  273. }
  274. }
  275. .tree {
  276. width: 258px;
  277. height: 258px;
  278. }
  279. .photo-box {
  280. width: 100%;
  281. box-sizing: border-box;
  282. margin-top: 2px;
  283. margin-bottom: 22px;
  284. padding: 12px 8px;
  285. background: rgba(255, 255, 255, 0.08);
  286. border-radius: 12px;
  287. .photo-title {
  288. display: flex;
  289. justify-content: space-between;
  290. color: #ffffff;
  291. font-size: 12px;
  292. margin-bottom: 6px;
  293. .more {
  294. color: #bbbbbb;
  295. }
  296. }
  297. .photo-list {
  298. display: flex;
  299. .photo-item {
  300. position: relative;
  301. .img {
  302. width: 58px;
  303. height: 58px;
  304. border: 1px solid rgba(255, 255, 255, 0.6);
  305. border-radius: 10px;
  306. object-fit: cover;
  307. }
  308. .date {
  309. position: absolute;
  310. color: #dddddd;
  311. font-size: 10px;
  312. bottom: 1px;
  313. left: 1px;
  314. background: rgba(0, 0, 0, 0.6);
  315. width: calc(100% - 2px);
  316. padding: 2px 4px;
  317. box-sizing: border-box;
  318. border-radius: 0 0 10px 10px;
  319. }
  320. }
  321. .photo-item + .photo-item {
  322. margin-left: 8px;
  323. }
  324. }
  325. }
  326. }
  327. .source-wrap {
  328. background: rgba(255, 255, 255, 0.08);
  329. border-radius: 10px 10px 0 0;
  330. .source-title {
  331. padding: 10px 10px 0 10px;
  332. .title-right {
  333. background: rgba(255, 212, 137, 0.1);
  334. border-radius: 20px;
  335. font-size: 12px;
  336. color: #ffd489;
  337. padding: 2px 8px;
  338. display: flex;
  339. align-items: center;
  340. cursor: pointer;
  341. .sub-edit {
  342. width: 12px;
  343. padding-right: 4px;
  344. }
  345. .sub-icon {
  346. padding-left: 2px;
  347. }
  348. }
  349. }
  350. .tabs {
  351. background: transparent;
  352. border-radius: 10px 10px 0 0;
  353. display: flex;
  354. padding: 12px 11px 12px 11px;
  355. .tabs-item {
  356. padding: 6px;
  357. border-radius: 20px;
  358. color: #FFFFFF;
  359. flex: 1;
  360. text-align: center;
  361. background: rgba(255, 255, 255, 0.08);
  362. &.active {
  363. background: linear-gradient(180deg, #FFD887, #ED9E1E);
  364. color: #1D1D1D;
  365. }
  366. }
  367. .tabs-item + .tabs-item {
  368. margin-left: 8px;
  369. }
  370. }
  371. .item-flex {
  372. background: rgba(255, 255, 255, 0.04);
  373. padding: 12px;
  374. border-radius: 5px;
  375. .item-title {
  376. font-size: 16px;
  377. color: #FFFFFF;
  378. }
  379. }
  380. .list-item {
  381. margin-top: 12px;
  382. }
  383. }
  384. .item-flex {
  385. display: flex;
  386. align-items: center;
  387. }
  388. .photo {
  389. width: 76px;
  390. height: 65px;
  391. margin-right: 12px;
  392. position: relative;
  393. img {
  394. width: 100%;
  395. height: 100%;
  396. object-fit: cover;
  397. border-radius: 8px;
  398. }
  399. .date {
  400. position: absolute;
  401. bottom: 0;
  402. color: #fff;
  403. font-size: 10px;
  404. padding: 2px 13px;
  405. background: rgba(0, 0, 0, 0.6);
  406. border-radius: 0 0 8px 8px;
  407. backdrop-filter: blur(2px);
  408. }
  409. }
  410. .item-text {
  411. color: #999999;
  412. font-size: 12px;
  413. line-height: 1.6;
  414. flex: 1;
  415. .name {
  416. display: flex;
  417. align-items: center;
  418. .main-name {
  419. font-size: 16px;
  420. color: #000;
  421. font-weight: bold;
  422. padding-right: 10px;
  423. }
  424. div {
  425. margin-left: 5px;
  426. border-radius: 4px;
  427. font-size: 12px;
  428. padding: 2px 5px;
  429. &.mark {
  430. background: rgba(50, 203, 226, 0.25);
  431. color: #00bedb;
  432. }
  433. &.age {
  434. background: rgba(255, 196, 0, 0.2);
  435. color: #f0a400;
  436. }
  437. }
  438. }
  439. .van-ellipsis {
  440. width: 200px;
  441. }
  442. .txt {
  443. span {
  444. color: #000;
  445. }
  446. }
  447. .time {
  448. display: flex;
  449. align-items: center;
  450. .icon {
  451. margin-right: 4px;
  452. }
  453. span {
  454. color: #f87321;
  455. }
  456. }
  457. }
  458. }
  459. }
  460. </style>