lxp
2025-03-18 ee38779810cfbe512788f71679aaaaa7fedb1775
src/views/bulletinBoard/tasksShow/index.vue
@@ -116,7 +116,7 @@
        border
        :data="tableData"
        style="width: 100%"
        :height="tableHeight"
        :height="tableHeight+''"
        :header-cell-style="{ textAlign: 'center' }"
        :cell-style="{ textAlign: 'center' }"
      >
@@ -228,7 +228,7 @@
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="page.currentPage"
          :current-page="page.current"
          :page-sizes="[20, 40, 60, 80, 100]"
          :page-size="20"
          layout="total, sizes, prev, pager, next, jumper"
@@ -257,11 +257,11 @@
      intervalId: null,
      total: 0,
      page: {
        currentPage: 1,
        pageSize: 20,
        current: 1,
        size: 20,
      },
      tableData: [],
      tableHeight: 0,
      tableHeight: "",
    };
  },
  watch: {
@@ -320,12 +320,7 @@
  methods: {
    //动态获取表格高度
    handlerResize() {
      let viewHeight = window.innerHeight;
      let titleHeight = 60;
      let headMenuHeight = 90;
      let pageHeight = 42;
      this.tableHeight =
        viewHeight - titleHeight - headMenuHeight - pageHeight - 120;
      this.tableHeight = window.innerHeight - 50 - 46 - 60 - 80  - 30 - 30 - 32;
    },
    // 关闭
    close() {
@@ -373,20 +368,20 @@
      this.getTableData();
    },
    handleSizeChange(val) {
      this.page.pageSize = val;
      this.page.size = val;
      this.getTableData();
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      this.page.currentPage = val;
      this.page.current = val;
      this.getTableData();
      console.log(`当前页: ${val}`);
    },
    getTableData() {
      this.loading = true;
      let data = {
        currentPage: this.page.currentPage,
        pageSize: this.page.pageSize,
        current: this.page.current,
        size: this.page.size,
        sonLaboratory: this.sonLaboratory,
      };
        tasksShow(data).then((res) => {