Ver código fonte

服务评价

LAPTOP-FO2T5SIU\35838 11 meses atrás
pai
commit
db6f4dd1be
2 arquivos alterados com 52 adições e 8 exclusões
  1. 7 0
      js_sdk/http.js
  2. 45 8
      pages/subPackages/serviceEvaluation/index.vue

+ 7 - 0
js_sdk/http.js

@@ -1049,3 +1049,10 @@ export function parkSystemMsgReadAdd(data) {
         data, {}
     )
 }
+
+export function parkServiceEvaluationAdd(data) {
+    return $http.post(
+        '/wx/parkServiceEvaluation/add',
+        data, {}
+    )
+}

+ 45 - 8
pages/subPackages/serviceEvaluation/index.vue

@@ -5,7 +5,7 @@
          <div class="evaluationBox" >
            <span class="evaName">园区保洁</span>
            <van-rate
-               :value="value"
+               :value="cleaningService"
                :size="24"
                gutter="32rpx"
                void-color="#eee"
@@ -16,7 +16,7 @@
          <div class="evaluationBox" >
            <span class="evaName">园区绿化</span>
            <van-rate
-               :value="value"
+               :value="greeningService"
                :size="24"
                gutter="32rpx"
                void-color="#eee"
@@ -27,7 +27,7 @@
          <div class="evaluationBox" >
            <span class="evaName">维修服务</span>
            <van-rate
-               :value="value"
+               :value="maintenanceService"
                :size="24"
                gutter="32rpx"
                void-color="#eee"
@@ -38,7 +38,7 @@
          <div class="evaluationBox" >
            <span class="evaName">停车服务</span>
            <van-rate
-               :value="value"
+               :value="parkingService"
                :size="24"
                gutter="32rpx"
                void-color="#eee"
@@ -49,7 +49,7 @@
          <div class="evaluationBox" >
            <span class="evaName">园区配套</span>
            <van-rate
-               :value="value"
+               :value="supportingService"
                :size="24"
                gutter="32rpx"
                void-color="#eee"
@@ -60,7 +60,7 @@
          <div class="evaluationBox" >
            <span class="evaName">服务态度</span>
            <van-rate
-               :value="value"
+               :value="attitudeService"
                :size="24"
                gutter="32rpx"
                void-color="#eee"
@@ -71,29 +71,66 @@
        </div>
       <div class="serviceBody">
         <van-field
-            :value="form.contant"
+            :value="commentsOrSuggestions"
             autosize
             type="textarea"
             placeholder="请输入文字进行报事报修描述"
             class="myField"
             maxlength="2000"
             show-word-limit
+            @change="changeMsg"
         />
       </div>
-      <button class="submitBtn">提交</button>
+      <button class="submitBtn" @click="confirm">提交</button>
     </div>
 </template>
 
 <script>
+import { parkServiceEvaluationAdd, getUserLocalStorageInfo } from "@/js_sdk/http";
+
 export default {
   name: "index",
   data(){
     return{
       value: "5",
+      cleaningService: 0,
+      greeningService: 0,
+      maintenanceService: 0,
+      parkingService: 0,
+      supportingService: 0,
+      attitudeService: 0,
+      commentsOrSuggestions: '',
       form:{
 
       }
     }
+  },
+  methods: {
+    changeMsg(e){
+      console.log(e)
+      this.commentsOrSuggestions = e.detail
+    },
+    confirm() {
+      const _this = this
+      parkServiceEvaluationAdd({
+        cleaningService: this.cleaningService,
+        greeningService: this.greeningService,
+        maintenanceService: this.maintenanceService,
+        parkingService: this.parkingService,
+        supportingService: this.supportingService,
+        attitudeService: this.attitudeService,
+        userId: getUserLocalStorageInfo().userId,
+        commentsOrSuggestions: this.commentsOrSuggestions
+      }).then((res) => {
+        uni.showToast({
+          title: res.msg,
+          icon: 'success',
+          mask: true,
+          duration: 1000
+        });
+        uni.navigateBack({});
+      })
+    },
   }
 }
 </script>