bottomSheetMore.vue 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  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.ductalEpithelium" :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.ductalEpithelium)">
  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.trenchProspect" :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.trenchProspect)">
  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.video" :key="index" style="position: relative;">
  99. <view
  100. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  101. <image :src="item" mode=""
  102. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  103. @click="showPhoto(index,value.video)">
  104. </image>
  105. </view>
  106. <view v-else>
  107. <video :src="item"
  108. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  109. </view>
  110. </view>
  111. </view>
  112. </view>
  113. <view v-else>
  114. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  115. <view v-for="(item,index) in value.zEngiineeringPhotoBoList" :key="index"
  116. style="position: relative;">
  117. <view
  118. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  119. <image :src="item" mode=""
  120. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  121. @click="showPhoto(index,value.zEngiineeringPhotoBoList)">
  122. </image>
  123. </view>
  124. <view v-else>
  125. <video :src="item"
  126. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  127. </view>
  128. </view>
  129. </view>
  130. </view>
  131. </view>
  132. </view>
  133. </view>
  134. </scroll-view>
  135. </view>
  136. </view>
  137. </template>
  138. <script>
  139. export default {
  140. props: {
  141. data: {
  142. type: Object,
  143. default: {}
  144. },
  145. TitleType: {
  146. type: String
  147. }
  148. },
  149. created() {
  150. this.getParamsData();
  151. },
  152. watch: {
  153. data(data) {
  154. this.getParamsData();
  155. }
  156. },
  157. data() {
  158. return {
  159. outPutData: {},
  160. historyList: [], //历史数据
  161. historyPhotoList: [], //历史图片数据
  162. shareState: false,
  163. title: '',
  164. };
  165. },
  166. methods: {
  167. // isEmpty(str) {
  168. // return (!str || 0 === str.length);
  169. // },
  170. showPhoto(index, list) {
  171. uni.previewImage({
  172. current: index,
  173. urls: list,
  174. })
  175. },
  176. getParamsData() {
  177. var selectData = this.data;
  178. this.outPutData = selectData;
  179. //this.title = selectData.zEngineeringNodeBo.type;
  180. //this.historyList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList;
  181. if (this.TitleType == '市政工程') {
  182. this.title = '市政工程';
  183. this.historyList = selectData.zEngineeringNodeBoList[0].zEngineeringInfoBoList;
  184. } else {
  185. this.title = this.TitleType;
  186. this.historyList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList;
  187. }
  188. },
  189. // 显示分享
  190. handleShowShare() {
  191. this.shareState = true;
  192. },
  193. // 隐藏分享
  194. handleHiddenShare() {
  195. this.shareState = false;
  196. }
  197. }
  198. }
  199. </script>
  200. <style lang="scss">
  201. .uni-media-list-body {
  202. border: 1px solid #eee;
  203. border-radius: 40rpx;
  204. margin: 10rpx 30rpx 20rpx;
  205. padding: 10rpx 0 40rpx;
  206. box-shadow: 0 0 5px #eee;
  207. }
  208. .share {
  209. width: 100%;
  210. height: 100%;
  211. }
  212. .tit-text {
  213. color: #4f535a;
  214. margin-right: 20rpx;
  215. }
  216. .normal-text {}
  217. .cz-style {
  218. background: #e8f4f9;
  219. margin: 20rpx;
  220. padding: 10rpx;
  221. border-radius: 20rpx;
  222. border: 1px solid #d4e3f0;
  223. }
  224. .uni-media-list-text-top {
  225. font-size: 14px;
  226. color: #696969;
  227. padding: 20rpx 20rpx;
  228. border-bottom: 1px solid #eee;
  229. display: flex;
  230. align-items: center;
  231. }
  232. .share-box {
  233. width: 100%;
  234. height: 100%;
  235. position: fixed;
  236. top: 0rpx;
  237. left: 0rpx;
  238. bottom: 0rpx;
  239. right: 0rpx;
  240. background-color: rgba(0, 0, 0, 0.4);
  241. transition: .3s;
  242. z-index: 999;
  243. }
  244. // 进入分享动画
  245. .share-show {
  246. transition: all 0.3s ease;
  247. transform: translateY(0%) !important;
  248. border-radius: 20px 20px 0px 0px;
  249. }
  250. .scroll-Y {
  251. height: 58vh;
  252. }
  253. // 离开分享动画
  254. .share-item {
  255. position: fixed;
  256. left: 0;
  257. bottom: 0;
  258. width: 100%;
  259. height: 70%;
  260. background-color: #FFFFFF;
  261. transition: all 0.3s ease;
  262. transform: translateY(100%);
  263. z-index: 1999;
  264. .share-to {
  265. width: 100%;
  266. height: 30px;
  267. display: flex;
  268. justify-content: left;
  269. margin: 30rpx 35rpx;
  270. align-items: center;
  271. // &::after {
  272. // content: '';
  273. // width: 240rpx;
  274. // height: 0rpx;
  275. // border-top: 1px solid #E4E7ED;
  276. // -webkit-transform: scaleY(0.5);
  277. // transform: scaleY(0.5);
  278. // margin-left: 30rpx;
  279. // }
  280. // &::before {
  281. // content: '';
  282. // width: 240rpx;
  283. // height: 0rpx;
  284. // border-top: 1px solid #E4E7ED;
  285. // -webkit-transform: scaleY(0.5);
  286. // transform: scaleY(0.5);
  287. // margin-right: 30rpx;
  288. // }
  289. }
  290. .content {
  291. width: 100%;
  292. height: auto;
  293. display: flex;
  294. flex-wrap: wrap;
  295. .block {
  296. width: 100%;
  297. display: flex;
  298. flex-direction: column;
  299. justify-content: center;
  300. align-items: left;
  301. height: auto;
  302. image {
  303. width: 80rpx;
  304. height: 80rpx;
  305. }
  306. text {
  307. margin-top: 16rpx;
  308. font-size: 28rpx;
  309. color: #606266;
  310. }
  311. }
  312. }
  313. .cancel {
  314. width: 100%;
  315. height: 3rem;
  316. display: flex;
  317. justify-content: center;
  318. align-items: center;
  319. border-top: 1rpx solid #E4E7ED;
  320. }
  321. }
  322. </style>