This commit is contained in:
qiangyanwen 2022-11-27 13:39:08 +08:00
parent a352073f39
commit 5f5a98f11d
1 changed files with 100 additions and 90 deletions

View File

@ -31,6 +31,7 @@
<script setup>
import {onMounted, reactive, ref} from "vue";
import {Cpu, SysInfo, disk} from "@/api/monitor"
let sysparams = reactive({
count: 0,
name: "",
@ -108,6 +109,7 @@ onMounted(()=>{
QueryCpu();
}, 5000)
})
function QuerySys() {
SysInfo().then((response) => {
if (response.code === 200) {
@ -120,6 +122,7 @@ function QuerySys() {
}
})
}
const QueryCpu = () => {
Cpu().then((rep) => {
let {cpu_percent} = rep.data
@ -161,6 +164,7 @@ const QueryDisk = ()=>{
height: 300px;
width: 300px;
}
.echarts {
width: 270px;
}
@ -174,28 +178,34 @@ const QueryDisk = ()=>{
background-color: #42EBFF;
overflow-x: scroll;
}
p {
display: flex;
justify-content: flex-start;
font-size: 16px;
font-weight: bold;
}
#components-table-demo-size h4 {
margin-bottom: 16px;
}
.disk {
border: 1px solid #f5f5f5;
height: 100%
}
.memory {
border: 1px solid #f5f5f5;
height: 100%;
}
.sys {
border: 1px solid #f5f5f5;
height: 100%
}
.cpu {
border: 1px solid #f5f5f5;
height: 100%;