Commit 67ec38fb authored by 陈俊俊's avatar 陈俊俊

判断组织是否是子节点

parent fcd0f7e7
......@@ -58,7 +58,7 @@ static NSString * const ACETapBarItemNames[] = {
- (void)openMainFrame;
- (void)createHomeViewController;
- (void)createStoreViewController;
- (void)createReportViewController;
- (void)createSyncViewController;
- (void)createSystemViewController;
......
......@@ -16,7 +16,7 @@
#import "ReportViewController.h"
#import "ICRSyncViewController.h"
#import "ICRSystemViewController.h"
#import "ReportDetailViewController.h"
@interface ICRAppViewControllerManager ()
<
UITabBarControllerDelegate
......@@ -180,16 +180,35 @@
}
- (void)createReportViewController {
NSString *nsTitle = ACETapBarItemNames[ kCRReport ];
ReportViewController *storeVCtrl = [[ReportViewController alloc] init];
[m_arrTabBarBaseViewController addObject:storeVCtrl];
storeVCtrl.title = [IBTCommon localizableString:nsTitle];
IBTUINavigationController *navCtrl = [[IBTUINavigationController alloc] initWithRootViewController:storeVCtrl];
[m_arrViewController addObject:navCtrl];
navCtrl.title = nsTitle;
//如果登陆的是子节点
ICRUserUtil *user = [ICRUserUtil sharedInstance];
if (user.belongOrgIsLeaf) {
Compass *com = [[Compass alloc]init];
com.orgCode = user.org_code;
com.orgName = user.org_name;
com.orgUuid = user.org_uuid;
ReportDetailViewController *storeVCtrl = [[ReportDetailViewController alloc] init];
storeVCtrl.compass = com;
[m_arrTabBarBaseViewController addObject:storeVCtrl];
storeVCtrl.title = com.orgName;
NSString *nsTitle = ACETapBarItemNames[ kCRReport ];
IBTUINavigationController *navCtrl = [[IBTUINavigationController alloc] initWithRootViewController:storeVCtrl];
[m_arrViewController addObject:navCtrl];
navCtrl.title = nsTitle;
}else{
NSString *nsTitle = ACETapBarItemNames[ kCRReport ];
ReportViewController *storeVCtrl = [[ReportViewController alloc] init];
[m_arrTabBarBaseViewController addObject:storeVCtrl];
storeVCtrl.title = [IBTCommon localizableString:nsTitle];
IBTUINavigationController *navCtrl = [[IBTUINavigationController alloc] initWithRootViewController:storeVCtrl];
[m_arrViewController addObject:navCtrl];
navCtrl.title = nsTitle;
}
}
- (void)createSyncViewController {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment