From 9cf6960c4fe099f0e0f2388d3fca775e176d830a Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Thu, 26 Aug 2021 10:20:53 +0800
Subject: [PATCH] 跨区域

---
 src/views/home/index.vue |   23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 3d57c30..053f03f 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -78,6 +78,11 @@
       dataCard: [],
       out: true,
       d: [],
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0,
+      },
     };
   },
   computed: {
@@ -85,12 +90,7 @@
   },
   created() {
     this.cc();
-    var page = {
-      pageSize: 10,
-      currentPage: 1,
-      total: 0,
-    };
-    this.onLoad(page);
+    this.onLoad(this.page);
     this.dataCard = ourDatas;
   },
   methods: {
@@ -106,15 +106,15 @@
             getListrev(page.currentPage, page.pageSize, params).then((resv) => {
               this.data = this.data.concat(resv.data.data.records);
               console.log("已有申请数量", this.data.length);
-              if (this.data.length >= 1) {
-                // this.$store.commit("changehandle", false);
+              if (this.data.length == 0) {
+                this.$store.commit("changecanDoIt", true);
               } else {
-                // this.$store.commit("changehandle", true);
+                this.$store.commit("changecanDoIt", false);
               }
               this.showCard = true;
               this.data.forEach((item) => {
                 for (const key in this.dataCard) {
-                  if (this.dataCard[key].type == item.ptype) {
+                  if (this.dataCard[key].ptype == item.ptype) {
                     console.log("已申请名称", this.dataCard[key].menuName);
                     console.log("申请状态", this.dataCard[key].type);
                     if (
@@ -122,6 +122,8 @@
                       this.dataCard[key].type == 2
                     ) {
                       this.$store.commit("changecanDoIt", false);
+                    } else {
+                      this.$store.commit("changecanDoIt", true);
                     }
                   }
                 }
@@ -161,6 +163,7 @@
         this.$store.commit("doitApprovalShow", true);
         return;
       }
+      this.onLoad(this.page);
       this.$store.commit("changeuseWhere", val);
     },
   },

--
Gitblit v1.9.3