| | |
| | | <body> |
| | | <div id="app" style="display: flex;justify-content: center;flex-wrap: wrap;"> |
| | | <div style="width: 100%;"> |
| | | <el-table border ref="singleTable" :data="tableData" highlight-current-row |
| | | max-height="350" style="width: 100%"> |
| | | <el-table border ref="singleTable" :data="tableData" style="width: 100%"> |
| | | <el-table-column property="category" label="类别"> |
| | | </el-table-column> |
| | | <el-table-column property="equipmentNo" label="设备号"> |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div style="width: 100%;"> |
| | | <el-table border ref="singleTable" :data="adjacentLocMast" style="width: 100%"> |
| | | <el-table-column property="category" label="当前库位"> |
| | | </el-table-column> |
| | | <el-table-column property="equipmentNo" label="当前库位状态"> |
| | | </el-table-column> |
| | | <el-table-column property="categoryOther" label="相邻库位"> |
| | | </el-table-column> |
| | | <el-table-column property="equipmentNoOther" label="相邻库位状态"> |
| | | </el-table-column> |
| | | <el-table-column property="errorM" label="异常描述"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | |
| | | </div> |
| | | <script> |
| | | var app = new Vue({ |
| | | el: '#app', |
| | | data: { |
| | | tableData: [] |
| | | tableData: [], |
| | | adjacentLocMast: [] |
| | | }, |
| | | created() { |
| | | this.init() |
| | |
| | | methods: { |
| | | init() { |
| | | this.getTableData() |
| | | this.getAdjacentLocMast() |
| | | |
| | | setInterval(() => { |
| | | this.getTableData() |
| | | this.getAdjacentLocMast() |
| | | // this.demoStatus() |
| | | }, 1000) |
| | | }, |
| | |
| | | that.tableData = res.data |
| | | } |
| | | }); |
| | | }, |
| | | getAdjacentLocMast() { |
| | | let that = this; |
| | | $.ajax({ |
| | | url: baseUrl + "/error/device/locSts/adjacentLocMast", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data: {}, |
| | | dataType: 'json', |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'post', |
| | | success: function (res) { |
| | | that.adjacentLocMast = res.data |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }) |