From 74b6dfd57fc6cf8afbcfa607d6f65cd1a86fc7d6 Mon Sep 17 00:00:00 2001 From: zhangdi <15053473693@163.com> Date: Fri, 7 Feb 2025 10:29:39 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=BB=E8=BE=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user.vue | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/views/system/user.vue b/src/views/system/user.vue index 9ae2483..bd9779d 100644 --- a/src/views/system/user.vue +++ b/src/views/system/user.vue @@ -479,6 +479,9 @@ export default { type: "tree", multiple: true, dicData: [], + labelTip:'只能关联一个部门信息!', + labelWidth:100, + labelTipPlacement:'left', props: { label: "title" }, @@ -729,14 +732,14 @@ export default { row.deptId = func.join(row.deptId); row.roleId = func.join(row.roleId); row.postId = func.join(row.postId); - // if (row.deptId.split(',').length > 1) { - // this.$message({ - // type: "error", - // message: "所属部门只能选择一个!" - // }); - // loading(); - // return false - // } + if (row.deptId.split(',').length > 1) { + this.$message({ + type: "error", + message: "所属部门只能选择一个!" + }); + loading(); + return false + } if(row.roleId == "1846419477876510721"){ const column = this.findObject(this.option.group, "deptId"); column.dicData.map(item =>{ @@ -999,9 +1002,9 @@ export default { if (["edit", "view"].includes(type)) { getUser(this.form.id).then(res => { this.form = res.data.data; - if (this.form.hasOwnProperty('deptId')) { - this.form.deptId = func.split(this.form.deptId); - } + // if (this.form.hasOwnProperty('deptId')) { + // this.form.deptId = func.split(this.form.deptId); + // } if (this.form.hasOwnProperty('roleId')) { this.form.roleId = func.split(this.form.roleId); }