Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
红
红星美凯龙管理在线APP IOS
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
红星美凯龙管理在线APP IOS
Commits
e6c42abd
Commit
e6c42abd
authored
Dec 16, 2015
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改添加字段崩溃的bug
parent
e0dda623
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
241 additions
and
44 deletions
+241
-44
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
AnnounceDetailModel.m
...odule/Announce/AnnounceDetail/Model/AnnounceDetailModel.m
+11
-0
AnnounceModel.m
...lasses/Module/Announce/AnnounceList/Model/AnnounceModel.m
+11
-0
AreaModel.m
...sses/Module/Function/OnLine/SelectStore/Model/AreaModel.m
+12
-0
ProvinceModel.m
.../Module/Function/OnLine/SelectStore/Model/ProvinceModel.m
+11
-1
StoreModel.m
...ses/Module/Function/OnLine/SelectStore/Model/StoreModel.m
+12
-0
SelectStoreViewController.m
...ne/SelectStore/ViewController/SelectStoreViewController.m
+3
-4
PicTextModel.m
...odule/Function/Picture/PictureDetail/Model/PicTextModel.m
+12
-0
PictureDetailModel.m
...Function/Picture/PictureDetail/Model/PictureDetailModel.m
+11
-1
PictureListModel.m
...ule/Function/Picture/PictureList/Model/PictureListModel.m
+11
-1
CommentModel.m
...ule/Function/Question/QuestionDetail/Model/CommentModel.m
+11
-1
QuestionDetailModel.m
...ction/Question/QuestionDetail/Model/QuestionDetailModel.m
+11
-1
QuestionModel.h
...dule/Function/Question/QuestionList/Model/QuestionModel.h
+1
-1
QuestionModel.m
...dule/Function/Question/QuestionList/Model/QuestionModel.m
+12
-0
SearchToolBar.h
...odule/Function/Question/QuestionList/View/SearchToolBar.h
+1
-1
SearchToolBar.m
...odule/Function/Question/QuestionList/View/SearchToolBar.m
+1
-8
QuestionViewController.m
...tion/QuestionList/ViewController/QuestionViewController.m
+47
-7
InspectListCell.m
...on/WordOfMouth/Inspect/InspectList/Cell/InspectListCell.m
+3
-12
TaskListModel.m
...ion/WordOfMouth/Inspect/InspectList/Model/TaskListModel.m
+11
-1
InspectListViewController.m
...ct/InspectList/ViewController/InspectListViewController.m
+1
-3
InspectTaskDetailCell.m
...dOfMouth/Inspect/InspectTask/Cell/InspectTaskDetailCell.m
+1
-1
TaskDetailModel.m
...n/WordOfMouth/Inspect/InspectTask/Model/TaskDetailModel.m
+12
-0
TaskModel.m
...unction/WordOfMouth/Inspect/InspectTask/Model/TaskModel.m
+12
-0
RankCommentModel.m
.../WordOfMouth/Ranking/RankingList/Model/RankCommentModel.m
+11
-0
RankListModel.m
...ion/WordOfMouth/Ranking/RankingList/Model/RankListModel.m
+11
-1
redstar.pch
redstar/redstar.pch
+1
-0
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
e6c42abd
No preview for this file type
redstar/Classes/Module/Announce/AnnounceDetail/Model/AnnounceDetailModel.m
View file @
e6c42abd
...
@@ -21,4 +21,15 @@
...
@@ -21,4 +21,15 @@
}
}
return
self
;
return
self
;
}
}
-
(
void
)
setValuesForKeysWithDictionary
:(
NSDictionary
<
NSString
*
,
id
>
*
)
keyedValues
{
Class
cls
=
self
.
class
;
for
(
NSString
*
key
in
keyedValues
.
allKeys
)
{
NSString
*
varName
=
[
NSString
stringWithFormat
:
@"_%@"
,
key
];
const
char
*
c_key
=
[
varName
cStringUsingEncoding
:
NSUTF8StringEncoding
];
Ivar
var
=
class_getInstanceVariable
(
cls
,
c_key
);
if
(
var
)
{
[
self
setValue
:[
keyedValues
objectForKey
:
key
]
forKey
:
key
];
}
}
}
@end
@end
redstar/Classes/Module/Announce/AnnounceList/Model/AnnounceModel.m
View file @
e6c42abd
...
@@ -21,4 +21,15 @@
...
@@ -21,4 +21,15 @@
}
}
return
self
;
return
self
;
}
}
-
(
void
)
setValuesForKeysWithDictionary
:(
NSDictionary
<
NSString
*
,
id
>
*
)
keyedValues
{
Class
cls
=
self
.
class
;
for
(
NSString
*
key
in
keyedValues
.
allKeys
)
{
NSString
*
varName
=
[
NSString
stringWithFormat
:
@"_%@"
,
key
];
const
char
*
c_key
=
[
varName
cStringUsingEncoding
:
NSUTF8StringEncoding
];
Ivar
var
=
class_getInstanceVariable
(
cls
,
c_key
);
if
(
var
)
{
[
self
setValue
:[
keyedValues
objectForKey
:
key
]
forKey
:
key
];
}
}
}
@end
@end
redstar/Classes/Module/Function/OnLine/SelectStore/Model/AreaModel.m
View file @
e6c42abd
...
@@ -23,4 +23,16 @@
...
@@ -23,4 +23,16 @@
{
{
return
[[
self
alloc
]
initWithName
:
name
children
:
children
];
return
[[
self
alloc
]
initWithName
:
name
children
:
children
];
}
}
-
(
void
)
setValuesForKeysWithDictionary
:(
NSDictionary
<
NSString
*
,
id
>
*
)
keyedValues
{
Class
cls
=
self
.
class
;
for
(
NSString
*
key
in
keyedValues
.
allKeys
)
{
NSString
*
varName
=
[
NSString
stringWithFormat
:
@"_%@"
,
key
];
const
char
*
c_key
=
[
varName
cStringUsingEncoding
:
NSUTF8StringEncoding
];
Ivar
var
=
class_getInstanceVariable
(
cls
,
c_key
);
if
(
var
)
{
[
self
setValue
:[
keyedValues
objectForKey
:
key
]
forKey
:
key
];
}
}
}
@end
@end
redstar/Classes/Module/Function/OnLine/SelectStore/Model/ProvinceModel.m
View file @
e6c42abd
...
@@ -23,5 +23,15 @@
...
@@ -23,5 +23,15 @@
{
{
return
[[
self
alloc
]
initWithName
:
name
children
:
children
];
return
[[
self
alloc
]
initWithName
:
name
children
:
children
];
}
}
-
(
void
)
setValuesForKeysWithDictionary
:(
NSDictionary
<
NSString
*
,
id
>
*
)
keyedValues
{
Class
cls
=
self
.
class
;
for
(
NSString
*
key
in
keyedValues
.
allKeys
)
{
NSString
*
varName
=
[
NSString
stringWithFormat
:
@"_%@"
,
key
];
const
char
*
c_key
=
[
varName
cStringUsingEncoding
:
NSUTF8StringEncoding
];
Ivar
var
=
class_getInstanceVariable
(
cls
,
c_key
);
if
(
var
)
{
[
self
setValue
:[
keyedValues
objectForKey
:
key
]
forKey
:
key
];
}
}
}
@end
@end
redstar/Classes/Module/Function/OnLine/SelectStore/Model/StoreModel.m
View file @
e6c42abd
...
@@ -22,4 +22,16 @@
...
@@ -22,4 +22,16 @@
{
{
return
[[
self
alloc
]
initWithName
:
name
];
return
[[
self
alloc
]
initWithName
:
name
];
}
}
-
(
void
)
setValuesForKeysWithDictionary
:(
NSDictionary
<
NSString
*
,
id
>
*
)
keyedValues
{
Class
cls
=
self
.
class
;
for
(
NSString
*
key
in
keyedValues
.
allKeys
)
{
NSString
*
varName
=
[
NSString
stringWithFormat
:
@"_%@"
,
key
];
const
char
*
c_key
=
[
varName
cStringUsingEncoding
:
NSUTF8StringEncoding
];
Ivar
var
=
class_getInstanceVariable
(
cls
,
c_key
);
if
(
var
)
{
[
self
setValue
:[
keyedValues
objectForKey
:
key
]
forKey
:
key
];
}
}
}
@end
@end
redstar/Classes/Module/Function/OnLine/SelectStore/ViewController/SelectStoreViewController.m
View file @
e6c42abd
...
@@ -179,10 +179,7 @@ NSLog(@"22level = %ld", level);
...
@@ -179,10 +179,7 @@ NSLog(@"22level = %ld", level);
}
}
-
(
CGFloat
)
treeView
:
(
RATreeView
*
)
treeView
heightForRowForItem
:
(
id
)
item
{
return
44
;
}
-
(
BOOL
)
treeView
:
(
RATreeView
*
)
treeView
canEditRowForItem
:
(
id
)
item
-
(
BOOL
)
treeView
:
(
RATreeView
*
)
treeView
canEditRowForItem
:
(
id
)
item
{
{
...
@@ -196,6 +193,8 @@ NSLog(@"22level = %ld", level);
...
@@ -196,6 +193,8 @@ NSLog(@"22level = %ld", level);
if
(
!
_treeView
)
{
if
(
!
_treeView
)
{
_treeView
=
[[
RATreeView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
_treeView
=
[[
RATreeView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
_treeView
.
treeFooterView
=
[
UIView
new
];
_treeView
.
treeFooterView
=
[
UIView
new
];
_treeView
.
rowHeight
=
UITableViewAutomaticDimension
;
_treeView
.
estimatedRowHeight
=
150
.
0
;
[
self
.
view
addSubview
:
_treeView
];
[
self
.
view
addSubview
:
_treeView
];
}
}
return
_treeView
;
return
_treeView
;
...
...
redstar/Classes/Module/Function/Picture/PictureDetail/Model/PicTextModel.m
View file @
e6c42abd
...
@@ -13,4 +13,16 @@
...
@@ -13,4 +13,16 @@
if
([
key
isEqualToString
:
@"description"
])
if
([
key
isEqualToString
:
@"description"
])
self
.
descriptionText
=
value
;
self
.
descriptionText
=
value
;
}
}
-
(
void
)
setValuesForKeysWithDictionary
:(
NSDictionary
<
NSString
*
,
id
>
*
)
keyedValues
{
Class
cls
=
self
.
class
;
for
(
NSString
*
key
in
keyedValues
.
allKeys
)
{
NSString
*
varName
=
[
NSString
stringWithFormat
:
@"_%@"
,
key
];
const
char
*
c_key
=
[
varName
cStringUsingEncoding
:
NSUTF8StringEncoding
];
Ivar
var
=
class_getInstanceVariable
(
cls
,
c_key
);
if
(
var
)
{
[
self
setValue
:[
keyedValues
objectForKey
:
key
]
forKey
:
key
];
}
}
}
@end
@end
redstar/Classes/Module/Function/Picture/PictureDetail/Model/PictureDetailModel.m
View file @
e6c42abd
...
@@ -9,5 +9,15 @@
...
@@ -9,5 +9,15 @@
#import "PictureDetailModel.h"
#import "PictureDetailModel.h"
@implementation
PictureDetailModel
@implementation
PictureDetailModel
-
(
void
)
setValuesForKeysWithDictionary
:(
NSDictionary
<
NSString
*
,
id
>
*
)
keyedValues
{
Class
cls
=
self
.
class
;
for
(
NSString
*
key
in
keyedValues
.
allKeys
)
{
NSString
*
varName
=
[
NSString
stringWithFormat
:
@"_%@"
,
key
];
const
char
*
c_key
=
[
varName
cStringUsingEncoding
:
NSUTF8StringEncoding
];
Ivar
var
=
class_getInstanceVariable
(
cls
,
c_key
);
if
(
var
)
{
[
self
setValue
:[
keyedValues
objectForKey
:
key
]
forKey
:
key
];
}
}
}
@end
@end
redstar/Classes/Module/Function/Picture/PictureList/Model/PictureListModel.m
View file @
e6c42abd
...
@@ -9,5 +9,15 @@
...
@@ -9,5 +9,15 @@
#import "PictureListModel.h"
#import "PictureListModel.h"
@implementation
PictureListModel
@implementation
PictureListModel
-
(
void
)
setValuesForKeysWithDictionary
:(
NSDictionary
<
NSString
*
,
id
>
*
)
keyedValues
{
Class
cls
=
self
.
class
;
for
(
NSString
*
key
in
keyedValues
.
allKeys
)
{
NSString
*
varName
=
[
NSString
stringWithFormat
:
@"_%@"
,
key
];
const
char
*
c_key
=
[
varName
cStringUsingEncoding
:
NSUTF8StringEncoding
];
Ivar
var
=
class_getInstanceVariable
(
cls
,
c_key
);
if
(
var
)
{
[
self
setValue
:[
keyedValues
objectForKey
:
key
]
forKey
:
key
];
}
}
}
@end
@end
redstar/Classes/Module/Function/Question/QuestionDetail/Model/CommentModel.m
View file @
e6c42abd
...
@@ -9,5 +9,15 @@
...
@@ -9,5 +9,15 @@
#import "CommentModel.h"
#import "CommentModel.h"
@implementation
CommentModel
@implementation
CommentModel
-
(
void
)
setValuesForKeysWithDictionary
:(
NSDictionary
<
NSString
*
,
id
>
*
)
keyedValues
{
Class
cls
=
self
.
class
;
for
(
NSString
*
key
in
keyedValues
.
allKeys
)
{
NSString
*
varName
=
[
NSString
stringWithFormat
:
@"_%@"
,
key
];
const
char
*
c_key
=
[
varName
cStringUsingEncoding
:
NSUTF8StringEncoding
];
Ivar
var
=
class_getInstanceVariable
(
cls
,
c_key
);
if
(
var
)
{
[
self
setValue
:[
keyedValues
objectForKey
:
key
]
forKey
:
key
];
}
}
}
@end
@end
redstar/Classes/Module/Function/Question/QuestionDetail/Model/QuestionDetailModel.m
View file @
e6c42abd
...
@@ -9,5 +9,15 @@
...
@@ -9,5 +9,15 @@
#import "QuestionDetailModel.h"
#import "QuestionDetailModel.h"
@implementation
QuestionDetailModel
@implementation
QuestionDetailModel
-
(
void
)
setValuesForKeysWithDictionary
:(
NSDictionary
<
NSString
*
,
id
>
*
)
keyedValues
{
Class
cls
=
self
.
class
;
for
(
NSString
*
key
in
keyedValues
.
allKeys
)
{
NSString
*
varName
=
[
NSString
stringWithFormat
:
@"_%@"
,
key
];
const
char
*
c_key
=
[
varName
cStringUsingEncoding
:
NSUTF8StringEncoding
];
Ivar
var
=
class_getInstanceVariable
(
cls
,
c_key
);
if
(
var
)
{
[
self
setValue
:[
keyedValues
objectForKey
:
key
]
forKey
:
key
];
}
}
}
@end
@end
redstar/Classes/Module/Function/Question/QuestionList/Model/QuestionModel.h
View file @
e6c42abd
...
@@ -51,6 +51,6 @@
...
@@ -51,6 +51,6 @@
@property
(
nonatomic
,
strong
)
NSString
*
principal_code
;
@property
(
nonatomic
,
strong
)
NSString
*
principal_code
;
@property
(
nonatomic
,
strong
)
NSString
*
store_code
;
@property
(
nonatomic
,
strong
)
NSString
*
store_code
;
@property
(
nonatomic
,
strong
)
NSString
*
store_uuid
;
@property
(
nonatomic
,
strong
)
NSString
*
store_uuid
;
@property
(
nonatomic
,
strong
)
NSString
*
store_name
;
//
@property (nonatomic, strong) NSString *store_name;
@end
@end
redstar/Classes/Module/Function/Question/QuestionList/Model/QuestionModel.m
View file @
e6c42abd
...
@@ -7,7 +7,19 @@
...
@@ -7,7 +7,19 @@
//
//
#import "QuestionModel.h"
#import "QuestionModel.h"
#include <objc/runtime.h>
@implementation
QuestionModel
@implementation
QuestionModel
-
(
void
)
setValuesForKeysWithDictionary
:(
NSDictionary
<
NSString
*
,
id
>
*
)
keyedValues
{
Class
cls
=
self
.
class
;
for
(
NSString
*
key
in
keyedValues
.
allKeys
)
{
NSString
*
varName
=
[
NSString
stringWithFormat
:
@"_%@"
,
key
];
const
char
*
c_key
=
[
varName
cStringUsingEncoding
:
NSUTF8StringEncoding
];
Ivar
var
=
class_getInstanceVariable
(
cls
,
c_key
);
if
(
var
)
{
[
self
setValue
:[
keyedValues
objectForKey
:
key
]
forKey
:
key
];
}
}
}
@end
@end
redstar/Classes/Module/Function/Question/QuestionList/View/SearchToolBar.h
View file @
e6c42abd
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
@interface
SearchToolBar
:
UIView
<
UITextFieldDelegate
>
@interface
SearchToolBar
:
UIView
@property
(
nonatomic
,
strong
)
UITextField
*
searchTextFiled
;
// 搜索框
@property
(
nonatomic
,
strong
)
UITextField
*
searchTextFiled
;
// 搜索框
@property
(
nonatomic
,
strong
)
UIButton
*
queryButton
;
// 快速查询按钮
@property
(
nonatomic
,
strong
)
UIButton
*
queryButton
;
// 快速查询按钮
...
...
redstar/Classes/Module/Function/Question/QuestionList/View/SearchToolBar.m
View file @
e6c42abd
...
@@ -45,7 +45,6 @@
...
@@ -45,7 +45,6 @@
{
{
if
(
!
_searchTextFiled
)
{
if
(
!
_searchTextFiled
)
{
_searchTextFiled
=
[[
UITextField
alloc
]
init
];
_searchTextFiled
=
[[
UITextField
alloc
]
init
];
_searchTextFiled
.
delegate
=
self
;
_searchTextFiled
.
font
=
[
UIFont
systemFontOfSize
:
14
.
0
];
_searchTextFiled
.
font
=
[
UIFont
systemFontOfSize
:
14
.
0
];
_searchTextFiled
.
backgroundColor
=
[
UIColor
whiteColor
];
_searchTextFiled
.
backgroundColor
=
[
UIColor
whiteColor
];
_searchTextFiled
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_searchTextFiled
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
...
@@ -109,12 +108,6 @@
...
@@ -109,12 +108,6 @@
return
_queryButton
;
return
_queryButton
;
}
}
-
(
BOOL
)
textFieldShouldReturn
:
(
UITextField
*
)
textField
{
if
([
textField
resignFirstResponder
])
{
return
YES
;
}
return
NO
;
}
@end
@end
redstar/Classes/Module/Function/Question/QuestionList/ViewController/QuestionViewController.m
View file @
e6c42abd
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
#define kQuestionListCell @"questionListTableViewCell"
#define kQuestionListCell @"questionListTableViewCell"
#define kThumbTag 745645
#define kThumbTag 745645
@interface
QuestionViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
TaxisViewDelegate
,
ScopeTableViewDelegate
,
GroupTableViewDelegate
,
CategoryTableViewDelegate
,
StateTableViewDelegate
,
TimeTableViewDelegate
>
@interface
QuestionViewController
()
<
UIT
extFieldDelegate
,
UIT
ableViewDelegate
,
UITableViewDataSource
,
TaxisViewDelegate
,
ScopeTableViewDelegate
,
GroupTableViewDelegate
,
CategoryTableViewDelegate
,
StateTableViewDelegate
,
TimeTableViewDelegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allQuestionArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allQuestionArray
;
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
@property
(
nonatomic
,
assign
)
NSInteger
stateRow
;
@property
(
nonatomic
,
assign
)
NSInteger
stateRow
;
@property
(
nonatomic
,
assign
)
NSInteger
timeRow
;
@property
(
nonatomic
,
assign
)
NSInteger
timeRow
;
@property
(
nonatomic
,
strong
)
NSLayoutConstraint
*
searchBottom
;
@end
@end
@implementation
QuestionViewController
@implementation
QuestionViewController
...
@@ -404,7 +404,21 @@
...
@@ -404,7 +404,21 @@
NSPredicate
*
predicate
=
[
NSPredicate
predicateWithFormat
:
@"content CONTAINS %@ || title CONTAINS %@"
,
self
.
searchBar
.
searchTextFiled
.
text
,
self
.
searchBar
.
searchTextFiled
.
text
];
NSPredicate
*
predicate
=
[
NSPredicate
predicateWithFormat
:
@"content CONTAINS %@ || title CONTAINS %@"
,
self
.
searchBar
.
searchTextFiled
.
text
,
self
.
searchBar
.
searchTextFiled
.
text
];
NSArray
*
arrayPre
=
[
_allQuestionArray
filteredArrayUsingPredicate
:
predicate
];
NSArray
*
arrayPre
=
[
_allQuestionArray
filteredArrayUsingPredicate
:
predicate
];
_allQuestionArray
=
[
NSMutableArray
arrayWithArray
:
arrayPre
];
_allQuestionArray
=
[
NSMutableArray
arrayWithArray
:
arrayPre
];
[
self
.
tableView
reloadData
];
if
(
_allQuestionArray
.
count
==
0
)
{
if
(
_tableView
)
{
[
_tableView
removeFromSuperview
];
_tableView
=
nil
;
}
self
.
noDataView
.
backgroundColor
=
[
UIColor
whiteColor
];
}
else
{
if
(
_noDataView
)
{
[
_noDataView
removeFromSuperview
];
_noDataView
=
nil
;
}
self
.
searchBar
.
backgroundColor
=
kSectionBackGroundColor
;
[
self
.
tableView
reloadData
];
}
}
}
// 重置按钮
// 重置按钮
...
@@ -774,7 +788,7 @@
...
@@ -774,7 +788,7 @@
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableRight
];
[
self
.
view
addConstraint
:
tableRight
];
NSLayoutConstraint
*
tableBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
-
5
0
];
[
self
.
view
addConstraint
:
tableBottom
];
[
self
.
view
addConstraint
:
tableBottom
];
}
}
return
_tableView
;
return
_tableView
;
...
@@ -784,6 +798,7 @@
...
@@ -784,6 +798,7 @@
{
{
if
(
!
_searchBar
)
{
if
(
!
_searchBar
)
{
_searchBar
=
[[
SearchToolBar
alloc
]
init
];
_searchBar
=
[[
SearchToolBar
alloc
]
init
];
_searchBar
.
searchTextFiled
.
delegate
=
self
;
_searchBar
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_searchBar
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_searchBar
.
queryButton
addTarget
:
self
action
:
@selector
(
searchBarClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_searchBar
.
queryButton
addTarget
:
self
action
:
@selector
(
searchBarClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
insertSubview
:
_searchBar
aboveSubview
:
_tableView
];
[
self
.
view
insertSubview
:
_searchBar
aboveSubview
:
_tableView
];
...
@@ -799,8 +814,8 @@
...
@@ -799,8 +814,8 @@
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_searchBar
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_searchBar
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableRight
];
[
self
.
view
addConstraint
:
tableRight
];
NSLayoutConstraint
*
table
Bottom
=
[
NSLayoutConstraint
constraintWithItem
:
_searchBar
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
self
.
search
Bottom
=
[
NSLayoutConstraint
constraintWithItem
:
_searchBar
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
table
Bottom
];
[
self
.
view
addConstraint
:
self
.
search
Bottom
];
}
}
return
_searchBar
;
return
_searchBar
;
}
}
...
@@ -829,12 +844,37 @@
...
@@ -829,12 +844,37 @@
-
(
void
)
touchesEnded
:
(
NSSet
*
)
touches
withEvent
:
(
UIEvent
*
)
event
{
-
(
void
)
touchesEnded
:
(
NSSet
*
)
touches
withEvent
:
(
UIEvent
*
)
event
{
if
(
!
[
self
.
searchBar
.
searchTextFiled
isExclusiveTouch
])
{
if
(
!
[
self
.
searchBar
.
searchTextFiled
isExclusiveTouch
])
{
[
self
.
searchBar
.
searchTextFiled
resignFirstResponder
];
[
self
.
searchBar
.
searchTextFiled
resignFirstResponder
];
}
}
}
}
-
(
BOOL
)
textFieldShouldReturn
:
(
UITextField
*
)
textField
{
if
([
self
.
searchBar
.
searchTextFiled
resignFirstResponder
])
{
return
YES
;
}
return
NO
;
}
-
(
void
)
textFieldDidBeginEditing
:
(
UITextField
*
)
textField
{
self
.
searchBottom
.
constant
=
-
256
;
[
UIView
animateWithDuration
:
0
.
23
animations
:
^
{
[
self
.
searchBar
layoutIfNeeded
];
}];
}
-
(
void
)
textFieldDidEndEditing
:
(
UITextField
*
)
textField
{
self
.
searchBottom
.
constant
=
0
;
[
UIView
animateWithDuration
:
0
.
23
animations
:
^
{
[
self
.
searchBar
layoutIfNeeded
];
}];
}
/*
/*
#pragma mark - Navigation
#pragma mark - Navigation
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectList/Cell/InspectListCell.m
View file @
e6c42abd
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
image
=
[
image
resizableImageWithCapInsets
:
UIEdgeInsetsZero
resizingMode
:
UIImageResizingModeTile
];
image
=
[
image
resizableImageWithCapInsets
:
UIEdgeInsetsZero
resizingMode
:
UIImageResizingModeTile
];
self
.
alreadyView
.
image
=
image
;
self
.
alreadyView
.
image
=
image
;
NSLog
(
@"taskList = %@"
,
taskList
.
state
);
NSLog
(
@"taskList = %@"
,
taskList
.
state
);
if
([
taskList
.
state
isEqualToString
:
@"
initial
"
])
{
if
([
taskList
.
state
isEqualToString
:
@"
submitted
"
])
{
NSString
*
str
=
[
NSString
stringWithFormat
:
@"巡检进度:未处理"
];
NSString
*
str
=
[
NSString
stringWithFormat
:
@"巡检进度:未处理"
];
NSMutableAttributedString
*
strAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
str
];
NSMutableAttributedString
*
strAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
str
];
[
strAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kCellDetailColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
0
,
5
)];
[
strAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kCellDetailColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
0
,
5
)];
...
@@ -104,8 +104,8 @@
...
@@ -104,8 +104,8 @@
[
strAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kCellDetailColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
0
,
5
)];
[
strAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kCellDetailColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
0
,
5
)];
[
strAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kNavigationBarColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
5
,
str
.
length
-
5
)];
[
strAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kNavigationBarColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
5
,
str
.
length
-
5
)];
[
self
.
progressLabel
setAttributedText
:
strAttr
];
[
self
.
progressLabel
setAttributedText
:
strAttr
];
self
.
alreadyLabel
.
textColor
=
k
ProgressDealWith
Color
;
self
.
alreadyLabel
.
textColor
=
k
NavigationBar
Color
;
self
.
allLabel
.
textColor
=
k
ProgressDealWith
Color
;
self
.
allLabel
.
textColor
=
k
NavigationBar
Color
;
}
else
if
([
taskList
.
state
isEqualToString
:
@"expired"
]){
}
else
if
([
taskList
.
state
isEqualToString
:
@"expired"
]){
NSString
*
str
=
[
NSString
stringWithFormat
:
@"巡检进度:已过期"
];
NSString
*
str
=
[
NSString
stringWithFormat
:
@"巡检进度:已过期"
];
NSMutableAttributedString
*
strAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
str
];
NSMutableAttributedString
*
strAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
str
];
...
@@ -114,16 +114,7 @@
...
@@ -114,16 +114,7 @@
[
self
.
progressLabel
setAttributedText
:
strAttr
];
[
self
.
progressLabel
setAttributedText
:
strAttr
];
self
.
alreadyLabel
.
textColor
=
kProgressOverDueColor
;
self
.
alreadyLabel
.
textColor
=
kProgressOverDueColor
;
self
.
allLabel
.
textColor
=
kProgressOverDueColor
;
self
.
allLabel
.
textColor
=
kProgressOverDueColor
;
}
else
if
([
taskList
.
state
isEqualToString
:
@"submitted"
])
{
NSString
*
str
=
[
NSString
stringWithFormat
:
@"巡检进度:已提交"
];
NSMutableAttributedString
*
strAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
str
];
[
strAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kCellDetailColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
0
,
5
)];
[
strAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kProgressDealWithColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
5
,
str
.
length
-
5
)];
[
self
.
progressLabel
setAttributedText
:
strAttr
];
self
.
alreadyLabel
.
textColor
=
kProgressDealWithColor
;
self
.
allLabel
.
textColor
=
kProgressDealWithColor
;
}
else
{
}
else
{
}
}
}
}
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectList/Model/TaskListModel.m
View file @
e6c42abd
...
@@ -9,5 +9,15 @@
...
@@ -9,5 +9,15 @@
#import "TaskListModel.h"
#import "TaskListModel.h"
@implementation
TaskListModel
@implementation
TaskListModel
-
(
void
)
setValuesForKeysWithDictionary
:(
NSDictionary
<
NSString
*
,
id
>
*
)
keyedValues
{
Class
cls
=
self
.
class
;
for
(
NSString
*
key
in
keyedValues
.
allKeys
)
{
NSString
*
varName
=
[
NSString
stringWithFormat
:
@"_%@"
,
key
];
const
char
*
c_key
=
[
varName
cStringUsingEncoding
:
NSUTF8StringEncoding
];
Ivar
var
=
class_getInstanceVariable
(
cls
,
c_key
);
if
(
var
)
{
[
self
setValue
:[
keyedValues
objectForKey
:
key
]
forKey
:
key
];
}
}
}
@end
@end
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectList/ViewController/InspectListViewController.m
View file @
e6c42abd
...
@@ -212,7 +212,6 @@
...
@@ -212,7 +212,6 @@
{
{
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kInspectListURL
];
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kInspectListURL
];
NSLog
(
@"urlllll = %@"
,
url
);
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSDictionary
*
parameters
=
@{
NSDictionary
*
parameters
=
@{
@"userUuid"
:
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
],
@"userUuid"
:
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
],
...
@@ -220,7 +219,6 @@
...
@@ -220,7 +219,6 @@
@"pageNumber"
:
@
(
0
),
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
10
)
@"pageSize"
:
@
(
10
)
};
};
NSLog
(
@"parametersssssss = %@"
,
parameters
);
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
httpCilent
getInspectListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
[
httpCilent
getInspectListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
...
@@ -440,7 +438,7 @@
...
@@ -440,7 +438,7 @@
}
else
if
(
_selectRow
==
1
)
{
}
else
if
(
_selectRow
==
1
)
{
_screenView
.
textView
.
text
=
@""
;
_screenView
.
textView
.
text
=
@""
;
[
parameters
setObject
:
@"
initial
"
forKey
:
@"state"
];
[
parameters
setObject
:
@"
submitted
"
forKey
:
@"state"
];
}
else
if
(
_selectRow
==
2
)
{
}
else
if
(
_selectRow
==
2
)
{
_screenView
.
textView
.
text
=
@""
;
_screenView
.
textView
.
text
=
@""
;
[
parameters
setObject
:
@"processing"
forKey
:
@"state"
];
[
parameters
setObject
:
@"processing"
forKey
:
@"state"
];
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/Cell/InspectTaskDetailCell.m
View file @
e6c42abd
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
}
}
if
([
taskDetail
.
state
isEqualToString
:
@"
initial
"
])
{
if
([
taskDetail
.
state
isEqualToString
:
@"
submitted
"
])
{
if
(
taskDetail
.
reportCount
==
0
||
taskDetail
.
questionCount
==
0
)
{
if
(
taskDetail
.
reportCount
==
0
||
taskDetail
.
questionCount
==
0
)
{
self
.
progressLabel
.
text
=
@"0%"
;
self
.
progressLabel
.
text
=
@"0%"
;
}
else
{
}
else
{
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/Model/TaskDetailModel.m
View file @
e6c42abd
...
@@ -21,4 +21,16 @@
...
@@ -21,4 +21,16 @@
}
}
return
self
;
return
self
;
}
}
-
(
void
)
setValuesForKeysWithDictionary
:(
NSDictionary
<
NSString
*
,
id
>
*
)
keyedValues
{
Class
cls
=
self
.
class
;
for
(
NSString
*
key
in
keyedValues
.
allKeys
)
{
NSString
*
varName
=
[
NSString
stringWithFormat
:
@"_%@"
,
key
];
const
char
*
c_key
=
[
varName
cStringUsingEncoding
:
NSUTF8StringEncoding
];
Ivar
var
=
class_getInstanceVariable
(
cls
,
c_key
);
if
(
var
)
{
[
self
setValue
:[
keyedValues
objectForKey
:
key
]
forKey
:
key
];
}
}
}
@end
@end
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/Model/TaskModel.m
View file @
e6c42abd
...
@@ -22,4 +22,16 @@
...
@@ -22,4 +22,16 @@
}
}
return
self
;
return
self
;
}
}
-
(
void
)
setValuesForKeysWithDictionary
:(
NSDictionary
<
NSString
*
,
id
>
*
)
keyedValues
{
Class
cls
=
self
.
class
;
for
(
NSString
*
key
in
keyedValues
.
allKeys
)
{
NSString
*
varName
=
[
NSString
stringWithFormat
:
@"_%@"
,
key
];
const
char
*
c_key
=
[
varName
cStringUsingEncoding
:
NSUTF8StringEncoding
];
Ivar
var
=
class_getInstanceVariable
(
cls
,
c_key
);
if
(
var
)
{
[
self
setValue
:[
keyedValues
objectForKey
:
key
]
forKey
:
key
];
}
}
}
@end
@end
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/Model/RankCommentModel.m
View file @
e6c42abd
...
@@ -21,4 +21,15 @@
...
@@ -21,4 +21,15 @@
}
}
return
self
;
return
self
;
}
}
-
(
void
)
setValuesForKeysWithDictionary
:(
NSDictionary
<
NSString
*
,
id
>
*
)
keyedValues
{
Class
cls
=
self
.
class
;
for
(
NSString
*
key
in
keyedValues
.
allKeys
)
{
NSString
*
varName
=
[
NSString
stringWithFormat
:
@"_%@"
,
key
];
const
char
*
c_key
=
[
varName
cStringUsingEncoding
:
NSUTF8StringEncoding
];
Ivar
var
=
class_getInstanceVariable
(
cls
,
c_key
);
if
(
var
)
{
[
self
setValue
:[
keyedValues
objectForKey
:
key
]
forKey
:
key
];
}
}
}
@end
@end
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/Model/RankListModel.m
View file @
e6c42abd
...
@@ -21,5 +21,15 @@
...
@@ -21,5 +21,15 @@
}
}
return
self
;
return
self
;
}
}
-
(
void
)
setValuesForKeysWithDictionary
:(
NSDictionary
<
NSString
*
,
id
>
*
)
keyedValues
{
Class
cls
=
self
.
class
;
for
(
NSString
*
key
in
keyedValues
.
allKeys
)
{
NSString
*
varName
=
[
NSString
stringWithFormat
:
@"_%@"
,
key
];
const
char
*
c_key
=
[
varName
cStringUsingEncoding
:
NSUTF8StringEncoding
];
Ivar
var
=
class_getInstanceVariable
(
cls
,
c_key
);
if
(
var
)
{
[
self
setValue
:[
keyedValues
objectForKey
:
key
]
forKey
:
key
];
}
}
}
@end
@end
redstar/redstar.pch
View file @
e6c42abd
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
#import "Constant.h"
#import "Constant.h"
#import "Url.h"
#import "Url.h"
#include <objc/runtime.h>
#endif /* redstar_pch */
#endif /* redstar_pch */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment