bottomSheet.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  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-else-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-else-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-else-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-else>
  164. <view class="uni-media-list-text-top">
  165. <view class="tit-text">负责人:</view>
  166. <text>{{value.constructUser}}</text>
  167. </view>
  168. <view class="uni-media-list-text-top">
  169. <view class="tit-text">负责人联系电话:</view>
  170. <text>{{value.constructPhone}}</text>
  171. </view>
  172. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  173. <view v-for="(item,index) in value.zEngiineeringPhotoBoList" :key="index"
  174. style="position: relative;">
  175. <view
  176. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  177. <image :src="item" mode=""
  178. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  179. @click="showPhoto(index,value.zEngiineeringPhotoBoList)">
  180. </image>
  181. </view>
  182. <view v-else>
  183. <video :src="item"
  184. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  185. </view>
  186. </view>
  187. </view>
  188. </view>
  189. </view>
  190. </view>
  191. </view>
  192. </scroll-view>
  193. </view>
  194. </view>
  195. </template>
  196. <script>
  197. export default {
  198. props: {
  199. data: {
  200. type: Object,
  201. default: {}
  202. },
  203. },
  204. created() {
  205. this.getParamsData();
  206. },
  207. watch: {
  208. data(data) {
  209. this.getParamsData();
  210. }
  211. },
  212. data() {
  213. return {
  214. outPutData: {},
  215. historyList: [], //历史数据
  216. historyPhotoList: [], //历史图片数据
  217. shareState: false,
  218. title: '',
  219. };
  220. },
  221. methods: {
  222. showPhoto(index, list) {
  223. uni.previewImage({
  224. current: index,
  225. urls: list,
  226. })
  227. },
  228. getParamsData() {
  229. var selectData = this.data;
  230. this.outPutData = selectData;
  231. this.title = selectData.zEngineeringNodeBo.type;
  232. this.historyList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList;
  233. //this.historyPhotoList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList.zEngiineeringPhotoBoList;
  234. },
  235. // 显示分享
  236. handleShowShare() {
  237. this.shareState = true;
  238. },
  239. // 隐藏分享
  240. handleHiddenShare() {
  241. this.shareState = false;
  242. }
  243. }
  244. }
  245. </script>
  246. <style lang="scss">
  247. .uni-media-list-body {
  248. border: 1px solid #eee;
  249. border-radius: 40rpx;
  250. margin: 10rpx 30rpx 20rpx;
  251. padding: 10rpx 0 40rpx;
  252. box-shadow: 0 0 5px #eee;
  253. }
  254. .share {
  255. width: 100%;
  256. height: 100%;
  257. }
  258. .tit-text {
  259. color: #4f535a;
  260. margin-right: 20rpx;
  261. }
  262. .normal-text {}
  263. .cz-style {
  264. background: #e8f4f9;
  265. margin: 20rpx;
  266. padding: 10rpx;
  267. border-radius: 20rpx;
  268. border: 1px solid #d4e3f0;
  269. }
  270. .uni-media-list-text-top {
  271. font-size: 14px;
  272. color: #696969;
  273. padding: 20rpx 20rpx;
  274. border-bottom: 1px solid #eee;
  275. display: flex;
  276. align-items: center;
  277. }
  278. .share-box {
  279. width: 100%;
  280. height: 100%;
  281. position: fixed;
  282. top: 0rpx;
  283. left: 0rpx;
  284. bottom: 0rpx;
  285. right: 0rpx;
  286. background-color: rgba(0, 0, 0, 0.4);
  287. transition: .3s;
  288. z-index: 999;
  289. }
  290. // 进入分享动画
  291. .share-show {
  292. transition: all 0.3s ease;
  293. transform: translateY(0%) !important;
  294. border-radius: 20px 20px 0px 0px;
  295. }
  296. .scroll-Y {
  297. height: 58vh;
  298. }
  299. // 离开分享动画
  300. .share-item {
  301. position: fixed;
  302. left: 0;
  303. bottom: 0;
  304. width: 100%;
  305. height: 70%;
  306. background-color: #FFFFFF;
  307. transition: all 0.3s ease;
  308. transform: translateY(100%);
  309. z-index: 1999;
  310. .share-to {
  311. width: 100%;
  312. height: 30px;
  313. display: flex;
  314. justify-content: left;
  315. margin: 30rpx 35rpx;
  316. align-items: center;
  317. // &::after {
  318. // content: '';
  319. // width: 240rpx;
  320. // height: 0rpx;
  321. // border-top: 1px solid #E4E7ED;
  322. // -webkit-transform: scaleY(0.5);
  323. // transform: scaleY(0.5);
  324. // margin-left: 30rpx;
  325. // }
  326. // &::before {
  327. // content: '';
  328. // width: 240rpx;
  329. // height: 0rpx;
  330. // border-top: 1px solid #E4E7ED;
  331. // -webkit-transform: scaleY(0.5);
  332. // transform: scaleY(0.5);
  333. // margin-right: 30rpx;
  334. // }
  335. }
  336. .content {
  337. width: 100%;
  338. height: auto;
  339. display: flex;
  340. flex-wrap: wrap;
  341. .block {
  342. width: 100%;
  343. display: flex;
  344. flex-direction: column;
  345. justify-content: center;
  346. align-items: left;
  347. height: auto;
  348. image {
  349. width: 80rpx;
  350. height: 80rpx;
  351. }
  352. text {
  353. margin-top: 16rpx;
  354. font-size: 28rpx;
  355. color: #606266;
  356. }
  357. }
  358. }
  359. .cancel {
  360. width: 100%;
  361. height: 3rem;
  362. display: flex;
  363. justify-content: center;
  364. align-items: center;
  365. border-top: 1rpx solid #E4E7ED;
  366. }
  367. }
  368. </style>