Procházet zdrojové kódy

修护bug 优化项目

openlockPPP před 1 rokem
rodič
revize
f22ec9df52
21 změnil soubory, kde provedl 112 přidání a 83 odebrání
  1. binární
      JiaPeiManage/Assets.xcassets/Modules/Animation/animation_loading_error_2.imageset/common_loading_error_2.png
  2. binární
      JiaPeiManage/Assets.xcassets/Modules/Animation/animation_loading_error_4.imageset/common_loading_error_4.png
  3. 6 2
      JiaPeiManage/Sources/Custom/View/EmptyView/EmptyView.swift
  4. 8 3
      JiaPeiManage/Sources/Custom/View/EmptyView/EmptyView.xib
  5. 6 6
      JiaPeiManage/Sources/Custom/View/ImageViewAnimation/NetAnimationView.swift
  6. 5 1
      JiaPeiManage/Sources/Main/Base/BaseGroupTableViewController.swift
  7. 8 2
      JiaPeiManage/Sources/Main/Base/BaseTableViewController.swift
  8. 3 0
      JiaPeiManage/Sources/Main/Base/BaseViewController.swift
  9. 18 18
      JiaPeiManage/Sources/Models/TraineeDataModel.swift
  10. 17 17
      JiaPeiManage/Sources/Models/TraineeInfoModel.swift
  11. 1 1
      JiaPeiManage/Sources/Modulars/Mine/Controllers/MineViewController.xib
  12. 1 1
      JiaPeiManage/Sources/Modulars/二维码/Controllers/CoachQRPageController.xib
  13. 2 4
      JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeDetails/MeTraineeDetails02Controller.swift
  14. 1 0
      JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeDetails/MeTraineeDetails03Controller.swift
  15. 2 0
      JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeDetails/MeTraineeDetails04Controller.swift
  16. 8 4
      JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeDetailsPageViewController.swift
  17. 12 10
      JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeSearchPageViewController.swift
  18. 3 2
      JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeSubjectPageViewController.swift
  19. 1 2
      JiaPeiManage/Sources/Modulars/学员/ViewModel/MeTraineeSearchViewModel.swift
  20. 8 8
      JiaPeiManage/Sources/Modulars/学员/Views/MeTraineeSubjectCell.swift
  21. 2 2
      JiaPeiManage/Sources/Modulars/学员/Views/MeTraineeSubjectCell.xib

binární
JiaPeiManage/Assets.xcassets/Modules/Animation/animation_loading_error_2.imageset/common_loading_error_2.png


binární
JiaPeiManage/Assets.xcassets/Modules/Animation/animation_loading_error_4.imageset/common_loading_error_4.png


+ 6 - 2
JiaPeiManage/Sources/Custom/View/EmptyView/EmptyView.swift

@@ -10,6 +10,10 @@ import UIKit
 
 final class EmptyView: UIView,NibLoadable {
 
-
-
+    @IBOutlet weak var loading_imageview: UIImageView!
+    
+    @IBOutlet weak var loading_label: UILabel!
+    
+    
+    @IBOutlet weak var loading_layout_h: NSLayoutConstraint!
 }

+ 8 - 3
JiaPeiManage/Sources/Custom/View/EmptyView/EmptyView.xib

@@ -18,13 +18,13 @@
                     <rect key="frame" x="100" y="20" width="200" height="200"/>
                     <subviews>
                         <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="animation_loading_error_1" translatesAutoresizingMaskIntoConstraints="NO" id="qNX-mI-6YY">
-                            <rect key="frame" x="0.0" y="0.0" width="200" height="180"/>
+                            <rect key="frame" x="0.0" y="0.0" width="200" height="160"/>
                             <constraints>
-                                <constraint firstAttribute="height" constant="180" id="hBO-py-Jld"/>
+                                <constraint firstAttribute="height" constant="160" id="hBO-py-Jld"/>
                             </constraints>
                         </imageView>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="暂无学员" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UuX-aB-hYx">
-                            <rect key="frame" x="0.0" y="180" width="200" height="20"/>
+                            <rect key="frame" x="0.0" y="160" width="200" height="40"/>
                             <fontDescription key="fontDescription" type="system" pointSize="15"/>
                             <color key="textColor" red="0.53725490196078429" green="0.56862745098039214" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                             <nil key="highlightedColor"/>
