From ac3da3ef0031c60f9828c6ee81fa8d46acd32d06 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 10 Jul 2020 10:00:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E5=91=98=E7=AE=A1=E7=90=86=E6=80=BB?= =?UTF-8?q?=E6=95=B0=E5=9C=A8=E7=BA=BF=E4=BA=BA=E6=95=B0=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../memberManage/e-members.vue | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/views/newMap/jointTrainingNew/memberManage/e-members.vue b/src/views/newMap/jointTrainingNew/memberManage/e-members.vue index cd338fe4b..79e8822f1 100644 --- a/src/views/newMap/jointTrainingNew/memberManage/e-members.vue +++ b/src/views/newMap/jointTrainingNew/memberManage/e-members.vue @@ -2,7 +2,7 @@
ๆˆๅ‘˜ๅˆ—่กจ
-
{{ members.length }}/{{ room.totalNum }}
+
{{ onlineNum }}/{{ members.length }}
@@ -58,7 +58,8 @@ export default { return { filterText: '', clickUserId: '', - menuDisabled: false + menuDisabled: false, + onlineNum: 1 }; }, computed: { @@ -75,6 +76,23 @@ export default { return this.$store.state.user ? this.$store.state.user.id : ''; } }, + watch: { + members: { + handler(n, o) { + let num = 0; + if (n && n.length) { + n.forEach(item => { + if (item.online) { + num++; + } + }); + } + this.onlineNum = num; + }, + immediate: true, + deep: true + } + }, methods: { handleFilterNode(value, data) { if (!value) return true;