Commit 4ba86e22 authored by 曹云霄's avatar 曹云霄

修复VI检查任务为展开无法提交问题

parent 39fe1244
......@@ -99,9 +99,8 @@
NSDictionary* content =[NSDictionary dictionaryWithContentsOfFile:path];
NSString *version = [content valueForKey:@"CFBundleShortVersionString"] ;
self.version=version;
// 获取服务器更新信息
[ self getDataFromServer];
[self getDataFromServer];
}
//请求服务器更新信息
......@@ -114,7 +113,6 @@
NSInteger success = [data[@"success"] integerValue];
NSString *message = data[@"message"] ;
if (success == 1) {
NSDictionary *dictData = data[@"data"];
NSString*serverVeision=[dictData objectForKey:@"version"];
NSString*serverUrl=[dictData objectForKey:@"url"];
......@@ -137,6 +135,7 @@
[IBTLoadingView showProgressLabel:@"正在加载..."];
[[ICRHTTPController sharedController] getVeisionIdWithType:@"ipa" success:succ failure:fail];
}
//比较版本号及是否下载
-(void)comperVersion
{
......@@ -154,16 +153,13 @@
NSLog(@"string:%@", [array2 objectAtIndex:i]);
}
BOOL isNeedUpdate=[self compareVersion];
if (isNeedUpdate) {
if (self.severForceUpdate) {
//强制更新
self.alertV = [[UIAlertView alloc]initWithTitle:@"新版本告知" message:@"有新版本发布请您下载最新版本" delegate:self cancelButtonTitle:nil otherButtonTitles: @"去下载", nil];
self.alertV.tag = 1001;
[self.alertV show];
}else
{
}else {
self.alertV = [[UIAlertView alloc]initWithTitle:@"新版本告知" message:@"有新版本发布请您下载最新版本" delegate:self cancelButtonTitle:@"下次再说"otherButtonTitles: @"去下载", nil];//
self.alertV.tag = 1002;
[self.alertV show];
......@@ -171,20 +167,19 @@
}
}
}
-(BOOL)compareVersion
{
float version=[self.intVersion floatValue];
float severVersion=[self.intSeverVersion floatValue];
if (severVersion >version) {
return YES;
}else
{
}else{
return NO;
}
}
- (void) alertView:(UIAlertView *)alertView
clickedButtonAtIndex:(NSInteger)buttonIndex {
- (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if (alertView.tag==1001) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:self.severUrl]];
}else if (alertView.tag==1002)
......@@ -193,8 +188,8 @@ clickedButtonAtIndex:(NSInteger)buttonIndex {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:self.severUrl]];
}
}
}
//比较版本号
- (NSComparisonResult)p_compareVersions: (NSString *)version1 betweenVersion2: (NSString *)version2{
NSComparisonResult result = NSOrderedSame;
......
......@@ -211,6 +211,9 @@ NSString *const CELL = @"CustomInspectionTableViewCell";
[self.categoryArray addObject:answer.questionCategory];
}
}
NSArray *sortDesc = @[ [[NSSortDescriptor alloc] initWithKey:@"self" ascending:YES]];
self.categoryArray = [NSMutableArray arrayWithArray:[self.categoryArray sortedArrayUsingDescriptors:sortDesc]];
//划分数据
for (NSString *string in self.categoryArray) {
NSMutableArray *subArray = [NSMutableArray array];
......
......@@ -180,7 +180,7 @@
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="已完成" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hth-nU-ISq">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="---" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hth-nU-ISq">
<rect key="frame" x="275" y="0.0" width="84" height="40"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.63179747500000005" green="0.63179747500000005" blue="0.63179747500000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
......@@ -244,7 +244,7 @@
<constraints>
<constraint firstAttribute="width" constant="85" id="QCJ-l1-s8b"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<inset key="titleEdgeInsets" minX="-16" minY="0.0" maxX="20" maxY="0.0"/>
<inset key="imageEdgeInsets" minX="65" minY="0.0" maxX="0.0" maxY="0.0"/>
<state key="normal" title="全部展开" image="arrowturnoff">
......@@ -750,6 +750,7 @@
</view>
<connections>
<outlet property="btnSubmit" destination="mHa-66-Myc" id="NST-Nh-EKj"/>
<outlet property="expandButton" destination="hMf-am-3kG" id="nc4-ru-Xbd"/>
<outlet property="tableView" destination="gKa-XF-Dts" id="V6d-RQ-tOd"/>
<outlet property="topView" destination="T76-CQ-jFE" id="inO-g5-zWE"/>
</connections>
......
......@@ -26,6 +26,7 @@
@property (weak, nonatomic) IBOutlet PatrolExamTopView *topView;
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (weak, nonatomic) IBOutlet UIButton *btnSubmit;
@property (weak, nonatomic) IBOutlet UIButton *expandButton;
@property (strong, nonatomic) NSTimer *timer;
/**
......@@ -291,7 +292,8 @@
#pragma mark -提交VI检查任务
- (IBAction)actionSubmit:(id)sender {
[self.viewModel openAll];
self.expandButton.selected = YES;
if (!self.viewModel.detail.temp) {
//找到最上面一个没有回答的问题
if (self.viewModel.detail.questions.count != self.viewModel.dicAnswers.count) {
......
......@@ -19,11 +19,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.0</string>
<string>1.3.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.3.0</string>
<string>1.3.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
......
......@@ -179,12 +179,12 @@ typedef NS_ENUM(NSInteger,ATTACHMENT_LOCATION){
//#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:7080"
//测试环境
//#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:8180/total-server/rest"
//#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:8180"
#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:8180/total-server/rest"
#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:8180"
//开发环境
#define HTTP_LOCAL_BASE_URL @"http://192.168.1.176:8083"
#define HTTP_REST_API_BASE_URL @"http://192.168.1.176:8083/total-server/rest"
//#define HTTP_LOCAL_BASE_URL @"http://192.168.1.176:8083"
//#define HTTP_REST_API_BASE_URL @"http://192.168.1.176:8083/total-server/rest"
#define HTTP_WEATHER_URL @"http://apis.baidu.com/heweather/weather/free"
//refreshUpdateDate
......
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