| | |
| | | }, |
| | | data() { |
| | | return { |
| | | button:{ |
| | | setButton:false |
| | | }, |
| | | totalData: [], |
| | | // 保存设置 |
| | | save: false, |
| | |
| | | |
| | | // 点击按钮触发 |
| | | show() { |
| | | // |
| | | this.button.setButton = true |
| | | // 当取消选择时,防止图形还保留在页面。 |
| | | if (this.outside.checkedShops.length == 0) { |
| | | this.outside.realTimeData = []; |
| | |
| | | } |
| | | // 根据所选的店铺请求数据 |
| | | this.request(); |
| | | this.button.setButton = false |
| | | // 定时更新 |
| | | setInterval(() => { |
| | | this.request(); |
| | | }, this.timeInterval); |
| | |
| | | content="点击展示实时数据" |
| | | placement="top-start" |
| | | > |
| | | <el-button type="success" @click="show" style="margin-left: 10px"> |
| | | <el-button type="success" :loading="button.setButton" @click="show" style="margin-left: 10px"> |
| | | 设置 |
| | | </el-button> |
| | | </el-tooltip> |