index.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <template>
  2. <div class="serviceEvaluation">
  3. <div class="serviceBody">
  4. <div class="serviceTitle">请给出您能园区服务水平的评价,您的建议是我们前进的最大动力!</div>
  5. <div class="evaluationBox" >
  6. <span class="evaName">园区保洁</span>
  7. <van-rate
  8. :value="cleaningService"
  9. :size="24"
  10. gutter="32rpx"
  11. void-color="#eee"
  12. bind:change="onChange"
  13. color="#fd9a63"
  14. />
  15. </div>
  16. <div class="evaluationBox" >
  17. <span class="evaName">园区绿化</span>
  18. <van-rate
  19. :value="greeningService"
  20. :size="24"
  21. gutter="32rpx"
  22. void-color="#eee"
  23. bind:change="onChange"
  24. color="#fd9a63"
  25. />
  26. </div>
  27. <div class="evaluationBox" >
  28. <span class="evaName">维修服务</span>
  29. <van-rate
  30. :value="maintenanceService"
  31. :size="24"
  32. gutter="32rpx"
  33. void-color="#eee"
  34. bind:change="onChange"
  35. color="#fd9a63"
  36. />
  37. </div>
  38. <div class="evaluationBox" >
  39. <span class="evaName">停车服务</span>
  40. <van-rate
  41. :value="parkingService"
  42. :size="24"
  43. gutter="32rpx"
  44. void-color="#eee"
  45. bind:change="onChange"
  46. color="#fd9a63"
  47. />
  48. </div>
  49. <div class="evaluationBox" >
  50. <span class="evaName">园区配套</span>
  51. <van-rate
  52. :value="supportingService"
  53. :size="24"
  54. gutter="32rpx"
  55. void-color="#eee"
  56. bind:change="onChange"
  57. color="#fd9a63"
  58. />
  59. </div>
  60. <div class="evaluationBox" >
  61. <span class="evaName">服务态度</span>
  62. <van-rate
  63. :value="attitudeService"
  64. :size="24"
  65. gutter="32rpx"
  66. void-color="#eee"
  67. bind:change="onChange"
  68. color="#fd9a63"
  69. />
  70. </div>
  71. </div>
  72. <div class="serviceBody">
  73. <van-field
  74. :value="commentsOrSuggestions"
  75. autosize
  76. type="textarea"
  77. placeholder="请输入文字进行报事报修描述"
  78. class="myField"
  79. maxlength="2000"
  80. show-word-limit
  81. @change="changeMsg"
  82. />
  83. </div>
  84. <button class="submitBtn" @click="confirm">提交</button>
  85. </div>
  86. </template>
  87. <script>
  88. import { parkServiceEvaluationAdd, getUserLocalStorageInfo } from "@/js_sdk/http";
  89. export default {
  90. name: "index",
  91. data(){
  92. return{
  93. value: "5",
  94. cleaningService: 0,
  95. greeningService: 0,
  96. maintenanceService: 0,
  97. parkingService: 0,
  98. supportingService: 0,
  99. attitudeService: 0,
  100. commentsOrSuggestions: '',
  101. form:{
  102. }
  103. }
  104. },
  105. methods: {
  106. changeMsg(e){
  107. console.log(e)
  108. this.commentsOrSuggestions = e.detail
  109. },
  110. confirm() {
  111. const _this = this
  112. parkServiceEvaluationAdd({
  113. cleaningService: this.cleaningService,
  114. greeningService: this.greeningService,
  115. maintenanceService: this.maintenanceService,
  116. parkingService: this.parkingService,
  117. supportingService: this.supportingService,
  118. attitudeService: this.attitudeService,
  119. userId: getUserLocalStorageInfo().userId,
  120. commentsOrSuggestions: this.commentsOrSuggestions
  121. }).then((res) => {
  122. uni.showToast({
  123. title: res.msg,
  124. icon: 'success',
  125. mask: true,
  126. duration: 1000
  127. });
  128. uni.navigateBack({});
  129. })
  130. },
  131. }
  132. }
  133. </script>
  134. <style lang="scss">
  135. .serviceEvaluation{
  136. .serviceBody{
  137. background: white;
  138. padding: 24rpx 32rpx;
  139. margin: 24rpx 0;
  140. .serviceTitle{
  141. color: rgba(51, 51, 51, 1);
  142. font-size: 28rpx;
  143. }
  144. }
  145. .evaluationBox {
  146. width: 686rpx;
  147. height: 100rpx;
  148. padding: 0 24rpx;
  149. display: flex;
  150. align-items: center;
  151. justify-content: space-between;
  152. background: #f5f7fa;
  153. border-radius: 8rpx;
  154. box-sizing: border-box;
  155. margin-top: 24rpx;
  156. .evaName{
  157. font-size: 32rpx;
  158. color: rgba(51, 51, 51, 1);
  159. }
  160. }
  161. .van-cell {
  162. background: #F5F7FA !important;
  163. border-radius: 8rpx;
  164. font-size: 28rpx;
  165. }
  166. .submitBtn{
  167. width: 654rpx;
  168. height: 96rpx;
  169. display: flex;
  170. align-items: center;
  171. justify-content: center;
  172. color: white;
  173. font-size: 35rpx;
  174. background: rgba(3, 101, 249, 1);
  175. margin: 64rpx auto;
  176. }
  177. }
  178. </style>