Commit 7db2744b9d4fe16609fe7a782981fd90fb618363
1 parent
1eb764bb
工作记录列表页-编辑几次-职业和岗位 为空了(编辑-删除图片 保存 行业和岗位都"") fir he threecell 都是nil
Showing
10 changed files
with
324 additions
and
81 deletions
metaCode.xcodeproj/project.pbxproj
| @@ -2632,7 +2632,7 @@ | @@ -2632,7 +2632,7 @@ | ||
| 2632 | CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; | 2632 | CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; |
| 2633 | CODE_SIGN_IDENTITY = "Apple Development"; | 2633 | CODE_SIGN_IDENTITY = "Apple Development"; |
| 2634 | CODE_SIGN_STYLE = Automatic; | 2634 | CODE_SIGN_STYLE = Automatic; |
| 2635 | - CURRENT_PROJECT_VERSION = 1.1.2.24.08.26.13; | 2635 | + CURRENT_PROJECT_VERSION = 1.1.2.24.08.28.17; |
| 2636 | DEBUG_INFORMATION_FORMAT = dwarf; | 2636 | DEBUG_INFORMATION_FORMAT = dwarf; |
| 2637 | DEVELOPMENT_TEAM = 94X49GG3ZW; | 2637 | DEVELOPMENT_TEAM = 94X49GG3ZW; |
| 2638 | ENABLE_BITCODE = NO; | 2638 | ENABLE_BITCODE = NO; |
| @@ -2888,7 +2888,7 @@ | @@ -2888,7 +2888,7 @@ | ||
| 2888 | CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; | 2888 | CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; |
| 2889 | CODE_SIGN_IDENTITY = "Apple Development"; | 2889 | CODE_SIGN_IDENTITY = "Apple Development"; |
| 2890 | CODE_SIGN_STYLE = Automatic; | 2890 | CODE_SIGN_STYLE = Automatic; |
| 2891 | - CURRENT_PROJECT_VERSION = 1.1.2.24.08.26.13; | 2891 | + CURRENT_PROJECT_VERSION = 1.1.2.24.08.28.17; |
| 2892 | DEVELOPMENT_TEAM = 94X49GG3ZW; | 2892 | DEVELOPMENT_TEAM = 94X49GG3ZW; |
| 2893 | ENABLE_BITCODE = NO; | 2893 | ENABLE_BITCODE = NO; |
| 2894 | ENABLE_MODULE_VERIFIER = NO; | 2894 | ENABLE_MODULE_VERIFIER = NO; |
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/工作相关页面/CNLiveVitaeAddWorkController.swift
| @@ -21,7 +21,24 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc | @@ -21,7 +21,24 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc | ||
| 21 | var workAwardType:CNLiveViateWorkAwardType = .work | 21 | var workAwardType:CNLiveViateWorkAwardType = .work |
| 22 | 22 | ||
| 23 | var hangHeight:CGFloat = (KSreenWidth-90)/3.0+10 | 23 | var hangHeight:CGFloat = (KSreenWidth-90)/3.0+10 |
| 24 | + | ||
| 25 | + var firZhiyeStr = "" | ||
| 26 | + var firGangweiStr = "" | ||
| 27 | + var firStartStr = "" | ||
| 28 | + var firEndStr = "" | ||
| 29 | + | ||
| 30 | + var firAwardName = "" | ||
| 31 | + var firAwardStart = "" | ||
| 32 | + var firAwardCompany = "" | ||
| 33 | + | ||
| 34 | + var threeCompanyStr = "" | ||
| 35 | + var threeWorkDiDianStr = "" | ||
| 36 | + | ||
| 37 | + var firCell:CNLiveVitaeAddWorkFirCell? | ||
| 38 | + var threeCell:CNLiveVitaeAddWorkThreeCell? | ||
| 24 | var secCell:CNLiveVitaeAddWorkSecCell? | 39 | var secCell:CNLiveVitaeAddWorkSecCell? |
| 40 | + | ||
| 41 | + | ||
| 25 | var seleArr:Array<String>? | 42 | var seleArr:Array<String>? |
| 26 | var seleVideoUrl:String = "" | 43 | var seleVideoUrl:String = "" |
| 27 | 44 | ||
| @@ -157,11 +174,42 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc | @@ -157,11 +174,42 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc | ||
| 157 | } | 174 | } |
| 158 | if self.workAwardType == .work{ | 175 | if self.workAwardType == .work{ |
| 159 | cell.workAwardType = .work | 176 | cell.workAwardType = .work |
| 177 | + cell.updateAddWorkFirCellBlock = {firCell,zhiyeStr,gangwei,start,end in | ||
| 178 | + if zhiyeStr.count > 0{ | ||
| 179 | + self.firZhiyeStr = zhiyeStr | ||
| 180 | + } | ||
| 181 | + if gangwei.count > 0{ | ||
| 182 | + self.firGangweiStr = gangwei | ||
| 183 | + } | ||
| 184 | + if start.count > 0{ | ||
| 185 | + self.firStartStr = start | ||
| 186 | + } | ||
| 187 | + if end.count > 0{ | ||
| 188 | + self.firEndStr = end | ||
| 189 | + } | ||
| 190 | + if firCell != nil{ | ||
| 191 | + self.firCell = firCell | ||
| 192 | + } | ||
| 193 | + } | ||
| 160 | if self.workModel != nil{ | 194 | if self.workModel != nil{ |
| 161 | cell.workModel = self.workModel! | 195 | cell.workModel = self.workModel! |
| 162 | } | 196 | } |
| 163 | }else{ | 197 | }else{ |
| 164 | cell.workAwardType = .award | 198 | cell.workAwardType = .award |
| 199 | + cell.updateAddAwardFirCellBlock = {firCell,awardName,start,company in | ||
| 200 | + if awardName.count > 0{ | ||
| 201 | + self.firAwardName = awardName | ||
| 202 | + } | ||
| 203 | + if start.count > 0{ | ||
| 204 | + self.firAwardStart = start | ||
| 205 | + } | ||
| 206 | + if company.count > 0{ | ||
| 207 | + self.firAwardCompany = company | ||
| 208 | + } | ||
| 209 | + if firCell != nil{ | ||
| 210 | + self.firCell = firCell | ||
| 211 | + } | ||
| 212 | + } | ||
| 165 | if self.awardModel != nil{ | 213 | if self.awardModel != nil{ |
| 166 | cell.awardModel = self.awardModel! | 214 | cell.awardModel = self.awardModel! |
| 167 | } | 215 | } |
| @@ -213,6 +261,17 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc | @@ -213,6 +261,17 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc | ||
| 213 | let cell = CNLiveVitaeAddWorkThreeCell() | 261 | let cell = CNLiveVitaeAddWorkThreeCell() |
| 214 | return cell | 262 | return cell |
| 215 | } | 263 | } |
| 264 | + cell.updateAddWorkThreeCellBlock = {threeCell,company,workDiDian in | ||
| 265 | + if company.count > 0{ | ||
| 266 | + self.threeCompanyStr = company | ||
| 267 | + } | ||
| 268 | + if workDiDian.count > 0{ | ||
| 269 | + self.threeWorkDiDianStr = workDiDian | ||
| 270 | + } | ||
| 271 | + if threeCell != nil{ | ||
| 272 | + self.threeCell = threeCell | ||
| 273 | + } | ||
| 274 | + } | ||
| 216 | if self.workModel != nil{ | 275 | if self.workModel != nil{ |
| 217 | cell.workModel = self.workModel! | 276 | cell.workModel = self.workModel! |
| 218 | } | 277 | } |
| @@ -283,21 +342,26 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc | @@ -283,21 +342,26 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc | ||
| 283 | let threeCell = self.tableView.cellForRow(at: IndexPath(row: 2, section: 0)) as? CNLiveVitaeAddWorkThreeCell | 342 | let threeCell = self.tableView.cellForRow(at: IndexPath(row: 2, section: 0)) as? CNLiveVitaeAddWorkThreeCell |
| 284 | 343 | ||
| 285 | //判断非空 | 344 | //判断非空 |
| 286 | - if firCell?.weizhiRightTitleLabel.text?.count == 0 || firCell?.weizhiRightTitleLabel.text == "请选择"{ | ||
| 287 | - showMessage(message: "请选择职业") | ||
| 288 | - return | ||
| 289 | - } | ||
| 290 | - if firCell?.phoneTextFiled.text?.count == 0 || firCell?.phoneTextFiled.text == "请填写"{ | ||
| 291 | - showMessage(message: "请填写岗位名称") | ||
| 292 | - return | ||
| 293 | - } | ||
| 294 | - if firCell?.canjiaRightTitleLabel.text?.count == 0 || firCell?.canjiaRightTitleLabel.text == "请选择"{ | ||
| 295 | - showMessage(message: "请选择开始时间") | ||
| 296 | - return | ||
| 297 | - } | ||
| 298 | - if firCell?.endTimeRightTitleLabel.text?.count == 0 || firCell?.endTimeRightTitleLabel.text == "请选择"{ | ||
| 299 | - showMessage(message: "请选择结束时间") | ||
| 300 | - return | 345 | + if firCell != nil{ |
| 346 | + if firCell?.weizhiRightTitleLabel.text?.count == 0 || firCell?.weizhiRightTitleLabel.text == "请选择"{ | ||
| 347 | + showMessage(message: "请选择职业") | ||
| 348 | + return | ||
| 349 | + } | ||
| 350 | + if firCell?.phoneTextFiled.text?.count == 0 || firCell?.phoneTextFiled.text == "请填写"{ | ||
| 351 | + showMessage(message: "请填写岗位名称") | ||
| 352 | + return | ||
| 353 | + } | ||
| 354 | + if firCell?.canjiaRightTitleLabel.text?.count == 0 || firCell?.canjiaRightTitleLabel.text == "请选择"{ | ||
| 355 | + showMessage(message: "请选择开始时间") | ||
| 356 | + return | ||
| 357 | + } | ||
| 358 | + if firCell?.endTimeRightTitleLabel.text?.count == 0 || firCell?.endTimeRightTitleLabel.text == "请选择"{ | ||
| 359 | + showMessage(message: "请选择结束时间") | ||
| 360 | + return | ||
| 361 | + } | ||
| 362 | + }else{ | ||
| 363 | + //fircell nil | ||
| 364 | + | ||
| 301 | } | 365 | } |
| 302 | if secCell?.huoJiangtextView.text?.count == 0 || secCell?.huoJiangtextView.text == "描述"{ | 366 | if secCell?.huoJiangtextView.text?.count == 0 || secCell?.huoJiangtextView.text == "描述"{ |
| 303 | showMessage(message: "请填写经历描述") | 367 | showMessage(message: "请填写经历描述") |
| @@ -325,22 +389,66 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc | @@ -325,22 +389,66 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc | ||
| 325 | 389 | ||
| 326 | } | 390 | } |
| 327 | } | 391 | } |
| 328 | - var danWei = "" | ||
| 329 | - if threeCell?.phoneTextFiled.text?.count ?? 0 <= 0{ | ||
| 330 | - | ||
| 331 | - }else if threeCell?.phoneTextFiled.text == "请填写"{ | ||
| 332 | - | 392 | + var company = "" |
| 393 | + if threeCell != nil{ | ||
| 394 | + if threeCell?.phoneTextFiled.text?.count ?? 0 <= 0{ | ||
| 395 | + | ||
| 396 | + }else if threeCell?.phoneTextFiled.text == "请填写"{ | ||
| 397 | + | ||
| 398 | + }else{ | ||
| 399 | + company = threeCell?.phoneTextFiled.text ?? "" | ||
| 400 | + } | ||
| 333 | }else{ | 401 | }else{ |
| 334 | - danWei = threeCell?.phoneTextFiled.text ?? "" | 402 | + company = self.threeCompanyStr |
| 335 | } | 403 | } |
| 404 | + | ||
| 336 | var workDiDian = "" | 405 | var workDiDian = "" |
| 337 | - if threeCell?.weizhiRightTitleLabel.text?.count ?? 0 <= 0{ | ||
| 338 | - | ||
| 339 | - }else if threeCell?.weizhiRightTitleLabel.text == "请选择"{ | ||
| 340 | - | 406 | + if threeCell != nil{ |
| 407 | + if threeCell?.weizhiRightTitleLabel.text?.count ?? 0 <= 0{ | ||
| 408 | + | ||
| 409 | + }else if threeCell?.weizhiRightTitleLabel.text == "请选择"{ | ||
| 410 | + | ||
| 411 | + }else{ | ||
| 412 | + workDiDian = threeCell?.weizhiRightTitleLabel.text ?? "" | ||
| 413 | + } | ||
| 414 | + }else{ | ||
| 415 | + workDiDian = self.threeWorkDiDianStr | ||
| 416 | + } | ||
| 417 | + | ||
| 418 | + var gangWei = "" | ||
| 419 | + if firCell != nil{ | ||
| 420 | + if firCell?.phoneTextFiled.text?.count ?? 0 <= 0{ | ||
| 421 | + | ||
| 422 | + }else if firCell?.phoneTextFiled.text == "请填写"{ | ||
| 423 | + | ||
| 424 | + }else{ | ||
| 425 | + gangWei = firCell?.phoneTextFiled.text ?? "" | ||
| 426 | + } | ||
| 427 | + }else{ | ||
| 428 | + gangWei = self.firGangweiStr | ||
| 429 | + } | ||
| 430 | + if gangWei == "" || gangWei.count == 0{ | ||
| 431 | + showMessage(message: "请填写岗位") | ||
| 432 | + return | ||
| 433 | + } | ||
| 434 | + | ||
| 435 | + var zhiye = "" | ||
| 436 | + if firCell != nil{ | ||
| 437 | + if firCell?.weizhiRightTitleLabel.text?.count ?? 0 <= 0{ | ||
| 438 | + | ||
| 439 | + }else if firCell?.weizhiRightTitleLabel.text == "请选择"{ | ||
| 440 | + | ||
| 441 | + }else{ | ||
| 442 | + zhiye = firCell?.weizhiRightTitleLabel.text ?? "" | ||
| 443 | + } | ||
| 341 | }else{ | 444 | }else{ |
| 342 | - workDiDian = threeCell?.weizhiRightTitleLabel.text ?? "" | 445 | + zhiye = self.firZhiyeStr |
| 343 | } | 446 | } |
| 447 | + if zhiye == "" || zhiye.count == 0{ | ||
| 448 | + showMessage(message: "请选择职业") | ||
| 449 | + return | ||
| 450 | + } | ||
| 451 | + | ||
| 344 | var desc = "" | 452 | var desc = "" |
| 345 | if secCell?.huoJiangtextView.text?.count ?? 0 <= 0{ | 453 | if secCell?.huoJiangtextView.text?.count ?? 0 <= 0{ |
| 346 | 454 | ||
| @@ -360,7 +468,7 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc | @@ -360,7 +468,7 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc | ||
| 360 | id = self.workModel!.id | 468 | id = self.workModel!.id |
| 361 | } | 469 | } |
| 362 | 470 | ||
| 363 | - CNLiveVitaeViewModel.saveWork(city: workDiDian, companyName: danWei, imgs: newString, jobDuties: desc, startWorkingDate:startTime ?? "" , endWorkingDate: endTime ?? "" , position: firCell?.phoneTextFiled.text ?? "", profession: firCell?.weizhiRightTitleLabel.text ?? "", vsid: vsid ?? "", vitaeId: jianli_vitaeId ?? "", id: id) { result, status in | 471 | + CNLiveVitaeViewModel.saveWork(city: workDiDian, companyName: company, imgs: newString, jobDuties: desc, startWorkingDate:startTime ?? "" , endWorkingDate: endTime ?? "" , position: gangWei, profession: zhiye, vsid: vsid ?? "", vitaeId: jianli_vitaeId ?? "", id: id) { result, status in |
| 364 | if status == .success{ | 472 | if status == .success{ |
| 365 | self.navigationController?.popViewController(animated: true) | 473 | self.navigationController?.popViewController(animated: true) |
| 366 | // self.navigationController?.viewControllers.forEach({ item in | 474 | // self.navigationController?.viewControllers.forEach({ item in |
| @@ -373,20 +481,27 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc | @@ -373,20 +481,27 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc | ||
| 373 | } | 481 | } |
| 374 | }else{ | 482 | }else{ |
| 375 | //获奖 | 483 | //获奖 |
| 376 | - let firCell = self.tableView.cellForRow(at: IndexPath(row: 0, section: 0)) as? CNLiveVitaeAddWorkFirCell | ||
| 377 | - let secCell = self.tableView.cellForRow(at: IndexPath(row: 1, section: 0)) as? CNLiveVitaeAddWorkSecCell | ||
| 378 | - //判断非空 | ||
| 379 | - if firCell?.phoneTextFiled.text?.count == 0 || firCell?.phoneTextFiled.text == "请填写"{ | ||
| 380 | - showMessage(message: "请填写获奖名称") | ||
| 381 | - return | ||
| 382 | - } | ||
| 383 | - if firCell?.canjiaRightTitleLabel.text?.count == 0 || firCell?.canjiaRightTitleLabel.text == "请选择"{ | ||
| 384 | - showMessage(message: "请选择开始时间") | ||
| 385 | - return | 484 | + if let firCell = self.tableView.cellForRow(at: IndexPath(row: 0, section: 0)) as? CNLiveVitaeAddWorkFirCell{ |
| 485 | + //判断非空 | ||
| 486 | + if firCell.phoneTextFiled.text?.count == 0 || firCell.phoneTextFiled.text == "请填写"{ | ||
| 487 | + showMessage(message: "请填写获奖名称") | ||
| 488 | + return | ||
| 489 | + } | ||
| 490 | + if firCell.canjiaRightTitleLabel.text?.count == 0 || firCell.canjiaRightTitleLabel.text == "请选择"{ | ||
| 491 | + showMessage(message: "请选择开始时间") | ||
| 492 | + return | ||
| 493 | + } | ||
| 494 | + | ||
| 495 | + }else{//firCell nil | ||
| 496 | + | ||
| 386 | } | 497 | } |
| 387 | - if secCell?.huoJiangtextView.text?.count == 0 || secCell?.huoJiangtextView.text == "描述"{ | ||
| 388 | - showMessage(message: "请填写描述") | ||
| 389 | - return | 498 | + if let secCell = self.tableView.cellForRow(at: IndexPath(row: 1, section: 0)) as? CNLiveVitaeAddWorkSecCell{ |
| 499 | + if secCell.huoJiangtextView.text?.count == 0 || secCell.huoJiangtextView.text == "描述"{ | ||
| 500 | + showMessage(message: "请填写描述") | ||
| 501 | + return | ||
| 502 | + } | ||
| 503 | + }else{//secCell nil | ||
| 504 | + | ||
| 390 | } | 505 | } |
| 391 | 506 | ||
| 392 | var newString = "" | 507 | var newString = "" |
| @@ -410,24 +525,56 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc | @@ -410,24 +525,56 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc | ||
| 410 | 525 | ||
| 411 | } | 526 | } |
| 412 | } | 527 | } |
| 413 | - | 528 | + |
| 414 | if let userDic = UserDefaults.standard.dictionary(forKey: UserInfoManager.shared.userInfo.uid){ | 529 | if let userDic = UserDefaults.standard.dictionary(forKey: UserInfoManager.shared.userInfo.uid){ |
| 415 | let jianli_vitaeId = userDic["jianli_vitaeId"] as? String | 530 | let jianli_vitaeId = userDic["jianli_vitaeId"] as? String |
| 416 | let vsid = userDic["vsid"] as? String | 531 | let vsid = userDic["vsid"] as? String |
| 417 | - let startTime = self.convertDateStringToMillisecondsString(dateString: firCell?.canjiaRightTitleLabel.text ?? "") | 532 | + |
| 533 | + | ||
| 534 | + var awardName = "" | ||
| 535 | + if firCell != nil{ | ||
| 536 | + if firCell?.phoneTextFiled.text?.count ?? 0 <= 0{ | ||
| 537 | + | ||
| 538 | + }else if firCell?.phoneTextFiled.text == "请填写"{ | ||
| 539 | + | ||
| 540 | + }else{ | ||
| 541 | + awardName = firCell?.phoneTextFiled.text ?? "" | ||
| 542 | + if awardName.count == 0{ | ||
| 543 | + awardName = self.firAwardName | ||
| 544 | + } | ||
| 545 | + } | ||
| 546 | + }else{ | ||
| 547 | + awardName = self.firAwardName | ||
| 548 | + } | ||
| 549 | + | ||
| 550 | + | ||
| 551 | + var startTime = "" | ||
| 552 | + if firCell != nil{ | ||
| 553 | + startTime = self.convertDateStringToMillisecondsString(dateString: firCell?.canjiaRightTitleLabel.text ?? "") ?? "" | ||
| 554 | + if startTime.count == 0{ | ||
| 555 | + startTime = self.firAwardStart | ||
| 556 | + } | ||
| 557 | + }else{ | ||
| 558 | + startTime = self.firAwardStart | ||
| 559 | + } | ||
| 418 | //提交工作记录 | 560 | //提交工作记录 |
| 419 | var id = "" | 561 | var id = "" |
| 420 | if self.awardModel != nil{ | 562 | if self.awardModel != nil{ |
| 421 | id = self.awardModel!.id | 563 | id = self.awardModel!.id |
| 422 | } | 564 | } |
| 423 | var danWei = "" | 565 | var danWei = "" |
| 424 | - if firCell?.banfaTextFiled.text?.count ?? 0 <= 0{ | ||
| 425 | - | ||
| 426 | - }else if firCell?.banfaTextFiled.text == "请输入"{ | ||
| 427 | - | 566 | + if firCell != nil{ |
| 567 | + if firCell?.banfaTextFiled.text?.count ?? 0 <= 0{ | ||
| 568 | + | ||
| 569 | + }else if firCell?.banfaTextFiled.text == "请输入"{ | ||
| 570 | + | ||
| 571 | + }else{ | ||
| 572 | + danWei = firCell?.banfaTextFiled.text ?? "" | ||
| 573 | + } | ||
| 428 | }else{ | 574 | }else{ |
| 429 | - danWei = firCell?.banfaTextFiled.text ?? "" | 575 | + danWei = self.firAwardCompany |
| 430 | } | 576 | } |
| 577 | + | ||
| 431 | var desc = "" | 578 | var desc = "" |
| 432 | if secCell?.huoJiangtextView.text?.count ?? 0 <= 0{ | 579 | if secCell?.huoJiangtextView.text?.count ?? 0 <= 0{ |
| 433 | 580 | ||
| @@ -436,7 +583,7 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc | @@ -436,7 +583,7 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc | ||
| 436 | }else{ | 583 | }else{ |
| 437 | desc = secCell?.huoJiangtextView.text ?? "" | 584 | desc = secCell?.huoJiangtextView.text ?? "" |
| 438 | } | 585 | } |
| 439 | - CNLiveVitaeViewModel.saveAward(company: danWei, description: desc, time: startTime ?? "", title: firCell?.phoneTextFiled.text ?? "", imgs: newString, vsid: vsid ?? "", vitaeId: jianli_vitaeId ?? "", id: id) { result, status in | 586 | + CNLiveVitaeViewModel.saveAward(company: danWei, description: desc, time: startTime, title: awardName, imgs: newString, vsid: vsid ?? "", vitaeId: jianli_vitaeId ?? "", id: id) { result, status in |
| 440 | if status == .success{ | 587 | if status == .success{ |
| 441 | self.navigationController?.popViewController(animated: true) | 588 | self.navigationController?.popViewController(animated: true) |
| 442 | // self.navigationController?.viewControllers.forEach({ item in | 589 | // self.navigationController?.viewControllers.forEach({ item in |
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/工作相关页面/CNLiveVitaeWorkDetailController.swift
| @@ -157,11 +157,11 @@ class CNLiveVitaeWorkDetailController:CNLiveBaseViewController,UITableViewDataSo | @@ -157,11 +157,11 @@ class CNLiveVitaeWorkDetailController:CNLiveBaseViewController,UITableViewDataSo | ||
| 157 | for (idx,mdl) in res.enumerated() { | 157 | for (idx,mdl) in res.enumerated() { |
| 158 | if idx == idxPath?.row{ | 158 | if idx == idxPath?.row{ |
| 159 | if self.workAwardType == .work{ | 159 | if self.workAwardType == .work{ |
| 160 | - let layout = CNLiveViateWorkModelLayout(model: mdl as! CNLiveVitaeWorksModel,descH: Float(jianjieHeight),isPreview: false, isExpand: isExpand) | 160 | + let layout = CNLiveViateWorkModelLayout(model: mdl as! CNLiveVitaeWorksModel,descH: Float(jianjieHeight),isPreview: false, isExpand: isExpand, isShowExpand: true) |
| 161 | let newWorkModel = layout.getCellHModel() | 161 | let newWorkModel = layout.getCellHModel() |
| 162 | tempArr.append(newWorkModel) | 162 | tempArr.append(newWorkModel) |
| 163 | }else{ | 163 | }else{ |
| 164 | - let layout = CNLiveViateAwardModelLayout(model: mdl as! CNLiveVitaeAwardsModel,descH: Float(jianjieHeight), isPreview: false, isExpand: isExpand) | 164 | + let layout = CNLiveViateAwardModelLayout(model: mdl as! CNLiveVitaeAwardsModel,descH: Float(jianjieHeight), isPreview: false, isExpand: isExpand, isShowExpand: true) |
| 165 | let newWorkModel = layout.getCellHModel() | 165 | let newWorkModel = layout.getCellHModel() |
| 166 | tempArr.append(newWorkModel) | 166 | tempArr.append(newWorkModel) |
| 167 | } | 167 | } |
| @@ -217,7 +217,7 @@ class CNLiveVitaeWorkDetailController:CNLiveBaseViewController,UITableViewDataSo | @@ -217,7 +217,7 @@ class CNLiveVitaeWorkDetailController:CNLiveBaseViewController,UITableViewDataSo | ||
| 217 | if let res = result as? [CNLiveVitaeWorksModel]{ | 217 | if let res = result as? [CNLiveVitaeWorksModel]{ |
| 218 | self.workListArr = Array() | 218 | self.workListArr = Array() |
| 219 | for mdl in res { | 219 | for mdl in res { |
| 220 | - let layout = CNLiveViateWorkModelLayout(model: mdl,descH: 40.0,isPreview: false, isExpand: false) | 220 | + let layout = CNLiveViateWorkModelLayout(model: mdl,descH: 40.0,isPreview: false, isExpand: false, isShowExpand: true) |
| 221 | let newWorkModel = layout.getCellHModel() | 221 | let newWorkModel = layout.getCellHModel() |
| 222 | self.workListArr.append(newWorkModel) | 222 | self.workListArr.append(newWorkModel) |
| 223 | } | 223 | } |
| @@ -235,7 +235,7 @@ class CNLiveVitaeWorkDetailController:CNLiveBaseViewController,UITableViewDataSo | @@ -235,7 +235,7 @@ class CNLiveVitaeWorkDetailController:CNLiveBaseViewController,UITableViewDataSo | ||
| 235 | if let res = result as? [CNLiveVitaeAwardsModel]{ | 235 | if let res = result as? [CNLiveVitaeAwardsModel]{ |
| 236 | self.workListArr = Array() | 236 | self.workListArr = Array() |
| 237 | for mdl in res { | 237 | for mdl in res { |
| 238 | - let layout = CNLiveViateAwardModelLayout(model: mdl,descH: 40.0, isPreview: false, isExpand: false) | 238 | + let layout = CNLiveViateAwardModelLayout(model: mdl,descH: 40.0, isPreview: false, isExpand: false, isShowExpand: true) |
| 239 | let newWorkModel = layout.getCellHModel() | 239 | let newWorkModel = layout.getCellHModel() |
| 240 | self.workListArr.append(newWorkModel) | 240 | self.workListArr.append(newWorkModel) |
| 241 | } | 241 | } |
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/数字简历相关页面/CNLiveDigitalResumePreViewController.swift
| @@ -298,7 +298,7 @@ class CNLiveDigitalResumePreViewController:CNLiveBaseViewController,UITableViewD | @@ -298,7 +298,7 @@ class CNLiveDigitalResumePreViewController:CNLiveBaseViewController,UITableViewD | ||
| 298 | // let idxPath = tableView.indexPath(for: workCell) | 298 | // let idxPath = tableView.indexPath(for: workCell) |
| 299 | for (idx,mdl) in res.enumerated() { | 299 | for (idx,mdl) in res.enumerated() { |
| 300 | if idx == index{ | 300 | if idx == index{ |
| 301 | - let layout = CNLiveViateWorkModelLayout(model: mdl as! CNLiveVitaeWorksModel,descH: Float(jianjieHeight),isPreview: true, isExpand: isExpand) | 301 | + let layout = CNLiveViateWorkModelLayout(model: mdl as! CNLiveVitaeWorksModel,descH: Float(jianjieHeight),isPreview: true, isExpand: isExpand, isShowExpand: true) |
| 302 | let newWorkModel = layout.getCellHModel() | 302 | let newWorkModel = layout.getCellHModel() |
| 303 | tempArr.append(newWorkModel) | 303 | tempArr.append(newWorkModel) |
| 304 | }else{ | 304 | }else{ |
| @@ -358,7 +358,7 @@ class CNLiveDigitalResumePreViewController:CNLiveBaseViewController,UITableViewD | @@ -358,7 +358,7 @@ class CNLiveDigitalResumePreViewController:CNLiveBaseViewController,UITableViewD | ||
| 358 | // let idxPath = tableView.indexPath(for: workCell) | 358 | // let idxPath = tableView.indexPath(for: workCell) |
| 359 | for (idx,mdl) in res.enumerated() { | 359 | for (idx,mdl) in res.enumerated() { |
| 360 | if idx == index{ | 360 | if idx == index{ |
| 361 | - let layout = CNLiveViateAwardModelLayout(model: mdl as! CNLiveVitaeAwardsModel,descH: Float(jianjieHeight),isPreview: true, isExpand: isExpand) | 361 | + let layout = CNLiveViateAwardModelLayout(model: mdl as! CNLiveVitaeAwardsModel,descH: Float(jianjieHeight),isPreview: true, isExpand: isExpand, isShowExpand: true) |
| 362 | let newWorkModel = layout.getCellHModel() | 362 | let newWorkModel = layout.getCellHModel() |
| 363 | tempArr.append(newWorkModel) | 363 | tempArr.append(newWorkModel) |
| 364 | }else{ | 364 | }else{ |
| @@ -605,7 +605,7 @@ class CNLiveDigitalResumePreViewController:CNLiveBaseViewController,UITableViewD | @@ -605,7 +605,7 @@ class CNLiveDigitalResumePreViewController:CNLiveBaseViewController,UITableViewD | ||
| 605 | for (_,mdl) in self.vitaeModel!.works.enumerated() { | 605 | for (_,mdl) in self.vitaeModel!.works.enumerated() { |
| 606 | // self.totalDataArray.add(CNLiveViatePreviewCellType.work) | 606 | // self.totalDataArray.add(CNLiveViatePreviewCellType.work) |
| 607 | // self.totalPreViewDataArray.add(CNLiveViatePreviewCellType.work) | 607 | // self.totalPreViewDataArray.add(CNLiveViatePreviewCellType.work) |
| 608 | - let layout = CNLiveViateWorkModelLayout(model: mdl ,descH: Float(40.0),isPreview: true, isExpand: false) | 608 | + let layout = CNLiveViateWorkModelLayout(model: mdl ,descH: Float(40.0),isPreview: true, isExpand: false, isShowExpand: true) |
| 609 | let newWorkModel = layout.getCellHModel() | 609 | let newWorkModel = layout.getCellHModel() |
| 610 | self.workDataArray.add(newWorkModel) | 610 | self.workDataArray.add(newWorkModel) |
| 611 | // self.awardDataArray.add(CNLiveViatePreviewCellType.work) | 611 | // self.awardDataArray.add(CNLiveViatePreviewCellType.work) |
| @@ -616,7 +616,7 @@ class CNLiveDigitalResumePreViewController:CNLiveBaseViewController,UITableViewD | @@ -616,7 +616,7 @@ class CNLiveDigitalResumePreViewController:CNLiveBaseViewController,UITableViewD | ||
| 616 | self.totalDataArray.add(CNLiveViatePreviewCellType.award) | 616 | self.totalDataArray.add(CNLiveViatePreviewCellType.award) |
| 617 | self.totalPreViewDataArray.add(CNLiveViatePreviewCellType.award) | 617 | self.totalPreViewDataArray.add(CNLiveViatePreviewCellType.award) |
| 618 | for (_,mdl) in self.vitaeModel!.awards.enumerated() { | 618 | for (_,mdl) in self.vitaeModel!.awards.enumerated() { |
| 619 | - let layout = CNLiveViateAwardModelLayout(model: mdl ,descH: Float(40.0),isPreview: true, isExpand: false) | 619 | + let layout = CNLiveViateAwardModelLayout(model: mdl ,descH: Float(40.0),isPreview: true, isExpand: false, isShowExpand: true) |
| 620 | let newWorkModel = layout.getCellHModel() | 620 | let newWorkModel = layout.getCellHModel() |
| 621 | self.awardDataArray.add(newWorkModel) | 621 | self.awardDataArray.add(newWorkModel) |
| 622 | // self.workDataArray.add(CNLiveViatePreviewCellType.award) | 622 | // self.workDataArray.add(CNLiveViatePreviewCellType.award) |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/Work/CNLiveVitaeAddWorkFirCell.swift
| @@ -9,10 +9,16 @@ import Foundation | @@ -9,10 +9,16 @@ import Foundation | ||
| 9 | import Kingfisher | 9 | import Kingfisher |
| 10 | import SnapKit | 10 | import SnapKit |
| 11 | 11 | ||
| 12 | +typealias UpdateAddWorkFirCellBlock = (_ currentCell: CNLiveVitaeAddWorkFirCell? ,_ zhiye:String ,_ gangwei:String,_ start:String,_ end:String) -> Void | ||
| 13 | + | ||
| 14 | +typealias UpdateAddAwardFirCellBlock = (_ currentCell: CNLiveVitaeAddWorkFirCell? ,_ awardName:String ,_ start:String,_ company:String) -> Void | ||
| 15 | + | ||
| 12 | class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ | 16 | class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ |
| 13 | var zhiyeStr:String = "" | 17 | var zhiyeStr:String = "" |
| 18 | + var updateAddWorkFirCellBlock:UpdateAddWorkFirCellBlock? | ||
| 19 | + var updateAddAwardFirCellBlock:UpdateAddAwardFirCellBlock? | ||
| 20 | + var startStr:String = "" | ||
| 14 | 21 | ||
| 15 | -// var workAwardType:CNLiveViateWorkAwardType = .work | ||
| 16 | var _workAwardType:CNLiveViateWorkAwardType = .work | 22 | var _workAwardType:CNLiveViateWorkAwardType = .work |
| 17 | var workAwardType : CNLiveViateWorkAwardType { | 23 | var workAwardType : CNLiveViateWorkAwardType { |
| 18 | get{ | 24 | get{ |
| @@ -450,6 +456,12 @@ class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ | @@ -450,6 +456,12 @@ class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ | ||
| 450 | // MARK: - UITextFieldDelegate | 456 | // MARK: - UITextFieldDelegate |
| 451 | func textFieldDidEndEditing(_ textField: UITextField) { | 457 | func textFieldDidEndEditing(_ textField: UITextField) { |
| 452 | currentViewController()?.view.endEditing(true) | 458 | currentViewController()?.view.endEditing(true) |
| 459 | + if self.updateAddWorkFirCellBlock != nil{ | ||
| 460 | + self.updateAddWorkFirCellBlock?(self, "", textField.text ?? "", "", "") | ||
| 461 | + } | ||
| 462 | + if self.updateAddAwardFirCellBlock != nil{ | ||
| 463 | + self.updateAddAwardFirCellBlock?(self, self.phoneTextFiled.text ?? "", self.startStr, self.banfaTextFiled.text ?? "") | ||
| 464 | + } | ||
| 453 | } | 465 | } |
| 454 | 466 | ||
| 455 | @objc func zhiYeTapAction(){ | 467 | @objc func zhiYeTapAction(){ |
| @@ -458,6 +470,9 @@ class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ | @@ -458,6 +470,9 @@ class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ | ||
| 458 | vc.selectAddWorkZhiYeBlock = { zhiyeStr in | 470 | vc.selectAddWorkZhiYeBlock = { zhiyeStr in |
| 459 | self.zhiyeStr = zhiyeStr | 471 | self.zhiyeStr = zhiyeStr |
| 460 | self.weizhiRightTitleLabel.text = zhiyeStr | 472 | self.weizhiRightTitleLabel.text = zhiyeStr |
| 473 | + if self.updateAddWorkFirCellBlock != nil{ | ||
| 474 | + self.updateAddWorkFirCellBlock?(self, zhiyeStr, "", "", "") | ||
| 475 | + } | ||
| 461 | } | 476 | } |
| 462 | navigationViewController().pushViewController(vc, animated: true) | 477 | navigationViewController().pushViewController(vc, animated: true) |
| 463 | } | 478 | } |
| @@ -470,6 +485,12 @@ class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ | @@ -470,6 +485,12 @@ class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ | ||
| 470 | let textStr = text as! String | 485 | let textStr = text as! String |
| 471 | self?.canjiaRightTitleLabel.text = textStr | 486 | self?.canjiaRightTitleLabel.text = textStr |
| 472 | self?.canjiaRightTitleLabel.textColor = HexColor("#333333") | 487 | self?.canjiaRightTitleLabel.textColor = HexColor("#333333") |
| 488 | + if self?.updateAddWorkFirCellBlock != nil{ | ||
| 489 | + self?.updateAddWorkFirCellBlock?(self ?? CNLiveVitaeAddWorkFirCell(), "", "", textStr, "") | ||
| 490 | + } | ||
| 491 | + if self?.updateAddAwardFirCellBlock != nil{ | ||
| 492 | + self?.updateAddAwardFirCellBlock?(self, self?.phoneTextFiled.text ?? "", self?.startStr ?? "", self?.banfaTextFiled.text ?? "") | ||
| 493 | + } | ||
| 473 | }else{ | 494 | }else{ |
| 474 | self?.canjiaRightTitleLabel.text = "请选择" | 495 | self?.canjiaRightTitleLabel.text = "请选择" |
| 475 | self?.canjiaRightTitleLabel.textColor = HexColor("#B4B4B4") | 496 | self?.canjiaRightTitleLabel.textColor = HexColor("#B4B4B4") |
| @@ -484,6 +505,9 @@ class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ | @@ -484,6 +505,9 @@ class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ | ||
| 484 | let textStr = text as! String | 505 | let textStr = text as! String |
| 485 | self?.endTimeRightTitleLabel.text = textStr | 506 | self?.endTimeRightTitleLabel.text = textStr |
| 486 | self?.endTimeRightTitleLabel.textColor = HexColor("#333333") | 507 | self?.endTimeRightTitleLabel.textColor = HexColor("#333333") |
| 508 | + if self?.updateAddWorkFirCellBlock != nil{ | ||
| 509 | + self?.updateAddWorkFirCellBlock?(self ?? CNLiveVitaeAddWorkFirCell(), "", "", "", textStr) | ||
| 510 | + } | ||
| 487 | }else{ | 511 | }else{ |
| 488 | self?.endTimeRightTitleLabel.text = "请选择" | 512 | self?.endTimeRightTitleLabel.text = "请选择" |
| 489 | self?.endTimeRightTitleLabel.textColor = HexColor("#B4B4B4") | 513 | self?.endTimeRightTitleLabel.textColor = HexColor("#B4B4B4") |
| @@ -509,14 +533,19 @@ class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ | @@ -509,14 +533,19 @@ class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ | ||
| 509 | self.phoneTextFiled.text = model.title | 533 | self.phoneTextFiled.text = model.title |
| 510 | self.banfaTextFiled.text = model.company | 534 | self.banfaTextFiled.text = model.company |
| 511 | 535 | ||
| 512 | - let startStr = self.convertMillisecondsStringToDateString(millisecondsString: model.time) | ||
| 513 | - if startStr?.count ?? 0 > 0{ | ||
| 514 | - self.canjiaRightTitleLabel.text = startStr | 536 | + let start = self.convertMillisecondsStringToDateString(millisecondsString: model.time) |
| 537 | + self.startStr = start ?? "" | ||
| 538 | + if start?.count ?? 0 > 0{ | ||
| 539 | + self.canjiaRightTitleLabel.text = start | ||
| 515 | self.canjiaRightTitleLabel.textColor = HexColor("#333333") | 540 | self.canjiaRightTitleLabel.textColor = HexColor("#333333") |
| 516 | }else{ | 541 | }else{ |
| 517 | self.canjiaRightTitleLabel.text = "请选择" | 542 | self.canjiaRightTitleLabel.text = "请选择" |
| 518 | self.canjiaRightTitleLabel.textColor = HexColor("#B4B4B4") | 543 | self.canjiaRightTitleLabel.textColor = HexColor("#B4B4B4") |
| 519 | } | 544 | } |
| 545 | + | ||
| 546 | + if self.updateAddAwardFirCellBlock != nil{ | ||
| 547 | + self.updateAddAwardFirCellBlock?(self, self.phoneTextFiled.text ?? "", self.startStr, self.banfaTextFiled.text ?? "") | ||
| 548 | + } | ||
| 520 | } | 549 | } |
| 521 | 550 | ||
| 522 | //工作记录 | 551 | //工作记录 |
| @@ -541,6 +570,10 @@ class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ | @@ -541,6 +570,10 @@ class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ | ||
| 541 | self.endTimeRightTitleLabel.text = "请选择" | 570 | self.endTimeRightTitleLabel.text = "请选择" |
| 542 | self.endTimeRightTitleLabel.textColor = HexColor("#B4B4B4") | 571 | self.endTimeRightTitleLabel.textColor = HexColor("#B4B4B4") |
| 543 | } | 572 | } |
| 573 | + | ||
| 574 | + if self.updateAddWorkFirCellBlock != nil{ | ||
| 575 | + self.updateAddWorkFirCellBlock?(self, model.profession, model.position, startStr ?? "", endStr ?? "") | ||
| 576 | + } | ||
| 544 | } | 577 | } |
| 545 | 578 | ||
| 546 | //"2024.07.02"格式转成"1722297600000"毫秒时间戳字符串 | 579 | //"2024.07.02"格式转成"1722297600000"毫秒时间戳字符串 |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/Work/CNLiveVitaeAddWorkThreeCell.swift
| @@ -9,8 +9,11 @@ import Foundation | @@ -9,8 +9,11 @@ import Foundation | ||
| 9 | import Kingfisher | 9 | import Kingfisher |
| 10 | import SnapKit | 10 | import SnapKit |
| 11 | 11 | ||
| 12 | +typealias UpdateAddWorkThreeCellBlock = (_ currentCell: CNLiveVitaeAddWorkThreeCell? ,_ company:String ,_ workDiDian:String) -> Void | ||
| 13 | + | ||
| 12 | class CNLiveVitaeAddWorkThreeCell:UITableViewCell, UITextFieldDelegate{ | 14 | class CNLiveVitaeAddWorkThreeCell:UITableViewCell, UITextFieldDelegate{ |
| 13 | - | 15 | + var updateAddWorkThreeCellBlock:UpdateAddWorkThreeCellBlock? |
| 16 | + | ||
| 14 | //简历workModel | 17 | //简历workModel |
| 15 | var _workModel : CNLiveVitaeWorksModel? | 18 | var _workModel : CNLiveVitaeWorksModel? |
| 16 | var workModel : CNLiveVitaeWorksModel? { | 19 | var workModel : CNLiveVitaeWorksModel? { |
| @@ -197,6 +200,9 @@ class CNLiveVitaeAddWorkThreeCell:UITableViewCell, UITextFieldDelegate{ | @@ -197,6 +200,9 @@ class CNLiveVitaeAddWorkThreeCell:UITableViewCell, UITextFieldDelegate{ | ||
| 197 | // MARK: - UITextFieldDelegate | 200 | // MARK: - UITextFieldDelegate |
| 198 | func textFieldDidEndEditing(_ textField: UITextField) { | 201 | func textFieldDidEndEditing(_ textField: UITextField) { |
| 199 | currentViewController()?.view.endEditing(true) | 202 | currentViewController()?.view.endEditing(true) |
| 203 | + if self.updateAddWorkThreeCellBlock != nil{ | ||
| 204 | + self.updateAddWorkThreeCellBlock?(self, textField.text ?? "", "") | ||
| 205 | + } | ||
| 200 | } | 206 | } |
| 201 | 207 | ||
| 202 | @objc func workCityTapAction(){ | 208 | @objc func workCityTapAction(){ |
| @@ -207,6 +213,9 @@ class CNLiveVitaeAddWorkThreeCell:UITableViewCell, UITextFieldDelegate{ | @@ -207,6 +213,9 @@ class CNLiveVitaeAddWorkThreeCell:UITableViewCell, UITextFieldDelegate{ | ||
| 207 | let vc = CNLiveDigitalResumeInfoSelectAddressController() | 213 | let vc = CNLiveDigitalResumeInfoSelectAddressController() |
| 208 | vc.finishSelectAreaCallBack = { [weak self] in | 214 | vc.finishSelectAreaCallBack = { [weak self] in |
| 209 | self?.weizhiRightTitleLabel.text = String(format: "%@%@%@",self?.selectAreaVC?.province ?? "",self?.selectAreaVC?.city ?? "",self?.selectAreaVC?.area ?? "" ) | 215 | self?.weizhiRightTitleLabel.text = String(format: "%@%@%@",self?.selectAreaVC?.province ?? "",self?.selectAreaVC?.city ?? "",self?.selectAreaVC?.area ?? "" ) |
| 216 | + if self?.updateAddWorkThreeCellBlock != nil{ | ||
| 217 | + self?.updateAddWorkThreeCellBlock?(self, "", self?.weizhiRightTitleLabel.text ?? "") | ||
| 218 | + } | ||
| 210 | } | 219 | } |
| 211 | let currVC = currentViewController() | 220 | let currVC = currentViewController() |
| 212 | currVC?.addChild(vc) | 221 | currVC?.addChild(vc) |
| @@ -225,6 +234,11 @@ class CNLiveVitaeAddWorkThreeCell:UITableViewCell, UITextFieldDelegate{ | @@ -225,6 +234,11 @@ class CNLiveVitaeAddWorkThreeCell:UITableViewCell, UITextFieldDelegate{ | ||
| 225 | cityStr = "请选择" | 234 | cityStr = "请选择" |
| 226 | } | 235 | } |
| 227 | self.weizhiRightTitleLabel.text = cityStr | 236 | self.weizhiRightTitleLabel.text = cityStr |
| 237 | + | ||
| 238 | + if self.updateAddWorkThreeCellBlock != nil{ | ||
| 239 | + self.updateAddWorkThreeCellBlock?(self, model.companyName, model.city) | ||
| 240 | + } | ||
| 241 | + | ||
| 228 | } | 242 | } |
| 229 | } | 243 | } |
| 230 | 244 |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/Work/CNLiveVitaeWorkCell.swift
| @@ -250,7 +250,11 @@ class CNLiveVitaeWorkCell: UITableViewCell{ | @@ -250,7 +250,11 @@ class CNLiveVitaeWorkCell: UITableViewCell{ | ||
| 250 | make.left.equalToSuperview() | 250 | make.left.equalToSuperview() |
| 251 | make.bottom.equalToSuperview().offset(-54-15) | 251 | make.bottom.equalToSuperview().offset(-54-15) |
| 252 | make.width.equalToSuperview() | 252 | make.width.equalToSuperview() |
| 253 | - make.top.equalTo(self.jianjieLabel.snp.bottom).offset(10) | 253 | + if self.expandBtn.isHidden{ |
| 254 | + make.top.equalTo(self.jianjieLabel.snp.bottom).offset(10) | ||
| 255 | + }else{ | ||
| 256 | + make.top.equalTo(self.expandBtn.snp.bottom) | ||
| 257 | + } | ||
| 254 | } | 258 | } |
| 255 | self.whiteBgView.addSubview(self.expandBtn) | 259 | self.whiteBgView.addSubview(self.expandBtn) |
| 256 | self.expandBtn.snp.makeConstraints { make in | 260 | self.expandBtn.snp.makeConstraints { make in |
| @@ -340,7 +344,6 @@ class CNLiveVitaeWorkCell: UITableViewCell{ | @@ -340,7 +344,6 @@ class CNLiveVitaeWorkCell: UITableViewCell{ | ||
| 340 | 344 | ||
| 341 | jianjieLabel.numberOfLines = 0 | 345 | jianjieLabel.numberOfLines = 0 |
| 342 | jianjieLabel.width = self.whiteBgView.width-15-20 | 346 | jianjieLabel.width = self.whiteBgView.width-15-20 |
| 343 | - let size = jianjieLabel.sizeThatFits(CGSize(width: jianjieLabel.width, height: CGFloat.greatestFiniteMagnitude)) | ||
| 344 | self.jianjieLabel.sizeToFit() | 347 | self.jianjieLabel.sizeToFit() |
| 345 | 348 | ||
| 346 | var jienjieH:CGFloat = 0 | 349 | var jienjieH:CGFloat = 0 |
| @@ -436,7 +439,11 @@ class CNLiveVitaeWorkCell: UITableViewCell{ | @@ -436,7 +439,11 @@ class CNLiveVitaeWorkCell: UITableViewCell{ | ||
| 436 | make.left.equalToSuperview() | 439 | make.left.equalToSuperview() |
| 437 | make.bottom.equalToSuperview().offset(-54-15) | 440 | make.bottom.equalToSuperview().offset(-54-15) |
| 438 | make.width.equalToSuperview() | 441 | make.width.equalToSuperview() |
| 439 | - make.top.equalTo(self.jianjieLabel.snp.bottom).offset(10) | 442 | + if self.expandBtn.isHidden{ |
| 443 | + make.top.equalTo(self.jianjieLabel.snp.bottom).offset(10) | ||
| 444 | + }else{ | ||
| 445 | + make.top.equalTo(self.expandBtn.snp.bottom) | ||
| 446 | + } | ||
| 440 | } | 447 | } |
| 441 | } | 448 | } |
| 442 | //工作 | 449 | //工作 |
| @@ -475,7 +482,6 @@ class CNLiveVitaeWorkCell: UITableViewCell{ | @@ -475,7 +482,6 @@ class CNLiveVitaeWorkCell: UITableViewCell{ | ||
| 475 | 482 | ||
| 476 | jianjieLabel.numberOfLines = 0 | 483 | jianjieLabel.numberOfLines = 0 |
| 477 | jianjieLabel.width = self.whiteBgView.width-15-20 | 484 | jianjieLabel.width = self.whiteBgView.width-15-20 |
| 478 | - let size = jianjieLabel.sizeThatFits(CGSize(width: jianjieLabel.width, height: CGFloat.greatestFiniteMagnitude)) | ||
| 479 | self.jianjieLabel.sizeToFit() | 485 | self.jianjieLabel.sizeToFit() |
| 480 | 486 | ||
| 481 | var jienjieH:CGFloat = 0 | 487 | var jienjieH:CGFloat = 0 |
| @@ -575,7 +581,11 @@ class CNLiveVitaeWorkCell: UITableViewCell{ | @@ -575,7 +581,11 @@ class CNLiveVitaeWorkCell: UITableViewCell{ | ||
| 575 | make.left.equalToSuperview() | 581 | make.left.equalToSuperview() |
| 576 | make.bottom.equalToSuperview().offset(-54-15) | 582 | make.bottom.equalToSuperview().offset(-54-15) |
| 577 | make.width.equalToSuperview() | 583 | make.width.equalToSuperview() |
| 578 | - make.top.equalTo(self.jianjieLabel.snp.bottom).offset(10) | 584 | + if self.expandBtn.isHidden{ |
| 585 | + make.top.equalTo(self.jianjieLabel.snp.bottom).offset(10) | ||
| 586 | + }else{ | ||
| 587 | + make.top.equalTo(self.expandBtn.snp.bottom) | ||
| 588 | + } | ||
| 579 | } | 589 | } |
| 580 | }else{ | 590 | }else{ |
| 581 | self.workDingWeiTitleLabel.isHidden = false | 591 | self.workDingWeiTitleLabel.isHidden = false |
| @@ -585,7 +595,11 @@ class CNLiveVitaeWorkCell: UITableViewCell{ | @@ -585,7 +595,11 @@ class CNLiveVitaeWorkCell: UITableViewCell{ | ||
| 585 | make.left.equalToSuperview() | 595 | make.left.equalToSuperview() |
| 586 | make.bottom.equalTo(self.dingweiImgView.snp.top).offset(-5) | 596 | make.bottom.equalTo(self.dingweiImgView.snp.top).offset(-5) |
| 587 | make.width.equalToSuperview() | 597 | make.width.equalToSuperview() |
| 588 | - make.top.equalTo(self.jianjieLabel.snp.bottom).offset(10) | 598 | + if self.expandBtn.isHidden{ |
| 599 | + make.top.equalTo(self.jianjieLabel.snp.bottom).offset(10) | ||
| 600 | + }else{ | ||
| 601 | + make.top.equalTo(self.expandBtn.snp.bottom) | ||
| 602 | + } | ||
| 589 | } | 603 | } |
| 590 | } | 604 | } |
| 591 | 605 | ||
| @@ -611,12 +625,10 @@ class CNLiveVitaeWorkCell: UITableViewCell{ | @@ -611,12 +625,10 @@ class CNLiveVitaeWorkCell: UITableViewCell{ | ||
| 611 | // MARK: - Action | 625 | // MARK: - Action |
| 612 | @objc func expandBtnAction(button:UIButton){ | 626 | @objc func expandBtnAction(button:UIButton){ |
| 613 | button.isSelected = !button.isSelected | 627 | button.isSelected = !button.isSelected |
| 614 | - let lines = jianjieLabel.getRealLabelTextLines() | ||
| 615 | let height = jianjieLabel.qmui_lineHeight | 628 | let height = jianjieLabel.qmui_lineHeight |
| 616 | 629 | ||
| 617 | jianjieLabel.numberOfLines = 0 | 630 | jianjieLabel.numberOfLines = 0 |
| 618 | jianjieLabel.width = self.whiteBgView.width-15-20 | 631 | jianjieLabel.width = self.whiteBgView.width-15-20 |
| 619 | - let size = jianjieLabel.sizeThatFits(CGSize(width: jianjieLabel.width, height: CGFloat.greatestFiniteMagnitude)) | ||
| 620 | self.jianjieLabel.sizeToFit() | 632 | self.jianjieLabel.sizeToFit() |
| 621 | 633 | ||
| 622 | var jienjieH:CGFloat = 0 | 634 | var jienjieH:CGFloat = 0 |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/我的简历cell/CNLiveDigitalResumePreviewFourWorkAwardCell.swift
| @@ -223,7 +223,11 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | @@ -223,7 +223,11 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | ||
| 223 | make.left.equalToSuperview() | 223 | make.left.equalToSuperview() |
| 224 | make.bottom.equalToSuperview() | 224 | make.bottom.equalToSuperview() |
| 225 | make.width.equalToSuperview() | 225 | make.width.equalToSuperview() |
| 226 | - make.top.equalTo(self.jianjieLabel.snp.bottom).offset(10) | 226 | + if self.expandBtn.isHidden{ |
| 227 | + make.top.equalTo(self.jianjieLabel.snp.bottom).offset(10) | ||
| 228 | + }else{ | ||
| 229 | + make.top.equalTo(self.expandBtn.snp.bottom) | ||
| 230 | + } | ||
| 227 | } | 231 | } |
| 228 | self.contentView.addSubview(self.expandBtn) | 232 | self.contentView.addSubview(self.expandBtn) |
| 229 | self.expandBtn.snp.makeConstraints { make in | 233 | self.expandBtn.snp.makeConstraints { make in |
| @@ -255,7 +259,10 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | @@ -255,7 +259,10 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | ||
| 255 | view.removeFromSuperview() | 259 | view.removeFromSuperview() |
| 256 | } | 260 | } |
| 257 | } | 261 | } |
| 262 | + | ||
| 258 | self.workProfessionTitleLabel.text = model.profession.count > 0 ? model.profession : "行业" | 263 | self.workProfessionTitleLabel.text = model.profession.count > 0 ? model.profession : "行业" |
| 264 | + | ||
| 265 | + self.workNameTitleLabel.isHidden = false | ||
| 259 | self.workNameTitleLabel.text = model.position.count > 0 ? model.position : "职位" | 266 | self.workNameTitleLabel.text = model.position.count > 0 ? model.position : "职位" |
| 260 | if model.companyName.count > 0{ | 267 | if model.companyName.count > 0{ |
| 261 | self.workPositionTitleLabel.text = model.companyName | 268 | self.workPositionTitleLabel.text = model.companyName |
| @@ -294,6 +301,7 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | @@ -294,6 +301,7 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | ||
| 294 | self.workTimeTitleLabel.text = startDateString!+"~"+endDateString! | 301 | self.workTimeTitleLabel.text = startDateString!+"~"+endDateString! |
| 295 | } | 302 | } |
| 296 | } | 303 | } |
| 304 | + self.workTimeTitleLabel.isHidden = false | ||
| 297 | 305 | ||
| 298 | self.jianjieLabel.text = model.jobDuties//"描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述" | 306 | self.jianjieLabel.text = model.jobDuties//"描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述" |
| 299 | let lines = jianjieLabel.getRealLabelTextLines() | 307 | let lines = jianjieLabel.getRealLabelTextLines() |
| @@ -393,7 +401,11 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | @@ -393,7 +401,11 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | ||
| 393 | make.left.equalToSuperview() | 401 | make.left.equalToSuperview() |
| 394 | make.bottom.equalToSuperview() | 402 | make.bottom.equalToSuperview() |
| 395 | make.width.equalToSuperview() | 403 | make.width.equalToSuperview() |
| 396 | - make.top.equalTo(self.jianjieLabel.snp.bottom).offset(10) | 404 | + if self.expandBtn.isHidden{ |
| 405 | + make.top.equalTo(self.jianjieLabel.snp.bottom).offset(10) | ||
| 406 | + }else{ | ||
| 407 | + make.top.equalTo(self.expandBtn.snp.bottom) | ||
| 408 | + } | ||
| 397 | } | 409 | } |
| 398 | 410 | ||
| 399 | }else{ | 411 | }else{ |
| @@ -404,7 +416,11 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | @@ -404,7 +416,11 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | ||
| 404 | make.left.equalToSuperview() | 416 | make.left.equalToSuperview() |
| 405 | make.bottom.equalTo(self.dingweiImgView.snp.top).offset(-5) | 417 | make.bottom.equalTo(self.dingweiImgView.snp.top).offset(-5) |
| 406 | make.width.equalToSuperview() | 418 | make.width.equalToSuperview() |
| 407 | - make.top.equalTo(self.jianjieLabel.snp.bottom).offset(10) | 419 | + if self.expandBtn.isHidden{ |
| 420 | + make.top.equalTo(self.jianjieLabel.snp.bottom).offset(10) | ||
| 421 | + }else{ | ||
| 422 | + make.top.equalTo(self.expandBtn.snp.bottom) | ||
| 423 | + } | ||
| 408 | } | 424 | } |
| 409 | } | 425 | } |
| 410 | self.nameIconImgView.image = UIImage(named: "mine_jianli_preview_work") | 426 | self.nameIconImgView.image = UIImage(named: "mine_jianli_preview_work") |
| @@ -552,7 +568,11 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | @@ -552,7 +568,11 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | ||
| 552 | make.left.equalToSuperview() | 568 | make.left.equalToSuperview() |
| 553 | make.bottom.equalToSuperview() | 569 | make.bottom.equalToSuperview() |
| 554 | make.width.equalToSuperview() | 570 | make.width.equalToSuperview() |
| 555 | - make.top.equalTo(self.jianjieLabel.snp.bottom).offset(10) | 571 | + if self.expandBtn.isHidden{ |
| 572 | + make.top.equalTo(self.jianjieLabel.snp.bottom).offset(10) | ||
| 573 | + }else{ | ||
| 574 | + make.top.equalTo(self.expandBtn.snp.bottom) | ||
| 575 | + } | ||
| 556 | } | 576 | } |
| 557 | } | 577 | } |
| 558 | 578 |
metaCode/Classes/Main/Model/Vitae/CNLiveViateWorkModelLayout.swift
| @@ -24,9 +24,16 @@ class CNLiveViateWorkModelLayout:NSObject{ | @@ -24,9 +24,16 @@ class CNLiveViateWorkModelLayout:NSObject{ | ||
| 24 | } | 24 | } |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | - init(model:CNLiveVitaeWorksModel,descH:Float,isPreview:Bool,isExpand:Bool){ | 27 | + init(model:CNLiveVitaeWorksModel,descH:Float,isPreview:Bool,isExpand:Bool,isShowExpand:Bool){ |
| 28 | super.init() | 28 | super.init() |
| 29 | model.isExpand = isExpand | 29 | model.isExpand = isExpand |
| 30 | + model.isShowExpand = isShowExpand | ||
| 31 | + var expand:Float = 20 | ||
| 32 | + if isShowExpand{ | ||
| 33 | + expand = 20 | ||
| 34 | + }else{ | ||
| 35 | + expand = 0 | ||
| 36 | + } | ||
| 30 | self.workModel = model | 37 | self.workModel = model |
| 31 | var companyH:Float = 25 | 38 | var companyH:Float = 25 |
| 32 | let companyStr = model.companyName | 39 | let companyStr = model.companyName |
| @@ -60,10 +67,10 @@ class CNLiveViateWorkModelLayout:NSObject{ | @@ -60,10 +67,10 @@ class CNLiveViateWorkModelLayout:NSObject{ | ||
| 60 | cityH = 35 | 67 | cityH = 35 |
| 61 | } | 68 | } |
| 62 | if isPreview == false{//工作记录详情页 | 69 | if isPreview == false{//工作记录详情页 |
| 63 | - _workModel?.cellH = Float(123-25)+companyH+descH+Float(hang*imgWH)+cityH+55+15 | 70 | + _workModel?.cellH = Float(123-25)+companyH+descH+expand+Float(hang*imgWH)+cityH+55+15 |
| 64 | }else{//预览工作记录 | 71 | }else{//预览工作记录 |
| 65 | imgWH = Float((Float(KSreenWidth)-30-40-50)/3.0+10) | 72 | imgWH = Float((Float(KSreenWidth)-30-40-50)/3.0+10) |
| 66 | - _workModel?.cellH = Float(162-58-25)+companyH+descH+Float(hang*imgWH)+cityH//+55 | 73 | + _workModel?.cellH = Float(162-58-25)+companyH+descH+expand+Float(hang*imgWH)+cityH//+55 |
| 67 | } | 74 | } |
| 68 | } | 75 | } |
| 69 | func getCellHModel()->CNLiveVitaeWorksModel{ | 76 | func getCellHModel()->CNLiveVitaeWorksModel{ |
| @@ -90,9 +97,16 @@ class CNLiveViateAwardModelLayout:NSObject{ | @@ -90,9 +97,16 @@ class CNLiveViateAwardModelLayout:NSObject{ | ||
| 90 | } | 97 | } |
| 91 | } | 98 | } |
| 92 | 99 | ||
| 93 | - init(model:CNLiveVitaeAwardsModel,descH:Float,isPreview:Bool,isExpand:Bool){ | 100 | + init(model:CNLiveVitaeAwardsModel,descH:Float,isPreview:Bool,isExpand:Bool,isShowExpand:Bool){ |
| 94 | super.init() | 101 | super.init() |
| 95 | model.isExpand = isExpand | 102 | model.isExpand = isExpand |
| 103 | + model.isShowExpand = isShowExpand | ||
| 104 | + var expand:Float = 20 | ||
| 105 | + if isShowExpand{ | ||
| 106 | + expand = 20 | ||
| 107 | + }else{ | ||
| 108 | + expand = 0 | ||
| 109 | + } | ||
| 96 | self.awardModel = model | 110 | self.awardModel = model |
| 97 | var companyH:Float = 25 | 111 | var companyH:Float = 25 |
| 98 | let companyStr = model.company | 112 | let companyStr = model.company |
| @@ -118,10 +132,10 @@ class CNLiveViateAwardModelLayout:NSObject{ | @@ -118,10 +132,10 @@ class CNLiveViateAwardModelLayout:NSObject{ | ||
| 118 | } | 132 | } |
| 119 | var imgWH:Float = Float((KSreenWidth-60-15)/3.0+10) | 133 | var imgWH:Float = Float((KSreenWidth-60-15)/3.0+10) |
| 120 | if isPreview == false{//获奖详情页 | 134 | if isPreview == false{//获奖详情页 |
| 121 | - _awardModel?.cellH = Float(123-25)+companyH+descH+Float(hang*imgWH)+55+15 | 135 | + _awardModel?.cellH = Float(123-25)+companyH+descH+expand+Float(hang*imgWH)+55+15 |
| 122 | }else{//预览获奖 | 136 | }else{//预览获奖 |
| 123 | imgWH = Float((Float(KSreenWidth)-30-40-50)/3.0+10) | 137 | imgWH = Float((Float(KSreenWidth)-30-40-50)/3.0+10) |
| 124 | - _awardModel?.cellH = Float(162-58-25-25)+companyH+descH+Float(hang*imgWH)//+55 | 138 | + _awardModel?.cellH = Float(162-58-25-25)+companyH+descH+expand+Float(hang*imgWH)//+55 |
| 125 | } | 139 | } |
| 126 | } | 140 | } |
| 127 | func getCellHModel()->CNLiveVitaeAwardsModel{ | 141 | func getCellHModel()->CNLiveVitaeAwardsModel{ |
metaCode/Classes/Main/Model/Vitae/CNLiveVitaeModel.swift
| @@ -109,6 +109,7 @@ class CNLiveVitaeWorksModel:BaseModel{ | @@ -109,6 +109,7 @@ class CNLiveVitaeWorksModel:BaseModel{ | ||
| 109 | ///cell高度 | 109 | ///cell高度 |
| 110 | var cellH: Float = 0 | 110 | var cellH: Float = 0 |
| 111 | var isExpand:Bool = false//是否展开 | 111 | var isExpand:Bool = false//是否展开 |
| 112 | + var isShowExpand:Bool = false//是否显示 展开按钮 | ||
| 112 | 113 | ||
| 113 | } | 114 | } |
| 114 | 115 | ||
| @@ -160,6 +161,8 @@ class CNLiveVitaeAwardsModel:BaseModel{ | @@ -160,6 +161,8 @@ class CNLiveVitaeAwardsModel:BaseModel{ | ||
| 160 | ///cell高度 | 161 | ///cell高度 |
| 161 | var cellH: Float = 0 | 162 | var cellH: Float = 0 |
| 162 | var isExpand:Bool = false//是否展开 | 163 | var isExpand:Bool = false//是否展开 |
| 164 | + var isShowExpand:Bool = false//是否显示 展开按钮 | ||
| 165 | + | ||
| 163 | } | 166 | } |
| 164 | /** | 167 | /** |
| 165 | "data": { | 168 | "data": { |