From 80f67c751abc89c53367d3080b263e3d98e80b8b Mon Sep 17 00:00:00 2001 From: jijunyun <515906788@qq.com> Date: Fri, 1 Mar 2024 09:47:10 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E5=91=8A=E8=AD=A6=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=202.=E4=B8=8A=E4=BC=A0=E5=A4=B1=E8=B4=A5=E6=88=96?= =?UTF-8?q?=E8=80=85=E5=BC=82=E5=B8=B8=E6=97=B6=EF=BC=8C=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E5=91=8A=E8=AD=A6=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 7 +++---- src/main.js | 5 +++-- src/views/Settings.vue | 27 +++++++++++++++++++-------- 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/src/App.vue b/src/App.vue index d5c8370..0996c66 100644 --- a/src/App.vue +++ b/src/App.vue @@ -37,7 +37,7 @@ mounted() { let _this = this; //此处为定时获取报警信息,决定智能监控子系统是否展示(后续考虑Http长链接和webSocket连接) - + } }; @@ -62,7 +62,7 @@ // position: relative; color: rgba(0, 0, 0, 0.85); } - + .webContent { //margin-top: 7.5vh; //position: absolute; @@ -72,5 +72,4 @@ width: 100vw; overflow: hidden; } - - + \ No newline at end of file diff --git a/src/main.js b/src/main.js index 840c782..54bde58 100644 --- a/src/main.js +++ b/src/main.js @@ -21,7 +21,8 @@ import { TabPane, Upload, Loading, - Message + Message, + Alert } from 'element-ui'; Vue.use(Input); @@ -40,7 +41,7 @@ Vue.use(DatePicker); Vue.use(Tabs); Vue.use(TabPane); Vue.use(Upload); - +Vue.use(Alert); Vue.use(Loading.directive); Vue.prototype.$loading = Loading.service; diff --git a/src/views/Settings.vue b/src/views/Settings.vue index b23bc8d..acfb881 100644 --- a/src/views/Settings.vue +++ b/src/views/Settings.vue @@ -367,7 +367,7 @@
- @@ -376,7 +376,10 @@
- +
+ + +
@@ -686,7 +689,10 @@ }, //默认选中的菜单 - selectMenuName: '系统设置' + selectMenuName: '系统设置', + + //上传文件提示框 + uploadAlertShow: false } }, @@ -703,7 +709,8 @@ index: 0 }, null); } else if (name == '固件升级') { - this.querySysFrom(); + this.$refs['upload'].clearFiles(); + this.uploadAlertShow = false; } }, @@ -918,7 +925,7 @@ } const loading = this.$loading({ lock: true, - text: '查询中...', + text: '保存中...', spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.7)' }); @@ -1066,10 +1073,7 @@ * 登出 */ loginOut: function() { - - this.logoutSys(); - this.$router.push({ name: 'home' }); @@ -1088,6 +1092,8 @@ */ beginUpload: function() { this.uploadLoading = true; + //开始上传时,关闭提示框 + _this.uploadAlertShow = false; }, /** @@ -1101,20 +1107,25 @@ //成功 if (response.result == 'success') { _this.$message.success('上传成功,稍后重启。'); + _this.uploadAlertShow = false; } else { _this.$message.error(response.message); + _this.$refs['upload'].clearFiles(); + _this.uploadAlertShow = true; } // setTimeout(function() { // _this.uploadLoading = false; // }, 5000); }, + /** * 上传失败处 */ uploadErrorFinish: function() { this.uploadLoading = false; this.$message.error('上传失败,请重启设备后重试。'); + this.uploadAlertShow = true; }, /**