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

116 lines
2.5 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. <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">关闭</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})
  36. this.$u.toast('关闭成功')
  37. this.item.complainDO.dealStatus = 3
  38. } else if (res.cancel) {
  39. console.log('用户点击取消');
  40. }
  41. }
  42. })
  43. }
  44. }
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. .consultItem {
  49. width: 100%;
  50. .top_row {
  51. display: flex;
  52. width: 100%;
  53. height: 116rpx;
  54. border-bottom: 2rpx dashed #E8E9EC;
  55. justify-content: space-between;
  56. align-items: center;
  57. .tag {
  58. width: 120rpx;
  59. height: 60rpx;
  60. background: rgba(250,149,25,0.1);
  61. border-radius: 8rpx;
  62. text-align: center;
  63. line-height: 60rpx;
  64. font-size: 28rpx;
  65. color: #FA7919;
  66. }
  67. .status {
  68. font-size: 28rpx;
  69. color: $themC;
  70. }
  71. }
  72. .content {
  73. padding: 24rpx 0 50rpx 0;
  74. font-size: 28rpx;
  75. .lab {
  76. color: #ADADAD;
  77. margin-bottom: 4rpx;
  78. }
  79. .text {
  80. }
  81. }
  82. .border_bottom {
  83. border-top: 2rpx dashed #E8E9EC;
  84. display: flex;
  85. align-items: center;
  86. justify-content: space-between;
  87. padding: 30rpx 0 10rpx 0;
  88. .dateBox {
  89. .date {
  90. font-size: 28rpx;
  91. color: #ADADAD;
  92. margin-bottom: 16rpx;
  93. }
  94. }
  95. .close_btn {
  96. width: 140rpx;
  97. height: 60rpx;
  98. background: #FFFFFF;
  99. border-radius: 8rpx;
  100. border: 2rpx solid #E8E9EC;
  101. text-align: center;
  102. line-height: 60rpx;
  103. color: #ADADAD;
  104. font-size: 28rpx;
  105. }
  106. }
  107. }
  108. </style>