bottomSheetMoreNew.vue 10 KB

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