优化运维中心样式

This commit is contained in:
648540858
2024-11-04 15:46:03 +08:00
parent 7a39f8a439
commit c9e2ad1b45
5 changed files with 167 additions and 99 deletions

View File

@@ -0,0 +1,54 @@
<template>
<div id="operationsForSystemInfo" style="margin: 40px">
<el-descriptions v-for="(value, key) in systemInfoList" :key="key" :column="2" :loading="loading">
<template slot="title">
<span>{{key}}</span>
</template>
<el-descriptions-item v-for="(childValue, childKey) in value" :key="childKey" >
<template slot="label">
<span>{{childKey}}</span>
</template>
{{ childValue }}
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<script>
export default {
name: 'operationsForSystemInfo',
data() {
return {
loading: false,
winHeight: window.innerHeight - 220,
systemInfoList: {
"测试": {
"qwqew": "1111"
}
},
};
},
created() {
this.initData()
},
methods: {
initData: function () {
this.loading = true;
this.$axios({
method: 'get',
url: `/api/server/info`,
}).then((res) => {
console.log(res)
if (res.data.code === 0) {
this.systemInfoList = res.data.data;
}
this.loading = false;
}).catch((error) => {
console.log(error);
this.loading = false;
});
},
}
};
</script>