From 7f48246165b3c815e928cee04f8d4e2cf689b6aa Mon Sep 17 00:00:00 2001 From: panlinlin <648540858@qq.com> Date: 星期四, 22 四月 2021 18:09:46 +0800 Subject: [PATCH] 增加对设备录像播放的兼容性 --- web_src/src/components/dialog/StreamProxyEdit.vue | 37 ++++++++++++++++++++----------------- 1 files changed, 20 insertions(+), 17 deletions(-) diff --git a/web_src/src/components/dialog/StreamProxyEdit.vue b/web_src/src/components/dialog/StreamProxyEdit.vue index d849ec6..696379e 100644 --- a/web_src/src/components/dialog/StreamProxyEdit.vue +++ b/web_src/src/components/dialog/StreamProxyEdit.vue @@ -10,7 +10,7 @@ @close="close()" > <div id="shared" style="margin-top: 1rem;margin-right: 100px;"> - <el-form ref="streamProxy" :rules="rules" :model="proxyParam" label-width="140px"> + <el-form ref="streamProxy" :rules="rules" :model="proxyParam" label-width="140px" > <el-form-item label="绫诲瀷" prop="type"> <el-select v-model="proxyParam.type" @@ -66,7 +66,7 @@ </el-form-item> <el-form-item> <div style="float: right;"> - <el-button type="primary" @click="onSubmit">{{onSubmit_text}}</el-button> + <el-button type="primary" @click="onSubmit" :loading="dialogLoading" >{{onSubmit_text}}</el-button> <el-button @click="close">鍙栨秷</el-button> </div> @@ -104,6 +104,7 @@ listChangeCallback: null, showDialog: false, isLoging: false, + dialogLoading: false, onSubmit_text: "绔嬪嵆鍒涘缓", proxyParam: { name: null, @@ -145,32 +146,34 @@ }, onSubmit: function () { console.log("onSubmit"); + this.dialogLoading = true; var that = this; 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.$message({ - showClose: true, - message: "淇濆瓨鎴愬姛", - type: "success", - }); - that.showDialog = false; - if (that.listChangeCallback != null) { - that.listChangeCallback(); - } + that.dialogLoading = false; + 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); + this.dialogLoading = false; + }); }, close: function () { console.log("鍏抽棴娣诲姞瑙嗛骞冲彴"); this.showDialog = false; + this.dialogLoading = false; this.$refs.streamProxy.resetFields(); }, deviceGBIdExit: async function (deviceGbId) { -- Gitblit v1.8.0