liuyg
2021-10-21 5c1972a59ae6444814b1235917d8a5464be21b59
表格错乱
3 files modified
57 ■■■■■ changed files
src/views/securityAnalysis/child/socialSecurity.vue 1 ●●●● patch | view | raw | blame | history
src/views/securityUnitChild/index.vue 48 ●●●●● patch | view | raw | blame | history
src/views/securityUnitChild/social.vue 8 ●●●● patch | view | raw | blame | history
src/views/securityAnalysis/child/socialSecurity.vue
@@ -403,6 +403,7 @@
      }
    },
    reself() {
      //刷新表格
      this.$refs.crud.refreshTable();
      this.$refs.crud.doLayout();
    },
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();
      });
    },
    //派遣记录
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();
      });
    },