Commit 491570a4 authored by David黄金龙's avatar David黄金龙

处理 基本资料 UI 展示不对的问题

parent 39f0dcb5
......@@ -241,6 +241,7 @@ private extension YHBasicInfoFillView {
bottomLine.snp.removeConstraints()
if model?.type == 0 {
additionHoldView.snp.removeConstraints()
additionHoldView.snp.remakeConstraints { make in
make.top.equalTo(answer1Btn.snp.bottom).offset(12)
make.left.right.equalToSuperview()
......@@ -258,10 +259,10 @@ private extension YHBasicInfoFillView {
} else {
mutilChoiceHoldView.snp.removeConstraints()
mutilChoiceHoldView.snp.remakeConstraints { make in
make.top.equalTo(answer1Btn.snp.bottom).offset(12)
make.left.right.equalToSuperview()
// make.height.equalTo(78)
make.bottom.equalToSuperview().offset(-18)
}
......@@ -300,26 +301,6 @@ private extension YHBasicInfoFillView {
additionHoldView.isHidden = true
mutilChoiceHoldView.isHidden = false
// title = model.question
// if model.answer == "Y" {
// didClickResponseBtn(btn: answer2Btn)
// myTextView.text = model.info.count > 0 ? model.info : kTipsString
// } else {
// if model.answer == "N" {
// didClickResponseBtn(btn: answer1Btn)
// }
// }
//
// mutilChoiceHoldView.snp.removeConstraints()
// mutilChoiceHoldView.snp.remakeConstraints { make in
// make.top.equalTo(answer1Btn.snp.bottom).offset(12)
// make.left.right.equalToSuperview()
//// make.height.equalTo(78)
// make.bottom.equalToSuperview().offset(-18)
// }
let lable = UILabel()
let str = "* 选择成员:"
let attributes: [NSAttributedString.Key: Any] = [
......@@ -339,7 +320,10 @@ private extension YHBasicInfoFillView {
}
guard let subModel = model.model else { return }
guard let subModel = model.model else {
printLog("errorr: 数据有问题")
return
}
var targetView : UIView = lable
......@@ -386,21 +370,38 @@ private extension YHBasicInfoFillView {
}
}
targetView = btn
arrCheckBtns.append(btn)
}
title = model.question
if model.answer == "Y" {
didClickResponseBtn(btn: answer2Btn)
myTextView.text = model.info.count > 0 ? model.info : kTipsString
mutilChoiceHoldView.isHidden = false
} else {
if model.answer == "N" {
didClickResponseBtn(btn: answer1Btn)
}
}
} else {
answer2Btn.isSelected = false
updateAnswerButton(answer2Btn, false)
additionHoldView.snp.removeConstraints()
mutilChoiceHoldView.snp.removeConstraints()
targetView = btn
arrCheckBtns.append(btn)
bottomLine.snp.remakeConstraints { make in
make.top.equalTo(answer1Btn.snp.bottom).offset(12)
make.left.right.equalToSuperview()
make.height.equalTo(0.5)
make.bottom.equalToSuperview()
}
additionHoldView.isHidden = true
bottomLine.isHidden = false
mutilChoiceHoldView.isHidden = true
// model?.answer = "N"
}
}
} else {
additionHoldView.isHidden = false
......
......@@ -108,9 +108,9 @@ extension YHOtherInfoFillViewController {
otherInfoVM.saveOtherInfo(params: param) { success, error in
if success == true {
YHHUD.flash(message: "保存成功")
YHHUD.flash(message: "操作成功")
} else {
let msg = error?.errorMsg ?? "保存失败"
let msg = error?.errorMsg ?? "操作失败"
YHHUD.flash(message: msg)
}
}
......
......@@ -128,6 +128,10 @@ class YHOtherPickerView: UIView {
self.createUI()
self.type = type
initDataSource()
if arrData.count > 0 {
userSelectedItem = arrData[0]
}
}
required init?(coder: NSCoder) {
......
......@@ -16,13 +16,18 @@
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="launch_screen_image" highlightedImage="launch_screen_image" translatesAutoresizingMaskIntoConstraints="NO" id="sFt-Ce-yYm">
<rect key="frame" x="-18" y="-37" width="428" height="926"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" insetsLayoutMarginsFromSafeArea="NO" image="launch_screen_image" highlightedImage="launch_screen_image" translatesAutoresizingMaskIntoConstraints="NO" id="sFt-Ce-yYm">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="586-1X-Ryv"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="sFt-Ce-yYm" secondAttribute="trailing" id="0yN-WE-6Kj"/>
<constraint firstItem="sFt-Ce-yYm" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="8xj-jA-15j"/>
<constraint firstItem="sFt-Ce-yYm" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="aPd-Z9-bKu"/>
<constraint firstAttribute="bottom" secondItem="sFt-Ce-yYm" secondAttribute="bottom" id="bFA-o7-CPz"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment