<template>
<div class="app-container">
	<el-form
		:model="queryParams"
		ref="queryForm"
		size="small"
		:inline="true"
		label-width="68px"
		class="newform"
	>
	<el-button
	  type="warning"
	  plain
	  icon="el-icon-download"
	  size="mini"
	  @click="Exporsb"
	  style="height:35px;margin-left: 20px;"
	  >导出</el-button
	>
    </el-form>
    <el-table :data="dmList" height="618">
		<el-table-column label="序号" align="center" prop="id" width='300' type="index"/>
		<el-table-column label="告警名称" align="center" prop="equipmentName" />
		<el-table-column label="月计划取水量(m³)" align="center" prop="monthvalue" />
		<el-table-column label="月实际取水量(m³)" align="center" prop="value" />
		<el-table-column label="月超出取水量(m³)" align="center" prop="overvalue" />
		<el-table-column label="月份" align="center" prop="month" />
	</el-table>
  </div>
</template>

<script>
import {searchqs} from "@/api/historyData/lxsb.js";
export default {
  data() {
    return {
     
      dmList: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
      },
    };
  },
  mounted(){ 
		this.allData();
  },
  methods: {
	  allData() {
	  	searchqs().then((res) => {
	  	   var body = res.data || [];
		   this.dmList = body;
	  	});
	  },
	  /** 导出按钮操作 */
	  Exporsb() {
		  this.download(
		    "/project/plan/exportIntakAlarmVO",
		    {
		      ...this.queryParams,
		    },
		    `总用水量告警数据.xlsx`
		  );
	  },
  } 
};
</script>
<style rel="stylesheet/scss" lang="scss" scope>
	.newform{
		width: 100%;
		height: 75px;
		background-color: #fff;
		display: flex;
		justify-content: flex-start;
		align-items: center;
		
	}
</style>
