Files
profitManage/src/views/index.vue

139 lines
3.3 KiB
Vue
Raw Normal View History

2025-08-27 17:54:46 +08:00
<template>
<div class="app-container home w100" style="height: calc(100vh - 85px);">
<!-- header -->
<div class="w100" style="height: 40%;">
<div class="h100 disInlineBlock" style="width: 25%;border: 1px solid #d8dce6;border-radius: 10px">
<EchartsPie :dataList="dataList[0]" class="w100 h100"></EchartsPie>
</div>
<div class="h100 disInlineBlock" style="width: 48%;border: 1px solid #d8dce6;margin: 0 1%;border-radius: 10px">
<EchartsLine :lineData="lineDataParams" :title="``" class="w100 h100"></EchartsLine>
</div>
<div class="h100 disInlineBlock" style="width: 25%;border: 1px solid #d8dce6;border-radius: 10px">
<EchartsPie :dataList="dataList[1]" class="w100 h100"></EchartsPie>
</div>
</div>
<div class="w100" style="height: 58%;margin: 1% 0;border: 1px solid #d8dce6;border-radius: 10px">
<EchartsBar :barData="lineDataParams" :title="``" class="w100 h100"></EchartsBar>
</div>
</div>
</template>
<script>
import EchartsPie from "@/components/echartsList/pie.vue"
import EchartsLine from "@/components/echartsList/line.vue"
import EchartsBar from "@/components/echartsList/bar.vue"
export default {
name: "Index",
components: {EchartsPie, EchartsLine, EchartsBar},
data() {
return {
// 版本号
version: "3.6.6",
dataList: [{
centerVal: '56',
unit: '台',
center: ['30%', '50%'],
color: ['#31bb42', '#f96602'],
data: [
{ value: 36, name: '在线服务器' },
{ value: 20, name: '离线服务器' }
]
},{
centerVal: '10',
unit: '台',
center: ['30%', '50%'],
color: ['#1c7dbc', '#f80a4f'],
data: [
{ value: 8, name: '在线交换机' },
{ value: 2, name: '离线交换机' }
]
},{
centerVal: '82',
unit: '%',
center: ['30%', '50%'],
color: ['#1a7aff', '#f96602'],
data: [
{ value: 82, name: '服务器整体带宽利用率' },
{ value: 18, name: '离线交换机' }
]
}],
lineDataParams: {
hiddenTime: true,
lineXData: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
data: [820, 932, 901, 934, 1290, 1330, 1320]
}
}
},
methods: {
goTarget(href) {
window.open(href, "_blank")
}
}
}
</script>
<style scoped lang="scss">
.home {
blockquote {
padding: 10px 20px;
margin: 0 0 20px;
font-size: 17.5px;
border-left: 5px solid #eee;
}
hr {
margin-top: 20px;
margin-bottom: 20px;
border: 0;
border-top: 1px solid #eee;
}
.col-item {
margin-bottom: 20px;
}
ul {
padding: 0;
margin: 0;
}
font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
color: #676a6c;
overflow-x: hidden;
ul {
list-style-type: none;
}
h4 {
margin-top: 0px;
}
h2 {
margin-top: 10px;
font-size: 26px;
font-weight: 100;
}
p {
margin-top: 10px;
b {
font-weight: 700;
}
}
.update-log {
ol {
display: block;
list-style-type: decimal;
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0;
margin-inline-end: 0;
padding-inline-start: 40px;
}
}
}
</style>