This commit is contained in:
DDIsFriend
2023-08-29 17:10:59 +08:00
parent b6ef0cfb06
commit 00b875d351
55 changed files with 8375 additions and 7831 deletions

View File

@@ -615,6 +615,7 @@ extension RescuePendingDispatchController : UITableViewDelegate,UITableViewDataS
})
}
cell?.photoCollectionView.tag = indexPath.row
cell?.photoCollectionView.delegate = self
cell?.photoCollectionView.dataSource = self
cell?.photoCollectionView.register(RescuePendingDispatchPhotoCell.self, forCellWithReuseIdentifier: "cell")
@@ -630,7 +631,6 @@ extension RescuePendingDispatchController : UITableViewDelegate,UITableViewDataS
make.height.equalTo(auto(50))
})
if let environmentPics {
self.environmentPics = environmentPics
cell?.photoCollectionView.reloadData()
}
}else{
@@ -763,11 +763,15 @@ extension RescueIsIngController : UITableViewDelegate,UITableViewDataSource {
// MARK: UICollectionViewDelegate, UICollectionViewDataSource
extension RescuePendingDispatchController : UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
let model = resultArr[collectionView.tag]
let environmentPics = model.environmentPic?.components(separatedBy: ",") ?? []
return environmentPics.count > 4 ? 4 : environmentPics.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as? RescuePendingDispatchPhotoCell
let model = resultArr[collectionView.tag]
let environmentPics = model.environmentPic?.components(separatedBy: ",") ?? []
let imageUrlStr = environmentPics[indexPath.item]
cell!.imageView.image = nil
if imageUrlStr.contains(".mp4?") == true {
@@ -787,6 +791,8 @@ extension RescuePendingDispatchController : UICollectionViewDelegate, UICollecti
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let model = resultArr[collectionView.tag]
let environmentPics = model.environmentPic?.components(separatedBy: ",") ?? []
let vc = RescuePhotoController(environmentPics: environmentPics)
navigationController?.pushViewController(vc, animated: true)
}
@@ -813,6 +819,7 @@ class RescueController : ZDViewController {
super.viewDidLoad()
dd_navigationBarBackgroundColor = .hex("354683")
dd_navigationBarTitleTextAttributes = [.foregroundColor : UIColor.white(alpha: 0.7),.font:UIFont.mediumFont(auto(15))]
dd_navigationBarBarButtonItemAttributes = [.foregroundColor : UIColor.white]
dd_navigationItemTitle = "救援工单"
navigationItem.leftBarButtonItems = nil
addSubviews()
@@ -872,7 +879,7 @@ class RescueController : ZDViewController {
}
// MARK:
class RescuePendingOrderController : DDViewController {
class RescuePendingOrderController : ZDViewController {
private let disposeBag = DisposeBag()
public let pendingOrderView = RescuePendingOrderView()
private var resultArr : [OrderListDataModel] = []
@@ -887,6 +894,7 @@ class RescuePendingOrderController : DDViewController {
super.viewDidLoad()
dd_navigationBarBackgroundColor = .hex("354683")
dd_navigationBarTitleTextAttributes = [.foregroundColor : UIColor.white(alpha: 0.7),.font:UIFont.mediumFont(17)]
dd_navigationBarBarButtonItemAttributes = [.foregroundColor : UIColor.white]
addSubviews()
addActions()
}
@@ -911,11 +919,10 @@ class RescuePendingOrderController : DDViewController {
}
// MARK:
class RescuePendingDispatchController : DDViewController {
class RescuePendingDispatchController : ZDViewController {
private let disposeBag = DisposeBag()
public let pendingDispatchView = RescuePendingDispatchView()
private var resultArr : [OrderListDataModel] = []
private var environmentPics : [String] = []
private var refreshRelay = ReplayRelay<Int>.create(bufferSize: 1)
private var pageNum : Int = 1
private var emptyView = EmptyView()
@@ -924,6 +931,7 @@ class RescuePendingDispatchController : DDViewController {
super.viewDidLoad()
dd_navigationBarBackgroundColor = .hex("354683")
dd_navigationBarTitleTextAttributes = [.foregroundColor : UIColor.white(alpha: 0.7),.font:UIFont.mediumFont(17)]
dd_navigationBarBarButtonItemAttributes = [.foregroundColor : UIColor.white]
addSubviews()
addActions()
}
@@ -948,7 +956,7 @@ class RescuePendingDispatchController : DDViewController {
}
// MARK:
class RescueIsIngController : DDViewController {
class RescueIsIngController : ZDViewController {
private let disposeBag = DisposeBag()
public let pendingIsIngView = RescueIsIngView()
private var resultArr : [OrderListDataModel] = []
@@ -960,6 +968,7 @@ class RescueIsIngController : DDViewController {
super.viewDidLoad()
dd_navigationBarBackgroundColor = .hex("354683")
dd_navigationBarTitleTextAttributes = [.foregroundColor : UIColor.white(alpha: 0.7),.font:UIFont.mediumFont(17)]
dd_navigationBarBarButtonItemAttributes = [.foregroundColor : UIColor.white]
addSubviews()
addActions()
}