From 04e7f48fde1b1a653d413eb41186ec7354f5ae31 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期一, 10 七月 2023 14:30:59 +0800
Subject: [PATCH] 合并主线的发流端口管理逻辑

---
 web_src/src/components/dialog/MediaServerEdit.vue |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/web_src/src/components/dialog/MediaServerEdit.vue b/web_src/src/components/dialog/MediaServerEdit.vue
index 15923c1..bb55048 100644
--- a/web_src/src/components/dialog/MediaServerEdit.vue
+++ b/web_src/src/components/dialog/MediaServerEdit.vue
@@ -89,6 +89,11 @@
                 -
                 <el-input v-model="rtpPortRange2" placeholder="缁堟" @change="portRangeChange" clearable style="width: 100px" prop="rtpPortRange2" :disabled="mediaServerForm.defaultServer"></el-input>
               </el-form-item>
+              <el-form-item v-if="mediaServerForm.sendRtpEnable" label="鍙戞祦绔彛" >
+                <el-input v-model="sendRtpPortRange1" placeholder="璧峰" @change="portRangeChange" clearable style="width: 100px" prop="rtpPortRange1" :disabled="mediaServerForm.defaultServer"></el-input>
+                -
+                <el-input v-model="sendRtpPortRange2" placeholder="缁堟" @change="portRangeChange" clearable style="width: 100px" prop="rtpPortRange2" :disabled="mediaServerForm.defaultServer"></el-input>
+              </el-form-item>
               <el-form-item label="褰曞儚绠$悊鏈嶅姟绔彛" prop="recordAssistPort">
                 <el-input v-model.number="mediaServerForm.recordAssistPort" :disabled="mediaServerForm.defaultServer">
 <!--                  <el-button v-if="mediaServerForm.recordAssistPort > 0" slot="append" type="primary" @click="checkRecordServer">娴嬭瘯</el-button>-->
@@ -172,12 +177,16 @@
         rtmpSSlPort: "",
         rtpEnable: false,
         rtpPortRange: "",
+        sendRtpPortRange: "",
         rtpProxyPort: "",
         rtspPort: "",
         rtspSSLPort: "",
       },
       rtpPortRange1:30000,
       rtpPortRange2:30500,
+
+      sendRtpPortRange1:50000,
+      sendRtpPortRange2:60000,
 
       rules: {
         ip:  [{ required: true, validator: isValidIp, message: '璇疯緭鍏ユ湁鏁堢殑IP鍦板潃', trigger: 'blur' }],
@@ -214,9 +223,14 @@
         this.currentStep = 3;
         if (param.rtpPortRange) {
           let rtpPortRange = this.mediaServerForm.rtpPortRange.split(",");
+          let sendRtpPortRange = this.mediaServerForm.sendRtpPortRange.split(",");
           if (rtpPortRange.length > 0) {
             this.rtpPortRange1 =  rtpPortRange[0]
             this.rtpPortRange2 =  rtpPortRange[1]
+          }
+          if (sendRtpPortRange.length > 0) {
+            this.sendRtpPortRange1 =  sendRtpPortRange[0]
+            this.sendRtpPortRange2 =  sendRtpPortRange[1]
           }
         }
       }
@@ -240,6 +254,8 @@
           that.mediaServerForm.autoConfig = true;
           that.rtpPortRange1 = 30000
           that.rtpPortRange2 = 30500
+          that.sendRtpPortRange1 = 50000
+          that.sendRtpPortRange2 = 60000
           that.serverCheck = 1;
         }else {
           that.serverCheck = -1;
@@ -321,12 +337,15 @@
         rtmpSSlPort: "",
         rtpEnable: false,
         rtpPortRange: "",
+        sendRtpPortRange: "",
         rtpProxyPort: "",
         rtspPort: "",
         rtspSSLPort: "",
       };
       this.rtpPortRange1 = 30500;
       this.rtpPortRange2 = 30500;
+      this.sendRtpPortRange1 = 50000;
+      this.sendRtpPortRange2 = 60000;
       this.listChangeCallback = null
       this.currentStep = 1;
     },
@@ -351,7 +370,7 @@
     portRangeChange: function() {
       if (this.mediaServerForm.rtpEnable) {
         this.mediaServerForm.rtpPortRange = this.rtpPortRange1 + "," + this.rtpPortRange2
-        console.log(this.mediaServerForm.rtpPortRange)
+        this.mediaServerForm.sendRtpPortRange = this.sendRtpPortRange1 + "," + this.sendRtpPortRange2
       }
     }
   },

--
Gitblit v1.8.0