From 2a77606996711dbc7f554576959f5cd782632bff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=89=E4=BF=8A=E4=BA=91?= <515906788@qq.com> Date: Tue, 7 Nov 2023 17:49:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=82=E5=B8=B8=E6=8F=90?= =?UTF-8?q?=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Settings.vue | 99 +++++++++++++++++++++++------------------- 1 file changed, 55 insertions(+), 44 deletions(-) diff --git a/src/views/Settings.vue b/src/views/Settings.vue index 4455fc5..b23bc8d 100644 --- a/src/views/Settings.vue +++ b/src/views/Settings.vue @@ -821,30 +821,36 @@ console.log(sysCloneForm); sysCloneForm.action = 'saveSysInfo'; saveSysInfo(sysCloneForm, response => { - console.log(response); - loading.close(); - if (response.status >= 200 && response.status < 300) { - if (response.data.result == 'success') { - //循环赋值 - // for (let key in _this.sysForm) { - // _this.sysForm[key] = response.data[key]; - // } - this.$message.success('保存成功。'); + + + setTimeout(() => { + console.log(response); + loading.close(); + if (response.status >= 200 && response.status < 300) { + if (response.data.result == 'success') { + //循环赋值 + // for (let key in _this.sysForm) { + // _this.sysForm[key] = response.data[key]; + // } + this.$message.success('保存成功。'); + } else { + //清空 + // for (let key in _this.sysForm) { + // _this.sysForm[key] = null; + // } + this.$message.error('系统信息保存失败。'); + } + } else { //清空 // for (let key in _this.sysForm) { // _this.sysForm[key] = null; // } - this.$message.error('系统信息保存失败。'); + this.$message.error('系统异常,请联系厂商。'); } + }, 3000); + - } else { - //清空 - // for (let key in _this.sysForm) { - // _this.sysForm[key] = null; - // } - this.$message.error('系统异常,请联系厂商。'); - } }) } else { console.log('error submit!!'); @@ -875,18 +881,21 @@ //保存掘进机信息 saveTunnelInfo(this.tForm, response => { - console.log(response); - loading.close(); - if (response.status >= 200 && response.status < 300) { - if (response.data.result == 'success') { - this.$message.success('保存成功。'); - } else { - this.$message.error('掘进机信息保存失败。'); - } + setTimeout(() => { + console.log(response); + loading.close(); + if (response.status >= 200 && response.status < 300) { + if (response.data.result == 'success') { + this.$message.success('保存成功。'); + } else { + this.$message.error('掘进机信息保存失败。'); + } + + } else { + this.$message.error('系统异常,请联系厂商。'); + } + }, 3000); - } else { - this.$message.error('系统异常,请联系厂商。'); - } }) }, @@ -915,29 +924,30 @@ }); this.joyForm.action = 'saveJoyInfo'; saveJoyInfo(this.joyForm, response => { - console.log(response); - loading.close(); - if (response.status >= 200 && response.status < 300) { - if (response.data.result == 'success') { - //循环赋值 - this.$message.success('保存成功。'); + setTimeout(() => { + console.log(response); + loading.close(); + if (response.status >= 200 && response.status < 300) { + if (response.data.result == 'success') { + //循环赋值 + this.$message.success('保存成功。'); + } else { + //清空 + for (let key in _this.joyForm) { + _this.joyForm[key] = null; + } + this.$message.error('手柄配置保存失败,请重试。'); + } + } else { //清空 for (let key in _this.joyForm) { _this.joyForm[key] = null; } - this.$message.error('手柄配置保存失败,请重试。'); + this.$message.error('系统异常,请联系厂商。'); } - - } else { - //清空 - for (let key in _this.joyForm) { - _this.joyForm[key] = null; - } - this.$message.error('系统异常,请联系厂商。'); - } + }, 3000); }) - }, /** @@ -1144,6 +1154,7 @@ } _this.pwdModelShow = false; + this.$message.success('密码修改成功。'); } else { //清空 for (let key in _this.sysForm) {