From 36fda97ebba23425e859ea87ada5beb8687349c1 Mon Sep 17 00:00:00 2001 From: panll <1018729+pan648540858@user.noreply.gitee.com> Date: 星期四, 13 一月 2022 16:45:45 +0800 Subject: [PATCH] !5 优化通道更新逻辑以及添加去重保证数据存入 Merge pull request !5 from panll/temp2 --- web_src/src/components/control.vue | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/web_src/src/components/control.vue b/web_src/src/components/control.vue index 6326712..b5990da 100644 --- a/web_src/src/components/control.vue +++ b/web_src/src/components/control.vue @@ -137,15 +137,13 @@ mounted() { this.initTable(); - this.updateData(); this.chartInterval = setInterval(this.updateData, 3000); - this.mediaServer.getMediaServerList((data)=>{ + this.mediaServer.getOnlineMediaServerList((data)=>{ this.mediaServerList = data.data; if (this.mediaServerList && this.mediaServerList.length > 0) { this.mediaServerChoose = this.mediaServerList[0].id this.loadCount = this.mediaServerList[0].count; - this.getThreadsLoad(); - this.getAllSession(); + this.updateData(); } }) }, @@ -369,7 +367,7 @@ let that = this; this.$axios({ method: 'get', - url: '/zlm/index/api/restartServer' + url: '/zlm/' + that.mediaServerChoose +'/index/api/restartServer' }).then(function (res) { that.getAllSession(); if (res.data.code == 0) { @@ -404,7 +402,7 @@ let that = this; this.$axios({ method: 'get', - url: '/zlm/index/api/kick_session&id=' + id + url: '/zlm/' + that.mediaServerChoose +'/index/api/kick_session&id=' + id }).then(function (res) { that.getAllSession(); that.$message({ -- Gitblit v1.8.0