管道基础大数据平台系统开发-【前端】-新系統界面
王旭
2023-02-16 c40e3de17653a10a06ead765813783a5614a32ce
src/views/maintenance/eventlogManage.vue
@@ -5,13 +5,15 @@
        `${$t('operatManage.ResourceLog')}`,
      ]"></My-bread>
    <el-divider />
    <div class="inquire subpage_Div">
    <div class="inquire subpage_Div" ref="container">
      <el-form
        :inline="true"
        ref="sizeForm"
        :model="sizeForm"
      >
        <el-form-item
      <div class="flex_box">
        <div style="margin-right: auto">
            <el-form-item
          prop="uname"
          :label="$t('operatManage.operationLogObj.username')"
        >
@@ -85,8 +87,9 @@
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item style="float: right">
        </div>
        <div>
 <el-form-item>
          <el-button
            @click="onSubmit"
            icon="el-icon-search"
@@ -100,19 +103,24 @@
            size="small"
          >{{ $t("operatManage.operationLogObj.empty") }}</el-button>
        </el-form-item>
        </div>
      </div>
      </el-form>
    </div>
    <div class="table_box subpage_Div">
    <div class="table_box subpage_Div" :style="styleVar">
      <el-table
        :data="tableData"
        style="width: 100%"
        height="84%"
        height="calc(100% - 57px)"
      >
        <el-table-column
          align="center"
          type="index"
          :label="$t('operatManage.ELM.index')"
          width="70px"
           height="calc(100% - 57px)"
        />
        <el-table-column
          align="center"
@@ -144,7 +152,7 @@
        />
      </el-table>
      <div
        style="margin-top: 10px"
        class="pagination_box"
      >
        <el-pagination
@@ -186,9 +194,27 @@
        pageSize: 10,
      },
      count: 0,
      tableHeight: 0,
      timer: 0,
      styleVar: {
        "height": "calc(100% - 109px)",
      },
    };
  },
  methods: {
        onResize() {
      this.timer && clearTimeout(this.timer);
      this.timer = setTimeout(() => {
        this.calHeight();
      }, 500);
    },
    calHeight() {
      this.$nextTick(() => {
        const rect = this.$refs.container.getBoundingClientRect();
        this.tableHeight = `${rect.height + 97}px`;
        this.styleVar["height"] = `calc(100% - ${rect.height + 97}px)`;
      });
    },
    //格式化时间
    add0(m) {
      return m < 10 ? "0" + m : m;
@@ -276,6 +302,14 @@
      this.count = data.count;
    },
  },
    beforeDestroy() {
    this.timer && clearTimeout(this.timer);
    window.removeEventListener("resize", this.onResize);
  },
    mounted() {
    window.addEventListener("resize", this.onResize);
    this.calHeight()
  },
  created() {
    this.getList();
  },
@@ -293,27 +327,18 @@
  }
  .inquire {
    
    padding: 10px;
    padding: 8px;
    margin-top: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    .el-form-item {
      margin: 7px;
      margin: 5px;
    }
    
  }
  .table_box {
    overflow: auto;
    padding: 10px;
    border-radius: 5px;
    height: 57%;
    /*修改table 表体的背景颜色和文字颜色*/
  }
  .text-center {
    text-align: center;
  }