bottomSheetMoreNew.vue 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  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">
  14. <view class="uni-media-list-text-top">
  15. <view class="tit-text">施工时间:</view>
  16. <view class="normal-text">{{value.constructTime}}</view>
  17. </view>
  18. <view class="uni-media-list-text-top">
  19. <view class="uni-common-mt" style="width: 100%;">
  20. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  21. #000;margin-top: 5px;">施工内容:</text>
  22. <view style="width: 100%;padding-right: 20rpx;box-sizing: border-box;">
  23. <textarea class="textarea" maxlength="255" :disabled="true"
  24. placeholder-style="padding: 10rpx;"
  25. style="width: 100%;height: 100%;border: 1rpx solid #cccccc; border-radius: 15rpx;padding: 10rpx;line-height:normal;"
  26. auto-height>{{value.remark}}</textarea>
  27. </view>
  28. </view>
  29. </view>
  30. <view class="cz-style" v-for="(a,index) in value.zEngineeringMaterialBo" :key="index"
  31. v-if="title=='焊接、防腐'||title=='下管'||title=='沟下连头'">
  32. <view class="uni-media-list-text-top" style=" ">
  33. <view class="tit-text">材质:</view>
  34. <view class="normal-text">{{a.materialQualityName}}</view>
  35. </view>
  36. <view class="uni-media-list-text-top" style=" ">
  37. <view class="tit-text">规格:</view>
  38. <view class="normal-text">{{a.specificationsName}}</view>
  39. </view>
  40. <view class="uni-media-list-text-top" style=" ">
  41. <view class="tit-text">数量:</view>
  42. <view class="normal-text">{{a.number}}</view>
  43. </view>
  44. </view>
  45. <view class="uni-media-list-text-top">
  46. <view class="tit-text">负责人:</view>
  47. <view class="normal-text">{{value.constructUser}}</view>
  48. </view>
  49. <view class="uni-media-list-text-top">
  50. <view class="tit-text">负责人联系电话:</view>
  51. <view class="normal-text">{{value.constructPhone}}</view>
  52. </view>
  53. <view v-if="title!='回填、撤场'">
  54. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  55. <view v-for="(item,index) in value.zEngiineeringPhotoBoList" :key="index"
  56. style="position: relative;">
  57. <view
  58. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  59. <image :src="item" mode=""
  60. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  61. @click="showPhoto(index,value.zEngiineeringPhotoBoList)">
  62. </image>
  63. </view>
  64. <view v-else>
  65. <video :src="item"
  66. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <view v-else>
  72. <view class="uni-common-mt" style="width: 100%;">
  73. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  74. #000;margin-top: 5px; margin-left: 8px;">回填前照片:</text>
  75. </view>
  76. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  77. <view v-for="(item,index) in value.zEngiineeringPhotoBoListOne" :key="index"
  78. style="position: relative;">
  79. <view
  80. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  81. <image :src="item" mode=""
  82. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  83. @click="showPhoto(index,value.zEngiineeringPhotoBoListOne)">
  84. </image>
  85. </view>
  86. <view v-else>
  87. <video :src="item"
  88. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  89. </view>
  90. </view>
  91. </view>
  92. <view class="uni-common-mt" style="width: 100%;">
  93. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  94. #000;margin-top: 5px; margin-left: 8px;">警示带铺设照片:</text>
  95. </view>
  96. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  97. <view v-for="(item,index) in value.zEngiineeringPhotoBoListTwo" :key="index"
  98. style="position: relative;">
  99. <view
  100. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  101. <image :src="item" mode=""
  102. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  103. @click="showPhoto(index,value.zEngiineeringPhotoBoListTwo)">
  104. </image>
  105. </view>
  106. <view v-else>
  107. <video :src="item"
  108. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  109. </view>
  110. </view>
  111. </view>
  112. <view class="uni-common-mt" style="width: 100%;">
  113. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  114. #000;margin-top: 5px; margin-left: 8px;">回填后照片:</text>
  115. </view>
  116. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  117. <view v-for="(item,index) in value.zEngiineeringPhotoBoListThree" :key="index"
  118. style="position: relative;">
  119. <view
  120. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  121. <image :src="item" mode=""
  122. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  123. @click="showPhoto(index,value.zEngiineeringPhotoBoListThree)">
  124. </image>
  125. </view>
  126. <view v-else>
  127. <video :src="item"
  128. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  129. </view>
  130. </view>
  131. </view>
  132. </view>
  133. </view>
  134. </view>
  135. </view>
  136. </scroll-view>
  137. </view>
  138. </view>
  139. </template>
  140. <script>
  141. export default {
  142. props: {
  143. data: {
  144. type: Object,
  145. default: {}
  146. },
  147. TitleType: {
  148. type: String
  149. }
  150. },
  151. created() {
  152. this.getParamsData();
  153. },
  154. watch: {
  155. data(data) {
  156. this.getParamsData();
  157. }
  158. },
  159. data() {
  160. return {
  161. outPutData: {},
  162. historyList: [], //历史数据
  163. historyPhotoList: [], //历史图片数据
  164. shareState: false,
  165. title: '',
  166. };
  167. },
  168. methods: {
  169. // isEmpty(str) {
  170. // return (!str || 0 === str.length);
  171. // },
  172. showPhoto(index, list) {
  173. let newArr = [];
  174. list.forEach((item, index) => {
  175. if (item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' ||
  176. item.substring(item.length - 4) == 'jpeg') {
  177. newArr.push(item)
  178. }
  179. });
  180. uni.previewImage({
  181. current: index,
  182. urls: newArr,
  183. })
  184. },
  185. getParamsData() {
  186. var selectData = this.data;
  187. this.outPutData = selectData;
  188. this.title = this.TitleType;
  189. this.historyList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList;
  190. },
  191. // 显示分享
  192. handleShowShare() {
  193. this.shareState = true;
  194. },
  195. // 隐藏分享
  196. handleHiddenShare() {
  197. this.shareState = false;
  198. }
  199. }
  200. }
  201. </script>
  202. <style lang="scss">
  203. .uni-media-list-body {
  204. border: 1px solid #eee;
  205. border-radius: 40rpx;
  206. margin: 10rpx 30rpx 20rpx;
  207. padding: 10rpx 0 40rpx;
  208. box-shadow: 0 0 5px #eee;
  209. }
  210. .share {
  211. width: 100%;
  212. height: 100%;
  213. }
  214. .tit-text {
  215. color: #4f535a;
  216. margin-right: 20rpx;
  217. }
  218. .normal-text {}
  219. .cz-style {
  220. background: #e8f4f9;
  221. margin: 20rpx;
  222. padding: 10rpx;
  223. border-radius: 20rpx;
  224. border: 1px solid #d4e3f0;
  225. }
  226. .uni-media-list-text-top {
  227. font-size: 14px;
  228. color: #696969;
  229. padding: 20rpx 20rpx;
  230. border-bottom: 1px solid #eee;
  231. display: flex;
  232. align-items: center;
  233. }
  234. .share-box {
  235. width: 100%;
  236. height: 100%;
  237. position: fixed;
  238. top: 0rpx;
  239. left: 0rpx;
  240. bottom: 0rpx;
  241. right: 0rpx;
  242. background-color: rgba(0, 0, 0, 0.4);
  243. transition: .3s;
  244. z-index: 999;
  245. }
  246. // 进入分享动画
  247. .share-show {
  248. transition: all 0.3s ease;
  249. transform: translateY(0%) !important;
  250. border-radius: 20px 20px 0px 0px;
  251. }
  252. .scroll-Y {
  253. height: 58vh;
  254. }
  255. // 离开分享动画
  256. .share-item {
  257. position: fixed;
  258. left: 0;
  259. bottom: 0;
  260. width: 100%;
  261. height: 70%;
  262. background-color: #FFFFFF;
  263. transition: all 0.3s ease;
  264. transform: translateY(100%);
  265. z-index: 1999;
  266. .share-to {
  267. width: 100%;
  268. height: 30px;
  269. display: flex;
  270. justify-content: center;
  271. margin: 30rpx 0;
  272. align-items: center;
  273. // &::after {
  274. // content: '';
  275. // width: 240rpx;
  276. // height: 0rpx;
  277. // border-top: 1px solid #E4E7ED;
  278. // -webkit-transform: scaleY(0.5);
  279. // transform: scaleY(0.5);
  280. // margin-left: 30rpx;
  281. // }
  282. // &::before {
  283. // content: '';
  284. // width: 240rpx;
  285. // height: 0rpx;
  286. // border-top: 1px solid #E4E7ED;
  287. // -webkit-transform: scaleY(0.5);
  288. // transform: scaleY(0.5);
  289. // margin-right: 30rpx;
  290. // }
  291. }
  292. .content {
  293. width: 100%;
  294. height: auto;
  295. display: flex;
  296. flex-wrap: wrap;
  297. .block {
  298. width: 100%;
  299. display: flex;
  300. flex-direction: column;
  301. justify-content: center;
  302. align-items: left;
  303. height: auto;
  304. image {
  305. width: 80rpx;
  306. height: 80rpx;
  307. }
  308. text {
  309. margin-top: 16rpx;
  310. font-size: 28rpx;
  311. color: #606266;
  312. }
  313. }
  314. }
  315. .cancel {
  316. width: 100%;
  317. height: 3rem;
  318. display: flex;
  319. justify-content: center;
  320. align-items: center;
  321. border-top: 1rpx solid #E4E7ED;
  322. }
  323. }
  324. </style>