bottomSheet.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  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=='报警器'||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=='报警器'||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=='表后管'">
  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=='打磨'||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" v-if="title!='管道施工记录'">
  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="uni-common-mt" style="width: 100%;">
  169. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  170. #000;margin-top: 5px;">施工内容:</text>
  171. <view style="width: 100%;padding-right: 20rpx;box-sizing: border-box;">
  172. <textarea class="textarea" maxlength="255" :disabled="true"
  173. placeholder-style="padding: 10rpx;"
  174. style="width: 100%;height: 100%;border: 1rpx solid #cccccc; border-radius: 15rpx;padding: 10rpx;line-height:normal;"
  175. auto-height>{{value.zEngineeringMaterialBo[0].remark}}</textarea>
  176. </view>
  177. </view>
  178. </view>
  179. <view class="uni-media-list-text-top">
  180. <view class="tit-text">施工位置:</view>
  181. <text style="margin-right: 10px;">{{value.constructAddre}}</text>
  182. 第{{value.zEngineeringMaterialBo[0].number}}根
  183. </view>
  184. <view class="uni-media-list-text-top">
  185. <view class="tit-text">负责人:</view>
  186. <text>{{value.constructUser}}</text>
  187. </view>
  188. <view class="uni-media-list-text-top">
  189. <view class="tit-text">负责人联系电话:</view>
  190. <text>{{value.constructPhone}}</text>
  191. </view>
  192. <view class="uni-common-mt" style="width: 100%;">
  193. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  194. #000;margin-top: 5px; margin-left: 8px;">沟上部分照片:</text>
  195. </view>
  196. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  197. <view v-for="(item,index) in value.onTheDitch" :key="index"
  198. style="position: relative;">
  199. <view
  200. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  201. <image :src="item" mode=""
  202. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  203. @click="showPhoto(index,value.onTheDitch)">
  204. </image>
  205. </view>
  206. <view v-else>
  207. <video :src="item"
  208. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  209. </view>
  210. </view>
  211. </view>
  212. <view class="uni-common-mt" style="width: 100%;">
  213. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  214. #000;margin-top: 5px; margin-left: 8px;">开挖前照片:</text>
  215. </view>
  216. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  217. <view v-for="(item,index) in value.beforeBottom" :key="index"
  218. style="position: relative;">
  219. <view
  220. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  221. <image :src="item" mode=""
  222. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  223. @click="showPhoto(index,value.beforeBottom)">
  224. </image>
  225. </view>
  226. <view v-else>
  227. <video :src="item"
  228. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  229. </view>
  230. </view>
  231. </view>
  232. <view class="uni-common-mt" style="width: 100%;">
  233. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  234. #000;margin-top: 5px;margin-left: 8px;">下沟照片:</text>
  235. </view>
  236. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  237. <view v-for="(item,index) in value.legBackfilling" :key="index"
  238. style="position: relative;">
  239. <view
  240. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  241. <image :src="item" mode=""
  242. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  243. @click="showPhoto(index,value.legBackfilling)">
  244. </image>
  245. </view>
  246. <view v-else>
  247. <video :src="item"
  248. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  249. </view>
  250. </view>
  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.inferiorSulcus" :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.inferiorSulcus)">
  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-if="title=='管道施工记录'">
  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="uni-media-list-text-top">
  283. <view class="tit-text">施工时间:</view>{{value.constructTime}}
  284. </view>
  285. <view class="uni-common-mt" style="width: 100%;">
  286. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  287. #000;margin-top: 5px;margin-left: 8px;">照片:</text>
  288. </view>
  289. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  290. <view v-for="(item,index) in value.zEngiineeringPhotoBoList" :key="index"
  291. style="position: relative;">
  292. <view
  293. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  294. <image :src="item" mode=""
  295. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  296. @click="showPhoto(index,value.zEngiineeringPhotoBoList)">
  297. </image>
  298. </view>
  299. <view v-else>
  300. <video :src="item"
  301. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  302. </view>
  303. </view>
  304. </view>
  305. </view> -->
  306. <view v-else>
  307. <view class="uni-media-list-text-top">
  308. <view class="tit-text">负责人:</view>
  309. <text>{{value.constructUser}}</text>
  310. </view>
  311. <view class="uni-media-list-text-top">
  312. <view class="tit-text">负责人联系电话:</view>
  313. <text>{{value.constructPhone}}</text>
  314. </view>
  315. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  316. <view v-for="(item,index) in value.zEngiineeringPhotoBoList" :key="index"
  317. style="position: relative;">
  318. <view
  319. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  320. <image :src="item" mode=""
  321. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  322. @click="showPhoto(index,value.zEngiineeringPhotoBoList)">
  323. </image>
  324. </view>
  325. <view v-else>
  326. <video :src="item"
  327. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  328. </view>
  329. </view>
  330. </view>
  331. </view>
  332. </view>
  333. </view>
  334. </view>
  335. </scroll-view>
  336. </view>
  337. </view>
  338. </template>
  339. <script>
  340. export default {
  341. props: {
  342. data: {
  343. type: Object,
  344. default: {}
  345. },
  346. },
  347. created() {
  348. this.getParamsData();
  349. },
  350. watch: {
  351. data(data) {
  352. this.getParamsData();
  353. }
  354. },
  355. data() {
  356. return {
  357. outPutData: {},
  358. historyList: [], //历史数据
  359. historyPhotoList: [], //历史图片数据
  360. shareState: false,
  361. title: '',
  362. };
  363. },
  364. methods: {
  365. showPhoto(index, list) {
  366. uni.previewImage({
  367. current: index,
  368. urls: list,
  369. })
  370. },
  371. getParamsData() {
  372. var selectData = this.data;
  373. this.outPutData = selectData;
  374. this.title = selectData.zEngineeringNodeBo.type;
  375. this.historyList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList;
  376. //this.historyPhotoList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList.zEngiineeringPhotoBoList;
  377. },
  378. // 显示分享
  379. handleShowShare() {
  380. this.shareState = true;
  381. },
  382. // 隐藏分享
  383. handleHiddenShare() {
  384. this.shareState = false;
  385. }
  386. }
  387. }
  388. </script>
  389. <style lang="scss">
  390. .uni-media-list-body {
  391. border: 1px solid #eee;
  392. border-radius: 40rpx;
  393. margin: 10rpx 30rpx 20rpx;
  394. padding: 10rpx 0 40rpx;
  395. box-shadow: 0 0 5px #eee;
  396. }
  397. .share {
  398. width: 100%;
  399. height: 100%;
  400. }
  401. .tit-text {
  402. color: #4f535a;
  403. margin-right: 20rpx;
  404. }
  405. .normal-text {}
  406. .cz-style {
  407. background: #e8f4f9;
  408. margin: 20rpx;
  409. padding: 10rpx;
  410. border-radius: 20rpx;
  411. border: 1px solid #d4e3f0;
  412. }
  413. .uni-media-list-text-top {
  414. font-size: 14px;
  415. color: #696969;
  416. padding: 20rpx 20rpx;
  417. border-bottom: 1px solid #eee;
  418. display: flex;
  419. align-items: center;
  420. }
  421. .share-box {
  422. width: 100%;
  423. height: 100%;
  424. position: fixed;
  425. top: 0rpx;
  426. left: 0rpx;
  427. bottom: 0rpx;
  428. right: 0rpx;
  429. background-color: rgba(0, 0, 0, 0.4);
  430. transition: .3s;
  431. z-index: 999;
  432. }
  433. // 进入分享动画
  434. .share-show {
  435. transition: all 0.3s ease;
  436. transform: translateY(0%) !important;
  437. border-radius: 20px 20px 0px 0px;
  438. }
  439. .scroll-Y {
  440. height: 58vh;
  441. }
  442. // 离开分享动画
  443. .share-item {
  444. position: fixed;
  445. left: 0;
  446. bottom: 0;
  447. width: 100%;
  448. height: 70%;
  449. background-color: #FFFFFF;
  450. transition: all 0.3s ease;
  451. transform: translateY(100%);
  452. z-index: 1999;
  453. .share-to {
  454. width: 100%;
  455. height: 30px;
  456. display: flex;
  457. justify-content: left;
  458. margin: 30rpx 35rpx;
  459. align-items: center;
  460. // &::after {
  461. // content: '';
  462. // width: 240rpx;
  463. // height: 0rpx;
  464. // border-top: 1px solid #E4E7ED;
  465. // -webkit-transform: scaleY(0.5);
  466. // transform: scaleY(0.5);
  467. // margin-left: 30rpx;
  468. // }
  469. // &::before {
  470. // content: '';
  471. // width: 240rpx;
  472. // height: 0rpx;
  473. // border-top: 1px solid #E4E7ED;
  474. // -webkit-transform: scaleY(0.5);
  475. // transform: scaleY(0.5);
  476. // margin-right: 30rpx;
  477. // }
  478. }
  479. .content {
  480. width: 100%;
  481. height: auto;
  482. display: flex;
  483. flex-wrap: wrap;
  484. .block {
  485. width: 100%;
  486. display: flex;
  487. flex-direction: column;
  488. justify-content: center;
  489. align-items: left;
  490. height: auto;
  491. image {
  492. width: 80rpx;
  493. height: 80rpx;
  494. }
  495. text {
  496. margin-top: 16rpx;
  497. font-size: 28rpx;
  498. color: #606266;
  499. }
  500. }
  501. }
  502. .cancel {
  503. width: 100%;
  504. height: 3rem;
  505. display: flex;
  506. justify-content: center;
  507. align-items: center;
  508. border-top: 1rpx solid #E4E7ED;
  509. }
  510. }
  511. </style>