Răsfoiți Sursa

重新质控-增加执行中提示交互

liyanyan 6 zile în urmă
părinte
comite
735040e358
2 a modificat fișierele cu 12 adăugiri și 2 ștergeri
  1. 1 1
      src/axios/index2.js
  2. 11 1
      src/views/allcase/caseViews.vue

+ 1 - 1
src/axios/index2.js

@@ -35,7 +35,7 @@ function errorLog(error) {
 // 创建一个 axios 实例
 const service2 = axios.create({
   baseURL: process.env.VUE_APP_BASE_API2,
-  timeout: 50000
+  timeout: 80000
 });
 
 // 请求拦截器

+ 11 - 1
src/views/allcase/caseViews.vue

@@ -214,6 +214,7 @@ import CaseQualityBox from './components/CaseQualityBox2.vue';
 import DeathText from './components/DeathText.vue';
 import VueDragResize from 'vue-drag-resize';
 import Axios from 'axios'
+import { Loading } from 'element-ui';
 
 export default {
   components: {
@@ -445,8 +446,17 @@ export default {
 
 
     onControll() {
+      let loadingInstance = Loading.service({
+        lock: true,
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)',
+        text: '执行中,请稍后...'
+      });
       this.$axios2.get(`/quality_handle?zyh=${this.valData}`).then(res => {
-        this.$message.success('执行中...');
+        // this.$message.success('执行中...');
+        this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
+          loadingInstance.close();
+        });
         if (res.data === true) {
           this.valData = this.storageGet('getData');
           if (this.valData) {