Bladeren bron

评审评价指标-重新计算接口去除loading加载,调整axios2封装请求部分处理加载显示逻辑

liyanyan 2 weken geleden
bovenliggende
commit
91ee95151f
3 gewijzigde bestanden met toevoegingen van 10 en 5 verwijderingen
  1. 2 2
      src/axios/index2.js
  2. 5 2
      src/views/allcase/components/CaseQualityBox2.vue
  3. 3 1
      src/views/allcase/majorIndex.vue

+ 2 - 2
src/axios/index2.js

@@ -41,9 +41,9 @@ const service2 = axios.create({
 // 请求拦截器
 service2.interceptors.request.use(
   config => {
-    const { isNeedLoading = false } = config.data || {};
+    const { isNoLoading = false } = config.headers || {};
     const { NODE_ENV } = process.env
-    if (!isNeedLoading && loadingCount == 0) {
+    if (!isNoLoading && loadingCount == 0) {
       loadingInstance = Loading.service({
         lock: false,
         customClass: 'z-index999',

+ 5 - 2
src/views/allcase/components/CaseQualityBox2.vue

@@ -368,9 +368,12 @@ import { examineAppeal, getAppealData, getBrry } from '@/api/qc';
         const params = {
           id: this.$props.MED_REC_ID,
           show_correction:  this.$route.path == '/whitelist-caseControl' ? 2 : 1,
-          isNeedLoading: isRender ? true : false
         };
-        this.$axios2.post('/get_case_quality_v2', params).then(res => {
+        this.$axios2.post('/get_case_quality_v2', params, {
+          headers: { 
+            isNoLoading: isRender ? true : false
+          }
+        }).then(res => {
           this.$nextTick(() =>{
             console.log('this.data', this.data, res.data)
             if(isRender) {

+ 3 - 1
src/views/allcase/majorIndex.vue

@@ -717,7 +717,9 @@ export default {
         cysj_start: this.formInline.startTime,
         cysj_end: this.formInline.endTime
       }
-      this.$axios2.post('/quality_index_recalculate', params).then(res => {
+      this.$axios2.post('/quality_index_recalculate', params, {
+        headers:{ isNoLoading: true}
+      }).then(res => {
         if(res.code == 200) {
           //更改为发起请求后2秒刷新数据
         }