|
|
@@ -40,6 +40,12 @@ static const NSInteger detal = 20;
|
|
|
params = [NSDictionary dictionary];
|
|
|
}
|
|
|
self.params = params;
|
|
|
+
|
|
|
+ if ([params.allKeys containsObject:@"columns"]) {
|
|
|
+ self.dirty = NO;
|
|
|
+ } else {
|
|
|
+ self.dirty = YES;
|
|
|
+ }
|
|
|
}
|
|
|
return self;
|
|
|
}
|
|
|
@@ -124,11 +130,10 @@ static const NSInteger detal = 20;
|
|
|
|
|
|
- (void)loadData {
|
|
|
|
|
|
- NSString *module_name = [self.params objectForKey:@"module_name"];
|
|
|
- NSString *displayFields = [RANetwork getDisplayFieldsForFunction:module_name];
|
|
|
- if ([displayFields isEqualToString:self.displayFields]) {
|
|
|
- return;
|
|
|
- } else {
|
|
|
+ if (self.dirty) {
|
|
|
+ self.dirty = NO;
|
|
|
+ NSString *module_name = [self.params objectForKey:@"module_name"];
|
|
|
+ NSString *displayFields = [RANetwork getDisplayFieldsForFunction:module_name];
|
|
|
self.displayFields = displayFields;
|
|
|
}
|
|
|
|
|
|
@@ -171,7 +176,12 @@ static const NSInteger detal = 20;
|
|
|
- (void)saveSearchParameters:(NSString *)name {
|
|
|
|
|
|
NSString *module_name = [self.params objectForKey:@"module_name"];
|
|
|
- NSData *jsonData = [NSJSONSerialization dataWithJSONObject:self.params options:NSJSONWritingPrettyPrinted error:nil];
|
|
|
+
|
|
|
+ NSMutableDictionary *params = [self.params mutableCopy];
|
|
|
+ if (self.displayFields) {
|
|
|
+ [params setValue:self.displayFields forKey:@"columns"];
|
|
|
+ }
|
|
|
+ NSData *jsonData = [NSJSONSerialization dataWithJSONObject:params options:NSJSONWritingPrettyPrinted error:nil];
|
|
|
NSString *paramStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
|
|
|
|
|
|
if (self.delegate) {
|