bottomSheetMore.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. <template>
  2. <view class="share">
  3. <view :class="{'share-box': shareState}" @click="handleHiddenShare">
  4. </view>
  5. <view class="share-item" :class="{'share-show': shareState}">
  6. <view class="share-to">
  7. <text style="font-size: 16px;color: #000;">{{title}}</text>
  8. </view>
  9. <scroll-view scroll-y="true" class="scroll-Y">
  10. <view class="uni-list-cell" hover-class="uni-list-cell-hover" v-for="(value, key) in historyList"
  11. :key="key">
  12. <view class="uni-media-list">
  13. <view class="uni-media-list-body" style="margin-left: 15px;">
  14. <view class="uni-media-list-text-top" style="font-size: 13px;color: #000;margin-top: 5px;">
  15. 施工时间:{{value.constructTime}}</view>
  16. <view v-for="(a,index) in value.zEngineeringMaterialBo" :key="index">
  17. <view class="uni-media-list-text-top"
  18. style="font-size: 13px;color: #000;margin-top: 5px;">
  19. 材质:{{a.materialQualityName}}</view>
  20. <view class="uni-media-list-text-top"
  21. style="font-size: 13px;color: #000;margin-top: 5px;">
  22. 规格:{{a.specificationsName}}</view>
  23. <view class="uni-media-list-text-top"
  24. style="font-size: 13px;color: #000;margin-top: 5px;">
  25. 数量:{{a.number}}</view>
  26. </view>
  27. <view class="uni-media-list-text-top">
  28. <text style="font-size: 13px;color: #000;margin-top: 5px;">负责人:</text>
  29. <text
  30. style="font-size: 13px;color: #000;margin-top: 5px;">{{value.constructUser}}</text>
  31. </view>
  32. <view class="uni-media-list-text-top">
  33. <text style="font-size: 13px;color: #000;margin-top: 5px;">负责人联系电话:</text>
  34. <text
  35. style="font-size: 13px;color: #000;margin-top: 5px;">{{value.constructPhone}}</text>
  36. </view>
  37. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  38. <text style="margin-left: 30rpx;margin-top: 6rpx;">{{ value.published_at }}</text>
  39. <view v-for="(item,index) in value.zEngiineeringPhotoBoList" :key="index"
  40. style="position: relative;">
  41. <view
  42. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  43. <image :src="item" mode=""
  44. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  45. @click="showPhoto(index,value.zEngiineeringPhotoBoList)">
  46. </image>
  47. </view>
  48. <view v-else>
  49. <video :src="item"
  50. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </scroll-view>
  58. </view>
  59. </view>
  60. </template>
  61. <script>
  62. export default {
  63. props: {
  64. data: {
  65. type: Object,
  66. default: {}
  67. },
  68. },
  69. created() {
  70. this.getParamsData();
  71. },
  72. watch: {
  73. data(data) {
  74. this.getParamsData();
  75. }
  76. },
  77. data() {
  78. return {
  79. outPutData: {},
  80. historyList: [], //历史数据
  81. historyPhotoList: [], //历史图片数据
  82. shareState: false,
  83. title: '',
  84. };
  85. },
  86. methods: {
  87. showPhoto(index, list) {
  88. uni.previewImage({
  89. current: index,
  90. urls: list,
  91. })
  92. },
  93. getParamsData() {
  94. var selectData = this.data;
  95. this.outPutData = selectData;
  96. this.title = selectData.zEngineeringNodeBo.type;
  97. this.historyList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList;
  98. //this.historyPhotoList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList.zEngiineeringPhotoBoList;
  99. },
  100. // 显示分享
  101. handleShowShare() {
  102. this.shareState = true;
  103. },
  104. // 隐藏分享
  105. handleHiddenShare() {
  106. this.shareState = false;
  107. }
  108. }
  109. }
  110. </script>
  111. <style lang="less">
  112. .share {
  113. width: 100%;
  114. height: 100%;
  115. }
  116. .share-box {
  117. width: 100%;
  118. height: 100%;
  119. position: fixed;
  120. top: 0rpx;
  121. left: 0rpx;
  122. bottom: 0rpx;
  123. right: 0rpx;
  124. background-color: rgba(0, 0, 0, 0.4);
  125. transition: .3s;
  126. z-index: 999;
  127. }
  128. // 进入分享动画
  129. .share-show {
  130. transition: all 0.3s ease;
  131. transform: translateY(0%) !important;
  132. border-radius: 20px 20px 0px 0px;
  133. }
  134. .scroll-Y {
  135. height: 750rpx;
  136. }
  137. // 离开分享动画
  138. .share-item {
  139. position: fixed;
  140. left: 0;
  141. bottom: 0;
  142. width: 100%;
  143. height: 70%;
  144. background-color: #FFFFFF;
  145. transition: all 0.3s ease;
  146. transform: translateY(100%);
  147. z-index: 1999;
  148. .share-to {
  149. width: 100%;
  150. height: 30px;
  151. display: flex;
  152. justify-content: left;
  153. margin-left: 15px;
  154. align-items: center;
  155. // &::after {
  156. // content: '';
  157. // width: 240rpx;
  158. // height: 0rpx;
  159. // border-top: 1px solid #E4E7ED;
  160. // -webkit-transform: scaleY(0.5);
  161. // transform: scaleY(0.5);
  162. // margin-left: 30rpx;
  163. // }
  164. // &::before {
  165. // content: '';
  166. // width: 240rpx;
  167. // height: 0rpx;
  168. // border-top: 1px solid #E4E7ED;
  169. // -webkit-transform: scaleY(0.5);
  170. // transform: scaleY(0.5);
  171. // margin-right: 30rpx;
  172. // }
  173. }
  174. .content {
  175. width: 100%;
  176. height: auto;
  177. display: flex;
  178. flex-wrap: wrap;
  179. .block {
  180. width: 100%;
  181. display: flex;
  182. flex-direction: column;
  183. justify-content: center;
  184. align-items: left;
  185. height: auto;
  186. image {
  187. width: 80rpx;
  188. height: 80rpx;
  189. }
  190. text {
  191. margin-top: 16rpx;
  192. font-size: 28rpx;
  193. color: #606266;
  194. }
  195. }
  196. }
  197. .cancel {
  198. width: 100%;
  199. height: 3rem;
  200. display: flex;
  201. justify-content: center;
  202. align-items: center;
  203. border-top: 1rpx solid #E4E7ED;
  204. }
  205. }
  206. </style>