|
@@ -41,7 +41,7 @@ class StatisticsPageViewModel: NSObject {
|
|
self.stuCountDataModel = stuCountDataModel
|
|
self.stuCountDataModel = stuCountDataModel
|
|
// self.itemsSubject.onNext(stuCountDataModel.rows)//消息rx
|
|
// self.itemsSubject.onNext(stuCountDataModel.rows)//消息rx
|
|
self.vc!.hideLoadAnimation()
|
|
self.vc!.hideLoadAnimation()
|
|
- self.vc!.tableView.reloadData()
|
|
|
|
|
|
+ self.vc!.reloadDataWithPreserveScrollPosition()
|
|
self.vc!.stopRefresh()
|
|
self.vc!.stopRefresh()
|
|
NYTips.hide()
|
|
NYTips.hide()
|
|
}, onError: { error in
|
|
}, onError: { error in
|
|
@@ -63,8 +63,8 @@ class StatisticsPageViewModel: NSObject {
|
|
case .day:
|
|
case .day:
|
|
// 发起请求,获取日数据
|
|
// 发起请求,获取日数据
|
|
self.statisticsService.everyDayStuCountRequest(city: LocalManager.userInfo.city!, schoolId: LocalManager.userInfo.schoolId, startDate: self.startDate, endDate: self.endDate, fieldType: self.fieldType,sortType: self.sortType).subscribe(onSuccess: { stuCountDataModel in
|
|
self.statisticsService.everyDayStuCountRequest(city: LocalManager.userInfo.city!, schoolId: LocalManager.userInfo.schoolId, startDate: self.startDate, endDate: self.endDate, fieldType: self.fieldType,sortType: self.sortType).subscribe(onSuccess: { stuCountDataModel in
|
|
- self.stuCountDataModel = stuCountDataModel
|
|
|
|
- self.vc!.tableView.reloadData()
|
|
|
|
|
|
+ self.stuCountDataModel = stuCountDataModel
|
|
|
|
+ self.vc!.reloadDataWithPreserveScrollPosition()
|
|
}, onError: { error in
|
|
}, onError: { error in
|
|
})
|
|
})
|
|
.disposed(by: self.vc!.disposeBag)
|
|
.disposed(by: self.vc!.disposeBag)
|
|
@@ -73,8 +73,8 @@ class StatisticsPageViewModel: NSObject {
|
|
let startMonth = String(self.startDate.prefix(7))
|
|
let startMonth = String(self.startDate.prefix(7))
|
|
let endMonth = String(self.endDate.prefix(7))
|
|
let endMonth = String(self.endDate.prefix(7))
|
|
self.statisticsService.everyMonthStuCount(city: LocalManager.userInfo.city!, schoolId: LocalManager.userInfo.schoolId, startMonth: startMonth, endMonth: endMonth, fieldType: self.fieldType,sortType: self.sortType).subscribe(onSuccess: { stuCountDataModel in
|
|
self.statisticsService.everyMonthStuCount(city: LocalManager.userInfo.city!, schoolId: LocalManager.userInfo.schoolId, startMonth: startMonth, endMonth: endMonth, fieldType: self.fieldType,sortType: self.sortType).subscribe(onSuccess: { stuCountDataModel in
|
|
- self.stuCountDataModel = stuCountDataModel
|
|
|
|
- self.vc!.tableView.reloadData()
|
|
|
|
|
|
+ self.stuCountDataModel = stuCountDataModel
|
|
|
|
+ self.vc!.reloadDataWithPreserveScrollPosition()
|
|
}, onError: { error in
|
|
}, onError: { error in
|
|
})
|
|
})
|
|
.disposed(by: self.vc!.disposeBag)
|
|
.disposed(by: self.vc!.disposeBag)
|
|
@@ -83,8 +83,8 @@ class StatisticsPageViewModel: NSObject {
|
|
let startYear = String(self.startDate.prefix(4))
|
|
let startYear = String(self.startDate.prefix(4))
|
|
let endYear = String(self.endDate.prefix(4))
|
|
let endYear = String(self.endDate.prefix(4))
|
|
self.statisticsService.everyYearStuCount(city: LocalManager.userInfo.city!, schoolId: LocalManager.userInfo.schoolId, startYear: startYear, endYear: endYear, fieldType: self.fieldType,sortType: self.sortType).subscribe(onSuccess: { stuCountDataModel in
|
|
self.statisticsService.everyYearStuCount(city: LocalManager.userInfo.city!, schoolId: LocalManager.userInfo.schoolId, startYear: startYear, endYear: endYear, fieldType: self.fieldType,sortType: self.sortType).subscribe(onSuccess: { stuCountDataModel in
|
|
- self.stuCountDataModel = stuCountDataModel
|
|
|
|
- self.vc!.tableView.reloadData()
|
|
|
|
|
|
+ self.stuCountDataModel = stuCountDataModel
|
|
|
|
+ self.vc!.reloadDataWithPreserveScrollPosition()
|
|
}, onError: { error in
|
|
}, onError: { error in
|
|
})
|
|
})
|
|
.disposed(by: self.vc!.disposeBag)
|
|
.disposed(by: self.vc!.disposeBag)
|