艺易修小程序24.08.21
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

216 lines
4.2 KiB

11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
  1. <template>
  2. <view class="repairList reserveSpace">
  3. <view class="tab">
  4. <uv-tabs :list="list" lineWidth="60" lineHeight="10" @click="selectTag"></uv-tabs>
  5. </view>
  6. <view class="repairList-main">
  7. <view v-for="item in repairList" :key="item.id" class="repairItem">
  8. <view class="repairMain">
  9. <!-- <view class="userName">用户名</view> -->
  10. <view class="build">
  11. <view>
  12. <text style="margin-right: 10rpx;">{{ item.building }}</text>
  13. <text> {{ item.room }}</text>
  14. </view>
  15. <text style="font-size: 26rpx;">{{ item.createTime }}</text>
  16. </view>
  17. <view class="desc">
  18. <uv-read-more :shadowStyle="shadowStyle" show-height="80rpx" fontSize="30rpx" :toggle="true">
  19. <view>
  20. {{ item.context }}
  21. </view>
  22. </uv-read-more>
  23. </view>
  24. <view class="repairImages">
  25. <view v-for="(image,index) in item.image" :key="index" class="image-item">
  26. <image @click="viewImageAsList(index,item.image)" :src="image" mode="widthFix"></image>
  27. </view>
  28. </view>
  29. <view class="btns">
  30. <view @click="toReject(item.id)" class="btn">驳回</view>
  31. <view @click="toFinish(item.id)" class="btn">结单</view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. export default {
  40. data() {
  41. return {
  42. list: [{
  43. name: '待完成',
  44. }, {
  45. name: '已完成',
  46. }],
  47. current: 0,
  48. currentIndex: 0,
  49. repairList: [], //报修列表
  50. queryParams : {
  51. pageNo : 1,
  52. pageSize : 10,
  53. // state : 0
  54. }
  55. }
  56. },
  57. onShow() {
  58. this.getRepairList()
  59. },
  60. methods: {
  61. //跳转驳回
  62. toReject(id) {
  63. uni.navigateTo({
  64. url: `/pages/reject/reject?orderId=${id}`
  65. })
  66. },
  67. //跳转结单页面
  68. toFinish(id) {
  69. uni.navigateTo({
  70. url: `/pages/finish/finish?orderId=${id}`
  71. })
  72. },
  73. //查看图片
  74. viewImageAsList(index, imgArr) {
  75. this.currentIndex = index
  76. this.$utils.previewImage({
  77. current: this.currentIndex,
  78. urls: imgArr
  79. })
  80. },
  81. //选择了顶部的标签
  82. selectTag(tag) {
  83. console.log(tag);
  84. // this.queryParams.state = tag
  85. },
  86. //获取报修列表
  87. getRepairList() {
  88. this.$api('getSchoolOrderPage', this.queryParams, res => {
  89. if (res.code == 200) {
  90. res.result.records.forEach(item => {
  91. item.image ? item.image = item.image.split(',') : item.image = []
  92. })
  93. this.repairList = res.result.records
  94. }
  95. })
  96. }
  97. },
  98. computed: {
  99. shadowStyle() {
  100. return {
  101. // #ifndef APP-NVUE
  102. backgroundImage: "linear-gradient(-180deg, rgba(255, 255, 255, 0) 0%, #fff 80%)",
  103. // #endif
  104. // #ifdef APP-NVUE
  105. // nvue上不支持设置复杂的backgroundImage属性
  106. backgroundImage: "linear-gradient(to top, #fff, rgba(255, 255, 255, 0.5))",
  107. // #endif
  108. paddingTop: "50px",
  109. marginTop: "-50px",
  110. }
  111. }
  112. }
  113. }
  114. </script>
  115. <style scoped>
  116. .repairList {
  117. background: #f8f8f8;
  118. }
  119. .tab {
  120. display: flex;
  121. align-items: center;
  122. height: 80rpx;
  123. background: white;
  124. margin-bottom: 20rpx;
  125. }
  126. .repairList-main {
  127. min-height: 100vh;
  128. }
  129. .repairItem {
  130. display: flex;
  131. background: white;
  132. width: 96%;
  133. margin: 0rpx auto;
  134. border-radius: 20rpx;
  135. margin-bottom: 20rpx;
  136. }
  137. .repairMain {
  138. width: 100%;
  139. box-sizing: border-box;
  140. padding-left: 20rpx;
  141. }
  142. /*
  143. .userName {
  144. font-size: 32rpx;
  145. margin: 10rpx 0rpx;
  146. } */
  147. .build {
  148. display: flex;
  149. justify-content: space-between;
  150. font-size: 28rpx;
  151. margin: 20rpx 0rpx;
  152. }
  153. .desc {
  154. overflow-y: scroll;
  155. margin-bottom: 20rpx;
  156. }
  157. .repairImages {
  158. display: flex;
  159. flex-wrap: wrap;
  160. margin: 10rpx 0rpx;
  161. }
  162. .image-item {
  163. width: 24%;
  164. margin-left: 1%;
  165. height: 180rpx;
  166. overflow: hidden;
  167. display: flex;
  168. align-items: center;
  169. justify-content: center;
  170. padding: 20rpx;
  171. background: #f5f5f5;
  172. border-radius: 20rpx;
  173. }
  174. .image-item image {
  175. width: 100%;
  176. }
  177. .btns {
  178. margin: 20rpx 0rpx;
  179. display: flex;
  180. justify-content: flex-end;
  181. }
  182. .btn {
  183. width: 200rpx;
  184. height: 50rpx;
  185. display: flex;
  186. align-items: center;
  187. justify-content: center;
  188. border-radius: 50rpx;
  189. margin-left: 15rpx;
  190. font-size: 30rpx;
  191. color: white;
  192. background: #f9ae3d;
  193. }
  194. .btn:nth-child(2) {
  195. background: #3c9cff;
  196. }
  197. </style>