| | |
| | | <div class="head-container addButton"> |
| | | <el-input v-model="deptName" placeholder="部门名称" clearable size="small" prefix-icon="el-icon-search" |
| | | style="margin-bottom: 20px" /> |
| | | <el-button style="margin-left: 4px" type="primary" plain icon="el-icon-plus" size="mini" circle |
| | | @click="addSchema"></el-button> |
| | | <!-- <el-button style="margin-left: 4px" type="primary" plain icon="el-icon-plus" size="mini" circle |
| | | @click="addSchema"></el-button> --> |
| | | </div> |
| | | <div class="head-container"> |
| | | <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查 询</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重 置</el-button> |
| | | <el-button type="primary" size="mini" @click="handleQuery">查询</el-button> |
| | | <el-button size="mini" @click="resetQuery">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <el-col> |
| | | <el-table v-loading="loading" :data="userList"> |
| | | <el-table v-loading="loading" :data="userList" |
| | | :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border> |
| | | <el-table-column label="序号" align="center" type="index" /> |
| | | <el-table-column label="姓名" align="center" key="nickName" prop="nickName" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="账号" align="center" key="userName" prop="userName" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="角色" align="center" key="roleName" prop="roleName" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="状态" align="center" key="status"> |
| | | <template slot-scope="scope"> |
| | | <el-switch v-model="scope.row.status" active-value="0" inactive-value="1" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" width="120" /> |
| | | <el-table-column label="操作" align="center" width="160" class-nickName="small-padding fixed-width"> |
| | | <el-table-column label="操作" align="center" width="160" class="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:user:edit']">修改</el-button> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="归属部门" prop="deptId"> |
| | | <treeselect v-model="form.deptId" :options="enabledDeptOptions" :show-count="true" placeholder="请选择归属部门" /> |
| | | <treeselect v-model="form.deptId" :options="enabledDeptOptions" :show-count="true" |
| | | placeholder="请选择归属部门" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-col :span="8" style="height: 70vh;overflow: hidden;" v-if="companiesList.length != 1"> |
| | | <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="defaultProps" @node-click="nodeClick2" |
| | | style="height: calc(100% - 42px);" @node-expand="nodeOpen0" :filter-node-method="filterNode2" ref="tree2" |
| | | highlight-current> |
| | | <el-tree :data="datathirdParty" node-key="companyId" :props="defaultProps0" @node-click="nodeClick2" |
| | | 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;"> |
| | |
| | | style="width: 50%" @keyup.enter.native="searchPerson()"></el-input> |
| | | </div> |
| | | <el-table height="67vh" stripe :data="personList" v-loading="personLoad" ref="personTable" |
| | | :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border |
| | | @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="50"> |
| | | </el-table-column> |
| | | <el-table-column prop="employeeID" label="员工号"> |
| | | </el-table-column> |
| | | <el-table-column prop="nickName" label="员工姓名"> |
| | | <el-table-column prop="name" label="员工姓名"> |
| | | </el-table-column> |
| | | <el-table-column prop="department" label="部门" min-width="200"> |
| | | </el-table-column> |
| | |
| | | children: "children", |
| | | label: "label" |
| | | }, |
| | | defaultProps0: { |
| | | children: "children", |
| | | label: "companyName" |
| | | }, |
| | | // 用户导入参数 |
| | | upload: { |
| | | // 是否显示弹出层(用户导入) |
| | |
| | | fatherId: 10001, |
| | | nickName: '', |
| | | }, |
| | | multipleSelection: [] |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | } |
| | | this.addLoad = true |
| | | addDepartment(this.addOb).then(res => { |
| | | if (res.code === 201) { |
| | | this.addLoad = false |
| | | return |
| | | } |
| | | this.$message.success('添加成功') |
| | | this.addDia = false |
| | | this.getList() |
| | |
| | | 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; |
| | |
| | | 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 => { |
| | | if (res.code === 201) { |
| | | this.addLoad = false |
| | | return |
| | | } |
| | | this.$message.success('操作成功') |
| | | this.multipleSelection = [] |
| | | this.$refs.personTable.clearSelection() |