优化拉流代理

This commit is contained in:
panlinlin
2021-04-22 10:56:13 +08:00
parent 6289438e62
commit 118e42884e
8 changed files with 114 additions and 44 deletions

View File

@@ -19,13 +19,13 @@
<el-table-column label="流地址" width="400" align="center" show-overflow-tooltip >
<template slot-scope="scope">
<div slot="reference" class="name-wrapper">
<el-tag size="medium" v-if="scope.row.type == 'default'">
<i class="cpoy-btn el-icon-document-copy" title="点击拷贝" v-clipboard="scope.row.url" @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></i>
<i class="cpoy-btn el-icon-document-copy" title="点击拷贝" v-clipboard="scope.row.url" @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></i>
{{scope.row.url}}
</el-tag>
<el-tag size="medium" v-if="scope.row.type != 'default'">
<i class="cpoy-btn el-icon-document-copy" title="点击拷贝" v-clipboard="scope.row.src_url" @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></i>
<i class="cpoy-btn el-icon-document-copy" title="点击拷贝" v-clipboard="scope.row.src_url" @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></i>
{{scope.row.src_url}}
</el-tag>
</div>
@@ -97,7 +97,7 @@
},
data() {
return {
streamProxyList: [],
streamProxyList: [],
currentPusher: {}, //当前操作设备对象
updateLooper: 0, //数据刷新轮训标志
currentDeviceChannelsLenth:0,
@@ -177,22 +177,21 @@
console.log(error);
that.getListLoading = false;
});
},
deleteStreamProxy: function(row){
console.log(1111)
let that = this;
this.getListLoading = true;
that.$axios({
method:"delete",
url:"/api/proxy/del",
params:{
app: row.app,
stream: row.stream
}
app: row.app,
stream: row.stream
}
}).then((res)=>{
that.getListLoading = false;
that.initData()
that.initData()
}).catch(function (error) {
console.log(error);
that.getListLoading = false;
@@ -210,9 +209,18 @@
stream: row.stream
}
}).then(function (res) {
that.getListLoading = false;
that.startBtnLaoding = false;
that.initData()
that.getListLoading = false;
that.startBtnLaoding = false;
if (res.data == "success"){
that.initData()
}else {
that.$message({
showClose: true,
message: "保存失败,请检查地址是否可用!",
type: "error",
});
}
}).catch(function (error) {
console.log(error);
that.getListLoading = false;

View File

@@ -151,22 +151,20 @@ export default {
url:`/api/proxy/save`,
data: that.proxyParam
}).then(function (res) {
console.log(res);
console.log(res.data == "success");
if (res.data == "success") {
that.$message({
showClose: true,
message: "保存成功",
type: "success",
});
that.showDialog = false;
if (that.listChangeCallback != null) {
that.listChangeCallback();
}
if (typeof (res.data.code) != "undefined" && res.data.code === 0) {
that.$message({
showClose: true,
message: res.data.msg,
type: "success",
});
that.showDialog = false;
if (that.listChangeCallback != null) {
that.listChangeCallback();
}
}).catch(function (error) {
console.log(error);
});
}
}).catch(function (error) {
console.log(error);
});
},
close: function () {
console.log("关闭添加视频平台");