diff --git a/OrderScheduling.xcodeproj/project.pbxproj b/OrderScheduling.xcodeproj/project.pbxproj
index eddf30b..753f34a 100644
--- a/OrderScheduling.xcodeproj/project.pbxproj
+++ b/OrderScheduling.xcodeproj/project.pbxproj
@@ -1153,7 +1153,13 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = OrderScheduling/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "中道供应商";
+ INFOPLIST_KEY_LSApplicationCategoryType = "";
INFOPLIST_KEY_NSCameraUsageDescription = "补充工单照片需要访问您的相机";
+ INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "车辆监控功能需要在您使用App期间获取您的定位";
+ INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "车辆监控功能需要在您使用App期间获取您的定位";
+ INFOPLIST_KEY_NSLocationTemporaryUsageDescriptionDictionary = "";
+ INFOPLIST_KEY_NSLocationUsageDescription = "车辆监控功能需要在您使用App期间获取您的定位";
+ INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "车辆监控功能需要在您使用App期间获取您的定位";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "补充工单照片需要访问您的麦克风";
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "补充工单照片需要访问您的相册";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "补充工单照片需要访问您的相册";
@@ -1200,7 +1206,13 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = OrderScheduling/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "中道供应商";
+ INFOPLIST_KEY_LSApplicationCategoryType = "";
INFOPLIST_KEY_NSCameraUsageDescription = "补充工单照片需要访问您的相机";
+ INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "车辆监控功能需要在您使用App期间获取您的定位";
+ INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "车辆监控功能需要在您使用App期间获取您的定位";
+ INFOPLIST_KEY_NSLocationTemporaryUsageDescriptionDictionary = "";
+ INFOPLIST_KEY_NSLocationUsageDescription = "车辆监控功能需要在您使用App期间获取您的定位";
+ INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "车辆监控功能需要在您使用App期间获取您的定位";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "补充工单照片需要访问您的麦克风";
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "补充工单照片需要访问您的相册";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "补充工单照片需要访问您的相册";
@@ -1240,6 +1252,11 @@
INFOPLIST_FILE = OrderSchedulingNotificationService/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = OrderSchedulingNotificationService;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
+ INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "";
+ INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "";
+ INFOPLIST_KEY_NSLocationTemporaryUsageDescriptionDictionary = "";
+ INFOPLIST_KEY_NSLocationUsageDescription = "";
+ INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -1271,6 +1288,10 @@
INFOPLIST_FILE = OrderSchedulingNotificationService/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = OrderSchedulingNotificationService;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
+ INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "";
+ INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "";
+ INFOPLIST_KEY_NSLocationUsageDescription = "";
+ INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
diff --git a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate
index 1f34c2c..c45cdf7 100644
Binary files a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate and b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
index fc36294..dd4051e 100644
--- a/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+++ b/OrderScheduling.xcworkspace/xcuserdata/zd.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -317,8 +317,8 @@
filePath = "OrderScheduling/Rescue/ViewController/RescueController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "570"
- endingLineNumber = "570"
+ startingLineNumber = "568"
+ endingLineNumber = "568"
landmarkName = "tableView(_:cellForRowAt:)"
landmarkType = "7">
@@ -507,8 +507,8 @@
filePath = "OrderScheduling/Rescue/ViewController/RescueController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "812"
- endingLineNumber = "812"
+ startingLineNumber = "810"
+ endingLineNumber = "810"
landmarkName = "collectionView(_:cellForItemAt:)"
landmarkType = "7">
@@ -682,8 +682,8 @@
filePath = "OrderScheduling/VehicleMonitoring/ViewController/VehicleMonitoringController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "309"
- endingLineNumber = "309"
+ startingLineNumber = "306"
+ endingLineNumber = "306"
landmarkName = "dd_mapView(_:viewFor:)"
landmarkType = "7">
@@ -698,8 +698,8 @@
filePath = "OrderScheduling/VehicleMonitoring/ViewController/VehicleMonitoringController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "287"
- endingLineNumber = "287"
+ startingLineNumber = "284"
+ endingLineNumber = "284"
landmarkName = "dd_mapView(_:viewFor:)"
landmarkType = "7">
@@ -714,8 +714,8 @@
filePath = "OrderScheduling/VehicleMonitoring/ViewController/VehicleMonitoringController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "289"
- endingLineNumber = "289"
+ startingLineNumber = "286"
+ endingLineNumber = "286"
landmarkName = "dd_mapView(_:viewFor:)"
landmarkType = "7">
@@ -730,8 +730,8 @@
filePath = "OrderScheduling/VehicleMonitoring/ViewController/VehicleMonitoringController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "315"
- endingLineNumber = "315"
+ startingLineNumber = "312"
+ endingLineNumber = "312"
landmarkName = "dd_mapView(_:viewFor:)"
landmarkType = "7">
@@ -746,8 +746,8 @@
filePath = "OrderScheduling/VehicleMonitoring/ViewController/VehicleMonitoringController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "314"
- endingLineNumber = "314"
+ startingLineNumber = "311"
+ endingLineNumber = "311"
landmarkName = "dd_mapView(_:viewFor:)"
landmarkType = "7">
@@ -1381,8 +1381,8 @@
filePath = "OrderScheduling/Main/AppDelegate.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "133"
- endingLineNumber = "133"
+ startingLineNumber = "134"
+ endingLineNumber = "134"
landmarkName = "jpushNotificationAuthorization(_:withInfo:)"
landmarkType = "7">
@@ -1397,8 +1397,8 @@
filePath = "OrderScheduling/Main/AppDelegate.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "124"
- endingLineNumber = "124"
+ startingLineNumber = "125"
+ endingLineNumber = "125"
landmarkName = "jpushNotificationCenter(_:didReceive:withCompletionHandler:)"
landmarkType = "7">
@@ -1589,10 +1589,10 @@
filePath = "OrderScheduling/ReviewFailed/ViewController/ReviewFailedController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "227"
- endingLineNumber = "227"
- landmarkName = "reloadData()"
- landmarkType = "7">
+ startingLineNumber = "234"
+ endingLineNumber = "234"
+ landmarkName = "ReviewFailedController"
+ landmarkType = "3">
@@ -2048,8 +2048,8 @@
filePath = "OrderScheduling/Main/AppDelegate.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "126"
- endingLineNumber = "126"
+ startingLineNumber = "127"
+ endingLineNumber = "127"
landmarkName = "jpushNotificationCenter(_:didReceive:withCompletionHandler:)"
landmarkType = "7">
@@ -2509,8 +2509,8 @@
filePath = "OrderScheduling/VehicleMonitoring/ViewController/VehicleMonitoringController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "557"
- endingLineNumber = "557"
+ startingLineNumber = "560"
+ endingLineNumber = "560"
landmarkName = "viewDidAppear(_:)"
landmarkType = "7">
@@ -2557,8 +2557,8 @@
filePath = "OrderScheduling/Rescue/ViewController/RescueController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "823"
- endingLineNumber = "823"
+ startingLineNumber = "821"
+ endingLineNumber = "821"
landmarkName = "collectionView(_:didSelectItemAt:)"
landmarkType = "7">
@@ -2917,8 +2917,8 @@
filePath = "OrderScheduling/Rescue/ViewController/RescueController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "312"
- endingLineNumber = "312"
+ startingLineNumber = "310"
+ endingLineNumber = "310"
landmarkName = "addActions()"
landmarkType = "7">
@@ -2933,8 +2933,8 @@
filePath = "OrderScheduling/Rescue/ViewController/RescueController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "301"
- endingLineNumber = "301"
+ startingLineNumber = "299"
+ endingLineNumber = "299"
landmarkName = "addActions()"
landmarkType = "7">
@@ -2949,8 +2949,8 @@
filePath = "OrderScheduling/Rescue/ViewController/RescueController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "303"
- endingLineNumber = "303"
+ startingLineNumber = "301"
+ endingLineNumber = "301"
landmarkName = "addActions()"
landmarkType = "7">
@@ -3130,5 +3130,309 @@
landmarkType = "7">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OrderScheduling/Common/View/MessageCount.swift b/OrderScheduling/Common/View/MessageCount.swift
index d868d95..741bf2c 100644
--- a/OrderScheduling/Common/View/MessageCount.swift
+++ b/OrderScheduling/Common/View/MessageCount.swift
@@ -20,7 +20,7 @@ open class MessageCount : NSObject {
public override init() {
super.init()
- NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: Notification_reloadRescusControolerToDoMessageCount), object: nil, queue: .main) {[weak self] note in
+ NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: Notification_reloadRescusControllerToDoMessageCount), object: nil, queue: .main) {[weak self] note in
self?.reloadToDoMessageCountRelay.accept(nil)
}
@@ -43,4 +43,8 @@ open class MessageCount : NSObject {
})
.disposed(by: disposeBag)
}
+
+ func newestMessage() {
+ NotificationCenter.default.post(name: NSNotification.Name(rawValue: Notification_reloadRescusControllerToDoMessageCount), object: nil)
+ }
}
diff --git a/OrderScheduling/Common/WebView/WebViewTool.swift b/OrderScheduling/Common/WebView/WebViewTool.swift
index 45ccf0e..054c291 100644
--- a/OrderScheduling/Common/WebView/WebViewTool.swift
+++ b/OrderScheduling/Common/WebView/WebViewTool.swift
@@ -74,7 +74,7 @@ open class WebViewTool : NSObject {
case .todoList:
vc = WebViewController(title: WebViewNameEnum.todoList.rawValue, url: "\((h5Models?.todoList)!)?token=\((USER.token)!)")
vc?.disappearHandler = {
- NotificationCenter.default.post(name: NSNotification.Name(rawValue: Notification_reloadRescusControolerToDoMessageCount), object: nil)
+ MCOUNT.newestMessage()
}
break
case .workOrderReconciliation:
diff --git a/OrderScheduling/Global/User/UserData.swift b/OrderScheduling/Global/User/UserData.swift
index ab7d2d0..2c6b9e7 100644
--- a/OrderScheduling/Global/User/UserData.swift
+++ b/OrderScheduling/Global/User/UserData.swift
@@ -55,7 +55,7 @@ open class UserData {
UserDefaults.standard.set(token, forKey: refresh_token_key)
}
- // 不需要记录
+ // 不需要记录,1是子公司,2是服务商
public var supplierType : Int? {
return UserDefaults.standard.object(forKey: supplierType_key) as? Int
}
diff --git a/OrderScheduling/History/ViewController/HistoryController.swift b/OrderScheduling/History/ViewController/HistoryController.swift
index a2397bb..dada888 100644
--- a/OrderScheduling/History/ViewController/HistoryController.swift
+++ b/OrderScheduling/History/ViewController/HistoryController.swift
@@ -68,7 +68,7 @@ extension HistoryController {
preRefreshRelay
.observe(on: MainScheduler.instance)
.subscribe(onNext: {[weak self] _ in
- NotificationCenter.default.post(name: NSNotification.Name(rawValue: Notification_reloadRescusControolerToDoMessageCount), object: nil)
+ MCOUNT.newestMessage()
self?.categoryView.reloadData()
})
.disposed(by: disposeBag)
diff --git a/OrderScheduling/Info.plist b/OrderScheduling/Info.plist
index 371164a..fe3edb6 100644
--- a/OrderScheduling/Info.plist
+++ b/OrderScheduling/Info.plist
@@ -11,6 +11,11 @@
NSAllowsArbitraryLoads
+ NSLocationTemporaryUsageDescriptionDictionary
+
+ FORCE_FULL_ACCURACY
+ 车辆监控功能必须要获取您的精准定位才能提供服务
+
UIApplicationSceneManifest
UIApplicationSupportsMultipleScenes
diff --git a/OrderScheduling/Main/AppDelegate.swift b/OrderScheduling/Main/AppDelegate.swift
index e3d75fa..ca514f5 100644
--- a/OrderScheduling/Main/AppDelegate.swift
+++ b/OrderScheduling/Main/AppDelegate.swift
@@ -111,6 +111,7 @@ extension AppDelegate : JPUSHRegisterDelegate {
TOOL.playVoiceWith(userInfo: userInfo)
}
}else{
+ MCOUNT.newestMessage()
completionHandler(1 << 1 | 1 << 2)
}
}
diff --git a/OrderScheduling/Main/SceneDelegate.swift b/OrderScheduling/Main/SceneDelegate.swift
index d14dc38..d4fa42a 100644
--- a/OrderScheduling/Main/SceneDelegate.swift
+++ b/OrderScheduling/Main/SceneDelegate.swift
@@ -41,6 +41,8 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
TOOL.dealWithOrderPushNotification { userInfo in
TOOL.playAlertWith(userInfo: userInfo)
}
+ // app激活就要获取最新消息个数
+ MCOUNT.newestMessage()
}
func sceneWillResignActive(_ scene: UIScene) {
diff --git a/OrderScheduling/MessageCenter/ViewController/MessageCenterTool.swift b/OrderScheduling/MessageCenter/ViewController/MessageCenterTool.swift
index f0d10c5..2dcd394 100644
--- a/OrderScheduling/MessageCenter/ViewController/MessageCenterTool.swift
+++ b/OrderScheduling/MessageCenter/ViewController/MessageCenterTool.swift
@@ -15,7 +15,7 @@ open class MessageCenterTool : NSObject {
func openMessageCenter(by nav:UINavigationController?) {
let vc = MessageCenterController()
vc.disappearHandler = {
- NotificationCenter.default.post(name: NSNotification.Name(rawValue: Notification_reloadRescusControolerToDoMessageCount), object: nil)
+ MCOUNT.newestMessage()
}
nav?.pushViewController(vc, animated: true)
}
diff --git a/OrderScheduling/Rescue/ViewController/RescueController.swift b/OrderScheduling/Rescue/ViewController/RescueController.swift
index 701cabc..85bb00e 100644
--- a/OrderScheduling/Rescue/ViewController/RescueController.swift
+++ b/OrderScheduling/Rescue/ViewController/RescueController.swift
@@ -74,13 +74,11 @@ extension RescueController {
.disposed(by: disposeBag)
}
- NotificationCenter.default.post(name: NSNotification.Name(rawValue: Notification_reloadRescusControolerToDoMessageCount), object: nil)
-
// 点击tabBar 需要刷下下列
preRefreshRelay
.observe(on: MainScheduler.instance)
.subscribe(onNext: {[weak self] _ in
- NotificationCenter.default.post(name: NSNotification.Name(rawValue: Notification_reloadRescusControolerToDoMessageCount), object: nil)
+ MCOUNT.newestMessage()
self?.categoryView.reloadData()
})
.disposed(by: disposeBag)
diff --git a/OrderScheduling/ReviewFailed/ViewController/ReviewFailedController.swift b/OrderScheduling/ReviewFailed/ViewController/ReviewFailedController.swift
index 78f16d7..b81c988 100644
--- a/OrderScheduling/ReviewFailed/ViewController/ReviewFailedController.swift
+++ b/OrderScheduling/ReviewFailed/ViewController/ReviewFailedController.swift
@@ -117,7 +117,7 @@ extension ReviewFailedController {
preRefreshRelay
.observe(on: MainScheduler.instance)
.subscribe(onNext: {[weak self] _ in
- NotificationCenter.default.post(name: NSNotification.Name(rawValue: Notification_reloadRescusControolerToDoMessageCount), object: nil)
+ MCOUNT.newestMessage()
self?.reviewFailedView.tableView.mj_header?.beginRefreshing()
})
.disposed(by: disposeBag)
@@ -140,12 +140,19 @@ extension ReviewFailedController : UITableViewDelegate,UITableViewDataSource {
cell = ReviewFailedCell(style: .default, reuseIdentifier: "cell")
}
let model = resultArr[indexPath.row]
+ cell!.orderStatusTitleLabel.text = "状态:"
+ cell!.orderStatusLabel.text = model.taskOrderStatusString
cell!.descLabel.text = "不通过原因:" + (model.auditFailReason ?? "")
cell!.typeLabel.text = model.taskServiceName
- cell!.stateLabel.text = model.taskOrderStatusString
cell!.orderNumLabel.text = model.orderCode
cell!.dateLabel.text = model.createTime
+ if model.taskOrderStatusString == "任务完成" {
+ cell?.orderStatusLabel.textColor = .hex("09B820")
+ }else{
+ cell?.orderStatusLabel.textColor = .hex("E64C0B")
+ }
+
cell!.additionalButton.rx.tap
.observe(on: MainScheduler.instance)
.subscribe(onNext: {[weak self] _ in
@@ -250,7 +257,8 @@ open class ReviewFailedCell : DDTableViewCell {
public let radiusView : DDView
public let typeLabel : DDLabel
public let orderNumLabel : DDLabel
- public let stateLabel : DDLabel
+ public let orderStatusTitleLabel : DDLabel
+ public let orderStatusLabel : DDLabel
public let descLabel : DDLabel
public let dateLabel : DDLabel
public let additionalButton : DDButton
@@ -270,7 +278,8 @@ open class ReviewFailedCell : DDTableViewCell {
radiusView = DDView()
typeLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(14)), textColor: .hex("000000").alpha(0.85))
orderNumLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(12)), textColor: .hex("000000").alpha(0.55))
- stateLabel = DDLabel.dd_init(withText: "", font: .regularFont(auto(12)), textColor: .hex("09B820"))
+ orderStatusTitleLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(12)), textColor: .hex("000000").alpha(0.5))
+ orderStatusLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(12)), textColor: .hex("E69B0B"))
descLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(13)), textColor: .hex("FF8F37"))
dateLabel = DDLabel.dd_init(withText: "", font: .regularFont(auto(12)), textColor: .hex("000000").alpha(0.55))
additionalButton = DDButton.dd_initCustom()
@@ -288,7 +297,9 @@ open class ReviewFailedCell : DDTableViewCell {
contentView.addSubview(radiusView)
radiusView.addSubview(typeLabel)
radiusView.addSubview(orderNumLabel)
- radiusView.addSubview(stateLabel)
+ radiusView.addSubview(orderStatusTitleLabel)
+ orderStatusLabel.numberOfLines = 0
+ radiusView.addSubview(orderStatusLabel)
descLabel.numberOfLines = 0
radiusView.addSubview(descLabel)
radiusView.addSubview(dateLabel)
@@ -316,15 +327,21 @@ open class ReviewFailedCell : DDTableViewCell {
make.centerY.equalTo(typeLabel)
}
- stateLabel.snp.makeConstraints { make in
- make.right.equalTo(-auto(10))
- make.centerY.equalTo(typeLabel)
+ orderStatusTitleLabel.snp.makeConstraints { make in
+ make.left.equalTo(typeLabel)
+ make.top.equalTo(orderNumLabel.snp.bottom).offset(auto(10))
}
+ orderStatusLabel.snp.makeConstraints { make in
+ make.height.equalTo(orderStatusTitleLabel)
+ make.top.equalTo(orderStatusTitleLabel)
+ make.left.equalTo(orderStatusTitleLabel.snp.right).offset(auto(10))
+ }
+
descLabel.snp.makeConstraints { make in
- make.top.equalTo(typeLabel.snp.bottom).offset(auto(10))
+ make.top.equalTo(orderStatusTitleLabel.snp.bottom).offset(auto(10))
make.left.equalTo(typeLabel)
- make.right.equalTo(stateLabel)
+ make.right.equalTo(-auto(20))
}
dateLabel.snp.makeConstraints { make in
@@ -334,7 +351,7 @@ open class ReviewFailedCell : DDTableViewCell {
}
additionalButton.snp.makeConstraints { make in
- make.right.equalTo(stateLabel)
+ make.right.equalTo(-auto(20))
make.centerY.equalTo(dateLabel)
make.width.equalTo(auto(50))
make.height.equalTo(auto(20))
diff --git a/OrderScheduling/Strings/NotificationStrings.swift b/OrderScheduling/Strings/NotificationStrings.swift
index baff66e..52bad2c 100644
--- a/OrderScheduling/Strings/NotificationStrings.swift
+++ b/OrderScheduling/Strings/NotificationStrings.swift
@@ -15,4 +15,4 @@ public let Notification_dispatchOrderSuccessReloadIsRescuingController = "Notifi
public let Notification_dispatchOrderSuccessReloadPendingDispatchController = "Notification_dispatchOrderSuccessReloadPendingDispatchController"
-public let Notification_reloadRescusControolerToDoMessageCount = "Notification_reloadRescusControolerToDoMessageCount"
+public let Notification_reloadRescusControllerToDoMessageCount = "Notification_reloadRescusControllerToDoMessageCount"
diff --git a/OrderScheduling/VehicleMonitoring/ViewController/VehicleMonitoringController.swift b/OrderScheduling/VehicleMonitoring/ViewController/VehicleMonitoringController.swift
index 127461c..e3b5741 100644
--- a/OrderScheduling/VehicleMonitoring/ViewController/VehicleMonitoringController.swift
+++ b/OrderScheduling/VehicleMonitoring/ViewController/VehicleMonitoringController.swift
@@ -82,7 +82,7 @@ extension VehicleMonitoringController {
let leisureCount = String(response?.data?.vehicleMonitorCount.leisureCount ?? 0)+"\n"+"空闲"
let busyCount = String(response?.data?.vehicleMonitorCount.busyCount ?? 0)+"\n"+"忙碌"
let alarmCount = String(response?.data?.vehicleMonitorCount.alarmCount ?? 0)+"\n"+"报警"
- if USER.supplierType == 2 {
+ if USER.supplierType == 1 {
self?.vehicleMonitoringView.vehicleMonitoringPannelView.categoryView.titles = [roster,onLineCount,lostConnectionCount,leisureCount,busyCount]
}else{
self?.vehicleMonitoringView.vehicleMonitoringPannelView.categoryView.titles = [onLineCount,lostConnectionCount,leisureCount,busyCount]
@@ -165,24 +165,21 @@ extension VehicleMonitoringController {
})
.disposed(by: disposeBag)
+ refreshButton.rx.tap
+ .subscribe(onNext: {[weak self] _ in
+ self?.preRefreshRelay.accept(nil)
+ })
+ .disposed(by: disposeBag)
+
// 点击tabBar 需要刷下下列
preRefreshRelay
.observe(on: MainScheduler.instance)
.subscribe(onNext: {[weak self] _ in
- NotificationCenter.default.post(name: NSNotification.Name(rawValue: Notification_reloadRescusControolerToDoMessageCount), object: nil)
+ MCOUNT.newestMessage()
self?.reloadRelay.accept(nil)
})
.disposed(by: disposeBag)
- refreshButton.rx.tap
- .subscribe(onNext: {[weak self] _ in
- NotificationCenter.default.post(name: NSNotification.Name(rawValue: Notification_reloadRescusControolerToDoMessageCount), object: nil)
- self?.reloadRelay.accept(nil)
- })
- .disposed(by: disposeBag)
-
- NotificationCenter.default.post(name: NSNotification.Name(rawValue: Notification_reloadRescusControolerToDoMessageCount), object: nil)
-
}
}
@@ -347,7 +344,7 @@ extension VehicleMonitoringController : JXCategoryListContainerViewDelegate {
public func listContainerView(_ listContainerView: JXCategoryListContainerView!, initListFor index: Int) -> JXCategoryListContentViewDelegate! {
var vc : VehicleMonitoringListController?
- if USER.supplierType == 2 {
+ if USER.supplierType == 1 {
if index == 0 {
vc = VehicleMonitoringListController(models: dataModel?.rosterList,isPaiban: true)
}else if index == 1 {
@@ -442,7 +439,7 @@ extension VehicleMonitoringController : JXCategoryViewDelegate {
}
func reloadData(index:Int) {
- if USER.supplierType == 2 {
+ if USER.supplierType == 1 {
if index == 0 {
mapModel = dataModel?.rosterList
}else if index == 1 {
@@ -484,8 +481,11 @@ extension VehicleMonitoringController : JXCategoryViewDelegate {
}
}
- if let annotations = vehicleMonitoringView.maMapView.maMapView.annotations {
+ if let annotations = vehicleMonitoringView.maMapView.maMapView.annotations, annotations.isEmpty == false {
vehicleMonitoringView.maMapView.maMapView.showAnnotations(annotations, animated: true)
+ }else{
+ vehicleMonitoringView.maMapView.maMapView.setCenter(vehicleMonitoringView.maMapView.maMapView.userLocation.coordinate, animated: true)
+ vehicleMonitoringView.maMapView.maMapView.zoomLevel = 18
}
}
}
@@ -528,6 +528,9 @@ open class VehicleMonitoringController : ZDViewController {
}
vehicleMonitoringView.maMapView.delegate = self
+ vehicleMonitoringView.maMapView.maMapView.showsUserLocation = true
+ vehicleMonitoringView.maMapView.maMapView.userTrackingMode = .follow
+ vehicleMonitoringView.maMapView.maMapView.customizeUserLocationAccuracyCircleRepresentation = true
vehicleMonitoringView.vehicleMonitoringPannelView.categoryView.delegate = self
vehicleMonitoringView.vehicleMonitoringPannelView.categoryView.listContainer = categoryContainerView
diff --git a/OrderScheduling/VehicleMonitoring/ViewController/VehicleMonitoringListController.swift b/OrderScheduling/VehicleMonitoring/ViewController/VehicleMonitoringListController.swift
index e591584..aac51c3 100644
--- a/OrderScheduling/VehicleMonitoring/ViewController/VehicleMonitoringListController.swift
+++ b/OrderScheduling/VehicleMonitoring/ViewController/VehicleMonitoringListController.swift
@@ -28,7 +28,7 @@ extension VehicleMonitoringListController : UITableViewDelegate,UITableViewDataS
cell?.icon.isHidden = !(model.isSelected ?? false)
cell?.indexLabel.text = String(indexPath.item + 1)+"."
if isPaiban == true {
- cell?.dateLabel.text = (model.rosterStartTime ?? "") + "\n~\n" + (model.rosterEndTime ?? "")
+ cell?.dateLabel.text = (model.rosterStartTime?.components(separatedBy: " ").last ?? "") + "\n~\n" + (model.rosterEndTime?.components(separatedBy: " ").last ?? "")
}else{
var status = model.vehicleStatus?.label ?? ""
if model.onlineStatus?.code == .lostConnection {