From 3e0cff9f473ac1c98d2732b6e9d907161b1f2d83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Mon, 3 Jul 2023 17:25:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=B7=BB=E5=8A=A0=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/system/userdatasource/index.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ruoyi-ui/src/views/system/userdatasource/index.vue b/ruoyi-ui/src/views/system/userdatasource/index.vue index 7607719..249710f 100644 --- a/ruoyi-ui/src/views/system/userdatasource/index.vue +++ b/ruoyi-ui/src/views/system/userdatasource/index.vue @@ -253,15 +253,15 @@ export default { }, /** 新增按钮操作 */ handleAdd() { - this.operationType = 1 this.reset(); + this.operationType = 1 this.open = true; this.title = "添加用户数据"; }, /** 修改按钮操作 */ handleUpdate(row) { - this.operationType = 2 this.reset(); + this.operationType = 2 const datasourceId = row.datasourceId || this.ids getUserdatasource(datasourceId).then(response => { this.form = response.data; @@ -273,12 +273,12 @@ export default { submitForm() { this.$refs["form"].validate(valid => { if (valid) { + console.log(this.operationType) if (this.operationType === 2) { updateUserdatasource(this.form).then(response => { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); - this.operationType = null }); } if(this.operationType === 1){ @@ -286,7 +286,6 @@ export default { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); - this.operationType = null }); } }