From 930f97b0505ba4c31a370b9ad913a0a58f5f2303 Mon Sep 17 00:00:00 2001 From: zhoulingpo Date: Thu, 11 May 2023 14:39:23 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=94=A8=E6=88=B7=E9=83=A8=E9=97=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/OrgTable.vue | 6 +++--- src/views/System/User.vue | 37 ++++++++++++++++++++++++++++++++----- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/src/components/OrgTable.vue b/src/components/OrgTable.vue index 6cfdf96..4c3da7e 100644 --- a/src/components/OrgTable.vue +++ b/src/components/OrgTable.vue @@ -125,7 +125,7 @@ size="medium" closable v-for="item in checkedList" - :key="item.usid || item.USID || item.id" + :key="item.usid || item.USID || item.id || item.orgCode" @close="handleRemove(item)">{{ item.uname || item.USNAME || item.name || item.orgName}} { - const id = selItem.USID + const id = selItem.USID || selItem.orgCode if (!this.checkedIdList.includes(id)) { this.checkedIdList.push(id) this.checkedList.push(row) @@ -758,7 +758,7 @@ export default { selectionRowAll (selection) { if (selection.length > 0) { selection.map(selItem => { - const id = selItem.USID + const id = selItem.USID || selItem.orgCode if (!this.checkedIdList.includes(id)) { this.checkedIdList.push(id) this.checkedList.push(selItem) diff --git a/src/views/System/User.vue b/src/views/System/User.vue index 75bc4d5..01f2b00 100644 --- a/src/views/System/User.vue +++ b/src/views/System/User.vue @@ -53,7 +53,7 @@ - + @@ -98,7 +98,9 @@ - + + @@ -119,6 +121,10 @@ + @@ -129,6 +135,9 @@ export default { name: 'User', data () { return { + visibleOrgTable:false, + orgTableVal:'', + orgTableValName:'', q: { account: '', // 用户名 roleName: '', // 角色名称 @@ -142,7 +151,7 @@ export default { form: { account: '', // 用户名 cellPhoneNumber: '', // 手机号 - department: '', // 部门 + orgId: '', // 部门 email: '', // 邮箱 password: '', // 密码 usid: '', @@ -154,6 +163,23 @@ export default { } }, methods: { + isTreeOk(checkedList){ + + const parts = [] + const partsName = [] + checkedList.map((item, index) => { + parts.push(item.orgCode) + partsName.push(item.orgName) + }) + this.form.orgId = parts.toString() + this.form.orgName = partsName.toString() + + }, + handleClick(){ + this.orgTableVal=this.form.orgId + this.orgTableValName=this.form.orgName + this.visibleOrgTable=true + }, search () { this.q.pageNo = 1 this.sysUserList() @@ -200,7 +226,7 @@ export default { this.form = { account: '', // 用户名 cellPhoneNumber: '', // 手机号 - department: '', // 部门 + orgId: '', // 部门 email: '', // 邮箱 password: '', // 密码 usid: '', @@ -287,7 +313,8 @@ export default { this.form = { account: row.ACCOUNT, // 用户名 cellPhoneNumber: row.CELLPHONE_NUMBER, // 手机号 - department: row.DEPARTMENT, // 部门 + orgId: row.ORGID, // 部门 + orgName: row.ORGNAME, // 部门 email: row.EMAIL, // 邮箱 password: '', // 密码 usid: row.USID, // 用户ID