bottomSheet.vue 17 KB

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