Commit 1ec3b7df1a7e8b97895fc9b2a5ba48d8e90a4043

Authored by Cao yang
1 parent 028d32ac
Exists in parentassistant

修改成长页面

Showing 37 changed files with 1270 additions and 1153 deletions   Show diff stats
ParentAssistant/ParentAssistant.xcodeproj/project.pbxproj
@@ -42,6 +42,7 @@ @@ -42,6 +42,7 @@
42 AD65FB7A20637F110052415B /* MoralViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD65FB7920637F110052415B /* MoralViewController.swift */; }; 42 AD65FB7A20637F110052415B /* MoralViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD65FB7920637F110052415B /* MoralViewController.swift */; };
43 ADAEA3982064960300A47D2C /* SceneDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADAEA3972064960300A47D2C /* SceneDetailViewController.swift */; }; 43 ADAEA3982064960300A47D2C /* SceneDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADAEA3972064960300A47D2C /* SceneDetailViewController.swift */; };
44 ADAEA39A2064C44900A47D2C /* LineChartView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADAEA3992064C44900A47D2C /* LineChartView.swift */; }; 44 ADAEA39A2064C44900A47D2C /* LineChartView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADAEA3992064C44900A47D2C /* LineChartView.swift */; };
  45 + ADC9AB72207C55CE00348EF1 /* GrowViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC9AB71207C55CE00348EF1 /* GrowViewController.swift */; };
45 ADE33B312062202300BEA6E6 /* Macro.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE33B302062202300BEA6E6 /* Macro.swift */; }; 46 ADE33B312062202300BEA6E6 /* Macro.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE33B302062202300BEA6E6 /* Macro.swift */; };
46 ADF159612069E00000A9485D /* CalendarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF159602069E00000A9485D /* CalendarView.swift */; }; 47 ADF159612069E00000A9485D /* CalendarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF159602069E00000A9485D /* CalendarView.swift */; };
47 BF388469205A4DE900A240EF /* StudentClassInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF388468205A4DE900A240EF /* StudentClassInfo.swift */; }; 48 BF388469205A4DE900A240EF /* StudentClassInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF388468205A4DE900A240EF /* StudentClassInfo.swift */; };
@@ -188,6 +189,7 @@ @@ -188,6 +189,7 @@
188 AD65FB7920637F110052415B /* MoralViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoralViewController.swift; sourceTree = "<group>"; }; 189 AD65FB7920637F110052415B /* MoralViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoralViewController.swift; sourceTree = "<group>"; };
189 ADAEA3972064960300A47D2C /* SceneDetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SceneDetailViewController.swift; sourceTree = "<group>"; }; 190 ADAEA3972064960300A47D2C /* SceneDetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SceneDetailViewController.swift; sourceTree = "<group>"; };
190 ADAEA3992064C44900A47D2C /* LineChartView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LineChartView.swift; sourceTree = "<group>"; }; 191 ADAEA3992064C44900A47D2C /* LineChartView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LineChartView.swift; sourceTree = "<group>"; };
  192 + ADC9AB71207C55CE00348EF1 /* GrowViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GrowViewController.swift; sourceTree = "<group>"; };
191 ADE33B302062202300BEA6E6 /* Macro.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Macro.swift; sourceTree = "<group>"; }; 193 ADE33B302062202300BEA6E6 /* Macro.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Macro.swift; sourceTree = "<group>"; };
192 ADF159602069E00000A9485D /* CalendarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarView.swift; sourceTree = "<group>"; }; 194 ADF159602069E00000A9485D /* CalendarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarView.swift; sourceTree = "<group>"; };
193 BF388468205A4DE900A240EF /* StudentClassInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StudentClassInfo.swift; sourceTree = "<group>"; }; 195 BF388468205A4DE900A240EF /* StudentClassInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StudentClassInfo.swift; sourceTree = "<group>"; };
@@ -375,7 +377,7 @@ @@ -375,7 +377,7 @@
375 BFEAAAA5205117DA0072FAAF /* main */, 377 BFEAAAA5205117DA0072FAAF /* main */,
376 599364DA204E62E700C8B371 /* evaluation */, 378 599364DA204E62E700C8B371 /* evaluation */,
377 599364E0204E62E700C8B371 /* Information */, 379 599364E0204E62E700C8B371 /* Information */,
378 - 599364E6204E62E700C8B371 /* report */, 380 + 599364E6204E62E700C8B371 /* Grow */,
379 599364E2204E62E700C8B371 /* my */, 381 599364E2204E62E700C8B371 /* my */,
380 599364FD204E941900C8B371 /* userCenter */, 382 599364FD204E941900C8B371 /* userCenter */,
381 ); 383 );
@@ -425,15 +427,17 @@ @@ -425,15 +427,17 @@
425 path = View; 427 path = View;
426 sourceTree = "<group>"; 428 sourceTree = "<group>";
427 }; 429 };
428 - 599364E6204E62E700C8B371 /* report */ = { 430 + 599364E6204E62E700C8B371 /* Grow */ = {
429 isa = PBXGroup; 431 isa = PBXGroup;
430 children = ( 432 children = (
  433 + ADC9AB70207C558600348EF1 /* Model */,
  434 + ADC9AB71207C55CE00348EF1 /* GrowViewController.swift */,
431 599364E7204E62E700C8B371 /* ReportViewController.swift */, 435 599364E7204E62E700C8B371 /* ReportViewController.swift */,
432 AD65FB7920637F110052415B /* MoralViewController.swift */, 436 AD65FB7920637F110052415B /* MoralViewController.swift */,
433 ADAEA3972064960300A47D2C /* SceneDetailViewController.swift */, 437 ADAEA3972064960300A47D2C /* SceneDetailViewController.swift */,
434 BF3B829E2050CC7E002078EA /* View */, 438 BF3B829E2050CC7E002078EA /* View */,
435 ); 439 );
436 - path = report; 440 + path = Grow;
437 sourceTree = "<group>"; 441 sourceTree = "<group>";
438 }; 442 };
439 599364F1204E632600C8B371 /* util */ = { 443 599364F1204E632600C8B371 /* util */ = {
@@ -473,6 +477,13 @@ @@ -473,6 +477,13 @@
473 path = userCenter; 477 path = userCenter;
474 sourceTree = "<group>"; 478 sourceTree = "<group>";
475 }; 479 };
  480 + ADC9AB70207C558600348EF1 /* Model */ = {
  481 + isa = PBXGroup;
  482 + children = (
  483 + );
  484 + path = Model;
  485 + sourceTree = "<group>";
  486 + };
476 B605235D289EDBCA5C5AF2C5 /* Frameworks */ = { 487 B605235D289EDBCA5C5AF2C5 /* Frameworks */ = {
477 isa = PBXGroup; 488 isa = PBXGroup;
478 children = ( 489 children = (
@@ -952,6 +963,7 @@ @@ -952,6 +963,7 @@
952 BFEAAAA7205118370072FAAF /* TabBarController.swift in Sources */, 963 BFEAAAA7205118370072FAAF /* TabBarController.swift in Sources */,
953 BF67F3C020590A2F002FDC61 /* SwiftyJSON.swift in Sources */, 964 BF67F3C020590A2F002FDC61 /* SwiftyJSON.swift in Sources */,
954 599364ED204E62E700C8B371 /* InformationViewController.swift in Sources */, 965 599364ED204E62E700C8B371 /* InformationViewController.swift in Sources */,
  966 + ADC9AB72207C55CE00348EF1 /* GrowViewController.swift in Sources */,
955 5980BF692061048A00F4A35E /* LZCityPickerView.m in Sources */, 967 5980BF692061048A00F4A35E /* LZCityPickerView.m in Sources */,
956 BF388482205F5BC800A240EF /* MessageManager.swift in Sources */, 968 BF388482205F5BC800A240EF /* MessageManager.swift in Sources */,
957 5980BF682061048A00F4A35E /* LZCityPickerController.m in Sources */, 969 5980BF682061048A00F4A35E /* LZCityPickerController.m in Sources */,
ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
ParentAssistant/ParentAssistant/Classes/controllers/Grow/GrowViewController.swift 0 → 100644
@@ -0,0 +1,211 @@ @@ -0,0 +1,211 @@
  1 +//
  2 +// GrowViewController.swift
  3 +// ParentAssistant
  4 +//
  5 +// Created by Cao yang on 2018/4/10.
  6 +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.
  7 +//
  8 +
  9 +import UIKit
  10 +
  11 +class GrowViewController: UIViewController,UIScrollViewDelegate {
  12 +
  13 + var ZJBNavH = 44.0
  14 + //MARK: - 标题数据
  15 + //标题
  16 + lazy var titleView = {() -> UIView in
  17 + let title = UIScrollView()
  18 + title.frame = CGRect(x:0,y:0,width:getScreenWidth(),height:44)
  19 + title.backgroundColor = Theme.topBarColor()
  20 + return title
  21 + }()
  22 + //MARK: - 内容数据
  23 + //内容
  24 + lazy var contentScrollView = {()->UIScrollView in
  25 + let scrollView = UIScrollView.init(frame: self.view.bounds)
  26 + scrollView.delegate = self
  27 + scrollView.isPagingEnabled = true
  28 + scrollView.showsHorizontalScrollIndicator = false
  29 + return scrollView
  30 + }()
  31 + //按钮数组
  32 + var titleBtnArr = Array<UIButton>()
  33 + //titleLine初始位置
  34 + var linePoint = CGPoint()
  35 + //按钮标题数据
  36 + var titleArr = Array<String>()
  37 + //按钮下面横线
  38 + lazy var titleLine = {()->CALayer in
  39 + let lineLay = CALayer.init()
  40 + lineLay.frame.size = CGSize.init(width: 50, height: 2)
  41 + lineLay.backgroundColor = UIColor.gray.cgColor
  42 + return lineLay
  43 + }()
  44 +
  45 + override func viewDidLoad() {
  46 + super.viewDidLoad()
  47 +
  48 + titleArr = ["应用","报告"]
  49 + //设置导航栏标题
  50 + self.navigationItem.titleView = titleView
  51 + self.view.addSubview(contentScrollView)
  52 +
  53 + setUpTitle()
  54 + setChildViewContent()
  55 +
  56 + //左按钮
  57 + let leftView = UIButton.init(frame: CGRect.init(x: 0, y: 0, width: 50, height: 44))
  58 + let titleLab = UILabel.init(frame: CGRect.init(x: 0, y: 0, width: 40, height: 44))
  59 + if AccountManager.shared.isOnline() {
  60 + if AccountManager.shared.rawUserInfo!.contentData()["studentClass"].arrayValue.count == 0 {
  61 + titleLab.text = "未绑定"
  62 + }else{
  63 + titleLab.text = AccountManager.shared.rawUserInfo!.contentData()["studentClass"][0]["studentName"].stringValue
  64 + }
  65 + }else{
  66 + titleLab.text = "未登录"
  67 + }
  68 + titleLab.font = UIFont.systemFont(ofSize: 15)
  69 + titleLab.textAlignment = .center
  70 + leftView.addSubview(titleLab)
  71 +
  72 + let imageView = UIImageView.init(frame: CGRect.init(x: 40, y: 11, width: 10, height: 22))
  73 + imageView.image = UIImage.init(named: "report_pull")
  74 + imageView.contentMode = .scaleAspectFit
  75 + leftView.addSubview(imageView)
  76 +
  77 +// leftView.addTarget(self, action: #selector(showView), for: UIControlEvents.touchDown)
  78 +
  79 + let leftBtn = UIBarButtonItem.init(customView: leftView)
  80 + self.navigationItem.leftBarButtonItem = leftBtn
  81 + //右按钮
  82 + let rightView = UIButton.init(frame: CGRect.init(x: 0, y: 0, width: 50, height: 44))
  83 + let titleRLab = UILabel.init(frame: CGRect.init(x: 0, y: 0, width: 40, height: 44))
  84 + titleRLab.text = "筛选"
  85 + titleRLab.font = UIFont.systemFont(ofSize: 15)
  86 + titleRLab.textAlignment = .center
  87 + rightView.addSubview(titleRLab)
  88 +
  89 + let imageRView = UIImageView.init(frame: CGRect.init(x: 40, y: 11, width: 10, height: 22))
  90 + imageRView.image = UIImage.init(named: "report_select")
  91 + imageRView.contentMode = .scaleAspectFit
  92 + rightView.addSubview(imageRView)
  93 +
  94 +// rightView.addTarget(self, action: #selector(showView), for: UIControlEvents.touchDown)
  95 + let rightBtn = UIBarButtonItem.init(customView: rightView)
  96 + self.navigationItem.rightBarButtonItem = rightBtn
  97 +
  98 + setupNavigationBar()
  99 + }
  100 +
  101 + // MARK: - 设置顶部按钮
  102 + func setupNavigationBar(){
  103 + self.configTheme()
  104 + }
  105 +
  106 + private func setChildViewContent(){
  107 +
  108 + //添加子控制器
  109 + for _ in 0..<titleArr.count {
  110 + let vc = Story.instantiateViewControllerWithIdentifier("ReportViewController", storyName: "Main") as! ReportViewController
  111 + self.addChildViewController(vc)
  112 + }
  113 + //设置第一个控制器数据
  114 + let childVC = self.childViewControllers.first
  115 + childVC?.view.frame = self.view.bounds
  116 + self.contentScrollView.addSubview((childVC?.view)!)
  117 + //设置scrollview滑动范围
  118 + contentScrollView.contentSize = CGSize.init(width: getScreenWidth()*CGFloat(titleArr.count), height: 0)
  119 +
  120 + }
  121 + //MARK: - 设置标题
  122 + func setUpTitle(){
  123 +
  124 + let count = titleArr.count
  125 + var btnWidthArr = Array<CGFloat>()
  126 + for i in 0..<count {
  127 +
  128 + let btn = UIButton.init()
  129 + btn.setTitle(titleArr[i], for: .normal)
  130 + btn.titleLabel!.font = UIFont.systemFont(ofSize: 17)
  131 + btn.setTitleColor(UIColor.black, for: .normal)
  132 + btn.tag = i
  133 + btn.addTarget(self, action: #selector(clickTitleAction(btn:)), for:UIControlEvents.touchUpInside)
  134 + btn.frame.size = CGSize.init(width: 40, height: ZJBNavH)
  135 +
  136 + let widht = getScreenWidth()
  137 + btn.center = CGPoint.init(x: widht/4*(1+CGFloat(i))-16, y: CGFloat(ZJBNavH/2))
  138 + btnWidthArr.append(btn.frame.size.width)
  139 +
  140 + titleBtnArr.append(btn)
  141 + titleView.addSubview(btn)
  142 + if i == 0 {
  143 + //设置titleLine初始位置
  144 + titleLine.frame = CGRect.init(x: btn.frame.origin.x, y: btn.center.y+14, width: 40, height: 3)
  145 + linePoint = CGPoint.init(x: titleLine.frame.origin.x, y: titleLine.frame.origin.y)
  146 + //添加titleLine到导航
  147 + self.navigationItem.titleView?.layer.addSublayer(titleLine)
  148 + }
  149 + }
  150 + }
  151 + @objc func clickTitleAction(btn:UIButton){
  152 + //titleLine动画动作
  153 + let animal = CABasicAnimation.init(keyPath: "position")
  154 + animal.fromValue = NSValue.init(cgPoint: CGPoint.init(x: linePoint.x, y: linePoint.y))
  155 + animal.toValue = NSValue.init(cgPoint: CGPoint.init(x: btn.center.x, y: btn.center.y+14))
  156 + animal.isRemovedOnCompletion = false
  157 + animal.fillMode = kCAFillModeForwards
  158 + self.titleLine.add(animal, forKey: "move")
  159 +
  160 + //update
  161 + linePoint = CGPoint.init(x: btn.center.x, y: btn.center.y+14)
  162 + //联动contentScrollview
  163 + let index = CGFloat(btn.tag)
  164 +
  165 + if contentScrollView.contentSize.width>0 {
  166 +
  167 + let childVC = self.childViewControllers[btn.tag]
  168 +
  169 + if self.contentScrollView.subviews.contains(childVC.view){
  170 + //已有view,直接移动
  171 + //移动scrollview
  172 + contentScrollView.setContentOffset(CGPoint.init(x: index*getScreenWidth(), y: 0), animated: true)
  173 + }else{
  174 + //新加view,刷新数据
  175 + childVC.view.frame = CGRect.init(x: CGFloat(btn.tag)*getScreenWidth(), y: 0, width: getScreenWidth(),height: self.view.frame.size.height)
  176 + self.contentScrollView.addSubview(childVC.view)
  177 + //移动scrollview
  178 + contentScrollView.setContentOffset(CGPoint.init(x: index*getScreenWidth(), y: 0), animated: true)
  179 + }
  180 + }
  181 + }
  182 + //MARK: - ScrollView Delegate
  183 + func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
  184 +
  185 + if scrollView == contentScrollView {
  186 + let offsetX = scrollView.contentOffset.x
  187 + let index = Int(offsetX/getScreenWidth())
  188 + let btn = titleBtnArr[index]
  189 +
  190 + clickTitleAction(btn: btn)
  191 +
  192 + }
  193 + }
  194 +
  195 + override func didReceiveMemoryWarning() {
  196 + super.didReceiveMemoryWarning()
  197 + // Dispose of any resources that can be recreated.
  198 + }
  199 +
  200 +
  201 + /*
  202 + // MARK: - Navigation
  203 +
  204 + // In a storyboard-based application, you will often want to do a little preparation before navigation
  205 + override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
  206 + // Get the new view controller using segue.destinationViewController.
  207 + // Pass the selected object to the new view controller.
  208 + }
  209 + */
  210 +
  211 +}
ParentAssistant/ParentAssistant/Classes/controllers/Grow/MoralViewController.swift 0 → 100644
@@ -0,0 +1,106 @@ @@ -0,0 +1,106 @@
  1 +//
  2 +// MoralViewController.swift
  3 +// ParentAssistant
  4 +//
  5 +// Created by Cao yang on 2018/3/22.
  6 +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.
  7 +//
  8 +
  9 +import UIKit
  10 +
  11 +class MoralViewController: UIViewController,UITableViewDelegate,UITableViewDataSource {
  12 +
  13 + @IBOutlet weak var tableView: UITableView!
  14 + var data = [String:JSON]()
  15 + override func viewDidLoad() {
  16 + super.viewDidLoad()
  17 + self.title = "德育报告"
  18 + tableView.delegate = self
  19 + tableView.dataSource = self
  20 +
  21 +
  22 + downLoadDataFromNet()
  23 + }
  24 +
  25 + private func downLoadDataFromNet(){
  26 +
  27 +
  28 + let params = ["screenId":1,"startDate":"2018-03-08","endDate":"2018-04-08","classId":"70","schoolId":1] as [String : Any]
  29 +
  30 + HTTPServer.shared.getEvaluationSceneAnalysis(parameters: params as [String : AnyObject]) { (backData, error) in
  31 +
  32 + if error == nil && JSON.fromString(backData)!["status"].intValue == 1 {
  33 +
  34 + self.data = JSON.fromString(backData)!["data"].dictionaryValue
  35 +
  36 + if !self.data.isEmpty{
  37 + print(self.data)
  38 + }
  39 + }
  40 + }
  41 + }
  42 +
  43 +
  44 +
  45 + func numberOfSections(in tableView: UITableView) -> Int {
  46 + return 3
  47 + }
  48 + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  49 +
  50 + if section == 2 {
  51 + return 3
  52 + }else{
  53 + return 1
  54 + }
  55 + }
  56 + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
  57 + switch indexPath.section {
  58 + case 0:
  59 + return 240
  60 + case 1:
  61 + return 240
  62 + case 2:
  63 + return 70
  64 + default:
  65 + return 0
  66 + }
  67 + }
  68 + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  69 + var cell = UITableViewCell.init()
  70 + switch indexPath.section {
  71 + case 0:
  72 + cell = tableView.dequeueReusableCell(withIdentifier: "moralDetail", for: indexPath)
  73 + return cell
  74 + case 1:
  75 + cell = tableView.dequeueReusableCell(withIdentifier: "educationDetail", for: indexPath)
  76 + return cell
  77 + case 2:
  78 + cell = tableView.dequeueReusableCell(withIdentifier: "behaviorDetail", for: indexPath)
  79 + return cell
  80 + default:
  81 + return cell
  82 + }
  83 + }
  84 + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
  85 + if indexPath.section == 2 {
  86 + let scene = Story.instantiateViewControllerWithIdentifier("SceneDetailViewController", storyName: "Main") as! SceneDetailViewController
  87 + self.navigationController?.pushViewController(scene, animated: true)
  88 + }
  89 + }
  90 + override func didReceiveMemoryWarning() {
  91 + super.didReceiveMemoryWarning()
  92 + // Dispose of any resources that can be recreated.
  93 + }
  94 +
  95 +
  96 + /*
  97 + // MARK: - Navigation
  98 +
  99 + // In a storyboard-based application, you will often want to do a little preparation before navigation
  100 + override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
  101 + // Get the new view controller using segue.destinationViewController.
  102 + // Pass the selected object to the new view controller.
  103 + }
  104 + */
  105 +
  106 +}
