|
@@ -0,0 +1,248 @@
|
|
|
+<template>
|
|
|
+ <myMain>
|
|
|
+ <div class="main animate__animated animate__backInRight" v-loading="loading">
|
|
|
+ <div class="one">
|
|
|
+ <span>{{ $t('login.title') }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="two">
|
|
|
+ <div class="two_1" style="width: 25%">
|
|
|
+ <div class="boxall boxall_1">
|
|
|
+ <div class="title">分区节点数</div>
|
|
|
+ <div class="echarts">
|
|
|
+ <echarts1></echarts1>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="boxall boxall_2">
|
|
|
+ <div class="title">CPU资源利用率(%)</div>
|
|
|
+ <div class="echarts">
|
|
|
+ <echarts4></echarts4>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="boxall boxall_3">
|
|
|
+ <div class="title">存储利用率(%)</div>
|
|
|
+ <div class="echarts">
|
|
|
+ <echarts3></echarts3>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="two_1" style="width: 45%">
|
|
|
+ <div class="boxall boxall_8">
|
|
|
+ <div class="item">
|
|
|
+ <h4>{{ nodeList[0]?.num || 0 }}</h4>
|
|
|
+ <div class="itemTilte">
|
|
|
+ <el-icon color="#006cff"><Grid /></el-icon>
|
|
|
+ <span>节点总数</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <h4>{{ cpuList[0]?.num || 0 }}</h4>
|
|
|
+ <div class="itemTilte">
|
|
|
+ <el-icon color="#ed3f35"><Histogram /></el-icon>
|
|
|
+ <span>CPU(核)总数</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <h4>{{ userList[0]?.num || 0 }}</h4>
|
|
|
+ <div class="itemTilte">
|
|
|
+ <el-icon color="#6acca3"><UserFilled /></el-icon>
|
|
|
+ <span>用户总数</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <h4>{{ userList[1]?.num || 0 }}</h4>
|
|
|
+ <div class="itemTilte">
|
|
|
+ <el-icon color="#6acca3"><UserFilled /></el-icon>
|
|
|
+ <span>在线人数</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="boxall boxall_4">
|
|
|
+ <div class="title">实时状态作业数(总数:{{ work_total || 0 }})</div>
|
|
|
+ <div class="echarts">
|
|
|
+ <echarts2></echarts2>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="boxall boxall_5">
|
|
|
+ <div class="title">作业提交数</div>
|
|
|
+ <div class="echarts">
|
|
|
+ <echarts5></echarts5>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="two_1" style="width: 25%">
|
|
|
+ <div class="boxall boxall_6">
|
|
|
+ <div class="title">组织提交作业TOP5(30天)</div>
|
|
|
+ <div class="echarts">
|
|
|
+ <echarts6></echarts6>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="boxall boxall_7">
|
|
|
+ <div class="title">用户提交作业TOP5(30天)</div>
|
|
|
+ <div class="echarts">
|
|
|
+ <echarts7></echarts7>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </myMain>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import myMain from '@/components/dataV/myMain.vue'
|
|
|
+// 组件
|
|
|
+import echarts1 from './echarts/echarts1.vue'
|
|
|
+import echarts2 from './echarts/echarts2.vue'
|
|
|
+import echarts3 from './echarts/echarts3.vue'
|
|
|
+import echarts4 from './echarts/echarts4.vue'
|
|
|
+import echarts5 from './echarts/echarts5.vue'
|
|
|
+import echarts6 from './echarts/echarts6.vue'
|
|
|
+import echarts7 from './echarts/echarts7.vue'
|
|
|
+import { StatisticsStore } from '@/store/api/core/statistics'
|
|
|
+const statisticsStore = StatisticsStore()
|
|
|
+// 加载中
|
|
|
+const loading = ref(false)
|
|
|
+// 节点情况
|
|
|
+const nodeList = ref([])
|
|
|
+// CPU情况
|
|
|
+const cpuList = ref([])
|
|
|
+// 用户数量
|
|
|
+const userList = ref([])
|
|
|
+// 作业总数
|
|
|
+const work_total = ref(0)
|
|
|
+// 请求
|
|
|
+onMounted(async () => {
|
|
|
+ loading.value = true
|
|
|
+ await search()
|
|
|
+ loading.value = false
|
|
|
+})
|
|
|
+const search = async () => {
|
|
|
+ const res = await statisticsStore.total()
|
|
|
+ if (res.errcode == '0') {
|
|
|
+ nodeList.value = res.data.nodeList
|
|
|
+ cpuList.value = res.data.cpuList
|
|
|
+ userList.value = res.data.userList
|
|
|
+ work_total.value = res.data.work_total
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style scoped lang="scss">
|
|
|
+.main {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ position: relative;
|
|
|
+ background: linear-gradient(25deg, #0f2249, #182e5a 20%, #0f2249 40%, #182e5a 60%, #0f2249 80%, #182e5a 100%);
|
|
|
+ padding: 0rem;
|
|
|
+ margin: 0rem;
|
|
|
+ color: #ffffff;
|
|
|
+ font-family: '微软雅黑';
|
|
|
+ cursor: default; /* 将鼠标样式更改为箭头 */
|
|
|
+
|
|
|
+ .one {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 100%;
|
|
|
+ height: 8%;
|
|
|
+ background: url(/images/head_bg.png);
|
|
|
+ background-size: 100% 100%;
|
|
|
+ font-size: 2.4rem;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #53befe;
|
|
|
+ span {
|
|
|
+ letter-spacing: 0.2em;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .two {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-evenly;
|
|
|
+ width: 100%;
|
|
|
+ height: 88%;
|
|
|
+ margin: 1rem 0 0 0;
|
|
|
+ .two_1 {
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-between;
|
|
|
+ .boxall {
|
|
|
+ border: 1px solid #3486da;
|
|
|
+ background: rgba(0, 70, 190, 0.1);
|
|
|
+ position: relative;
|
|
|
+ padding: 1rem;
|
|
|
+ z-index: 10;
|
|
|
+ .title {
|
|
|
+ background: linear-gradient(to right, rgba(48, 82, 174, 1), rgba(48, 82, 174, 0));
|
|
|
+ color: #fff;
|
|
|
+ font-size: 1rem;
|
|
|
+ padding: 0.5rem 0.6rem;
|
|
|
+ margin: 0 0 1rem 0;
|
|
|
+ }
|
|
|
+ .echarts {
|
|
|
+ height: 85%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .boxall:before,
|
|
|
+ .boxall:after {
|
|
|
+ position: absolute;
|
|
|
+ content: '';
|
|
|
+ border-top: 3px solid #3486da;
|
|
|
+ top: -2px;
|
|
|
+ }
|
|
|
+ .boxall:before,
|
|
|
+ .boxfoot:before {
|
|
|
+ border-left: 3px solid #3486da;
|
|
|
+ left: -2px;
|
|
|
+ }
|
|
|
+ .boxall:after,
|
|
|
+ .boxfoot:after {
|
|
|
+ border-right: 3px solid #3486da;
|
|
|
+ right: -2px;
|
|
|
+ }
|
|
|
+ .boxall_1 {
|
|
|
+ height: 28%;
|
|
|
+ }
|
|
|
+ .boxall_2 {
|
|
|
+ height: 28%;
|
|
|
+ }
|
|
|
+ .boxall_3 {
|
|
|
+ height: 28%;
|
|
|
+ }
|
|
|
+ .boxall_4 {
|
|
|
+ height: 30%;
|
|
|
+ }
|
|
|
+ .boxall_5 {
|
|
|
+ height: 35%;
|
|
|
+ }
|
|
|
+ .boxall_6 {
|
|
|
+ height: 45%;
|
|
|
+ }
|
|
|
+ .boxall_7 {
|
|
|
+ height: 45%;
|
|
|
+ }
|
|
|
+ .boxall_8 {
|
|
|
+ height: 23%;
|
|
|
+ padding: 0 2rem;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ h4 {
|
|
|
+ font-size: 2rem;
|
|
|
+ padding-left: 1rem;
|
|
|
+ color: #20dbfd;
|
|
|
+ text-shadow: 0 0 25px #00d8ff;
|
|
|
+ margin: 1rem 0;
|
|
|
+ }
|
|
|
+ .itemTilte {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ span {
|
|
|
+ margin: 0 0 0.1rem 0.5rem;
|
|
|
+ font-size: 1rem;
|
|
|
+ color: rgba(255, 255, 255, 0.6);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|