| | |
| | | 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 - 130px); overflow-y: scroll;"> |
| | | <Tree :list="companyTree" :alllist="companyTree" :defaultProps="{ name: 'name', status: 'fsStatus', children: 'childList', id: 'id' }" |
| | | <Tree :list="companyTree" :alllist="companyTree" |
| | | :defaultProps="{ name: 'name', status: 'fsStatus', children: 'childList', id: 'id' }" |
| | | @callback="callback" /> |
| | | </div> |
| | | </template> |
| | |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout1 from '@/layouts/TableLayout1' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import Tree from '@/components/common/Tree' |
| | | import Tree from '@/components/common/TreeNew' |
| | | import OperaMemberWindow from '@/components/business/OperaMemberWindow' |
| | | import { treeList } from '@/api/business/company' |
| | | import { allList,treeList } from '@/api/business/company' |
| | | import { memberSync} from '@/api/business/member' |
| | | export default { |
| | | name: 'internalMember', |
| | |
| | | data() { |
| | | return { |
| | | TreeList: [], |
| | | defaultExpanedKeys:null, |
| | | // 搜索 |
| | | searchForm: { |
| | | name: '' , |
| | |
| | | loading: false, |
| | | heading: false, |
| | | working: false, |
| | | dataList: [], |
| | | companyTree: [], |
| | | department: [] |
| | | } |
| | |
| | | methods: { |
| | | // 获取组织树 |
| | | getfindCompanyTreePage() { |
| | | treeList({}) |
| | | allList({}) |
| | | .then(res => { |
| | | console.log(res) |
| | | if (res && res.length > 0) { |
| | | res[0].fsStatus = 1 |
| | | this.getCompanyList(res[0]) |
| | | this.companyTree = res |
| | | this.search() |
| | | this.department = this.getDepartmentTree(res) |
| | | // this.department = this.getDepartmentTree(res) |
| | | } |
| | | }) |
| | | }, |
| | | getCompanyList(row){ |
| | | allList({parentId:row.id}) |
| | | .then(res => { |
| | | console.log(res) |
| | | if (res && res.length > 0) { |
| | | row.childList = res |
| | | } |
| | | }) |
| | | }, |
| | |
| | | this.loading = true |
| | | memberSync({}) |
| | | .then(res => { |
| | | this.$tip.apiSuccess(res || '同步成功') |
| | | this.$tip.apiSuccess( '同步成功') |
| | | this.search() |
| | | }) |
| | | .catch(e => { |
| | |
| | | this.searchForm.erpOrgId = row.erpId |
| | | this.searchForm.companyId = row.id |
| | | this.search() |
| | | if(row.hasChildren && (row.childList == null || row.childList.length == 0)){ |
| | | this.getCompanyList(row) |
| | | } |
| | | } |
| | | } |
| | | } |