艺易修小程序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.

210 lines
4.1 KiB

8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 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. }
  51. },
  52. onShow() {
  53. this.getRepairList()
  54. },
  55. methods: {
  56. //跳转驳回
  57. toReject(id) {
  58. uni.navigateTo({
  59. url: `/pages/reject/reject?orderId=${id}`
  60. })
  61. },
  62. //跳转结单页面
  63. toFinish(id) {
  64. uni.navigateTo({
  65. url: `/pages/finish/finish?orderId=${id}`
  66. })
  67. },
  68. //查看图片
  69. viewImageAsList(index, imgArr) {
  70. this.currentIndex = index
  71. this.$utils.previewImage({
  72. current: this.currentIndex,
  73. urls: imgArr
  74. })
  75. },
  76. //选择了顶部的标签
  77. selectTag(tag) {
  78. console.log(tag);
  79. },
  80. //获取报修列表
  81. getRepairList() {
  82. this.$api('getSchoolOrderPage', this.form, res => {
  83. if (res.code == 200) {
  84. res.result.records.forEach(item => {
  85. item.image ? item.image = item.image.split(',') : item.image = []
  86. })
  87. this.repairList = res.result.records
  88. }
  89. })
  90. }
  91. },
  92. computed: {
  93. shadowStyle() {
  94. return {
  95. // #ifndef APP-NVUE
  96. backgroundImage: "linear-gradient(-180deg, rgba(255, 255, 255, 0) 0%, #fff 80%)",
  97. // #endif
  98. // #ifdef APP-NVUE
  99. // nvue上不支持设置复杂的backgroundImage属性
  100. backgroundImage: "linear-gradient(to top, #fff, rgba(255, 255, 255, 0.5))",
  101. // #endif
  102. paddingTop: "50px",
  103. marginTop: "-50px",
  104. }
  105. }
  106. }
  107. }
  108. </script>
  109. <style scoped>
  110. .repairList {
  111. background: #f8f8f8;
  112. }
  113. .tab {
  114. display: flex;
  115. align-items: center;
  116. height: 80rpx;
  117. background: white;
  118. margin-bottom: 20rpx;
  119. }
  120. .repairList-main {
  121. min-height: 100vh;
  122. }
  123. .repairItem {
  124. display: flex;
  125. background: white;
  126. width: 96%;
  127. margin: 0rpx auto;
  128. border-radius: 20rpx;
  129. margin-bottom: 20rpx;
  130. }
  131. .repairMain {
  132. width: 100%;
  133. box-sizing: border-box;
  134. padding-left: 20rpx;
  135. }
  136. /*
  137. .userName {
  138. font-size: 32rpx;
  139. margin: 10rpx 0rpx;
  140. } */
  141. .build {
  142. display: flex;
  143. justify-content: space-between;
  144. font-size: 28rpx;
  145. margin: 20rpx 0rpx;
  146. }
  147. .desc {
  148. overflow-y: scroll;
  149. margin-bottom: 20rpx;
  150. }
  151. .repairImages {
  152. display: flex;
  153. flex-wrap: wrap;
  154. margin: 10rpx 0rpx;
  155. }
  156. .image-item {
  157. width: 24%;
  158. margin-left: 1%;
  159. height: 180rpx;
  160. overflow: hidden;
  161. display: flex;
  162. align-items: center;
  163. justify-content: center;
  164. padding: 20rpx;
  165. background: #f5f5f5;
  166. border-radius: 20rpx;
  167. }
  168. .image-item image {
  169. width: 100%;
  170. }
  171. .btns {
  172. margin: 20rpx 0rpx;
  173. display: flex;
  174. justify-content: flex-end;
  175. }
  176. .btn {
  177. width: 200rpx;
  178. height: 50rpx;
  179. display: flex;
  180. align-items: center;
  181. justify-content: center;
  182. border-radius: 50rpx;
  183. margin-left: 15rpx;
  184. font-size: 30rpx;
  185. color: white;
  186. background: #f9ae3d;
  187. }
  188. .btn:nth-child(2) {
  189. background: #3c9cff;
  190. }
  191. </style>