@@ -51,6 +51,11 @@
                 <constraint firstItem="vC8-CP-LKV" firstAttribute="bottom" secondItem="sBg-X0-qmO" secondAttribute="bottom" id="g5D-3I-OfQ"/>
             </constraints>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="loading_imageview" destination="qNX-mI-6YY" id="1iT-of-dMh"/>
+                <outlet property="loading_label" destination="UuX-aB-hYx" id="vgB-qw-I1f"/>
+                <outlet property="loading_layout_h" destination="hBO-py-Jld" id="lVj-lY-XO3"/>
+            </connections>
             <point key="canvasLocation" x="139.19999999999999" y="-144.82758620689657"/>
         </view>
     </objects>

+ 6 - 6
JiaPeiManage/Sources/Custom/View/ImageViewAnimation/NetAnimationView.swift

@@ -58,12 +58,12 @@ final class NetAnimationView: UIView {
         if type == .failure {
            textLabel.text = "似乎与互联网已经断开连接"
            imageView.image = UIImage(named: "animation_loading_error_4")
-           imageView.animationImages = [UIImage(named: "animation_loading_error_1")!,
-                                        UIImage(named: "animation_loading_error_2")!,
-                                        UIImage(named: "animation_loading_error_3")!,
-                                        UIImage(named: "animation_loading_error_4")!]
-           imageView.animationDuration = 2.0
-           imageView.animationRepeatCount = 1
+//           imageView.animationImages = [UIImage(named: "animation_loading_error_1")!,
+//                                        UIImage(named: "animation_loading_error_2")!,
+//                                        UIImage(named: "animation_loading_error_3")!,
+//                                        UIImage(named: "animation_loading_error_4")!]
+//           imageView.animationDuration = 2.0
+//           imageView.animationRepeatCount = 1
         }
         
     }

+ 5 - 1
JiaPeiManage/Sources/Main/Base/BaseGroupTableViewController.swift

