| | |
| | | </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" |
| | |
| | | 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, |
| | |
| | | }) |
| | | .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 |