manager_complaint_detail.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  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. padding: 20rpx;
  117. }
  118. /* 建议号、建议人、建议日期 */
  119. .suggestHead {
  120. display: flex;
  121. margin-top: 10rpx;
  122. padding: 10rpx;
  123. }
  124. .suggestHeadDetail,
  125. .suggestHeadDetailID {
  126. margin-left: 20rpx;
  127. font-weight: bold;
  128. }
  129. /* 建议人和处理人ID */
  130. .suggestHeadDetailID {
  131. color: #00B0F0;
  132. text-decoration: underline;
  133. }
  134. /* 建议标题 */
  135. .suggestTitle,
  136. .suggestContent {
  137. margin-top: 40rpx;
  138. display: flex;
  139. }
  140. /* 建议标题内容 */
  141. .suggestTitleDetail {
  142. display: block;
  143. width: 70%;
  144. height: 120rpx;
  145. margin-left: 20rpx;
  146. overflow: hidden;
  147. text-overflow: ellipsis;
  148. display: -webkit-box;
  149. -webkit-box-orient: vertical;
  150. -webkit-line-clamp: 3;
  151. }
  152. /* 建议内容 */
  153. .suggestContentDetail {
  154. display: block;
  155. width: 70%;
  156. height: 200rpx;
  157. margin-left: 20rpx;
  158. overflow: hidden;
  159. text-overflow: ellipsis;
  160. display: -webkit-box;
  161. -webkit-box-orient: vertical;
  162. -webkit-line-clamp: 5;
  163. }
  164. /* 处理结果 */
  165. .handleResult {
  166. margin-top: 60rpx;
  167. display: flex;
  168. }
  169. /* 处理结果详情 */
  170. .handleResultDetail {
  171. display: block;
  172. width: 70%;
  173. height: 80rpx;
  174. margin-left: 20rpx;
  175. overflow: hidden;
  176. text-overflow: ellipsis;
  177. display: -webkit-box;
  178. -webkit-box-orient: vertical;
  179. -webkit-line-clamp: 2;
  180. }
  181. /* 结案日期、处理状态 */
  182. .handleDate,
  183. .handleStatus {
  184. display: flex;
  185. margin-top: 40rpx;
  186. }
  187. /* 结案日期详情、状态详情 */
  188. .DateDetail,
  189. .handleStatusDetail {
  190. margin-left: 20rpx;
  191. font-weight: bold;
  192. }
  193. /* 状态详情颜色 */
  194. .handleStatusDetail {
  195. color: red;
  196. }
  197. /* 开始处理按钮 */
  198. .handleStart {
  199. position: absolute;
  200. bottom: 160rpx;
  201. width: 200rpx;
  202. margin-left: auto;
  203. margin-right: auto;
  204. left: 0;
  205. right: 0;
  206. }
  207. .handleBtn-wrapper{
  208. display: flex;
  209. margin-top: 40rpx;
  210. // border: 2rpx solid red;
  211. height: 100rpx;
  212. width: 100%;
  213. align-items: center;
  214. justify-content: center;
  215. }
  216. .handleBtn {
  217. display: flex;
  218. // padding: 10rpx 20rpx;
  219. width: 80px;
  220. height: 60rpx;
  221. line-height: 60rpx;
  222. // padding-left: 15px;
  223. justify-content: center;
  224. border-radius: 30rpx;
  225. background-color: #35b882;
  226. color: white;
  227. margin-left: 20px;
  228. }
  229. </style>