Prechádzať zdrojové kódy

页面loading修改

wucl 1 týždeň pred
rodič
commit
814ccdf4cf

+ 9 - 10
src/components/MoreSearchBar/index.vue

@@ -62,7 +62,7 @@
                     </el-select>
                 </el-col>
                 <el-col :xs="24" :sm="12" :lg="8" :span="6">
-                    <el-button class="filter-item" type="success" @click="searchList" v-loading.fullscreen.lock="loading"
+                    <el-button class="filter-item" type="success" @click="searchList" 
                         round>搜索
                     </el-button>
                     <el-button class="filter-item" round type="info" @click="resetSearch()">重置
@@ -395,24 +395,23 @@ export default {
             allotDepartment: [],
             clientManagers: [],
             principals: [],
-            loading: false,
         }
 
     },
     methods: {
         resetSearch() {
             // 重置分页
-            this.loading = true;
+            // this.loading = true;
             this.orderDate = '';
             this.$emit('resetParams');
-            setTimeout(() => {
-                this.loading = false;
-            }, 500);
+            // setTimeout(() => {
+            //     this.loading = false;
+            // }, 500);
         },
 
         searchList() {
             // 重置分页
-            this.loading = true;
+            // this.loading = true;
             this.listQuery.page = 1
             this.listQuery.size = 20
             if (this.orderDate) {
@@ -423,9 +422,9 @@ export default {
                 this.listQuery.endDate = null;
             }
             this.$emit('fliterSearch', this.listQuery);
-            setTimeout(() => {
-                this.loading = false;
-            }, 500);
+            // setTimeout(() => {
+            //     this.loading = false;
+            // }, 500);
         },
 
         moreSearch() {

+ 4 - 0
src/views/major/list.vue

@@ -175,9 +175,11 @@ export default {
   methods: {
     
     getPage() {
+      let loadingInstance =  this.$loading({ fullscreen: true });
       this.$api.major.page(this.listQuery).then(res=>{
         if (res.code ===200){
             this.pageData = res.data;
+            loadingInstance.close();
           }
       })
     },
@@ -191,9 +193,11 @@ export default {
         },
 
     fliterSearch(params){
+      let loadingInstance =  this.$loading({ fullscreen: true });
       this.$api.major.page(params).then(res=>{
         if (res.code ===200){
             this.pageData = res.data;
+            loadingInstance.close();
         }
       })
     },

+ 4 - 0
src/views/major/myOrder.vue

@@ -858,9 +858,11 @@ export default {
       this.getList()
     },
     getList() {
+      let loadingInstance =  this.$loading({ fullscreen: true });
       this.$api.majorProduction.myOrder(Object.assign({}, this.listQuery)).then(res => {
         if (res.code === 200) {
           this.pageData = res.data;
+          loadingInstance.close();
         }
       })
     },
@@ -1471,9 +1473,11 @@ export default {
       })
     },
     fliterSearch(params) {
+      let loadingInstance =  this.$loading({ fullscreen: true });
       this.$api.majorProduction.myOrder(Object.assign({}, params)).then(res => {
         if (res.code === 200) {
           this.pageData = res.data;
+          loadingInstance.close();
         }
       })
     },

+ 4 - 0
src/views/major/terminateList.vue

@@ -98,9 +98,11 @@ export default {
   methods: {
     // 获取终止项目(流程)
     getTerminatedPage() {
+      let loadingInstance =  this.$loading({ fullscreen: true });
       this.$api.major.getTerminatedPage(this.listQuery).then(res=>{
         if (res.code ===200){
             this.pageData = res.data;
+            loadingInstance.close();
           }
       })
     },
@@ -114,9 +116,11 @@ export default {
         },
 
     fliterSearch(params){
+      let loadingInstance =  this.$loading({ fullscreen: true });
       this.$api.major.getTerminatedPage(params).then(res=>{
         if (res.code ===200){
             this.pageData = res.data;
+            loadingInstance.close();
         }
       })
     },

+ 4 - 1
src/views/major/todoList.vue

@@ -403,10 +403,11 @@ export default {
       this.getPage()
     },
     getPage() {
-
+      let loadingInstance =  this.$loading({ fullscreen: true });
       this.$api.workNodeTaskRecord.majorTaskTodoList(this.listQuery).then(res => {
         if (res.code === 200) {
           this.pageData = res.data;
+          loadingInstance.close();
         }
       })
     },
@@ -550,9 +551,11 @@ export default {
       location.reload();
     },
     fliterSearch(params) {
+      let loadingInstance =  this.$loading({ fullscreen: true });
       this.$api.workNodeTaskRecord.majorTaskTodoList(this.listQuery).then(res => {
         if (res.code === 200) {
           this.pageData = res.data;
+          loadingInstance.close();
         }
       })
     },

+ 4 - 0
src/views/personal/myOrder.vue

@@ -775,17 +775,21 @@ export default {
   },
   methods: {
     getPage() {
+      let loadingInstance =  this.$loading({ fullscreen: true });
       this.$api.personal.myOrder(this.listQuery).then(res=>{
         if (res.code ===200){
             this.pageData = res.data;
+            loadingInstance.close();
         }
       })
     },
 
     fliterSearch(params){
+      let loadingInstance =  this.$loading({ fullscreen: true });
       this.$api.personal.myOrder(params).then(res=>{
         if (res.code ===200){
             this.pageData = res.data;
+            loadingInstance.close();
         }
       })
     },

+ 2 - 0
src/views/personal/pendingList.vue

@@ -200,9 +200,11 @@ export default {
             })
         },
     fliterSearch(params){
+      let loadingInstance =  this.$loading({ fullscreen: true });
       this.$api.personal.list(params).then(res=>{
         if (res.code ===200){
             this.pageData = res.data;
+            loadingInstance.close();
         }
       })
     },

+ 4 - 0
src/views/personal/saveFileDoneList.vue

@@ -159,9 +159,11 @@ export default {
       this.getList()
     },
     getList() {
+      let loadingInstance =  this.$loading({ fullscreen: true });
       this.$api.personal.saveFileDone(this.listQuery).then(res=>{
         if (res.code ===200){
             this.pageData = res.data;
+            loadingInstance.close();
         }
       })
     },
@@ -179,9 +181,11 @@ export default {
     },
 
     fliterSearch(params){
+      let loadingInstance =  this.$loading({ fullscreen: true });
       this.$api.personal.saveFileDone(params).then(res=>{
         if (res.code ===200){
             this.pageData = res.data;
+            loadingInstance.close();
         }
       })
     },

+ 2 - 0
src/views/personal/terminateList.vue

@@ -189,9 +189,11 @@ export default {
             })
         },
     fliterSearch(params){
+      let loadingInstance =  this.$loading({ fullscreen: true });
       this.$api.personal.getTerminatedPage(params).then(res=>{
         if (res.code ===200){
             this.pageData = res.data;
+            loadingInstance.close();
         }
       })
     },

+ 4 - 0
src/views/personal/todoList.vue

@@ -474,9 +474,11 @@ export default {
       if (getCookie('personalTodoList') != undefined) {
         this.listQuery.size = parseInt(getCookie('personalTodoList'));
       }
+      let loadingInstance =  this.$loading({ fullscreen: true });
       this.$api.workNodeTaskRecord.personalTaskTodoList(this.listQuery).then(res => {
         if (res.code === 200) {
           this.pageData = res.data;
+          loadingInstance.close();
         }
       })
     },
@@ -510,9 +512,11 @@ export default {
     },
 
     fliterSearch(params) {
+      let loadingInstance =  this.$loading({ fullscreen: true });
       this.$api.workNodeTaskRecord.personalTaskTodoList(params).then(res => {
         if (res.code === 200) {
           this.pageData = res.data;
+          loadingInstance.close();
         }
       })
     },