RuoYi
2023-11-29 cb80de3742d66cfee20bc3136c735e5ca5a7d45c
src/views/monitor/cache/index.vue
@@ -3,7 +3,7 @@
    <el-row>
      <el-col :span="24" class="card-box">
        <el-card>
          <template #header><span>基本信息</span></template>
          <template #header><Monitor style="width: 1em; height: 1em; vertical-align: middle;" /> <span style="vertical-align: middle;">基本信息</span></template>
          <div class="el-table el-table--enable-row-hover el-table--medium">
            <table cellspacing="0" style="width: 100%">
              <tbody>
@@ -45,7 +45,7 @@
      <el-col :span="12" class="card-box">
        <el-card>
          <template #header><span>命令统计</span></template>
          <template #header><PieChart style="width: 1em; height: 1em; vertical-align: middle;" /> <span style="vertical-align: middle;">命令统计</span></template>
          <div class="el-table el-table--enable-row-hover el-table--medium">
            <div ref="commandstats" style="height: 420px" />
          </div>
@@ -54,9 +54,7 @@
      <el-col :span="12" class="card-box">
        <el-card>
          <template #header>
            <span>内存信息</span>
          </template>
          <template #header><Odometer style="width: 1em; height: 1em; vertical-align: middle;" /> <span style="vertical-align: middle;">内存信息</span></template>
          <div class="el-table el-table--enable-row-hover el-table--medium">
            <div ref="usedmemory" style="height: 420px" />
          </div>
@@ -66,7 +64,7 @@
  </div>
</template>
<script setup>
<script setup name="Cache">
import { getCache } from '@/api/monitor/cache';
import * as echarts from 'echarts';
@@ -98,9 +96,8 @@
          animationEasing: "cubicInOut",
          animationDuration: 1000
        }
      ],
      ]
    });
    const usedmemoryInstance = echarts.init(usedmemory.value, "macarons");
    usedmemoryInstance.setOption({
      tooltip: {
@@ -122,8 +119,12 @@
            }
          ]
        }
      ],
      ]
    })
    window.addEventListener("resize", () => {
      commandstatsIntance.resize();
      usedmemoryInstance.resize();
    });
  })
}