From 5c1972a59ae6444814b1235917d8a5464be21b59 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Thu, 21 Oct 2021 17:32:39 +0800
Subject: [PATCH] 表格错乱
---
src/views/securityUnitChild/social.vue | 8 +++++++-
src/views/securityUnitChild/index.vue | 48 +++++++++++++++++++++++++++++-------------------
src/views/securityAnalysis/child/socialSecurity.vue | 1 +
3 files changed, 37 insertions(+), 20 deletions(-)
diff --git a/src/views/securityAnalysis/child/socialSecurity.vue b/src/views/securityAnalysis/child/socialSecurity.vue
index 2585707..ee4ba8b 100644
--- a/src/views/securityAnalysis/child/socialSecurity.vue
+++ b/src/views/securityAnalysis/child/socialSecurity.vue
@@ -403,6 +403,7 @@
}
},
reself() {
+ //刷新表格
this.$refs.crud.refreshTable();
this.$refs.crud.doLayout();
},
diff --git a/src/views/securityUnitChild/index.vue b/src/views/securityUnitChild/index.vue
index af44146..3ad565d 100644
--- a/src/views/securityUnitChild/index.vue
+++ b/src/views/securityUnitChild/index.vue
@@ -240,7 +240,7 @@
<!-- <span v-else-if="typeTABS.prop === 'tab9'" class="tab"> -->
<el-tab-pane label="社保记录" name="tab9">
<!-- 社保记录 -->
- <social :deptid="obj0.departmentid"></social>
+ <social :deptid="obj0.departmentid" :socialRE="social"></social>
<!-- </span> -->
</el-tab-pane>
<!-- <span v-else-if="typeTABS.prop === 'tab7'" class="tab"> -->
@@ -357,6 +357,7 @@
],
};
return {
+ social: false, //解决表格错乱
overHtp: false,
activeName: "tab1",
@@ -625,24 +626,24 @@
window.open(`/api/member/export-template`);
},
- handleChangeTABS(column) {
- // this.typeTABS = column;
- // console.log(column.prop);
- // this.$message.success(JSON.stringify(column));
- if (column.prop == "tab1") {
- this.loading1 = false;
- this.loading2 = false;
- // this.onLoad(this.page);
- } else if (column.prop == "tab2") {
- // this.loading1 = false;
- this.loading2 = false;
- this.onLoad1(this.page1); //第二个表格不会自动执行
- } else if (column.prop == "tab3") {
- this.loading1 = false;
- // this.loading2 = false;
- this.onLoad2(this.page2); //第二个表格不会自动执行
- }
- },
+ // handleChangeTABS(column) {
+ // // this.typeTABS = column;
+ // // console.log(column.prop);
+ // // this.$message.success(JSON.stringify(column));
+ // if (column.prop == "tab1") {
+ // this.loading1 = false;
+ // this.loading2 = false;
+ // // this.onLoad(this.page);
+ // } else if (column.prop == "tab2") {
+ // // this.loading1 = false;
+ // this.loading2 = false;
+ // this.onLoad1(this.page1); //第二个表格不会自动执行
+ // } else if (column.prop == "tab3") {
+ // this.loading1 = false;
+ // // this.loading2 = false;
+ // this.onLoad2(this.page2); //第二个表格不会自动执行
+ // }
+ // },
handleClick(tab, event) {
// console.log(tab.name, event);
if (tab.name == "tab1") {
@@ -657,6 +658,10 @@
this.loading1 = false;
// this.loading2 = false;
this.onLoad2(this.page2); //第二个表格不会自动执行
+ } else if (tab.name == "tab9") {
+ this.social = true; //表格错乱
+ } else {
+ this.social = false;
}
},
//派遣记录
@@ -788,6 +793,9 @@
this.data1 = data.records;
console.log(this.data1);
this.loading1 = false;
+
+ this.$refs.crudrec1.refreshTable();
+ this.$refs.crudrec1.doLayout();
});
// onLoad1(page, params = {}) {
// this.loading1 = true;
@@ -935,6 +943,8 @@
this.data2 = data.records;
console.log(this.data2);
this.loading2 = false;
+ this.$refs.crudrec2.refreshTable();
+ this.$refs.crudrec2.doLayout();
});
},
//派遣记录
diff --git a/src/views/securityUnitChild/social.vue b/src/views/securityUnitChild/social.vue
index d13c4a8..54a2354 100644
--- a/src/views/securityUnitChild/social.vue
+++ b/src/views/securityUnitChild/social.vue
@@ -73,7 +73,7 @@
import { mapGetters } from "vuex";
import { getToken } from "@/util/auth";
export default {
- props: ["deptid"],
+ props: ["deptid", "socialRE"],
data() {
var deptid = this.deptid;
if (this.deptid == undefined) {
@@ -380,6 +380,10 @@
this.deptid;
}
},
+ socialRE() {
+ this.$refs.crud.refreshTable();
+ this.$refs.crud.doLayout();
+ },
},
computed: {
...mapGetters(["permission", "userInfo"]),
@@ -552,6 +556,8 @@
this.page.total = data.total;
this.data = data.records;
this.loading = false;
+ this.$refs.crud.refreshTable();
+ this.$refs.crud.doLayout();
this.selectionClear();
});
},
--
Gitblit v1.9.3