| | |
| | | </section> |
| | | </el-form> |
| | | <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;">企业组织架构</div> |
| | | <div |
| | | style="width: 100%; height: 50px; background: rgba(242, 242, 242, 1); line-height: 50px; text-align: center; font-size: 14px;"> |
| | | 企业组织架构</div> |
| | | <div style="width: 100%; height: calc(100vh - 170px); overflow-y: scroll;"> |
| | | <Tree :list="companyTree" :defaultProps="{name: 'name', status: 'fsStatus', children: 'childList', id: 'id'}" @callback="callback" /> |
| | | <Tree :list="companyTree" :defaultProps="{ name: 'name', status: 'fsStatus', children: 'childList', id: 'id' }" |
| | | @callback="callback" /> |
| | | </div> |
| | | </template> |
| | | <!-- 表格和分页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:member:delete','business:member:create,business:empower:create','business:traintime:create']"> |
| | | <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" @click="$refs.OperaMemberWindow.open('新建员工',null,department,searchForm.companyType)" 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> |
| | | <li><el-button type="primary" @click="$refs.OperaTrainTimeImportWindow.open('培训期导入',department,searchForm.companyType)" icon="el-icon-plus" v-permissions="['business:traintime: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()" icon="el-icon-plus">下发授权</el-button></li> |
| | | <li><el-button type="primary" |
| | | @click="$refs.OperaMemberWindow.open('新建员工', null, department, searchForm.companyType)" 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> |
| | | <li><el-button type="primary" |
| | | @click="$refs.OperaTrainTimeImportWindow.open('培训期导入', department, searchForm.companyType)" |
| | | icon="el-icon-plus" v-permissions="['business:traintime: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()" |
| | | icon="el-icon-plus">下发授权</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table v-loading="isWorking.search" :data="tableData.list" stripe @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="name" label="姓名" min-width="100px"></el-table-column> |
| | | <el-table-column prop="name" label="姓名" min-width="110px"> |
| | | <template slot-scope="{row}"> |
| | | <span>{{ row.name }}</span> |
| | | <span class="zhuguan" v-if="row.headStatus == 1">主管</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="phone" label="手机号" min-width="100px"></el-table-column> |
| | | <el-table-column prop="idcardDecode" label="身份证号" min-width="100px"></el-table-column> |
| | | <el-table-column label="性别" min-width="100px"> |
| | |
| | | </el-table-column> |
| | | <el-table-column label="在职状态"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch |
| | | @change="changeWorkStatus($event, row)" |
| | | v-model="row.workStatus" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949" |
| | | :active-value="0" |
| | | :inactive-value="1"> |
| | | <el-switch @change="changeWorkStatus($event, row)" v-model="row.workStatus" active-color="#13ce66" |
| | | inactive-color="#ff4949" :active-value="0" :inactive-value="1"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="是否可拜访"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch |
| | | @change="changeCanvisit($event, row)" |
| | | v-model="row.canVisit" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949" |
| | | :active-value="1" |
| | | :inactive-value="0"> |
| | | <el-switch @change="changeCanvisit($event, row)" v-model="row.canVisit" active-color="#13ce66" |
| | | inactive-color="#ff4949" :active-value="1" :inactive-value="0"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-table-column prop="code" label="工号" min-width="100px"></el-table-column> |
| | | <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> |
| | | <el-button @click="$refs.cardOpeningRecord.open('开卡记录', row.id)" type="text">{{ row.memberCardCount || |
| | | '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 fixed="right" label="人脸信息" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-image |
| | | v-if="row.faceImgFull" |
| | | style="width: 60px; height: 60px" |
| | | :src="row.faceImgFull" |
| | | <el-image v-if="row.faceImgFull" style="width: 60px; height: 60px" :src="row.faceImgFull" |
| | | :preview-src-list="[row.faceImgFull]"> |
| | | </el-image> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:member:update', 'business:member:delete','business:empower:create'])" |
| | | label="操作" |
| | | min-width="280" |
| | | fixed="right" |
| | | > |
| | | label="操作" min-width="280" fixed="right"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" icon="el-icon-edit" @click="$refs.OperaMemberWindow.open('编辑员工信息',row,department)" 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> |
| | | <el-button type="text" :loading="heading" style="color: red" icon="el-icon-delete" @click="updateHead(row,0)" v-if="row.headStatus ==1 " v-permissions="['business:member:head']">取消主管</el-button> |
| | | <el-button type="text" :loading="heading" icon="el-icon-edit" @click="updateHead(row,1)" v-if="row.headStatus == 0" v-permissions="['business:member:head']">设为主管</el-button> |
| | | <el-button type="text" icon="el-icon-delete" style="color: red" @click="empower(row.id)" v-permissions="['business:empower:delete']">删除</el-button> |
| | | <el-button type="text" icon="el-icon-edit" @click="$refs.OperaMemberWindow.open('编辑员工信息', row, department)" |
| | | 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> |
| | | <el-button type="text" :loading="heading" style="color: red" icon="el-icon-delete" |
| | | @click="updateHead(row, 0)" v-if="row.headStatus == 1" |
| | | v-permissions="['business:member:head']">取消主管</el-button> |
| | | <el-button type="text" :loading="heading" icon="el-icon-edit" @click="updateHead(row, 1)" |
| | | v-if="row.headStatus == 0" v-permissions="['business:member:head']">设为主管</el-button> |
| | | <el-button type="text" icon="el-icon-delete" style="color: red" @click="empower(row.id)" |
| | | v-permissions="['business:empower:delete']">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination"> |
| | | </pagination> |
| | | <!-- 查看人员开卡记录 --> |
| | | <cardOpeningRecord ref="cardOpeningRecord" @success="handlePageChange" /> |
| | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import '@/assets/style/variables.scss'; |
| | | .box { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .box_menu { |
| | | width: 100px; |
| | | height: 100%; |
| | | flex-shrink: 0; |
| | | } |
| | | |
| | | .box_tab { |
| | | flex: 1; |
| | | height: 100%; |
| | | } |
| | | } |
| | | .zhuguan { |
| | | color: $primary-color; |
| | | border: 1px solid $primary-color; |
| | | padding: 0px 3px; |
| | | border-radius: 4px; |
| | | margin-left: 6px; |
| | | } |
| | | </style> |