ParentAssistant/ParentAssistant/Classes/controllers/Grow/ReportViewController.swift 0 → 100644
@@ -0,0 +1,98 @@ @@ -0,0 +1,98 @@
  1 +//
  2 +// ReportViewController.swift
  3 +// ParentAssistant
  4 +//
  5 +// Created by 葛建军 on 2018/3/5.
  6 +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.
  7 +//
  8 +
  9 +import UIKit
  10 +
  11 +class ReportViewController: UIViewController {
  12 +
  13 + @IBOutlet weak var reportTable: UITableView!
  14 +
  15 + //膜板
  16 + var keyWindow = UIWindow()
  17 + var backBotton = UIButton()
  18 + //日历
  19 + var calendar = CalendarView()
  20 +
  21 + override func viewDidLoad() {
  22 + super.viewDidLoad()
  23 + setupDateView()
  24 + }
  25 +
  26 + // MARK: - 设置日期页面
  27 + func setupDateView(){
  28 +
  29 + let headView = UIView.init(frame: CGRect.init(x: 0, y: 0, width: screenWidth, height: 60))
  30 + self.view.addSubview(headView)
  31 +
  32 + //添加手势
  33 + let recognizer = UISwipeGestureRecognizer.init(target: self, action: #selector(showView))
  34 + recognizer.direction = UISwipeGestureRecognizerDirection.down
  35 + headView.addGestureRecognizer(recognizer)
  36 +
  37 + calendar = CalendarView.init(frame: CGRect.init(x: 0, y: 30, width: screenWidth, height: 260))
  38 + }
  39 +
  40 + @objc func showView(){
  41 + keyWindow = UIApplication.shared.keyWindow!
  42 + let backBtn = UIButton.init(frame: CGRect.init(x: 0, y: calendar.frame.origin.y+260+22, width: screenWidth, height: screenHeight))
  43 + backBtn.backgroundColor = UIColor.black
  44 + backBtn.alpha = 0.4
  45 +
  46 + backBtn.addTarget(self, action: #selector(closeView(btn:)), for: UIControlEvents.allEvents)
  47 + reportTable.isUserInteractionEnabled = false
  48 +
  49 + keyWindow.addSubview(backBtn)
  50 + keyWindow.addSubview(calendar)
  51 + calendar.isHidden = false
  52 + }
  53 + @objc func closeView(btn:UIButton) {
  54 +
  55 + reportTable.isUserInteractionEnabled = true
  56 + UIView.animate(withDuration: 0.3) {
  57 + btn.removeFromSuperview()
  58 + self.calendar.isHidden = true
  59 + }
  60 + }
  61 + override func viewWillAppear(_ animated: Bool) {
  62 + super.viewWillAppear(animated)
  63 + }
  64 + override func viewWillDisappear(_ animated: Bool) {
  65 + super.viewWillDisappear(animated)
  66 + }
  67 + override func viewDidLayoutSubviews() {
  68 + super.viewDidLayoutSubviews()
  69 +
  70 + }
  71 + override func didReceiveMemoryWarning() {
  72 + super.didReceiveMemoryWarning()
  73 + }
  74 +
  75 +
  76 +}
  77 +
  78 +// MARK: - 作业报告列表
  79 +extension ReportViewController: UITableViewDelegate,UITableViewDataSource{
  80 + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  81 + return 5
  82 + }
  83 +
  84 + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  85 +
  86 + if indexPath.row == 0 {
  87 + let cell = tableView.dequeueReusableCell(withIdentifier: "MoralTableViewCell", for: indexPath) as! MoralTableViewCell
  88 + return cell
  89 + }else{
  90 + let cell = tableView.dequeueReusableCell(withIdentifier: "TaskPresentationTableViewCell", for: indexPath) as! TaskPresentationTableViewCell
  91 + return cell
  92 + }
  93 + }
  94 + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
  95 + return 280
  96 + }
  97 +
  98 +}
