From 8bb85606a294d2c6d2d4840d42a62744d7ef909b Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期五, 27 九月 2024 09:51:54 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue | 48 +++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 45 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..9fb216f 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,55 @@ <template> - + <basic-container> + <div class="container"> + <el-form ref="form" :model="form" label-width="150px"> + <el-form-item label="褰撳墠鍦ㄧ嚎鐢ㄦ埛浜烘暟"> + <div style="display: flex;"> + <el-input v-model="form.currentOnlineUser" :readOnly="true"></el-input> + <el-button plain type="primary" style="margin-left: 10px" @click="getOnlineUsersNum"> 鍒锋柊</el-button> + </div> + </el-form-item> + </el-form> + </div> + </basic-container> </template> <script> +import { + getOnlineUsersNum +} from "@/api/systemModel/systemConfig/api" export default { - name: "index" + name: "index", + data() { + return { + form: { + currentOnlineUser: '0' + } + } + }, + created() { + this.getOnlineUsersNum(); + }, + methods: { + // 宸︿晶鏍戞煡璇� + getOnlineUsersNum() { + getOnlineUsersNum().then(res => { + if (res.data.code === 200) { + const data = res.data.obj; + this.form.currentOnlineUser = data; + } + }) + } + } } </script> <style scoped> - +.container { + display: flex; + justify-content: center; + align-items: center; + width: 500px; + height: 500px; + margin: auto; +} </style> -- Gitblit v1.9.3