@@ -13,6 +13,7 @@ import EmptyKit
 class BaseGroupTableViewController: BaseViewController,Refreshable {
     
     var isEmptyDisplay: Bool = true
+    var isNotData:Bool = false
     var visibleIndexPath: IndexPath?
     let tableView: UITableView = UITableView(frame: CGRectZero, style: .grouped).then{
         $0.backgroundColor = .db_theme
@@ -28,8 +29,11 @@ class BaseGroupTableViewController: BaseViewController,Refreshable {
     
     
     override func viewDidLoad() {
+        if isNotData {
+            emptyView.loading_imageview.image = UIImage(named: "animation_loading_error_2")
+            emptyView.loading_label.text = "暂无数据"
+        }
         super.viewDidLoad()
-        
         tableView.ept.dataSource = self
         tableView.ept.delegate = self
         

+ 8 - 2
JiaPeiManage/Sources/Main/Base/BaseTableViewController.swift

@@ -14,6 +14,8 @@ class BaseTableViewController: BaseViewController,Refreshable {
     
     var isEmptyDisplay: Bool = true
     
+    var isNotData:Bool = false
+    
     let tableView: UITableView = UITableView().then{
         $0.backgroundColor = .db_theme
         $0.showsVerticalScrollIndicator = false
@@ -29,7 +31,11 @@ class BaseTableViewController: BaseViewController,Refreshable {
     
     override func viewDidLoad() {
         super.viewDidLoad()
-        
+        if isNotData {
+            emptyView.loading_imageview.image = UIImage(named: "animation_loading_error_2")
+            emptyView.loading_label.text = "暂无数据"
+            emptyView.loading_layout_h.constant = 120
+        }
         tableView.ept.dataSource = self
         tableView.ept.delegate = self
         
@@ -123,7 +129,7 @@ extension BaseTableViewController:EmptyDelegate,EmptyDataSource {
     
     func customViewForEmpty(in view: UIView) -> UIView? {
         
-        return EmptyView.loadFromNib()
+        return emptyView
     }
     
     func emptyShouldAllowScroll(in view: UIView) -> Bool {

+ 3 - 0
JiaPeiManage/Sources/Main/Base/BaseViewController.swift

@@ -19,6 +19,9 @@ class BaseViewController: UIViewController, NetAnimationLoadable {
         static let navBarHeight = 44.f
     }
     
+    // MARK:UI
+    let emptyView = EmptyView.loadFromNib()
+    
     @IBOutlet weak var nav_top_layout: NSLayoutConstraint!
     @IBOutlet weak var nav_topH_layout: NSLayoutConstraint!
     // MARK: Properties

+ 18 - 18
JiaPeiManage/Sources/Models/TraineeDataModel.swift

@@ -9,25 +9,25 @@ import ObjectMapper
 
 struct RowInfo : ImmutableMappable{
 
-    var applydate : String?
+    var applydate : String = ""
     var id : Int?
-    var idcard : String?
-    var name : String?
-    var sex : String?
-    var phone : String?
-    var photoPath : String?
-    var remark : String?
-    var state : String?
-    var trainFourExamStatus : String?
-    var trainFourExamTime : String?
-    var trainOneExamStatus : String?
-    var trainOneExamTime : String?
-    var trainThreeExamStatus : String?
-    var trainThreeExamTime : String?
-    var trainTwoExamStatus : String?
-    var trainTwoExamTime : String?
-    var trainType : String?
-    var bmType : String?
+    var idcard : String = ""
+    var name : String = ""
+    var sex : String = ""
+    var phone : String = ""
+    var photoPath : String = ""
+    var remark : String = ""
+    var state : String = ""
+    var trainFourExamStatus : String = ""
+    var trainFourExamTime : String = ""
+    var trainOneExamStatus : String = ""
+    var trainOneExamTime : String = ""
+    var trainThreeExamStatus : String = ""
+    var trainThreeExamTime : String = ""
+    var trainTwoExamStatus : String = ""
+    var trainTwoExamTime : String = ""
+    var trainType : String = ""
+    var bmType : String = ""
 
     init(map: Map) throws {
         applydate = try map.value("applydate")

+ 17 - 17
JiaPeiManage/Sources/Models/TraineeInfoModel.swift

@@ -35,23 +35,23 @@ struct TraineeInfoModel : ImmutableMappable{
     var schollInscode : String!
     var schoolAddress : String!
     var schoolId : Int!
-    var schoolName : String!
-    var schoolShortName : String!
-    var sex : String!
-    var source : String!
-    var totalKm1 : String!
-    var totalKm2 : String!
-    var totalKm3 : String!
-    var totalKm4 : String!
-    var trainFourExamStatus : String!
-    var trainFourExamTime : String!
-    var trainOneExamStatus : String!
-    var trainOneExamTime : String!
-    var trainThreeExamStatus : String!
-    var trainThreeExamTime : String!
-    var trainTwoExamStatus : String!
-    var trainTwoExamTime : String!
-    var trainType : String!
+    var schoolName : String = ""
+    var schoolShortName : String = ""
+    var sex : String = ""
+    var source : String = ""
+    var totalKm1 : String = ""
+    var totalKm2 : String = ""
+    var totalKm3 : String = ""
+    var totalKm4 : String = ""
+    var trainFourExamStatus : String = ""
+    var trainFourExamTime : String = ""
+    var trainOneExamStatus : String = ""
+    var trainOneExamTime : String = ""
+    var trainThreeExamStatus : String = ""
+    var trainThreeExamTime : String = ""
+    var trainTwoExamStatus : String = ""
+    var trainTwoExamTime : String = ""
+    var trainType : String = ""
 
     
 

+ 1 - 1
JiaPeiManage/Sources/Modulars/Mine/Controllers/MineViewController.xib

@@ -132,7 +132,7 @@
                                                 <constraint firstAttribute="width" constant="6" id="QMi-hC-0wA"/>
                                             </constraints>
                                         </imageView>
-                                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user-icon" translatesAutoresizingMaskIntoConstraints="NO" id="3wG-uo-AO3">
+                                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user-icon" translatesAutoresizingMaskIntoConstraints="NO" id="3wG-uo-AO3">
                                             <rect key="frame" x="154.66666666666666" y="46" width="66" height="66"/>
                                             <constraints>
                                                 <constraint firstAttribute="width" constant="66" id="HME-Kn-uNq"/>

+ 1 - 1
JiaPeiManage/Sources/Modulars/二维码/Controllers/CoachQRPageController.xib

@@ -93,7 +93,7 @@
                                                 <userDefinedRuntimeAttribute type="boolean" keyPath="aLRatio" value="YES"/>
                                             </userDefinedRuntimeAttributes>
                                         </imageView>
-                                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user-icon" translatesAutoresizingMaskIntoConstraints="NO" id="VYZ-RH-l56">
+                                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user-icon" translatesAutoresizingMaskIntoConstraints="NO" id="VYZ-RH-l56">
                                             <rect key="frame" x="104" y="17" width="38" height="38"/>
                                             <constraints>
                                                 <constraint firstAttribute="width" constant="38" id="Vxg-TV-3yE"/>

+ 2 - 4
JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeDetails/MeTraineeDetails02Controller.swift

@@ -30,6 +30,7 @@ final class MeTraineeDetails02Controller: BaseTableViewController {
     var stuOutId:Int = 0
     
     override func viewDidLoad() {
+        self.isNotData = true
         super.viewDidLoad()
         //绑定
         biandView()
@@ -46,6 +47,7 @@ final class MeTraineeDetails02Controller: BaseTableViewController {
             .subscribe(onSuccess: {[unowned self] stuResultDataModel in
                 self.stuResultDataModel = stuResultDataModel
                 print("resultInfoModel成功")
+                self.isEmptyDisplay = true
                 self.hideLoadAnimation()
                 self.tableView.reloadData()
                 self.stopRefresh()
@@ -62,10 +64,6 @@ final class MeTraineeDetails02Controller: BaseTableViewController {
         tableView.register(UINib(nibName: "MeTraineeDetails02Cell", bundle: nil), forCellReuseIdentifier: cellIdentifier)
         tableView.rowHeight = 62.f
         setupRefreshHeader(tableView) {[unowned self] in
-//            DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
-//                // 在延迟 1 秒后执行的代码
-//
-//            }
             self.getStuResultList()
         }
         self.isEmptyDisplay = false

+ 1 - 0
JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeDetails/MeTraineeDetails03Controller.swift

@@ -39,6 +39,7 @@ final class MeTraineeDetails03Controller: BaseGroupTableViewController {
     }
     
     override func viewDidLoad() {
+        self.isNotData = true
         super.viewDidLoad()
         //绑定
         biandView()

+ 2 - 0
JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeDetails/MeTraineeDetails04Controller.swift

@@ -39,6 +39,7 @@ final class MeTraineeDetails04Controller: BaseTableViewController {
     }
     
     override func viewDidLoad() {
+        self.isNotData = true
         super.viewDidLoad()
         //绑定
         biandView()
@@ -55,6 +56,7 @@ final class MeTraineeDetails04Controller: BaseTableViewController {
                 self.stuTmsSignDataModel = stuTmsSignDataModel
                 self.rows+=stuTmsSignDataModel.rows
                 print("resultInfoModel成功")
+                self.isEmptyDisplay = true
                 self.hideLoadAnimation()
                 self.tableView.reloadData()
                 self.stopRefresh()

+ 8 - 4
JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeDetailsPageViewController.swift

@@ -76,6 +76,11 @@ final class MeTraineeDetailsPageViewController: BaseViewController {
         super.viewDidLoad()
         setupUI()
         configureMagicController()
+        getStudentInfo()
+    }
+    // MARK: 请求网络
+    func getStudentInfo(){
+        NYTips.show()
         cocahService.studentInfoByIdRequest(city: LocalManager.userInfo.city!, id: stuId)
             .subscribe { [unowned self] traineeInfoModel in
                 self.traineeInfoModel = traineeInfoModel
@@ -87,12 +92,11 @@ final class MeTraineeDetailsPageViewController: BaseViewController {
                 //刷新理论成绩
                 guard let details02vc:MeTraineeDetails02Controller = self.pageController.viewController(atPage: 1) as? MeTraineeDetails02Controller else { return }
                 details02vc.setStuOutId(stuId: traineeInfoModel.id)
-                
+                NYTips.hide()
             } onError: { error in
-                
+                NYTips.hide()
             }.disposed(by: disposeBag)
     }
-    
     // MARK: 私有方法
     func setupUI(){
         if isIphoneX {self.nav_topH_layout.constant = 64.f+24.f}
@@ -247,8 +251,8 @@ extension MeTraineeDetailsPageViewController : VTMagicViewDataSource{
                 var stuId = 0
                 if (traineeInfoModel != nil) {
                     stuId = (traineeInfoModel?.id)!
+                    meTraineeDetails03Controller = MeTraineeDetails03Controller(stuOutId: stuId,info: self.traineeInfoModel!)
                 }
-                meTraineeDetails03Controller = MeTraineeDetails03Controller(stuOutId: stuId,info: self.traineeInfoModel!)
             }
             return meTraineeDetails03Controller ?? UIViewController()
         } else {

+ 12 - 10
JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeSearchPageViewController.swift

@@ -82,7 +82,7 @@ final class MeTraineeSearchPageViewController: BaseTableViewController {
             self.meTraineeSearchViewModel.getLoadMore(vc: self)
         }
         self.isEmptyDisplay = true
-
+        self.hideLoadAnimation()
     }
     
     //绑定-rx
@@ -106,9 +106,10 @@ final class MeTraineeSearchPageViewController: BaseTableViewController {
                     })
                     .disposed(by: disposeBag)
         // tableView点击事件
-        tableView.rx.itemSelected.subscribe(onNext: { [weak self]indexPath in
+        tableView.rx.itemSelected.throttle(.seconds(1), scheduler: MainScheduler.instance)
+            .subscribe(onNext: { [weak self]indexPath in
             print("点击\(indexPath)行")
-            let rowInfo:RowInfo = (self!.meTraineeSearchViewModel.traineeDataModel?.rows![indexPath.row])!
+            let rowInfo:RowInfo = self!.meTraineeSearchViewModel.rows[indexPath.row]
             if rowInfo != nil && rowInfo.bmType == "2"  {
                 let context: Int = rowInfo.id!
                 NYSwRouter.push(NYSwPushType.trainee_info,context: context)
@@ -119,13 +120,14 @@ final class MeTraineeSearchPageViewController: BaseTableViewController {
     }
     //处理搜索
     func handleSearch() {
-            // 在这里处理搜索事件
-            if let query = search_textfield.text, !query.isEmpty {
-                print("Search query: \(query)")
-                // 在这里执行搜索操作,比如发送网络请求或对本地数据进行过滤
-                self.meTraineeSearchViewModel.searchCoachInfoList(vc: self)
-                search_textfield.resignFirstResponder() // 隐藏键盘
-            }
+//            // 在这里处理搜索事件
+//            if let query = search_textfield.text, !query.isEmpty {
+//                print("Search query: \(query)")
+//
+//            }
+        // 在这里执行搜索操作,比如发送网络请求或对本地数据进行过滤
+        self.meTraineeSearchViewModel.searchCoachInfoList(vc: self)
+        search_textfield.resignFirstResponder() // 隐藏键盘
     }
     
 }

+ 3 - 2
JiaPeiManage/Sources/Modulars/学员/Controllers/MeTraineeSubjectPageViewController.swift

@@ -58,9 +58,10 @@ final class MeTraineeSubjectPageViewController: BaseTableViewController {
             }
             .disposed(by: disposeBag)
         // tableView点击事件
-        tableView.rx.itemSelected.subscribe(onNext: { [weak self]indexPath in
+        tableView.rx.itemSelected.throttle(.seconds(1), scheduler: MainScheduler.instance)
+            .subscribe(onNext: { [weak self]indexPath in
             print("点击\(indexPath)行")
-            let rowInfo:RowInfo = (self!.meTraineeSubjectViewModel.traineeDataModel?.rows![indexPath.row])!
+                let rowInfo:RowInfo = self!.meTraineeSubjectViewModel.rows[indexPath.row]
             if rowInfo != nil && rowInfo.bmType == "2"  {
                 let context: Int = rowInfo.id!
                 NYSwRouter.push(NYSwPushType.trainee_info,context: context)

+ 1 - 2
JiaPeiManage/Sources/Modulars/学员/ViewModel/MeTraineeSearchViewModel.swift

@@ -34,7 +34,7 @@ class MeTraineeSearchViewModel: NSObject {
         super.init()
 //        searchCoachInfoList()
     }
-
+    
     /// 数据请求
     func searchCoachInfoList(vc:MeTraineeSearchPageViewController)
     {
@@ -43,7 +43,6 @@ class MeTraineeSearchViewModel: NSObject {
         if keyword == "" {
             self.traineeDataModel?.total = 0
             self.rows.removeAll()
-            vc.isEmptyDisplay = true
             vc.hideLoadAnimation()
             vc.stopRefresh()
             vc.tableView.reloadData()

+ 8 - 8
JiaPeiManage/Sources/Modulars/学员/Views/MeTraineeSubjectCell.swift

@@ -54,10 +54,10 @@ final class MeTraineeSubjectCell: UITableViewCell,NibLoadable {
     
     func setRowInfo(rowInfo:RowInfo){
         //用户头像
-        self.user_imageview.sd_setImage(with: rowInfo.photoPath?.urlValue, placeholderImage: rowInfo.sex == "2" ? NYImage.Home.userfemale:NYImage.Home.usermale)
+        self.user_imageview.sd_setImage(with: rowInfo.photoPath.urlValue, placeholderImage: rowInfo.sex == "2" ? NYImage.Home.userfemale:NYImage.Home.usermale)
         //报名时间
-        let applydateStr = rowInfo.applydate?.prefix(10)
-        self.jointime_label.text = "报名时间:" +  applydateStr!
+        let applydateStr = rowInfo.applydate
+        self.jointime_label.text = "报名时间:" +  applydateStr
         //用户名
         self.username_label.text = rowInfo.name
         self.sex_imageview.image = rowInfo.sex == "2" ? NYImage.Home.sexfemale:NYImage.Home.sexmale
@@ -71,33 +71,33 @@ final class MeTraineeSubjectCell: UITableViewCell,NibLoadable {
         var k1Img = "K1_no", k1Txt = "未通过"
         if rowInfo.trainOneExamStatus=="1" {
             k1Img = "K1_yes"
-            k1Txt = "\(rowInfo.trainOneExamTime?.prefix(10) ?? "")"
+            k1Txt = "\(rowInfo.trainOneExamTime.prefix(10) ?? "")"
         }
         self.k1_imageview.image = UIImage(named: k1Img)
         self.k1_label.text = k1Txt
         var k2Img = "K2_no", k2Txt = "未通过"
         if rowInfo.trainTwoExamStatus=="1" {
             k2Img = "K2_yes"
-            k2Txt = "\(rowInfo.trainTwoExamTime?.prefix(10) ?? "")"
+            k2Txt = "\(rowInfo.trainTwoExamTime.prefix(10) ?? "")"
         }
         self.k2_imageview.image = UIImage(named: k2Img)
         self.k2_label.text = k2Txt
         var k3Img = "K3_no", k3Txt = "未通过"
         if rowInfo.trainThreeExamStatus=="1" {
             k3Img = "K3_yes"
-            k3Txt = "\(rowInfo.trainThreeExamTime?.prefix(10) ?? "")"
+            k3Txt = "\(rowInfo.trainThreeExamTime.prefix(10) ?? "")"
         }
         self.k3_imageview.image = UIImage(named: k3Img)
         self.k3_label.text = k3Txt
         var k4Img = "K4_no", k4Txt = "未通过"
         if rowInfo.trainThreeExamStatus=="1" {
             k4Img = "K4_yes"
-            k4Txt = "\(rowInfo.trainFourExamTime?.prefix(10) ?? "")"
+            k4Txt = "\(rowInfo.trainFourExamTime.prefix(10) ?? "")"
         }
         self.k4_imageview.image = UIImage(named: k4Img)
         self.k4_label.text = k4Txt
         //备注
-        self.remark_label.text = "备注:" + ((rowInfo.remark==nil||rowInfo.remark=="") ? "无":rowInfo.remark!)
+        self.remark_label.text = "备注:" + ((rowInfo.remark==nil||rowInfo.remark=="") ? "无":rowInfo.remark)
         //预
         self.stumake_imageview.isHidden = rowInfo.bmType == "1" ? false:true
     }

+ 2 - 2
JiaPeiManage/Sources/Modulars/学员/Views/MeTraineeSubjectCell.xib

@@ -41,10 +41,10 @@
                             </constraints>
                         </imageView>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="报名时间:2023-01-31" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="plQ-03-a5S">
-                            <rect key="frame" x="195" y="11" width="135" height="18"/>
+                            <rect key="frame" x="130" y="11" width="200" height="18"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="18" id="bc5-pX-Fqg"/>
-                                <constraint firstAttribute="width" constant="135" id="seh-65-LX9"/>
+                                <constraint firstAttribute="width" constant="200" id="seh-65-LX9"/>
                             </constraints>
                             <fontDescription key="fontDescription" type="system" pointSize="12"/>
                             <color key="textColor" red="0.53725490196078429" green="0.56862745098039214" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>