ParentAssistant/ParentAssistant/Classes/controllers/Grow/SceneDetailViewController.swift 0 → 100644
@@ -0,0 +1,76 @@ @@ -0,0 +1,76 @@
  1 +//
  2 +// SceneDetailViewController.swift
  3 +// ParentAssistant
  4 +//
  5 +// Created by Cao yang on 2018/3/22.
  6 +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.
  7 +//
  8 +
  9 +import UIKit
  10 +
  11 +class SceneDetailViewController: UIViewController,UITableViewDataSource,UITableViewDelegate {
  12 +
  13 + @IBOutlet weak var sceneTableView: UITableView!
  14 + override func viewDidLoad() {
  15 + super.viewDidLoad()
  16 + self.title = "场景详情"
  17 + sceneTableView.delegate = self
  18 + sceneTableView.dataSource = self
  19 + // Do any additional setup after loading the view.
  20 + }
  21 + func numberOfSections(in tableView: UITableView) -> Int {
  22 + return 3
  23 + }
  24 + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  25 + if section == 2 {
  26 + return 5
  27 + }
  28 + return 1
  29 + }
  30 + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
  31 +
  32 + switch indexPath.section {
  33 + case 0:
  34 + return 240
  35 + case 1:
  36 + return 250
  37 + case 2:
  38 + return 70
  39 + default:
  40 + return 0
  41 + }
  42 + }
  43 + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  44 + var cell = UITableViewCell.init()
  45 + switch indexPath.section {
  46 + case 0:
  47 + cell = tableView.dequeueReusableCell(withIdentifier: "cultureCell", for: indexPath) as! SceneTopCell
  48 + return cell
  49 + case 1:
  50 + cell = tableView.dequeueReusableCell(withIdentifier: "scoreCell", for: indexPath) as! SceneMiddleCell
  51 + return cell
  52 + case 2:
  53 + cell = tableView.dequeueReusableCell(withIdentifier: "disciplineCell", for: indexPath) as! SceneDownCell
  54 + return cell
  55 + default:
  56 + return cell
  57 + }
  58 + }
  59 +
  60 + override func didReceiveMemoryWarning() {
  61 + super.didReceiveMemoryWarning()
  62 + // Dispose of any resources that can be recreated.
  63 + }
  64 +
  65 +
  66 + /*
  67 + // MARK: - Navigation
  68 +
  69 + // In a storyboard-based application, you will often want to do a little preparation before navigation
  70 + override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
  71 + // Get the new view controller using segue.destinationViewController.
  72 + // Pass the selected object to the new view controller.
  73 + }
  74 + */
  75 +
  76 +}
ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/BehaviorDetailCell.swift 0 → 100644
@@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
  1 +//
  2 +// BehaviorDetailCell.swift
  3 +// ParentAssistant
  4 +//
  5 +// Created by Cao yang on 2018/3/23.
  6 +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.
  7 +//
  8 +
  9 +import UIKit
  10 +
  11 +class BehaviorDetailCell: UITableViewCell {
  12 +
  13 + override func awakeFromNib() {
  14 + super.awakeFromNib()
  15 + // Initialization code
  16 + }
  17 +
  18 + override func setSelected(_ selected: Bool, animated: Bool) {
  19 + super.setSelected(selected, animated: animated)
  20 +
  21 + // Configure the view for the selected state
  22 + }
  23 +
  24 +}
ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/CalendarView.swift 0 → 100644
@@ -0,0 +1,72 @@ @@ -0,0 +1,72 @@
  1 +//
  2 +// CalendarView.swift
  3 +// ParentAssistant
  4 +//
  5 +// Created by Cao yang on 2018/3/27.
  6 +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.
  7 +//
  8 +
  9 +import UIKit
  10 +
  11 +class CalendarView: UIView,UICollectionViewDelegate,UICollectionViewDataSource {
  12 +
  13 +
  14 + var weekLab = ["日","一","二","三","四","五","六"]
  15 +
  16 + override init(frame: CGRect) {
  17 + super.init(frame: frame)
  18 + self.drawCalendarView(frame: frame)
  19 + }
  20 +
  21 + func drawCalendarView(frame:CGRect) {
  22 + //TODO: 数据源待完成
  23 + let dayLab = ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"]
  24 + weekLab.append(contentsOf: dayLab)
  25 + //设置layout
  26 + let flowlayout = UICollectionViewFlowLayout()
  27 + flowlayout.itemSize = CGSize.init(width: screenWidth/7, height:40)
  28 + flowlayout.minimumLineSpacing = 0
  29 + flowlayout.minimumInteritemSpacing = 0
  30 + flowlayout.headerReferenceSize = CGSize.init(width: 0, height: 0)
  31 + flowlayout.footerReferenceSize = CGSize.init(width: 0, height: 0)
  32 + flowlayout.sectionInset = UIEdgeInsetsMake(0, 0, 0, 0)
  33 +
  34 + let calendarView = UICollectionView.init(frame: frame, collectionViewLayout: flowlayout)
  35 + calendarView.delegate = self
  36 + calendarView.dataSource = self
  37 + calendarView.backgroundColor = UIColor.white
  38 + calendarView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "calendarCell")
  39 + self.addSubview(calendarView)
  40 + }
  41 +
  42 + //MARK: - Delegate
  43 + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
  44 + return weekLab.count
  45 + }
  46 +
  47 + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
  48 +
  49 + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "calendarCell", for: indexPath)
  50 + let lab = UILabel.init(frame: cell.bounds)
  51 + lab.text = weekLab[indexPath.row]
  52 + lab.textAlignment = .center
  53 + cell.addSubview(lab)
  54 + return cell
  55 +
  56 + }
  57 + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
  58 + print("点击了 第 \(weekLab[indexPath.row])")
  59 + }
  60 + required init?(coder aDecoder: NSCoder) {
  61 + fatalError("init(coder:) has not been implemented")
  62 + }
  63 +
  64 + /*
  65 + // Only override draw() if you perform custom drawing.
  66 + // An empty implementation adversely affects performance during animation.
  67 + override func draw(_ rect: CGRect) {
  68 + // Drawing code
  69 + }
  70 + */
  71 +
  72 +}
ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/EducationDetailCell.swift 0 → 100644
@@ -0,0 +1,43 @@ @@ -0,0 +1,43 @@
  1 +//
  2 +// EducationDetailCell.swift
  3 +// ParentAssistant
  4 +//
  5 +// Created by Cao yang on 2018/3/23.
  6 +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.
  7 +//
  8 +
  9 +import UIKit
  10 +
  11 +class EducationDetailCell: UITableViewCell {
  12 +
  13 + @IBOutlet weak var lineChartView: UIView!
  14 +
  15 + var customLineChart = LineChartView()
  16 +
  17 + override func awakeFromNib() {
  18 + super.awakeFromNib()
  19 + let rect = self.lineChartView.bounds
  20 + print(rect)
  21 + customLineChart = LineChartView.init(frame: rect)
  22 + customLineChart.drawUI(xLableArr: nil)
  23 + let arr1 = [4,4,2,1,3]
  24 + let arr2 = [2,1,4,4,5]
  25 +
  26 + customLineChart.drawLine(point: arr1, color: UIColorWithRGB(R: 65, G: 105, B: 190))
  27 + customLineChart.drawLine(point: arr2, color: UIColorWithRGB(R: 220, G: 0, B: 16))
  28 +
  29 +
  30 +
  31 + self.lineChartView.addSubview(customLineChart)
  32 +
  33 +
  34 + // Initialization code
  35 + }
  36 +
  37 + override func setSelected(_ selected: Bool, animated: Bool) {
  38 + super.setSelected(selected, animated: animated)
  39 +
  40 + // Configure the view for the selected state
  41 + }
  42 +
  43 +}
ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/LineChartView.swift 0 → 100644
@@ -0,0 +1,220 @@ @@ -0,0 +1,220 @@
  1 +//
  2 +// LineChartView.swift
  3 +// ParentAssistant
  4 +//
  5 +// Created by Cao yang on 2018/3/23.
  6 +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.
  7 +//
  8 +
  9 +import UIKit
  10 +
  11 +class LineChartView: UIView {
  12 +
  13 + //默认横坐标
  14 + private var xLabArr = ["行为","文明","课堂","作业","礼仪"]
  15 + //设置纵坐标
  16 + private let yCount = 6
  17 + //横坐标个数
  18 + private let xCount = 5
  19 + //最大绩点分数
  20 + private let GPA = 5
  21 + //储存横纵坐标,画线用
  22 + private var xCenterArr = Array<CGFloat>()
  23 + private var yCenterArr = Array<CGFloat>()
  24 + //判断是否重复点击
  25 + private var btnTouch = 10
  26 + //虚线
  27 + private let lineLayer = CAShapeLayer()
  28 + //横坐标下划线
  29 + private let xMoveLayer = CAShapeLayer()
  30 + //纵坐标Lab数组
  31 + private var yMoveLaArr = Array<UILabel>()
  32 + //折线图数据数组
  33 + private var dateArr = Array<Array<Int>>()
  34 + //显示的数字
  35 + var yLabArray = Array<UILabel>()
  36 +
  37 + override init(frame: CGRect) {
  38 + super.init(frame: frame)
  39 + print("frame==\(frame)")
  40 +
  41 + }
  42 + func drawUI(xLableArr:Array<String>?){
  43 +
  44 + if xLableArr != nil {
  45 + xLabArr = xLableArr!
  46 + }
  47 + drawX()
  48 + drawY()
  49 + }
  50 + //设置纵坐标
  51 + private func drawY() {
  52 +
  53 + let yHeight = (self.bounds.height-60)/CGFloat(yCount)
  54 + for index in 0..<yCount{
  55 + let yLab = UILabel.init(frame: CGRect.init(x: 10, y: CGFloat(index)*yHeight, width: 20, height: 20))
  56 + yLab.text = "\(GPA-index)"
  57 + yLab.textColor = UIColorWithRGB(R: 119, G: 119, B: 119)
  58 + yLab.font = UIFont.systemFont(ofSize: 14)
  59 + self.addSubview(yLab)
  60 +
  61 + let lineLab = UILabel.init(frame: CGRect.init(x: 30, y: yLab.center.y, width: screenWidth-60, height: 0.4))
  62 + lineLab.backgroundColor = UIColorWithRGB(R: 190, G: 190, B: 190)
  63 + self.addSubview(lineLab)
  64 +
  65 + yMoveLaArr.append(yLab)
  66 + yCenterArr.append(yLab.frame.origin.y+10)
  67 + }
  68 + }
  69 + //设置横坐标
  70 + private func drawX() {
  71 + let xWidth = (screenWidth-20)/CGFloat(yCount)
  72 + for index in 0..<xCount {
  73 + let nameBtn = UIButton.init(frame: CGRect.init(x: xWidth+CGFloat(index)*xWidth, y: self.bounds.height-70, width: 40, height: 25))
  74 + nameBtn.setTitle(xLabArr[index], for: UIControlState.normal)
  75 + nameBtn.setTitleColor(UIColorWithRGB(R: 119, G: 119, B: 119), for: UIControlState.normal)
  76 + nameBtn.titleLabel!.textAlignment = .center
  77 + nameBtn.titleLabel!.font = UIFont.systemFont(ofSize: 13)
  78 +// nameBtn.backgroundColor = UIColor.orange
  79 + nameBtn.tag = index
  80 + self.addSubview(nameBtn)
  81 +
  82 + nameBtn.addTarget(self, action: #selector(touchXAction(tap:)), for: UIControlEvents.touchUpInside)
  83 +
  84 + xCenterArr.append(nameBtn.frame.origin.x+20)
  85 + }
  86 + }
  87 +
  88 + //MARK: - 画折线
  89 + func drawLine(point:Array<Int>,color:UIColor){
  90 +
  91 + let pointArr = swichPoint(arr: point)
  92 +
  93 + let drawLayer = DrawLayer()
  94 + drawLayer.xPointArr = xCenterArr
  95 + drawLayer.yPointArr = [yCenterArr[pointArr[0]],yCenterArr[pointArr[1]],yCenterArr[pointArr[2]],yCenterArr[pointArr[3]],yCenterArr[pointArr[4]]]
  96 + drawLayer.bounds = self.bounds
  97 + drawLayer.position = self.center
  98 + drawLayer.lineColor = color
  99 + self.layer.addSublayer(drawLayer)
  100 + drawLayer.setNeedsDisplay()
  101 +
  102 + dateArr.append(point)
  103 +
  104 + }
  105 + //MARK: - 点击横坐标
  106 + @objc func touchXAction(tap:UIButton){
  107 +
  108 + let index = tap.tag
  109 +
  110 +
  111 + if btnTouch != index {
  112 +
  113 + //竖虚线
  114 + lineLayer.strokeColor = UIColorWithRGB(R: 92, G: 145, B: 230).cgColor
  115 + lineLayer.lineWidth = 1
  116 + let arr = [5,5]
  117 + lineLayer.lineDashPhase = 0
  118 + lineLayer.lineDashPattern = arr as [NSNumber]
  119 + self.layer.addSublayer(lineLayer)
  120 +
  121 + //X轴下划线
  122 + let movePath = CGMutablePath()
  123 + movePath.move(to: CGPoint.init(x: xCenterArr[index], y: yCenterArr[0]))
  124 + movePath.addLine(to: CGPoint.init(x: xCenterArr[index], y: 10+5*(self.bounds.height-60)/CGFloat(yCount)))
  125 + lineLayer.path = movePath
  126 +
  127 + xMoveLayer.strokeColor = UIColorWithRGB(R: 92, G: 145, B: 230).cgColor
  128 + xMoveLayer.lineWidth = 2
  129 + self.layer.addSublayer(xMoveLayer)
  130 + let movePath2 = CGMutablePath()
  131 + movePath2.move(to: CGPoint.init(x: xCenterArr[index]-15, y: self.bounds.height-45))
  132 + movePath2.addLine(to: CGPoint.init(x: xCenterArr[index]+15, y: self.bounds.height-45))
  133 + xMoveLayer.path = movePath2
  134 +
  135 + if yLabArray.count == dateArr.count {
  136 + for label in yLabArray {
  137 + label.removeFromSuperview()
  138 + }
  139 + }
  140 + yLabArray.removeAll()
  141 + //数字显示
  142 + for i in 0..<dateArr.count {
  143 + let arr = dateArr[i]
  144 + //y坐标数值
  145 + let y = arr[index]
  146 + let yLab = yMoveLaArr[GPA-y]
  147 + var rect = yLab.frame
  148 + rect.origin.x = xCenterArr[index]+10
  149 +
  150 + let newLab = UILabel()
  151 + newLab.text = yLab.text
  152 + newLab.textColor = yLab.textColor
  153 + newLab.font = yLab.font
  154 + newLab.frame = rect
  155 + self.addSubview(newLab)
  156 + yLabArray.append(newLab)
  157 + }
  158 + }else{
  159 + print(yLabArray)
  160 + }
  161 + btnTouch = index
  162 +
  163 +
  164 + }
  165 + //转换y坐标
  166 + func swichPoint(arr:Array<Int>)->Array<Int>{
  167 + var array = Array<Int>()
  168 + for index in 0..<arr.count {
  169 + let value = GPA - arr[index]
  170 + array.append(value)
  171 + }
  172 + return array
  173 + }
  174 +
  175 + required init?(coder aDecoder: NSCoder) {
  176 + fatalError("init(coder:) has not been implemented")
  177 + }
  178 +
  179 + /*
  180 + // Only override draw() if you perform custom drawing.
  181 + // An empty implementation adversely affects performance during animation.
  182 + override func draw(_ rect: CGRect) {
  183 + // Drawing code
  184 + }
  185 + */
  186 +
  187 +}
  188 +
  189 +class DrawLayer: CALayer {
  190 +
  191 + var yPointArr = Array<CGFloat>()
  192 + var xPointArr = Array<CGFloat>()
  193 + var lineColor = UIColor()
  194 +
  195 + override func draw(in ctx: CGContext) {
  196 +
  197 + let context = ctx
  198 + //点
  199 + context.setFillColor(lineColor.cgColor)
  200 +
  201 + for i in 0..<xPointArr.count {
  202 + context.fillEllipse(in: CGRect.init(x: xPointArr[i]-5, y: yPointArr[i]-5, width: 10, height: 10))
  203 +
  204 + }
  205 + //折线
  206 + context.setStrokeColor(lineColor.cgColor)
  207 + context.setLineWidth(1.5)
  208 + for i in 0..<xPointArr.count {
  209 + if i == 0 {
  210 + context.move(to: CGPoint.init(x: xPointArr[0] , y: yPointArr[0]))
  211 + }else{
  212 + context.addLine(to: CGPoint.init(x: xPointArr[i] , y: yPointArr[i]))
  213 + }
  214 + }
  215 + context.strokePath()
  216 + }
  217 +
  218 +}
  219 +
  220 +
ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/MoralDetailCell.swift 0 → 100644
@@ -0,0 +1,32 @@ @@ -0,0 +1,32 @@
  1 +//
  2 +// MoralDetailCell.swift
  3 +// ParentAssistant
  4 +//
  5 +// Created by Cao yang on 2018/3/23.
  6 +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.
  7 +//
  8 +
  9 +import UIKit
  10 +
  11 +class MoralDetailCell: UITableViewCell {
  12 +
  13 + @IBOutlet weak var dateLab: UILabel!
  14 + @IBOutlet weak var pointLab: UILabel!
  15 + @IBOutlet weak var rankingLab: UILabel!
  16 + @IBOutlet weak var risingLab: UILabel!
  17 + @IBOutlet weak var risingRightLab: UILabel!
  18 + @IBOutlet weak var averageLab: UILabel!
  19 + @IBOutlet weak var averageRightLab: UILabel!
  20 + @IBOutlet weak var evaluationLab: UILabel!
  21 + override func awakeFromNib() {
  22 + super.awakeFromNib()
  23 + // Initialization code
  24 + }
  25 +
  26 + override func setSelected(_ selected: Bool, animated: Bool) {
  27 + super.setSelected(selected, animated: animated)
  28 +
  29 + // Configure the view for the selected state
  30 + }
  31 +
  32 +}
ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/MoralTableViewCell.swift 0 → 100644
@@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
  1 +//
  2 +// MoralTableViewCell.swift
  3 +// ParentAssistant
  4 +//
  5 +// Created by Cao yang on 2018/3/22.
  6 +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.
  7 +//
  8 +
  9 +import UIKit
  10 +
  11 +class MoralTableViewCell: UITableViewCell {
  12 +
  13 + @IBOutlet weak var pointLab: UILabel!
  14 + @IBOutlet weak var todayReName: UILabel!
  15 + @IBOutlet weak var rankingLab: UILabel!
  16 + @IBOutlet weak var evaluateLab: UILabel!
  17 + @IBOutlet weak var rankStatusLab: UILabel!
  18 + @IBOutlet weak var reportDateLab: UILabel!
  19 + override func awakeFromNib() {
  20 + super.awakeFromNib()
  21 + // Initialization code
  22 + }
  23 +
  24 + override func setSelected(_ selected: Bool, animated: Bool) {
  25 + super.setSelected(selected, animated: animated)
  26 +
  27 + // Configure the view for the selected state
  28 + }
  29 +
  30 +}
ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ReportDateCollectionViewCell.swift 0 → 100644
@@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
  1 +//
  2 +// ReportDateCollectionViewCell.swift
  3 +// ParentAssistant
  4 +//
  5 +// Created by 葛建军 on 2018/3/9.
  6 +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.
  7 +//
  8 +
  9 +import UIKit
  10 +class ReportDateCollectionViewCell: UICollectionViewCell {
  11 + @IBOutlet var weekLabel: UILabel!
  12 + @IBOutlet var dateLabel: UILabel!
  13 + func setupWithDate(week:String,date:String){
  14 + weekLabel.text = week
  15 + dateLabel.text = date
  16 +
  17 +
  18 +
  19 + }
  20 +
  21 +}
ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ReportHeaderView.swift 0 → 100644
@@ -0,0 +1,48 @@ @@ -0,0 +1,48 @@
  1 +//
  2 +// ReportHeaderView.swift
  3 +// ParentAssistant
  4 +//
  5 +// Created by 葛建军 on 2018/3/8.
  6 +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.
  7 +//
  8 +
  9 +import UIKit
  10 +
  11 +class ReportHeaderView: UIView {
  12 + var delegate:ReportHeaderViewDelegate!
  13 + @IBOutlet var nameButton: UIButton!//学生名字按钮
  14 + @IBOutlet var dateButton: UIButton!//日期按钮
  15 + @IBOutlet var typeButton: UIButton!//筛选按钮
  16 + override func awakeFromNib() {
  17 + super.awakeFromNib()
  18 + }
  19 + override func layoutSubviews() {
  20 + super.layoutSubviews()
  21 + nameButton.frame.origin = CGPoint(x: 15, y: 7)
  22 + dateButton.frame.origin = CGPoint(x: (getScreenWidth()-dateButton.frame.size.width)/2, y: 7)
  23 + typeButton.frame.origin = CGPoint(x: getScreenWidth()-typeButton.frame.size.width-30, y: 7)
  24 + }
  25 + //点击学生姓名按钮
  26 + @IBAction func changeStudentAction(_ sender: UIButton) {
  27 + delegate.selectStudentButton()
  28 + }
  29 + //点击日期按钮
  30 + @IBAction func changeDateAction(_ sender: UIButton) {
  31 + delegate.selectDateButton()
  32 + }
  33 + //点击筛选按钮
  34 + @IBAction func changeTypeAction(_ sender: UIButton) {
  35 + delegate.selectTypeButton()
  36 + }
  37 +
  38 +}
  39 +protocol ReportHeaderViewDelegate {
  40 + func selectStudentButton()
  41 + func selectDateButton()
  42 + func selectTypeButton()
  43 +}
  44 +extension ReportHeaderView {
  45 + class func titleView() -> ReportHeaderView {
  46 + return Bundle.main.loadNibNamed("ReportHeaderView", owner: nil, options: nil)?.first as! ReportHeaderView
  47 + }
  48 +}
ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ReportHeaderView.xib 0 → 100644
@@ -0,0 +1,61 @@ @@ -0,0 +1,61 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
  3 + <device id="retina4_7" orientation="portrait">
  4 + <adaptation id="fullscreen"/>
  5 + </device>
  6 + <dependencies>
  7 + <deployment identifier="iOS"/>
  8 + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
  9 + <capability name="Safe area layout guides" minToolsVersion="9.0"/>
  10 + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
  11 + </dependencies>
  12 + <objects>
  13 + <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
  14 + <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
  15 + <view clipsSubviews="YES" contentMode="scaleToFill" id="4WE-cx-977" customClass="ReportHeaderView" customModule="ParentAssistant" customModuleProvider="target">
  16 + <rect key="frame" x="0.0" y="0.0" width="485" height="44"/>
  17 + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
  18 + <subviews>
  19 + <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="W6e-VK-JCE">
  20 + <rect key="frame" x="20" y="7" width="46" height="30"/>
  21 + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
  22 + <state key="normal" title="马伯骞">
  23 + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  24 + </state>
  25 + <connections>
  26 + <action selector="changeStudentAction:" destination="4WE-cx-977" eventType="touchUpInside" id="Dua-XZ-hMB"/>
  27 + </connections>
  28 + </button>
  29 + <button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5Dq-Z9-eEM">
  30 + <rect key="frame" x="434" y="7" width="31" height="30"/>
  31 + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
  32 + <state key="normal" title="筛选">
  33 + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  34 + </state>
  35 + <connections>
  36 + <action selector="changeTypeAction:" destination="4WE-cx-977" eventType="touchUpInside" id="XFz-ca-od2"/>
  37 + </connections>
  38 + </button>
  39 + <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7xY-bD-L7w">
  40 + <rect key="frame" x="191" y="7" width="102" height="30"/>
  41 + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
  42 + <state key="normal" title="12月29日">
  43 + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  44 + </state>
  45 + <connections>
  46 + <action selector="changeDateAction:" destination="4WE-cx-977" eventType="touchUpInside" id="pCF-3R-0zv"/>
  47 + </connections>
  48 + </button>
  49 + </subviews>
  50 + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
  51 + <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
  52 + <viewLayoutGuide key="safeArea" id="71B-FS-Ws9"/>
  53 + <connections>
  54 + <outlet property="dateButton" destination="7xY-bD-L7w" id="3zG-4z-eNW"/>
  55 + <outlet property="nameButton" destination="W6e-VK-JCE" id="XDD-iU-T0k"/>
  56 + <outlet property="typeButton" destination="5Dq-Z9-eEM" id="LAM-Dw-HAX"/>
  57 + </connections>
  58 + <point key="canvasLocation" x="156.5" y="93"/>
  59 + </view>
  60 + </objects>
  61 +</document>
ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/SceneDownCell.swift 0 → 100644
@@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
  1 +//
  2 +// SceneDownCell.swift
  3 +// ParentAssistant
  4 +//
  5 +// Created by Cao yang on 2018/3/24.
  6 +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.
  7 +//
  8 +
  9 +import UIKit
  10 +
  11 +class SceneDownCell: UITableViewCell {
  12 +
  13 + @IBOutlet weak var evaluateLab: UILabel!
  14 + @IBOutlet weak var sceneLab: UILabel!
  15 + @IBOutlet weak var scoreLab: UILabel!
  16 + @IBOutlet weak var nameLab: UILabel!
  17 + @IBOutlet weak var classLab: UILabel!
  18 + @IBOutlet weak var dateLab: UILabel!
  19 + override func awakeFromNib() {
  20 + super.awakeFromNib()
  21 + // Initialization code
  22 + }
  23 +
  24 + override func setSelected(_ selected: Bool, animated: Bool) {
  25 + super.setSelected(selected, animated: animated)
  26 +
  27 + // Configure the view for the selected state
  28 + }
  29 +
  30 +}
ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/SceneMiddleCell.swift 0 → 100644
@@ -0,0 +1,44 @@ @@ -0,0 +1,44 @@
  1 +//
  2 +// SceneMiddleCell.swift
  3 +// ParentAssistant
  4 +//
  5 +// Created by Cao yang on 2018/3/24.
  6 +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.
  7 +//
  8 +
  9 +import UIKit
  10 +
  11 +class SceneMiddleCell: UITableViewCell {
  12 +
  13 + @IBOutlet weak var lineChartView: UIView!
  14 +
  15 + var customLineChart = LineChartView()
  16 + override func awakeFromNib() {
  17 + super.awakeFromNib()
  18 + // Initialization code
  19 + let rect = self.lineChartView.bounds
  20 + customLineChart = LineChartView.init(frame: rect)
  21 + let customXLabArr = ["03/12","03/13","03/14","03/15","03/16"]
  22 +
  23 + customLineChart.drawUI(xLableArr:customXLabArr)
  24 +
  25 + let arr1 = [5,4,5,5,5]
  26 + let arr2 = [4,4,2,1,3]
  27 + let arr3 = [3,3,4,3,4]
  28 +
  29 +
  30 + customLineChart.drawLine(point: arr1, color: UIColorWithRGB(R: 129, G: 199, B: 132))
  31 + customLineChart.drawLine(point: arr2, color: UIColorWithRGB(R: 92, G: 145, B: 230))
  32 + customLineChart.drawLine(point: arr3, color: UIColorWithRGB(R: 255, G: 213, B: 79))
  33 +
  34 + self.lineChartView.addSubview(customLineChart)
  35 +
  36 + }
  37 +
  38 + override func setSelected(_ selected: Bool, animated: Bool) {
  39 + super.setSelected(selected, animated: animated)
  40 +
  41 + // Configure the view for the selected state
  42 + }
  43 +
  44 +}
ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/SceneTopCell.swift 0 → 100644
@@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
  1 +//
  2 +// SceneTopCell.swift
  3 +// ParentAssistant
  4 +//
  5 +// Created by Cao yang on 2018/3/24.
  6 +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.
  7 +//
  8 +
  9 +import UIKit
  10 +
  11 +class SceneTopCell: UITableViewCell {
  12 +
  13 + @IBOutlet weak var scoreLab: UILabel! //得分
  14 + @IBOutlet weak var GPALab: UILabel! //绩点
  15 + @IBOutlet weak var LevelLab: UILabel! //等级
  16 + @IBOutlet weak var SuggestLab: UITextView! //指导意见
  17 + override func awakeFromNib() {
  18 + super.awakeFromNib()
  19 + // Initialization code
  20 + }
  21 +
  22 + override func setSelected(_ selected: Bool, animated: Bool) {
  23 + super.setSelected(selected, animated: animated)
  24 +
  25 + // Configure the view for the selected state
  26 + }
  27 +
  28 +}
ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/TaskPresentationTableViewCell.swift 0 → 100644
@@ -0,0 +1,82 @@ @@ -0,0 +1,82 @@
  1 +//
  2 +// TaskPresentationTableViewCell.swift
  3 +// ParentAssistant
  4 +//
  5 +// Created by 葛建军 on 2018/3/9.
  6 +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.
  7 +//
  8 +
  9 +import UIKit
  10 +//func degreesToRadians(x:Double) -> CGFloat{
  11 +// return (CGFloat(Double.pi*(x)/180.0))
  12 +//} //把角度转换成PI的方式
  13 +//let PROGREESS_WIDTH = 160 //圆直径
  14 +//let PROGRESS_LINE_WIDTH = 4 //弧线的宽度
  15 +class TaskPresentationTableViewCell: UITableViewCell {
  16 +
  17 + @IBOutlet var layerLabel: UILabel!
  18 + override func awakeFromNib() {
  19 + super.awakeFromNib()
  20 + // Initialization code
  21 + //可以画出上面所示的整个轨道。这个圆形是从-210度的角度到30度。
  22 +// let path = UIBezierPath(arcCenter: CGPoint(x: 40, y: 40), radius: CGFloat((PROGREESS_WIDTH-PROGRESS_LINE_WIDTH)/2), startAngle: degreesToRadians(x: -210), endAngle: degreesToRadians(x: 30), clockwise: true)
  23 + //画出一个完成的进度的背景轨道
  24 +// let trackLayer = CAShapeLayer()//创建一个track shape layer
  25 +// trackLayer.frame = self.layerLabel.bounds
  26 +// trackLayer.fillColor = UIColor.clear.cgColor
  27 +// trackLayer.strokeColor = UIColor.red.cgColor//指定path的渲染颜色
  28 +// trackLayer.opacity = 0.25 //背景同学你就甘心做背景吧,不要太明显了,透明度小一点
  29 +// trackLayer.lineCap = kCALineCapRound//指定线的边缘是圆的
  30 +// trackLayer.lineWidth = CGFloat(PROGRESS_LINE_WIDTH)//线的宽度
  31 +// trackLayer.path = path.cgPath //把path传递給layer,然后layer会处理相应的渲染,整个逻辑和CoreGraph是一致的。
  32 +//
  33 +// self.layerLabel.layer.addSublayer(trackLayer)
  34 + //渐变进度条
  35 +// let progressLayer = CAShapeLayer()
  36 +// progressLayer.frame = self.layerLabel.bounds
  37 +// progressLayer.fillColor = UIColor.clear.cgColor
  38 +// progressLayer.strokeColor = UIColor.red.cgColor
  39 +// progressLayer.lineCap = kCALineCapRound;
  40 +// progressLayer.lineWidth = CGFloat(PROGRESS_LINE_WIDTH)
  41 +// progressLayer.path = path.cgPath
  42 +// progressLayer.strokeEnd = 50/100.0 //总进度
  43 +//
  44 +// let gradientLayer = CALayer()
  45 +// let gradientLayer1 = CAGradientLayer()
  46 +// gradientLayer1.frame = CGRect(x: 0, y: 0, width: self.layerLabel.frame.size.width/2, height: self.layerLabel.frame.size.height)
  47 +// gradientLayer1.colors = [UIColor.yellow.cgColor,UIColor.blue.cgColor]
  48 +// gradientLayer1.locations = [0.5,0.9,1]
  49 +// gradientLayer1.startPoint = CGPoint(x: 0.5, y: 1)
  50 +// gradientLayer1.endPoint = CGPoint(x: 0.5, y: 0)
  51 +// gradientLayer.addSublayer(gradientLayer1)
  52 +//
  53 +// let gradientLayer2 = CAGradientLayer()
  54 +// gradientLayer2.frame = CGRect(x: self.layerLabel.frame.size.width/2, y: 0, width: self.layerLabel.frame.size.width/2, height: self.layerLabel.frame.size.height)
  55 +// gradientLayer2.colors = [UIColor.blue.cgColor,UIColor.blue.cgColor]
  56 +// gradientLayer2.locations = [0.1,0.5,1]
  57 +// gradientLayer2.startPoint = CGPoint(x: 0.5, y: 0)
  58 +// gradientLayer2.endPoint = CGPoint(x: 0.5, y: 1)
  59 +// gradientLayer.addSublayer(gradientLayer2)
  60 +//
  61 +// gradientLayer.mask = progressLayer//用progressLayer来截取渐变层
  62 +// self.layerLabel.layer.addSublayer(gradientLayer)
  63 + }
  64 + //进度条效果 CAShapeLayer有一个strokeEnd的属性,这个属性是从0到1的浮点类型,正好可以用表达百分比,而且这个属性是animatable,可以动态的表示进度的变化。
  65 + // -(void)setPercent:(NSInteger)percent animated:(BOOL)animated
  66 + // {
  67 + // [CATransaction begin];
  68 + // [CATransaction setDisableActions:!animated];
  69 + // [CATransaction setAnimationTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]];
  70 + // [CATransaction setAnimationDuration:MAIN_SCREEN_ANIMATION_TIME];
  71 + // progressLayer.strokeEnd = percent/100.0;
  72 + // [CATransaction commit];
  73 + //
  74 + // _percent = percent;
  75 + // }
  76 + override func setSelected(_ selected: Bool, animated: Bool) {
  77 + super.setSelected(selected, animated: animated)
  78 +
  79 + // Configure the view for the selected state
  80 + }
  81 +
  82 +}
ParentAssistant/ParentAssistant/Classes/controllers/report/MoralViewController.swift
@@ -1,105 +0,0 @@ @@ -1,105 +0,0 @@
1 -//  
2 -// MoralViewController.swift  
3 -// ParentAssistant  
4 -//  
5 -// Created by Cao yang on 2018/3/22.  
6 -// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.  
7 -//  
8 -  
9 -import UIKit  
10 -  
11 -class MoralViewController: UIViewController,UITableViewDelegate,UITableViewDataSource {  
12 -  
13 - @IBOutlet weak var tableView: UITableView!  
14 - var data = Array<JSON>()  
15 - override func viewDidLoad() {  
16 - super.viewDidLoad()  
17 - self.title = "德育报告"  
18 - tableView.delegate = self  
19 - tableView.dataSource = self  
20 -  
21 -  
22 - downLoadDataFromNet()  
23 - }  
24 -  
25 - private func downLoadDataFromNet(){  
26 -  
27 -  
28 - let params = ["screenId":1,"startDate":"2018-03-08","endDate":"2018-04-08","classId":"70","schoolId":1] as [String : Any]  
29 -  
30 - HTTPServer.shared.getEvaluationSceneAnalysis(parameters: params as [String : AnyObject]) { (backData, error) in  
31 - print(backData!)  
32 - if error == nil && JSON.fromString(backData)!["status"].intValue == 1 {  
33 -  
34 -// self.data = SceneEvaluate(j: JSON.fromString(backData)!.contentData())  
35 -// if self.data != nil{  
36 -// print(self.data)  
37 -// }  
38 - }  
39 - }  
40 - }  
41 -  
42 -  
43 -  
44 - func numberOfSections(in tableView: UITableView) -> Int {  
45 - return 3  
46 - }  
47 - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {  
48 -  
49 - if section == 2 {  
50 - return 3  
51 - }else{  
52 - return 1  
53 - }  
54 - }  
55 - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {  
56 - switch indexPath.section {  
57 - case 0:  
58 - return 240  
59 - case 1:  
60 - return 240  
61 - case 2:  
62 - return 70  
63 - default:  
64 - return 0  
65 - }  
66 - }  
67 - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {  
68 - var cell = UITableViewCell.init()  
69 - switch indexPath.section {  
70 - case 0:  
71 - cell = tableView.dequeueReusableCell(withIdentifier: "moralDetail", for: indexPath)  
72 - return cell  
73 - case 1:  
74 - cell = tableView.dequeueReusableCell(withIdentifier: "educationDetail", for: indexPath)  
75 - return cell  
76 - case 2:  
77 - cell = tableView.dequeueReusableCell(withIdentifier: "behaviorDetail", for: indexPath)  
78 - return cell  
79 - default:  
80 - return cell  
81 - }  
82 - }  
83 - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {  
84 - if indexPath.section == 2 {  
85 - let scene = Story.instantiateViewControllerWithIdentifier("SceneDetailViewController", storyName: "Main") as! SceneDetailViewController  
86 - self.navigationController?.pushViewController(scene, animated: true)  
87 - }  
88 - }  
89 - override func didReceiveMemoryWarning() {  
90 - super.didReceiveMemoryWarning()  
91 - // Dispose of any resources that can be recreated.  
92 - }  
93 -  
94 -  
95 - /*  
96 - // MARK: - Navigation  
97 -  
98 - // In a storyboard-based application, you will often want to do a little preparation before navigation  
99 - override func prepare(for segue: UIStoryboardSegue, sender: Any?) {  
100 - // Get the new view controller using segue.destinationViewController.  
101 - // Pass the selected object to the new view controller.  
102 - }  
103 - */  
104 -  
105 -}  
ParentAssistant/ParentAssistant/Classes/controllers/report/ReportViewController.swift
@@ -1,223 +0,0 @@ @@ -1,223 +0,0 @@
1 -//  
2 -// ReportViewController.swift  
3 -// ParentAssistant  
4 -//  
5 -// Created by 葛建军 on 2018/3/5.  
6 -// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.  
7 -//  
8 -  
9 -import UIKit  
10 -  
11 -class ReportViewController: UIViewController {  
12 - var titleView:ReportHeaderView!//navigationBar自定义view  
13 - @IBOutlet weak var reportTable: UITableView!  
14 - //空白页  
15 - var EmptyView: UIView!  
16 -  
17 - //膜板  
18 - var keyWindow = UIWindow()  
19 - var backBotton = UIButton()  
20 - //日历  
21 - var calendar = CalendarView()  
22 -  
23 -// var dateAry:(weeks:[String],days:[String]) = ([],[])  
24 -  
25 - override func viewDidLoad() {  
26 - super.viewDidLoad()  
27 -  
28 - //MARK: - 空白页面  
29 - EmptyView = UIView.init(frame: self.view.bounds)  
30 - EmptyView.backgroundColor = UIColor.white  
31 - self.EmptyView.isHidden = true  
32 - let imageV = UIImageView.init(frame: CGRect.init(x: 0, y: 80, width: screenWidth, height: screenWidth))  
33 - imageV.image = UIImage.init(named: "report_none_icon")  
34 - imageV.contentMode = UIViewContentMode.scaleAspectFit  
35 - EmptyView.addSubview(imageV)  
36 - self.view.addSubview(EmptyView)  
37 - let backImage = UIImage(named: "navigationBar_backgrounImage")  
38 - self.navigationController?.navigationBar.setBackgroundImage(backImage, for: UIBarMetrics.default)  
39 - if self.EmptyView.isHidden {  
40 - //设置顶部按钮  
41 - setupNavigationBar()  
42 - //设置日期页面  
43 - setupDateView()  
44 - }  
45 - }  
46 - // MARK: - 设置顶部按钮  
47 - func setupNavigationBar(){  
48 - self.configTheme()  
49 - setuptitleView()  
50 - }  
51 - func setuptitleView(){  
52 -  
53 - //左按钮  
54 - let leftView = UIButton.init(frame: CGRect.init(x: 0, y: 0, width: 80, height: 44))  
55 - let titleLab = UILabel.init(frame: CGRect.init(x: 0, y: 0, width: 60, height: 44))  
56 - if AccountManager.shared.isOnline() {  
57 - if AccountManager.shared.rawUserInfo!.contentData()["studentClass"].arrayValue.count == 0 {  
58 - titleLab.text = "未绑定"  
59 - }else{  
60 - titleLab.text = AccountManager.shared.rawUserInfo!.contentData()["studentClass"][0]["studentName"].stringValue  
61 - }  
62 - }else{  
63 - titleLab.text = "未登录"  
64 - }  
65 - leftView.addSubview(titleLab)  
66 -  
67 - let imageView = UIImageView.init(frame: CGRect.init(x: 60, y: 11, width: 20, height: 22))  
68 - imageView.image = UIImage.init(named: "report_pull")  
69 - imageView.contentMode = .scaleAspectFit  
70 - leftView.addSubview(imageView)  
71 -  
72 - leftView.addTarget(self, action: #selector(showView), for: UIControlEvents.touchDown)  
73 -  
74 - let leftBtn = UIBarButtonItem.init(customView: leftView)  
75 - self.navigationItem.leftBarButtonItem = leftBtn  
76 -  
77 - //右按钮  
78 - let rightView = UIButton.init(frame: CGRect.init(x: 0, y: 0, width: 80, height: 44))  
79 - let titleRLab = UILabel.init(frame: CGRect.init(x: 0, y: 0, width: 50, height: 44))  
80 - titleRLab.text = "筛选"  
81 - titleRLab.textAlignment = .right  
82 - rightView.addSubview(titleRLab)  
83 -  
84 - let imageRView = UIImageView.init(frame: CGRect.init(x: 60, y: 11, width: 20, height: 22))  
85 - imageRView.image = UIImage.init(named: "report_select")  
86 - imageRView.contentMode = .scaleAspectFit  
87 - rightView.addSubview(imageRView)  
88 -  
89 - rightView.addTarget(self, action: #selector(showView), for: UIControlEvents.touchDown)  
90 - let rightBtn = UIBarButtonItem.init(customView: rightView)  
91 - self.navigationItem.rightBarButtonItem = rightBtn  
92 -  
93 - }  
94 - // MARK: - 设置日期页面  
95 - func setupDateView(){  
96 -  
97 - let headView = UIView.init(frame: CGRect.init(x: 0, y: 0, width: screenWidth, height: 60))  
98 - self.view.addSubview(headView)  
99 -  
100 - //添加手势  
101 - let recognizer = UISwipeGestureRecognizer.init(target: self, action: #selector(showView))  
102 - recognizer.direction = UISwipeGestureRecognizerDirection.down  
103 - headView.addGestureRecognizer(recognizer)  
104 -  
105 - calendar = CalendarView.init(frame: CGRect.init(x: 0, y: 30, width: screenWidth, height: 260))  
106 - }  
107 -  
108 - @objc func showView(){  
109 - keyWindow = UIApplication.shared.keyWindow!  
110 - let backBtn = UIButton.init(frame: CGRect.init(x: 0, y: calendar.frame.origin.y+260+22, width: screenWidth, height: screenHeight))  
111 - backBtn.backgroundColor = UIColor.black  
112 - backBtn.alpha = 0.4  
113 -  
114 - backBtn.addTarget(self, action: #selector(closeView(btn:)), for: UIControlEvents.allEvents)  
115 - reportTable.isUserInteractionEnabled = false  
116 -  
117 - keyWindow.addSubview(backBtn)  
118 - keyWindow.addSubview(calendar)  
119 - calendar.isHidden = false  
120 - }  
121 - @objc func closeView(btn:UIButton) {  
122 -  
123 - reportTable.isUserInteractionEnabled = true  
124 - UIView.animate(withDuration: 0.3) {  
125 - btn.removeFromSuperview()  
126 - self.calendar.isHidden = true  
127 - }  
128 - }  
129 -  
130 - // MARK: - 页面将要显示时替换navigation的titleView  
131 - override func viewWillAppear(_ animated: Bool) {  
132 - super.viewWillAppear(animated)  
133 - }  
134 - override func viewWillDisappear(_ animated: Bool) {  
135 - super.viewWillDisappear(animated)  
136 - }  
137 - override func viewDidLayoutSubviews() {  
138 - super.viewDidLayoutSubviews()  
139 - if titleView != nil {  
140 - titleView.frame = CGRect(x: 0, y: 0, width: screenWidth, height: 44)  
141 - }  
142 - }  
143 - override func didReceiveMemoryWarning() {  
144 - super.didReceiveMemoryWarning()  
145 - }  
146 -  
147 -  
148 -}  
149 -// MARK: - 点击顶部titleView按钮的代理方法  
150 -//extension ReportViewController: ReportHeaderViewDelegate{  
151 -// //点击孩子姓名  
152 -// func selectStudentButton() {  
153 -// appDelegate.window!.makeToast("该功能暂不开放", duration: 1, position: CSToastPositionCenter)  
154 -// return  
155 -// //如果家长未绑定孩子  
156 -// if AccountManager.shared.isOnline() {  
157 -// if AccountManager.shared.rawUserInfo!.contentData()["studentClass"].arrayValue.count == 0 {  
158 -// appDelegate.window!.makeToast("请先绑定孩子", duration: 1, position: CSToastPositionCenter)  
159 -// }else{  
160 -// //切换孩子  
161 -// let alert = UIAlertController(title: "切换孩子", message: "", preferredStyle: UIAlertControllerStyle.actionSheet)  
162 -// for item in AccountManager.shared.rawUserInfo!.contentData()["studentClass"].arrayValue {  
163 -// let action = UIAlertAction(title: item["studentName"].stringValue, style: UIAlertActionStyle.default, handler: { (action) in  
164 -// //选择完孩子切换数据  
165 -// })  
166 -// alert.addAction(action)  
167 -// }  
168 -// self.present(alert, animated: true, completion: nil)  
169 -// }  
170 -// }else{  
171 -// appDelegate.window!.makeToast("请先登录", duration: 1, position: CSToastPositionCenter)  
172 -// }  
173 -// }  
174 -// //点击日期  
175 -// func selectDateButton() {  
176 -//  
177 -// appDelegate.window!.makeToast("该功能暂不开放", duration: 1, position: CSToastPositionCenter)  
178 -// return  
179 -// }  
180 -// //点击筛选  
181 -// func selectTypeButton() {  
182 -// appDelegate.window!.makeToast("该功能暂不开放", duration: 1, position: CSToastPositionCenter)  
183 -// return  
184 -// }  
185 -//}  
186 -//// MARK: - 顶部展示日期  
187 -//extension ReportViewController: UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout {  
188 -// func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {  
189 -// return CGSize(width: getScreenWidth()/7, height: getScreenWidth()/7)  
190 -// }  
191 -// func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {  
192 -// return 0  
193 -// }  
194 -//  
195 -// func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {  
196 -// let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ReportDateCollectionViewCell", for: indexPath) as! ReportDateCollectionViewCell  
197 -// cell.setupWithDate(week: dateAry.weeks[indexPath.row], date: dateAry.days[indexPath.row])  
198 -// return cell  
199 -// }  
200 -//  
201 -//  
202 -//}  
203 -// MARK: - 作业报告列表  
204 -extension ReportViewController: UITableViewDelegate,UITableViewDataSource{  
205 - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {  
206 - return 5  
207 - }  
208 -  
209 - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {  
210 -  
211 - if indexPath.row == 0 {  
212 - let cell = tableView.dequeueReusableCell(withIdentifier: "MoralTableViewCell", for: indexPath) as! MoralTableViewCell  
213 - return cell  
214 - }else{  
215 - let cell = tableView.dequeueReusableCell(withIdentifier: "TaskPresentationTableViewCell", for: indexPath) as! TaskPresentationTableViewCell  
216 - return cell  
217 - }  
218 - }  
219 - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {  
220 - return 280  
221 - }  
222 -  
223 -}  
ParentAssistant/ParentAssistant/Classes/controllers/report/SceneDetailViewController.swift
@@ -1,76 +0,0 @@ @@ -1,76 +0,0 @@
1 -//  
2 -// SceneDetailViewController.swift  
3 -// ParentAssistant  
4 -//  
5 -// Created by Cao yang on 2018/3/22.  
6 -// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.  
7 -//  
8 -  
9 -import UIKit  
10 -  
11 -class SceneDetailViewController: UIViewController,UITableViewDataSource,UITableViewDelegate {  
12 -  
13 - @IBOutlet weak var sceneTableView: UITableView!  
14 - override func viewDidLoad() {  
15 - super.viewDidLoad()  
16 - self.title = "场景详情"  
17 - sceneTableView.delegate = self  
18 - sceneTableView.dataSource = self  
19 - // Do any additional setup after loading the view.  
20 - }  
21 - func numberOfSections(in tableView: UITableView) -> Int {  
22 - return 3  
23 - }  
24 - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {  
25 - if section == 2 {  
26 - return 5  
27 - }  
28 - return 1  
29 - }  
30 - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {  
31 -  
32 - switch indexPath.section {  
33 - case 0:  
34 - return 240  
35 - case 1:  
36 - return 250  
37 - case 2:  
38 - return 70  
39 - default:  
40 - return 0  
41 - }  
42 - }  
43 - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {  
44 - var cell = UITableViewCell.init()  
45 - switch indexPath.section {  
46 - case 0:  
47 - cell = tableView.dequeueReusableCell(withIdentifier: "cultureCell", for: indexPath) as! SceneTopCell  
48 - return cell  
49 - case 1:  
50 - cell = tableView.dequeueReusableCell(withIdentifier: "scoreCell", for: indexPath) as! SceneMiddleCell  
51 - return cell  
52 - case 2:  
53 - cell = tableView.dequeueReusableCell(withIdentifier: "disciplineCell", for: indexPath) as! SceneDownCell  
54 - return cell  
55 - default:  
56 - return cell  
57 - }  
58 - }  
59 -  
60 - override func didReceiveMemoryWarning() {  
61 - super.didReceiveMemoryWarning()  
62 - // Dispose of any resources that can be recreated.  
63 - }  
64 -  
65 -  
66 - /*  
67 - // MARK: - Navigation  
68 -  
69 - // In a storyboard-based application, you will often want to do a little preparation before navigation  
70 - override func prepare(for segue: UIStoryboardSegue, sender: Any?) {  
71 - // Get the new view controller using segue.destinationViewController.  
72 - // Pass the selected object to the new view controller.  
73 - }  
74 - */  
75 -  
76 -}  
ParentAssistant/ParentAssistant/Classes/controllers/report/View/BehaviorDetailCell.swift
@@ -1,24 +0,0 @@ @@ -1,24 +0,0 @@
1 -//  
2 -// BehaviorDetailCell.swift  
3 -// ParentAssistant  
4 -//  
5 -// Created by Cao yang on 2018/3/23.  
6 -// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.  
7 -//  
8 -  
9 -import UIKit  
10 -  
11 -class BehaviorDetailCell: UITableViewCell {  
12 -  
13 - override func awakeFromNib() {  
14 - super.awakeFromNib()  
15 - // Initialization code  
16 - }  
17 -  
18 - override func setSelected(_ selected: Bool, animated: Bool) {  
19 - super.setSelected(selected, animated: animated)  
20 -  
21 - // Configure the view for the selected state  
22 - }  
23 -  
24 -}  
ParentAssistant/ParentAssistant/Classes/controllers/report/View/CalendarView.swift
@@ -1,72 +0,0 @@ @@ -1,72 +0,0 @@
1 -//  
2 -// CalendarView.swift  
3 -// ParentAssistant  
4 -//  
5 -// Created by Cao yang on 2018/3/27.  
6 -// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.  
7 -//  
8 -  
9 -import UIKit  
10 -  
11 -class CalendarView: UIView,UICollectionViewDelegate,UICollectionViewDataSource {  
12 -  
13 -  
14 - var weekLab = ["日","一","二","三","四","五","六"]  
15 -  
16 - override init(frame: CGRect) {  
17 - super.init(frame: frame)  
18 - self.drawCalendarView(frame: frame)  
19 - }  
20 -  
21 - func drawCalendarView(frame:CGRect) {  
22 - //TODO: 数据源待完成  
23 - let dayLab = ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"]  
24 - weekLab.append(contentsOf: dayLab)  
25 - //设置layout  
26 - let flowlayout = UICollectionViewFlowLayout()  
27 - flowlayout.itemSize = CGSize.init(width: screenWidth/7, height:40)  
28 - flowlayout.minimumLineSpacing = 0  
29 - flowlayout.minimumInteritemSpacing = 0  
30 - flowlayout.headerReferenceSize = CGSize.init(width: 0, height: 0)  
31 - flowlayout.footerReferenceSize = CGSize.init(width: 0, height: 0)  
32 - flowlayout.sectionInset = UIEdgeInsetsMake(0, 0, 0, 0)  
33 -  
34 - let calendarView = UICollectionView.init(frame: frame, collectionViewLayout: flowlayout)  
35 - calendarView.delegate = self  
36 - calendarView.dataSource = self  
37 - calendarView.backgroundColor = UIColor.white  
38 - calendarView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "calendarCell")  
39 - self.addSubview(calendarView)  
40 - }  
41 -  
42 - //MARK: - Delegate  
43 - func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {  
44 - return weekLab.count  
45 - }  
46 -  
47 - func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {  
48 -  
49 - let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "calendarCell", for: indexPath)  
50 - let lab = UILabel.init(frame: cell.bounds)  
51 - lab.text = weekLab[indexPath.row]  
52 - lab.textAlignment = .center  
53 - cell.addSubview(lab)  
54 - return cell  
55 -  
56 - }  
57 - func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {  
58 - print("点击了 第 \(weekLab[indexPath.row])")  
59 - }  
60 - required init?(coder aDecoder: NSCoder) {  
61 - fatalError("init(coder:) has not been implemented")  
62 - }  
63 -  
64 - /*  
65 - // Only override draw() if you perform custom drawing.  
66 - // An empty implementation adversely affects performance during animation.  
67 - override func draw(_ rect: CGRect) {  
68 - // Drawing code  
69 - }  
70 - */  
71 -  
72 -}  
ParentAssistant/ParentAssistant/Classes/controllers/report/View/EducationDetailCell.swift
@@ -1,43 +0,0 @@ @@ -1,43 +0,0 @@
1 -//  
2 -// EducationDetailCell.swift  
3 -// ParentAssistant  
4 -//  
5 -// Created by Cao yang on 2018/3/23.  
6 -// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.  
7 -//  
8 -  
9 -import UIKit  
10 -  
11 -class EducationDetailCell: UITableViewCell {  
12 -  
13 - @IBOutlet weak var lineChartView: UIView!  
14 -  
15 - var customLineChart = LineChartView()  
16 -  
17 - override func awakeFromNib() {  
18 - super.awakeFromNib()  
19 - let rect = self.lineChartView.bounds  
20 - print(rect)  
21 - customLineChart = LineChartView.init(frame: rect)  
22 - customLineChart.drawUI(xLableArr: nil)  
23 - let arr1 = [4,4,2,1,3]  
24 - let arr2 = [2,1,4,4,5]  
25 -  
26 - customLineChart.drawLine(point: arr1, color: UIColorWithRGB(R: 65, G: 105, B: 190))  
27 - customLineChart.drawLine(point: arr2, color: UIColorWithRGB(R: 220, G: 0, B: 16))  
28 -  
29 -  
30 -  
31 - self.lineChartView.addSubview(customLineChart)  
32 -  
33 -  
34 - // Initialization code  
35 - }  
36 -  
37 - override func setSelected(_ selected: Bool, animated: Bool) {  
38 - super.setSelected(selected, animated: animated)  
39 -  
40 - // Configure the view for the selected state  
41 - }  
42 -  
43 -}  
ParentAssistant/ParentAssistant/Classes/controllers/report/View/LineChartView.swift
@@ -1,220 +0,0 @@ @@ -1,220 +0,0 @@
1 -//  
2 -// LineChartView.swift  
3 -// ParentAssistant  
4 -//  
5 -// Created by Cao yang on 2018/3/23.  
6 -// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.  
7 -//  
8 -  
9 -import UIKit  
10 -  
11 -class LineChartView: UIView {  
12 -  
13 - //默认横坐标  
14 - private var xLabArr = ["行为","文明","课堂","作业","礼仪"]  
15 - //设置纵坐标  
16 - private let yCount = 6  
17 - //横坐标个数  
18 - private let xCount = 5  
19 - //最大绩点分数  
20 - private let GPA = 5  
21 - //储存横纵坐标,画线用  
22 - private var xCenterArr = Array<CGFloat>()  
23 - private var yCenterArr = Array<CGFloat>()  
24 - //判断是否重复点击  
25 - private var btnTouch = 10  
26 - //虚线  
27 - private let lineLayer = CAShapeLayer()  
28 - //横坐标下划线  
29 - private let xMoveLayer = CAShapeLayer()  
30 - //纵坐标Lab数组  
31 - private var yMoveLaArr = Array<UILabel>()  
32 - //折线图数据数组  
33 - private var dateArr = Array<Array<Int>>()  
34 - //显示的数字  
35 - var yLabArray = Array<UILabel>()  
36 -  
37 - override init(frame: CGRect) {  
38 - super.init(frame: frame)  
39 - print("frame==\(frame)")  
40 -  
41 - }  
42 - func drawUI(xLableArr:Array<String>?){  
43 -  
44 - if xLableArr != nil {  
45 - xLabArr = xLableArr!  
46 - }  
47 - drawX()  
48 - drawY()  
49 - }  
50 - //设置纵坐标  
51 - private func drawY() {  
52 -  
53 - let yHeight = (self.bounds.height-60)/CGFloat(yCount)  
54 - for index in 0..<yCount{  
55 - let yLab = UILabel.init(frame: CGRect.init(x: 10, y: CGFloat(index)*yHeight, width: 20, height: 20))  
56 - yLab.text = "\(GPA-index)"  
57 - yLab.textColor = UIColorWithRGB(R: 119, G: 119, B: 119)  
58 - yLab.font = UIFont.systemFont(ofSize: 14)  
59 - self.addSubview(yLab)  
60 -  
61 - let lineLab = UILabel.init(frame: CGRect.init(x: 30, y: yLab.center.y, width: screenWidth-60, height: 0.4))  
62 - lineLab.backgroundColor = UIColorWithRGB(R: 190, G: 190, B: 190)  
63 - self.addSubview(lineLab)  
64 -  
65 - yMoveLaArr.append(yLab)  
66 - yCenterArr.append(yLab.frame.origin.y+10)  
67 - }  
68 - }  
69 - //设置横坐标  
70 - private func drawX() {  
71 - let xWidth = (screenWidth-20)/CGFloat(yCount)  
72 - for index in 0..<xCount {  
73 - let nameBtn = UIButton.init(frame: CGRect.init(x: xWidth+CGFloat(index)*xWidth, y: self.bounds.height-70, width: 40, height: 25))  
74 - nameBtn.setTitle(xLabArr[index], for: UIControlState.normal)  
75 - nameBtn.setTitleColor(UIColorWithRGB(R: 119, G: 119, B: 119), for: UIControlState.normal)  
76 - nameBtn.titleLabel!.textAlignment = .center  
77 - nameBtn.titleLabel!.font = UIFont.systemFont(ofSize: 13)  
78 -// nameBtn.backgroundColor = UIColor.orange  
79 - nameBtn.tag = index  
80 - self.addSubview(nameBtn)  
81 -  
82 - nameBtn.addTarget(self, action: #selector(touchXAction(tap:)), for: UIControlEvents.touchUpInside)  
83 -  
84 - xCenterArr.append(nameBtn.frame.origin.x+20)  
85 - }  
86 - }  
87 -  
88 - //MARK: - 画折线  
89 - func drawLine(point:Array<Int>,color:UIColor){  
90 -  
91 - let pointArr = swichPoint(arr: point)  
92 -  
93 - let drawLayer = DrawLayer()  
94 - drawLayer.xPointArr = xCenterArr  
95 - drawLayer.yPointArr = [yCenterArr[pointArr[0]],yCenterArr[pointArr[1]],yCenterArr[pointArr[2]],yCenterArr[pointArr[3]],yCenterArr[pointArr[4]]]  
96 - drawLayer.bounds = self.bounds  
97 - drawLayer.position = self.center  
98 - drawLayer.lineColor = color  
99 - self.layer.addSublayer(drawLayer)  
100 - drawLayer.setNeedsDisplay()  
101 -  
102 - dateArr.append(point)  
103 -  
104 - }  
105 - //MARK: - 点击横坐标  
106 - @objc func touchXAction(tap:UIButton){  
107 -  
108 - let index = tap.tag  
109 -  
110 -  
111 - if btnTouch != index {  
112 -  
113 - //竖虚线  
114 - lineLayer.strokeColor = UIColorWithRGB(R: 92, G: 145, B: 230).cgColor  
115 - lineLayer.lineWidth = 1  
116 - let arr = [5,5]  
117 - lineLayer.lineDashPhase = 0  
118 - lineLayer.lineDashPattern = arr as [NSNumber]  
119 - self.layer.addSublayer(lineLayer)  
120 -  
121 - //X轴下划线  
122 - let movePath = CGMutablePath()  
123 - movePath.move(to: CGPoint.init(x: xCenterArr[index], y: yCenterArr[0]))  
124 - movePath.addLine(to: CGPoint.init(x: xCenterArr[index], y: 10+5*(self.bounds.height-60)/CGFloat(yCount)))  
125 - lineLayer.path = movePath  
126 -  
127 - xMoveLayer.strokeColor = UIColorWithRGB(R: 92, G: 145, B: 230).cgColor  
128 - xMoveLayer.lineWidth = 2  
129 - self.layer.addSublayer(xMoveLayer)  
130 - let movePath2 = CGMutablePath()  
131 - movePath2.move(to: CGPoint.init(x: xCenterArr[index]-15, y: self.bounds.height-45))  
132 - movePath2.addLine(to: CGPoint.init(x: xCenterArr[index]+15, y: self.bounds.height-45))  
133 - xMoveLayer.path = movePath2  
134 -  
135 - if yLabArray.count == dateArr.count {  
136 - for label in yLabArray {  
137 - label.removeFromSuperview()  
138 - }  
139 - }  
140 - yLabArray.removeAll()  
141 - //数字显示  
142 - for i in 0..<dateArr.count {  
143 - let arr = dateArr[i]  
144 - //y坐标数值  
145 - let y = arr[index]  
146 - let yLab = yMoveLaArr[GPA-y]  
147 - var rect = yLab.frame  
148 - rect.origin.x = xCenterArr[index]+10  
149 -  
150 - let newLab = UILabel()  
151 - newLab.text = yLab.text  
152 - newLab.textColor = yLab.textColor  
153 - newLab.font = yLab.font  
154 - newLab.frame = rect  
155 - self.addSubview(newLab)  
156 - yLabArray.append(newLab)  
157 - }  
158 - }else{  
159 - print(yLabArray)  
160 - }  
161 - btnTouch = index  
162 -  
163 -  
164 - }  
165 - //转换y坐标  
166 - func swichPoint(arr:Array<Int>)->Array<Int>{  
167 - var array = Array<Int>()  
168 - for index in 0..<arr.count {  
169 - let value = GPA - arr[index]  
170 - array.append(value)  
171 - }  
172 - return array  
173 - }  
174 -  
175 - required init?(coder aDecoder: NSCoder) {  
176 - fatalError("init(coder:) has not been implemented")  
177 - }  
178 -  
179 - /*  
180 - // Only override draw() if you perform custom drawing.  
181 - // An empty implementation adversely affects performance during animation.  
182 - override func draw(_ rect: CGRect) {  
183 - // Drawing code  
184 - }  
185 - */  
186 -  
187 -}  
188 -  
189 -class DrawLayer: CALayer {  
190 -  
191 - var yPointArr = Array<CGFloat>()  
192 - var xPointArr = Array<CGFloat>()  
193 - var lineColor = UIColor()  
194 -  
195 - override func draw(in ctx: CGContext) {  
196 -  
197 - let context = ctx  
198 - //点  
199 - context.setFillColor(lineColor.cgColor)  
200 -  
201 - for i in 0..<xPointArr.count {  
202 - context.fillEllipse(in: CGRect.init(x: xPointArr[i]-5, y: yPointArr[i]-5, width: 10, height: 10))  
203 -  
204 - }  
205 - //折线  
206 - context.setStrokeColor(lineColor.cgColor)  
207 - context.setLineWidth(1.5)  
208 - for i in 0..<xPointArr.count {  
209 - if i == 0 {  
210 - context.move(to: CGPoint.init(x: xPointArr[0] , y: yPointArr[0]))  
211 - }else{  
212 - context.addLine(to: CGPoint.init(x: xPointArr[i] , y: yPointArr[i]))  
213 - }  
214 - }  
215 - context.strokePath()  
216 - }  
217 -  
218 -}  
219 -  
220 -  
ParentAssistant/ParentAssistant/Classes/controllers/report/View/MoralDetailCell.swift
@@ -1,32 +0,0 @@ @@ -1,32 +0,0 @@
1 -//  
2 -// MoralDetailCell.swift  
3 -// ParentAssistant  
4 -//  
5 -// Created by Cao yang on 2018/3/23.  
6 -// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.  
7 -//  
8 -  
9 -import UIKit  
10 -  
11 -class MoralDetailCell: UITableViewCell {  
12 -  
13 - @IBOutlet weak var dateLab: UILabel!  
14 - @IBOutlet weak var pointLab: UILabel!  
15 - @IBOutlet weak var rankingLab: UILabel!  
16 - @IBOutlet weak var risingLab: UILabel!  
17 - @IBOutlet weak var risingRightLab: UILabel!  
18 - @IBOutlet weak var averageLab: UILabel!  
19 - @IBOutlet weak var averageRightLab: UILabel!  
20 - @IBOutlet weak var evaluationLab: UILabel!  
21 - override func awakeFromNib() {  
22 - super.awakeFromNib()  
23 - // Initialization code  
24 - }  
25 -  
26 - override func setSelected(_ selected: Bool, animated: Bool) {  
27 - super.setSelected(selected, animated: animated)  
28 -  
29 - // Configure the view for the selected state  
30 - }  
31 -  
32 -}  
ParentAssistant/ParentAssistant/Classes/controllers/report/View/MoralTableViewCell.swift
@@ -1,30 +0,0 @@ @@ -1,30 +0,0 @@
1 -//  
2 -// MoralTableViewCell.swift  
3 -// ParentAssistant  
4 -//  
5 -// Created by Cao yang on 2018/3/22.  
6 -// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.  
7 -//  
8 -  
9 -import UIKit  
10 -  
11 -class MoralTableViewCell: UITableViewCell {  
12 -  
13 - @IBOutlet weak var pointLab: UILabel!  
14 - @IBOutlet weak var todayReName: UILabel!  
15 - @IBOutlet weak var rankingLab: UILabel!  
16 - @IBOutlet weak var evaluateLab: UILabel!  
17 - @IBOutlet weak var rankStatusLab: UILabel!  
18 - @IBOutlet weak var reportDateLab: UILabel!  
19 - override func awakeFromNib() {  
20 - super.awakeFromNib()  
21 - // Initialization code  
22 - }  
23 -  
24 - override func setSelected(_ selected: Bool, animated: Bool) {  
25 - super.setSelected(selected, animated: animated)  
26 -  
27 - // Configure the view for the selected state  
28 - }  
29 -  
30 -}  
ParentAssistant/ParentAssistant/Classes/controllers/report/View/ReportDateCollectionViewCell.swift
@@ -1,21 +0,0 @@ @@ -1,21 +0,0 @@
1 -//  
2 -// ReportDateCollectionViewCell.swift  
3 -// ParentAssistant  
4 -//  
5 -// Created by 葛建军 on 2018/3/9.  
6 -// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.  
7 -//  
8 -  
9 -import UIKit  
10 -class ReportDateCollectionViewCell: UICollectionViewCell {  
11 - @IBOutlet var weekLabel: UILabel!  
12 - @IBOutlet var dateLabel: UILabel!  
13 - func setupWithDate(week:String,date:String){  
14 - weekLabel.text = week  
15 - dateLabel.text = date  
16 -  
17 -  
18 -  
19 - }  
20 -  
21 -}  
ParentAssistant/ParentAssistant/Classes/controllers/report/View/ReportHeaderView.swift
@@ -1,48 +0,0 @@ @@ -1,48 +0,0 @@
1 -//  
2 -// ReportHeaderView.swift  
3 -// ParentAssistant  
4 -//  
5 -// Created by 葛建军 on 2018/3/8.  
6 -// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.  
7 -//  
8 -  
9 -import UIKit  
10 -  
11 -class ReportHeaderView: UIView {  
12 - var delegate:ReportHeaderViewDelegate!  
13 - @IBOutlet var nameButton: UIButton!//学生名字按钮  
14 - @IBOutlet var dateButton: UIButton!//日期按钮  
15 - @IBOutlet var typeButton: UIButton!//筛选按钮  
16 - override func awakeFromNib() {  
17 - super.awakeFromNib()  
18 - }  
19 - override func layoutSubviews() {  
20 - super.layoutSubviews()  
21 - nameButton.frame.origin = CGPoint(x: 15, y: 7)  
22 - dateButton.frame.origin = CGPoint(x: (getScreenWidth()-dateButton.frame.size.width)/2, y: 7)  
23 - typeButton.frame.origin = CGPoint(x: getScreenWidth()-typeButton.frame.size.width-30, y: 7)  
24 - }  
25 - //点击学生姓名按钮  
26 - @IBAction func changeStudentAction(_ sender: UIButton) {  
27 - delegate.selectStudentButton()  
28 - }  
29 - //点击日期按钮  
30 - @IBAction func changeDateAction(_ sender: UIButton) {  
31 - delegate.selectDateButton()  
32 - }  
33 - //点击筛选按钮  
34 - @IBAction func changeTypeAction(_ sender: UIButton) {  
35 - delegate.selectTypeButton()  
36 - }  
37 -  
38 -}  
39 -protocol ReportHeaderViewDelegate {  
40 - func selectStudentButton()  
41 - func selectDateButton()  
42 - func selectTypeButton()  
43 -}  
44 -extension ReportHeaderView {  
45 - class func titleView() -> ReportHeaderView {  
46 - return Bundle.main.loadNibNamed("ReportHeaderView", owner: nil, options: nil)?.first as! ReportHeaderView  
47 - }  
48 -}  
ParentAssistant/ParentAssistant/Classes/controllers/report/View/ReportHeaderView.xib
@@ -1,61 +0,0 @@ @@ -1,61 +0,0 @@
1 -<?xml version="1.0" encoding="UTF-8"?>  
2 -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">  
3 - <device id="retina4_7" orientation="portrait">  
4 - <adaptation id="fullscreen"/>  
5 - </device>  
6 - <dependencies>  
7 - <deployment identifier="iOS"/>  
8 - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>  
9 - <capability name="Safe area layout guides" minToolsVersion="9.0"/>  
10 - <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>  
11 - </dependencies>  
12 - <objects>  
13 - <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>  
14 - <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>  
15 - <view clipsSubviews="YES" contentMode="scaleToFill" id="4WE-cx-977" customClass="ReportHeaderView" customModule="ParentAssistant" customModuleProvider="target">  
16 - <rect key="frame" x="0.0" y="0.0" width="485" height="44"/>  
17 - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>  
18 - <subviews>  
19 - <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="W6e-VK-JCE">  
20 - <rect key="frame" x="20" y="7" width="46" height="30"/>  
21 - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>  
22 - <state key="normal" title="马伯骞">  
23 - <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>  
24 - </state>  
25 - <connections>  
26 - <action selector="changeStudentAction:" destination="4WE-cx-977" eventType="touchUpInside" id="Dua-XZ-hMB"/>  
27 - </connections>  
28 - </button>  
29 - <button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5Dq-Z9-eEM">  
30 - <rect key="frame" x="434" y="7" width="31" height="30"/>  
31 - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>  
32 - <state key="normal" title="筛选">  
33 - <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>  
34 - </state>  
35 - <connections>  
36 - <action selector="changeTypeAction:" destination="4WE-cx-977" eventType="touchUpInside" id="XFz-ca-od2"/>  
37 - </connections>  
38 - </button>  
39 - <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7xY-bD-L7w">  
40 - <rect key="frame" x="191" y="7" width="102" height="30"/>  
41 - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>  
42 - <state key="normal" title="12月29日">  
43 - <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>  
44 - </state>  
45 - <connections>  
46 - <action selector="changeDateAction:" destination="4WE-cx-977" eventType="touchUpInside" id="pCF-3R-0zv"/>  
47 - </connections>  
48 - </button>  
49 - </subviews>  
50 - <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>  
51 - <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>  
52 - <viewLayoutGuide key="safeArea" id="71B-FS-Ws9"/>  
53 - <connections>  
54 - <outlet property="dateButton" destination="7xY-bD-L7w" id="3zG-4z-eNW"/>  
55 - <outlet property="nameButton" destination="W6e-VK-JCE" id="XDD-iU-T0k"/>  
56 - <outlet property="typeButton" destination="5Dq-Z9-eEM" id="LAM-Dw-HAX"/>  
57 - </connections>  
58 - <point key="canvasLocation" x="156.5" y="93"/>  
59 - </view>  
60 - </objects>  
61 -</document>  
ParentAssistant/ParentAssistant/Classes/controllers/report/View/SceneDownCell.swift
@@ -1,30 +0,0 @@ @@ -1,30 +0,0 @@
1 -//  
2 -// SceneDownCell.swift  
3 -// ParentAssistant  
4 -//  
5 -// Created by Cao yang on 2018/3/24.  
6 -// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.  
7 -//  
8 -  
9 -import UIKit  
10 -  
11 -class SceneDownCell: UITableViewCell {  
12 -  
13 - @IBOutlet weak var evaluateLab: UILabel!  
14 - @IBOutlet weak var sceneLab: UILabel!  
15 - @IBOutlet weak var scoreLab: UILabel!  
16 - @IBOutlet weak var nameLab: UILabel!  
17 - @IBOutlet weak var classLab: UILabel!  
18 - @IBOutlet weak var dateLab: UILabel!  
19 - override func awakeFromNib() {  
20 - super.awakeFromNib()  
21 - // Initialization code  
22 - }  
23 -  
24 - override func setSelected(_ selected: Bool, animated: Bool) {  
25 - super.setSelected(selected, animated: animated)  
26 -  
27 - // Configure the view for the selected state  
28 - }  
29 -  
30 -}  
ParentAssistant/ParentAssistant/Classes/controllers/report/View/SceneMiddleCell.swift
@@ -1,44 +0,0 @@ @@ -1,44 +0,0 @@
1 -//  
2 -// SceneMiddleCell.swift  
3 -// ParentAssistant  
4 -//  
5 -// Created by Cao yang on 2018/3/24.  
6 -// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.  
7 -//  
8 -  
9 -import UIKit  
10 -  
11 -class SceneMiddleCell: UITableViewCell {  
12 -  
13 - @IBOutlet weak var lineChartView: UIView!  
14 -  
15 - var customLineChart = LineChartView()  
16 - override func awakeFromNib() {  
17 - super.awakeFromNib()  
18 - // Initialization code  
19 - let rect = self.lineChartView.bounds  
20 - customLineChart = LineChartView.init(frame: rect)  
21 - let customXLabArr = ["03/12","03/13","03/14","03/15","03/16"]  
22 -  
23 - customLineChart.drawUI(xLableArr:customXLabArr)  
24 -  
25 - let arr1 = [5,4,5,5,5]  
26 - let arr2 = [4,4,2,1,3]  
27 - let arr3 = [3,3,4,3,4]  
28 -  
29 -  
30 - customLineChart.drawLine(point: arr1, color: UIColorWithRGB(R: 129, G: 199, B: 132))  
31 - customLineChart.drawLine(point: arr2, color: UIColorWithRGB(R: 92, G: 145, B: 230))  
32 - customLineChart.drawLine(point: arr3, color: UIColorWithRGB(R: 255, G: 213, B: 79))  
33 -  
34 - self.lineChartView.addSubview(customLineChart)  
35 -  
36 - }  
37 -  
38 - override func setSelected(_ selected: Bool, animated: Bool) {  
39 - super.setSelected(selected, animated: animated)  
40 -  
41 - // Configure the view for the selected state  
42 - }  
43 -  
44 -}  
ParentAssistant/ParentAssistant/Classes/controllers/report/View/SceneTopCell.swift
@@ -1,28 +0,0 @@ @@ -1,28 +0,0 @@
1 -//  
2 -// SceneTopCell.swift  
3 -// ParentAssistant  
4 -//  
5 -// Created by Cao yang on 2018/3/24.  
6 -// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.  
7 -//  
8 -  
9 -import UIKit  
10 -  
11 -class SceneTopCell: UITableViewCell {  
12 -  
13 - @IBOutlet weak var scoreLab: UILabel! //得分  
14 - @IBOutlet weak var GPALab: UILabel! //绩点  
15 - @IBOutlet weak var LevelLab: UILabel! //等级  
16 - @IBOutlet weak var SuggestLab: UITextView! //指导意见  
17 - override func awakeFromNib() {  
18 - super.awakeFromNib()  
19 - // Initialization code  
20 - }  
21 -  
22 - override func setSelected(_ selected: Bool, animated: Bool) {  
23 - super.setSelected(selected, animated: animated)  
24 -  
25 - // Configure the view for the selected state  
26 - }  
27 -  
28 -}  
ParentAssistant/ParentAssistant/Classes/controllers/report/View/TaskPresentationTableViewCell.swift
@@ -1,82 +0,0 @@ @@ -1,82 +0,0 @@
1 -//  
2 -// TaskPresentationTableViewCell.swift  
3 -// ParentAssistant  
4 -//  
5 -// Created by 葛建军 on 2018/3/9.  
6 -// Copyright © 2018年 HANGZHOUTEAM. All rights reserved.  
7 -//  
8 -  
9 -import UIKit  
10 -//func degreesToRadians(x:Double) -> CGFloat{  
11 -// return (CGFloat(Double.pi*(x)/180.0))  
12 -//} //把角度转换成PI的方式  
13 -//let PROGREESS_WIDTH = 160 //圆直径  
14 -//let PROGRESS_LINE_WIDTH = 4 //弧线的宽度  
15 -class TaskPresentationTableViewCell: UITableViewCell {  
16 -  
17 - @IBOutlet var layerLabel: UILabel!  
18 - override func awakeFromNib() {  
19 - super.awakeFromNib()  
20 - // Initialization code  
21 - //可以画出上面所示的整个轨道。这个圆形是从-210度的角度到30度。  
22 -// let path = UIBezierPath(arcCenter: CGPoint(x: 40, y: 40), radius: CGFloat((PROGREESS_WIDTH-PROGRESS_LINE_WIDTH)/2), startAngle: degreesToRadians(x: -210), endAngle: degreesToRadians(x: 30), clockwise: true)  
23 - //画出一个完成的进度的背景轨道  
24 -// let trackLayer = CAShapeLayer()//创建一个track shape layer  
25 -// trackLayer.frame = self.layerLabel.bounds  
26 -// trackLayer.fillColor = UIColor.clear.cgColor  
27 -// trackLayer.strokeColor = UIColor.red.cgColor//指定path的渲染颜色  
28 -// trackLayer.opacity = 0.25 //背景同学你就甘心做背景吧,不要太明显了,透明度小一点  
29 -// trackLayer.lineCap = kCALineCapRound//指定线的边缘是圆的  
30 -// trackLayer.lineWidth = CGFloat(PROGRESS_LINE_WIDTH)//线的宽度  
31 -// trackLayer.path = path.cgPath //把path传递給layer,然后layer会处理相应的渲染,整个逻辑和CoreGraph是一致的。  
32 -//  
33 -// self.layerLabel.layer.addSublayer(trackLayer)  
34 - //渐变进度条  
35 -// let progressLayer = CAShapeLayer()  
36 -// progressLayer.frame = self.layerLabel.bounds  
37 -// progressLayer.fillColor = UIColor.clear.cgColor  
38 -// progressLayer.strokeColor = UIColor.red.cgColor  
39 -// progressLayer.lineCap = kCALineCapRound;  
40 -// progressLayer.lineWidth = CGFloat(PROGRESS_LINE_WIDTH)  
41 -// progressLayer.path = path.cgPath  
42 -// progressLayer.strokeEnd = 50/100.0 //总进度  
43 -//  
44 -// let gradientLayer = CALayer()  
45 -// let gradientLayer1 = CAGradientLayer()  
46 -// gradientLayer1.frame = CGRect(x: 0, y: 0, width: self.layerLabel.frame.size.width/2, height: self.layerLabel.frame.size.height)  
47 -// gradientLayer1.colors = [UIColor.yellow.cgColor,UIColor.blue.cgColor]  
48 -// gradientLayer1.locations = [0.5,0.9,1]  
49 -// gradientLayer1.startPoint = CGPoint(x: 0.5, y: 1)  
50 -// gradientLayer1.endPoint = CGPoint(x: 0.5, y: 0)  
51 -// gradientLayer.addSublayer(gradientLayer1)  
52 -//  
53 -// let gradientLayer2 = CAGradientLayer()  
54 -// gradientLayer2.frame = CGRect(x: self.layerLabel.frame.size.width/2, y: 0, width: self.layerLabel.frame.size.width/2, height: self.layerLabel.frame.size.height)  
55 -// gradientLayer2.colors = [UIColor.blue.cgColor,UIColor.blue.cgColor]  
56 -// gradientLayer2.locations = [0.1,0.5,1]  
57 -// gradientLayer2.startPoint = CGPoint(x: 0.5, y: 0)  
58 -// gradientLayer2.endPoint = CGPoint(x: 0.5, y: 1)  
59 -// gradientLayer.addSublayer(gradientLayer2)  
60 -//  
61 -// gradientLayer.mask = progressLayer//用progressLayer来截取渐变层  
62 -// self.layerLabel.layer.addSublayer(gradientLayer)  
63 - }  
64 - //进度条效果 CAShapeLayer有一个strokeEnd的属性,这个属性是从0到1的浮点类型,正好可以用表达百分比,而且这个属性是animatable,可以动态的表示进度的变化。  
65 - // -(void)setPercent:(NSInteger)percent animated:(BOOL)animated  
66 - // {  
67 - // [CATransaction begin];  
68 - // [CATransaction setDisableActions:!animated];  
69 - // [CATransaction setAnimationTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]];  
70 - // [CATransaction setAnimationDuration:MAIN_SCREEN_ANIMATION_TIME];  
71 - // progressLayer.strokeEnd = percent/100.0;  
72 - // [CATransaction commit];  
73 - //  
74 - // _percent = percent;  
75 - // }  
76 - override func setSelected(_ selected: Bool, animated: Bool) {  
77 - super.setSelected(selected, animated: animated)  
78 -  
79 - // Configure the view for the selected state  
80 - }  
81 -  
82 -}  
ParentAssistant/ParentAssistant/Classes/util/Macro.swift
@@ -72,7 +72,7 @@ let URL_PARENTSERVICE_GETADS=&quot;/api/ParentService/GetAds&quot; //嘀 @@ -72,7 +72,7 @@ let URL_PARENTSERVICE_GETADS=&quot;/api/ParentService/GetAds&quot; //嘀
72 72
73 //MARK: 遠 73 //MARK: 遠
74 /// 敺瑁雿祕 74 /// 敺瑁雿祕
75 -let URL_POST_EVALUATION_ANALYSIS = "/api/EvaluationLabel/GetStatisticalAnalysis" 75 +let URL_POST_EVALUATION_ANALYSIS = "/api/EvaluationLabel/Getstatisticsanalytical"
76 /// 敺瑁霂行 76 /// 敺瑁霂行
77 let URL_POST_EVALUATION_ANALYSIS_DETAILS = "/api/EvaluationLabel/GetSceneAnalysisDetails" 77 let URL_POST_EVALUATION_ANALYSIS_DETAILS = "/api/EvaluationLabel/GetSceneAnalysisDetails"
78 78
ParentAssistant/ParentAssistant/Supporting Files/Base.lproj/Main.storyboard
@@ -527,16 +527,34 @@ @@ -527,16 +527,34 @@
527 </objects> 527 </objects>
528 <point key="canvasLocation" x="54" y="117"/> 528 <point key="canvasLocation" x="54" y="117"/>
529 </scene> 529 </scene>
  530 + <!--Grow View Controller-->
  531 + <scene sceneID="36g-8r-oze">
  532 + <objects>
  533 + <viewController id="K2D-OC-DRl" customClass="GrowViewController" customModule="ParentAssistant" customModuleProvider="target" sceneMemberID="viewController">
  534 + <view key="view" contentMode="scaleToFill" id="dfc-6f-RU1">
  535 + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
  536 + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
  537 + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
  538 + <viewLayoutGuide key="safeArea" id="xWd-cd-ncW"/>
  539 + </view>
  540 + <navigationItem key="navigationItem" id="9Fp-i1-vxh">
  541 + <nil key="title"/>
  542 + </navigationItem>
  543 + </viewController>
  544 + <placeholder placeholderIdentifier="IBFirstResponder" id="Pvf-SL-AwW" userLabel="First Responder" sceneMemberID="firstResponder"/>
  545 + </objects>
  546 + <point key="canvasLocation" x="1660" y="399"/>
  547 + </scene>
530 <!--报告--> 548 <!--报告-->
531 <scene sceneID="YFU-9r-YrN"> 549 <scene sceneID="YFU-9r-YrN">
532 <objects> 550 <objects>
533 - <viewController title="报告" id="oqH-t7-mJp" customClass="ReportViewController" customModule="ParentAssistant" customModuleProvider="target" sceneMemberID="viewController"> 551 + <viewController storyboardIdentifier="ReportViewController" title="报告" id="oqH-t7-mJp" customClass="ReportViewController" customModule="ParentAssistant" customModuleProvider="target" sceneMemberID="viewController">
534 <view key="view" contentMode="scaleToFill" id="5aI-3l-uAy"> 552 <view key="view" contentMode="scaleToFill" id="5aI-3l-uAy">
535 <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> 553 <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
536 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> 554 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
537 <subviews> 555 <subviews>
538 <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="EEs-Ae-t7U"> 556 <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="EEs-Ae-t7U">
539 - <rect key="frame" x="0.0" y="134" width="375" height="484"/> 557 + <rect key="frame" x="0.0" y="90" width="375" height="577"/>
540 <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> 558 <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
541 <prototypes> 559 <prototypes>
542 <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="MoralTableViewCell" rowHeight="280" id="mJ6-p0-1k0" customClass="MoralTableViewCell" customModule="ParentAssistant" customModuleProvider="target"> 560 <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="MoralTableViewCell" rowHeight="280" id="mJ6-p0-1k0" customClass="MoralTableViewCell" customModule="ParentAssistant" customModuleProvider="target">
@@ -769,14 +787,14 @@ @@ -769,14 +787,14 @@
769 </constraints> 787 </constraints>
770 <viewLayoutGuide key="safeArea" id="9O4-jf-dgu"/> 788 <viewLayoutGuide key="safeArea" id="9O4-jf-dgu"/>
771 </view> 789 </view>
772 - <navigationItem key="navigationItem" title="报告" id="dVv-mJ-714"/> 790 + <navigationItem key="navigationItem" id="dVv-mJ-714"/>
773 <connections> 791 <connections>
774 <outlet property="reportTable" destination="EEs-Ae-t7U" id="WCp-ci-zOE"/> 792 <outlet property="reportTable" destination="EEs-Ae-t7U" id="WCp-ci-zOE"/>
775 </connections> 793 </connections>
776 </viewController> 794 </viewController>
777 <placeholder placeholderIdentifier="IBFirstResponder" id="AdY-P5-857" userLabel="First Responder" sceneMemberID="firstResponder"/> 795 <placeholder placeholderIdentifier="IBFirstResponder" id="AdY-P5-857" userLabel="First Responder" sceneMemberID="firstResponder"/>
778 </objects> 796 </objects>
779 - <point key="canvasLocation" x="1597.5999999999999" y="409.7451274362819"/> 797 + <point key="canvasLocation" x="2463" y="399"/>
780 </scene> 798 </scene>
781 <!--Moral View Controller--> 799 <!--Moral View Controller-->
782 <scene sceneID="gZ8-jD-xe5"> 800 <scene sceneID="gZ8-jD-xe5">
@@ -787,7 +805,7 @@ @@ -787,7 +805,7 @@
787 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> 805 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
788 <subviews> 806 <subviews>
789 <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="BRJ-Oe-fwH"> 807 <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="BRJ-Oe-fwH">
790 - <rect key="frame" x="0.0" y="64" width="375" height="544"/> 808 + <rect key="frame" x="0.0" y="20" width="375" height="637"/>
791 <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> 809 <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
792 <prototypes> 810 <prototypes>
793 <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="moralDetail" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="moralDetail" rowHeight="280" id="edU-Xp-UQN" customClass="MoralDetailCell" customModule="ParentAssistant" customModuleProvider="target"> 811 <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="moralDetail" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="moralDetail" rowHeight="280" id="edU-Xp-UQN" customClass="MoralDetailCell" customModule="ParentAssistant" customModuleProvider="target">
@@ -1089,7 +1107,7 @@ @@ -1089,7 +1107,7 @@
1089 </viewController> 1107 </viewController>
1090 <placeholder placeholderIdentifier="IBFirstResponder" id="dWZ-wh-hFd" userLabel="First Responder" sceneMemberID="firstResponder"/> 1108 <placeholder placeholderIdentifier="IBFirstResponder" id="dWZ-wh-hFd" userLabel="First Responder" sceneMemberID="firstResponder"/>
1091 </objects> 1109 </objects>
1092 - <point key="canvasLocation" x="2357.5999999999999" y="409.7451274362819"/> 1110 + <point key="canvasLocation" x="3182" y="410"/>
1093 </scene> 1111 </scene>
1094 <!--场景详情--> 1112 <!--场景详情-->
1095 <scene sceneID="UoQ-sj-mPR"> 1113 <scene sceneID="UoQ-sj-mPR">
@@ -1442,7 +1460,7 @@ @@ -1442,7 +1460,7 @@
1442 </viewController> 1460 </viewController>
1443 <placeholder placeholderIdentifier="IBFirstResponder" id="msC-eZ-quK" userLabel="First Responder" sceneMemberID="firstResponder"/> 1461 <placeholder placeholderIdentifier="IBFirstResponder" id="msC-eZ-quK" userLabel="First Responder" sceneMemberID="firstResponder"/>
1444 </objects> 1462 </objects>
1445 - <point key="canvasLocation" x="3093.5999999999999" y="409.7451274362819"/> 1463 + <point key="canvasLocation" x="3826" y="410"/>
1446 </scene> 1464 </scene>
1447 <!--My View Controller--> 1465 <!--My View Controller-->
1448 <scene sceneID="Mnt-Vb-tkB"> 1466 <scene sceneID="Mnt-Vb-tkB">
@@ -1982,11 +2000,11 @@ @@ -1982,11 +2000,11 @@
1982 </objects> 2000 </objects>
1983 <point key="canvasLocation" x="913" y="-272"/> 2001 <point key="canvasLocation" x="913" y="-272"/>
1984 </scene> 2002 </scene>
1985 - <!--报告--> 2003 + <!--成长-->
1986 <scene sceneID="ZBd-hB-qdB"> 2004 <scene sceneID="ZBd-hB-qdB">
1987 <objects> 2005 <objects>
1988 <navigationController automaticallyAdjustsScrollViewInsets="NO" id="Yrp-0h-ncC" customClass="MainViewController" customModule="ParentAssistant" customModuleProvider="target" sceneMemberID="viewController"> 2006 <navigationController automaticallyAdjustsScrollViewInsets="NO" id="Yrp-0h-ncC" customClass="MainViewController" customModule="ParentAssistant" customModuleProvider="target" sceneMemberID="viewController">
1989 - <tabBarItem key="tabBarItem" title="报告" image="report_bar_icon" selectedImage="report_bar_icon_select" id="b8X-9h-Lep"/> 2007 + <tabBarItem key="tabBarItem" title="成长" image="report_bar_icon" selectedImage="report_bar_icon_select" id="b8X-9h-Lep"/>
1990 <toolbarItems/> 2008 <toolbarItems/>
1991 <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="uLq-9a-RVg"> 2009 <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="uLq-9a-RVg">
1992 <rect key="frame" x="0.0" y="20" width="375" height="44"/> 2010 <rect key="frame" x="0.0" y="20" width="375" height="44"/>
@@ -1997,7 +2015,7 @@ @@ -1997,7 +2015,7 @@
1997 </navigationBar> 2015 </navigationBar>
1998 <nil name="viewControllers"/> 2016 <nil name="viewControllers"/>
1999 <connections> 2017 <connections>
2000 - <segue destination="oqH-t7-mJp" kind="relationship" relationship="rootViewController" id="1yc-lt-bJX"/> 2018 + <segue destination="K2D-OC-DRl" kind="relationship" relationship="rootViewController" id="TDx-4W-K3j"/>
2001 </connections> 2019 </connections>
2002 </navigationController> 2020 </navigationController>
2003 <placeholder placeholderIdentifier="IBFirstResponder" id="tga-hk-GVT" userLabel="First Responder" sceneMemberID="firstResponder"/> 2021 <placeholder placeholderIdentifier="IBFirstResponder" id="tga-hk-GVT" userLabel="First Responder" sceneMemberID="firstResponder"/>