学员端小程序
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.

180 lines
4.2 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="consultItem">
  3. <view class="top_row">
  4. <view class="flex">
  5. <view class="tag"> {{ item.complainDO.userType==1?'投诉驾校':'投诉教练'}}</view>
  6. <view class="tag">{{ item.complainType }}</view>
  7. </view>
  8. <view class="status">{{dealStatus[item.complainDO.dealStatus]}}</view>
  9. </view>
  10. <view class="target">
  11. <view class="row">
  12. <view class="leftLab">
  13. <view class="icon">
  14. <image src="@/static/images/car/ic_jiaxiao.png" mode=""></image>
  15. </view>
  16. <view class="lab">驾校名称</view>
  17. </view>
  18. <view class="name towRowText">{{ item.complainDO.schoolName }}</view>
  19. </view>
  20. <view class="row" v-if="item.complainDO.coachName">
  21. <view class="leftLab">
  22. <view class="icon">
  23. <image src="@/static/images/index/edit.png" mode=""></image>
  24. </view>
  25. <view class="lab">教练名称</view>
  26. </view>
  27. <view class="name">{{ item.complainDO.coachName }}</view>
  28. </view>
  29. </view>
  30. <view class="content">
  31. <view class="lab">问题描述</view>
  32. <view class="text">{{ item.complainDO.content }}</view>
  33. </view>
  34. <view class="content" v-if="item.complainReplayDOS&&item.complainReplayDOS.length">
  35. <view class="lab">回复内容</view>
  36. <view class="text" v-for="(item2,index2) in item.complainReplayDOS" :key="index2">{{ item2.replyContent }}</view>
  37. </view>
  38. <view class="border_bottom">
  39. <view class="dateBox">
  40. <view class="date">创建时间{{ $u.date(item.createTime, 'yyyy-mm-dd')}}</view>
  41. <view class="date" v-if="item.complainDO.dealStatus==2&&item.complainReplayDOS.length">处理时间{{ $u.date(item.complainReplayDOS[0].updateTime, 'yyyy-mm-dd')}} </view>
  42. </view>
  43. <view class="close_btn" @click="closeFn(item.complainDO.id)" v-if="item.complainDO.dealStatus==1">关闭</view>
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. import { consultationClosed } from '@/config/api.js'
  49. export default {
  50. props: ['item'],
  51. data() {
  52. return {
  53. dealStatus: ['','未处理', '已处理', '已关闭' ],//处理状态:1、未处理,2、已处理,3、已关闭
  54. }
  55. },
  56. created() {
  57. console.log('this.item')
  58. console.log(this.item)
  59. },
  60. methods: {
  61. closeFn(id) {
  62. uni.showModal({
  63. content:'确定要关闭吗?',
  64. success: async (res)=> {
  65. if (res.confirm) {
  66. const result = await consultationClosed({id: this.item.complainDO.id})
  67. this.$u.toast('关闭成功')
  68. this.item.complainDO.dealStatus = 3
  69. this.$emit('closeFn')
  70. } else if (res.cancel) {
  71. console.log('用户点击取消');
  72. }
  73. }
  74. })
  75. }
  76. }
  77. }
  78. </script>
  79. <style lang="scss" scoped>
  80. .consultItem {
  81. width: 100%;
  82. .target {
  83. border-bottom: 2rpx dashed #E8E9EC;
  84. }
  85. .row {
  86. display: flex;
  87. align-items: flex-start;
  88. padding: 24rpx 0;
  89. .leftLab {
  90. display: flex;
  91. align-items: center;
  92. .icon {
  93. width: 30rpx;
  94. height: 30rpx;
  95. }
  96. .lab {
  97. // margin-left: 10rpx;
  98. font-size: 28rpx;
  99. color: #ADADAD;
  100. white-space: nowrap;
  101. }
  102. }
  103. .name {
  104. font-size: 28rpx;
  105. color: #333;
  106. width: 0;
  107. flex: 1;
  108. padding-left: 15rpx;
  109. }
  110. }
  111. .top_row {
  112. display: flex;
  113. width: 100%;
  114. height: 116rpx;
  115. border-bottom: 2rpx dashed #E8E9EC;
  116. justify-content: space-between;
  117. align-items: center;
  118. .tag {
  119. width: 176rpx;
  120. height: 60rpx;
  121. background: rgba(38,144,12,0.1);
  122. border-radius: 8rpx;
  123. text-align: center;
  124. line-height: 60rpx;
  125. font-size: 28rpx;
  126. color: #0D9269;
  127. margin-right: 24rpx;
  128. }
  129. .status {
  130. font-size: 28rpx;
  131. color: $themC;
  132. }
  133. }
  134. .content {
  135. padding: 24rpx 0 20rpx 0;
  136. font-size: 28rpx;
  137. .lab {
  138. color: #ADADAD;
  139. margin-bottom: 4rpx;
  140. }
  141. .text {
  142. }
  143. }
  144. .border_bottom {
  145. border-top: 2rpx dashed #E8E9EC;
  146. display: flex;
  147. align-items: center;
  148. justify-content: space-between;
  149. padding: 30rpx 0 16rpx 0;
  150. .dateBox {
  151. .date {
  152. font-size: 28rpx;
  153. color: #ADADAD;
  154. margin-bottom: 16rpx;
  155. }
  156. }
  157. .close_btn {
  158. width: 140rpx;
  159. height: 60rpx;
  160. background: #FFFFFF;
  161. border-radius: 8rpx;
  162. border: 2rpx solid #E8E9EC;
  163. text-align: center;
  164. line-height: 60rpx;
  165. color: #ADADAD;
  166. font-size: 28rpx;
  167. }
  168. }
  169. }
  170. </style>