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
b8f86f8d
Commit
b8f86f8d
authored
Jan 11, 2016
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
问题分类接口完成
parent
e9bb3198
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
192 additions
and
138 deletions
+192
-138
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Breakpoints_v2.xcbkptlist
...ta/admin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+0
-32
PictureStoryViewController.m
...PictureDetail/ViewController/PictureStoryViewController.m
+1
-1
AddQuestionViewController.m
...on/AddQuestion/ViewController/AddQuestionViewController.m
+105
-41
CategoryTableView.h
...n/Question/QuestionList/View/SubViews/CategoryTableView.h
+1
-1
CategoryTableView.m
...n/Question/QuestionList/View/SubViews/CategoryTableView.m
+42
-45
GroupTableView.h
...tion/Question/QuestionList/View/SubViews/GroupTableView.h
+1
-1
GroupTableView.m
...tion/Question/QuestionList/View/SubViews/GroupTableView.m
+8
-7
QuestionViewController.m
...tion/QuestionList/ViewController/QuestionViewController.m
+34
-10
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
b8f86f8d
No preview for this file type
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
View file @
b8f86f8d
...
...
@@ -13,38 +13,6 @@
stopOnStyle =
"0"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"redstar/Classes/Module/Function/Question/AddQuestion/ViewController/AddQuestionViewController.m"
timestampString =
"473677271.6783"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"315"
endingLineNumber =
"315"
landmarkName =
"-alertView:clickedButtonAtIndex:"
landmarkType =
"5"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"redstar/Classes/Module/Function/Question/AddQuestion/ViewController/AddQuestionViewController.m"
timestampString =
"473677272.558419"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"312"
endingLineNumber =
"312"
landmarkName =
"-alertView:clickedButtonAtIndex:"
landmarkType =
"5"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
...
...
redstar/Classes/Module/Function/Picture/PictureDetail/ViewController/PictureStoryViewController.m
View file @
b8f86f8d
...
...
@@ -123,7 +123,7 @@
}
else
{
imageName
=
[
CommonFunc
md5Data
:
data
];
NSString
*
fullPath
=
[[
NSSearchPathForDirectoriesInDomains
(
NSDocumentDirectory
,
NSUserDomainMask
,
YES
)
objectAtIndex
:
0
]
stringByAppendingPathComponent
:[
NSString
stringWithFormat
:
@"%@"
,
imageName
]];
[
_imageNameArray
addObject
:
imageName
];
//
[_imageNameArray addObject:imageName];
[
data
writeToFile
:
fullPath
atomically
:
NO
];
}
...
...
redstar/Classes/Module/Function/Question/AddQuestion/ViewController/AddQuestionViewController.m
View file @
b8f86f8d
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/CategoryTableView.h
View file @
b8f86f8d
...
...
@@ -11,7 +11,7 @@
@protocol
CategoryTableViewDelegate
<
NSObject
>
-
(
void
)
categoryTableViewClick
:
(
NSString
*
)
categoryName
GroupTitle
:
(
NSString
*
)
groupTitle
;
-
(
void
)
categoryTableViewClick
:
(
NSString
*
)
categoryName
;
@end
...
...
redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/CategoryTableView.m
View file @
b8f86f8d
...
...
@@ -40,61 +40,59 @@
-
(
void
)
setup
{
self
.
questionDict
=
[
NSMutableDictionary
dictionary
];
[
_questionDict
setObject
:[
NSArray
arrayWithObjects
:
@"15分钟退单"
,
@"便民服务"
,
@"基础管理"
,
@"轻松购系统"
,
@"营运物料"
,
@"服务承诺"
,
@"人员形象"
,
@"全员服务"
,
@"其他"
,
nil
]
forKey
:
@"服务"
];
[
_questionDict
setObject
:[
NSArray
arrayWithObjects
:
@"导视系统"
,
@"背景音乐"
,
@"物料规范"
,
@"儿童区"
,
@"休息区"
,
@"其他"
,
nil
]
forKey
:
@"环境企划"
];
[
_questionDict
setObject
:[
NSArray
arrayWithObjects
:
@"基础环境"
,
@"物料标识"
,
@"停车场"
,
@"卫生间"
,
@"硬件改造"
,
@"人员"
,
@"其他"
,
nil
]
forKey
:
@"环境物业"
];
[
_questionDict
setObject
:[
NSArray
arrayWithObjects
:
@"七折管理"
,
@"价签物料"
,
@"其他"
,
nil
]
forKey
:
@"价格"
];
[
_questionDict
setObject
:[
NSArray
arrayWithObjects
:
@"绿色陈展"
,
@"三年质保"
,
@"其他"
,
nil
]
forKey
:
@"质量"
];
[
_questionDict
setObject
:[
NSArray
arrayWithObjects
:
@"商户信用分类"
,
nil
]
forKey
:
@"商户信用分类"
];
[
_questionDict
setObject
:[
NSArray
arrayWithObjects
:
@"审批、比价、采购"
,
nil
]
forKey
:
@"审批比价采购"
];
[
_questionDict
setObject
:[
NSArray
arrayWithObjects
:
@"送货跟单"
,
nil
]
forKey
:
@"送货跟单"
];
[
_questionDict
setObject
:[
NSArray
arrayWithObjects
:
@"指标"
,
nil
]
forKey
:
@"指标"
];
[
_questionDict
setObject
:[
NSArray
arrayWithObjects
:
@"其他"
,
nil
]
forKey
:
@"其他"
];
self
.
delegate
=
self
;
self
.
dataSource
=
self
;
self
.
titleArray
=
[
NSMutableArray
array
WithArray
:[
NSArray
arrayWithObjects
:
@"15分钟退单"
,
@"便民服务"
,
@"基础管理"
,
@"轻松购系统"
,
@"营运物料"
,
@"服务承诺"
,
@"人员形象"
,
@"全员服务"
,
@"其他"
,
nil
]
];
self
.
titleArray
=
[
NSMutableArray
array
];
self
.
categoryArray
=
[
NSMutableArray
array
];
NSInteger
selectedIndex
=
0
;
NSIndexPath
*
selectedIndexPath
=
[
NSIndexPath
indexPathForRow
:
selectedIndex
inSection
:
0
];
[
self
selectRowAtIndexPath
:
selectedIndexPath
animated
:
NO
scrollPosition
:
UITableViewScrollPositionNone
];
NSMutableArray
*
array
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"groupAllName"
];
NSMutableDictionary
*
dict
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"groupTitle"
];
if
(
array
.
count
!=
0
)
{
NSString
*
name
=
array
[
0
];
NSString
*
groupUuid
=
[
dict
objectForKey
:
name
];
[
self
requestCategoryListWithGroupUuid
:
groupUuid
];
}
//注册通知
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
reloadCurrentTableView
:
)
name
:
kQuestionGroupNotification
object
:
nil
];
}
-
(
void
)
requestCategoryListWithGroupUuid
:
(
NSString
*
)
groupUuid
{
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@%@"
,
kRedStarURL
,
kQuestionCategoryURL
,
groupUuid
];
url
=
[
url
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
HttpClient
*
http
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
http
getQuestionCategoryWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"分类categaory response= %@"
,
response
);
if
(
response
[
@"success"
])
{
NSDictionary
*
dictData
=
response
[
@"data"
];
NSArray
*
array
=
dictData
[
@"records"
];
NSMutableArray
*
groupArray
=
[
NSMutableArray
array
];
NSMutableArray
*
categoryArray
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
dict
in
array
)
{
NSString
*
category
=
[
NSString
stringWithFormat
:
@"%@"
,
dict
[
@"name"
]];
NSString
*
group
=
[
NSString
stringWithFormat
:
@"%@"
,
dict
[
@"groupName"
]];
[
categoryArray
addObject
:
category
];
[
groupArray
addObject
:
group
];
}
_titleArray
=
categoryArray
;
_categoryArray
=
categoryArray
;
[
self
reloadData
];
}
}];
}
-
(
void
)
reloadCurrentTableView
:
(
NSNotification
*
)
notification
{
_cateStr
=
[
NSString
stringWithFormat
:
@"%@"
,
notification
.
userInfo
[
@"groupName"
]];
NSArray
*
selectArray
=
[
NSArray
arrayWithArray
:[
_questionDict
objectForKey
:
_cateStr
]];
_titleArray
=
[
NSMutableArray
arrayWithArray
:
selectArray
];
[
self
reloadData
];
// NSString *url = [NSString stringWithFormat:@"%@%@%@",kRedStarURL, kQuestionCategoryURL, notification.userInfo[@"groupName"]];
// url = [url stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
// HttpClient *http = [[HttpClient alloc] initWithUrl:url];
// [http getQuestionCategoryWithCompletion:^(id response, NSError *error) {
// NSLog(@"分类categaory response= %@", response);
// if (response[@"success"]) {
// NSDictionary *dictData = response[@"data"];
// NSArray *array = dictData[@"records"];
// NSMutableArray *groupArray = [NSMutableArray array];
// NSMutableArray *categoryArray = [NSMutableArray array];
// for (NSDictionary *dict in array) {
// NSString *category = [NSString stringWithFormat:@"%@", dict[@"name"]];
// NSString *group = [NSString stringWithFormat:@"%@", dict[@"groupName"]];
// [categoryArray addObject:category];
// [groupArray addObject:group];
//
// }
// _titleArray = categoryArray;
// _categoryArray = categoryArray;
// [self reloadData];
// }
// }];
[
self
requestCategoryListWithGroupUuid
:
notification
.
userInfo
[
@"groupUuid"
]];
}
-
(
void
)
dealloc
...
...
@@ -126,10 +124,9 @@
// cell点击事件
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
// NSString *cateName = _categoryArray[indexPath.row];
NSString
*
group
=
_titleArray
[
indexPath
.
row
];
if
(
_categroyDeleagte
&&
[
_categroyDeleagte
respondsToSelector
:
@selector
(
categoryTableViewClick
:
GroupTitle
:
)])
{
[
_categroyDeleagte
categoryTableViewClick
:
_cateStr
GroupTitle
:
group
];
NSString
*
cateName
=
_titleArray
[
indexPath
.
row
];
if
(
_categroyDeleagte
&&
[
_categroyDeleagte
respondsToSelector
:
@selector
(
categoryTableViewClick
:)])
{
[
_categroyDeleagte
categoryTableViewClick
:
cateName
];
}
}
...
...
redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/GroupTableView.h
View file @
b8f86f8d
...
...
@@ -9,7 +9,7 @@
#import <UIKit/UIKit.h>
@protocol
GroupTableViewDelegate
<
NSObject
>
-
(
void
)
groupTableViewClick
:
(
NS
String
*
)
groupName
;
-
(
void
)
groupTableViewClick
:
(
NS
Integer
)
groupRow
;
@end
@interface
GroupTableView
:
UITableView
...
...
redstar/Classes/Module/Function/Question/QuestionList/View/SubViews/GroupTableView.m
View file @
b8f86f8d
...
...
@@ -41,9 +41,9 @@
[
self
selectRowAtIndexPath
:
selectedIndexPath
animated
:
NO
scrollPosition
:
UITableViewScrollPositionNone
];
// NSMutableArray *array = [[NSUserDefaults standardUserDefaults] objectForKey:@"groupTitl
e"];
// self.titleArray = [NSMutableArray arrayWithArray:array];
_titleArray
=
[
NSMutableArray
arrayWithObjects
:
@"服务"
,
@"环境企划"
,
@"环境物业"
,
@"价格"
,
@"质量"
,
@"商户信用分类"
,
@"审批比价采购"
,
@"送货跟单"
,
@"指标"
,
@"其他"
,
nil
];
NSMutableArray
*
array
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"groupAllNam
e"
];
self
.
titleArray
=
[
NSMutableArray
arrayWithArray
:
array
];
self
.
delegate
=
self
;
self
.
dataSource
=
self
;
...
...
@@ -76,11 +76,12 @@
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
NSString
*
title
=
[
NSString
stringWithFormat
:
@"%@"
,
_titleArray
[
indexPath
.
row
]];
NSDictionary
*
dict
=
[[
NSDictionary
alloc
]
initWithObjectsAndKeys
:
title
,
@"groupName"
,
nil
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
kQuestionGroupNotification
object
:
self
userInfo
:
dict
];
NSMutableDictionary
*
dict
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"groupTitle"
];
NSString
*
groupUuid
=
[
dict
objectForKey
:
title
];
NSDictionary
*
categaryDict
=
[[
NSDictionary
alloc
]
initWithObjectsAndKeys
:
groupUuid
,
@"groupUuid"
,
nil
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
kQuestionGroupNotification
object
:
self
userInfo
:
categaryDict
];
if
(
_groupDeleagte
&&
[
_groupDeleagte
respondsToSelector
:
@selector
(
groupTableViewClick
:)])
{
[
_groupDeleagte
groupTableViewClick
:
title
];
[
_groupDeleagte
groupTableViewClick
:
indexPath
.
row
];
}
}
...
...
redstar/Classes/Module/Function/Question/QuestionList/ViewController/QuestionViewController.m
View file @
b8f86f8d
...
...
@@ -47,9 +47,10 @@
@property
(
nonatomic
,
assign
)
NSInteger
scopeRow
;
// 分组
@property
(
nonatomic
,
copy
)
NSString
*
groupName
;
@property
(
nonatomic
,
assign
)
NSInteger
groupRow
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allGroupNameArray
;
// 分类
@property
(
nonatomic
,
copy
)
NSString
*
groupTitle
;
@property
(
nonatomic
,
copy
)
NSString
*
categoryName
;
@property
(
nonatomic
,
assign
)
NSInteger
stateRow
;
@property
(
nonatomic
,
assign
)
NSInteger
timeRow
;
...
...
@@ -81,8 +82,32 @@
object
:
nil
];
_page
=
0
;
//[self requestGroupTitle];
_groupRow
=
0
;
[
self
requestGroupTitle
];
}
// 请求问题专业组
-
(
void
)
requestGroupTitle
{
self
.
allGroupNameArray
=
[
NSMutableArray
array
];
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kQuestionGroupURL
]];
[
httpClient
getQuestionGroupWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"问题与专业分组 === %@"
,
response
);
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSArray
*
dataArray
=
dataDict
[
@"records"
];
NSMutableDictionary
*
dict
=
[
NSMutableDictionary
dictionary
];
NSMutableArray
*
nameArray
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
groupDict
in
dataArray
)
{
NSString
*
name
=
[
NSString
stringWithFormat
:
@"%@"
,
groupDict
[
@"name"
]];
NSString
*
groupUuid
=
[
NSString
stringWithFormat
:
@"%@"
,
groupDict
[
@"uuid"
]];
[
dict
setObject
:
groupUuid
forKey
:
name
];
[
nameArray
addObject
:
name
];
}
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
dict
forKey
:
@"groupTitle"
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
nameArray
forKey
:
@"groupAllName"
];
_allGroupNameArray
=
nameArray
;
}];
}
-
(
void
)
dealloc
...
...
@@ -468,13 +493,13 @@
[
parameters
setObject
:
array
forKey
:
@"queryOrders"
];
}
else
if
(
_screenView
.
groupTabBar
.
selectNumber
==
1
)
{
// 分组
[
parameters
setObject
:
_
groupName
forKey
:
@"group"
];
[
parameters
setObject
:
_
allGroupNameArray
[
_groupRow
]
forKey
:
@"group"
];
NSArray
*
array
=
@[@{
@"field"
:
@"group"
,
@"direction"
:
@"asc"
}];
[
parameters
setObject
:
array
forKey
:
@"queryOrders"
];
}
else
if
(
_screenView
.
groupTabBar
.
selectNumber
==
2
)
{
[
parameters
setObject
:
_
groupTitle
forKey
:
@"group"
];
[
parameters
setObject
:
_
allGroupNameArray
[
_groupRow
]
forKey
:
@"group"
];
[
parameters
setObject
:
_categoryName
forKey
:
@"category"
];
NSArray
*
array
=
@[@{
@"field"
:
@"category"
,
@"direction"
:
@"asc"
}];
...
...
@@ -604,15 +629,14 @@
_scopeRow
=
row
;
}
-
(
void
)
groupTableViewClick
:
(
NS
String
*
)
groupName
-
(
void
)
groupTableViewClick
:
(
NS
Integer
)
groupRow
{
_group
Name
=
groupName
;
_group
Row
=
groupRow
;
}
-
(
void
)
categoryTableViewClick
:
(
NSString
*
)
categoryName
GroupTitle
:
(
NSString
*
)
groupTitle
-
(
void
)
categoryTableViewClick
:
(
NSString
*
)
categoryName
{
_categoryName
=
categoryName
;
_groupTitle
=
groupTitle
;
}
-
(
void
)
stateTableViewClick
:
(
NSInteger
)
row
...
...
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