bottomSheetMore.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508
  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. <view class="uni-media-list-text-top" style=" ">
  32. <view class="tit-text">材质:</view>
  33. <view class="normal-text">{{a.materialQualityName}}</view>
  34. </view>
  35. <view class="uni-media-list-text-top" style=" ">
  36. <view class="tit-text">规格:</view>
  37. <view class="normal-text">{{a.specificationsName}}</view>
  38. </view>
  39. <view class="uni-media-list-text-top" style=" ">
  40. <view class="tit-text">数量:</view>
  41. <view class="normal-text">{{a.number}}</view>
  42. </view>
  43. </view>
  44. <view class="uni-media-list-text-top">
  45. <view class="tit-text">负责人:</view>
  46. <view class="normal-text">{{value.constructUser}}</view>
  47. </view>
  48. <view class="uni-media-list-text-top">
  49. <view class="tit-text">负责人联系电话:</view>
  50. <view class="normal-text">{{value.constructPhone}}</view>
  51. </view>
  52. <view v-if="title=='下沟'">
  53. <view class="uni-common-mt" style="width: 100%;">
  54. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  55. #000;margin-top: 5px; margin-left: 8px;">管道施工记录:</text>
  56. </view>
  57. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  58. <view v-for="(item,index) in value.constructionRecords" :key="index"
  59. style="position: relative;">
  60. <view
  61. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  62. <image :src="item" mode=""
  63. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  64. @click="showPhoto(index,value.constructionRecords)">
  65. </image>
  66. </view>
  67. <view v-else>
  68. <video :src="item"
  69. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  70. </view>
  71. </view>
  72. </view>
  73. <view class="uni-common-mt" style="width: 100%;">
  74. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  75. #000;margin-top: 5px; margin-left: 8px;">管上皮深度测量照片:</text>
  76. </view>
  77. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  78. <view v-for="(item,index) in value.ductalEpithelium" :key="index"
  79. style="position: relative;">
  80. <view
  81. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  82. <image :src="item" mode=""
  83. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  84. @click="showPhoto(index,value.ductalEpithelium)">
  85. </image>
  86. </view>
  87. <view v-else>
  88. <video :src="item"
  89. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  90. </view>
  91. </view>
  92. </view>
  93. <view class="uni-common-mt" style="width: 100%;">
  94. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  95. #000;margin-top: 5px;margin-left: 8px;">管沟远景照片:</text>
  96. </view>
  97. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  98. <view v-for="(item,index) in value.trenchProspect" :key="index"
  99. style="position: relative;">
  100. <view
  101. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  102. <image :src="item" mode=""
  103. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  104. @click="showPhoto(index,value.trenchProspect)">
  105. </image>
  106. </view>
  107. <view v-else>
  108. <video :src="item"
  109. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  110. </view>
  111. </view>
  112. </view>
  113. <view class="uni-common-mt" style="width: 100%;">
  114. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  115. #000;margin-top: 5px;margin-left: 8px;">视频:</text>
  116. </view>
  117. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  118. <view v-for="(item,index) in value.video" :key="index" 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.video)">
  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 v-else-if="title=='沟上施工'">
  134. <view class="uni-common-mt" style="width: 100%;">
  135. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  136. #000;margin-top: 5px;margin-left: 8px;">焊接照片:</text>
  137. </view>
  138. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  139. <view v-for="(item,index) in value.welding" :key="index"
  140. style="position: relative;">
  141. <view
  142. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  143. <image :src="item" mode=""
  144. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  145. @click="showPhoto(index,value.welding)">
  146. </image>
  147. </view>
  148. <view v-else>
  149. <video :src="item"
  150. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  151. </view>
  152. </view>
  153. </view>
  154. <view class="uni-common-mt" style="width: 100%;">
  155. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  156. #000;margin-top: 5px;margin-left: 8px;">防腐照片:</text>
  157. </view>
  158. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  159. <view v-for="(item,index) in value.aczoiling" :key="index"
  160. style="position: relative;">
  161. <view
  162. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  163. <image :src="item" mode=""
  164. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  165. @click="showPhoto(index,value.aczoiling)">
  166. </image>
  167. </view>
  168. <view v-else>
  169. <video :src="item"
  170. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  171. </view>
  172. </view>
  173. </view>
  174. </view>
  175. <view v-else-if="title=='沟下施工'">
  176. <view class="uni-common-mt" style="width: 100%;">
  177. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  178. #000;margin-top: 5px;margin-left: 8px;">管道下沟照片:</text>
  179. </view>
  180. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  181. <view v-for="(item,index) in value.piping" :key="index" style="position: relative;">
  182. <view
  183. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  184. <image :src="item" mode=""
  185. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  186. @click="showPhoto(index,value.piping)">
  187. </image>
  188. </view>
  189. <view v-else>
  190. <video :src="item"
  191. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  192. </view>
  193. </view>
  194. </view>
  195. <view class="uni-common-mt" style="width: 100%;">
  196. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  197. #000;margin-top: 5px;margin-left: 8px;">警示带铺设照片:</text>
  198. </view>
  199. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  200. <view v-for="(item,index) in value.warning" :key="index"
  201. style="position: relative;">
  202. <view
  203. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  204. <image :src="item" mode=""
  205. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  206. @click="showPhoto(index,value.warning)">
  207. </image>
  208. </view>
  209. <view v-else>
  210. <video :src="item"
  211. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  212. </view>
  213. </view>
  214. </view>
  215. <view class="uni-common-mt" style="width: 100%;">
  216. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  217. #000;margin-top: 5px;margin-left: 8px;">回填照片:</text>
  218. </view>
  219. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  220. <view v-for="(item,index) in value.backfilling" :key="index"
  221. style="position: relative;">
  222. <view
  223. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  224. <image :src="item" mode=""
  225. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  226. @click="showPhoto(index,value.backfilling)">
  227. </image>
  228. </view>
  229. <view v-else>
  230. <video :src="item"
  231. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  232. </view>
  233. </view>
  234. </view>
  235. </view>
  236. <view v-else>
  237. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  238. <view v-for="(item,index) in value.zEngiineeringPhotoBoList" :key="index"
  239. style="position: relative;">
  240. <view
  241. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  242. <image :src="item" mode=""
  243. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  244. @click="showPhoto(index,value.zEngiineeringPhotoBoList)">
  245. </image>
  246. </view>
  247. <view v-else>
  248. <video :src="item"
  249. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  250. </view>
  251. </view>
  252. </view>
  253. </view>
  254. </view>
  255. </view>
  256. </view>
  257. </scroll-view>
  258. </view>
  259. </view>
  260. </template>
  261. <script>
  262. export default {
  263. props: {
  264. data: {
  265. type: Object,
  266. default: {}
  267. },
  268. TitleType: {
  269. type: String
  270. }
  271. },
  272. created() {
  273. this.getParamsData();
  274. },
  275. watch: {
  276. data(data) {
  277. this.getParamsData();
  278. }
  279. },
  280. data() {
  281. return {
  282. outPutData: {},
  283. historyList: [], //历史数据
  284. historyPhotoList: [], //历史图片数据
  285. shareState: false,
  286. title: '',
  287. };
  288. },
  289. methods: {
  290. // isEmpty(str) {
  291. // return (!str || 0 === str.length);
  292. // },
  293. showPhoto(index, list) {
  294. let newArr = [];
  295. list.forEach((item, index) => {
  296. if (item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' ||
  297. item.substring(item.length - 4) == 'jpeg') {
  298. newArr.push(item)
  299. }
  300. });
  301. uni.previewImage({
  302. current: index,
  303. urls: newArr,
  304. })
  305. },
  306. getParamsData() {
  307. var selectData = this.data;
  308. this.outPutData = selectData;
  309. this.title = this.TitleType;
  310. this.historyList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList;
  311. },
  312. // 显示分享
  313. handleShowShare() {
  314. this.shareState = true;
  315. },
  316. // 隐藏分享
  317. handleHiddenShare() {
  318. this.shareState = false;
  319. }
  320. }
  321. }
  322. </script>
  323. <style lang="scss">
  324. .uni-media-list-body {
  325. border: 1px solid #eee;
  326. border-radius: 40rpx;
  327. margin: 10rpx 30rpx 20rpx;
  328. padding: 10rpx 0 40rpx;
  329. box-shadow: 0 0 5px #eee;
  330. }
  331. .share {
  332. width: 100%;
  333. height: 100%;
  334. }
  335. .tit-text {
  336. color: #4f535a;
  337. margin-right: 20rpx;
  338. }
  339. .normal-text {}
  340. .cz-style {
  341. background: #e8f4f9;
  342. margin: 20rpx;
  343. padding: 10rpx;
  344. border-radius: 20rpx;
  345. border: 1px solid #d4e3f0;
  346. }
  347. .uni-media-list-text-top {
  348. font-size: 14px;
  349. color: #696969;
  350. padding: 20rpx 20rpx;
  351. border-bottom: 1px solid #eee;
  352. display: flex;
  353. align-items: center;
  354. }
  355. .share-box {
  356. width: 100%;
  357. height: 100%;
  358. position: fixed;
  359. top: 0rpx;
  360. left: 0rpx;
  361. bottom: 0rpx;
  362. right: 0rpx;
  363. background-color: rgba(0, 0, 0, 0.4);
  364. transition: .3s;
  365. z-index: 999;
  366. }
  367. // 进入分享动画
  368. .share-show {
  369. transition: all 0.3s ease;
  370. transform: translateY(0%) !important;
  371. border-radius: 20px 20px 0px 0px;
  372. }
  373. .scroll-Y {
  374. height: 58vh;
  375. }
  376. // 离开分享动画
  377. .share-item {
  378. position: fixed;
  379. left: 0;
  380. bottom: 0;
  381. width: 100%;
  382. height: 70%;
  383. background-color: #FFFFFF;
  384. transition: all 0.3s ease;
  385. transform: translateY(100%);
  386. z-index: 1999;
  387. .share-to {
  388. width: 100%;
  389. height: 30px;
  390. display: flex;
  391. justify-content: center;
  392. margin: 30rpx 0;
  393. align-items: center;
  394. // &::after {
  395. // content: '';
  396. // width: 240rpx;
  397. // height: 0rpx;
  398. // border-top: 1px solid #E4E7ED;
  399. // -webkit-transform: scaleY(0.5);
  400. // transform: scaleY(0.5);
  401. // margin-left: 30rpx;
  402. // }
  403. // &::before {
  404. // content: '';
  405. // width: 240rpx;
  406. // height: 0rpx;
  407. // border-top: 1px solid #E4E7ED;
  408. // -webkit-transform: scaleY(0.5);
  409. // transform: scaleY(0.5);
  410. // margin-right: 30rpx;
  411. // }
  412. }
  413. .content {
  414. width: 100%;
  415. height: auto;
  416. display: flex;
  417. flex-wrap: wrap;
  418. .block {
  419. width: 100%;
  420. display: flex;
  421. flex-direction: column;
  422. justify-content: center;
  423. align-items: left;
  424. height: auto;
  425. image {
  426. width: 80rpx;
  427. height: 80rpx;
  428. }
  429. text {
  430. margin-top: 16rpx;
  431. font-size: 28rpx;
  432. color: #606266;
  433. }
  434. }
  435. }
  436. .cancel {
  437. width: 100%;
  438. height: 3rem;
  439. display: flex;
  440. justify-content: center;
  441. align-items: center;
  442. border-top: 1rpx solid #E4E7ED;
  443. }
  444. }
  445. </style>