| | |
| | | <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: calc(100vh - 170px); overflow-y: scroll;"> |
| | | <Tree :list="companyTree" :defaultProps="{name: 'name', status: 'status', children: 'childList', id: 'id',erpId:'erpId'}" @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:sync']"> |
| | | <ul class="toolbar" v-permissions="['business:member:delete','business:member:sync','business:member:syncdata']"> |
| | | <!-- <li><el-button type="primary">门禁授权</el-button></li>--> |
| | | <li><el-button type="primary" v-permissions="['business:member:sync']" :loading="loading" @click="synchronous()">同步</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:member:delete']">删除</el-button></li> |
| | | <li><el-button type="primary" v-permissions="['business:member:syncdata']" :loading="loading" @click="syncUserData()">立即下发待同步员工</el-button></li> |
| | | <li><el-button type="primary" v-permissions="['business:member:sync']" :loading="loading" @click="synchronous()">同步</el-button></li> |
| | | <!-- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:member:delete']">删除</el-button></li>--> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:member:update', 'business:member:delete'])" |
| | | v-if="containPermissions(['business:member:update', 'business:member:delete','business:empower:create'])" |
| | | label="操作" |
| | | min-width="120" |
| | | fixed="right" |
| | |
| | | import cardOpeningRecord from '@/components/business/cardOpeningRecord' |
| | | import Tree from '@/components/common/Tree' |
| | | import { fetchList } from '@/api/business/company' |
| | | import { memberSync, roleAuth } from '@/api/business/member' |
| | | import { memberSync, roleAuth, syncUserData } from '@/api/business/member' |
| | | export default { |
| | | name: 'internalMember', |
| | | extends: BaseTable, |
| | |
| | | getfindCompanyTreePage () { |
| | | fetchList(1) |
| | | .then(res => { |
| | | res[0].fsStatus = 1 |
| | | this.companyTree = res |
| | | // this.searchForm.erpOrgId = res[0].erpId |
| | | this.search() |
| | | if (res && res.length > 0) { |
| | | res[0].fsStatus = 1 |
| | | this.companyTree = res |
| | | // this.searchForm.erpOrgId = res[0].erpId |
| | | this.search() |
| | | } |
| | | }) |
| | | }, |
| | | // 同步信息 |
| | | async synchronous () { |
| | | this.$dialog.actionConfirm('操作确认提醒', '您确认同步全部信息吗?') |
| | | this.$dialog.actionConfirm('该操作降触发全员信息更新和重新下发!请谨慎操作', '您确认全量同步内部人员信息吗?') |
| | | .then(() => { |
| | | this.loading = true |
| | | memberSync({}) |
| | |
| | | }) |
| | | .catch(() => {}) |
| | | }, |
| | | async syncUserData () { |
| | | this.$dialog.actionConfirm('该操作将触发下发的人员信息更新和重新下发!请谨慎操作', '您确认立即下发全部待同步人员信息吗?') |
| | | .then(() => { |
| | | this.loading = true |
| | | syncUserData({}) |
| | | .then(res => { |
| | | this.$tip.apiSuccess(res || '同步成功') |
| | | this.search() |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | }, |
| | | callback (row) { |
| | | this.searchForm.erpOrgId = row.erpId |
| | | this.searchForm.companyId = row.id |