mirror of
				https://github.com/pure-admin/pure-admin-thin.git
				synced 2025-10-31 23:54:47 +08:00 
			
		
		
		
	fix: 优化缓存监控页面的编写
This commit is contained in:
		
							parent
							
								
									aa37f8c7af
								
							
						
					
					
						commit
						5aa607744b
					
				
							
								
								
									
										16
									
								
								src/views/monitor/cache/index.vue
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								src/views/monitor/cache/index.vue
									
									
									
									
										vendored
									
									
								
							| @ -21,13 +21,13 @@ | ||||
|       <el-col :span="12" class="card-box"> | ||||
|         <el-card> | ||||
|           <template #header><span>命令统计</span></template> | ||||
|           <div ref="commandstats" style="height: 420px" /> | ||||
|           <div ref="commandChartRef" style="height: 420px" /> | ||||
|         </el-card> | ||||
|       </el-col> | ||||
|       <el-col :span="12" class="card-box"> | ||||
|         <el-card> | ||||
|           <template #header><span>内存信息</span></template> | ||||
|           <div ref="usedmemory" style="height: 420px" /> | ||||
|           <div ref="memoryChartRef" style="height: 420px" /> | ||||
|         </el-card> | ||||
|       </el-col> | ||||
|     </el-row> | ||||
| @ -48,8 +48,8 @@ defineOptions({ | ||||
| const loading = ref(true); | ||||
| 
 | ||||
| const cacheInfoTable = ref([]); | ||||
| const commandstats = ref(null); | ||||
| const usedmemory = ref(null); | ||||
| const commandChartRef = ref(null); | ||||
| const memoryChartRef = ref(null); | ||||
| 
 | ||||
| async function getList() { | ||||
|   loading.value = true; | ||||
| @ -110,8 +110,8 @@ async function getList() { | ||||
|     } | ||||
|   ]; | ||||
| 
 | ||||
|   const commandstatsIntance = echarts.init(commandstats.value, "macarons"); | ||||
|   commandstatsIntance.setOption({ | ||||
|   const commandChartInstance = echarts.init(commandChartRef.value, "macarons"); | ||||
|   commandChartInstance.setOption({ | ||||
|     tooltip: { | ||||
|       trigger: "item", | ||||
|       formatter: "{a} <br/>{b} : {c} ({d}%)" | ||||
| @ -129,8 +129,8 @@ async function getList() { | ||||
|       } | ||||
|     ] | ||||
|   }); | ||||
|   const usedmemoryInstance = echarts.init(usedmemory.value, "macarons"); | ||||
|   usedmemoryInstance.setOption({ | ||||
|   const memoryChartInstance = echarts.init(memoryChartRef.value, "macarons"); | ||||
|   memoryChartInstance.setOption({ | ||||
|     tooltip: { | ||||
|       formatter: `{b} <br/>{a} : ${cacheInfo.info.used_memory_human}` | ||||
|     }, | ||||
|  | ||||
| @ -10,7 +10,7 @@ import Refresh from "@iconify-icons/ep/refresh"; | ||||
| 
 | ||||
| /** 组件name最好和菜单表中的router_name一致 */ | ||||
| defineOptions({ | ||||
|   name: "SystemOperationLog" | ||||
|   name: "OnlineUser" | ||||
| }); | ||||
| 
 | ||||
| const tableRef = ref(); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user