123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023 |
- <template>
- <el-dialog
- :title="title"
- :visible.sync="visible_"
- :close-on-click-modal="false"
- :before-close="close_before"
- append-to-body
- @open="openDialog"
- width="640px"
- class="employee_select_dialog"
- >
- <slot name="header"></slot>
- <div class="employee_selector_box" v-if="visible_">
- <el-row :gutter="10">
- <el-col :xs="11" :sm="11" :md="11" :lg="11" :xl="11" class="scroller-box one">
- <div class="search-box">
- <!-- <div class="search flex-box"><el-input v-model="keyword" placeholder="请输入内容" clearable></el-input></div> -->
- <div class="search flex-box dept_icon" style="margin-top: 7px; width: 80%; position: relative;">
- <deptData v-if="toPdept1 && toPdept1!=0" :refsName="$refs.dept1" :toPdept="toPdept1" style="width: 79%;"></deptData>
- <el-cascader
- v-show="can_select_employee&&deptId==0"
- v-model="dept_id"
- :options="dept_list"
- :props="{ checkStrictly: true, value: 'id', label: 'name', children: 'children' }"
- @change="dept1_null"
- ref="dept1"
- filterable
- :disabled="deptId > 0"
- change-on-select
- placeholder="请选择部门"
- clearable
- >
- <template slot-scope="{ node, data }">
- <span>
- <WWOpenData type="departmentName" :openid="data.name"></WWOpenData>
- </span>
- </template>
- </el-cascader>
- </div>
- </div>
- <div class="dept_path scroll-bar flex-box flex-d-wrap" v-if="can_select_dept">
- <template v-if="pid_list_arr.length > 0">
- <div @click="back_by_index(0)" class="blue" style="cursor: pointer;">全公司</div>
- <div v-for="(item, index) in pid_list_arr" :key="index" @click="back_by_index(index + 1, item)" class="font-flex-word" style="max-width: 120px;">
- <i class="el-icon-arrow-right"></i>
- <span class="blue" style="cursor: pointer;">
- <WWOpenData type="departmentName" :openid="item.name"></WWOpenData>
- <!-- {{ item.name }} -->
- </span>
- </div>
- </template>
- </div>
- <!-- 人员 -->
- <div class="flex-box-end" v-if="can_select_employee && isChecKedAll && multi" style="padding: 10px;border-bottom: 1px solid #f1f1f1;">
- <el-checkbox v-model="checked" @change="checkedChange">全选</el-checkbox>
- </div>
- <el-scrollbar
- wrap-class="column-wrapper scrollable-items-container"
- :native="false"
- :class="(can_select_dept || isChecKedAll)? 'scrollbarHeight1' : 'scrollbarHeight2'"
- v-loading="table_loading"
- >
- <div class="choose_left">
- <template v-if="can_select_dept">
- <div class="persons_box" style="padding-top:4px;" v-if="dept_list.length > 0">
- <div v-for="(item, index) in dept_list" :key="index">
- <div class="flex-box flex-v-ce deptList" @click="select_dept(item, index)" v-show="item.name.indexOf(keyword) >= 0">
- <div :class="[item.checked? 'showCheckbox':'']" class="checkbox"><span class="isCheckbox"></span></div>
- <div class="employee_name flex-1 font-flex-word">
- <!-- {{ item.name }} -->
- <WWOpenData type="departmentName" :openid="item.name"></WWOpenData>
- </div>
- <div v-if="item.children" class="blue" @click.stop="show_child(item)">| 下级</div>
- </div>
- </div>
- </div>
- </template>
- <template v-if="can_select_employee">
- <div class="persons_box" style="padding-top:4px;" v-if="list.length > 0">
- <div class="employee_cell_a" v-for="(item, index) in list" :key="index" v-show="item.id">
- <div class="employee_cell" @click.prevent.stop="select_employee(item)">
- <div class="employee_checkbox"><el-checkbox v-model="item.checked"></el-checkbox></div>
- <div class="employee_img_url" v-if="item.img_url && item.img_url != defaultImg()"><img :src="item.img_url" class="employee_cell_head_img" /></div>
- <div class="employee_img_url" v-else><img src="static/images/default5.png" class="employee_cell_head_img" /></div>
- <div class="employee_name">
- <WWOpenData type="userName" :openid="item.name"></WWOpenData>
- <!-- {{ item.name }} -->
- </div>
- <div class="employee_cell_clear"></div>
- </div>
- </div>
- </div>
- <div v-else class="fontColorF" style="text-align: center;margin-top: 50px;">暂无可选人员</div>
- </template>
- </div>
- </el-scrollbar>
- </el-col>
- <el-col :xs="2" :sm="2" :md="2" :lg="2" :xl="2" class="col-line"><span style="opacity: 0;">空</span></el-col>
- <el-col :xs="11" :sm="11" :md="11" :lg="11" :xl="11" class="scroller-box">
- <div class="option-box">
- <span style="line-height: 40px; padding-left: 10px;" class="fl" v-if="multi && can_select_employee">已选择{{ employee_selected_list.length }}人</span>
- <el-button type="type" @click="clear_data">清空</el-button>
- </div>
- <el-scrollbar wrap-class="column-wrapper scrollable-items-container" :native="false" style="height: 400px;">
- <div class="choose_right">
- <div class="employee_cell" v-for="(item, index) in dept_selected_list" :key="index">
- <div class="employee_name">
- <WWOpenData type="departmentName" :openid="item.dept_name"></WWOpenData>
- <!-- {{ item.dept_name }} -->
- </div>
- <div class="employee_delete"><el-button type="default" size="mini" @click="dept_delete(item, index)" icon="el-icon-close" circle></el-button></div>
- <div class="employee_cell_clear"></div>
- </div>
- <div class="employee_cell" v-for="(item, index) in employee_selected_list" :key="index">
- <div class="employee_img_url" v-if="item.img_url && item.img_url != defaultImg()"><img :src="item.img_url" class="employee_cell_head_img" /></div>
- <div class="employee_img_url" v-else><img src="static/images/default5.png" class="employee_cell_head_img" /></div>
- <div class="employee_name">
- <WWOpenData type="userName" :openid="item.name"></WWOpenData>
- <!-- {{ item.name }} -->
- </div>
- <div class="employee_delete"><el-button type="default" size="mini" @click="employee_cancel(item, true)" icon="el-icon-close" circle></el-button></div>
- <div class="employee_cell_clear"></div>
- </div>
- </div>
- </el-scrollbar>
- </el-col>
- </el-row>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="close">取 消</el-button>
- <el-button type="primary" @click="confirm">确 定</el-button>
- </span>
- </el-dialog>
- </template>
- <script>
- export default {
- props: {
- title: {
- // 标题
- type: String,
- default: '选择部门和员工'
- },
- deptId: {
- //指定部门ID,人员列表就是该部门的
- type: Number,
- default: 0
- },
- visible: {
- // 是否显示组件
- type: Boolean,
- default: false
- },
- can_select_dept: {
- // 是否能选择部门(单选择部门,不能选择人员)
- type: Boolean,
- default: false
- },
- dept_not_select: {
- // 排除部门ID
- type: Array,
- default: () => {
- return [];
- }
- },
- dept_multi: {
- // 指定部门是否能多选
- type: Boolean,
- default: true
- },
- dept_children: {
- //选择部门时是否包含子部门
- type: Boolean,
- default: true
- },
- can_select_employee: {
- // 指定是否能选择员工
- type: Boolean,
- default: true
- },
- employee_not_select: {
- // 排除员工的ID,包含ID时不出现在选择列表中
- type: Array,
- default: () => {
- return [];
- }
- },
- selected: {
- // 已经选择的员工和部门
- type: Object,
- default: () => {
- return { employee: [], dept: [] };
- }
- },
- multi: {
- // 指定员工是否能多选
- type: Boolean,
- default: true
- },
- user_employee_list: {
- // 为true时,employee_list才生效
- type: Boolean,
- default: false
- },
- employee_list: {
- // 指定显示的员工列表,注意:传值后组件的员工数据将不是统一向服务器获取的,而是指定的员工列表,格式是:[{id: 1, name: “张三”, img_url: “”}]
- type: Array,
- default: () => {
- return [];
- }
- },
- isChecKedAll: {
- //是否全选
- type: Boolean,
- default: true
- },
- close_clear_data: {
- //关闭时是否清除选择的数据
- type: Boolean,
- default: true
- },
- max: {
- //选择的人数限制
- type: Number,
- default: 0
- },
- is_filtration_creator: {
- //是否去除创始人
- type: Boolean,
- default: true
- },
- is_manager_only: {
- //是否只显示管理者
- type: Boolean,
- default: false
- },
- is_superior: {
- //是否只显示上级
- type: Boolean,
- default: false
- },
- include_self: {
- //是否显示自己
- type: Boolean,
- default: true
- },
- child:{
- //当人员列表点击部门筛选时不显示子部门人员 ,目前只在设置主管有使用到
- type: Boolean,
- default: true
- },
- isRequired:{
- //是否必须选择人员或者部门
- type: Boolean,
- default: false
- }
- },
- name: 'EmployeeSelector',
- data() {
- return {
- // 基础配置
- table_loading: false,
- searchBox: [], //用于搜索的全部人员
- keyword: '',
- checked: false,
- visible_: false,
- // 选择人员相关
- employee_selected_list: [],
- employee_selected: [],
- list: [],
- // 选择部门相关
- dept_selected_list: [],
- dept_name: '',
- dept_id: [],
- dept_select_id: 0,
- dept_list: [],
- dept_list_all: [], //备用全部部门
- pid_list_arr: [],
- toPdept1:0,//选择部门的遮到
- };
- },
- watch: {
- // 当动态改变“employee_list”时,获取employee_list与employee_selected_list的交集,用于考勤组功能
- employee_list(val) {
- var eSList = this.employee_selected_list;
- this.employee_selected_list = [...eSList].filter(x => [...val].some(y => y.id === x.id));
- },
- visible(val) {
- this.visible_ = JSON.parse(JSON.stringify(val));
- if (val) {
- setTimeout(() => {
- this.toPdept1 = 0
- this.dept_select_id = 0
- this.dept_id = []
- this.get_user_list();
- this.get_dept_list();
- }, 200);
- }
- },
- keyword(val) {
- this.list = this.searchBox.filter(item => item.name.includes(this.keyword));
- if (!val) {
- this.checked = false;
- }
- }
- },
- methods: {
- defaultImg(){
- return "https://rescdn.qqmail.com/node/wwmng/wwmng/style/images/independent/DefaultAvatar$73ba92b5.png"
- },
- dept1_null(val){
- this.toPdept1 = val[val.length-1]
- if(val.length>1){
- this.dept_select_id=val[val.length-1];
- }else{
- this.dept_select_id=val[0];
- }
- this.$nextTick(()=>{
- this.get_user_list();
- this.checked = false;
- this.$refs.dept1.dropDownVisible = false;
- })
- },
- //打开Dialog的回调,用刷每次打开都初始化selected
- openDialog() {
- if (this.deptId != 0) {
- this.dept_id = [this.deptId];
- this.dept_select_id = this.deptId;
- }
- let selected = this.selected;
- this.employee_selected = [];
- this.employee_selected_list = JSON.parse(JSON.stringify(selected.employee));
- this.dept_selected_list =JSON.parse(JSON.stringify(selected.dept));
- for (let i in selected.employee) {
- this.employee_selected.push(selected.employee[i].id);
- }
- },
- close_before(done) {
- this.close();
- done();
- },
- // 全选(只用选择人员)
- checkedChange(val) {
- if (val) {
- this.$nextTick(() => {
- let employeeSelectedList = JSON.parse(JSON.stringify(this.employee_selected_list)); //获取选择的人员
- let employeeSelectedIds = [],
- total = 0;
- employeeSelectedList.forEach(element => {
- employeeSelectedIds.push(element.id);
- });
- for (let i in this.list) {
- this.$set(this.list[i], 'checked', true);
- if (!employeeSelectedIds.includes(this.list[i].id)) {
- //去除已经选择的人员
- this.employee_selected_list.push(this.list[i]);
- }
- }
- });
- } else {
- this.employee_selected_list = [];
- this.employee_selected = [];
- for (let i in this.list) {
- this.$set(this.list[i], 'checked', false);
- }
- }
- },
- // 点击部门导航
- back_by_index(index, item) {
- this.pid_list_arr.splice(index, 100);
- if (index == 0) {
- this.dept_list = this.dept_list_all;
- return false;
- }
- if (item.children) {
- this.dept_list = item.children;
- }
- },
- //下一级
- show_child(item) {
- if (item.children) {
- this.dept_list = item.children;
- }
- this.pid_list_arr.push(item);
- },
- //获取一个部门的下的所有子部门
- getChildrens(list) {
- var dept_list = [];
- list.forEach(item => {
- item.checked = true;
- dept_list.push({ dept_id: item.id, dept_name: item.name, avatar: 'static/images/e66f.jpg' });
- if (item.children) {
- dept_list.push(...this.getChildrens(item.children));
- }
- });
- return dept_list;
- },
- //选择部门
- select_dept(item, index) {
- if (item.checked) {
- this.dept_cancel(item);
- } else {
- if (!this.dept_multi) {
- //是否能多选
- this.dept_selected_list = [];
- for (let i in this.dept_list_all) {
- this.dept_cancel(this.dept_list_all[i], true);
- }
- }
- item.checked = true;
- if (item.children && this.dept_children) {
- //是否存在子部门
- this.dept_selected_list.push({ dept_id: item.id, dept_name: item.name, avatar: 'static/images/e66f.jpg' });
- var arr = this.getChildrens(item.children);
- this.dept_selected_list.push(...arr);
- } else {
- this.dept_selected_list.push({ dept_id: item.id, dept_name: item.name, avatar: 'static/images/e66f.jpg' });
- }
- }
- },
- //清除选择的部门
- dept_cancel(item, is) {
- item.checked = false;
- if (item.children) {
- //左边
- item.children.forEach(childrens => {
- this.dept_cancel(childrens);
- });
- }
- if (is) {
- return false;
- }
- var deptSelectedList = this.dept_selected_list;
- deptSelectedList.forEach((dept, index) => {
- //右边
- if (dept.dept_id == item.id) {
- deptSelectedList.splice(index, 1);
- }
- });
- },
- //删除部门
- dept_delete(item) {
- var dept_list = this.dept_list;
- var obj = this.getDeptz(item.dept_id, dept_list); //递归找到所属部门
- this.dept_cancel(obj);
- },
- // 递归获取指定ID部门
- getDeptz(id, arr) {
- var obj = {};
- for (let i = 0; i < arr.length; i++) {
- if (id == arr[i].id) {
- obj = arr[i];
- break;
- } else if (arr[i].children) {
- if (this.getDeptz(id, arr[i].children).id) {
- obj = this.getDeptz(id, arr[i].children);
- }
- }
- }
- return obj;
- },
- //清除选择的人员
- employee_cancel(item) {
- this.checked = false;
- this.employee_selected.splice(this.employee_selected.indexOf(item.id), 1);
- let delete_index = -1;
- for (let i in this.employee_selected_list) {
- if (this.employee_selected.indexOf(this.employee_selected_list[i].id) < 0) {
- delete_index = i;
- }
- }
- if (delete_index >= 0) {
- for (let i in this.list) {
- if (this.list[i].id == item.id) {
- this.$set(this.list[i], 'checked', false);
- }
- }
- for (let i in this.employee_selected_list) {
- if (this.employee_selected_list[i].id == item.id) {
- this.employee_selected_list.splice(i, 1);
- }
- }
- }
- },
- //选择人员
- select_employee(item) {
- if (item.checked) {
- item.checked = false;
- this.employee_cancel(item);
- } else {
- if (!this.multi) {
- this.employee_selected = [];
- this.employee_selected_list = [];
- for (let i in this.list) {
- this.$set(this.list[i], 'checked', false);
- }
- }
- if (this.max > 0 && this.employee_selected.length == this.max && this.multi) {
- this.$message.error('最多只能选择' + this.max + '人');
- return false;
- }
- this.employee_selected.push(item.id);
- this.employee_selected_list.push({ id: item.id, name: item.name, img_url: item.img_url });
- item.checked = true;
- }
- },
- //清空
- clear_data() {
- this.checked = false;
- this.employee_selected = [];
- this.employee_selected_list = [];
- this.dept_selected_list = [];
- for (let i in this.list) {
- this.$set(this.list[i], 'checked', false);
- }
- for (let i in this.dept_list) {
- this.$set(this.dept_list[i], 'checked', false);
- }
- for (let i in this.dept_list_all) {
- this.$set(this.dept_list_all[i], 'checked', false);
- }
- },
- //关闭||清空数据
- close() {
- this.toPdept1 = 0
- this.dept_select_id = 0
- this.dept_id = []
- this.$emit('update:visible', false);
- this.$refs.dept1.dropDownVisible = false;
- if (this.close_clear_data) {
- this.checked = false;
- this.keyword='';
- this.employee_selected = [];
- this.employee_selected_list = [];
- this.dept_selected_list = [];
- this.pid_list_arr=[];
- for (let i in this.list) {
- this.$set(this.list[i], 'checked', false);
- }
- for (let i in this.dept_list) {
- this.$set(this.dept_list[i], 'checked', false);
- }
- for (let i in this.dept_list_all) {
- this.$set(this.dept_list_all[i], 'checked', false);
- }
- }
- },
- // 确定
- confirm() {
- if(this.isRequired){
- if(this.employee_selected_list.length==0){
- this.$message.error("请选择人员");
- return false
- }
- }
- this.$emit('confirm', {
- employee: this.employee_selected_list,
- dept: this.dept_selected_list
- });
- this.close();
- },
- // 获取部门
- get_dept_list() {
- this.$http('get', '/api/department/tree', '').then(res => {
- var list = res.data.data.list;
- var dept_list = [];
- // 排除部门
- if (this.dept_not_select.length > 0) {
- dept_list = list.filter(item => {
- return this.dept_not_select.indexOf(item.id) == -1;
- });
- } else {
- dept_list = list;
- }
- dept_list = this.getTreeData(dept_list); //过滤children
- //默认选中部门
- if (this.dept_selected_list.length > 0) {
- this.dept_selected_list.forEach(item => {
- this.setDeptChecked(item.dept_id, dept_list);
- });
- }
- this.dept_list = dept_list;
- this.dept_list_all = this.dept_list;
- });
- },
- //设置默认部门
- setDeptChecked(id, arr) {
- for (let i = 0; i < arr.length; i++) {
- if (id == arr[i].id) {
- arr[i].checked = true;
- break;
- } else if (arr[i].children) {
- this.setDeptChecked(id, arr[i].children);
- }
- }
- },
- getTreeData(data) {
- for (var i = 0; i < data.length; i++) {
- data[i].checked = false;
- if (data[i].children.length < 1) {
- // children若为空数组,则将children设为undefined
- data[i].children = undefined;
- } else {
- // children若不为空数组,则继续 递归调用 本方法
- this.getTreeData(data[i].children);
- }
- }
- return data;
- },
- // 默认选择中的人勾上
- parse_list(data) {
- let _list = [];
- data.map(item => {
- item['checked'] = false;
- for (var i in this.employee_selected_list) {
- //判断传进来的员工是否是员工集合里的,是就设为已点击状态
- if (this.employee_selected_list[i].id == item.id) {
- item['checked'] = true;
- }
- }
- if (item.img_url == '') {
- item.img_url = 'static/images/default5.png';
- }
- });
- this.searchBox = data;
- this.list = data;
- },
- //获取人员
- get_user_list() {
- this.table_loading = true;
- let params = {
- dept_id: this.dept_select_id,
- keywords: this.keyword,
- page: 0,
- page_size: 2000,
- child:this.child? '1':'0',
- is_official: 1
- }
- this.$http('get', '/api/employee/index', params)
- .then(res => {
- let list = this.filtration(res.data.data.list);
- // 当有指定显示列表时
- if (this.user_employee_list) {
- var employee_list = this.employee_list;
- var userData = [];
- list.map(item => {
- // 列表数据是否是自己的管理范围
- employee_list.map(item2 => {
- if (item.id == item2.id) {
- userData.push(item);
- }
- });
- });
- this.parse_list(userData);
- } else {
- // 没有指定人员列表
- this.parse_list(list);
- }
- })
- .finally(() => {
- this.table_loading = false;
- });
- },
- // 过滤各种条件:如:自己,创始人,只显示管理者等。。。
- filtration(data) {
- var list = data;
- // 去除已经离职的人
- for (let i = 0; i < list.length; i++) {
- if (list[i].status == 2) {
- list.splice(i, 1);
- i--
- }
- }
- var managerList = []; // 管理者列表
- // 只显示管理者
- if (this.is_manager_only) {
- var isManager;
- list.map(item => {
- isManager = false;
- item.employee_detail.role_list.map(item2 => {
- if (item2.name == 'creator' || item2.name == 'point_manager' || item2.name == 'dept_manager' || item2.name == 'admin') {
- isManager = true;
- }
- });
- if (isManager) {
- managerList.push(item);
- }
- });
- list = managerList;
- }
- //只显示上级
- // if (this.is_superior) {
- // let isManager = [];
- // list.some(item => {
- // if(item.id == this.$store.getters.user_info.id){
- // isManager = item.employee_detail.superior_list
- // return true
- // }
- // });
- // console.log(isManager)
- // list = isManager;
- // }
- // 过滤自己
- if (!this.include_self) {
- const currUserId = this.$store.getters.user_info.id;
- for (let i = 0; i < list.length; i++) {
- if (list[i].id == currUserId) {
- list.splice(i, 1);
- i--
- }
- }
- }
- // 过滤创始人
- if (this.is_filtration_creator) {
- for (let i = 0; i < list.length; i++) {
- if (list[i].is_creator == 1) {
- list.splice(i,1);
- i--
- }
- }
- }
- //过滤指定人员[]
- if (this.employee_not_select.length > 0) {
- for (let i = 0; i < list.length; i++) {
- if (this.employee_not_select.indexOf(list[i].id) >= 0) {
- list.splice(i, 1);
- i--
- }
- }
- }
- // var eSList = this.employee_selected_list;
- // this.employee_selected_list = eSList.filter(x => list.some(y => y.id === x.id));
- return list;
- }
- },
- created() {}
- };
- </script>
- <style scoped lang="scss">
- .showCheckbox .isCheckbox{
- height: 7px;
- width: 7px;
- background-color: #26A2FF;
- display: inline-block;
- border-radius: 2px;
- line-height: 14px;
- position: relative;
- top: -3px;
- }
- .showCheckbox{
- border: 1px solid #26A2FF !important;
- }
- .checkbox{
- height: 14px;
- width: 14px;
- border: 1px solid #dcdfe6;
- background: #fff;
- border-radius: 2px;
- position: relative;
- box-sizing: border-box;
- text-align: center;
- }
- .deptList {
- padding: 12px 0;
- border-bottom: 1px solid #f1f1f1;
- cursor: pointer;
- }
- .employee_selector_box {
- width: 600px;
- padding: 20px;
- box-sizing: border-box;
- margin: 0 auto;
- }
- /* 搜索框 */
- .employee_selector_box .search {
- margin: 0 auto;
- width: 80%;
- min-height: 36px;
- }
- .employee_selector_box .search-box button {
- display: inline-block;
- vertical-align: middle;
- margin-left: 10px;
- width: auto;
- padding: 0;
- background: none;
- border-radius: 0px;
- border: none;
- }
- /* /搜索框 */
- /* 左边框 */
- .employee_selector_box .choose_left {
- padding: 8px 10px 8px 10px;
- }
- .employee_selector_box .choose_left .employee_cell {
- border-bottom: 1px #f1f1f1 solid;
- }
- .employee_selector_box .choose_left .employee_cell_a .employee_cell {
- border-bottom: none;
- }
- .employee_selector_box .choose_left .employee_checkbox {
- padding-left: 8px;
- }
- .employee_selector_box .choose_left .employee_img_url {
- padding-left: 8px;
- }
- .employee_selector_box .choose_left .employee_name {
- padding-left: 8px;
- }
- .employee_selector_box ::v-deep .el-scrollbar__thumb {
- width: 2px;
- margin: 15px 0 0 6px;
- background: #409eff;
- }
- /* 左边框 */
- /* 右边距 */
- .employee_selector_box .option-box {
- padding: 14px 0;
- }
- .employee_selector_box .option-box button {
- margin-right: 16px;
- }
- .employee_selector_box .choose_right {
- padding: 8px 10px;
- }
- .employee_selector_box .choose_right .employee_delete .el-button {
- transform: scale(0.5);
- background: #c0c4cc;
- }
- .employee_selector_box .choose_right .employee_delete .el-button /deep/ .el-icon-close {
- color: #fff;
- }
- .employee_selector_box .choose_right .employee_delete .el-button:active {
- background: #409eff;
- }
- .employee_selector_box .choose_right .employee_delete .el-button:active /deep/ .el-icon-close {
- color: #fff;
- }
- .employee_selector_box .choose_right .employee_cell .employee_name {
- padding-left: 8px;
- }
- .employee_selector_box .choose_right .employee_cell .employee_img_url {
- padding-left: 8px;
- }
- /* 右边距 */
- .employee_selector_box /deep/ .employee_cell {
- padding: 8px 0;
- border-bottom: 1px #f1f1f1 solid;
- }
- .employee_selector_box /deep/ .employee_cell:hover {
- background: #ecf5ff;
- }
- .employee_cell {
- display: -webkit-inline-box;
- cursor: pointer;
- width: 100%;
- color: #606266;
- padding: 8px 0;
- background-color: transparent;
- }
- .employee_cell .employee_cell_clear {
- clear: both;
- }
- .employee_cell .employee_img_url {
- display: table-cell;
- vertical-align: middle;
- width: 30px;
- padding-left: 0px;
- }
- .employee_cell .employee_img_url img {
- width: 24px;
- height: 24px;
- border-radius: 50%;
- }
- .employee_cell .employee_checkbox {
- display: table-cell;
- vertical-align: middle;
- width: 30px;
- text-align: center;
- }
- .employee_cell .employee_name {
- display: table-cell;
- vertical-align: middle;
- color: #606266;
- }
- .employee_delete {
- display: table-cell;
- text-align: right;
- padding-right: 0px;
- }
- .employee_cell_a {
- display: block;
- }
- .employee_cell_a:hover {
- background-color: #ecf5ff;
- border-radius: 4px;
- }
- .dept_child_cell {
- display: table-cell;
- vertical-align: middle;
- }
- .dept_child_cell span {
- float: right;
- padding-right: 8px;
- }
- .dept_child_cell span:hover {
- color: #1c1c1c;
- }
- .dept_child_cell span:active {
- color: #1c1c1c;
- }
- .scroller-box {
- height: 440px;
- padding-right: 0px !important;
- background-color: #fdfdfd;
- border: 1px solid #eee;
- border-radius: 4px;
- overflow: hidden;
- }
- /* .scroller-box.one{
- height: 440px;
- } */
- .col-line {
- position: relative;
- height: 400px;
- }
- .col-line:before {
- content: ' ';
- width: 1px;
- height: 400px;
- position: absolute;
- top: 0;
- bottom: 0;
- left: 50%;
- background-color: #eee;
- }
- .search-box {
- background-color: #fff;
- padding: 14px 5px;
- border-bottom: 1px solid #eee;
- margin: 0 -5px;
- }
- .option-box {
- padding: 5px;
- background-color: #fff;
- border-bottom: 1px solid #eee;
- margin: 0 -5px;
- text-align: right;
- }
- .child_btn {
- color: #409eff;
- }
- .dept_path {
- padding: 10px 0;
- border-bottom: 1px solid #f1f1f1;
- min-height: 37px;
- }
- .scrollbarHeight1 {
- height: 310px;
- }
- .scrollbarHeight2 {
- height: 350px;
- }
- /deep/ .dept_icon{
- .el-input__validateIcon{
- display: none;
- }
- }
- /deep/ .el-cascader__dropdown{
- // position: fixed;
- // top: 190px;
- // left: 364px;
- z-index: 10001;
- }
- </style>
|