You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.6 KiB
37 lines
1.6 KiB
![]()
2 years ago
|
//
|
||
![]()
2 years ago
|
// HeartRateCheckViewModels.swift
|
||
![]()
1 year ago
|
// FireBoltt
|
||
![]()
2 years ago
|
//
|
||
|
// Created by lemo on 2018/6/5.
|
||
|
// Copyright © 2020年 ecell. All rights reserved.
|
||
|
//
|
||
|
|
||
|
import UIKit
|
||
|
|
||
![]()
2 years ago
|
class HeartRateCheckViewModels: ViewModel {
|
||
![]()
2 years ago
|
|
||
![]()
1 year ago
|
var fbdataVariable = BehaviorRelay<[MultipleSectionModel]>(value: [])
|
||
|
var fbdataSource: [MultipleSectionModel] = []
|
||
![]()
2 years ago
|
var heartRateCheckModel: HeartRateCheckModel = HeartRateCheckModel()
|
||
|
|
||
|
override init() {
|
||
|
super.init()
|
||
|
if let heartRateModel = GlobalDeviceProfileModel.shareInstance.heartRateModel?.copy() as? HeartRateCheckModel {
|
||
|
heartRateCheckModel = heartRateModel
|
||
|
}
|
||
![]()
1 year ago
|
fbloadData(model: heartRateCheckModel)
|
||
![]()
2 years ago
|
}
|
||
|
|
||
![]()
1 year ago
|
func fbloadData(model: HeartRateCheckModel) {
|
||
|
let cellModel = TableViewCellModel(title: MultiLanguageKey_FB.smartSwitchFB.localized, isSwitch: true, description: nil, isArrows: false, isOn: model.IsOpen, image: nil, isBottomLine: false)
|
||
![]()
2 years ago
|
let mod1 = MultipleSectionModel.SettingSection(title: "", items: [.TableViewCellModel(cellModel: cellModel)])
|
||
![]()
1 year ago
|
let mod2 = MultipleSectionModel.DoubleTimePickerSection(title: "", items: [SectionItem.DoubleTimePicker(leftTitle: MultiLanguageKey_FB.startTimeFB.localized, rightTitle: MultiLanguageKey_FB.endTimeFB.localized, selectedItems: [model.StartTime, model.EndTime])])
|
||
|
let mod3 = MultipleSectionModel.SinglePickerSection(title: "", items: [SectionItem.SinglePicker(title: MultiLanguageKey_FB.frequencyFB.localized, selectedItem: model.Interval)])
|
||
|
fbdataSource.append(mod1)
|
||
|
fbdataSource.append(mod2)
|
||
|
fbdataSource.append(mod3)
|
||
|
fbdataVariable.accept(fbdataSource)
|
||
![]()
2 years ago
|
}
|
||
|
|
||
|
}
|