From 839b987a96dc5ee967448591ab782f19286a729f Mon Sep 17 00:00:00 2001 From: Cao yang <caoyang@CaodeMacBook-Pro.local> Date: Thu, 12 Apr 2018 17:32:26 +0800 Subject: [PATCH] 添加请假页面 --- ParentAssistant/ParentAssistant.xcodeproj/project.pbxproj | 28 ++++++++++++++++++++++++++++ ParentAssistant/ParentAssistant.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist | 8 ++++++++ ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate | Bin 167930 -> 0 bytes ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramCardViewController.swift | 35 +++++++++++++++++++++++++++++++++++ ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramCheckViewController.swift | 35 +++++++++++++++++++++++++++++++++++ ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramVacateViewController.swift | 153 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramViewController.swift | 17 ++++++++++++++++- ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateBodyTableViewCell.swift | 31 +++++++++++++++++++++++++++++++ ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateBodyTableViewCell.xib | 184 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateTableViewCell.swift | 26 ++++++++++++++++++++++++++ ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateTableViewCell.xib | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_calendar.imageset/Contents.json | 21 +++++++++++++++++++++ ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_calendar.imageset/grow_calendar@2x.png | Bin 0 -> 751 bytes ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_ellipse.imageset/Contents.json | 21 +++++++++++++++++++++ ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_ellipse.imageset/grow_ellipse@2x.png | Bin 0 -> 322 bytes 15 files changed, 667 insertions(+), 1 deletion(-) create mode 100644 ParentAssistant/ParentAssistant.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramCardViewController.swift create mode 100644 ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramCheckViewController.swift create mode 100644 ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramVacateViewController.swift create mode 100644 ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateBodyTableViewCell.swift create mode 100644 ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateBodyTableViewCell.xib create mode 100644 ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateTableViewCell.swift create mode 100644 ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateTableViewCell.xib create mode 100644 ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_calendar.imageset/Contents.json create mode 100644 ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_calendar.imageset/grow_calendar@2x.png create mode 100644 ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_ellipse.imageset/Contents.json create mode 100644 ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_ellipse.imageset/grow_ellipse@2x.png diff --git a/ParentAssistant/ParentAssistant.xcodeproj/project.pbxproj b/ParentAssistant/ParentAssistant.xcodeproj/project.pbxproj index c2b5168..f4d227d 100644 --- a/ParentAssistant/ParentAssistant.xcodeproj/project.pbxproj +++ b/ParentAssistant/ParentAssistant.xcodeproj/project.pbxproj @@ -32,12 +32,19 @@ 5993652C20528D5700C8B371 /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5993652B20528D5700C8B371 /* MainViewController.swift */; }; 59C0A9B8205375F800A8BB5A /* SelectCityViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59C0A9B7205375F800A8BB5A /* SelectCityViewController.swift */; }; 9FB4F6F97960021FB4F02BBE /* Pods_ParentAssistant.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6EEE742C2FA920AEDF24728 /* Pods_ParentAssistant.framework */; }; + AD198173207D9FB4009AB8B5 /* ProgramCheckViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD198172207D9FB4009AB8B5 /* ProgramCheckViewController.swift */; }; + AD198175207D9FC1009AB8B5 /* ProgramCardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD198174207D9FC1009AB8B5 /* ProgramCardViewController.swift */; }; + AD198177207D9FF5009AB8B5 /* ProgramVacateViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD198176207D9FF5009AB8B5 /* ProgramVacateViewController.swift */; }; AD24AA202065FBAF00ECA428 /* SceneTopCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD24AA1F2065FBAF00ECA428 /* SceneTopCell.swift */; }; AD24AA222065FBC000ECA428 /* SceneMiddleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD24AA212065FBC000ECA428 /* SceneMiddleCell.swift */; }; AD24AA242065FBD100ECA428 /* SceneDownCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD24AA232065FBD100ECA428 /* SceneDownCell.swift */; }; AD34D11A2064C79D00989F8D /* MoralDetailCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD34D1192064C79D00989F8D /* MoralDetailCell.swift */; }; AD34D11C2064C7AE00989F8D /* EducationDetailCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD34D11B2064C7AE00989F8D /* EducationDetailCell.swift */; }; AD34D11E2064C7C300989F8D /* BehaviorDetailCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD34D11D2064C7C300989F8D /* BehaviorDetailCell.swift */; }; + AD64A2C0207F289400B25E80 /* ProgramVacateTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD64A2BE207F289400B25E80 /* ProgramVacateTableViewCell.swift */; }; + AD64A2C1207F289400B25E80 /* ProgramVacateTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD64A2BF207F289400B25E80 /* ProgramVacateTableViewCell.xib */; }; + AD64A2C3207F28CF00B25E80 /* ProgramVacateBodyTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD64A2C2207F28CF00B25E80 /* ProgramVacateBodyTableViewCell.swift */; }; + AD64A2C5207F28EB00B25E80 /* ProgramVacateBodyTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD64A2C4207F28EB00B25E80 /* ProgramVacateBodyTableViewCell.xib */; }; AD65FB78206354220052415B /* MoralTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD65FB77206354220052415B /* MoralTableViewCell.swift */; }; AD65FB7A20637F110052415B /* MoralViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD65FB7920637F110052415B /* MoralViewController.swift */; }; ADAEA3982064960300A47D2C /* SceneDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADAEA3972064960300A47D2C /* SceneDetailViewController.swift */; }; @@ -187,12 +194,19 @@ 5993652B20528D5700C8B371 /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; }; 59C0A9B7205375F800A8BB5A /* SelectCityViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectCityViewController.swift; sourceTree = "<group>"; }; A6EEE742C2FA920AEDF24728 /* Pods_ParentAssistant.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ParentAssistant.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + AD198172207D9FB4009AB8B5 /* ProgramCheckViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgramCheckViewController.swift; sourceTree = "<group>"; }; + AD198174207D9FC1009AB8B5 /* ProgramCardViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgramCardViewController.swift; sourceTree = "<group>"; }; + AD198176207D9FF5009AB8B5 /* ProgramVacateViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgramVacateViewController.swift; sourceTree = "<group>"; }; AD24AA1F2065FBAF00ECA428 /* SceneTopCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneTopCell.swift; sourceTree = "<group>"; }; AD24AA212065FBC000ECA428 /* SceneMiddleCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneMiddleCell.swift; sourceTree = "<group>"; }; AD24AA232065FBD100ECA428 /* SceneDownCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDownCell.swift; sourceTree = "<group>"; }; AD34D1192064C79D00989F8D /* MoralDetailCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoralDetailCell.swift; sourceTree = "<group>"; }; AD34D11B2064C7AE00989F8D /* EducationDetailCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EducationDetailCell.swift; sourceTree = "<group>"; }; AD34D11D2064C7C300989F8D /* BehaviorDetailCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BehaviorDetailCell.swift; sourceTree = "<group>"; }; + AD64A2BE207F289400B25E80 /* ProgramVacateTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgramVacateTableViewCell.swift; sourceTree = "<group>"; }; + AD64A2BF207F289400B25E80 /* ProgramVacateTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ProgramVacateTableViewCell.xib; sourceTree = "<group>"; }; + AD64A2C2207F28CF00B25E80 /* ProgramVacateBodyTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgramVacateBodyTableViewCell.swift; sourceTree = "<group>"; }; + AD64A2C4207F28EB00B25E80 /* ProgramVacateBodyTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ProgramVacateBodyTableViewCell.xib; sourceTree = "<group>"; }; AD65FB77206354220052415B /* MoralTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoralTableViewCell.swift; sourceTree = "<group>"; }; AD65FB7920637F110052415B /* MoralViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoralViewController.swift; sourceTree = "<group>"; }; ADAEA3972064960300A47D2C /* SceneDetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SceneDetailViewController.swift; sourceTree = "<group>"; }; @@ -513,6 +527,9 @@ isa = PBXGroup; children = ( ADC9AB87207C940700348EF1 /* ProgramViewController.swift */, + AD198172207D9FB4009AB8B5 /* ProgramCheckViewController.swift */, + AD198174207D9FC1009AB8B5 /* ProgramCardViewController.swift */, + AD198176207D9FF5009AB8B5 /* ProgramVacateViewController.swift */, ); path = Program; sourceTree = "<group>"; @@ -579,6 +596,10 @@ AD24AA232065FBD100ECA428 /* SceneDownCell.swift */, ADC9AB83207C673C00348EF1 /* SceneDownCell.xib */, ADAEA3992064C44900A47D2C /* LineChartView.swift */, + AD64A2BE207F289400B25E80 /* ProgramVacateTableViewCell.swift */, + AD64A2BF207F289400B25E80 /* ProgramVacateTableViewCell.xib */, + AD64A2C2207F28CF00B25E80 /* ProgramVacateBodyTableViewCell.swift */, + AD64A2C4207F28EB00B25E80 /* ProgramVacateBodyTableViewCell.xib */, ); path = View; sourceTree = "<group>"; @@ -888,6 +909,7 @@ 5980BF672061048A00F4A35E /* Address.plist in Resources */, BF38847C205CDE1B00A240EF /* JS.storyboard in Resources */, ADC9AB7C207C66C300348EF1 /* EducationDetailCell.xib in Resources */, + AD64A2C1207F289400B25E80 /* ProgramVacateTableViewCell.xib in Resources */, BFF9B7F42057A29D00F39B3E /* TableEmptyView.xib in Resources */, ADC9AB7E207C66DA00348EF1 /* BehaviorDetailCell.xib in Resources */, ADC9AB84207C673C00348EF1 /* SceneDownCell.xib in Resources */, @@ -902,6 +924,7 @@ BF67F3BD20590A2F002FDC61 /* Info-OSX.plist in Resources */, BF621CAC205660E90040D2C1 /* My.storyboard in Resources */, BF67F3BC20590A2F002FDC61 /* Info-iOS.plist in Resources */, + AD64A2C5207F28EB00B25E80 /* ProgramVacateBodyTableViewCell.xib in Resources */, BF7A4C84204E338500460463 /* Assets.xcassets in Resources */, BF7A4C85204E338500460463 /* LaunchScreen.storyboard in Resources */, ADC9AB82207C673300348EF1 /* SceneMiddleCell.xib in Resources */, @@ -993,6 +1016,7 @@ BF621CB02056664C0040D2C1 /* CurrentInfoViewController.swift in Sources */, ADC9AB88207C940700348EF1 /* ProgramViewController.swift in Sources */, BF7A4C3C204CD55300460463 /* ParentAssistant.xcdatamodeld in Sources */, + AD198177207D9FF5009AB8B5 /* ProgramVacateViewController.swift in Sources */, BFEAAAD620525D620072FAAF /* LxButton.m in Sources */, 5993652C20528D5700C8B371 /* MainViewController.swift in Sources */, 5993652A2052553900C8B371 /* pinyin.c in Sources */, @@ -1014,6 +1038,7 @@ 5980BF692061048A00F4A35E /* LZCityPickerView.m in Sources */, BF388482205F5BC800A240EF /* MessageManager.swift in Sources */, 5980BF682061048A00F4A35E /* LZCityPickerController.m in Sources */, + AD198173207D9FB4009AB8B5 /* ProgramCheckViewController.swift in Sources */, BFCED88B20528DE700055373 /* MyViewControllerModel.swift in Sources */, BFF9B7E92056852A00F39B3E /* RegisterViewController.swift in Sources */, BFBC06C72063AE8900CCFAFF /* ZLaunchAdButton.swift in Sources */, @@ -1046,6 +1071,8 @@ 599364EC204E62E700C8B371 /* EvaluationViewController.swift in Sources */, 599364F0204E62E700C8B371 /* ReportViewController.swift in Sources */, BF621CAE2056663C0040D2C1 /* LoginViewController.swift in Sources */, + AD64A2C0207F289400B25E80 /* ProgramVacateTableViewCell.swift in Sources */, + AD64A2C3207F28CF00B25E80 /* ProgramVacateBodyTableViewCell.swift in Sources */, 599364EA204E62E700C8B371 /* ChannelViewController.swift in Sources */, BF406CDE2057C537000A6681 /* OrderDetailTableViewCell.swift in Sources */, BFEAAAC7205257460072FAAF /* LXCalenderCell.m in Sources */, @@ -1056,6 +1083,7 @@ BFBC06C62063AE8900CCFAFF /* ZLaunchAdAnimation.swift in Sources */, AD34D11E2064C7C300989F8D /* BehaviorDetailCell.swift in Sources */, BFCED888205280B700055373 /* MyViewController.swift in Sources */, + AD198175207D9FC1009AB8B5 /* ProgramCardViewController.swift in Sources */, AD65FB78206354220052415B /* MoralTableViewCell.swift in Sources */, BF38846C205A58F800A240EF /* YXMessageManager.swift in Sources */, BFBC06C92063AE8900CCFAFF /* ZLaunchAdConfig.swift in Sources */, diff --git a/ParentAssistant/ParentAssistant.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ParentAssistant/ParentAssistant.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ParentAssistant/ParentAssistant.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IDEDidComputeMac32BitWarning</key> + <true/> +</dict> +</plist> diff --git a/ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate b/ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate index f16de1b..38c768c 100644 Binary files a/ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate and b/ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramCardViewController.swift b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramCardViewController.swift new file mode 100644 index 0000000..cf4bdce --- /dev/null +++ b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramCardViewController.swift @@ -0,0 +1,35 @@ +// +// ProgramCardViewController.swift +// ParentAssistant +// +// Created by Cao yang on 2018/4/11. +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved. +// + +import UIKit + +class ProgramCardViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destinationViewController. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramCheckViewController.swift b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramCheckViewController.swift new file mode 100644 index 0000000..d63d91f --- /dev/null +++ b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramCheckViewController.swift @@ -0,0 +1,35 @@ +// +// ProgramCheckViewController.swift +// ParentAssistant +// +// Created by Cao yang on 2018/4/11. +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved. +// + +import UIKit + +class ProgramCheckViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destinationViewController. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramVacateViewController.swift b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramVacateViewController.swift new file mode 100644 index 0000000..4cfa83a --- /dev/null +++ b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramVacateViewController.swift @@ -0,0 +1,153 @@ +// +// ProgramVacateViewController.swift +// ParentAssistant +// +// Created by Cao yang on 2018/4/11. +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved. +// + +import UIKit + +class ProgramVacateViewController: UIViewController,UITableViewDelegate,UITableViewDataSource { + + lazy var tableView = {()-> UITableView in + let table = UITableView.init(frame: CGRect.init(x: 0, y: 0, width: screenWidth, height: screenHeight-44-22-60)) + table.backgroundColor = backGroundColor + table.delegate = self + table.dataSource = self + table.tableFooterView = UIView.init() + table.separatorStyle = .none + table.register(UINib.init(nibName: "ProgramVacateTableViewCell", bundle: nil), forCellReuseIdentifier: "ProgramVacateTableViewCell") + table.register(UINib.init(nibName: "ProgramVacateBodyTableViewCell", bundle: nil), forCellReuseIdentifier: "ProgramVacateBodyTableViewCell") + return table + }() + + lazy var bottomBtn = {()-> UIButton in + let btn = UIButton.init(frame: CGRect.init(x: screenWidth/2-60, y: screenHeight-66-50, width: 120, height: 40)) + btn.setTitle("请假", for: UIControlState.normal) + btn.setTitleColor(UIColor.black, for: UIControlState.normal) + btn.backgroundColor = Theme.topBarColor() + return btn + }() + + //data + + /// 请假记录 + var vacateRecodeArray = Array<String>() + + + override func viewDidLoad() { + super.viewDidLoad() + self.view.backgroundColor = backGroundColor + + self.view.addSubview(self.tableView) + self.view.addSubview(self.bottomBtn) + self.vacateRecodeArray = ["1","2"] + + // Do any additional setup after loading the view. + } + + //MARK: - TableView delegate & dataSourse + func numberOfSections(in tableView: UITableView) -> Int { + return 2 + } + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + switch section { + case 0: + return 1 + case 1: + if vacateRecodeArray.count > 0 { + return vacateRecodeArray.count+1 + }else{ + return 2 + } + default: + return 0 + } + } + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + + switch indexPath.section { + case 0: + return 90 + case 1: + if indexPath.row == 0{ + return 40 + }else{ + if vacateRecodeArray.count > 0 { + return 230 + }else{ + return 50 + } + } + default: + return 0 + } + } + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + + switch indexPath.section { + case 0: + let cell = tableView.dequeueReusableCell(withIdentifier: "ProgramVacateTableViewCell", for: indexPath) as! ProgramVacateTableViewCell + return cell + case 1: + if indexPath.row == 0 { + let cell = UITableViewCell.init() + cell.backgroundColor = backGroundColor + let cellView = UIView.init(frame: CGRect.init(x: 10, y: 0, width: screenWidth-20, height: 40)) + cellView.backgroundColor = UIColor.white + let label = UILabel.init(frame: CGRect.init(x: 10, y: 0, width: 200, height: 40)) + label.text = "请假记录:" + label.textAlignment = .left + cellView.addSubview(label) + cell.addSubview(cellView) + return cell + }else{ + if vacateRecodeArray.count > 0 { + let cell = tableView.dequeueReusableCell(withIdentifier: "ProgramVacateBodyTableViewCell", for: indexPath) as! ProgramVacateBodyTableViewCell + return cell + }else{ + let cell = UITableViewCell.init() + cell.backgroundColor = backGroundColor + let cellView = UIView.init(frame: CGRect.init(x: 10, y: 0, width: screenWidth-20, height: 50)) + cellView.backgroundColor = UIColor.white + let label = UILabel.init(frame: CGRect.init(x: 10, y: 0, width: screenWidth-20-20, height: 50)) + label.text = "张三今日无请假记录!" + label.font = UIFont.systemFont(ofSize: 20) + label.textAlignment = .center + label.textColor = UIColor.red + cellView.addSubview(label) + cell.addSubview(cellView) + return cell + } + } + default: + return UITableViewCell.init() + } + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + if indexPath.section == 1 && indexPath.row != 0 && vacateRecodeArray.count>0 { + + + + } + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destinationViewController. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramViewController.swift b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramViewController.swift index 18d4ba1..70a33a6 100644 --- a/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramViewController.swift +++ b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Program/ProgramViewController.swift @@ -102,7 +102,22 @@ class ProgramViewController: UIViewController,UITableViewDelegate,UITableViewDat func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - + switch indexPath.row { + case 0: + let vc = ProgramCheckViewController() + vc.title = "考勤" + self.navigationController?.pushViewController(vc, animated: true) + case 1: + let vc = ProgramCardViewController() + vc.title = "补卡" + self.navigationController?.pushViewController(vc, animated: true) + case 2: + let vc = ProgramVacateViewController() + vc.title = "请假" + self.navigationController?.pushViewController(vc, animated: true) + default: + break + } } override func didReceiveMemoryWarning() { diff --git a/ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateBodyTableViewCell.swift b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateBodyTableViewCell.swift new file mode 100644 index 0000000..5a6ff78 --- /dev/null +++ b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateBodyTableViewCell.swift @@ -0,0 +1,31 @@ +// +// ProgramVacateBodyTableViewCell.swift +// ParentAssistant +// +// Created by Cao yang on 2018/4/12. +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved. +// + +import UIKit + +class ProgramVacateBodyTableViewCell: UITableViewCell { + + @IBOutlet weak var upLine: UILabel! + @IBOutlet weak var vacateName: UILabel! + @IBOutlet weak var vacateType: UILabel! + @IBOutlet weak var startTime: UILabel! + @IBOutlet weak var endTime: UILabel! + @IBOutlet weak var examinePerson: UILabel! + @IBOutlet weak var vacateResult: UILabel! + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } + +} diff --git a/ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateBodyTableViewCell.xib b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateBodyTableViewCell.xib new file mode 100644 index 0000000..8a3e22e --- /dev/null +++ b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateBodyTableViewCell.xib @@ -0,0 +1,184 @@ +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> + <device id="retina4_7" orientation="portrait"> + <adaptation id="fullscreen"/> + </device> + <dependencies> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> + </dependencies> + <objects> + <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> + <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="ProgramVacateBodyTableViewCell" rowHeight="232" id="fd1-Sl-6Qm" customClass="ProgramVacateBodyTableViewCell" customModule="ParentAssistant" customModuleProvider="target"> + <rect key="frame" x="0.0" y="0.0" width="375" height="232"/> + <autoresizingMask key="autoresizingMask"/> + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="fd1-Sl-6Qm" id="yYa-Yh-jMm"> + <rect key="frame" x="0.0" y="0.0" width="375" height="231.5"/> + <autoresizingMask key="autoresizingMask"/> + <subviews> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3iC-h2-GLD"> + <rect key="frame" x="10" y="0.0" width="355" height="221.5"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="down" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gay-8r-CB4"> + <rect key="frame" x="15" y="28" width="1" height="193"/> + <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> + <constraints> + <constraint firstAttribute="width" constant="1" id="4WM-0K-GRV"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="up" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zCX-fI-ung"> + <rect key="frame" x="15" y="0.0" width="1" height="28"/> + <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> + <constraints> + <constraint firstAttribute="width" constant="1" id="QZc-Lb-vnO"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="grow_ellipse" translatesAutoresizingMaskIntoConstraints="NO" id="184-vm-o8V"> + <rect key="frame" x="10" y="18" width="10" height="10"/> + <constraints> + <constraint firstAttribute="height" constant="10" id="NxP-OE-KAZ"/> + <constraint firstAttribute="width" constant="10" id="T2p-Zf-FWk"/> + </constraints> + </imageView> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请假人:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ptA-gi-ASQ"> + <rect key="frame" x="40" y="12.5" width="57" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="张三" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SMb-fO-hlW"> + <rect key="frame" x="107" y="12.5" width="35" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请假类型:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="I23-J8-cbV"> + <rect key="frame" x="40" y="43.5" width="74" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="事假" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tQ9-wo-yko"> + <rect key="frame" x="124" y="43.5" width="35" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请假时间:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XUE-jH-LMd"> + <rect key="frame" x="40" y="74.5" width="74" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2018/04/02 08:00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="o1S-an-wZs"> + <rect key="frame" x="124" y="74.5" width="141" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="至" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Q4S-hi-7fU"> + <rect key="frame" x="185.5" y="100.5" width="18" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2018/04/02 17:30" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="m2d-nZ-oIw"> + <rect key="frame" x="126" y="126.5" width="137" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="审批人:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XmD-SZ-8bL"> + <rect key="frame" x="40" y="157.5" width="57" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="班主任-李倩" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CmX-ZE-z2v"> + <rect key="frame" x="107" y="157.5" width="95" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请假结果:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UYo-On-ZLA"> + <rect key="frame" x="40" y="188.5" width="74" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="同意" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="P6F-mV-ell"> + <rect key="frame" x="124" y="188.5" width="35" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstItem="ptA-gi-ASQ" firstAttribute="centerY" secondItem="184-vm-o8V" secondAttribute="centerY" id="3sf-dz-jdr"/> + <constraint firstItem="o1S-an-wZs" firstAttribute="leading" secondItem="XUE-jH-LMd" secondAttribute="trailing" constant="10" id="45A-cx-9er"/> + <constraint firstItem="P6F-mV-ell" firstAttribute="centerY" secondItem="UYo-On-ZLA" secondAttribute="centerY" id="4jj-Yv-FyP"/> + <constraint firstItem="184-vm-o8V" firstAttribute="bottom" secondItem="zCX-fI-ung" secondAttribute="bottom" id="7Qo-Zx-DAx"/> + <constraint firstItem="CmX-ZE-z2v" firstAttribute="centerY" secondItem="XmD-SZ-8bL" secondAttribute="centerY" id="9d8-Eh-bXG"/> + <constraint firstItem="XUE-jH-LMd" firstAttribute="leading" secondItem="ptA-gi-ASQ" secondAttribute="leading" id="Egr-sG-T07"/> + <constraint firstItem="Q4S-hi-7fU" firstAttribute="centerX" secondItem="o1S-an-wZs" secondAttribute="centerX" id="HXy-Rc-qfD"/> + <constraint firstItem="P6F-mV-ell" firstAttribute="leading" secondItem="UYo-On-ZLA" secondAttribute="trailing" constant="10" id="IOH-oF-TIq"/> + <constraint firstItem="SMb-fO-hlW" firstAttribute="centerY" secondItem="ptA-gi-ASQ" secondAttribute="centerY" id="IjA-7L-kXF"/> + <constraint firstItem="gay-8r-CB4" firstAttribute="top" secondItem="184-vm-o8V" secondAttribute="bottom" id="Ilk-EK-SMV"/> + <constraint firstItem="184-vm-o8V" firstAttribute="leading" secondItem="3iC-h2-GLD" secondAttribute="leading" constant="10.5" id="KES-Nk-NQi"/> + <constraint firstAttribute="bottom" secondItem="gay-8r-CB4" secondAttribute="bottom" id="KoQ-MH-wGN"/> + <constraint firstItem="gay-8r-CB4" firstAttribute="leading" secondItem="3iC-h2-GLD" secondAttribute="leading" constant="15" id="QYv-CA-Chf"/> + <constraint firstItem="CmX-ZE-z2v" firstAttribute="leading" secondItem="XmD-SZ-8bL" secondAttribute="trailing" constant="10" id="Sa6-He-Zw1"/> + <constraint firstItem="XmD-SZ-8bL" firstAttribute="leading" secondItem="XUE-jH-LMd" secondAttribute="leading" id="XkB-Ka-XYp"/> + <constraint firstItem="zCX-fI-ung" firstAttribute="leading" secondItem="3iC-h2-GLD" secondAttribute="leading" constant="15" id="aTH-2y-tFi"/> + <constraint firstItem="I23-J8-cbV" firstAttribute="leading" secondItem="ptA-gi-ASQ" secondAttribute="leading" id="bPl-LK-op9"/> + <constraint firstItem="Q4S-hi-7fU" firstAttribute="top" secondItem="o1S-an-wZs" secondAttribute="bottom" constant="5" id="diF-eM-RWC"/> + <constraint firstItem="UYo-On-ZLA" firstAttribute="leading" secondItem="XmD-SZ-8bL" secondAttribute="leading" id="fVt-dT-aZ7"/> + <constraint firstItem="XmD-SZ-8bL" firstAttribute="top" secondItem="m2d-nZ-oIw" secondAttribute="bottom" constant="10" id="h1a-12-2u4"/> + <constraint firstItem="m2d-nZ-oIw" firstAttribute="top" secondItem="Q4S-hi-7fU" secondAttribute="bottom" constant="5" id="h5e-sp-jOh"/> + <constraint firstItem="184-vm-o8V" firstAttribute="top" secondItem="3iC-h2-GLD" secondAttribute="top" constant="18" id="hCe-rk-8Rh"/> + <constraint firstItem="tQ9-wo-yko" firstAttribute="centerY" secondItem="I23-J8-cbV" secondAttribute="centerY" id="iaq-Pt-N0v"/> + <constraint firstItem="XUE-jH-LMd" firstAttribute="top" secondItem="I23-J8-cbV" secondAttribute="bottom" constant="10" id="kFN-pq-rFH"/> + <constraint firstItem="tQ9-wo-yko" firstAttribute="leading" secondItem="I23-J8-cbV" secondAttribute="trailing" constant="10" id="lkm-Pa-khY"/> + <constraint firstItem="m2d-nZ-oIw" firstAttribute="centerX" secondItem="o1S-an-wZs" secondAttribute="centerX" id="osq-5I-jbe"/> + <constraint firstItem="o1S-an-wZs" firstAttribute="centerY" secondItem="XUE-jH-LMd" secondAttribute="centerY" id="p59-e2-LBT"/> + <constraint firstItem="ptA-gi-ASQ" firstAttribute="leading" secondItem="184-vm-o8V" secondAttribute="trailing" constant="20" id="pGi-jU-OcT"/> + <constraint firstItem="zCX-fI-ung" firstAttribute="top" secondItem="3iC-h2-GLD" secondAttribute="top" id="pYa-T9-TGa"/> + <constraint firstItem="I23-J8-cbV" firstAttribute="top" secondItem="ptA-gi-ASQ" secondAttribute="bottom" constant="10" id="sP9-y8-kI3"/> + <constraint firstItem="UYo-On-ZLA" firstAttribute="top" secondItem="XmD-SZ-8bL" secondAttribute="bottom" constant="10" id="tkO-jd-7ez"/> + <constraint firstItem="SMb-fO-hlW" firstAttribute="leading" secondItem="ptA-gi-ASQ" secondAttribute="trailing" constant="10" id="uGY-Th-x4A"/> + </constraints> + </view> + </subviews> + <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> + <constraints> + <constraint firstAttribute="bottom" secondItem="3iC-h2-GLD" secondAttribute="bottom" constant="10" id="FAV-5i-UxH"/> + <constraint firstItem="3iC-h2-GLD" firstAttribute="top" secondItem="yYa-Yh-jMm" secondAttribute="top" id="ObN-MI-Jfr"/> + <constraint firstAttribute="trailing" secondItem="3iC-h2-GLD" secondAttribute="trailing" constant="10" id="jGw-JA-Q0y"/> + <constraint firstItem="3iC-h2-GLD" firstAttribute="leading" secondItem="yYa-Yh-jMm" secondAttribute="leading" constant="10" id="tYS-Bh-NlN"/> + </constraints> + </tableViewCellContentView> + <connections> + <outlet property="endTime" destination="m2d-nZ-oIw" id="ZpU-Qi-TcG"/> + <outlet property="examinePerson" destination="CmX-ZE-z2v" id="GaV-qe-fuK"/> + <outlet property="startTime" destination="o1S-an-wZs" id="Qec-Kk-7UW"/> + <outlet property="upLine" destination="zCX-fI-ung" id="2Yc-jg-N9W"/> + <outlet property="vacateName" destination="SMb-fO-hlW" id="P18-Y5-fEa"/> + <outlet property="vacateResult" destination="P6F-mV-ell" id="LDB-dx-UoA"/> + <outlet property="vacateType" destination="tQ9-wo-yko" id="NeS-11-BX1"/> + </connections> + <point key="canvasLocation" x="-252.5" y="9"/> + </tableViewCell> + </objects> + <resources> + <image name="grow_ellipse" width="10" height="10"/> + </resources> +</document> diff --git a/ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateTableViewCell.swift b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateTableViewCell.swift new file mode 100644 index 0000000..4596aa3 --- /dev/null +++ b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateTableViewCell.swift @@ -0,0 +1,26 @@ +// +// ProgramVacateTableViewCell.swift +// ParentAssistant +// +// Created by Cao yang on 2018/4/12. +// Copyright © 2018年 HANGZHOUTEAM. All rights reserved. +// + +import UIKit + +class ProgramVacateTableViewCell: UITableViewCell { + + @IBOutlet weak var vacateName: UILabel! + @IBOutlet weak var startTime: UILabel! + @IBOutlet weak var endTime: UILabel! + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } +} diff --git a/ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateTableViewCell.xib b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateTableViewCell.xib new file mode 100644 index 0000000..50968f3 --- /dev/null +++ b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ProgramVacateTableViewCell.xib @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> + <device id="retina4_7" orientation="portrait"> + <adaptation id="fullscreen"/> + </device> + <dependencies> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/> + <capability name="Safe area layout guides" minToolsVersion="9.0"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> + </dependencies> + <objects> + <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> + <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> + <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="ProgramVacateTableViewCell" rowHeight="92" id="KGk-i7-Jjw" customClass="ProgramVacateTableViewCell" customModule="ParentAssistant" customModuleProvider="target"> + <rect key="frame" x="0.0" y="0.0" width="389" height="92"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM"> + <rect key="frame" x="0.0" y="0.0" width="389" height="91.5"/> + <autoresizingMask key="autoresizingMask"/> + <subviews> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="A0K-zH-Rt1"> + <rect key="frame" x="10" y="10" width="369" height="72"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="-" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="H0L-Bl-DnY"> + <rect key="frame" x="207" y="41.5" width="8" height="20.5"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请假人:" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6Tv-CA-ehv"> + <rect key="frame" x="10" y="10" width="57" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="张三" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vif-Lw-a1X"> + <rect key="frame" x="77" y="10" width="35" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请假日期:" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bJt-wD-aUL"> + <rect key="frame" x="10" y="41" width="74" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2018/04/02" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rel-Qy-6VP"> + <rect key="frame" x="94" y="41" width="90" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2018/04/02" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gIK-21-Af2"> + <rect key="frame" x="220" y="41" width="90" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="grow_calendar" translatesAutoresizingMaskIntoConstraints="NO" id="B3i-HY-f54"> + <rect key="frame" x="189" y="45.5" width="13" height="12"/> + </imageView> + <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="grow_calendar" translatesAutoresizingMaskIntoConstraints="NO" id="ilp-az-hgB"> + <rect key="frame" x="315" y="45.5" width="13" height="12"/> + </imageView> + </subviews> + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstItem="bJt-wD-aUL" firstAttribute="top" secondItem="6Tv-CA-ehv" secondAttribute="bottom" constant="10" id="0OL-rx-svf"/> + <constraint firstItem="ilp-az-hgB" firstAttribute="centerY" secondItem="bJt-wD-aUL" secondAttribute="centerY" id="7EV-jy-9F4"/> + <constraint firstItem="vif-Lw-a1X" firstAttribute="centerY" secondItem="6Tv-CA-ehv" secondAttribute="centerY" id="7TD-NT-Lxd"/> + <constraint firstItem="H0L-Bl-DnY" firstAttribute="centerY" secondItem="bJt-wD-aUL" secondAttribute="centerY" id="ITS-GX-y9S"/> + <constraint firstItem="B3i-HY-f54" firstAttribute="centerY" secondItem="Rel-Qy-6VP" secondAttribute="centerY" id="JcP-od-r2M"/> + <constraint firstItem="ilp-az-hgB" firstAttribute="leading" secondItem="gIK-21-Af2" secondAttribute="trailing" constant="5" id="Kdw-IT-c8d"/> + <constraint firstItem="H0L-Bl-DnY" firstAttribute="leading" secondItem="B3i-HY-f54" secondAttribute="trailing" constant="5" id="SZC-UD-HMF"/> + <constraint firstItem="Rel-Qy-6VP" firstAttribute="centerY" secondItem="bJt-wD-aUL" secondAttribute="centerY" id="axv-QG-Ntd"/> + <constraint firstItem="6Tv-CA-ehv" firstAttribute="leading" secondItem="A0K-zH-Rt1" secondAttribute="leading" constant="10" id="bMD-p2-wnP"/> + <constraint firstItem="bJt-wD-aUL" firstAttribute="leading" secondItem="6Tv-CA-ehv" secondAttribute="leading" id="mK7-vI-tFc"/> + <constraint firstItem="gIK-21-Af2" firstAttribute="centerY" secondItem="bJt-wD-aUL" secondAttribute="centerY" id="peU-cr-ev1"/> + <constraint firstItem="vif-Lw-a1X" firstAttribute="leading" secondItem="6Tv-CA-ehv" secondAttribute="trailing" constant="10" id="pnQ-fK-xwq"/> + <constraint firstItem="Rel-Qy-6VP" firstAttribute="leading" secondItem="bJt-wD-aUL" secondAttribute="trailing" constant="10" id="sGH-i2-tjB"/> + <constraint firstItem="6Tv-CA-ehv" firstAttribute="top" secondItem="A0K-zH-Rt1" secondAttribute="top" constant="10" id="sXD-DY-NqG"/> + <constraint firstItem="gIK-21-Af2" firstAttribute="leading" secondItem="H0L-Bl-DnY" secondAttribute="trailing" constant="5" id="vcT-Nz-jpC"/> + <constraint firstItem="B3i-HY-f54" firstAttribute="leading" secondItem="Rel-Qy-6VP" secondAttribute="trailing" constant="5" id="x47-0x-gfz"/> + </constraints> + </view> + </subviews> + <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> + <constraints> + <constraint firstItem="A0K-zH-Rt1" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="10" id="GYT-zJ-fus"/> + <constraint firstAttribute="trailing" secondItem="A0K-zH-Rt1" secondAttribute="trailing" constant="10" id="JFC-pM-1F3"/> + <constraint firstItem="A0K-zH-Rt1" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="10" id="lo1-GF-rL8"/> + <constraint firstAttribute="bottom" secondItem="A0K-zH-Rt1" secondAttribute="bottom" constant="10" id="thL-h4-Sig"/> + </constraints> + </tableViewCellContentView> + <viewLayoutGuide key="safeArea" id="njF-e1-oar"/> + <connections> + <outlet property="endTime" destination="gIK-21-Af2" id="YWL-mH-LCE"/> + <outlet property="startTime" destination="Rel-Qy-6VP" id="yWM-28-kpK"/> + <outlet property="vacateName" destination="vif-Lw-a1X" id="Hyd-gs-iH0"/> + </connections> + <point key="canvasLocation" x="59.5" y="-38"/> + </tableViewCell> + </objects> + <resources> + <image name="grow_calendar" width="13" height="12"/> + </resources> +</document> diff --git a/ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_calendar.imageset/Contents.json b/ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_calendar.imageset/Contents.json new file mode 100644 index 0000000..02395d4 --- /dev/null +++ b/ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_calendar.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "grow_calendar@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_calendar.imageset/grow_calendar@2x.png b/ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_calendar.imageset/grow_calendar@2x.png new file mode 100644 index 0000000..6abf175 Binary files /dev/null and b/ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_calendar.imageset/grow_calendar@2x.png differ diff --git a/ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_ellipse.imageset/Contents.json b/ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_ellipse.imageset/Contents.json new file mode 100644 index 0000000..c850860 --- /dev/null +++ b/ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_ellipse.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "grow_ellipse@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_ellipse.imageset/grow_ellipse@2x.png b/ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_ellipse.imageset/grow_ellipse@2x.png new file mode 100644 index 0000000..d2f632f Binary files /dev/null and b/ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/grow_ellipse.imageset/grow_ellipse@2x.png differ -- libgit2 0.21.0