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 }); } }