From 23b8667b7f6be60858f1149a3a5fdac9daee17c1 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期一, 15 五月 2023 16:08:31 +0800
Subject: [PATCH] 优化部分sql实现
---
web_src/src/components/dialog/MediaServerEdit.vue | 28 +++++-----------------------
1 files changed, 5 insertions(+), 23 deletions(-)
diff --git a/web_src/src/components/dialog/MediaServerEdit.vue b/web_src/src/components/dialog/MediaServerEdit.vue
index 24f8c85..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">
@@ -88,11 +88,6 @@
<el-input v-model="rtpPortRange1" placeholder="璧峰" @change="portRangeChange" clearable style="width: 100px" prop="rtpPortRange1" :disabled="mediaServerForm.defaultServer"></el-input>
-
<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-input v-model="sendRtpPortRange2" placeholder="缁堟" @change="portRangeChange" clearable style="width: 100px" prop="sendRtpPortRange2" :disabled="mediaServerForm.defaultServer"></el-input>
</el-form-item>
<el-form-item label="褰曞儚绠$悊鏈嶅姟绔彛" prop="recordAssistPort">
<el-input v-model.number="mediaServerForm.recordAssistPort" :disabled="mediaServerForm.defaultServer">
@@ -177,15 +172,12 @@
rtmpSSlPort: "",
rtpEnable: false,
rtpPortRange: "",
- sendRtpPortRange: "",
rtpProxyPort: "",
rtspPort: "",
rtspSSLPort: "",
},
rtpPortRange1:30000,
rtpPortRange2:30500,
- sendRtpPortRange1:30000,
- sendRtpPortRange2:30500,
rules: {
ip: [{ required: true, validator: isValidIp, message: '璇疯緭鍏ユ湁鏁堢殑IP鍦板潃', trigger: 'blur' }],
@@ -196,8 +188,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' }],
@@ -229,9 +219,6 @@
this.rtpPortRange2 = rtpPortRange[1]
}
}
- let sendRtpPortRange = this.mediaServerForm.sendRtpPortRange.split(",");
- this.sendRtpPortRange1 = sendRtpPortRange[0]
- this.sendRtpPortRange2 = sendRtpPortRange[1]
}
},
checkServer: function() {
@@ -251,8 +238,6 @@
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.serverCheck = 1;
@@ -336,13 +321,10 @@
rtmpSSlPort: "",
rtpEnable: false,
rtpPortRange: "",
- sendRtpPortRange: "",
rtpProxyPort: "",
rtspPort: "",
rtspSSLPort: "",
};
- this.sendRtpPortRange1 = 30000;
- this.sendRtpPortRange2 = 30500;
this.rtpPortRange1 = 30500;
this.rtpPortRange2 = 30500;
this.listChangeCallback = null
@@ -367,10 +349,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
+ console.log(this.mediaServerForm.rtpPortRange)
+ }
}
},
};
--
Gitblit v1.8.0