From 9f16b5c553b479ea12fe368a7ecc748872ea8b98 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期四, 12 六月 2025 11:11:27 +0800
Subject: [PATCH] 修改配置文件

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

diff --git a/web_src/src/components/dialog/MediaServerEdit.vue b/web_src/src/components/dialog/MediaServerEdit.vue
old mode 100644
new mode 100755
index 24f8c85..9d8491e
--- a/web_src/src/components/dialog/MediaServerEdit.vue
+++ b/web_src/src/components/dialog/MediaServerEdit.vue
@@ -20,6 +20,12 @@
           <el-form-item label="SECRET" prop="secret">
             <el-input v-model="mediaServerForm.secret" placeholder="濯掍綋鏈嶅姟SECRET"  clearable :disabled="mediaServerForm.defaultServer"></el-input>
           </el-form-item>
+          <el-form-item label="绫诲瀷" prop="type">
+            <el-select v-model="mediaServerForm.type" style="float: left; width: 100%" >
+              <el-option key="zlm" label="ZLMediaKit" value="zlm"></el-option>
+              <el-option key="abl" label="ABLMediaServer" value="abl"></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item>
             <div style="float: right;">
               <el-button type="primary" v-if="currentStep === 1 && serverCheck === 1" @click="next" >涓嬩竴姝�</el-button>
@@ -78,8 +84,9 @@
                 <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">
                 <el-input v-model.number="mediaServerForm.rtpProxyPort" clearable :disabled="mediaServerForm.defaultServer"></el-input>
@@ -89,10 +96,10 @@
                 -
                 <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 label="鎺ㄦ祦绔彛" prop="sendRtpPortRange1">
-                <el-input v-model="sendRtpPortRange1" placeholder="璧峰" @change="portRangeChange" clearable style="width: 100px" prop="sendRtpPortRange1" :disabled="mediaServerForm.defaultServer"></el-input>
+              <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="sendRtpPortRange2" :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">
@@ -169,7 +176,7 @@
         hookIp: "",
         sdpIp: "",
         streamIp: "",
-        secret: "035c73f7-bb6b-4889-a715-d9eb2d1925cc",
+        secret: "",
         httpPort: "",
         httpSSlPort: "",
         recordAssistPort: "",
@@ -181,11 +188,13 @@
         rtpProxyPort: "",
         rtspPort: "",
         rtspSSLPort: "",
+        type: "zlm",
       },
       rtpPortRange1:30000,
       rtpPortRange2:30500,
-      sendRtpPortRange1:30000,
-      sendRtpPortRange2:30500,
+
+      sendRtpPortRange1:50000,
+      sendRtpPortRange2:60000,
 
       rules: {
         ip:  [{ required: true, validator: isValidIp, message: '璇疯緭鍏ユ湁鏁堢殑IP鍦板潃', trigger: 'blur' }],
@@ -196,8 +205,6 @@
         rtmpSSlPort:  [{ required: true, validator: isValidPort, message: '璇疯緭鍏ユ湁鏁堢殑绔彛鍙�', trigger: 'blur' }],
         rtpPortRange1:  [{ required: true, validator: isValidPort, message: '璇疯緭鍏ユ湁鏁堢殑绔彛鍙�', trigger: 'blur' }],
         rtpPortRange2:  [{ required: true, validator: isValidPort, message: '璇疯緭鍏ユ湁鏁堢殑绔彛鍙�', trigger: 'blur' }],
-        sendRtpPortRange1:  [{ required: true, validator: isValidPort, message: '璇疯緭鍏ユ湁鏁堢殑绔彛鍙�', trigger: 'blur' }],
-        sendRtpPortRange2:  [{ required: true, validator: isValidPort, message: '璇疯緭鍏ユ湁鏁堢殑绔彛鍙�', trigger: 'blur' }],
         rtpProxyPort:  [{ required: true, validator: isValidPort, message: '璇疯緭鍏ユ湁鏁堢殑绔彛鍙�', trigger: 'blur' }],
         rtspPort:  [{ required: true, validator: isValidPort, message: '璇疯緭鍏ユ湁鏁堢殑绔彛鍙�', trigger: 'blur' }],
         rtspSSLPort:  [{ required: true, validator: isValidPort, message: '璇疯緭鍏ユ湁鏁堢殑绔彛鍙�', trigger: 'blur' }],
@@ -224,14 +231,16 @@
         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]
+          }
         }
-        let sendRtpPortRange = this.mediaServerForm.sendRtpPortRange.split(",");
-        this.sendRtpPortRange1 = sendRtpPortRange[0]
-        this.sendRtpPortRange2 = sendRtpPortRange[1]
       }
     },
     checkServer: function() {
@@ -251,10 +260,10 @@
           that.mediaServerForm = data.data;
           that.mediaServerForm.httpPort = httpPort;
           that.mediaServerForm.autoConfig = true;
-          that.sendRtpPortRange1 = 30000
-          that.sendRtpPortRange2 = 30500
           that.rtpPortRange1 = 30000
           that.rtpPortRange2 = 30500
+          that.sendRtpPortRange1 = 50000
+          that.sendRtpPortRange2 = 60000
           that.serverCheck = 1;
         }else {
           that.serverCheck = -1;
@@ -328,7 +337,7 @@
         hookIp: "",
         sdpIp: "",
         streamIp: "",
-        secret: "035c73f7-bb6b-4889-a715-d9eb2d1925cc",
+        secret: "",
         httpPort: "",
         httpSSlPort: "",
         recordAssistPort: "",
@@ -341,10 +350,10 @@
         rtspPort: "",
         rtspSSLPort: "",
       };
-      this.sendRtpPortRange1 = 30000;
-      this.sendRtpPortRange2 = 30500;
       this.rtpPortRange1 = 30500;
       this.rtpPortRange2 = 30500;
+      this.sendRtpPortRange1 = 50000;
+      this.sendRtpPortRange2 = 60000;
       this.listChangeCallback = null
       this.currentStep = 1;
     },
@@ -367,10 +376,10 @@
       }
     },
     portRangeChange: function() {
-      this.mediaServerForm.sendRtpPortRange = this.sendRtpPortRange1 + "," + this.sendRtpPortRange2
-      this.mediaServerForm.rtpPortRange = this.rtpPortRange1 + "," + this.rtpPortRange2
-      console.log(this.mediaServerForm.sendRtpPortRange)
-      console.log(this.mediaServerForm.rtpPortRange)
+      if (this.mediaServerForm.rtpEnable) {
+        this.mediaServerForm.rtpPortRange = this.rtpPortRange1 + "," + this.rtpPortRange2
+        this.mediaServerForm.sendRtpPortRange = this.sendRtpPortRange1 + "," + this.sendRtpPortRange2
+      }
     }
   },
 };

--
Gitblit v1.8.0