|  |  |  | 
|---|
|  |  |  | <el-form-item label="组织" prop="companyName"> | 
|---|
|  |  |  | <el-input v-model="searchForm.companyName" v-trim placeholder="请输入组织" @keypress.enter.native="search"/> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="角色" prop="roleId"> | 
|---|
|  |  |  | <el-select v-model="searchForm.roleId" placeholder="请选择角色" @change="search"> | 
|---|
|  |  |  | <el-option :label="item.name" :value="item.id" v-for="(item, index) in rolesList" :key="index"></el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <!--            <el-form-item label="所属部门" prop="rootDeptId">--> | 
|---|
|  |  |  | <!--        <DepartmentSelect v-model="searchForm.rootDeptId" placeholder="请选择所属部门" clearable/>--> | 
|---|
|  |  |  | <!--      </el-form-item>--> | 
|---|
|  |  |  | 
|---|
|  |  |  | import ResetPwdWindow from '@/components/system/user/ResetPwdWindow' | 
|---|
|  |  |  | import DepartmentSelect from '@/components/common/DepartmentSelect' | 
|---|
|  |  |  | import PositionSelect from '@/components/common/PositionSelect' | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import { fetchAll as fetchAllRoles, fetchAll } from '@/api/system/role' | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | name: 'SystemUser', | 
|---|
|  |  |  | extends: BaseTable, | 
|---|
|  |  |  | 
|---|
|  |  |  | rootDeptId: null, // 部门ID | 
|---|
|  |  |  | positionId: null, // 岗位ID | 
|---|
|  |  |  | companyName: null, // 企业名称 | 
|---|
|  |  |  | roleId: null, // 角色 | 
|---|
|  |  |  | mobile: '' // 手机号码 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | rolesList: [] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | created () { | 
|---|
|  |  |  | 
|---|
|  |  |  | }] | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | fetchAllRoles() | 
|---|
|  |  |  | .then(records => { | 
|---|
|  |  |  | this.rolesList = records | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch(e => { | 
|---|
|  |  |  | this.$tip.apiFailed(e) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </script> | 
|---|