//
//  SetCompanyDepartmentViewController.swift
//  MobilePortal
//
//  Created by xiejiangbo on 2019/4/1.
//  Copyright © 2019 yin chen. All rights reserved.
//

import UIKit

class SetCompanyDepartmentViewController: BaseViewController {

    lazy var myTableView: UITableView = {
        let myTableView = UITableView.init()
        if #available(iOS 11.0, *) {
            myTableView.contentInsetAdjustmentBehavior = .never
            myTableView.scrollIndicatorInsets = myTableView.contentInset
            myTableView.contentInset = UIEdgeInsetsMake(UIApplication.shared.statusBarFrame.size.height+44, 0, (self.navigationController?.navigationBar.height)!, 0)
        }else{
            myTableView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0)
        }
        registerCell(myTableView, cell: SetCompanyDepartmentTableViewCell.self)
        myTableView.backgroundColor = grayBgColor
        setExtraCellLineHidden(tableView: myTableView)
        return myTableView
    }()
    var companyDepartmentBlock:passParameterBlock!
    var dataSource:NSMutableArray!
    var delegate:SetCompanyDepartmentViewControllerDelegate!
    class func createViewController(createArgs:AnyObject?) ->AnyObject{
        let storyboard:UIStoryboard=UIStoryboard(name: "SetCompanyDepartmentViewController", bundle: nil)
        let vc:SetCompanyDepartmentViewController=storyboard.instantiateViewController(withIdentifier: "SetCompanyDepartmentViewController") as! SetCompanyDepartmentViewController
        vc.createArgs=createArgs
        return vc
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.initTitleBar()
        addInitTableView()
        getData()
        self.title = "部门选择"
        self.view.backgroundColor = viewBgColor
        
    }
    override func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
        
    }
    override func viewDidDisappear(_ animated: Bool) {
        super.viewWillAppear(animated)
        
    }
    override func arrowResponse() {
        self.navigationController?.popViewController(animated: true)
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    

}
