|  |  | 
 |  |  | <script> | 
 |  |  |     import BasePage from '@/components/base/BasePage' | 
 |  |  |     import GlobalWindow from '@/components/common/GlobalWindow' | 
 |  |  |     import { pageAll } from '@/api/business/company' | 
 |  |  |     import { allForFp } from '@/api/business/company' | 
 |  |  |     import { create } from '@/api/business/companyPermission' | 
 |  |  |     export default { | 
 |  |  |         name: 'allocationEnterprises', | 
 |  |  | 
 |  |  |                 this.visible = true | 
 |  |  |                 this.title = title | 
 |  |  |                 this.user = target | 
 |  |  |                 pageAll({ userId: target.id }) | 
 |  |  |               allForFp({ userId: target.id }) | 
 |  |  |                     .then(res => { | 
 |  |  |                         this.company = res.map(r => { | 
 |  |  |                             return { | 
 |  |  | 
 |  |  |                     companyIdList: this.selectedIds | 
 |  |  |                 }) | 
 |  |  |                     .then(() => { | 
 |  |  |                         this.$tip.apiSuccess('角色配置成功,用户重新登录后生效') | 
 |  |  |                         this.$tip.apiSuccess('企业分配成功,用户重新登录后生效') | 
 |  |  |                         this.visible = false | 
 |  |  |                         this.$emit('success') | 
 |  |  |                     }) |