photo.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <template>
  2. <view class="photo">
  3. <view class="top">
  4. </view>
  5. <view class="head">
  6. <span class="cuIcon-back" @click="back"></span>
  7. <view class="case">
  8. {{businessType==3?'车辆照片':'现场照片'}}
  9. </view>
  10. </view>
  11. <view class="content">
  12. <view class="img" v-for="(item,index) in imgList" :key="index">
  13. <image :src="item.imgUrl" mode=""></image>
  14. <!-- <span v-if="item.imgType == 1 &&businessType != 4">正前方</span>
  15. <span v-if="item.imgType == 4 &&businessType != 4">车辆后侧</span>
  16. <span v-if="item.imgType == 2 &&businessType != 4">车辆左侧</span>
  17. <span v-if="item.imgType == 3 &&businessType != 4">车辆右侧</span>
  18. <span v-if="item.imgType == 6 &&businessType != 4">驾驶室</span>
  19. <span v-if="item.imgType == 5 &&businessType != 4">左前方45度全车照</span>
  20. <span v-if="item.imgType == 7 &&businessType != 4">后排座</span>
  21. <span v-if="item.imgType == 8 &&businessType != 4">服务前</span>
  22. <span v-if="item.imgType == 9 &&businessType != 4">服务中</span>
  23. <span v-if="item.imgType == 10 &&businessType != 4">服务后</span> -->
  24. </view>
  25. </view>
  26. <view class="btn">
  27. <view class="back" @click="back">
  28. 返回
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. data() {
  36. return {
  37. taskId: '',
  38. businessType: '',
  39. imgList: [{
  40. url: '/static/blue.png',
  41. address: '正前方'
  42. },
  43. {
  44. url: '/static/blue.png',
  45. address: '车辆后侧'
  46. },
  47. {
  48. url: '/static/blue.png',
  49. address: '车辆左侧'
  50. },
  51. {
  52. url: '/static/blue.png',
  53. address: '正前方'
  54. },
  55. {
  56. url: '/static/blue.png',
  57. address: '正前方'
  58. },
  59. {
  60. url: '/static/blue.png',
  61. address: '正前方'
  62. },
  63. {
  64. url: '/static/blue.png',
  65. address: '正前方'
  66. }
  67. ]
  68. }
  69. },
  70. methods: {
  71. //返回
  72. back() {
  73. uni.navigateBack({
  74. delta: 1
  75. });
  76. },
  77. //查看照片
  78. getImg() {
  79. let data = {
  80. taskId: this.taskId,
  81. businessType: Number(this.businessType)
  82. }
  83. this.$http.get("/ts/merchant/selectImg?taskId=" + this.taskId + '&businessType=' + Number(this.businessType))
  84. .then(res => {
  85. if (res.data.code == 200) {
  86. // this.isSuccess = true
  87. this.imgList = res.data.result
  88. console.log(this.imgList)
  89. }
  90. })
  91. }
  92. },
  93. onLoad(options) {
  94. this.taskId = options.taskId
  95. this.businessType = options.businessType
  96. console.log(options.businessType)
  97. },
  98. onShow() {
  99. this.getImg()
  100. }
  101. }
  102. </script>
  103. <style lang="scss" scoped>
  104. .photo {
  105. width: 100vw;
  106. height: 100vh;
  107. background: #F8F8FA;
  108. display: flex;
  109. flex-direction: column;
  110. // justify-content: space-between;
  111. // overflow-y: auto;
  112. /*#ifdef APP-PLUS*/
  113. .top {
  114. width: 100%;
  115. height: var(--status-bar-height);
  116. background: #FFFFFF;
  117. }
  118. /*#endif*/
  119. .head {
  120. width: 100%;
  121. height: 112rpx;
  122. padding: 20rpx;
  123. display: flex;
  124. align-items: center;
  125. background: #FFFFFF;
  126. position: relative;
  127. .cuIcon-back {
  128. font-size: 40rpx;
  129. margin-right: 40rpx;
  130. }
  131. .case {
  132. position: absolute;
  133. left: 50%;
  134. transform: translateX(-50%);
  135. font-size: 36rpx;
  136. font-weight: 600;
  137. }
  138. }
  139. .content {
  140. // flex: 1;
  141. overflow-y: auto;
  142. padding: 24rpx 28rpx;
  143. display: flex;
  144. justify-content: space-between;
  145. flex-wrap: wrap;
  146. // gap: 24rpx;
  147. .img {
  148. width: 320rpx;
  149. height: 194rpx;
  150. border-radius: 4rpx;
  151. overflow: hidden;
  152. position: relative;
  153. margin-bottom: 33rpx;
  154. display: flex;
  155. image {
  156. width: 100%;
  157. height: 100%;
  158. }
  159. .tag {}
  160. span {
  161. position: absolute;
  162. display: block;
  163. padding: 2px 4px;
  164. height: 34rpx;
  165. background: #2D88F4;
  166. border-radius: 0px 4rpx 4rpx 0px;
  167. font-size: 20rpx;
  168. color: #FFFFFF;
  169. z-index: 999999;
  170. }
  171. }
  172. }
  173. .btn {
  174. position: fixed;
  175. bottom: 0;
  176. width: 100%;
  177. height: 112rpx;
  178. background: #FFFFFF;
  179. display: flex;
  180. align-items: center;
  181. justify-content: center;
  182. margin-top: 10rpx;
  183. font-size: 28rpx;
  184. padding: 24rpx 16rpx;
  185. .back {
  186. width: 100%;
  187. height: 100%;
  188. background: linear-gradient(90deg, #77B6FF 0%, #449AFF 100%);
  189. border-radius: 53rpx;
  190. display: flex;
  191. align-items: center;
  192. justify-content: center;
  193. font-size: 28rpx;
  194. color: #FFFFFF;
  195. }
  196. }
  197. }
  198. </style>