OOAttandanceWorkPlaceCell.swift 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // OOAttandanceWorkPlaceCell.swift
  3. // O2Platform
  4. //
  5. // Created by 刘振兴 on 2018/5/21.
  6. // Copyright © 2018年 zoneland. All rights reserved.
  7. //
  8. import UIKit
  9. class OOAttandanceWorkPlaceCell: UITableViewCell,Configurable {
  10. @IBOutlet weak var placeName: UILabel!
  11. @IBOutlet weak var placeAlias: UILabel!
  12. @IBOutlet weak var creator: UILabel!
  13. @IBOutlet weak var longitude: UILabel!
  14. @IBOutlet weak var latitude: UILabel!
  15. @IBOutlet weak var errorRange: UILabel!
  16. override func awakeFromNib() {
  17. super.awakeFromNib()
  18. // Initialization code
  19. }
  20. override func setSelected(_ selected: Bool, animated: Bool) {
  21. super.setSelected(selected, animated: animated)
  22. // Configure the view for the selected state
  23. }
  24. func config(withItem item: Any?) {
  25. guard let model = item as? OOAttandanceWorkPlace else {
  26. return
  27. }
  28. placeName.text = model.placeName
  29. placeAlias.text = model.placeAlias
  30. creator.text = model.creator
  31. longitude.text = model.longitude
  32. latitude.text = model.latitude
  33. errorRange.text = String(model.errorRange ?? 0)
  34. }
  35. }