| | |
| | | <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;"> |
| | |
| | | addOb: { |
| | | fatherId: 10001, |
| | | nickName: '', |
| | | } |
| | | }, |
| | | multipleSelection: [] |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | this.ids = selection.map(item => item.userId); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | this.multipleSelection = selection |
| | | }, |
| | | // 更多操作触发 |
| | | handleCommand(command, row) { |
| | |
| | | }).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 = []; |
| | |
| | | } |
| | | }, |
| | | 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) { |
| | |
| | | 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 = [] |