| | |
| | | <el-option label="FFmpeg" value="ffmpeg"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="应用名" prop="app"> |
| | | <el-form-item label="名称" prop="name"> |
| | | <el-input v-model="proxyParam.name" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="流应用名" prop="app"> |
| | | <el-input v-model="proxyParam.app" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="流ID" prop="stream"> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="FFmpeg命令模板" prop="ffmpeg_cmd_key" v-if="proxyParam.type=='ffmpeg'"> |
| | | <el-input v-model="proxyParam.ffmpeg_cmd_key" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="国标编码" prop="gbId"> |
| | | <el-input v-model="proxyParam.gbId" placeholder="设置国标编码可推送到国标" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="拉流方式" prop="rtp_type" v-if="proxyParam.type=='default'"> |
| | | <el-select |
| | |
| | | isLoging: false, |
| | | onSubmit_text: "立即创建", |
| | | proxyParam: { |
| | | name: null, |
| | | type: "default", |
| | | app: null, |
| | | stream: null, |
| | |
| | | src_url: null, |
| | | timeout_ms: null, |
| | | ffmpeg_cmd_key: null, |
| | | gbId: null, |
| | | rtp_type: null, |
| | | enable: true, |
| | | enable_hls: true, |
| | |
| | | }, |
| | | |
| | | rules: { |
| | | name: [{ required: true, message: "请输入名称", trigger: "blur" }], |
| | | app: [{ required: true, message: "请输入应用名", trigger: "blur" }], |
| | | stream: [{ required: true, message: "请输入流ID", trigger: "blur" }], |
| | | url: [{ required: true, message: "请输入要代理的流", trigger: "blur" }], |
| | |
| | | onSubmit: function () { |
| | | console.log("onSubmit"); |
| | | var that = this; |
| | | that.$axios |
| | | .post(`/api/proxy/save`, that.proxyParam) |
| | | .then(function (res) { |
| | | that.$axios({ |
| | | method: 'post', |
| | | url:`/api/proxy/save`, |
| | | data: that.proxyParam |
| | | }).then(function (res) { |
| | | console.log(res); |
| | | console.log(res.data == "success"); |
| | | if (res.data == "success") { |
| | |
| | | that.listChangeCallback(); |
| | | } |
| | | } |
| | | }) |
| | | .catch(function (error) { |
| | | }).catch(function (error) { |
| | | console.log(error); |
| | | }); |
| | | }, |
| | |
| | | deviceGBIdExit: async function (deviceGbId) { |
| | | var result = false; |
| | | var that = this; |
| | | await that.$axios |
| | | .post(`/api/platforms/exit/${deviceGbId}`) |
| | | .then(function (res) { |
| | | result = res.data; |
| | | }) |
| | | .catch(function (error) { |
| | | console.log(error); |
| | | }); |
| | | await that.$axios({ |
| | | method: 'post', |
| | | url:`/api/platform/exit/${deviceGbId}` |
| | | }).then(function (res) { |
| | | result = res.data; |
| | | }).catch(function (error) { |
| | | console.log(error); |
| | | }); |
| | | return result; |
| | | }, |
| | | checkExpires: function() { |