123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470 |
- <template>
- <div class="detail-page">
- <chart-box name="果树介绍" arrow="">
- <div class="detail-content">
- <div class="detail-main">
- <div class="bubble-box">
- <div class="bubble old">
- <span>16年</span>
- <div>树龄</div>
- </div>
- <div class="bubble pz">
- <span>桂味</span>
- <div>品种</div>
- </div>
- <div class="bubble code">
- <span>A1158</span>
- <div>唯一编码</div>
- </div>
- <div class="bubble cl">
- <span>100斤</span>
- <div>高质产量</div>
- </div>
- <div class="bubble date">
- <span>2025.06.08</span>
- <div>上市时间</div>
- </div>
- <div class="bubble zb">
- <span>92分</span>
- <div>生态指标</div>
- </div>
- </div>
- <img class="tree" src="@/assets/images/foster-home/tree.png" alt="" />
- <div class="photo-box">
- <div class="photo-title">
- <span>溯源照片</span>
- <span class="more" @click="handleMore">更多></span>
- </div>
- <div class="photo-list">
- <div class="photo-item" v-for="(item, index) in photoList" :key="index">
- <img class="img" :src="require(`@/assets/images/foster-home/tree/photo-img-${index}.jpeg`)" alt="" />
- <div class="date">{{ item.date }}</div>
- </div>
- </div>
- </div>
- </div>
- <div class="source-wrap">
- <div class="source-title">
- <sub-title name="农事记录">
- <template v-slot:title-right>
- <div class="title-right">
- 更多
- <el-icon class="sub-icon"><ArrowRight /></el-icon>
- </div>
- </template>
- </sub-title>
- </div>
- <div class="tabs">
- <div
- class="tabs-item"
- :class="{ active: active === index }"
- v-for="(item, index) in tabsList"
- :key="index"
- @click="handleActive(index)"
- >
- {{ item }}
- </div>
- </div>
- <div class="list-item" v-for="(ele, idx) in sourceList" :key="idx">
- <div class="item-flex">
- <div class="photo">
- <img src="@/assets/images/foster-home/tree/source.png" alt="" />
- <div class="date">{{ ele.date }}</div>
- </div>
- <div class="item-text">
- <div class="item-title">{{ ele.name }}</div>
- <!-- <div class="name">
- 触发原因:<span class="val">{{ ele.reason }}</span>
- </div> -->
- <div class="name">
- 农事效果:<span class="val">{{ ele.effect }}</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </chart-box>
- </div>
- </template>
- <script setup>
- import { ref } from "vue";
- import { useRouter } from "vue-router";
- import chartBox from "@/components/chartBox.vue";
- import subTitle from "@/components/subTitle.vue";
- const router = useRouter();
- const active = ref(0);
- const tabsList = ["全部", "标准", "气象"];
- const handleActive = (index) => {
- active.value = index;
- handleItem(index);
- };
- const photoList = ref([
- {
- date: "2025.06.07",
- },
- {
- date: "2025.05.28",
- },
- {
- date: "2025.05.25",
- },
- {
- date: "2025.05.22",
- },
- {
- date: "2025.05.20",
- },
- ]);
- const sourceList1 = ref([
- {
- name: "梢期根肥",
- reason: "梢期需需要营养时机",
- effect: "增强树体营养,促进新梢健壮,增强病虫抗性",
- date: "2024.07.14",
- },
- {
- name: "壮果根肥",
- reason: "果期要营养时机",
- effect: "促进果实快速膨大,提升单果重;减少生理落果与裂果,改善果实均匀度;增强抗高温/暴雨能力",
- date: "2024.05.07",
- },
- {
- name: "壮花追肥",
- reason: "花期需要营养时机",
- effect: "促进花穗健壮,提高雌花比例;增强花期抗低温/阴雨能力",
- date: "2024.03.07",
- },
- {
- name: "梢期高温干旱",
- reason: "梢期需需要营养时机",
- effect: "每日早晚树冠喷水降温(避开正午高温),以缓解高温抑制新梢生长,促进新梢抽发整齐、根系吸水效率提升",
- date: "2024.10.26",
- },
- {
- name: "果期阴雨寡照",
- reason: "果期要营养时机",
- effect: "补充叶面肥,增强光合作用,促进养分转运,避免光照不足影响,确保果实饱满、甜度高、风味佳",
- date: "2024.05.24",
- },
- {
- name: "花期连续阴雨",
- reason: "花期需要营养时机",
- effect: "雨停间隙人工施粉或放蜂授粉,轻摇树枝排出花穗积水,防止雨水冲刷花粉和霜疫霉病蔓延,确保坐果率恢复",
- date: "2024.04.01",
- },
- ]);
- const sourceList = ref([
- {
- name: "梢期根肥",
- reason: "梢期需需要营养时机",
- effect: "增强树体营养,促进新梢健壮,增强病虫抗性",
- date: "2024.07.14",
- },
- {
- name: "壮果根肥",
- reason: "果期要营养时机",
- effect: "促进果实快速膨大,提升单果重;减少生理落果与裂果,改善果实均匀度;增强抗高温/暴雨能力",
- date: "2024.05.07",
- },
- {
- name: "壮花追肥",
- reason: "花期需要营养时机",
- effect: "促进花穗健壮,提高雌花比例;增强花期抗低温/阴雨能力",
- date: "2024.03.07",
- },
- {
- name: "梢期高温干旱",
- reason: "梢期需需要营养时机",
- effect: "每日早晚树冠喷水降温(避开正午高温),以缓解高温抑制新梢生长,促进新梢抽发整齐、根系吸水效率提升",
- date: "2024.10.26",
- },
- {
- name: "果期阴雨寡照",
- reason: "果期要营养时机",
- effect: "补充叶面肥,增强光合作用,促进养分转运,避免光照不足影响,确保果实饱满、甜度高、风味佳",
- date: "2024.05.24",
- },
- {
- name: "花期连续阴雨",
- reason: "花期需要营养时机",
- effect: "雨停间隙人工施粉或放蜂授粉,轻摇树枝排出花穗积水,防止雨水冲刷花粉和霜疫霉病蔓延,确保坐果率恢复",
- date: "2024.04.01",
- },
- ]);
- const handleItem = (index) => {
- if (index === 0) {
- sourceList.value = sourceList1.value;
- }
- if (index === 1) {
- sourceList.value = sourceList1.value.slice(0, 3);
- }
- if (index === 2) {
- sourceList.value = sourceList1.value.slice(3);
- }
- };
- const handleMore = () => {
- // router.push("/photo");
- };
- </script>
- <style lang="scss" scoped>
- .detail-page {
- position: relative;
- width: 100%;
- height: 100%;
- .detail-content {
- height: 100%;
- overflow: auto;
- .detail-main {
- width: 100%;
- height: 466px;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: flex-end;
- .bubble-box {
- position: relative;
- width: 100%;
- .bubble {
- color: #fff;
- padding: 20px 24px;
- font-size: 12px;
- text-align: center;
- background: url("@/assets/images/foster-home/tree/bubble-bg.png") no-repeat center center / 100% 100%;
- span {
- font-size: 13px;
- font-weight: 500;
- }
- &.pz {
- position: absolute;
- bottom: -76px;
- left: 0;
- padding: 22px 28px;
- }
- &.old {
- position: absolute;
- left: 270px;
- bottom: -78px;
- }
- &.code {
- position: absolute;
- left: 110px;
- bottom: 0;
- padding: 38px 16px;
- }
- &.cl {
- position: absolute;
- left: 25px;
- bottom: 30px;
- padding: 24px 18px;
- }
- &.date {
- position: absolute;
- right: 60px;
- bottom: -15px;
- padding: 32px 16px;
- }
- &.zb {
- position: absolute;
- right: 40px;
- bottom: -90px;
- padding: 24px 16px;
- }
- }
- }
- .tree {
- width: 258px;
- height: 258px;
- }
- .photo-box {
- width: 100%;
- box-sizing: border-box;
- margin-top: 2px;
- margin-bottom: 22px;
- padding: 12px 8px;
- background: rgba(255, 255, 255, 0.08);
- border-radius: 12px;
- .photo-title {
- display: flex;
- justify-content: space-between;
- color: #ffffff;
- font-size: 12px;
- margin-bottom: 6px;
- .more {
- color: #bbbbbb;
- }
- }
- .photo-list {
- display: flex;
- .photo-item {
- position: relative;
- .img {
- width: 58px;
- height: 58px;
- border: 1px solid rgba(255, 255, 255, 0.6);
- border-radius: 10px;
- object-fit: cover;
- }
- .date {
- position: absolute;
- color: #dddddd;
- font-size: 10px;
- bottom: 1px;
- left: 1px;
- background: rgba(0, 0, 0, 0.6);
- width: calc(100% - 2px);
- padding: 2px 4px;
- box-sizing: border-box;
- border-radius: 0 0 10px 10px;
- }
- }
- .photo-item + .photo-item {
- margin-left: 8px;
- }
- }
- }
- }
- .source-wrap {
- background: rgba(255, 255, 255, 0.08);
- border-radius: 10px 10px 0 0;
- .source-title {
- padding: 10px 10px 0 10px;
-
- .title-right {
- background: rgba(255, 212, 137, 0.1);
- border-radius: 20px;
- font-size: 12px;
- color: #ffd489;
- padding: 2px 8px;
- display: flex;
- align-items: center;
- cursor: pointer;
- .sub-edit {
- width: 12px;
- padding-right: 4px;
- }
- .sub-icon {
- padding-left: 2px;
- }
- }
- }
- .tabs {
- background: transparent;
- border-radius: 10px 10px 0 0;
- display: flex;
- padding: 12px 11px 12px 11px;
- .tabs-item {
- padding: 6px;
- border-radius: 20px;
- color: #FFFFFF;
- flex: 1;
- text-align: center;
- background: rgba(255, 255, 255, 0.08);
- &.active {
- background: linear-gradient(180deg, #FFD887, #ED9E1E);
- color: #1D1D1D;
- }
- }
- .tabs-item + .tabs-item {
- margin-left: 8px;
- }
- }
- .item-flex {
- background: rgba(255, 255, 255, 0.04);
- padding: 12px;
- border-radius: 5px;
- .item-title {
- font-size: 16px;
- color: #FFFFFF;
- }
- }
- .list-item {
- margin-top: 12px;
- }
- }
- .item-flex {
- display: flex;
- align-items: center;
- }
- .photo {
- width: 76px;
- height: 65px;
- margin-right: 12px;
- position: relative;
- img {
- width: 100%;
- height: 100%;
- object-fit: cover;
- border-radius: 8px;
- }
- .date {
- position: absolute;
- bottom: 0;
- color: #fff;
- font-size: 10px;
- padding: 2px 13px;
- background: rgba(0, 0, 0, 0.6);
- border-radius: 0 0 8px 8px;
- backdrop-filter: blur(2px);
- }
- }
- .item-text {
- color: #999999;
- font-size: 12px;
- line-height: 1.6;
- flex: 1;
- .name {
- display: flex;
- align-items: center;
- .main-name {
- font-size: 16px;
- color: #000;
- font-weight: bold;
- padding-right: 10px;
- }
- div {
- margin-left: 5px;
- border-radius: 4px;
- font-size: 12px;
- padding: 2px 5px;
- &.mark {
- background: rgba(50, 203, 226, 0.25);
- color: #00bedb;
- }
- &.age {
- background: rgba(255, 196, 0, 0.2);
- color: #f0a400;
- }
- }
- }
- .van-ellipsis {
- width: 200px;
- }
- .txt {
- span {
- color: #000;
- }
- }
- .time {
- display: flex;
- align-items: center;
- .icon {
- margin-right: 4px;
- }
- span {
- color: #f87321;
- }
- }
- }
- }
- }
- </style>
|