Explorar el Código

Finish Hotfix-zh-16

howie hace 3 años
padre
commit
7a45a9d546

+ 3 - 2
src/layout/components/AppMain.vue

@@ -1,7 +1,7 @@
 <template>
   <section class="app-main">
     <transition name="fade-transform" mode="out-in">
-      <keep-alive>
+      <keep-alive >
         <router-view />
       </keep-alive>
     </transition>
@@ -13,10 +13,11 @@ export default {
   name: "AppMain",
   computed: {
     cachedViews() {
-      // console.log(this.$store.state.tagsView.cachedViews);
+
       return this.$store.state.tagsView.cachedViews;
     },
     key() {
+        console.log(this.$route.path,'45454');
       return this.$route.path;
     },
   },

+ 10 - 6
src/views/sales_policy/components/AddPolicy.vue

@@ -331,8 +331,8 @@
               @size-change="handleSizeChange2"
               @current-change="handleCurrentChange2"
               :current-page="dcurrentPage"
-              :page-sizes="[10, 20, 30, 50]"
-              :page-size="10"
+              :page-sizes="pageSizeArr"
+              :page-size="size"
               layout="total, sizes, prev, pager, next, jumper"
               :total="listTotal"
             >
@@ -493,6 +493,8 @@ export default {
       },
       dataList: [],
       addList: [],
+      pageSizeArr:[10, 20, 30, 50],
+      size:10,
       listLoading: false,
       dialogVisible: false,
       importFileList: [],
@@ -698,6 +700,7 @@ export default {
     handleSizeChange2(val) {
       this.dpageSize = val;
       this.dcurrentPage = 1;
+
      this.handletwoList()
     },
     // 更改当前页
@@ -736,8 +739,8 @@ export default {
               k.walletIds = [...k.walletIds, l.walletId];
             });
           });
-
-          this.dataList = [...this.dataList, ...result.data.records];
+          // this.dataList=[]
+          this.dataList = result.data.records
           this.listTotal = result.data.total;
         })
         .catch((err) => {
@@ -816,11 +819,12 @@ export default {
         });
       }
       this.dataList.splice(index, 1);
-      this.listTotal -= 1;
+      // this.listTotal -= 1;
       this.$successMsg("删除成功");
     },
     handleNewInfo() {
       // 物料列表
+
       this.dataList.push({
         id: "",
         discAmount: "",
@@ -838,7 +842,7 @@ export default {
         walletRelaList: [],
       });
        this.sleectBox.currentPage =1
-      this.listTotal += 1;
+      // this.listTotal += 1;
       // this.dataList.push(this.addList[this.addList.length-1])
     },
     handleSave() {