From 960bdbc77b153b97d8e49c8eaf88497353204307 Mon Sep 17 00:00:00 2001 From: 田源 <tianyuan@vci-tech.com> Date: 星期五, 27 十二月 2024 17:57:03 +0800 Subject: [PATCH] 系统运行监控调试接口以页面处理 --- Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue | 85 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 82 insertions(+), 3 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue index 54b19c1..df30d90 100644 --- a/Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue @@ -1,13 +1,92 @@ <template> - + <basic-container> + <div style="display: flex;justify-content: space-between;align-items: center"> + <h3>褰撳墠鍦ㄧ嚎浜哄憳淇℃伅</h3> + <el-button type="primary" size="small" plain style="margin-right: 10px" @click="getOnlinUsersHandler">鍒锋柊</el-button> + </div> + <avue-crud :data="data" :option="option" :table-loading="loading" ></avue-crud> + </basic-container> </template> <script> +import { + getOnlinUsers +} from "@/api/systemModel/systemConfig/api" +import basicOption from '@/util/basic-option'; +import func from "@/util/func"; export default { - name: "index" + name: "index", + data() { + return { + loading:false, + data:[], + option:{ + ...basicOption, + refreshBtn:false, + addBtn:false, + menu:false, + column:[ + { + label:'鐢ㄦ埛OID', + prop:'oid', + overHidden:true, + }, + { + label:'鐢ㄦ埛璐﹀彿', + prop:'userId' + }, + { + label:'鐢ㄦ埛濮撳悕', + prop:'userName' + }, + { + label:'鏈哄櫒ip', + prop:'ip' + }, + { + label:'鐧诲綍鏃堕棿', + prop:'loginTime' + }, + { + label:'鏈�鍚庢搷浣滄椂闂�', + prop:'lastRequestTs' + } + ] + } + } + }, + created() { + this.getOnlinUsersHandler(); + }, + methods: { + // 宸︿晶鏍戞煡璇� + getOnlinUsersHandler() { + this.loading = true; + getOnlinUsers().then(res => { + if (res.data.code === 200) { + const data = res.data.data; + this.data = data.map(item => { + return{ + ...item, + loginTime:func.formattedDate(item.loginTime), + lastRequestTs:func.formattedDate(item.lastRequestTs), + } + }) + this.loading = false; + } + }) + } + } } </script> <style scoped> - +.container { + display: flex; + justify-content: center; + align-items: center; + width: 500px; + height: 500px; + margin: auto; +} </style> -- Gitblit v1.9.3