Administrator
2022-05-09 c7735db135f9c3c99224d8b5d2157926efde0977
src/views/qiandao/signIn.vue
@@ -49,16 +49,13 @@
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
        total: 0
      },
      query: {},
      data: [],
      form: {},
      search: {},
      option: {
        // card: true,
        // tip: false,
        // searchSize: "mini",
        searchMenuSpan: 6,
        height: "auto",
        index: true,
@@ -73,15 +70,12 @@
        labelWidth: "120",
        menuWidth: 200,
        align: "center",
        menuWidth: 90,
        menu: false,
        refreshBtn: false,
        columnBtn: false,
        emptyBtnText: " ",
        searchBtnText: " ",
        searchShowBtn: false,
        // reserveSelection: true,
        // selection: true,
        column: [
          {
            label: "姓名",
@@ -89,24 +83,22 @@
            search: true,
            searchSpan: 6,
            searchLabelWidth: 45,
            width: 70,
          },
          {
            label: "公司",
            prop: "deptName",
            search: true,
            searchSpan: 7,
            searchLabelWidth: 45,
            searchLabelWidth: 45
          },
          {
            label: "身份证号码",
            prop: "idCardNo",
            search: true,
            searchSpan: 9,
            searchLabelWidth: 85,
            searchLabelWidth: 90,
            // searchRange: true,
            // searchValue: this.getuserid(),
            width: 180,
          },
          {
            label: "签到时间",
@@ -117,8 +109,7 @@
            // search: true,
            // searchSpan: 5,
            // searchLabelWidth: 80,
            width: 180,
          },
          }
          // {
          //   label: "签到时间",
          //   prop: "signTime",
@@ -134,12 +125,12 @@
        ],
        delBtn: false,
        editBtn: false,
        addBtn: false,
      },
        addBtn: false
      }
    };
  },
  computed: {
    ...mapGetters(["signData", "userInfo"]),
    ...mapGetters(["signData", "userInfo"])
    // permissionList() {
    //   return {
    //     addBtn: this.vaildData(this.permission.notice_add, false),
@@ -153,12 +144,19 @@
    var times = new Date();
    this.year = times.getFullYear();
    this.month = Number(times.getMonth()) + 1;
    if (this.month < 10) {
      this.month = "0" + this.month;
    }
    // console.log(this.month,123456);
    this.day = times.getDate();
    if (this.day < 10) {
      this.day = "0" + this.day;
    }
    this.timeDom = this.year + "-" + this.month + "-" + this.day;
    this.search["signTime"] = this.timeDom;
    this.query["signTime"] = this.timeDom;
    let t = this;
    window.addEventListener("resize", function () {
    window.addEventListener("resize", function() {
      t.resetHeight();
    });
    t.resetHeight();
@@ -256,28 +254,32 @@
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    msg: function (type, msg) {
    msg: function(type, msg) {
      this.$message({
        message: msg,
        type: type,
        type: type
      });
    },
    onLoad(page, params = {}) {
      this.loading = true;
      params["trainingUnitId"] = this.userInfo.dept_id;
      params["signTime"] = this.query["signTime"];
      if (!params.signTime) {
        return;
      }
      getListSign(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
      ).then(res => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        console.log(this.data, 456789);
        this.loading = false;
      });
    },
  },
    }
  }
};
</script>