Commit d9b53d05 authored by admin's avatar admin

任务处理界面完成

parent d9a6231b
......@@ -55,6 +55,8 @@
84970E361BD8E09D00C1728A /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84970E351BD8E09D00C1728A /* LoginViewController.m */; };
84970E391BD8E0B300C1728A /* LoginView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84970E381BD8E0B300C1728A /* LoginView.m */; };
8497B62B1C043671007ECBE6 /* InspectTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8497B62A1C043671007ECBE6 /* InspectTableView.m */; };
849A18431C152CEE00071600 /* AddPictureViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 849A18421C152CEE00071600 /* AddPictureViewController.m */; };
849A18461C152EBA00071600 /* AddPictureTableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 849A18451C152EBA00071600 /* AddPictureTableCell.m */; };
849B2F711C0CA22F005D809F /* AnnoContentTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 849B2F701C0CA22F005D809F /* AnnoContentTableViewCell.m */; };
849B2F741C0CA60E005D809F /* AnnounceDetailFootView.m in Sources */ = {isa = PBXBuildFile; fileRef = 849B2F731C0CA60E005D809F /* AnnounceDetailFootView.m */; };
849B2F771C0CABE6005D809F /* AnnounceDetailModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 849B2F761C0CABE6005D809F /* AnnounceDetailModel.m */; };
......@@ -114,6 +116,7 @@
84E420411BE849FC00689976 /* QuestionDescribeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84E420401BE849FC00689976 /* QuestionDescribeCell.m */; };
84E420441BE84A2300689976 /* QuestionCommentCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84E420431BE84A2300689976 /* QuestionCommentCell.m */; };
84E420471BE88AE000689976 /* RootTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84E420461BE88AE000689976 /* RootTabBarController.m */; };
84E7BD801C16809E0030C441 /* LookOnLineFootView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84E7BD7F1C16809E0030C441 /* LookOnLineFootView.m */; };
84ECCF181C01FA2600EA4960 /* QuestionDetailModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 84ECCF171C01FA2600EA4960 /* QuestionDetailModel.m */; };
84ECCF1B1C0210F000EA4960 /* CommentModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 84ECCF1A1C0210F000EA4960 /* CommentModel.m */; };
84ED5DD81BF2E64300A1BB6D /* ScreenView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84ED5DD71BF2E64300A1BB6D /* ScreenView.m */; };
......@@ -246,6 +249,10 @@
84970E3F1BD9127A00C1728A /* Constant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Constant.h; sourceTree = "<group>"; };
8497B6291C043671007ECBE6 /* InspectTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectTableView.h; sourceTree = "<group>"; };
8497B62A1C043671007ECBE6 /* InspectTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InspectTableView.m; sourceTree = "<group>"; };
849A18411C152CEE00071600 /* AddPictureViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddPictureViewController.h; sourceTree = "<group>"; };
849A18421C152CEE00071600 /* AddPictureViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AddPictureViewController.m; sourceTree = "<group>"; };
849A18441C152EBA00071600 /* AddPictureTableCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddPictureTableCell.h; sourceTree = "<group>"; };
849A18451C152EBA00071600 /* AddPictureTableCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AddPictureTableCell.m; sourceTree = "<group>"; };
849B2F6F1C0CA22F005D809F /* AnnoContentTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnnoContentTableViewCell.h; sourceTree = "<group>"; };
849B2F701C0CA22F005D809F /* AnnoContentTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AnnoContentTableViewCell.m; sourceTree = "<group>"; };
849B2F721C0CA60E005D809F /* AnnounceDetailFootView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnnounceDetailFootView.h; sourceTree = "<group>"; };
......@@ -363,6 +370,8 @@
84E420431BE84A2300689976 /* QuestionCommentCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QuestionCommentCell.m; sourceTree = "<group>"; };
84E420451BE88AE000689976 /* RootTabBarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootTabBarController.h; sourceTree = "<group>"; };
84E420461BE88AE000689976 /* RootTabBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootTabBarController.m; sourceTree = "<group>"; };
84E7BD7E1C16809E0030C441 /* LookOnLineFootView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LookOnLineFootView.h; sourceTree = "<group>"; };
84E7BD7F1C16809E0030C441 /* LookOnLineFootView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LookOnLineFootView.m; sourceTree = "<group>"; };
84ECCF161C01FA2600EA4960 /* QuestionDetailModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QuestionDetailModel.h; sourceTree = "<group>"; };
84ECCF171C01FA2600EA4960 /* QuestionDetailModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QuestionDetailModel.m; sourceTree = "<group>"; };
84ECCF191C0210F000EA4960 /* CommentModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommentModel.h; sourceTree = "<group>"; };
......@@ -556,6 +565,7 @@
8426A4A71BDF0CD600E5FDF5 /* Picture */ = {
isa = PBXGroup;
children = (
849A183D1C152CD400071600 /* AddPicture */,
8490C4C71BF9DEF0006B6569 /* PictureDetail */,
8490C4CB1BF9DEF0006B6569 /* PictureList */,
);
......@@ -1134,6 +1144,41 @@
path = View;
sourceTree = "<group>";
};
849A183D1C152CD400071600 /* AddPicture */ = {
isa = PBXGroup;
children = (
849A183E1C152CD400071600 /* Cell */,
849A183F1C152CD400071600 /* View */,
849A18401C152CD400071600 /* ViewController */,
);
path = AddPicture;
sourceTree = "<group>";
};
849A183E1C152CD400071600 /* Cell */ = {
isa = PBXGroup;
children = (
849A18441C152EBA00071600 /* AddPictureTableCell.h */,
849A18451C152EBA00071600 /* AddPictureTableCell.m */,
);
path = Cell;
sourceTree = "<group>";
};
849A183F1C152CD400071600 /* View */ = {
isa = PBXGroup;
children = (
);
path = View;
sourceTree = "<group>";
};
849A18401C152CD400071600 /* ViewController */ = {
isa = PBXGroup;
children = (
849A18411C152CEE00071600 /* AddPictureViewController.h */,
849A18421C152CEE00071600 /* AddPictureViewController.m */,
);
path = ViewController;
sourceTree = "<group>";
};
84A673821C0B4D3B000F828E /* OnLineTaskComplete */ = {
isa = PBXGroup;
children = (
......@@ -1499,6 +1544,8 @@
children = (
84CC34EA1C09AD98002F10E2 /* LookOnLineDetailView.h */,
84CC34EB1C09AD98002F10E2 /* LookOnLineDetailView.m */,
84E7BD7E1C16809E0030C441 /* LookOnLineFootView.h */,
84E7BD7F1C16809E0030C441 /* LookOnLineFootView.m */,
);
path = View;
sourceTree = "<group>";
......@@ -1820,6 +1867,7 @@
TargetAttributes = {
84970DE91BD8DD8A00C1728A = {
CreatedOnToolsVersion = 7.0.1;
DevelopmentTeam = SVECB8P766;
};
84970E021BD8DD8A00C1728A = {
CreatedOnToolsVersion = 7.0.1;
......@@ -1921,6 +1969,7 @@
840ABECC1BE1C29F006E49C5 /* RankDetailViewController.m in Sources */,
8497B62B1C043671007ECBE6 /* InspectTableView.m in Sources */,
84AD4F261BF4356A00BFB37C /* TaskModel.m in Sources */,
84E7BD801C16809E0030C441 /* LookOnLineFootView.m in Sources */,
841D24FB1BEB75CA0005CC9F /* QuestionDetailFooterView.m in Sources */,
84CF0FA21BE9EDA900C855CE /* TakePhotoView.m in Sources */,
846206BB1C06AFF50015C456 /* RankCommentCell.m in Sources */,
......@@ -1986,6 +2035,7 @@
8480BEAC1C143A1600E2F18F /* CategoryTableView.m in Sources */,
84F57C9C1BECA73800DDEEB1 /* StarBar.m in Sources */,
84F57C4C1BEC785E00DDEEB1 /* AddQuestionViewController.m in Sources */,
849A18461C152EBA00071600 /* AddPictureTableCell.m in Sources */,
84D80EB51BF714BE00A10EA4 /* GroupItems.m in Sources */,
84A673BE1C0C7AEB000F828E /* AnnoTableViewCell.m in Sources */,
84C9574D1BDB344900083584 /* UIBarButtonItem+Create.m in Sources */,
......@@ -2003,6 +2053,7 @@
84A673911C0C2681000F828E /* FunctionViewController.m in Sources */,
848699B61BDF812F00859DFE /* RankingListViewController.m in Sources */,
84D825821BDD35E000CC61F7 /* HomeHeaderView.m in Sources */,
849A18431C152CEE00071600 /* AddPictureViewController.m in Sources */,
8480BEA61C14378C00E2F18F /* ScopeTableView.m in Sources */,
84FD89F21BD9FC71006E442A /* HomeViewController.m in Sources */,
84AD4F461BF4A9E800BFB37C /* RankHeadView.m in Sources */,
......
......@@ -6,12 +6,12 @@
},
{
"idiom" : "universal",
"filename" : "add-photos_btn@2x.png",
"filename" : "add-photo_icon@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "add-photos_btn@3x.png",
"filename" : "add-photo_icon@3x.png",
"scale" : "3x"
}
],
......
......@@ -69,8 +69,8 @@
NSString *user_uuid = [[NSUserDefaults standardUserDefaults] objectForKey:@"user_uuid"];
int page_number = 0;
int page_size = 10;
NSString *url = [NSString stringWithFormat:@"%@%@%@?read=%@&page_number=%d&page_size=%d", kRedStarURL, kAnnounceListURL ,user_uuid ,_stateStr, page_number, page_size];
// NSString *url = [NSString stringWithFormat:@"%@%@%@?page_number=%d&page_size=%d", kRedStarURL, kAnnounceListURL ,user_uuid, page_number, page_size];
//NSString *url = [NSString stringWithFormat:@"%@%@%@?read=%@&page_number=%d&page_size=%d", kRedStarURL, kAnnounceListURL ,user_uuid ,_stateStr, page_number, page_size];
NSString *url = [NSString stringWithFormat:@"%@%@%@?page_number=%d&page_size=%d", kRedStarURL, kAnnounceListURL ,user_uuid, page_number, page_size];
NSLog(@"urlll = %@", url);
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url];
......
......@@ -20,4 +20,5 @@
@property (nonatomic, strong) UILabel *dayLabel; // 剩余天数
@end
......@@ -18,6 +18,9 @@
@property (nonatomic, strong) UILabel *surplus; // 剩余
@property (nonatomic, strong) UILabel *day; // 天
@property (nonatomic, strong) UIImageView *number; // 天
@property (nonatomic, strong) UILabel *pictureLabel; // 起始时间
@end
@implementation LookOnLineDetailView
......@@ -59,6 +62,8 @@
self.surplus.text = @"剩余";
self.dayLabel.text = @"2";
self.pictureLabel.text = @"现场照片";
}
- (UILabel *)titleLabel
......@@ -105,7 +110,7 @@
NSLayoutConstraint *titleLabelWidth = [NSLayoutConstraint constraintWithItem:_bgView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
[self addConstraint:titleLabelWidth];
NSLayoutConstraint *titleLabelBottom = [NSLayoutConstraint constraintWithItem:_bgView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
NSLayoutConstraint *titleLabelBottom = [NSLayoutConstraint constraintWithItem:_bgView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-40];
[self addConstraint:titleLabelBottom];
}
return _bgView;
......@@ -452,4 +457,29 @@
}
- (UILabel *)pictureLabel
{
if(!_pictureLabel) {
_pictureLabel = [[UILabel alloc] init];
_pictureLabel.translatesAutoresizingMaskIntoConstraints = NO;
_pictureLabel.font = [UIFont systemFontOfSize:15.0];
_pictureLabel.textColor = kLightBlack;
[self addSubview:_pictureLabel];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint constraintWithItem:_pictureLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self addConstraint:overDateTop];
NSLayoutConstraint *overDateLeft = [NSLayoutConstraint constraintWithItem:_pictureLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self addConstraint:overDateLeft];
NSLayoutConstraint *overDateRight = [NSLayoutConstraint constraintWithItem:_pictureLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self addConstraint:overDateRight];
NSLayoutConstraint *overDateHeight = [NSLayoutConstraint constraintWithItem:_pictureLabel attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self addConstraint:overDateHeight];
}
return _pictureLabel;
}
@end
//
// LookOnLineFootView.h
// redstar
//
// Created by admin on 15/12/8.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface LookOnLineFootView : UIView
@property (nonatomic, strong) UILabel *introLabel;
@property (nonatomic, strong) UITextView *contentTextView;
@property (nonatomic, strong) UILabel *placeholderLabel2;
@property (nonatomic, strong) UIButton *resultButton;
@end
//
// LookOnLineFootView.m
// redstar
//
// Created by admin on 15/12/8.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "LookOnLineFootView.h"
@interface LookOnLineFootView ()
@property (nonatomic, strong) UIImageView *backImageView1;
@end
@implementation LookOnLineFootView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self setup];
}
return self;
}
- (void)setup
{
self.introLabel.text = @"处理说明";
UIImage *image = [UIImage imageNamed:@"textbox"];
UIImage *resizingName = [image resizableImageWithCapInsets:UIEdgeInsetsMake(1, 1, 24, 24) resizingMode:UIImageResizingModeStretch];
self.backImageView1.image = resizingName;
self.contentTextView.backgroundColor = [UIColor clearColor];
self.placeholderLabel2.text = @"请输入文字...";
[self.resultButton setTitle:@"上报结果" forState:UIControlStateNormal];
}
- (UILabel *)introLabel
{
if (!_introLabel) {
_introLabel = [[UILabel alloc] init];
_introLabel.translatesAutoresizingMaskIntoConstraints = NO;
_introLabel.font = [UIFont systemFontOfSize:15.0];
_introLabel.textColor = kLightBlack;
[self addSubview:_introLabel];
NSLayoutConstraint *contentTop = [NSLayoutConstraint constraintWithItem:_introLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
[self addConstraint:contentTop];
NSLayoutConstraint *contentLeft = [NSLayoutConstraint constraintWithItem:_introLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self addConstraint:contentLeft];
NSLayoutConstraint *contentRight = [NSLayoutConstraint constraintWithItem:_introLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self addConstraint:contentRight];
NSLayoutConstraint *contentHeight = [NSLayoutConstraint constraintWithItem:_introLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:30];
[self addConstraint:contentHeight];
}
return _introLabel;
}
- (UIImageView *)backImageView1
{
if (!_backImageView1) {
_backImageView1 = [[UIImageView alloc] init];
_backImageView1.userInteractionEnabled = YES;
_backImageView1.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_backImageView1];
NSLayoutConstraint *contentTop = [NSLayoutConstraint constraintWithItem:_backImageView1 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.introLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self addConstraint:contentTop];
NSLayoutConstraint *contentLeft = [NSLayoutConstraint constraintWithItem:_backImageView1 attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self addConstraint:contentLeft];
NSLayoutConstraint *contentRight = [NSLayoutConstraint constraintWithItem:_backImageView1 attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self addConstraint:contentRight];
NSLayoutConstraint *contentHeight = [NSLayoutConstraint constraintWithItem:_backImageView1 attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:90];
[self addConstraint:contentHeight];
}
return _backImageView1;
}
- (UITextView *)contentTextView
{
if (!_contentTextView) {
_contentTextView = [[UITextView alloc] init];
_contentTextView.font = [UIFont systemFontOfSize:15.0];
_contentTextView.translatesAutoresizingMaskIntoConstraints = NO;
[self.backImageView1 addSubview:_contentTextView];
NSLayoutConstraint *contentTop = [NSLayoutConstraint constraintWithItem:_contentTextView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.backImageView1 attribute:NSLayoutAttributeTop multiplier:1.0 constant:1];
[self.backImageView1 addConstraint:contentTop];
NSLayoutConstraint *contentLeft = [NSLayoutConstraint constraintWithItem:_contentTextView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.backImageView1 attribute:NSLayoutAttributeLeft multiplier:1.0 constant:1];
[self.backImageView1 addConstraint:contentLeft];
NSLayoutConstraint *contentRight = [NSLayoutConstraint constraintWithItem:_contentTextView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.backImageView1 attribute:NSLayoutAttributeRight multiplier:1.0 constant:-1];
[self.backImageView1 addConstraint:contentRight];
NSLayoutConstraint *contentHeight = [NSLayoutConstraint constraintWithItem:_contentTextView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.backImageView1 attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-1];
[self.backImageView1 addConstraint:contentHeight];
}
return _contentTextView;
}
- (UILabel *)placeholderLabel2
{
if (!_placeholderLabel2) {
_placeholderLabel2 = [[UILabel alloc] init];
_placeholderLabel2.translatesAutoresizingMaskIntoConstraints = NO;
_placeholderLabel2.font = [UIFont systemFontOfSize:15.0];
_placeholderLabel2.textColor = kOnLineCellDetailColor;
[self.contentTextView addSubview:_placeholderLabel2];
NSLayoutConstraint *contentTop = [NSLayoutConstraint constraintWithItem:_placeholderLabel2 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentTextView attribute:NSLayoutAttributeTop multiplier:1.0 constant:2];
[self.contentTextView addConstraint:contentTop];
NSLayoutConstraint *contentLeft = [NSLayoutConstraint constraintWithItem:_placeholderLabel2 attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentTextView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:5];
[self.contentTextView addConstraint:contentLeft];
NSLayoutConstraint *contentRight = [NSLayoutConstraint constraintWithItem:_placeholderLabel2 attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.contentTextView attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
[self.contentTextView addConstraint:contentRight];
NSLayoutConstraint *contentHeight = [NSLayoutConstraint constraintWithItem:_placeholderLabel2 attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:30];
[self.contentTextView addConstraint:contentHeight];
}
return _placeholderLabel2;
}
- (UIButton *)resultButton
{
if (!_resultButton) {
_resultButton = [[UIButton alloc] init];
_resultButton.translatesAutoresizingMaskIntoConstraints = NO;
_resultButton.backgroundColor = kNavigationBarColor;
[self addSubview:_resultButton];
NSLayoutConstraint *contentTop = [NSLayoutConstraint constraintWithItem:_resultButton attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.backImageView1 attribute:NSLayoutAttributeBottom multiplier:1.0 constant:10];
[self addConstraint:contentTop];
NSLayoutConstraint *contentLeft = [NSLayoutConstraint constraintWithItem:_resultButton attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self addConstraint:contentLeft];
NSLayoutConstraint *contentRight = [NSLayoutConstraint constraintWithItem:_resultButton attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self addConstraint:contentRight];
NSLayoutConstraint *contentHeight = [NSLayoutConstraint constraintWithItem:_resultButton attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:35];
[self addConstraint:contentHeight];
}
return _resultButton;
}
@end
......@@ -8,12 +8,26 @@
#import "LookOnLineDetailViewController.h"
#import "LookOnLineDetailView.h"
#import "LookOnLineFootView.h"
#import "InspectAddCell.h"
#define kOnLineInspectAddCell @"onLineInspectAddCell"
#import "InspectPicAddCell.h"
#define kOnLineInspectPicAddCell @"onLineInspectPicAddCell"
#import "InpectPictureCell.h"
#define kOnLineInpectPictureCell @"onLineInpectPictureCell"
#define kLookOnLineDetailCell @"LookOnLineDetailCell"
@interface LookOnLineDetailViewController () <UITableViewDelegate, UITableViewDataSource>
@interface LookOnLineDetailViewController () <UITableViewDelegate, UITableViewDataSource, UINavigationControllerDelegate, UIImagePickerControllerDelegate>
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) LookOnLineDetailView *headerView;
@property (nonatomic, strong) LookOnLineFootView *footView;
@property (nonatomic, strong) NSMutableArray *imageNameArray;
@property (nonatomic, assign) int rowNumber;
@end
......@@ -27,6 +41,9 @@
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.imageNameArray = [NSMutableArray array];
_rowNumber = 1;
}
#pragma mark - Private Mothods
......@@ -60,22 +77,107 @@
[self.navigationController popViewControllerAnimated:YES];
}
- (void)createImagePicker:(UIButton *)sender
{
if (sender.tag == 22011) {
_rowNumber++;
}
if (![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:@"找不到相机" delegate:nil cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
[alert show];
} else {
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.modalTransitionStyle=UIModalTransitionStyleFlipHorizontal;
picker.videoQuality = UIImagePickerControllerQualityTypeLow;
[self presentViewController:picker animated:YES completion:nil];
}
}
- (void)saveImage:(UIImage *)currentImage {
NSData *imageData = UIImageJPEGRepresentation(currentImage, 0.5);
NSString *imageName = [NSString stringWithFormat:@"imageName%d", (int)_imageNameArray.count];
[_imageNameArray addObject:imageName];
// 获取沙盒目录
NSString *fullPath = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:imageName];
// 将图片写入文件
[imageData writeToFile:fullPath atomically:NO];
}
#pragma mark - UIImagePickerController 代理方法
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
[self saveImage:image];
// 退出图片选择控制器
[picker dismissViewControllerAnimated:YES completion:^{
[self.tableView reloadData];
}];
}
#pragma mark - UITableView Delegate/DataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 10;
return _rowNumber;
}
// cell显示的内容
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kLookOnLineDetailCell];
if (!cell) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kLookOnLineDetailCell];
if (indexPath.row == _rowNumber - 1) {
if ((_imageNameArray.count + 1) % 2 == 0) {
InspectPicAddCell *cell=[tableView dequeueReusableCellWithIdentifier:kOnLineInspectPicAddCell];
if (!cell) {
cell = [[InspectPicAddCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kOnLineInspectPicAddCell];
}
NSString *imageName = _imageNameArray[_imageNameArray.count - 1];
NSString *fullPath = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:imageName];
UIImage *image = [UIImage imageWithContentsOfFile:fullPath];
[cell.photoButton1 setImage:image forState:UIControlStateNormal];
cell.photoButton2.tag = 22011;
[cell.photoButton2 addTarget:self action:@selector(createImagePicker:) forControlEvents:UIControlEventTouchUpInside];
return cell;
} else {
InspectAddCell *cell=[tableView dequeueReusableCellWithIdentifier:kOnLineInspectAddCell];
if (!cell) {
cell = [[InspectAddCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kOnLineInspectAddCell];
}
cell.photoButton.tag = 22001;
[cell.photoButton addTarget:self action:@selector(createImagePicker:) forControlEvents:UIControlEventTouchUpInside];
return cell;
}
} else {
InpectPictureCell *cell=[tableView dequeueReusableCellWithIdentifier:kOnLineInpectPictureCell];
if (!cell) {
cell = [[InpectPictureCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kOnLineInpectPictureCell];
}
NSString *imageName0 = _imageNameArray[(indexPath.row ) * 2];
NSString *fullPath0 = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:imageName0];
UIImage *image0 = [UIImage imageWithContentsOfFile:fullPath0];
[cell.photoButton1 setImage:image0 forState:UIControlStateNormal];
NSString *imageName1 = _imageNameArray[(indexPath.row) * 2 + 1];
NSLog(@"imageName = %@", imageName1);
NSString *fullPath1 = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:imageName1];
UIImage *image1 = [UIImage imageWithContentsOfFile:fullPath1];
[cell.photoButton2 setImage:image1 forState:UIControlStateNormal];
return cell;
}
return cell;
}
......@@ -89,6 +191,16 @@
_tableView.showsVerticalScrollIndicator = NO;
_tableView.showsHorizontalScrollIndicator = NO;
_tableView.tableHeaderView = self.headerView;
_tableView.tableFooterView = self.footView;
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.rowHeight = UITableViewAutomaticDimension;
_tableView.estimatedRowHeight = 100.0;
[_tableView registerClass:[InspectAddCell class] forCellReuseIdentifier:kOnLineInspectAddCell];
[_tableView registerClass:[InspectPicAddCell class] forCellReuseIdentifier:kOnLineInspectPicAddCell];
[_tableView registerClass:[InpectPictureCell class] forCellReuseIdentifier:kOnLineInpectPictureCell];
[self.view addSubview:_tableView];
NSLayoutConstraint *tableTop = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
......@@ -109,9 +221,18 @@
- (LookOnLineDetailView *)headerView
{
if (!_headerView) {
_headerView = [[LookOnLineDetailView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 255)];
_headerView = [[LookOnLineDetailView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 295)];
_headerView.titleLabel.text = @"2015年十一促销临时抽查";
}
return _headerView;
}
- (LookOnLineFootView *)footView
{
if (!_footView) {
_footView = [[LookOnLineFootView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 180)];
_footView.backgroundColor = [UIColor clearColor];
}
return _footView;
}
@end
//
// AddPictureTableCell.h
// redstar
//
// Created by admin on 15/12/7.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AddPictureTableCell : UITableViewCell
@property (nonatomic, strong) UITextView *titleTextView;
@property (nonatomic, strong) UITextView *contentTextView;
@property (nonatomic, strong) UILabel *placeholderLabel1;
@property (nonatomic, strong) UILabel *placeholderLabel2;
@end
//
// AddPictureViewController.h
// redstar
//
// Created by admin on 15/12/7.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AddPictureViewController : UIViewController
@end
......@@ -11,6 +11,7 @@
#import "PictureTableCell.h"
#import "PictureStoryViewController.h"
#import "AddPictureViewController.h"
#define kPictureTableViewCell @"pictureTabelViewCell"
......@@ -79,7 +80,8 @@
- (void)addClick:(UIButton *)sender
{
NSLog(@"我要新增");
AddPictureViewController *addPic = [[AddPictureViewController alloc] init];
[self.navigationController pushViewController:addPic animated:YES];
}
......
......@@ -43,4 +43,8 @@
@property (nonatomic, strong) NSString *store_code;
@property (nonatomic, strong) NSString *store_uuid;
@property (nonatomic, strong) NSString *store_name;
@property (nonatomic, strong) NSString *principal_code;
@property (nonatomic, strong) NSString *principal_name;
@property (nonatomic, strong) NSString *principal_uuid;
@end
......@@ -33,7 +33,7 @@
_photoButton = [[UIButton alloc] init];
_photoButton.backgroundColor = [UIColor whiteColor];
_photoButton.translatesAutoresizingMaskIntoConstraints = NO;
[_photoButton setImage:[UIImage imageNamed:@"add-photos_btn"] forState:UIControlStateNormal];
[_photoButton setImage:[UIImage imageNamed:@"add-photo_icon"] forState:UIControlStateNormal];
[self.contentView addSubview:_photoButton];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint
......
......@@ -89,7 +89,7 @@
{
if (!_photoButton2) {
_photoButton2 = [[UIButton alloc] init];
[_photoButton2 setImage:[UIImage imageNamed:@"add-photos_btn"] forState:UIControlStateNormal];
[_photoButton2 setImage:[UIImage imageNamed:@"add-photo_icon"] forState:UIControlStateNormal];
_photoButton2.translatesAutoresizingMaskIntoConstraints = NO;
_photoButton2.backgroundColor = [UIColor whiteColor];
[self.contentView addSubview:_photoButton2];
......
......@@ -16,7 +16,7 @@
#define MaxImageCount 9 // 最多显示图片个数
#define deleImageWH 25 // 删除按钮的宽高
#define kAdeleImage @"close.png" // 删除按钮图片
#define kAddImage @"add-photos_btn" // 添加按钮图片
#define kAddImage @"add-photo_icon" // 添加按钮图片
@interface TakePhotoView ()
......
......@@ -132,14 +132,13 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
[[NSUserDefaults standardUserDefaults] setObject:_titleArray forKey:@"function"];
// 初始化容器
//self.titleArray = [NSMutableArray arrayWithObjects:@"图说口碑", @"8月口碑巡检",@"问题与知识",@"口碑任务", nil];
self.btnTitleArray = [NSArray arrayWithObjects:@"在线抽查", @"口碑巡检",@"口碑标准",@"图说口碑",@"问题知识",@"口碑排名",@"查看抽查", nil];
self.announeArray = [NSArray arrayWithObjects:@"关于展开10月口碑巡检的说明", @"迎2015十一大促活动启动", @"9月口碑巡检结果排名已公布", nil];
// 初始化
self.test1Array = [NSArray arrayWithObjects:@"【服务口碑现场】第二期",@"讲述红星人自己的故事",@"【服务口碑现场】第一期", nil];
self.test2Array = [NSArray arrayWithObjects:@"把第一次客户投诉变成商场服务提升的契机,变成商场服务提升的契机。",@"变成商场服务提升的契机,变成商场服务提升的契机。",@"把第一次客户投诉变成商场服务提升的契机,变成商场服务提升的契机。", nil];
self.test3Array = [NSArray arrayWithObjects:@"2015-08-26",@"2015-08-09",@"2015-07-31", nil];
// self.btnTitleArray = [NSArray arrayWithObjects:@"在线抽查", @"口碑巡检",@"口碑标准",@"图说口碑",@"问题知识",@"口碑排名",@"查看抽查", nil];
// self.announeArray = [NSArray arrayWithObjects:@"关于展开10月口碑巡检的说明", @"迎2015十一大促活动启动", @"9月口碑巡检结果排名已公布", nil];
//
// // 初始化
// self.test1Array = [NSArray arrayWithObjects:@"【服务口碑现场】第二期",@"讲述红星人自己的故事",@"【服务口碑现场】第一期", nil];
// self.test2Array = [NSArray arrayWithObjects:@"把第一次客户投诉变成商场服务提升的契机,变成商场服务提升的契机。",@"变成商场服务提升的契机,变成商场服务提升的契机。",@"把第一次客户投诉变成商场服务提升的契机,变成商场服务提升的契机。", nil];
// self.test3Array = [NSArray arrayWithObjects:@"2015-08-26",@"2015-08-09",@"2015-07-31", nil];
......@@ -486,8 +485,10 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
InspectListViewController *inspectListVC = [[InspectListViewController alloc] init];
nav = [[UINavigationController alloc] initWithRootViewController:inspectListVC];
} else if ([item.titleLabel.text isEqualToString:@"口碑标准"]) {
StandardViewController *standardVC = [[StandardViewController alloc] init];
nav = [[UINavigationController alloc] initWithRootViewController:standardVC];
LookOnLineViewController *lookOnLine = [[LookOnLineViewController alloc] init];
nav = [[UINavigationController alloc] initWithRootViewController:lookOnLine];
// StandardViewController *standardVC = [[StandardViewController alloc] init];
// nav = [[UINavigationController alloc] initWithRootViewController:standardVC];
} else if ([item.titleLabel.text isEqualToString:@"图说口碑"]) {
PictureViewController *pictureVC = [[PictureViewController alloc] init];
nav = [[UINavigationController alloc] initWithRootViewController:pictureVC];
......
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