Commit 6d256090 authored by David黄金龙's avatar David黄金龙

展示 字段

parent e4446e21
......@@ -109,7 +109,9 @@ extension YHOtherInfoFillCell {
lastTargetView = residenceView
} else {
let sessionView = YHOtherInfoSessionView(frame: .zero)
let title = "居住信息" + String(index + 1)
let addationIndex = dataModel.residences.count > 1 ? String(index + 1) : ""
let title = "居住信息" + addationIndex
sessionView.updateTitle(title: title)
sessionView.type = 1
sessionView.tag = index
......
......@@ -9,32 +9,6 @@
import UIKit
import AttributedString
enum YHOtherPickerViewType: Int {
// 按自然顺序递增
case none = 0
// 语言能力
case language
// 专业技能行业
case professionalSkill
// 用人单位性质
case nature
// 工作证明文件
case certificate
// 行政架构层级
case structure
// 职位水平类别
case level
// 高管证明文件
case prove
// 证件类别
case idType
// 性别
case sex
// 婚姻状况
case marry
}
struct YHOtherPickerViewItemData {
let title : String
let subTitle : String
......
......@@ -8,6 +8,32 @@
import UIKit
enum YHOtherPickerViewType: Int {
// 按自然顺序递增
case none = 0
// 语言能力
case language
// 专业技能行业
case professionalSkill
// 用人单位性质
case nature
// 工作证明文件
case certificate
// 行政架构层级
case structure
// 职位水平类别
case level
// 高管证明文件
case prove
// 证件类别
case idType
// 性别
case sex
// 婚姻状况
case marry
}
class YHConstantArrayData {
static let arrLanguage : [[String : String]] = [
[
......@@ -287,16 +313,14 @@ class YHConstantArrayData {
"id": "10"
]
]
static func getIdTypeBy(index : Int) -> String {
for item in YHConstantArrayData.arrIdType {
if let target = item["id"],index == Int(target) {
return item["title"] ?? "未知"
}
}
return "未知"
}
// static func getIdTypeBy(index : Int) -> String {
// for item in YHConstantArrayData.arrIdType {
// if let target = item["id"],index == Int(target) {
// return item["title"] ?? "未知"
// }
// }
// return "未知"
// }
static let arrSex : [[String : String]] = [
["title": "男",
"id": "1"
......@@ -305,14 +329,7 @@ class YHConstantArrayData {
"id": "2"
]
]
static func getSexNameBy(index : Int) -> String {
for item in YHConstantArrayData.arrSex {
if let target = item["id"],index == Int(target) {
return item["title"] ?? "未知"
}
}
return "未知"
}
static let arrMarry : [[String : String]] = [
["title": "已婚",
......@@ -332,9 +349,29 @@ class YHConstantArrayData {
]
]
static func getMarryNameBy(index : Int) -> String {
for item in YHConstantArrayData.arrMarry {
if let target = item["id"],index == Int(target) {
//通过 id 获取 title
static func getShowNameBy(indexStr:String,type : YHOtherPickerViewType) -> String {
if indexStr.isEmpty {
return "未知"
}
var arrData : [[String : String]] = [[:]]
switch type {
case .marry:
arrData = YHConstantArrayData.arrMarry
case .sex:
arrData = YHConstantArrayData.arrSex
case .idType:
arrData = YHConstantArrayData.arrIdType
case .structure:
arrData = YHConstantArrayData.arrStructure
case .level:
arrData = YHConstantArrayData.arrLevel
default:
arrData = [[:]]
}
for item in arrData {
if let target = item["id"],indexStr == target {
return item["title"] ?? "未知"
}
}
......
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