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
9 years ago
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改添加字段崩溃的bug
parent
e0dda623
Show 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
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Announce/AnnounceDetail/Model/AnnounceDetailModel.m
View file @
e6c42abd
...
...
@@ -21,4 +21,15 @@
}
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
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Announce/AnnounceList/Model/AnnounceModel.m
View file @
e6c42abd
...
...
@@ -21,4 +21,15 @@
}
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
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/OnLine/SelectStore/Model/AreaModel.m
View file @
e6c42abd
...
...
@@ -23,4 +23,16 @@
{
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
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/OnLine/SelectStore/Model/ProvinceModel.m
View file @
e6c42abd
...
...
@@ -23,5 +23,15 @@
{
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
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/OnLine/SelectStore/Model/StoreModel.m
View file @
e6c42abd
...
...
@@ -22,4 +22,16 @@
{
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
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/OnLine/SelectStore/ViewController/SelectStoreViewController.m
View file @
e6c42abd
...
...
@@ -179,10 +179,7 @@ NSLog(@"22level = %ld", level);
}
-
(
CGFloat
)
treeView
:
(
RATreeView
*
)
treeView
heightForRowForItem
:
(
id
)
item
{
return
44
;
}
-
(
BOOL
)
treeView
:
(
RATreeView
*
)
treeView
canEditRowForItem
:
(
id
)
item
{
...
...
@@ -196,6 +193,8 @@ NSLog(@"22level = %ld", level);
if
(
!
_treeView
)
{
_treeView
=
[[
RATreeView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
_treeView
.
treeFooterView
=
[
UIView
new
];
_treeView
.
rowHeight
=
UITableViewAutomaticDimension
;
_treeView
.
estimatedRowHeight
=
150
.
0
;
[
self
.
view
addSubview
:
_treeView
];
}
return
_treeView
;
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/Picture/PictureDetail/Model/PicTextModel.m
View file @
e6c42abd
...
...
@@ -13,4 +13,16 @@
if
([
key
isEqualToString
:
@"description"
])
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
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/Picture/PictureDetail/Model/PictureDetailModel.m
View file @
e6c42abd
...
...
@@ -9,5 +9,15 @@
#import "PictureDetailModel.h"
@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
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/Picture/PictureList/Model/PictureListModel.m
View file @
e6c42abd
...
...
@@ -9,5 +9,15 @@
#import "PictureListModel.h"
@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
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/Question/QuestionDetail/Model/CommentModel.m
View file @
e6c42abd
...
...
@@ -9,5 +9,15 @@
#import "CommentModel.h"
@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
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/Question/QuestionDetail/Model/QuestionDetailModel.m
View file @
e6c42abd
...
...
@@ -9,5 +9,15 @@
#import "QuestionDetailModel.h"
@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
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/Question/QuestionList/Model/QuestionModel.h
View file @
e6c42abd
...
...
@@ -51,6 +51,6 @@
@property
(
nonatomic
,
strong
)
NSString
*
principal_code
;
@property
(
nonatomic
,
strong
)
NSString
*
store_code
;
@property
(
nonatomic
,
strong
)
NSString
*
store_uuid
;
@property
(
nonatomic
,
strong
)
NSString
*
store_name
;
//
@property (nonatomic, strong) NSString *store_name;
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/Question/QuestionList/Model/QuestionModel.m
View file @
e6c42abd
...
...
@@ -7,7 +7,19 @@
//
#import "QuestionModel.h"
#include <objc/runtime.h>
@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
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/Question/QuestionList/View/SearchToolBar.h
View file @
e6c42abd
...
...
@@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
@interface
SearchToolBar
:
UIView
<
UITextFieldDelegate
>
@interface
SearchToolBar
:
UIView
@property
(
nonatomic
,
strong
)
UITextField
*
searchTextFiled
;
// 搜索框
@property
(
nonatomic
,
strong
)
UIButton
*
queryButton
;
// 快速查询按钮
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/Question/QuestionList/View/SearchToolBar.m
View file @
e6c42abd
...
...
@@ -45,7 +45,6 @@
{
if
(
!
_searchTextFiled
)
{
_searchTextFiled
=
[[
UITextField
alloc
]
init
];
_searchTextFiled
.
delegate
=
self
;
_searchTextFiled
.
font
=
[
UIFont
systemFontOfSize
:
14
.
0
];
_searchTextFiled
.
backgroundColor
=
[
UIColor
whiteColor
];
_searchTextFiled
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
...
...
@@ -109,12 +108,6 @@
return
_queryButton
;
}
-
(
BOOL
)
textFieldShouldReturn
:
(
UITextField
*
)
textField
{
if
([
textField
resignFirstResponder
])
{
return
YES
;
}
return
NO
;
}
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/Question/QuestionList/ViewController/QuestionViewController.m
View file @
e6c42abd
...
...
@@ -27,7 +27,7 @@
#define kQuestionListCell @"questionListTableViewCell"
#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
)
NSMutableArray
*
allQuestionArray
;
...
...
@@ -54,7 +54,7 @@
@property
(
nonatomic
,
assign
)
NSInteger
stateRow
;
@property
(
nonatomic
,
assign
)
NSInteger
timeRow
;
@property
(
nonatomic
,
strong
)
NSLayoutConstraint
*
searchBottom
;
@end
@implementation
QuestionViewController
...
...
@@ -404,7 +404,21 @@
NSPredicate
*
predicate
=
[
NSPredicate
predicateWithFormat
:
@"content CONTAINS %@ || title CONTAINS %@"
,
self
.
searchBar
.
searchTextFiled
.
text
,
self
.
searchBar
.
searchTextFiled
.
text
];
NSArray
*
arrayPre
=
[
_allQuestionArray
filteredArrayUsingPredicate
:
predicate
];
_allQuestionArray
=
[
NSMutableArray
arrayWithArray
:
arrayPre
];
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 @@
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
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
];
}
return
_tableView
;
...
...
@@ -784,6 +798,7 @@
{
if
(
!
_searchBar
)
{
_searchBar
=
[[
SearchToolBar
alloc
]
init
];
_searchBar
.
searchTextFiled
.
delegate
=
self
;
_searchBar
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_searchBar
.
queryButton
addTarget
:
self
action
:
@selector
(
searchBarClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
insertSubview
:
_searchBar
aboveSubview
:
_tableView
];
...
...
@@ -799,8 +814,8 @@
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_searchBar
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
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
.
view
addConstraint
:
table
Bottom
];
self
.
search
Bottom
=
[
NSLayoutConstraint
constraintWithItem
:
_searchBar
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
self
.
search
Bottom
];
}
return
_searchBar
;
}
...
...
@@ -829,12 +844,37 @@
-
(
void
)
touchesEnded
:
(
NSSet
*
)
touches
withEvent
:
(
UIEvent
*
)
event
{
if
(
!
[
self
.
searchBar
.
searchTextFiled
isExclusiveTouch
])
{
[
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
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectList/Cell/InspectListCell.m
View file @
e6c42abd
...
...
@@ -66,7 +66,7 @@
image
=
[
image
resizableImageWithCapInsets
:
UIEdgeInsetsZero
resizingMode
:
UIImageResizingModeTile
];
self
.
alreadyView
.
image
=
image
;
NSLog
(
@"taskList = %@"
,
taskList
.
state
);
if
([
taskList
.
state
isEqualToString
:
@"
initial
"
])
{
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
)];
...
...
@@ -104,8 +104,8 @@
[
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
)];
[
self
.
progressLabel
setAttributedText
:
strAttr
];
self
.
alreadyLabel
.
textColor
=
k
ProgressDealWith
Color
;
self
.
allLabel
.
textColor
=
k
ProgressDealWith
Color
;
self
.
alreadyLabel
.
textColor
=
k
NavigationBar
Color
;
self
.
allLabel
.
textColor
=
k
NavigationBar
Color
;
}
else
if
([
taskList
.
state
isEqualToString
:
@"expired"
]){
NSString
*
str
=
[
NSString
stringWithFormat
:
@"巡检进度:已过期"
];
NSMutableAttributedString
*
strAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
str
];
...
...
@@ -114,16 +114,7 @@
[
self
.
progressLabel
setAttributedText
:
strAttr
];
self
.
alreadyLabel
.
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
{
}
}
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectList/Model/TaskListModel.m
View file @
e6c42abd
...
...
@@ -9,5 +9,15 @@
#import "TaskListModel.h"
@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
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectList/ViewController/InspectListViewController.m
View file @
e6c42abd
...
...
@@ -212,7 +212,6 @@
{
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kInspectListURL
];
NSLog
(
@"urlllll = %@"
,
url
);
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSDictionary
*
parameters
=
@{
@"userUuid"
:
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
],
...
...
@@ -220,7 +219,6 @@
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
10
)
};
NSLog
(
@"parametersssssss = %@"
,
parameters
);
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
httpCilent
getInspectListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
...
...
@@ -440,7 +438,7 @@
}
else
if
(
_selectRow
==
1
)
{
_screenView
.
textView
.
text
=
@""
;
[
parameters
setObject
:
@"
initial
"
forKey
:
@"state"
];
[
parameters
setObject
:
@"
submitted
"
forKey
:
@"state"
];
}
else
if
(
_selectRow
==
2
)
{
_screenView
.
textView
.
text
=
@""
;
[
parameters
setObject
:
@"processing"
forKey
:
@"state"
];
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/Cell/InspectTaskDetailCell.m
View file @
e6c42abd
...
...
@@ -85,7 +85,7 @@
}
if
([
taskDetail
.
state
isEqualToString
:
@"
initial
"
])
{
if
([
taskDetail
.
state
isEqualToString
:
@"
submitted
"
])
{
if
(
taskDetail
.
reportCount
==
0
||
taskDetail
.
questionCount
==
0
)
{
self
.
progressLabel
.
text
=
@"0%"
;
}
else
{
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/Model/TaskDetailModel.m
View file @
e6c42abd
...
...
@@ -21,4 +21,16 @@
}
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
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/Model/TaskModel.m
View file @
e6c42abd
...
...
@@ -22,4 +22,16 @@
}
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
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/Model/RankCommentModel.m
View file @
e6c42abd
...
...
@@ -21,4 +21,15 @@
}
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
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/Model/RankListModel.m
View file @
e6c42abd
...
...
@@ -21,5 +21,15 @@
}
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
This diff is collapsed.
Click to expand it.
redstar/redstar.pch
View file @
e6c42abd
...
...
@@ -14,6 +14,7 @@
#import "Constant.h"
#import "Url.h"
#include <objc/runtime.h>
#endif /* redstar_pch */
This diff is collapsed.
Click to expand it.
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