From f24b25731e8f1c42c9d123327cfe3453e18b3fd1 Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期二, 01 四月 2025 09:02:57 +0800 Subject: [PATCH] 用户管理和外购件调整 --- src/views/system/user/index.vue | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 878a405..a2d25a5 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -215,8 +215,8 @@ <el-input v-model="search2" placeholder="杈撳叆鍏抽敭瀛楁悳绱�" clearable size="small" @clear="searchFilter2" @keyup.enter.native="searchFilter2" prefix-icon="el-icon-search" style="margin-bottom: 20px;width: 90%" /> <el-tree :data="datathirdParty" node-key="companyId" :props="defaultProps0" @node-click="nodeClick2" - style="height: calc(100% - 42px);" @node-expand="nodeOpen0" :filter-node-method="filterNode2" ref="tree2" - highlight-current> + style="height: calc(100% - 42px);overflow-y: auto;" @node-expand="nodeOpen0" + :filter-node-method="filterNode2" ref="tree2" highlight-current> </el-tree> </el-col> <el-col :span="companiesList.length == 1 ? 24 : 16" style="height: 70vh;padding-left: 8px;"> @@ -416,7 +416,8 @@ addOb: { fatherId: 10001, nickName: '', - } + }, + multipleSelection: [] }; }, watch: { @@ -550,6 +551,7 @@ this.ids = selection.map(item => item.userId); this.single = selection.length != 1; this.multiple = !selection.length; + this.multipleSelection = selection }, // 鏇村鎿嶄綔瑙﹀彂 handleCommand(command, row) { @@ -584,7 +586,7 @@ }).catch(() => { this.thirdPartyLoading = false; }) - if (this.componentData.entity.roleId > 10000) this.$message.warning('鐢变簬鏈�変腑鍏蜂綋瑙掕壊锛屾柊澧炵敤鎴峰皢鎴愪负榛樿瑙掕壊') + if (this.queryParams.deptId > 10000) this.$message.warning('鐢变簬鏈�変腑鍏蜂綋瑙掕壊锛屾柊澧炵敤鎴峰皢鎴愪负榛樿瑙掕壊') }, tranListToTreeData(list, rootValue) { const arr = []; @@ -629,14 +631,14 @@ } }, nodeOpen0(data, node, el) { - this.currentCompaniesList[node.level - nodeOpen01] = data.id + // this.currentCompaniesList[node.level - nodeOpen01] = data.id }, filterNode2(value, data) { if (!value) return true; return data['companyName'].indexOf(value) !== -1; }, addUser2() { - if (this.ids.length === 0) { + if (this.multipleSelection.length === 0) { return this.$message.error('璇烽�夋嫨浜哄憳') } if (this.currentCompaniesList.length === 0) { @@ -654,10 +656,11 @@ arr.push(obj) }) this.addLoad = true + // console.log(11111, this.multipleSelection) addPersonUser({ company: arr, person: this.multipleSelection, - roleId: this.componentData.entity.roleId + deptId: this.queryParams.deptId }).then(res => { this.$message.success('鎿嶄綔鎴愬姛') this.multipleSelection = [] -- Gitblit v1.9.3