| | |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <p>实时在线率:共<span class="greenClor">{{ tableData.length }}</span>台,在线<span class="greenClor">{{ onlineData }}</span>台,在线率 <span :class=" onlineRate<90 ?'redClor':'greenClor'">{{ onlineRate.toFixed(2) }}%</span></p> |
| | | <p>实时在线率:共<span class="greenClor">{{ macOnlineData.sum }}</span>台,在线<span class="greenClor">{{ macOnlineData.online }}</span>台,在线率 <span :class="Number(macOnlineData.onlineRate)<90 ?'redClor':'greenClor'">{{ macOnlineData.onlineRate }}%</span></p> |
| | | <div> |
| | | <el-table |
| | | v-loading="loading" |
| | |
| | | time: '今天', |
| | | selectTime: '', |
| | | macDate: {}, |
| | | macOnlineData: {}, |
| | | orgData: [], |
| | | tableData: [], |
| | | handleShow: false, |
| | |
| | | this.macDate.endTime = this.formInline.endTime |
| | | }, |
| | | handleSearch () { |
| | | this.getOnlineData() |
| | | if (this.formInline.organizationId !== '') { |
| | | if (this.time === '今天') { |
| | | this.formInline.startTime = dayjs().startOf('day').format('YYYY-MM-DD HH:mm') |
| | |
| | | this.$message.warning('请选择组织或者时间') |
| | | } |
| | | }, |
| | | getOnlineData () { |
| | | this.$request({ |
| | | url: '/onlineRate/state', |
| | | method: 'get', |
| | | params: { |
| | | organizationId: this.formInline.organizationId |
| | | } |
| | | }) |
| | | .then(res => { |
| | | this.macOnlineData = res.data |
| | | }) |
| | | .catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | getOrganizationId () { |
| | | this.$request({ |
| | | url: '/organization/getOrganizationId', |