[新增功能](el-admin v2.5): v2.5 beta 背景使用本地图片,服务监控优化

详情 https://www.ydyno.com/archives/1225.html
This commit is contained in:
ZhengJie
2020-05-07 22:43:43 +08:00
parent e729405834
commit 4ef60b1616
3 changed files with 9 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 KiB

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="login"> <div class="login" :style="'background-image:url('+ Background +');'">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" label-position="left" label-width="0px" class="login-form"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" label-position="left" label-width="0px" class="login-form">
<h3 class="title"> <h3 class="title">
EL-ADMIN 后台管理系统 EL-ADMIN 后台管理系统
@@ -46,10 +46,12 @@ import { encrypt } from '@/utils/rsaEncrypt'
import Config from '@/settings' import Config from '@/settings'
import { getCodeImg } from '@/api/login' import { getCodeImg } from '@/api/login'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import Background from '@/assets/images/background.jpg'
export default { export default {
name: 'Login', name: 'Login',
data() { data() {
return { return {
Background: Background,
codeUrl: '', codeUrl: '',
cookiePass: '', cookiePass: '',
loginForm: { loginForm: {
@@ -147,8 +149,6 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 100%; height: 100%;
/*请更换为自己的地址,不保证该地址不被删除*/
background-image:url(https://aurora-1255840532.cos.ap-chengdu.myqcloud.com/bg.jpeg);
background-size: cover; background-size: cover;
} }
.title { .title {

View File

@@ -234,6 +234,12 @@ export default {
initData(this.url, {}).then(data => { initData(this.url, {}).then(data => {
this.data = data this.data = data
this.show = true this.show = true
if (this.cpuInfo.xAxis.data.length >= 8) {
this.cpuInfo.xAxis.data.shift()
this.memoryInfo.xAxis.data.shift()
this.cpuInfo.series[0].data.shift()
this.memoryInfo.series[0].data.shift()
}
this.cpuInfo.xAxis.data.push(data.time) this.cpuInfo.xAxis.data.push(data.time)
this.memoryInfo.xAxis.data.push(data.time) this.memoryInfo.xAxis.data.push(data.time)
this.cpuInfo.series[0].data.push(parseFloat(data.memory.used)) this.cpuInfo.series[0].data.push(parseFloat(data.memory.used))