update
This commit is contained in:
@@ -59,9 +59,7 @@ extension VehicleMonitoringController {
|
||||
}
|
||||
})
|
||||
.disposed(by: disposeBag)
|
||||
|
||||
NotificationCenter.default.post(name: NSNotification.Name(rawValue: Notification_reloadRescusControolerToDoMessageCount), object: nil)
|
||||
|
||||
|
||||
reloadRelay
|
||||
.observe(on: MainScheduler.instance)
|
||||
.do(onNext: {[weak self] _ in
|
||||
@@ -183,23 +181,8 @@ extension VehicleMonitoringController {
|
||||
})
|
||||
.disposed(by: disposeBag)
|
||||
|
||||
// vehicleMonitoringView.refreshButton.sendActions(for: .touchUpInside)
|
||||
// var duration = 0
|
||||
// DDTimerManager.dd_share().dd_addTimer(withName: refresh_vehicle_monitoring_key, timeInterval: 1, repeatCount: 0, delay: 0) {[weak self] (manager, obj, index) in
|
||||
// if duration == 0 {
|
||||
// duration = 60
|
||||
// self?.reloadRelay.accept(nil)
|
||||
// }
|
||||
// duration-=1
|
||||
// DispatchQueue.main.async {[weak self] in
|
||||
// self?.vehicleMonitoringView.refreshButton.setTitle("自动刷新倒计时:"+"\(duration)s", for: .normal)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
public override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
NotificationCenter.default.post(name: NSNotification.Name(rawValue: Notification_reloadRescusControolerToDoMessageCount), object: nil)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -484,18 +467,22 @@ extension VehicleMonitoringController : JXCategoryViewDelegate {
|
||||
}
|
||||
|
||||
vehicleMonitoringView.maMapView.maMapView.removeAnnotations(mapAnnotaions)
|
||||
var hasSetCenter = false
|
||||
for index in 0..<(mapModel?.count ?? 0) {
|
||||
let model = mapModel?[index]
|
||||
let coordinate = CLLocationCoordinate2D(latitude: Double(model?.lat ?? "") ?? 0, longitude: Double(model?.lon ?? "") ?? 0)
|
||||
let pointAnnotation = MAPointAnnotation.init()
|
||||
pointAnnotation.annotationClass = VehicleMonitoringPointAnnotation.self
|
||||
pointAnnotation.coordinate = coordinate
|
||||
pointAnnotation.tag = index
|
||||
vehicleMonitoringView.maMapView.maMapView.addAnnotation(pointAnnotation)
|
||||
mapAnnotaions.append(pointAnnotation)
|
||||
|
||||
if index == 0{
|
||||
vehicleMonitoringView.maMapView.maMapView.setCenter(coordinate, animated: true)
|
||||
if model?.lat != nil && model?.lon != nil {
|
||||
let coordinate = CLLocationCoordinate2D(latitude: Double(model?.lat ?? "") ?? 0, longitude: Double(model?.lon ?? "") ?? 0)
|
||||
let pointAnnotation = MAPointAnnotation.init()
|
||||
pointAnnotation.annotationClass = VehicleMonitoringPointAnnotation.self
|
||||
pointAnnotation.coordinate = coordinate
|
||||
pointAnnotation.tag = index
|
||||
vehicleMonitoringView.maMapView.maMapView.addAnnotation(pointAnnotation)
|
||||
mapAnnotaions.append(pointAnnotation)
|
||||
|
||||
if hasSetCenter == false {
|
||||
hasSetCenter = true
|
||||
vehicleMonitoringView.maMapView.maMapView.setCenter(coordinate, animated: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -536,16 +523,10 @@ open class VehicleMonitoringController : ZDViewController {
|
||||
make.left.right.bottom.equalToSuperview()
|
||||
make.top.equalToSuperview().offset(CGRectGetHeight(UIApplication.shared.dd_statusBarFrame)+CGRectGetHeight(navigationController?.navigationBar.frame ?? .zero))
|
||||
}
|
||||
|
||||
|
||||
vehicleMonitoringView.maMapView.delegate = self
|
||||
vehicleMonitoringView.vehicleMonitoringPannelView.categoryView.delegate = self
|
||||
vehicleMonitoringView.vehicleMonitoringPannelView.radiusView.addSubview(categoryContainerView!)
|
||||
vehicleMonitoringView.vehicleMonitoringPannelView.categoryView.listContainer = categoryContainerView
|
||||
categoryContainerView?.snp.makeConstraints({ make in
|
||||
make.top.equalTo(vehicleMonitoringView.vehicleMonitoringPannelView.categoryView.snp.bottom)
|
||||
make.left.right.equalToSuperview()
|
||||
make.bottom.equalToSuperview().offset(-CGRectGetHeight(tabBarController?.tabBar.frame ?? .zero))
|
||||
})
|
||||
|
||||
messageView.titleLabel.text = "消息"
|
||||
messageView.addGestureRecognizer(messageTapGes)
|
||||
@@ -566,6 +547,17 @@ open class VehicleMonitoringController : ZDViewController {
|
||||
make.width.greaterThanOrEqualTo(40)
|
||||
}
|
||||
}
|
||||
|
||||
open override func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
vehicleMonitoringView.vehicleMonitoringPannelView.radiusView.addSubview(categoryContainerView!)
|
||||
categoryContainerView?.snp.makeConstraints({ make in
|
||||
make.top.equalTo(vehicleMonitoringView.vehicleMonitoringPannelView.categoryView.snp.bottom)
|
||||
make.left.right.equalToSuperview()
|
||||
make.bottom.equalToSuperview().offset(-CGRectGetHeight(tabBarController?.tabBar.frame ?? .zero))
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
open override func reloadData() {
|
||||
super.reloadData()
|
||||
@@ -643,7 +635,6 @@ open class VehicleMonitoringPannelView : DDView {
|
||||
categoryView.backgroundColor = .hex("FBFBFB")
|
||||
let indicator = JXCategoryIndicatorLineView()
|
||||
indicator.indicatorColor = .hex("3678FF")
|
||||
indicator.indicatorWidth = JXCategoryViewAutomaticDimension
|
||||
indicator.verticalMargin = 0
|
||||
indicator.indicatorWidth = auto(18)
|
||||
categoryView.indicators = [indicator]
|
||||
|
||||
Reference in New Issue
Block a user