|  |  |  | 
|---|
|  |  |  | <el-form-item label="" prop="keyword"> | 
|---|
|  |  |  | <el-input v-model="searchForm.keyword" placeholder="请输入姓名/手机号/工号" @keypress.enter.native="search"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-form-item label="" prop="positionId"> | 
|---|
|  |  |  | <el-select v-model="searchForm.positionId" clearable filterable placeholder="岗位"> | 
|---|
|  |  |  | <el-option v-for="item in positionList" :key="item.id" :label="item.name" :value="item.id"> | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-select v-model="searchForm.hasFace" @keypress.enter.native="search" placeholder="是否有人脸"> | 
|---|
|  |  |  | <el-option label="无" value="0"></el-option> | 
|---|
|  |  |  | <el-option label="有" value="1"></el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="authStatus"> | 
|---|
|  |  |  | <el-select v-model="searchForm.authStatus" @keypress.enter.native="search" clearable placeholder="是否授权"> | 
|---|
|  |  |  | <el-option label="否" value="0"></el-option> | 
|---|
|  |  |  | <el-option label="是" value="1"></el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="canVisit"> | 
|---|
|  |  |  | 
|---|
|  |  |  | <ul class="toolbar" | 
|---|
|  |  |  | v-permissions="['business:member:delete', 'business:member:create,business:empower:create', 'business:traintime:create']"> | 
|---|
|  |  |  | <!-- | 
|---|
|  |  |  | <li><el-button type="primary" v-permissions="['business:member:sync']" :loading="loading" @click="synchronous()">同步</el-button></li> | 
|---|
|  |  |  | --> | 
|---|
|  |  |  | <li><el-button type="primary" v-permissions="['business:member:sync']" :loading="loading" @click="synchronous()">同步</el-button></li> | 
|---|
|  |  |  | --> | 
|---|
|  |  |  | <li><el-button type="primary" | 
|---|
|  |  |  | @click="$refs.OperaMemberWindow.open('新建员工', null, department, searchForm.companyType)" icon="el-icon-plus" | 
|---|
|  |  |  | @click="add" icon="el-icon-plus" | 
|---|
|  |  |  | v-permissions="['business:member:create']">新建员工</el-button></li> | 
|---|
|  |  |  | <li><el-button type="primary" @click="$refs.OperaMemberImportWindow.open('人员导入', searchForm.companyType)" | 
|---|
|  |  |  | icon="el-icon-plus" v-permissions="['business:member:create']">人员导入</el-button></li> | 
|---|
|  |  |  | 
|---|
|  |  |  | v-if="containPermissions(['business:member:update', 'business:member:delete', 'business:empower:create'])" | 
|---|
|  |  |  | label="操作" min-width="280"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <el-button type="text" icon="el-icon-edit" @click="$refs.OperaMemberWindow.open('编辑员工信息', row, department,searchForm.companyType)" | 
|---|
|  |  |  | <el-button type="text" icon="el-icon-edit" @click="edit(row)" | 
|---|
|  |  |  | v-permissions="['business:empower:update']">编辑</el-button> | 
|---|
|  |  |  | <el-button type="text" icon="el-icon-plus" @click="empower(row.id)" | 
|---|
|  |  |  | v-permissions="['business:empower:create']">重新授权</el-button> | 
|---|
|  |  |  | 
|---|
|  |  |  | this.getPositionList() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | mounted() { | 
|---|
|  |  |  | this.$nextTick(() => { | 
|---|
|  |  |  | /*   this.$nextTick(() => { | 
|---|
|  |  |  | this.tableHeight = document.body.scrollHeight - this.$refs.QueryFormRef.offsetHeight - 276 | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | })*/ | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | edit(row) { | 
|---|
|  |  |  | this.$refs.OperaMemberWindow.treeData = this.companyTree | 
|---|
|  |  |  | this.$refs.OperaMemberWindow.open('编辑员工信息', row, this.department, this.searchForm.companyType) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | add() { | 
|---|
|  |  |  | this.$refs.OperaMemberWindow.treeData = this.companyTree | 
|---|
|  |  |  | this.$refs.OperaMemberWindow.open('新建员工', null, this.department, this.searchForm.companyType) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | startEmpowerBatch() { | 
|---|
|  |  |  | if (this.tableData.selectedRows.length === 0) { | 
|---|
|  |  |  | this.$tip.warning('请至少选择一条数据') | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 获取组织树 | 
|---|
|  |  |  | getfindCompanyTreePage() { | 
|---|
|  |  |  | fetchList() | 
|---|
|  |  |  | fetchList(0) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | if (res && res.length > 0) { | 
|---|
|  |  |  | res[0].fsStatus = 1 | 
|---|