bottomSheet.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  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. >
  17. <view class="tit-text">腐蚀等级:</view>{{value.zEngineeringMaterialBo[0].corrosionLevel}}</view>
  18. <view class="uni-media-list-text-top"
  19. >
  20. <view class="tit-text">施工时间:</view>{{value.createTime}}</view>
  21. </view>
  22. <view v-if="title=='打孔'">
  23. <view class="uni-media-list-text-top"
  24. >
  25. <view class="tit-text">孔距:</view>{{value.zEngineeringMaterialBo[0].corrosionLevel}}</view>
  26. <view class="uni-media-list-text-top"
  27. >
  28. <view class="tit-text">施工时间:</view>{{value.createTime}}</view>
  29. </view>
  30. <view v-else-if="title=='立杠'||title=='表后管'||title=='挂表'||title=='阀管'||title=='报警器切断阀'">
  31. <view class="uni-media-list-text-top"
  32. v-show="title=='阀管'">
  33. <view class="tit-text">上门类型:</view>{{value.zEngineeringMaterialBo[0].visitType}}</view>
  34. <view class="uni-media-list-text-top"
  35. v-show="title=='阀管'">
  36. <view class="tit-text">自闭阀类型:</view>{{value.zEngineeringMaterialBo[0].selfClosingValveType}}</view>
  37. <view class="uni-media-list-text-top"
  38. v-show="title=='立杠'||title=='表后管'||title=='阀管'">
  39. <view class="tit-text">材质:</view>{{value.zEngineeringMaterialBo[0].materialQualityName}}</view>
  40. <view class="uni-media-list-text-top"
  41. v-show="title=='立杠'||title=='表后管'||title=='阀管'">
  42. <view class="tit-text">规格:</view>{{value.zEngineeringMaterialBo[0].specificationsName}}</view>
  43. <view class="uni-media-list-text-top"
  44. v-show="title=='挂表'">
  45. <view class="tit-text">品牌:</view>{{value.zEngineeringMaterialBo[0].brand}}</view>
  46. <view class="uni-media-list-text-top"
  47. v-show="title=='报警器切断阀'">
  48. <view class="tit-text">厂家:</view>{{value.zEngineeringMaterialBo[0].brand}}</view>
  49. <view class="uni-media-list-text-top"
  50. v-show="title=='立杠'||title=='表后管'||title=='阀管'">
  51. <view class="tit-text">数量:</view>{{value.zEngineeringMaterialBo[0].number}}</view>
  52. <view class="uni-media-list-text-top"
  53. >
  54. <view class="tit-text">施工时间:</view>{{value.createTime}}</view>
  55. </view>
  56. <view
  57. v-else-if="title=='放线'||title=='挖沟'||title=='焊接'||title=='下沟'||title=='除锈'||title=='刷油'||title=='打磨'||title=='焊接'">
  58. <view class="uni-media-list-text-top"
  59. >
  60. <view class="tit-text">施工时间:</view>{{value.constructTime}}</view>
  61. <view class="uni-media-list-text-top">
  62. <view class="uni-common-mt" style="width: 100%;">
  63. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  64. #000;margin-top: 5px;">施工内容:</text>
  65. <view style="width: 100%;padding-right: 20rpx;box-sizing: border-box;">
  66. <textarea class="textarea" maxlength="255" :disabled="true"
  67. placeholder-style="padding: 10rpx;"
  68. style="width: 100%;height: 100%;border: 1rpx solid #cccccc; border-radius: 15rpx;padding: 10rpx;line-height:normal;"
  69. auto-height>{{value.remark}}</textarea>
  70. </view>
  71. </view>
  72. </view>
  73. <view class="uni-media-list-text-top"
  74. >
  75. <view class="tit-text">材质:</view>{{value.zEngineeringMaterialBo[0].materialQualityName}}</view>
  76. <view class="uni-media-list-text-top"
  77. >
  78. <view class="tit-text">规格:</view>{{value.zEngineeringMaterialBo[0].specificationsName}}</view>
  79. <view class="uni-media-list-text-top"
  80. >
  81. <view class="tit-text">数量:</view>{{value.zEngineeringMaterialBo[0].number}}</view>
  82. </view>
  83. <view v-else-if="title=='回填'">
  84. <view class="uni-media-list-text-top"
  85. >
  86. <view class="tit-text">施工时间:</view>{{value.constructTime}}</view>
  87. <view class="uni-media-list-text-top"
  88. >
  89. <view class="tit-text">回填时间:</view>{{value.backfillTime}}</view>
  90. <view class="uni-media-list-text-top">
  91. <view class="uni-common-mt" style="width: 100%;">
  92. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  93. #000;margin-top: 5px;">施工内容:</text>
  94. <view style="width: 100%;padding-right: 20rpx;box-sizing: border-box;">
  95. <textarea class="textarea" maxlength="255" :disabled="true"
  96. placeholder-style="padding: 10rpx;"
  97. style="width: 100%;height: 100%;border: 1rpx solid #cccccc; border-radius: 15rpx;padding: 10rpx;line-height:normal;"
  98. auto-height>{{value.remark}}</textarea>
  99. </view>
  100. </view>
  101. </view>
  102. <view class="uni-media-list-text-top"
  103. >
  104. <view class="tit-text">材质:</view>{{value.zEngineeringMaterialBo[0].materialQualityName}}</view>
  105. <view class="uni-media-list-text-top"
  106. >
  107. <view class="tit-text">规格:</view>{{value.zEngineeringMaterialBo[0].specificationsName}}</view>
  108. <view class="uni-media-list-text-top"
  109. >
  110. <view class="tit-text">数量:</view>{{value.zEngineeringMaterialBo[0].number}}</view>
  111. </view>
  112. <view v-else-if="title=='打压'">
  113. <view class="uni-media-list-text-top"
  114. >
  115. <view class="tit-text">施工时间:</view>{{value.constructTime}}</view>
  116. <view class="uni-media-list-text-top"
  117. >
  118. 分段打压是否台格:{{value.segmentedCompressionQualified=='Y'?'是':'否'}}</view>
  119. <view class="uni-media-list-text-top">
  120. <view class="uni-common-mt" style="width: 100%;">
  121. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  122. #000;margin-top: 5px;">施工内容:</text>
  123. <view style="width: 100%;padding-right: 20rpx;box-sizing: border-box;">
  124. <textarea class="textarea" maxlength="255" :disabled="true"
  125. placeholder-style="padding: 10rpx;"
  126. style="width: 100%;height: 100%;border: 1rpx solid #cccccc; border-radius: 15rpx;padding: 10rpx;line-height:normal;"
  127. auto-height>{{value.remark}}</textarea>
  128. </view>
  129. </view>
  130. </view>
  131. <view class="uni-media-list-text-top"
  132. >
  133. <view class="tit-text">材质:</view>{{value.zEngineeringMaterialBo[0].materialQualityName}}</view>
  134. <view class="uni-media-list-text-top"
  135. >
  136. <view class="tit-text">规格:</view>{{value.zEngineeringMaterialBo[0].specificationsName}}</view>
  137. <view class="uni-media-list-text-top"
  138. >
  139. <view class="tit-text">数量:</view>{{value.zEngineeringMaterialBo[0].number}}</view>
  140. </view>
  141. <view class="uni-media-list-text-top">
  142. <view class="tit-text">负责人:</view>
  143. <text
  144. >{{value.constructUser}}</text>
  145. </view>
  146. <view class="uni-media-list-text-top">
  147. <view class="tit-text">负责人联系电话:</view>
  148. <text
  149. >{{value.constructPhone}}</text>
  150. </view>
  151. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  152. <text style="margin-left: 30rpx;margin-top: 6rpx;">{{ value.published_at }}</text>
  153. <view v-for="(item,index) in value.zEngiineeringPhotoBoList" :key="index"
  154. style="position: relative;">
  155. <view
  156. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  157. <image :src="item" mode=""
  158. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  159. @click="showPhoto(index,value.zEngiineeringPhotoBoList)">
  160. </image>
  161. </view>
  162. <view v-else>
  163. <video :src="item"
  164. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  165. </view>
  166. </view>
  167. </view>
  168. </view>
  169. </view>
  170. </view>
  171. </scroll-view>
  172. </view>
  173. </view>
  174. </template>
  175. <script>
  176. export default {
  177. props: {
  178. data: {
  179. type: Object,
  180. default: {}
  181. },
  182. },
  183. created() {
  184. this.getParamsData();
  185. },
  186. watch: {
  187. data(data) {
  188. this.getParamsData();
  189. }
  190. },
  191. data() {
  192. return {
  193. outPutData: {},
  194. historyList: [], //历史数据
  195. historyPhotoList: [], //历史图片数据
  196. shareState: false,
  197. title: '',
  198. };
  199. },
  200. methods: {
  201. showPhoto(index, list) {
  202. uni.previewImage({
  203. current: index,
  204. urls: list,
  205. })
  206. },
  207. getParamsData() {
  208. var selectData = this.data;
  209. this.outPutData = selectData;
  210. this.title = selectData.zEngineeringNodeBo.type;
  211. this.historyList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList;
  212. //this.historyPhotoList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList.zEngiineeringPhotoBoList;
  213. },
  214. // 显示分享
  215. handleShowShare() {
  216. this.shareState = true;
  217. },
  218. // 隐藏分享
  219. handleHiddenShare() {
  220. this.shareState = false;
  221. }
  222. }
  223. }
  224. </script>
  225. <style lang="scss">
  226. .uni-media-list-body{
  227. border:1px solid #eee;
  228. border-radius: 40rpx;
  229. margin:10rpx 30rpx 20rpx;
  230. padding: 10rpx 0 40rpx;
  231. box-shadow: 0 0 5px #eee;
  232. }
  233. .share {
  234. width: 100%;
  235. height: 100%;
  236. }
  237. .tit-text {
  238. color: #4f535a;
  239. margin-right: 20rpx;
  240. }
  241. .normal-text{
  242. }
  243. .cz-style{
  244. background: #e8f4f9;
  245. margin: 20rpx;
  246. padding: 10rpx;
  247. border-radius: 20rpx;
  248. border: 1px solid #d4e3f0;
  249. }
  250. .uni-media-list-text-top {
  251. font-size: 14px;
  252. color: #696969;
  253. padding: 20rpx 20rpx;
  254. border-bottom: 1px solid #eee;
  255. display: flex;
  256. align-items: center;
  257. }
  258. .share-box {
  259. width: 100%;
  260. height: 100%;
  261. position: fixed;
  262. top: 0rpx;
  263. left: 0rpx;
  264. bottom: 0rpx;
  265. right: 0rpx;
  266. background-color: rgba(0, 0, 0, 0.4);
  267. transition: .3s;
  268. z-index: 999;
  269. }
  270. // 进入分享动画
  271. .share-show {
  272. transition: all 0.3s ease;
  273. transform: translateY(0%) !important;
  274. border-radius: 20px 20px 0px 0px;
  275. }
  276. .scroll-Y {
  277. height: 58vh;
  278. }
  279. // 离开分享动画
  280. .share-item {
  281. position: fixed;
  282. left: 0;
  283. bottom: 0;
  284. width: 100%;
  285. height: 70%;
  286. background-color: #FFFFFF;
  287. transition: all 0.3s ease;
  288. transform: translateY(100%);
  289. z-index: 1999;
  290. .share-to {
  291. width: 100%;
  292. height: 30px;
  293. display: flex;
  294. justify-content: left;
  295. margin: 30rpx 35rpx;
  296. align-items: center;
  297. // &::after {
  298. // content: '';
  299. // width: 240rpx;
  300. // height: 0rpx;
  301. // border-top: 1px solid #E4E7ED;
  302. // -webkit-transform: scaleY(0.5);
  303. // transform: scaleY(0.5);
  304. // margin-left: 30rpx;
  305. // }
  306. // &::before {
  307. // content: '';
  308. // width: 240rpx;
  309. // height: 0rpx;
  310. // border-top: 1px solid #E4E7ED;
  311. // -webkit-transform: scaleY(0.5);
  312. // transform: scaleY(0.5);
  313. // margin-right: 30rpx;
  314. // }
  315. }
  316. .content {
  317. width: 100%;
  318. height: auto;
  319. display: flex;
  320. flex-wrap: wrap;
  321. .block {
  322. width: 100%;
  323. display: flex;
  324. flex-direction: column;
  325. justify-content: center;
  326. align-items: left;
  327. height: auto;
  328. image {
  329. width: 80rpx;
  330. height: 80rpx;
  331. }
  332. text {
  333. margin-top: 16rpx;
  334. font-size: 28rpx;
  335. color: #606266;
  336. }
  337. }
  338. }
  339. .cancel {
  340. width: 100%;
  341. height: 3rem;
  342. display: flex;
  343. justify-content: center;
  344. align-items: center;
  345. border-top: 1rpx solid #E4E7ED;
  346. }
  347. }
  348. </style>