From 118e42884e677a99dbdd20349eaad85c96bafeb4 Mon Sep 17 00:00:00 2001 From: panlinlin <648540858@qq.com> Date: 星期四, 22 四月 2021 10:56:13 +0800 Subject: [PATCH] 优化拉流代理 --- web_src/src/components/StreamProxyList.vue | 34 +++++++++++++++++++++------------- 1 files changed, 21 insertions(+), 13 deletions(-) diff --git a/web_src/src/components/StreamProxyList.vue b/web_src/src/components/StreamProxyList.vue index 6d4183e..ee3d43c 100644 --- a/web_src/src/components/StreamProxyList.vue +++ b/web_src/src/components/StreamProxyList.vue @@ -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; -- Gitblit v1.8.0