From cb897aaeed0f3a24f91dc4265b8ff0d2b31284c6 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期日, 23 四月 2023 17:35:00 +0800
Subject: [PATCH] Merge pull request #829 from kairlec/wvp-28181-2.0

---
 web_src/src/components/dialog/MediaServerEdit.vue |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/web_src/src/components/dialog/MediaServerEdit.vue b/web_src/src/components/dialog/MediaServerEdit.vue
index edb4ff6..15923c1 100644
--- a/web_src/src/components/dialog/MediaServerEdit.vue
+++ b/web_src/src/components/dialog/MediaServerEdit.vue
@@ -78,7 +78,7 @@
                 <el-switch v-model="mediaServerForm.autoConfig" :disabled="mediaServerForm.defaultServer"></el-switch>
               </el-form-item>
               <el-form-item label="鏀舵祦绔彛妯″紡" >
-                <el-switch  active-text="澶氱鍙�" inactive-text="鍗曠鍙�" v-model="mediaServerForm.rtpEnable" :disabled="mediaServerForm.defaultServer"></el-switch>
+                <el-switch  active-text="澶氱鍙�" inactive-text="鍗曠鍙�" @change="portRangeChange" v-model="mediaServerForm.rtpEnable" :disabled="mediaServerForm.defaultServer"></el-switch>
               </el-form-item>
 
               <el-form-item v-if="!mediaServerForm.rtpEnable" label="鏀舵祦绔彛" prop="rtpProxyPort">
@@ -335,7 +335,7 @@
       var that = this;
       await that.$axios({
         method: 'get',
-        url:`./api/platform/exit/${deviceGbId}`
+        url:`/api/platform/exit/${deviceGbId}`
       }).then(function (res) {
         result = res.data;
       }).catch(function (error) {
@@ -349,8 +349,10 @@
       }
     },
     portRangeChange: function() {
-      this.mediaServerForm.rtpPortRange = this.rtpPortRange1 + "," + this.rtpPortRange2
-      console.log(this.mediaServerForm.rtpPortRange)
+      if (this.mediaServerForm.rtpEnable) {
+        this.mediaServerForm.rtpPortRange = this.rtpPortRange1 + "," + this.rtpPortRange2
+        console.log(this.mediaServerForm.rtpPortRange)
+      }
     }
   },
 };

--
Gitblit v1.8.0