treeAlbumPopup.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <template>
  2. <up-popup :show="showPopup" mode="center" round="20" @close="handleClose">
  3. <view class="album-popup">
  4. <view class="album-title">
  5. <view class="name">
  6. 果树相册
  7. <view class="sub-name">无人机实时监测生长情况</view>
  8. </view>
  9. <image class="icon" :src="`${config.BASIC_IMG}img/treePage/drone-icon-popup.png`"></image>
  10. </view>
  11. <view class="album-cont">
  12. <view class="time-line">
  13. <view class="time-item" v-for="item in 6" :key="item">
  14. <text :style="{color:item==6?'#2199F8':'#777777'}">07/28</text>
  15. <view class="dot" :style="{background:item==6?'#2199F8':'#777777'}"></view>
  16. <text class="today" v-if="item==6">今</text>
  17. </view>
  18. </view>
  19. <view class="swiper-wrap">
  20. <swiper class="swiper">
  21. <swiper-item v-for="(item,index) in list1">
  22. <image class="img" :src="item"></image>
  23. </swiper-item>
  24. </swiper>
  25. <view class="arrow left">
  26. <up-icon name="arrow-left" bold color="#F0D09C" size="22"></up-icon>
  27. </view>
  28. <view class="arrow right">
  29. <up-icon name="arrow-right" bold color="#F0D09C" size="22"></up-icon>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </up-popup>
  35. </template>
  36. <script setup>
  37. import config from "@/api/config.js"
  38. import {
  39. ref,
  40. watch
  41. } from "vue";
  42. const props = defineProps({
  43. show: {
  44. type: Boolean,
  45. defalut: false,
  46. },
  47. });
  48. const showPopup = ref(false);
  49. const handleClose = ()=>{
  50. showPopup.value = false
  51. }
  52. const list1 = ref([
  53. 'https://cdn.uviewui.com/uview/album/1.jpg',
  54. 'https://cdn.uviewui.com/uview/album/2.jpg',
  55. 'https://cdn.uviewui.com/uview/album/3.jpg',
  56. ]);
  57. watch(
  58. () => props.show,
  59. () => {
  60. showPopup.value = true;
  61. }
  62. );
  63. </script>
  64. <style lang="scss" scoped>
  65. .album-popup {
  66. width: 92vw;
  67. .album-title {
  68. padding: 30rpx 0 46rpx 30rpx;
  69. position: relative;
  70. background-image: linear-gradient(120deg, #79C4FF 13%, #FFFFFF 66%);
  71. border-radius: 40rpx 40rpx 0 0;
  72. line-height: 44rpx;
  73. .name {
  74. color: #004275;
  75. font-size: 48rpx;
  76. font-family: 'PangMenZhengDao';
  77. .sub-name {
  78. font-size: 24rpx;
  79. }
  80. }
  81. .icon {
  82. position: absolute;
  83. top: -100rpx;
  84. right: -26rpx;
  85. width: 364rpx;
  86. height: 300rpx;
  87. }
  88. }
  89. .album-cont {
  90. position: relative;
  91. z-index: 2;
  92. margin-top: -34rpx;
  93. padding: 32rpx 0 20rpx;
  94. background: #fff;
  95. border-radius: 40rpx;
  96. .time-line{
  97. margin-bottom: 16rpx;
  98. display: flex;
  99. .time-item{
  100. flex: 1;
  101. font-size: 24rpx;
  102. color: #777777;
  103. display: flex;
  104. flex-direction: column;
  105. align-items: center;
  106. position: relative;
  107. &::before{
  108. content: '';
  109. position: absolute;
  110. top: 44%;
  111. width: 100%;
  112. height: 2rpx;
  113. background: rgba(136, 136, 136, 0.1);
  114. }
  115. .dot{
  116. width: 14rpx;
  117. height: 14rpx;
  118. background: #777777;
  119. border-radius: 50%;
  120. }
  121. .today{
  122. color: #2199F8;
  123. margin-top: 8rpx;
  124. }
  125. }
  126. }
  127. .swiper-wrap{
  128. position: relative;
  129. padding: 0 20rpx;
  130. .swiper {
  131. width: 100%;
  132. height: 496rpx;
  133. .img{
  134. width: 100%;
  135. height: 100%;
  136. border-radius: 16rpx;
  137. }
  138. }
  139. .arrow{
  140. position: absolute;
  141. top: calc(50% - 40rpx);
  142. width: 80rpx;
  143. height: 80rpx;
  144. display: flex;
  145. align-items: center;
  146. justify-content: center;
  147. border-radius: 50%;
  148. background: rgba(0, 0, 0, .6);
  149. }
  150. .left{
  151. left: 32rpx;
  152. }
  153. .right{
  154. right: 32rpx;
  155. }
  156. }
  157. }
  158. }
  159. </style>