Bladeren bron

Merge branch 'wangtao' of uskycloud/usky-web-mobile into master

王涛 1 week geleden
bovenliggende
commit
7b17654c98
1 gewijzigde bestanden met toevoegingen van 38 en 12 verwijderingen
  1. 38 12
      src/pages/common/evaluate/index.vue

+ 38 - 12
src/pages/common/evaluate/index.vue

@@ -9,10 +9,18 @@
     :refresherBackground="'#f5f6f7'"
     :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
   >
+  <view v-if="projectName">
     <view class="menu-list">
       <view class="list-cell">
         <view class="menu-item">
-          <view style="font-size: 14px; font-weight: 600"> 为了更好提升我们的服务,请您对我们的服务人员进行评价、留下您宝贵的意见,我们将会不断完善我们的服务。 </view>
+          <view style="font-size: 14px"> 
+            为了更好提升我们的服务,请您对我们的服务人员在 <span style="font-weight: 600;font-size: 16px;">{{ projectName }}</span> 项目上的服务进行评价、留下您宝贵的意见,我们将会不断完善我们的服务。 
+          </view>
+        </view>
+        <view class="menu-item" v-if="handleTime">
+          <view style="font-size: 14px;margin-top:10px;"> 
+            工单提交时间:{{ handleTime.replace(/T/g, " ")}}
+          </view>
         </view>
       </view>
     </view>
@@ -40,15 +48,26 @@
       </view>
     </view>
 
-    <view class="app-button">
+    <view class="app-button" v-if="!rateValue">
       <view class="app-button-padding"></view>
       <view class="app-button-fixed">
         <u-button class="app-buttom" type="primary" @click="handleSubmit('提交')" shape="circle"> 提交 </u-button>
       </view>
     </view>
+  </view>
+  <view v-if="!projectName">
+    <view class="menu-list">
+      <view class="list-cell">
+        <view class="menu-item">
+          <view style="font-size: 14px"> 
+            服务评价编号有误,请核对服务评价页面地址是否正确。
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
   </oa-scroll>
 </template>
-
 <script setup>
 import config from "@/config";
 import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
@@ -56,7 +75,7 @@ import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue
 import { useStores, commonStores } from "@/store/modules/index";
 
 import { score } from "@/api/common/index.js";
-
+import { page } from "@/api/business/fireIot/repairManage.js";
 const { proxy } = getCurrentInstance();
 const commonStore = commonStores();
 
@@ -66,8 +85,10 @@ const data = reactive({
   textareaValue: "",
   repairCode: "",
   statusBool: true,
+  handleTime: "",
+  projectName:"",
 });
-const { rateCount, rateValue, textareaValue, repairCode, statusBool } = toRefs(data);
+const { rateCount, rateValue, textareaValue, repairCode, statusBool, handleTime, projectName } = toRefs(data);
 
 /**
  * @提交
@@ -94,15 +115,20 @@ onLoad((options) => {
     repairCode.value = options.repairCode;
   }
 
-  score({
+  page({
     repairCode: repairCode.value,
+    current: 1,
+    size: 1,
   })
-    .then((requset) => {})
-    .catch((error) => {
-      //#ifdef H5
-      window.history.back();
-      //#endif
-    });
+    .then((requset) => {
+      if(requset.data?.records.length>0){
+        rateValue.value = requset.data.records[0].score;
+        projectName.value = requset.data.records[0].projectName;
+        handleTime.value = requset.data.records[0].handleTime;
+        textareaValue.value = requset.data.records[0].appraiseContent;
+      }
+    })
+
 });
 
 onReady(() => {});