bottomSheet.vue 7.0 KB

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