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

117 lines
2.6 KiB

1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
12 months ago
12 months ago
12 months ago
12 months ago
1 year ago
  1. <template>
  2. <view class="consultItem">
  3. <view class="top_row">
  4. <view class="tag">咨询</view>
  5. <view class="status">{{dealStatus[item.complainDO.dealStatus]}}</view>
  6. </view>
  7. <view class="content">
  8. <view class="lab">问题描述</view>
  9. <view class="text">{{ item.complainDO.content }}</view>
  10. </view>
  11. <view class="border_bottom">
  12. <view class="dateBox">
  13. <view class="date" v-if="item.complainDO&&item.complainDO.createTime">创建时间{{ $u.date(item.complainDO.createTime, 'yyyy-mm-dd')}}</view>
  14. <!-- <view class="date">处理时间{{item.complainDO.createTime}}</view> -->
  15. </view>
  16. <view class="close_btn" v-if="item.complainDO.dealStatus==1" @click="closeFn">关闭</view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import { consultationClosed } from '@/config/api.js'
  22. export default {
  23. props: ['item'],
  24. data() {
  25. return {
  26. dealStatus: ['','未处理', '已处理', '已关闭' ],//处理状态:1、未处理,2已处理,3已关闭
  27. }
  28. },
  29. methods: {
  30. closeFn() {
  31. uni.showModal({
  32. content:'确定要关闭吗?',
  33. success: async (res)=> {
  34. if (res.confirm) {
  35. const result = await consultationClosed({id: this.item.complainDO.id})
  36. this.$u.toast('关闭成功')
  37. this.item.complainDO.dealStatus = 3
  38. this.$emit('closeFn')
  39. } else if (res.cancel) {
  40. console.log('用户点击取消');
  41. }
  42. }
  43. })
  44. }
  45. }
  46. }
  47. </script>
  48. <style lang="scss" scoped>
  49. .consultItem {
  50. width: 100%;
  51. .top_row {
  52. display: flex;
  53. width: 100%;
  54. height: 116rpx;
  55. border-bottom: 2rpx dashed #E8E9EC;
  56. justify-content: space-between;
  57. align-items: center;
  58. .tag {
  59. width: 120rpx;
  60. height: 60rpx;
  61. background: rgba(250,149,25,0.1);
  62. border-radius: 8rpx;
  63. text-align: center;
  64. line-height: 60rpx;
  65. font-size: 28rpx;
  66. color: #FA7919;
  67. }
  68. .status {
  69. font-size: 28rpx;
  70. color: $themC;
  71. }
  72. }
  73. .content {
  74. padding: 24rpx 0 50rpx 0;
  75. font-size: 28rpx;
  76. .lab {
  77. color: #ADADAD;
  78. margin-bottom: 4rpx;
  79. }
  80. .text {
  81. }
  82. }
  83. .border_bottom {
  84. border-top: 2rpx dashed #E8E9EC;
  85. display: flex;
  86. align-items: center;
  87. justify-content: space-between;
  88. padding: 30rpx 0 10rpx 0;
  89. .dateBox {
  90. .date {
  91. font-size: 28rpx;
  92. color: #ADADAD;
  93. margin-bottom: 16rpx;
  94. }
  95. }
  96. .close_btn {
  97. width: 140rpx;
  98. height: 60rpx;
  99. background: #FFFFFF;
  100. border-radius: 8rpx;
  101. border: 2rpx solid #E8E9EC;
  102. text-align: center;
  103. line-height: 60rpx;
  104. color: #ADADAD;
  105. font-size: 28rpx;
  106. }
  107. }
  108. }
  109. </style>