| | |
| | | <div class="head-container"> |
| | | <el-input |
| | | v-model="deptName" |
| | | placeholder="请输入部门名称" |
| | | placeholder="请输入组织架构名称" |
| | | clearable |
| | | size="small" |
| | | prefix-icon="el-icon-search" |
| | |
| | | <el-table-column label="真实姓名" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="用户名" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" /> |
| | | <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="组织架构" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="状态" align="center" key="status" v-if="columns[5].visible"> |
| | | <template slot-scope="scope"> |
| | | <el-switch |
| | |
| | | <el-input v-model="form.nickName" placeholder="请输入真实姓名" maxlength="30" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <el-form-item label="归属部门" prop="deptId">--> |
| | | <!-- <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="所属地区"> |
| | | <el-select v-model="form.districtId" placeholder="请选择" style="width: 100%;"> |
| | | <el-option |
| | | v-for="item in areaList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <el-form-item label="所属地区">--> |
| | | <!-- <el-select v-model="form.districtId" placeholder="请选择" style="width: 100%;">--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in areaList"--> |
| | | <!-- :key="item.id"--> |
| | | <!-- :label="item.name"--> |
| | | <!-- :value="item.id">--> |
| | | <!-- </el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <el-col :span="12" v-if="showDeptList"> |
| | | <el-form-item label="组织架构" prop="deptId"> |
| | | <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择组织架构" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | deptId: undefined |
| | | }, |
| | | showInstitutuion: false, |
| | | showDeptList: false, |
| | | // 列信息 |
| | | columns: [ |
| | | { key: 0, label: `用户编号`, visible: true }, |
| | | { key: 1, label: `用户名`, visible: true }, |
| | | { key: 2, label: `真实姓名`, visible: true }, |
| | | { key: 3, label: `部门`, visible: true }, |
| | | { key: 3, label: `组织架构`, visible: true }, |
| | | { key: 4, label: `手机号码`, visible: true }, |
| | | { key: 5, label: `状态`, visible: true }, |
| | | { key: 6, label: `创建时间`, visible: true } |
| | |
| | | ], |
| | | institutionIds: [ |
| | | { required: true, message: "所属机构不能为空", trigger: "blur" } |
| | | ], |
| | | deptId: [ |
| | | { required: true, message: "组织架构不能为空", trigger: "blur" } |
| | | ], |
| | | password: [ |
| | | { required: true, message: "用户密码不能为空", trigger: "blur" }, |
| | |
| | | }, |
| | | getSections(val){ |
| | | this.sectionOptions = [] |
| | | if(val.indexOf(101)>-1){ |
| | | this.showDeptList = true |
| | | }else{ |
| | | this.showDeptList = false |
| | | } |
| | | if(val.indexOf(100)>-1 && val.indexOf(102)>-1){ |
| | | this.getSectionList() |
| | | this.showInstitutuion = true |
| | |
| | | this.showInstitutuion = true |
| | | this.form.institutionIds = response.data.institutions.map(i=>i.institutionId.toString()) |
| | | } |
| | | if(response.roleIds.indexOf(101)>-1){ |
| | | this.showDeptList = true |
| | | } |
| | | }); |
| | | }, |
| | | /** 重置密码按钮操作 */ |