r
5 天以前 40d2509d9b7ba38e79fd023a2049e3bd5492d3b6
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//
//  StudentInfo_5_TCell.swift
//  WanPai
//
//  Created by 无故事王国 on 2024/3/1.
//
 
import UIKit
import QMUIKit
import JQTools
 
class StudentInfo_5_TCell: UITableViewCell {
 
                @IBOutlet weak var btn_delete: UIButton!
                @IBOutlet weak var btn_edit: UIButton!
 
                @IBOutlet weak var label_name: UILabel!
                @IBOutlet weak var label_idCard: UILabel!
                @IBOutlet weak var label_age: UILabel!
                @IBOutlet weak var label_phone: UILabel!
                @IBOutlet weak var view_container: UIView!
                @IBOutlet weak var btn_verifiy: UIButton!
                @IBOutlet weak var img_QRCode: UIImageView!
                
                var indexPath:IndexPath?
 
                var delClouse:((IndexPath)->Void)?
                //    var editClouse:((IndexPath)->Void)?
 
                var activityDetailPartModel:ActivityDetailPartModel!{
                                didSet{
                                                label_name.text = activityDetailPartModel.name
                                                label_idCard.text = activityDetailPartModel.idcard
                                                label_age.text = "\(activityDetailPartModel.age)岁"
                                                label_phone.text = activityDetailPartModel.phone
 
                                                if let qrCode = WorldCupUserInfoQRCodel(id: activityDetailPartModel.id, isStudent: activityDetailPartModel.isStudent).toJSONString(){
                                                                img_QRCode.image = UIImage.jq_GenerateQRCode(with: qrCode, width: 80)
                                                }
                                }
                }
 
                override func awakeFromNib() {
                                super.awakeFromNib()
                                selectionStyle = .none
 
                                let tap = UITapGestureRecognizer(target: self, action: #selector(showQRAction))
                                img_QRCode.addGestureRecognizer(tap)
                                img_QRCode.isUserInteractionEnabled = true
                }
 
                @objc func showQRAction(){
                                if let qrCode = WorldCupUserInfoQRCodel(id: activityDetailPartModel.id, isStudent: activityDetailPartModel.isStudent).toJSONString(){
                                                QRWithTitlePreview.show(qrCode,title: activityDetailPartModel.name)
                                }
                }
 
                @IBAction func editAction(_ sender: UIButton) {
                                StudentUpdateInfoView.show(activityDetailPartModel,updateUserProfile: true)
                }
 
 
                @IBAction func delAction(_ sender: UIButton) {
                                if let index = indexPath{
                                                delClouse?(index)
                                }
                }
 
                @IBAction func verifyAction(_ sender: UIButton) {
                                let vc = AddStudentVC(type:.worldCup,activityDetailPartModel: activityDetailPartModel,identity: true,identityPhone: true)
                                JQ_currentViewController().jq_push(vc: vc)
                }
 
}