shuishen
2021-11-12 8e2a42e4a2da78f9cda9fa3e7732a0ef72f0c906
src/views/securityUnitChild/social.vue
@@ -73,11 +73,15 @@
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) {
      // deptid = this.userInfo
      // console.log(this.$store.getters.userInfo.dept_id);
      deptid = this.$store.getters.userInfo.dept_id;
    }
    return {
      do: 0,
      form: { cardid: "" },
      query: {},
@@ -143,10 +147,6 @@
                label: "女",
                value: 2,
              },
              {
                label: "未知",
                value: 3,
              },
            ],
            labelWidth: 110,
            addDisabled: true,
@@ -159,21 +159,21 @@
              },
            ],
          },
          {
            label: "民族",
            prop: "nation",
            addDisabled: true,
            editDisabled: true,
            width: 55,
            labelWidth: 110,
            rules: [
              {
                required: true,
                message: "请输入民族",
                trigger: "blur",
              },
            ],
          },
          // {
          //   label: "民族",
          //   prop: "nation",
          //   addDisabled: true,
          //   editDisabled: true,
          //   width: 55,
          //   labelWidth: 110,
          //   rules: [
          //     {
          //       required: true,
          //       message: "请输入民族",
          //       trigger: "blur",
          //     },
          //   ],
          // },
          // {
          //   label: "出生日期",
          //   labelWidth: 110,
@@ -325,7 +325,7 @@
              res: "data",
            },
            tip: "请上传 .xls,.xlsx 标准格式文件",
            action: "/api/social/import-user",
            action: "/api/social/import-user?deptid=" + deptid,
          },
          // {
          //   label: "数据覆盖",
@@ -376,6 +376,10 @@
          this.deptid;
      }
    },
    socialRE() {
      this.$refs.crud.refreshTable();
      this.$refs.crud.doLayout();
    },
  },
  computed: {
    ...mapGetters(["permission", "userInfo"]),
@@ -397,8 +401,7 @@
  },
  methods: {
    changes(val) {
      this.do++;
      if (this.do >= 2) {
      if (val.value != "") {
        getuseList(val.value).then((res) => {
          // console.log(res);
          var d = res.data.data;
@@ -549,6 +552,8 @@
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.$refs.crud.refreshTable();
        this.$refs.crud.doLayout();
        this.selectionClear();
      });
    },