allcomplaintDetail.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <template>
  2. <view>
  3. <view class="wrapper">
  4. <view>
  5. <view class="suggestHead">
  6. <text>投诉号</text>
  7. <text class="suggestHeadDetail">{{complaint.id}}</text>
  8. </view>
  9. <view class="suggestHead">
  10. <text>投诉人UID</text>
  11. <text class="suggestHeadDetailID">{{complaint.fromUid}}</text>
  12. </view>
  13. <view class="suggestHead">
  14. <text>处理人UID</text>
  15. <text class="suggestHeadDetailID">{{complaint.processorUid}}</text>
  16. </view>
  17. <view class="suggestHead">
  18. <text>投诉日期</text>
  19. <text class="suggestHeadDetail">{{complaint.fistDatetime}}</text>
  20. </view>
  21. </view>
  22. <view>
  23. <view class="suggestTitle">
  24. <text>投诉标题</text>
  25. <text class="suggestTitleDetail">{{complaint.complaintTitle}}</text>
  26. </view>
  27. <view class="suggestContent">
  28. <text>投诉内容</text>
  29. <text class="suggestContentDetail">{{complaint.complaintDetail}}</text>
  30. </view>
  31. </view>
  32. <view>
  33. <view class="handleResult">
  34. <text>处理结果</text>
  35. <text class="handleResultDetail">{{complaint.result}}</text>
  36. </view>
  37. <view class="handleDate">
  38. <text>结案日期</text>
  39. <text class="DateDetail">{{complaint.closetime}}</text>
  40. </view>
  41. <view class="handleStatus">
  42. <text>状态</text>
  43. <text style="width: 50px;" class="handleStatusDetail">{{complaint.status}}</text>
  44. <text class="handleBtn" @click="toHandleSuggest">处理</text>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. export default {
  52. data() {
  53. return {
  54. complaint: {}
  55. };
  56. },
  57. onLoad(opt){
  58. this.complaint = JSON.parse(opt.item);
  59. if(this.complaint.result==null){
  60. this.complaint.result=" ";
  61. }
  62. if(this.complaint.closetime==null){
  63. this.complaint.closetime = " ";
  64. }
  65. if(this.complaint.processorUid==null){
  66. this.complaint.processorUid = " ";
  67. }
  68. },
  69. methods:{
  70. toHandleSuggest(){
  71. if(this.complaint.status=="已处理"){
  72. uni.showModal({
  73. title: '',
  74. content: '该投诉已被处理'
  75. })
  76. }
  77. else{
  78. uni.request({
  79. url: 'http://localhost:8222/education/my-complaint/handlingComplaint',
  80. data: {
  81. "id": this.complaint.id
  82. },
  83. header: {
  84. token: uni.getStorageSync('token')
  85. },
  86. method: 'POST',
  87. success: res => {
  88. // this.isLoading = false
  89. console.log(res)
  90. this.complaint.status = "处理中"
  91. let complaint = JSON.stringify(this.complaint)
  92. uni.navigateTo({
  93. url: '/subpkg/complaintHandle/complaintHandle?item=' + complaint
  94. })
  95. }
  96. })
  97. }
  98. }
  99. }
  100. }
  101. </script>
  102. <style lang="scss" scoped>
  103. page {
  104. height: 100%;
  105. background-color: #FFF2CC;
  106. padding: 20rpx;
  107. }
  108. .wrapper {
  109. // position: relative;
  110. height: 100%;
  111. background-color: #FFF2CC;
  112. padding: 20rpx;
  113. }
  114. /* 建议号、建议人、建议日期 */
  115. .suggestHead {
  116. display: flex;
  117. margin-top: 10rpx;
  118. padding: 10rpx;
  119. }
  120. .suggestHeadDetail,
  121. .suggestHeadDetailID {
  122. margin-left: 20rpx;
  123. font-weight: bold;
  124. }
  125. /* 建议人和处理人ID */
  126. .suggestHeadDetailID {
  127. color: #00B0F0;
  128. text-decoration: underline;
  129. }
  130. /* 建议标题 */
  131. .suggestTitle,
  132. .suggestContent {
  133. margin-top: 40rpx;
  134. display: flex;
  135. }
  136. /* 建议标题内容 */
  137. .suggestTitleDetail {
  138. display: block;
  139. width: 70%;
  140. height: 120rpx;
  141. margin-left: 20rpx;
  142. overflow: hidden;
  143. text-overflow: ellipsis;
  144. display: -webkit-box;
  145. -webkit-box-orient: vertical;
  146. -webkit-line-clamp: 3;
  147. }
  148. /* 建议内容 */
  149. .suggestContentDetail {
  150. display: block;
  151. width: 70%;
  152. height: 200rpx;
  153. margin-left: 20rpx;
  154. overflow: hidden;
  155. text-overflow: ellipsis;
  156. display: -webkit-box;
  157. -webkit-box-orient: vertical;
  158. -webkit-line-clamp: 5;
  159. }
  160. /* 处理结果 */
  161. .handleResult {
  162. margin-top: 60rpx;
  163. display: flex;
  164. }
  165. /* 处理结果详情 */
  166. .handleResultDetail {
  167. display: block;
  168. width: 70%;
  169. height: 80rpx;
  170. margin-left: 20rpx;
  171. overflow: hidden;
  172. text-overflow: ellipsis;
  173. display: -webkit-box;
  174. -webkit-box-orient: vertical;
  175. -webkit-line-clamp: 2;
  176. }
  177. /* 结案日期、处理状态 */
  178. .handleDate,
  179. .handleStatus {
  180. display: flex;
  181. margin-top: 40rpx;
  182. }
  183. /* 结案日期详情、状态详情 */
  184. .DateDetail,
  185. .handleStatusDetail {
  186. margin-left: 20rpx;
  187. font-weight: bold;
  188. }
  189. /* 状态详情颜色 */
  190. .handleStatusDetail {
  191. color: red;
  192. }
  193. /* 开始处理按钮 */
  194. .handleStart {
  195. position: absolute;
  196. bottom: 160rpx;
  197. width: 200rpx;
  198. margin-left: auto;
  199. margin-right: auto;
  200. left: 0;
  201. right: 0;
  202. }
  203. .handleBtn {
  204. // padding: 10rpx 20rpx;
  205. width: 50px;
  206. padding-left: 15px;
  207. border-radius: 30rpx;
  208. background-color: #8FAADC;
  209. color: white;
  210. margin-left: 20px;
  211. }
  212. </style>