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

判断组织是否是子节点

parent fcd0f7e7
...@@ -58,7 +58,7 @@ static NSString * const ACETapBarItemNames[] = { ...@@ -58,7 +58,7 @@ static NSString * const ACETapBarItemNames[] = {
- (void)openMainFrame; - (void)openMainFrame;
- (void)createHomeViewController; - (void)createHomeViewController;
- (void)createStoreViewController; - (void)createReportViewController;
- (void)createSyncViewController; - (void)createSyncViewController;
- (void)createSystemViewController; - (void)createSystemViewController;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#import "ReportViewController.h" #import "ReportViewController.h"
#import "ICRSyncViewController.h" #import "ICRSyncViewController.h"
#import "ICRSystemViewController.h" #import "ICRSystemViewController.h"
#import "ReportDetailViewController.h"
@interface ICRAppViewControllerManager () @interface ICRAppViewControllerManager ()
< <
UITabBarControllerDelegate UITabBarControllerDelegate
...@@ -180,16 +180,35 @@ ...@@ -180,16 +180,35 @@
} }
- (void)createReportViewController { - (void)createReportViewController {
NSString *nsTitle = ACETapBarItemNames[ kCRReport ]; //如果登陆的是子节点
ICRUserUtil *user = [ICRUserUtil sharedInstance];
ReportViewController *storeVCtrl = [[ReportViewController alloc] init]; if (user.belongOrgIsLeaf) {
[m_arrTabBarBaseViewController addObject:storeVCtrl]; Compass *com = [[Compass alloc]init];
storeVCtrl.title = [IBTCommon localizableString:nsTitle]; com.orgCode = user.org_code;
com.orgName = user.org_name;
IBTUINavigationController *navCtrl = [[IBTUINavigationController alloc] initWithRootViewController:storeVCtrl]; com.orgUuid = user.org_uuid;
[m_arrViewController addObject:navCtrl]; ReportDetailViewController *storeVCtrl = [[ReportDetailViewController alloc] init];
storeVCtrl.compass = com;
navCtrl.title = nsTitle; [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 { - (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