manager_complaint_detail.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  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. </view>
  45. <view class="handleBtn-wrapper">
  46. <view class="handleBtn" @click="toHandleSuggest">处理</view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. export default {
  54. data() {
  55. return {
  56. complaint: {}
  57. };
  58. },
  59. onLoad(opt){
  60. this.complaint = JSON.parse(opt.item);
  61. if(this.complaint.result==null){
  62. this.complaint.result=" ";
  63. }
  64. if(this.complaint.closetime==null){
  65. this.complaint.closetime = " ";
  66. }
  67. if(this.complaint.processorUid==null){
  68. this.complaint.processorUid = " ";
  69. }
  70. },
  71. methods:{
  72. toHandleSuggest(){
  73. if(this.complaint.status=="已处理"){
  74. uni.showModal({
  75. title: '',
  76. content: '该投诉已被处理'
  77. })
  78. }
  79. else{
  80. uni.request({
  81. url: `${uni.$http.baseUrl}/education/my-complaint/handlingComplaint`,
  82. data: {
  83. "id": this.complaint.id
  84. },
  85. header: {
  86. token: uni.getStorageSync('token')
  87. },
  88. method: 'POST',
  89. success: res => {
  90. console.log(res)
  91. this.complaint.status = "处理中"
  92. let complaint = JSON.stringify(this.complaint)
  93. uni.navigateTo({
  94. url: '/subpkg/manager/complaint/manager_complaint_handle?item=' + complaint
  95. })
  96. }
  97. })
  98. }
  99. }
  100. }
  101. }
  102. </script>
  103. <!-- 设置页面背景 -->
  104. <style lang="scss">
  105. page{
  106. height: 100%;
  107. // background-color: #FFF;
  108. }
  109. </style>
  110. <style lang="scss">
  111. // page {
  112. // height: 100%;
  113. // background-color: #FFF2CC;
  114. // }
  115. .wrapper {
  116. width: 93%;
  117. padding: 20rpx;
  118. margin-left: 10rpx;
  119. border-radius: 20rpx;
  120. background-color: #FFF;
  121. }
  122. /* 建议号、建议人、建议日期 */
  123. .suggestHead {
  124. display: flex;
  125. margin-top: 10rpx;
  126. padding: 10rpx;
  127. }
  128. .suggestHeadDetail,
  129. .suggestHeadDetailID {
  130. margin-left: 20rpx;
  131. font-weight: bold;
  132. }
  133. /* 建议人和处理人ID */
  134. .suggestHeadDetailID {
  135. color: #00B0F0;
  136. text-decoration: underline;
  137. }
  138. /* 建议标题 */
  139. .suggestTitle,
  140. .suggestContent {
  141. margin-top: 40rpx;
  142. display: flex;
  143. }
  144. /* 建议标题内容 */
  145. .suggestTitleDetail {
  146. display: block;
  147. width: 70%;
  148. height: 120rpx;
  149. margin-left: 20rpx;
  150. overflow: hidden;
  151. text-overflow: ellipsis;
  152. display: -webkit-box;
  153. -webkit-box-orient: vertical;
  154. -webkit-line-clamp: 3;
  155. }
  156. /* 建议内容 */
  157. .suggestContentDetail {
  158. display: block;
  159. width: 70%;
  160. height: 200rpx;
  161. margin-left: 20rpx;
  162. overflow: hidden;
  163. text-overflow: ellipsis;
  164. display: -webkit-box;
  165. -webkit-box-orient: vertical;
  166. -webkit-line-clamp: 5;
  167. }
  168. /* 处理结果 */
  169. .handleResult {
  170. margin-top: 60rpx;
  171. display: flex;
  172. }
  173. /* 处理结果详情 */
  174. .handleResultDetail {
  175. display: block;
  176. width: 70%;
  177. height: 80rpx;
  178. margin-left: 20rpx;
  179. overflow: hidden;
  180. text-overflow: ellipsis;
  181. display: -webkit-box;
  182. -webkit-box-orient: vertical;
  183. -webkit-line-clamp: 2;
  184. }
  185. /* 结案日期、处理状态 */
  186. .handleDate,
  187. .handleStatus {
  188. display: flex;
  189. margin-top: 40rpx;
  190. }
  191. /* 结案日期详情、状态详情 */
  192. .DateDetail,
  193. .handleStatusDetail {
  194. margin-left: 20rpx;
  195. font-weight: bold;
  196. }
  197. /* 状态详情颜色 */
  198. .handleStatusDetail {
  199. color: red;
  200. }
  201. /* 开始处理按钮 */
  202. .handleStart {
  203. position: absolute;
  204. bottom: 160rpx;
  205. width: 200rpx;
  206. margin-left: auto;
  207. margin-right: auto;
  208. left: 0;
  209. right: 0;
  210. }
  211. .handleBtn-wrapper{
  212. display: flex;
  213. margin-top: 40rpx;
  214. // border: 2rpx solid red;
  215. height: 100rpx;
  216. width: 100%;
  217. align-items: center;
  218. justify-content: center;
  219. }
  220. .handleBtn {
  221. display: flex;
  222. // padding: 10rpx 20rpx;
  223. width: 80px;
  224. height: 60rpx;
  225. line-height: 60rpx;
  226. // padding-left: 15px;
  227. justify-content: center;
  228. border-radius: 30rpx;
  229. background-color: #35b882;
  230. color: white;
  231. margin-left: 20px;
  232. }
  233. </style>