bottomSheetMore.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613
  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!='调压柜'">
  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="uni-common-mt" style="width: 100%;">
  55. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  56. #000;margin-top: 5px; margin-left: 8px;">管道施工记录:</text>
  57. </view>
  58. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  59. <view v-for="(item,index) in value.constructionRecords" :key="index"
  60. style="position: relative;">
  61. <view
  62. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  63. <image :src="item" mode=""
  64. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"
  65. @click="showPhoto(index,value.constructionRecords)">
  66. </image>
  67. </view>
  68. <view v-else>
  69. <video :src="item"
  70. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  71. </view>
  72. </view>
  73. </view> -->
  74. <view class="uni-common-mt" style="width: 100%;">
  75. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  76. #000;margin-top: 5px; margin-left: 8px;">管上皮深度测量照片:</text>
  77. </view>
  78. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  79. <view v-for="(item,index) in value.ductalEpithelium" :key="index"
  80. style="position: relative;">
  81. <view
  82. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  83. <image :src="item" mode=""
  84. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"
  85. @click="showPhoto(index,value.ductalEpithelium)">
  86. </image>
  87. </view>
  88. <view v-else>
  89. <video :src="item"
  90. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  91. </view>
  92. </view>
  93. </view>
  94. <view class="uni-common-mt" style="width: 100%;">
  95. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  96. #000;margin-top: 5px;margin-left: 8px;">管沟远景照片:</text>
  97. </view>
  98. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  99. <view v-for="(item,index) in value.trenchProspect" :key="index"
  100. style="position: relative;">
  101. <view
  102. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  103. <image :src="item" mode=""
  104. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"
  105. @click="showPhoto(index,value.trenchProspect)">
  106. </image>
  107. </view>
  108. <view v-else>
  109. <video :src="item"
  110. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  111. </view>
  112. </view>
  113. </view>
  114. <view class="uni-common-mt" style="width: 100%;">
  115. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  116. #000;margin-top: 5px;margin-left: 8px;">视频:</text>
  117. </view>
  118. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  119. <view v-for="(item,index) in value.video" :key="index" style="position: relative;">
  120. <view
  121. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  122. <image :src="item" mode=""
  123. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"
  124. @click="showPhoto(index,value.video)">
  125. </image>
  126. </view>
  127. <view v-else>
  128. <video :src="item"
  129. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  130. </view>
  131. </view>
  132. </view>
  133. </view>
  134. <view v-else-if="title=='沟上施工'">
  135. <view class="uni-common-mt" style="width: 100%;">
  136. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  137. #000;margin-top: 5px;margin-left: 8px;">焊接照片:</text>
  138. </view>
  139. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  140. <view v-for="(item,index) in value.welding" :key="index"
  141. style="position: relative;">
  142. <view
  143. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  144. <image :src="item" mode=""
  145. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"
  146. @click="showPhoto(index,value.welding)">
  147. </image>
  148. </view>
  149. <view v-else>
  150. <video :src="item"
  151. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  152. </view>
  153. </view>
  154. </view>
  155. <view class="uni-common-mt" style="width: 100%;">
  156. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  157. #000;margin-top: 5px;margin-left: 8px;">防腐照片:</text>
  158. </view>
  159. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  160. <view v-for="(item,index) in value.aczoiling" :key="index"
  161. style="position: relative;">
  162. <view
  163. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  164. <image :src="item" mode=""
  165. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"
  166. @click="showPhoto(index,value.aczoiling)">
  167. </image>
  168. </view>
  169. <view v-else>
  170. <video :src="item"
  171. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  172. </view>
  173. </view>
  174. </view>
  175. </view>
  176. <view v-else-if="title=='沟下施工'">
  177. <view class="uni-common-mt" style="width: 100%;">
  178. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  179. #000;margin-top: 5px;margin-left: 8px;">管道下沟照片:</text>
  180. </view>
  181. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  182. <view v-for="(item,index) in value.piping" :key="index" style="position: relative;">
  183. <view
  184. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  185. <image :src="item" mode=""
  186. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"
  187. @click="showPhoto(index,value.piping)">
  188. </image>
  189. </view>
  190. <view v-else>
  191. <video :src="item"
  192. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  193. </view>
  194. </view>
  195. </view>
  196. <view class="uni-common-mt" style="width: 100%;">
  197. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  198. #000;margin-top: 5px;margin-left: 8px;">警示带铺设照片:</text>
  199. </view>
  200. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  201. <view v-for="(item,index) in value.warning" :key="index"
  202. style="position: relative;">
  203. <view
  204. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  205. <image :src="item" mode=""
  206. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"
  207. @click="showPhoto(index,value.warning)">
  208. </image>
  209. </view>
  210. <view v-else>
  211. <video :src="item"
  212. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  213. </view>
  214. </view>
  215. </view>
  216. <view class="uni-common-mt" style="width: 100%;">
  217. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  218. #000;margin-top: 5px;margin-left: 8px;">回填照片:</text>
  219. </view>
  220. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  221. <view v-for="(item,index) in value.backfilling" :key="index"
  222. style="position: relative;">
  223. <view
  224. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  225. <image :src="item" mode=""
  226. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"
  227. @click="showPhoto(index,value.backfilling)">
  228. </image>
  229. </view>
  230. <view v-else>
  231. <video :src="item"
  232. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  233. </view>
  234. </view>
  235. </view>
  236. </view>
  237. <view v-else-if="title=='调压柜'">
  238. <view class="uni-common-mt" style="width: 100%;">
  239. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  240. #000;margin-top: 5px;margin-left: 8px;">调压箱名牌照片:</text>
  241. </view>
  242. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  243. <view v-for="(item,index) in value.boxBrand" :key="index"
  244. style="position: relative;">
  245. <view
  246. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  247. <image :src="item" mode=""
  248. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"
  249. @click="showPhoto(index,value.boxBrand)">
  250. </image>
  251. </view>
  252. <view v-else>
  253. <video :src="item"
  254. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  255. </view>
  256. </view>
  257. </view>
  258. <view class="uni-common-mt" style="width: 100%;">
  259. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  260. #000;margin-top: 5px;margin-left: 8px;">调压箱内石粉回填照片:</text>
  261. </view>
  262. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  263. <view v-for="(item,index) in value.stonePowder" :key="index"
  264. style="position: relative;">
  265. <view
  266. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  267. <image :src="item" mode=""
  268. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"
  269. @click="showPhoto(index,value.stonePowder)">
  270. </image>
  271. </view>
  272. <view v-else>
  273. <video :src="item"
  274. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  275. </view>
  276. </view>
  277. </view>
  278. <view class="uni-common-mt" style="width: 100%;">
  279. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  280. #000;margin-top: 5px;margin-left: 8px;">调压箱防雷接地照片:</text>
  281. </view>
  282. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  283. <view v-for="(item,index) in value.lightning" :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: 200rpx; height: 200rpx; margin: 0 12rpx;"
  289. @click="showPhoto(index,value.lightning)">
  290. </image>
  291. </view>
  292. <view v-else>
  293. <video :src="item"
  294. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  295. </view>
  296. </view>
  297. </view>
  298. <view class="uni-common-mt" style="width: 100%;">
  299. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  300. #000;margin-top: 5px;margin-left: 8px;">调压箱底腿连接照片:</text>
  301. </view>
  302. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  303. <view v-for="(item,index) in value.bottomLeg" :key="index"
  304. style="position: relative;">
  305. <view
  306. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  307. <image :src="item" mode=""
  308. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"
  309. @click="showPhoto(index,value.bottomLeg)">
  310. </image>
  311. </view>
  312. <view v-else>
  313. <video :src="item"
  314. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  315. </view>
  316. </view>
  317. </view>
  318. <view class="uni-common-mt" style="width: 100%;">
  319. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  320. #000;margin-top: 5px;margin-left: 8px;">调压箱护栏及地面硬化(远景)照片:</text>
  321. </view>
  322. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  323. <view v-for="(item,index) in value.groundHardening" :key="index"
  324. style="position: relative;">
  325. <view
  326. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  327. <image :src="item" mode=""
  328. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"
  329. @click="showPhoto(index,value.groundHardening)">
  330. </image>
  331. </view>
  332. <view v-else>
  333. <video :src="item"
  334. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  335. </view>
  336. </view>
  337. </view>
  338. </view>
  339. <view v-else>
  340. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  341. <view v-for="(item,index) in value.zEngiineeringPhotoBoList" :key="index"
  342. style="position: relative;">
  343. <view
  344. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  345. <image :src="item" mode=""
  346. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"
  347. @click="showPhoto(index,value.zEngiineeringPhotoBoList)">
  348. </image>
  349. </view>
  350. <view v-else>
  351. <video :src="item"
  352. style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  353. </view>
  354. </view>
  355. </view>
  356. </view>
  357. </view>
  358. </view>
  359. </view>
  360. </scroll-view>
  361. </view>
  362. </view>
  363. </template>
  364. <script>
  365. export default {
  366. props: {
  367. data: {
  368. type: Object,
  369. default: {}
  370. },
  371. TitleType: {
  372. type: String
  373. }
  374. },
  375. created() {
  376. this.getParamsData();
  377. },
  378. watch: {
  379. data(data) {
  380. this.getParamsData();
  381. }
  382. },
  383. data() {
  384. return {
  385. outPutData: {},
  386. historyList: [], //历史数据
  387. historyPhotoList: [], //历史图片数据
  388. shareState: false,
  389. title: '',
  390. };
  391. },
  392. methods: {
  393. // isEmpty(str) {
  394. // return (!str || 0 === str.length);
  395. // },
  396. showPhoto(index, list) {
  397. let newArr = [];
  398. list.forEach((item, index) => {
  399. if (item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' ||
  400. item.substring(item.length - 4) == 'jpeg') {
  401. newArr.push(item)
  402. }
  403. });
  404. uni.previewImage({
  405. current: index,
  406. urls: newArr,
  407. })
  408. },
  409. getParamsData() {
  410. var selectData = this.data;
  411. this.outPutData = selectData;
  412. this.title = this.TitleType;
  413. this.historyList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList;
  414. },
  415. // 显示分享
  416. handleShowShare() {
  417. this.shareState = true;
  418. },
  419. // 隐藏分享
  420. handleHiddenShare() {
  421. this.shareState = false;
  422. }
  423. }
  424. }
  425. </script>
  426. <style lang="scss">
  427. .uni-media-list-body {
  428. border: 1px solid #eee;
  429. border-radius: 40rpx;
  430. margin: 10rpx 30rpx 20rpx;
  431. padding: 10rpx 0 40rpx;
  432. box-shadow: 0 0 5px #eee;
  433. }
  434. .share {
  435. width: 100%;
  436. height: 100%;
  437. }
  438. .tit-text {
  439. color: #4f535a;
  440. margin-right: 20rpx;
  441. }
  442. .normal-text {}
  443. .cz-style {
  444. background: #e8f4f9;
  445. margin: 20rpx;
  446. padding: 10rpx;
  447. border-radius: 20rpx;
  448. border: 1px solid #d4e3f0;
  449. }
  450. .uni-media-list-text-top {
  451. font-size: 14px;
  452. color: #696969;
  453. padding: 20rpx 20rpx;
  454. border-bottom: 1px solid #eee;
  455. display: flex;
  456. align-items: center;
  457. }
  458. .share-box {
  459. width: 100%;
  460. height: 100%;
  461. position: fixed;
  462. top: 0rpx;
  463. left: 0rpx;
  464. bottom: 0rpx;
  465. right: 0rpx;
  466. background-color: rgba(0, 0, 0, 0.4);
  467. transition: .3s;
  468. z-index: 999;
  469. }
  470. // 进入分享动画
  471. .share-show {
  472. transition: all 0.3s ease;
  473. transform: translateY(0%) !important;
  474. border-radius: 20px 20px 0px 0px;
  475. }
  476. .scroll-Y {
  477. height: 58vh;
  478. }
  479. // 离开分享动画
  480. .share-item {
  481. position: fixed;
  482. left: 0;
  483. bottom: 0;
  484. width: 100%;
  485. height: 70%;
  486. background-color: #FFFFFF;
  487. transition: all 0.3s ease;
  488. transform: translateY(100%);
  489. z-index: 1999;
  490. .share-to {
  491. width: 100%;
  492. height: 30px;
  493. display: flex;
  494. justify-content: center;
  495. margin: 30rpx 0;
  496. align-items: center;
  497. // &::after {
  498. // content: '';
  499. // width: 240rpx;
  500. // height: 0rpx;
  501. // border-top: 1px solid #E4E7ED;
  502. // -webkit-transform: scaleY(0.5);
  503. // transform: scaleY(0.5);
  504. // margin-left: 30rpx;
  505. // }
  506. // &::before {
  507. // content: '';
  508. // width: 240rpx;
  509. // height: 0rpx;
  510. // border-top: 1px solid #E4E7ED;
  511. // -webkit-transform: scaleY(0.5);
  512. // transform: scaleY(0.5);
  513. // margin-right: 30rpx;
  514. // }
  515. }
  516. .content {
  517. width: 100%;
  518. height: auto;
  519. display: flex;
  520. flex-wrap: wrap;
  521. .block {
  522. width: 100%;
  523. display: flex;
  524. flex-direction: column;
  525. justify-content: center;
  526. align-items: left;
  527. height: auto;
  528. image {
  529. width: 80rpx;
  530. height: 80rpx;
  531. }
  532. text {
  533. margin-top: 16rpx;
  534. font-size: 28rpx;
  535. color: #606266;
  536. }
  537. }
  538. }
  539. .cancel {
  540. width: 100%;
  541. height: 3rem;
  542. display: flex;
  543. justify-content: center;
  544. align-items: center;
  545. border-top: 1rpx solid #E4E7ED;
  546. }
  547. }
  548. </style>