openlockPPP vor 1 Jahr
Ursprung
Commit
4901c12bb1

+ 2 - 2
JiaPeiManage.xcodeproj/project.pbxproj

@@ -1475,7 +1475,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1222023072002;
+				CURRENT_PROJECT_VERSION = 1222023072102;
 				DEVELOPMENT_TEAM = K7T6CU5SW5;
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = JiaPeiManage/Info.plist;
@@ -1515,7 +1515,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1222023072002;
+				CURRENT_PROJECT_VERSION = 1222023072102;
 				DEVELOPMENT_TEAM = K7T6CU5SW5;
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = JiaPeiManage/Info.plist;

+ 5 - 1
JiaPeiManage/Sources/Modulars/Home/Controllers/HomeViewController.swift

@@ -79,7 +79,11 @@ final class HomeViewController: BaseViewController {
         //在校学员-action
         self.onSchoolAction_button.rx.tap.subscribe ({ [unowned self] (_)  in
             if !LocalManager.isOpenLogin() { return}
-            NYSwRouter.push(NYSwPushType.trainee_list_school,context: LocalManager.userInfo.schoolId)
+            if LocalManager.userInfo.classType == 1 || LocalManager.userInfo.classType == 3{
+                NYSwRouter.push(NYSwPushType.trainee_list_school,context: LocalManager.userInfo.schoolId)
+            }else {
+                NYTips.showMsg(txt: "您的权限不足,无法查看在校学员")
+            }
         }).disposed(by: disposeBag)
         //生成二维码-action
         self.codeQrAction_button.rx.tap.subscribe ({ [unowned self] (_)  in

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

@@ -152,6 +152,7 @@ extension MeTraineeSearchPageViewController:UITableViewDataSource {
 
     func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
         let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier, for: indexPath) as! MeTraineeSubjectCell
+        
         cell.index_button.setTitle("\(indexPath.row+1)", for: .normal)
         cell.setRowInfo(rowInfo: self.meTraineeSearchViewModel.rows[indexPath.row])
         return cell

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

@@ -5,6 +5,7 @@
 //  Created by Ning.ge on 2023/6/15.
 //
 import UIKit
+import RxSwift
 
 final class MeTraineeSubjectCell: UITableViewCell,NibLoadable {
     
@@ -44,15 +45,20 @@ final class MeTraineeSubjectCell: UITableViewCell,NibLoadable {
     //备注
     @IBOutlet weak var remark_label: UILabel!
     
+//    var disposeBag:DisposeBag?
+    var rowInfo:RowInfo?
     
     override func awakeFromNib() {
         super.awakeFromNib()
         self.backgroundColor = .db_theme
         self.contentView.backgroundColor = .db_theme
         self.selectionStyle = .none
+
+        
     }
     
     func setRowInfo(rowInfo:RowInfo){
+        self.rowInfo = rowInfo
         //用户头像
         self.user_imageview.sd_setImage(with: rowInfo.photoPath.urlValue, placeholderImage: rowInfo.sex == "2" ? NYImage.Home.userfemale:NYImage.Home.usermale)
         //报名时间
@@ -100,6 +106,24 @@ final class MeTraineeSubjectCell: UITableViewCell,NibLoadable {
         self.remark_label.text = "备注:" + ((rowInfo.remark==nil||rowInfo.remark=="") ? "无":rowInfo.remark)
         //预
         self.stumake_imageview.isHidden = rowInfo.bmType == "1" ? false:true
+        
+    }
+    
+    
+    @IBAction func actionPhoneClickdo(_ sender: UIButton) {
+        if let phoneURL = URL(string: "tel://"+self.rowInfo!.phone) {
+            if UIApplication.shared.canOpenURL(phoneURL) {
+                UIApplication.shared.open(phoneURL, options: [:], completionHandler: nil)
+            }
+        }
     }
     
+    
+    @IBAction func actionMessageClickdo(_ sender: UIButton) {
+        if let smsURL = URL(string: "sms://"+self.rowInfo!.phone) {
+            if UIApplication.shared.canOpenURL(smsURL) {
+                UIApplication.shared.open(smsURL, options: [:], completionHandler: nil)
+            }
+        }
+    }
 }

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

@@ -58,6 +58,9 @@
                             </constraints>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                             <state key="normal" image="send_msg"/>
+                            <connections>
+                                <action selector="actionMessageClickdo:" destination="iN0-l3-epB" eventType="touchUpInside" id="QCL-6l-1Z4"/>
+                            </connections>
                         </button>
                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BFL-4s-fhV" userLabel="Button-phone">
                             <rect key="frame" x="250" y="44" width="36" height="36"/>
@@ -67,6 +70,9 @@
                             </constraints>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                             <state key="normal" image="call_phone"/>
+                            <connections>
+                                <action selector="actionPhoneClickdo:" destination="iN0-l3-epB" eventType="touchUpInside" id="tb6-2o-rv0"/>
+                            </connections>
                         </button>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="李泽楷ABCDEF" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="e6H-nJ-vBG">
                             <rect key="frame" x="101.99999999999999" y="48" width="133.66666666666663" height="22"/>