inleft
2022-03-02 34223b096cf6ad9d92c3702bb9529e764f523b11
commit | author | age
9bcb19 1 <template>
I 2   <div v-if="hasPerm('sysMachine:query')">
3     <!-- 系统信息  Java信息-->
4     <a-row :gutter="24">
5       <a-col :md="12" :sm="24">
6         <a-card :loading="loading" title="系统信息" style="margin-bottom: 20px" :bordered="false">
7           <table class="sysInfo_table" >
8             <tr >
9               <td class="sysInfo_td">系统名称:</td>
10               <td class="sysInfo_td">{{ this.sysOsInfo.osName }}</td>
11             </tr>
12             <tr >
13               <td class="sysInfo_td">系统架构:</td>
14               <td class="sysInfo_td">{{ this.sysOsInfo.osArch }}</td>
15             </tr>
16             <tr >
17               <td class="sysInfo_td">系统版本:</td>
18               <td class="sysInfo_td">{{ this.sysOsInfo.osVersion }}</td>
19             </tr>
20             <tr >
21               <td class="sysInfo_td">主机名称:</td>
22               <td class="sysInfo_td">{{ this.sysOsInfo.osHostName }}</td>
23             </tr>
24             <tr >
25               <td >主机IP地址:</td>
26               <td >{{ this.sysOsInfo.osHostAddress }}</td>
27             </tr>
28           </table>
29         </a-card>
30       </a-col>
31       <a-col :md="12" :sm="24">
32         <a-card :loading="loading" title="Java信息" style="margin-bottom: 20px">
33           <table class="sysInfo_table" >
34             <tr >
35               <td class="sysInfo_td">虚拟机名称:</td>
36               <td class="sysInfo_td">{{ this.sysJavaInfo.jvmName }}</td>
37             </tr>
38             <tr >
39               <td class="sysInfo_td">虚拟机版本:</td>
40               <td class="sysInfo_td">{{ this.sysJavaInfo.jvmVersion }}</td>
41             </tr>
42             <tr >
43               <td class="sysInfo_td">虚拟机供应商:</td>
44               <td class="sysInfo_td">{{ this.sysJavaInfo.jvmVendor }}</td>
45             </tr>
46             <tr >
47               <td class="sysInfo_td">java名称:</td>
48               <td class="sysInfo_td">{{ this.sysJavaInfo.javaName }}</td>
49             </tr>
50             <tr >
51               <td >java版本:</td>
52               <td >{{ this.sysJavaInfo.javaVersion }}</td>
53             </tr>
54           </table>
55         </a-card>
56       </a-col>
57     </a-row>
58     <a-card :loading="loading" title="JVM内存信息" >
59       <table class="sysInfo_table" >
60         <tr >
61           <td class="sysInfo_td">最大内存:</td>
62           <td class="sysInfo_td">{{ this.sysJvmMemInfo.jvmMaxMemory }}</td>
63           <td class="sysInfo_td">可用内存:</td>
64           <td class="sysInfo_td">{{ this.sysJvmMemInfo.jvmUsableMemory }}</td>
65         </tr>
66         <tr >
67           <td class="sysInfo_td">总内存:</td>
68           <td class="sysInfo_td">{{ this.sysJvmMemInfo.jvmTotalMemory }}</td>
69           <td class="sysInfo_td">已使用内存:</td>
70           <td class="sysInfo_td">{{ this.sysJvmMemInfo.jvmUsedMemory }}</td>
71         </tr>
72         <tr class="sysInfo_tr">
73           <td >空余内存:</td>
74           <td >{{ this.sysJvmMemInfo.jvmFreeMemory }}</td>
75           <td >使用率:</td>
76           <td >{{ this.sysJvmMemInfo.jvmMemoryUsedRate }}</td>
77         </tr>
78       </table>
79     </a-card>
80   </div>
81 </template>
82 <script>
83   import { sysMachineQuery } from '@/api/modular/system/machineManage'
84   export default {
85     data () {
86       return {
87         loading: true,
88         sysOsInfo: [],
89         sysJavaInfo: [],
90         sysJvmMemInfo: []
91       }
92     },
93     // 进页面加载
94     created () {
95       this.loadDataList()
96     },
97     methods: {
98       // 加载数据方法
99       loadDataList () {
100         sysMachineQuery().then((res) => {
101           this.loading = false
102           this.sysOsInfo = res.data.sysOsInfo
103           this.sysJavaInfo = res.data.sysJavaInfo
104           this.sysJvmMemInfo = res.data.sysJvmMemInfo
105         })
106       }
107     }
108
109   }
110 </script>
111 <style lang="less">
112   .sysInfo_table{
113     width: 100%; min-height: 45px; line-height: 45px; text-align: center;
114   }
115   .sysInfo_td {
116   border-bottom:1px solid #e8e8e8;
117   }
118 </style>