manager_suggestion_detail.vue 5.3 KB

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