manager_suggestion_handle.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <template>
  2. <view style=" background-color: #F0F0F0; height: 100%;">
  3. <!-- 建议信息 -->
  4. <view class="suggestHead">
  5. <text>建议号</text>
  6. <text class="suggestHeadDetail">{{suggestion.id}}</text>
  7. </view>
  8. <view class="suggestHead">
  9. <text>建议人UID</text>
  10. <text class="suggestHeadId">{{suggestion.fromUid}}</text>
  11. </view>
  12. <view class="suggestHead">
  13. <text>处理人UID</text>
  14. <text class="suggestHeadId">{{suggestion.processorUid}}</text>
  15. </view>
  16. <view class="suggestHead">
  17. <text>建议日期</text>
  18. <text class="suggestHeadDetail">{{suggestion.fistDatetime}}</text>
  19. </view>
  20. <!-- 建议标题 -->
  21. <view class="suggestTitle">
  22. <text class="suggestTitleText">建议标题</text>
  23. <text class="suggestTitleDetail">{{suggestion.adviseTitle}}</text>
  24. </view>
  25. <!-- 建议内容 -->
  26. <view class="suggestTitle">
  27. <text class="suggestTitleText">建议内容</text>
  28. <text class="suggestTitleDetail">{{suggestion.adviseDetail}}</text>
  29. </view>
  30. <!-- 结案日期 -->
  31. <view class="handleDate">
  32. <text>结案日期</text>
  33. <text class="handleDateDetail">{{suggestion.closetime}}</text>
  34. </view>
  35. <!-- 处理状态 -->
  36. <view class="handleStatus">
  37. <text>状态</text>
  38. <text class="handleStatusDetail">{{suggestion.status}}</text>
  39. </view>
  40. <!-- 处理结果 -->
  41. <view class="handleResult">
  42. <view class="handleResultTitle">处理结果</view>
  43. <!-- 未处理 -->
  44. <view>
  45. <textarea v-model="result" class="handleDetail" maxlength="512" placeholder="不超过512个字"></textarea>
  46. </view>
  47. </view>
  48. <!-- 底部按钮 -->
  49. <view class="handleEnd">
  50. <text class="handleClosed" @click="toHandle">结案</text>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. export default {
  56. data() {
  57. return {
  58. suggestion: {},
  59. result: ""
  60. };
  61. },
  62. onLoad(opt){
  63. this.suggestion = JSON.parse(opt.item);
  64. if(this.suggestion.processorUid==null){
  65. this.suggestion.processorUid = " ";
  66. }
  67. },
  68. methods:{
  69. toHandle(){
  70. var head = '^[ ]+$';
  71. var re = new RegExp(head);
  72. if (re.test(this.result)) {
  73. uni.showModal({
  74. title: '',
  75. content: '结果不能为空'
  76. })
  77. }
  78. else if(this.result==null || this.result==""){
  79. uni.showModal({
  80. title: '',
  81. content: '结果不能为空'
  82. })
  83. }
  84. else{
  85. uni.request({
  86. url: `${uni.$http.baseUrl}/education/my-suggestion/handleAdvise`,
  87. data: {
  88. "id": this.suggestion.id,
  89. "result": this.result
  90. },
  91. header: {
  92. token: uni.getStorageSync('token')
  93. },
  94. method: 'POST',
  95. success: res => {
  96. uni.navigateBack({
  97. delta: 2,
  98. })
  99. }
  100. })
  101. }
  102. }
  103. }
  104. }
  105. </script>
  106. <!-- 设置页面背景 -->
  107. <style lang="scss">
  108. page{
  109. padding: 20rpx;
  110. height: 100%;
  111. // background-color: #D4F5E9;
  112. }
  113. </style>
  114. <style lang="scss" scoped>
  115. /* 设置页面背景 */
  116. // page{
  117. // padding: 20rpx;
  118. // height: 100%;
  119. // background-color: #FFF2CC;
  120. // }
  121. /* 顶部的建议信息 */
  122. .suggestHead{
  123. margin-top: 20rpx;
  124. }
  125. /* 顶部建议信息详情、结案日期详情、状态处理详情 */
  126. .suggestHeadDetail,
  127. .suggestHeadId,
  128. .handleDateDetail,
  129. .handleStatusDetail{
  130. margin-left: 20rpx;
  131. font-weight: bold;
  132. }
  133. .suggestHeadId{
  134. color: #00B0F0;
  135. text-decoration: underline;
  136. }
  137. /* 建议详情 */
  138. .suggestTitle{
  139. margin-top: 30rpx;
  140. display: flex;
  141. flex-direction: column;
  142. }
  143. /* 标题 */
  144. .suggestTitleText{
  145. text-align: center;
  146. font-weight: bold;
  147. margin-bottom: 10rpx;
  148. }
  149. /* 内容 */
  150. .suggestTitleDetail{
  151. width: 94%;
  152. }
  153. /* 结案日期 */
  154. .handleDate{
  155. margin-top: 40rpx;
  156. }
  157. /* 处理状态 */
  158. .handleStatus{
  159. margin-top: 40rpx;
  160. }
  161. .handleStatusDetail{
  162. color: red;
  163. }
  164. /* 处理结果 */
  165. .handleResult{
  166. display: flex;
  167. flex-direction: column;
  168. }
  169. .handleResultTitle{
  170. text-align: center;
  171. margin: 20rpx 0;
  172. font-weight: bold;
  173. }
  174. /* 处理结果详情 */
  175. .handleDetail{
  176. padding: 10rpx;
  177. background-color: #fff;
  178. // border: 1rpx solid gray;
  179. border-radius: 20rpx;
  180. width: 93%;
  181. // margin: auto;
  182. //margin-bottom: 40rpx;
  183. }
  184. .handleResultDetail{
  185. min-height: 200rpx;
  186. padding: 10rpx;
  187. background-color: #fff;
  188. border-radius: 20rpx;
  189. width: 93%;
  190. margin-bottom: 40rpx;
  191. }
  192. /* 结案 */
  193. .handleEnd{
  194. display: flex;
  195. justify-content: center;
  196. margin-top: 40rpx;
  197. margin-bottom: 40rpx;
  198. }
  199. .handleClosed{
  200. background-color: #35b882;
  201. font-size: 40rpx;
  202. padding: 10rpx 30rpx;
  203. border-radius: 40rpx;
  204. color: white;
  205. }
  206. </style>