|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <TableLayout1 :permissions="['business:member:query']"> | 
|---|
|  |  |  | <!-- 搜索表单 --> | 
|---|
|  |  |  | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> | 
|---|
|  |  |  | <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-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="hasFace"> | 
|---|
|  |  |  | <el-select v-model="searchForm.hasFace" @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"> | 
|---|
|  |  |  | <el-select v-model="searchForm.canVisit" clearable @keypress.enter.native="search" placeholder="可拜访"> | 
|---|
|  |  |  | <el-option label="是" value="1"></el-option> | 
|---|
|  |  |  | <el-option label="否" value="0"></el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="workStatus"> | 
|---|
|  |  |  | <el-select v-model="searchForm.workStatus" @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="hkStatus"> | 
|---|
|  |  |  | <el-select v-model="searchForm.hkStatus" @keypress.enter.native="search" clearable placeholder="海康同步状态"> | 
|---|
|  |  |  | <el-option label="待同步" value="0"></el-option> | 
|---|
|  |  |  | <el-option label="同步成功" value="1"></el-option> | 
|---|
|  |  |  | <el-option label="同步失败" value="2"></el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <section> | 
|---|
|  |  |  | <el-button type="primary" @click="search">搜索</el-button> | 
|---|
|  |  |  | <el-button @click="reset">重置</el-button> | 
|---|
|  |  |  | </section> | 
|---|
|  |  |  | </el-form> | 
|---|
|  |  |  | <div ref="QueryFormRef" slot="search-form"> | 
|---|
|  |  |  | <el-form ref="searchForm" :model="searchForm" label-width="100px" inline> | 
|---|
|  |  |  | <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-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="hasFace"> | 
|---|
|  |  |  | <el-select v-model="searchForm.hasFace" @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"> | 
|---|
|  |  |  | <el-select v-model="searchForm.canVisit" clearable @keypress.enter.native="search" placeholder="可拜访"> | 
|---|
|  |  |  | <el-option label="是" value="1"></el-option> | 
|---|
|  |  |  | <el-option label="否" value="0"></el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="workStatus"> | 
|---|
|  |  |  | <el-select v-model="searchForm.workStatus" @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="hkStatus"> | 
|---|
|  |  |  | <el-select v-model="searchForm.hkStatus" @keypress.enter.native="search" clearable placeholder="海康同步状态"> | 
|---|
|  |  |  | <el-option label="待同步" value="0"></el-option> | 
|---|
|  |  |  | <el-option label="同步成功" value="1"></el-option> | 
|---|
|  |  |  | <el-option label="同步失败" value="2"></el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <section> | 
|---|
|  |  |  | <el-button type="primary" @click="search">搜索</el-button> | 
|---|
|  |  |  | <el-button @click="reset">重置</el-button> | 
|---|
|  |  |  | </section> | 
|---|
|  |  |  | </el-form> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <template v-slot:menu> | 
|---|
|  |  |  | <div | 
|---|
|  |  |  | style="width: 100%; height: 50px; background: rgba(242, 242, 242, 1); line-height: 50px; text-align: center; font-size: 14px;"> | 
|---|
|  |  |  | 
|---|
|  |  |  | icon="el-icon-plus" v-permissions="['business:member:create']">人员导入</el-button></li> | 
|---|
|  |  |  | <li><el-button type="danger" @click="deleteByIdInBatch" icon="el-icon-delete" | 
|---|
|  |  |  | v-permissions="['business:member:delete']">批量删除</el-button></li> | 
|---|
|  |  |  | <li><el-button type="primary" v-permissions="['business:empower:create']" @click="startEmpowerBatch()" | 
|---|
|  |  |  | >下发授权</el-button></li> | 
|---|
|  |  |  | <li><el-button type="primary" v-permissions="['business:empower:create']" | 
|---|
|  |  |  | @click="startEmpowerBatch()">下发授权</el-button></li> | 
|---|
|  |  |  | <li style="float: right"> | 
|---|
|  |  |  | <el-checkbox style="font-size: 12px" label="1" v-model="searchForm.includeChild" key="1" | 
|---|
|  |  |  | @change="search">是否包含下级组织</el-checkbox> | 
|---|
|  |  |  | </li> | 
|---|
|  |  |  | </ul> | 
|---|
|  |  |  | <el-table v-loading="isWorking.search" :data="tableData.list" stripe @selection-change="handleSelectionChange"> | 
|---|
|  |  |  | <el-table :max-height="tableHeight" v-loading="isWorking.search" :data="tableData.list" stripe @selection-change="handleSelectionChange"> | 
|---|
|  |  |  | <el-table-column type="selection" width="55"></el-table-column> | 
|---|
|  |  |  | <el-table-column  fixed="left"  prop="name" label="姓名" min-width="80px"> | 
|---|
|  |  |  | <el-table-column fixed="left" prop="name" label="姓名" min-width="80px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <span>{{ row.name }}</span> | 
|---|
|  |  |  | <span class="zhuguan" v-if="row.headStatus == 1">主管</span> | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-table-column label="人脸信息" min-width="100px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <el-image v-if="row.faceImgFull" style="width: 60px; height: 60px" :src="row.faceImgFull" | 
|---|
|  |  |  | :preview-src-list="[row.faceImgFull]"> | 
|---|
|  |  |  | :preview-src-list="[row.faceImgFull]"> | 
|---|
|  |  |  | </el-image> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="companyName" label="所属部门" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="positionName" label="岗位" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <!--        <el-table-column prop="isDangyuan" label="是否党员" min-width="100px"> | 
|---|
|  |  |  | <!--        <el-table-column prop="isDangyuan" label="是否党员" min-width="100px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <span v-if="row.isDangyuan ==1" style="color: green">党员</span> | 
|---|
|  |  |  | <span v-if="row.isDangyuan ==0">非党员</span> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column>--> | 
|---|
|  |  |  | <el-table-column prop="jobDate" label="入职日期" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <!--        <el-table-column prop="status" label="状态" min-width="100px"> | 
|---|
|  |  |  | <!--        <el-table-column prop="status" label="状态" min-width="100px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <span v-if="row.status == 0" style="color: green">正常</span> | 
|---|
|  |  |  | <span v-if="row.status == 1" style="color: red">禁用</span> | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-table-column label="卡片" min-width="80px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <el-button @click="$refs.cardOpeningRecord.open('开卡记录', row.id)" type="text">{{ row.memberCardCount || | 
|---|
|  |  |  | '0'}}</el-button> | 
|---|
|  |  |  | '0' }}</el-button> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column>--> | 
|---|
|  |  |  | <el-table-column prop="editorName" label="操作人" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="editDate" label="最后操作时间" min-width="150px"></el-table-column> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | v-if="containPermissions(['business:member:update', 'business:member:delete', 'business:empower:create'])" | 
|---|
|  |  |  | label="操作" min-width="280"  > | 
|---|
|  |  |  | label="操作" min-width="280"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <el-button type="text" icon="el-icon-edit" @click="$refs.OperaMemberWindow.open('编辑员工信息', row, department,searchForm.companyType)" | 
|---|
|  |  |  | v-permissions="['business:empower:update']">编辑</el-button> | 
|---|
|  |  |  | 
|---|
|  |  |  | name: 'internalMember', | 
|---|
|  |  |  | extends: BaseTable, | 
|---|
|  |  |  | components: { TableLayout1, Pagination, Tree, cardOpeningRecord, OperaMemberWindow, OperaMemberRoleWindow, OperaMemberImportWindow }, | 
|---|
|  |  |  | data () { | 
|---|
|  |  |  | data() { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | TreeList: [], | 
|---|
|  |  |  | // 搜索 | 
|---|
|  |  |  | 
|---|
|  |  |  | department: [] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | created () { | 
|---|
|  |  |  | created() { | 
|---|
|  |  |  | this.config({ | 
|---|
|  |  |  | module: '人员信息表', | 
|---|
|  |  |  | api: '/business/member', | 
|---|
|  |  |  | 
|---|
|  |  |  | this.getfindCompanyTreePage() | 
|---|
|  |  |  | this.getPositionList() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | mounted() { | 
|---|
|  |  |  | this.$nextTick(() => { | 
|---|
|  |  |  | this.tableHeight = document.body.scrollHeight - this.$refs.QueryFormRef.offsetHeight - 276 | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | startEmpowerBatch () { | 
|---|
|  |  |  | startEmpowerBatch() { | 
|---|
|  |  |  | if (this.tableData.selectedRows.length === 0) { | 
|---|
|  |  |  | this.$tip.warning('请至少选择一条数据') | 
|---|
|  |  |  | return | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | this.$refs.OperaMemberRoleWindow.open('内部员工下发权限', ids, names, this.searchForm.companyType) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | getPositionList () { | 
|---|
|  |  |  | getPositionList() { | 
|---|
|  |  |  | allList({}) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | this.positionList = res | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | empower (id) { | 
|---|
|  |  |  | empower(id) { | 
|---|
|  |  |  | var that = this | 
|---|
|  |  |  | this.$confirm('确定重新授权吗?', '提示', { | 
|---|
|  |  |  | confirmButtonText: '确定', | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 获取组织树 | 
|---|
|  |  |  | getfindCompanyTreePage () { | 
|---|
|  |  |  | getfindCompanyTreePage() { | 
|---|
|  |  |  | fetchList() | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | if (res && res.length > 0) { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | getDepartmentTree (tree) { | 
|---|
|  |  |  | getDepartmentTree(tree) { | 
|---|
|  |  |  | if (tree == null) { | 
|---|
|  |  |  | return [] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 同步信息 | 
|---|
|  |  |  | async synchronous () { | 
|---|
|  |  |  | async synchronous() { | 
|---|
|  |  |  | this.$dialog.actionConfirm('该操作降触发全员信息更新和重新下发!请谨慎操作', '您确认全量同步内部人员信息吗?') | 
|---|
|  |  |  | .then(() => { | 
|---|
|  |  |  | this.loading = true | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch(() => { }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | async updateHead (row, type) { | 
|---|
|  |  |  | async updateHead(row, type) { | 
|---|
|  |  |  | this.$dialog.actionConfirm('您确认进行当前操作吗?', '部门主管设置操作提示') | 
|---|
|  |  |  | .then(() => { | 
|---|
|  |  |  | this.heading = true | 
|---|
|  |  |  | 
|---|
|  |  |  | .catch(() => { }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | changeWorkStatus (e, row) { | 
|---|
|  |  |  | changeWorkStatus(e, row) { | 
|---|
|  |  |  | this.working = true | 
|---|
|  |  |  | updateWorkStatus({ id: row.id, workStatus: e }) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch(() => { }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | changeCanvisit (e, row) { | 
|---|
|  |  |  | changeCanvisit(e, row) { | 
|---|
|  |  |  | this.canvisiting = true | 
|---|
|  |  |  | updateCanVisit({ id: row.id, canVisit: e }) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch(() => { }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | callback (row) { | 
|---|
|  |  |  | callback(row) { | 
|---|
|  |  |  | console.log(row) | 
|---|
|  |  |  | this.searchForm.erpOrgId = row.erpId | 
|---|
|  |  |  | this.searchForm.companyId = row.id | 
|---|