Commit 071b62d5 authored by David黄金龙's avatar David黄金龙

工作经验预览

parent 197e1a2a
......@@ -281,6 +281,37 @@ private extension YHPreviewViewModel {
let dataModel1 = YHWorkExpDataModel(title: "", data: arr1)
//总体输出的 数组arr
var arrO : [YHWorkExpDataModel] = [dataModel1]
//
if !model.position_list.isEmpty {
for (index,item) in model.position_list.enumerated() {
var arr2 : [YHPreviewQuestionAndAnswerModel] = []
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "职位名称:", answer:item.position_name.defaultStringIfEmpty())
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "职责性质:", answer:item.wduty.defaultStringIfEmpty())
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "开始就职年月:", answer:item.entry_time.defaultStringIfEmpty())
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "结束就职年月:", answer:item.departure_time.defaultStringIfEmpty())
let ttt = item.experience_scope + "、" + item.experience_sub_scope
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "经验领域:", answer:ttt)
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "相关工作是否属国际工作经验:", answer:item.is_international_work_experience ? "是" : "否")
let place = item.work_country + "-" + item.work_city
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "工作地点:", answer:place)
arr2.append(contentsOf: [tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7])
let posionName = "职位信息" + String(index + 1)
let dataModel1 = YHWorkExpDataModel(title: posionName, data: arr2)
arrO.append(dataModel1)
}
}
var arr2 : [YHPreviewQuestionAndAnswerModel] = []
do {
//2.
......@@ -390,7 +421,7 @@ private extension YHPreviewViewModel {
arr1.append(contentsOf: [tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8,tmp9,tmp10,tmp11,tmp12,tmp13,tmp14,tmp15,tmp16])
}
let dataModel1 = YHWorkExpDataModel(title: "", data: arr1)
let dataModel1 = YHWorkExpDataModel(title: "davidhuangTest1", data: arr1)
var arr2 : [YHPreviewQuestionAndAnswerModel] = []
do {
......@@ -401,7 +432,7 @@ private extension YHPreviewViewModel {
arr2.append(contentsOf: [tmp1,tmp2,tmp3])
}
let dataModel2 = YHWorkExpDataModel(title: "", data: arr2)
let dataModel2 = YHWorkExpDataModel(title: "davidhuangTest2", data: arr2)
var arr3 : [Any] = []
do {
......
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