<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="最后一次更新数据的时间" align="center" prop="time" />
	</el-table>
  </div>
</template>

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