From bd132768c51174479e5ca76d11407cf05ee220b4 Mon Sep 17 00:00:00 2001 From: wanglei Date: Mon, 3 Nov 2025 09:24:45 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E8=A7=92=E8=89=B2=E5=8D=95?= =?UTF-8?q?=E9=80=89=EF=BC=9B=20=E8=B6=85=E6=97=B6=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=8A=A0=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/utils/request.js | 2 +- ruoyi-ui/src/views/system/user/index.vue | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js index 1a02a0a..03a3d2c 100644 --- a/ruoyi-ui/src/utils/request.js +++ b/ruoyi-ui/src/utils/request.js @@ -17,7 +17,7 @@ const service = axios.create({ // axios中请求配置有baseURL选项,表示请求URL公共部分 baseURL: process.env.VUE_APP_BASE_API, // 超时 - timeout: 10000 + timeout: 180000 }) // request拦截器 diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index 522120c..8593c22 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -179,7 +179,8 @@ --> - + + @@ -217,6 +218,7 @@ 取 消 + @@ -483,7 +485,8 @@ export default { this.postOptions = response.posts this.roleOptions = response.roles this.$set(this.form, "postIds", response.postIds) - this.$set(this.form, "roleIds", response.roleIds) + // this.$set(this.form, "roleIds", response.roleIds); + this.$set(this.form, "roleIds", response.roleIds[0]) this.open = true this.title = "修改用户" this.form.password = "" @@ -517,14 +520,16 @@ export default { submitForm: function() { this.$refs["form"].validate(valid => { if (valid) { + let RoleIds = [this.form.roleIds]; + let FormData = {...this.form, roleIds: RoleIds} if (this.form.userId != undefined) { - updateUser(this.form).then(response => { + updateUser(FormData).then(response => { this.$modal.msgSuccess("修改成功") this.open = false this.getList() }) } else { - addUser(this.form).then(response => { + addUser(FormData).then(response => { this.$modal.msgSuccess("新增成功") this.open = false this.getList()