bottomSheetMore.vue 11 KB

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