|
@@ -288,7 +288,19 @@ typedef enum {
|
|
|
NSArray *kpiArr = [json objectForKey:@"KPI"];
|
|
NSArray *kpiArr = [json objectForKey:@"KPI"];
|
|
|
|
|
|
|
|
[self.KPIArray addObject:[[kpiArr firstObject] mutableCopy]];
|
|
[self.KPIArray addObject:[[kpiArr firstObject] mutableCopy]];
|
|
|
- [self.KPIArray addObjectsFromArray:kpiArr];
|
|
|
|
|
|
|
+ for (int i = 0; i < kpiArr.count; i++) {
|
|
|
|
|
+ NSMutableDictionary *kpiModel = [[kpiArr objectAtIndex:i] mutableCopy];
|
|
|
|
|
+ NSMutableArray *itemMutArr = [NSMutableArray array];
|
|
|
|
|
+ NSArray *itemArr = [kpiModel objectForKey:@"arr_val"];
|
|
|
|
|
+ for (int j = 0; j < itemArr.count; j++) {
|
|
|
|
|
+ NSMutableDictionary *item = [[itemArr objectAtIndex:j] mutableCopy];
|
|
|
|
|
+ [itemMutArr addObject:item];
|
|
|
|
|
+ }
|
|
|
|
|
+ [kpiModel setObject:itemMutArr forKey:@"arr_val"];
|
|
|
|
|
+
|
|
|
|
|
+// [self.KPIArray addObjectsFromArray:kpiArr];
|
|
|
|
|
+ [self.KPIArray addObject:kpiModel];
|
|
|
|
|
+ }
|
|
|
[self.KPIArray addObject:[[kpiArr lastObject] mutableCopy]];
|
|
[self.KPIArray addObject:[[kpiArr lastObject] mutableCopy]];
|
|
|
|
|
|
|
|
|
|
|
|
@@ -529,7 +541,7 @@ typedef enum {
|
|
|
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
|
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
|
|
|
|
|
|
|
KPICell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"KPICell" forIndexPath:indexPath];
|
|
KPICell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"KPICell" forIndexPath:indexPath];
|
|
|
- NSMutableDictionary *item = [[self.KPIArray objectAtIndex:indexPath.item] mutableCopy];
|
|
|
|
|
|
|
+ NSMutableDictionary *item = [self.KPIArray objectAtIndex:indexPath.item];
|
|
|
[item setObject:self.monthArray forKey:@"month"];
|
|
[item setObject:self.monthArray forKey:@"month"];
|
|
|
[cell setInfoDic:item];
|
|
[cell setInfoDic:item];
|
|
|
cell.delegate = self;
|
|
cell.delegate = self;
|