<template>
<div class="app-container">
    <el-table :data="dmList">
		<el-table-column label="序号" align="center" prop="id" width="60" type="index"/>
		<el-table-column label="设备名称" align="center" prop="equipmentName" />
		<el-table-column label="水位最大值(m)" align="center" prop="wlheightMax" />
		<el-table-column label="水位最小值(m)" align="center" prop="wlheightMin" />
	</el-table>
   <el-pagination
		style="margin-top: 20px;"
		:page-sizes="[10, 20, 30, 40]"
		layout="total, sizes, prev, pager, next, jumper"
		:total="total"
		@size-change="handleSizeChange"
		@current-change="handleCurrentChange"
		@pagination="allData"
    />
  </div>
</template>

<script>
import {sbStatus} from "@/api/index.js";
import { parseTime } from "../../utils/index.js";
export default {
  data() {
    return {
      total: 0,
      dmList: [],
	  queryParams: {
	    pageNum: 1,
	    pageSize: 10,
	  },
    };
  },
  mounted(){ 
	 this.allData();
  },
  methods: {
	  allData() {
	  	var param ={
			pageNum:1,
			pageSize: 10
		}
	  	sbStatus(param).then((res) => {
			console.log(res)
	  	   var body = res.rows || [];
		   this.dmList = body;
		   this.total = res.total;
	  	});
	  },
	  //获取全部信息管理分页
	  handleSizeChange(val) {
	  // 每页多少条
		this.queryParams.pageSize =val ;
		this.allData()
	  },
	  handleCurrentChange(val) {
	  // 当前是多少页
		this.queryParams.pageNum = val;
		this.allData()
	  },
  } 
};
</script>
<style rel="stylesheet/scss" lang="scss" scope>
	// .el-row{
	// 	width: 100%;
	// 	height: 3.25rem;
	// 	display: flex;
	// 	justify-content: space-between;
	// 	align-items: center;
	// }
	// .el-col{
	// 	width: 95%;
	// 	height: 3.25rem;
	// 	display: flex;
	// 	justify-content: space-between;
	// 	align-items: center;
	// 	margin-left: 2.875rem;
	// }
	// .newform{
	// 	width: 1680px;
	// 	height: 75px;
	// 	background-color: #fff;
	// 	display: flex;
	// 	justify-content: flex-start;
	// 	align-items: center;
		
	// }
	// .newitem{
	// 	margin-bottom: 0px!important;
	// }
</style>
