099ff37e45457e6f9834ac069c7bc98e44c5a5a4.svn-base 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <a-card title="磁盘监控">
  3. <a-row>
  4. <template v-if="diskInfo && diskInfo.length>0">
  5. <a-col :span="8" v-for="(item,index) in diskInfo" :key=" 'diskInfo'+index ">
  6. <dash-chart-demo :title="item.name" :datasource="item.restPPT"></dash-chart-demo>
  7. </a-col>
  8. </template>
  9. </a-row>
  10. </a-card>
  11. </template>
  12. <script>
  13. import { getAction } from '@/api/manage'
  14. import DashChartDemo from '@/components/chart/DashChartDemo'
  15. import ARow from 'ant-design-vue/es/grid/Row'
  16. export default {
  17. name: 'DiskMonitoring',
  18. components:{
  19. ARow,
  20. DashChartDemo,
  21. },
  22. data() {
  23. return {
  24. description: '磁盘监控',
  25. //数据集
  26. diskInfo:[],
  27. url:{
  28. queryDiskInfo:'sys/actuator/redis/queryDiskInfo',
  29. }
  30. }
  31. },
  32. created() {
  33. getAction(this.url.queryDiskInfo).then((res)=>{
  34. if(res.success){
  35. for(var i=0;i<res.result.length;i++){
  36. res.result[i].restPPT = res.result[i].restPPT/10;
  37. }
  38. this.diskInfo = res.result;
  39. }
  40. })
  41. }
  42. }
  43. </script>
  44. <style scoped>
  45. </style>