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 | 2632 | CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; |
| 2633 | 2633 | CODE_SIGN_IDENTITY = "Apple Development"; |
| 2634 | 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 | 2636 | DEBUG_INFORMATION_FORMAT = dwarf; |
| 2637 | 2637 | DEVELOPMENT_TEAM = 94X49GG3ZW; |
| 2638 | 2638 | ENABLE_BITCODE = NO; |
| ... | ... | @@ -2888,7 +2888,7 @@ |
| 2888 | 2888 | CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; |
| 2889 | 2889 | CODE_SIGN_IDENTITY = "Apple Development"; |
| 2890 | 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 | 2892 | DEVELOPMENT_TEAM = 94X49GG3ZW; |
| 2893 | 2893 | ENABLE_BITCODE = NO; |
| 2894 | 2894 | ENABLE_MODULE_VERIFIER = NO; | ... | ... |
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/工作相关页面/CNLiveVitaeAddWorkController.swift
| ... | ... | @@ -21,7 +21,24 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc |
| 21 | 21 | var workAwardType:CNLiveViateWorkAwardType = .work |
| 22 | 22 | |
| 23 | 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 | 39 | var secCell:CNLiveVitaeAddWorkSecCell? |
| 40 | + | |
| 41 | + | |
| 25 | 42 | var seleArr:Array<String>? |
| 26 | 43 | var seleVideoUrl:String = "" |
| 27 | 44 | |
| ... | ... | @@ -157,11 +174,42 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc |
| 157 | 174 | } |
| 158 | 175 | if self.workAwardType == .work{ |
| 159 | 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 | 194 | if self.workModel != nil{ |
| 161 | 195 | cell.workModel = self.workModel! |
| 162 | 196 | } |
| 163 | 197 | }else{ |
| 164 | 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 | 213 | if self.awardModel != nil{ |
| 166 | 214 | cell.awardModel = self.awardModel! |
| 167 | 215 | } |
| ... | ... | @@ -213,6 +261,17 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc |
| 213 | 261 | let cell = CNLiveVitaeAddWorkThreeCell() |
| 214 | 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 | 275 | if self.workModel != nil{ |
| 217 | 276 | cell.workModel = self.workModel! |
| 218 | 277 | } |
| ... | ... | @@ -283,21 +342,26 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc |
| 283 | 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 | 366 | if secCell?.huoJiangtextView.text?.count == 0 || secCell?.huoJiangtextView.text == "描述"{ |
| 303 | 367 | showMessage(message: "请填写经历描述") |
| ... | ... | @@ -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 | 401 | }else{ |
| 334 | - danWei = threeCell?.phoneTextFiled.text ?? "" | |
| 402 | + company = self.threeCompanyStr | |
| 335 | 403 | } |
| 404 | + | |
| 336 | 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 | 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 | 452 | var desc = "" |
| 345 | 453 | if secCell?.huoJiangtextView.text?.count ?? 0 <= 0{ |
| 346 | 454 | |
| ... | ... | @@ -360,7 +468,7 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc |
| 360 | 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 | 472 | if status == .success{ |
| 365 | 473 | self.navigationController?.popViewController(animated: true) |
| 366 | 474 | // self.navigationController?.viewControllers.forEach({ item in |
| ... | ... | @@ -373,20 +481,27 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc |
| 373 | 481 | } |
| 374 | 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 | 507 | var newString = "" |
| ... | ... | @@ -410,24 +525,56 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc |
| 410 | 525 | |
| 411 | 526 | } |
| 412 | 527 | } |
| 413 | - | |
| 528 | + | |
| 414 | 529 | if let userDic = UserDefaults.standard.dictionary(forKey: UserInfoManager.shared.userInfo.uid){ |
| 415 | 530 | let jianli_vitaeId = userDic["jianli_vitaeId"] as? String |
| 416 | 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 | 561 | var id = "" |
| 420 | 562 | if self.awardModel != nil{ |
| 421 | 563 | id = self.awardModel!.id |
| 422 | 564 | } |
| 423 | 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 | 574 | }else{ |
| 429 | - danWei = firCell?.banfaTextFiled.text ?? "" | |
| 575 | + danWei = self.firAwardCompany | |
| 430 | 576 | } |
| 577 | + | |
| 431 | 578 | var desc = "" |
| 432 | 579 | if secCell?.huoJiangtextView.text?.count ?? 0 <= 0{ |
| 433 | 580 | |
| ... | ... | @@ -436,7 +583,7 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc |
| 436 | 583 | }else{ |
| 437 | 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 | 587 | if status == .success{ |
| 441 | 588 | self.navigationController?.popViewController(animated: true) |
| 442 | 589 | // self.navigationController?.viewControllers.forEach({ item in | ... | ... |
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/工作相关页面/CNLiveVitaeWorkDetailController.swift
| ... | ... | @@ -157,11 +157,11 @@ class CNLiveVitaeWorkDetailController:CNLiveBaseViewController,UITableViewDataSo |
| 157 | 157 | for (idx,mdl) in res.enumerated() { |
| 158 | 158 | if idx == idxPath?.row{ |
| 159 | 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 | 161 | let newWorkModel = layout.getCellHModel() |
| 162 | 162 | tempArr.append(newWorkModel) |
| 163 | 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 | 165 | let newWorkModel = layout.getCellHModel() |
| 166 | 166 | tempArr.append(newWorkModel) |
| 167 | 167 | } |
| ... | ... | @@ -217,7 +217,7 @@ class CNLiveVitaeWorkDetailController:CNLiveBaseViewController,UITableViewDataSo |
| 217 | 217 | if let res = result as? [CNLiveVitaeWorksModel]{ |
| 218 | 218 | self.workListArr = Array() |
| 219 | 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 | 221 | let newWorkModel = layout.getCellHModel() |
| 222 | 222 | self.workListArr.append(newWorkModel) |
| 223 | 223 | } |
| ... | ... | @@ -235,7 +235,7 @@ class CNLiveVitaeWorkDetailController:CNLiveBaseViewController,UITableViewDataSo |
| 235 | 235 | if let res = result as? [CNLiveVitaeAwardsModel]{ |
| 236 | 236 | self.workListArr = Array() |
| 237 | 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 | 239 | let newWorkModel = layout.getCellHModel() |
| 240 | 240 | self.workListArr.append(newWorkModel) |
| 241 | 241 | } | ... | ... |
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/数字简历相关页面/CNLiveDigitalResumePreViewController.swift
| ... | ... | @@ -298,7 +298,7 @@ class CNLiveDigitalResumePreViewController:CNLiveBaseViewController,UITableViewD |
| 298 | 298 | // let idxPath = tableView.indexPath(for: workCell) |
| 299 | 299 | for (idx,mdl) in res.enumerated() { |
| 300 | 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 | 302 | let newWorkModel = layout.getCellHModel() |
| 303 | 303 | tempArr.append(newWorkModel) |
| 304 | 304 | }else{ |
| ... | ... | @@ -358,7 +358,7 @@ class CNLiveDigitalResumePreViewController:CNLiveBaseViewController,UITableViewD |
| 358 | 358 | // let idxPath = tableView.indexPath(for: workCell) |
| 359 | 359 | for (idx,mdl) in res.enumerated() { |
| 360 | 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 | 362 | let newWorkModel = layout.getCellHModel() |
| 363 | 363 | tempArr.append(newWorkModel) |
| 364 | 364 | }else{ |
| ... | ... | @@ -605,7 +605,7 @@ class CNLiveDigitalResumePreViewController:CNLiveBaseViewController,UITableViewD |
| 605 | 605 | for (_,mdl) in self.vitaeModel!.works.enumerated() { |
| 606 | 606 | // self.totalDataArray.add(CNLiveViatePreviewCellType.work) |
| 607 | 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 | 609 | let newWorkModel = layout.getCellHModel() |
| 610 | 610 | self.workDataArray.add(newWorkModel) |
| 611 | 611 | // self.awardDataArray.add(CNLiveViatePreviewCellType.work) |
| ... | ... | @@ -616,7 +616,7 @@ class CNLiveDigitalResumePreViewController:CNLiveBaseViewController,UITableViewD |
| 616 | 616 | self.totalDataArray.add(CNLiveViatePreviewCellType.award) |
| 617 | 617 | self.totalPreViewDataArray.add(CNLiveViatePreviewCellType.award) |
| 618 | 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 | 620 | let newWorkModel = layout.getCellHModel() |
| 621 | 621 | self.awardDataArray.add(newWorkModel) |
| 622 | 622 | // self.workDataArray.add(CNLiveViatePreviewCellType.award) | ... | ... |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/Work/CNLiveVitaeAddWorkFirCell.swift
| ... | ... | @@ -9,10 +9,16 @@ import Foundation |
| 9 | 9 | import Kingfisher |
| 10 | 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 | 16 | class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ |
| 13 | 17 | var zhiyeStr:String = "" |
| 18 | + var updateAddWorkFirCellBlock:UpdateAddWorkFirCellBlock? | |
| 19 | + var updateAddAwardFirCellBlock:UpdateAddAwardFirCellBlock? | |
| 20 | + var startStr:String = "" | |
| 14 | 21 | |
| 15 | -// var workAwardType:CNLiveViateWorkAwardType = .work | |
| 16 | 22 | var _workAwardType:CNLiveViateWorkAwardType = .work |
| 17 | 23 | var workAwardType : CNLiveViateWorkAwardType { |
| 18 | 24 | get{ |
| ... | ... | @@ -450,6 +456,12 @@ class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ |
| 450 | 456 | // MARK: - UITextFieldDelegate |
| 451 | 457 | func textFieldDidEndEditing(_ textField: UITextField) { |
| 452 | 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 | 467 | @objc func zhiYeTapAction(){ |
| ... | ... | @@ -458,6 +470,9 @@ class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ |
| 458 | 470 | vc.selectAddWorkZhiYeBlock = { zhiyeStr in |
| 459 | 471 | self.zhiyeStr = zhiyeStr |
| 460 | 472 | self.weizhiRightTitleLabel.text = zhiyeStr |
| 473 | + if self.updateAddWorkFirCellBlock != nil{ | |
| 474 | + self.updateAddWorkFirCellBlock?(self, zhiyeStr, "", "", "") | |
| 475 | + } | |
| 461 | 476 | } |
| 462 | 477 | navigationViewController().pushViewController(vc, animated: true) |
| 463 | 478 | } |
| ... | ... | @@ -470,6 +485,12 @@ class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ |
| 470 | 485 | let textStr = text as! String |
| 471 | 486 | self?.canjiaRightTitleLabel.text = textStr |
| 472 | 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 | 494 | }else{ |
| 474 | 495 | self?.canjiaRightTitleLabel.text = "请选择" |
| 475 | 496 | self?.canjiaRightTitleLabel.textColor = HexColor("#B4B4B4") |
| ... | ... | @@ -484,6 +505,9 @@ class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ |
| 484 | 505 | let textStr = text as! String |
| 485 | 506 | self?.endTimeRightTitleLabel.text = textStr |
| 486 | 507 | self?.endTimeRightTitleLabel.textColor = HexColor("#333333") |
| 508 | + if self?.updateAddWorkFirCellBlock != nil{ | |
| 509 | + self?.updateAddWorkFirCellBlock?(self ?? CNLiveVitaeAddWorkFirCell(), "", "", "", textStr) | |
| 510 | + } | |
| 487 | 511 | }else{ |
| 488 | 512 | self?.endTimeRightTitleLabel.text = "请选择" |
| 489 | 513 | self?.endTimeRightTitleLabel.textColor = HexColor("#B4B4B4") |
| ... | ... | @@ -509,14 +533,19 @@ class CNLiveVitaeAddWorkFirCell:UITableViewCell, UITextFieldDelegate{ |
| 509 | 533 | self.phoneTextFiled.text = model.title |
| 510 | 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 | 540 | self.canjiaRightTitleLabel.textColor = HexColor("#333333") |
| 516 | 541 | }else{ |
| 517 | 542 | self.canjiaRightTitleLabel.text = "请选择" |
| 518 | 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 | 570 | self.endTimeRightTitleLabel.text = "请选择" |
| 542 | 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 | 579 | //"2024.07.02"格式转成"1722297600000"毫秒时间戳字符串 | ... | ... |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/Work/CNLiveVitaeAddWorkThreeCell.swift
| ... | ... | @@ -9,8 +9,11 @@ import Foundation |
| 9 | 9 | import Kingfisher |
| 10 | 10 | import SnapKit |
| 11 | 11 | |
| 12 | +typealias UpdateAddWorkThreeCellBlock = (_ currentCell: CNLiveVitaeAddWorkThreeCell? ,_ company:String ,_ workDiDian:String) -> Void | |
| 13 | + | |
| 12 | 14 | class CNLiveVitaeAddWorkThreeCell:UITableViewCell, UITextFieldDelegate{ |
| 13 | - | |
| 15 | + var updateAddWorkThreeCellBlock:UpdateAddWorkThreeCellBlock? | |
| 16 | + | |
| 14 | 17 | //简历workModel |
| 15 | 18 | var _workModel : CNLiveVitaeWorksModel? |
| 16 | 19 | var workModel : CNLiveVitaeWorksModel? { |
| ... | ... | @@ -197,6 +200,9 @@ class CNLiveVitaeAddWorkThreeCell:UITableViewCell, UITextFieldDelegate{ |
| 197 | 200 | // MARK: - UITextFieldDelegate |
| 198 | 201 | func textFieldDidEndEditing(_ textField: UITextField) { |
| 199 | 202 | currentViewController()?.view.endEditing(true) |
| 203 | + if self.updateAddWorkThreeCellBlock != nil{ | |
| 204 | + self.updateAddWorkThreeCellBlock?(self, textField.text ?? "", "") | |
| 205 | + } | |
| 200 | 206 | } |
| 201 | 207 | |
| 202 | 208 | @objc func workCityTapAction(){ |
| ... | ... | @@ -207,6 +213,9 @@ class CNLiveVitaeAddWorkThreeCell:UITableViewCell, UITextFieldDelegate{ |
| 207 | 213 | let vc = CNLiveDigitalResumeInfoSelectAddressController() |
| 208 | 214 | vc.finishSelectAreaCallBack = { [weak self] in |
| 209 | 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 | 220 | let currVC = currentViewController() |
| 212 | 221 | currVC?.addChild(vc) |
| ... | ... | @@ -225,6 +234,11 @@ class CNLiveVitaeAddWorkThreeCell:UITableViewCell, UITextFieldDelegate{ |
| 225 | 234 | cityStr = "请选择" |
| 226 | 235 | } |
| 227 | 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 | 250 | make.left.equalToSuperview() |
| 251 | 251 | make.bottom.equalToSuperview().offset(-54-15) |
| 252 | 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 | 259 | self.whiteBgView.addSubview(self.expandBtn) |
| 256 | 260 | self.expandBtn.snp.makeConstraints { make in |
| ... | ... | @@ -340,7 +344,6 @@ class CNLiveVitaeWorkCell: UITableViewCell{ |
| 340 | 344 | |
| 341 | 345 | jianjieLabel.numberOfLines = 0 |
| 342 | 346 | jianjieLabel.width = self.whiteBgView.width-15-20 |
| 343 | - let size = jianjieLabel.sizeThatFits(CGSize(width: jianjieLabel.width, height: CGFloat.greatestFiniteMagnitude)) | |
| 344 | 347 | self.jianjieLabel.sizeToFit() |
| 345 | 348 | |
| 346 | 349 | var jienjieH:CGFloat = 0 |
| ... | ... | @@ -436,7 +439,11 @@ class CNLiveVitaeWorkCell: UITableViewCell{ |
| 436 | 439 | make.left.equalToSuperview() |
| 437 | 440 | make.bottom.equalToSuperview().offset(-54-15) |
| 438 | 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 | 482 | |
| 476 | 483 | jianjieLabel.numberOfLines = 0 |
| 477 | 484 | jianjieLabel.width = self.whiteBgView.width-15-20 |
| 478 | - let size = jianjieLabel.sizeThatFits(CGSize(width: jianjieLabel.width, height: CGFloat.greatestFiniteMagnitude)) | |
| 479 | 485 | self.jianjieLabel.sizeToFit() |
| 480 | 486 | |
| 481 | 487 | var jienjieH:CGFloat = 0 |
| ... | ... | @@ -575,7 +581,11 @@ class CNLiveVitaeWorkCell: UITableViewCell{ |
| 575 | 581 | make.left.equalToSuperview() |
| 576 | 582 | make.bottom.equalToSuperview().offset(-54-15) |
| 577 | 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 | 590 | }else{ |
| 581 | 591 | self.workDingWeiTitleLabel.isHidden = false |
| ... | ... | @@ -585,7 +595,11 @@ class CNLiveVitaeWorkCell: UITableViewCell{ |
| 585 | 595 | make.left.equalToSuperview() |
| 586 | 596 | make.bottom.equalTo(self.dingweiImgView.snp.top).offset(-5) |
| 587 | 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 | 625 | // MARK: - Action |
| 612 | 626 | @objc func expandBtnAction(button:UIButton){ |
| 613 | 627 | button.isSelected = !button.isSelected |
| 614 | - let lines = jianjieLabel.getRealLabelTextLines() | |
| 615 | 628 | let height = jianjieLabel.qmui_lineHeight |
| 616 | 629 | |
| 617 | 630 | jianjieLabel.numberOfLines = 0 |
| 618 | 631 | jianjieLabel.width = self.whiteBgView.width-15-20 |
| 619 | - let size = jianjieLabel.sizeThatFits(CGSize(width: jianjieLabel.width, height: CGFloat.greatestFiniteMagnitude)) | |
| 620 | 632 | self.jianjieLabel.sizeToFit() |
| 621 | 633 | |
| 622 | 634 | var jienjieH:CGFloat = 0 | ... | ... |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/我的简历cell/CNLiveDigitalResumePreviewFourWorkAwardCell.swift
| ... | ... | @@ -223,7 +223,11 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ |
| 223 | 223 | make.left.equalToSuperview() |
| 224 | 224 | make.bottom.equalToSuperview() |
| 225 | 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 | 232 | self.contentView.addSubview(self.expandBtn) |
| 229 | 233 | self.expandBtn.snp.makeConstraints { make in |
| ... | ... | @@ -255,7 +259,10 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ |
| 255 | 259 | view.removeFromSuperview() |
| 256 | 260 | } |
| 257 | 261 | } |
| 262 | + | |
| 258 | 263 | self.workProfessionTitleLabel.text = model.profession.count > 0 ? model.profession : "行业" |
| 264 | + | |
| 265 | + self.workNameTitleLabel.isHidden = false | |
| 259 | 266 | self.workNameTitleLabel.text = model.position.count > 0 ? model.position : "职位" |
| 260 | 267 | if model.companyName.count > 0{ |
| 261 | 268 | self.workPositionTitleLabel.text = model.companyName |
| ... | ... | @@ -294,6 +301,7 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ |
| 294 | 301 | self.workTimeTitleLabel.text = startDateString!+"~"+endDateString! |
| 295 | 302 | } |
| 296 | 303 | } |
| 304 | + self.workTimeTitleLabel.isHidden = false | |
| 297 | 305 | |
| 298 | 306 | self.jianjieLabel.text = model.jobDuties//"描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述" |
| 299 | 307 | let lines = jianjieLabel.getRealLabelTextLines() |
| ... | ... | @@ -393,7 +401,11 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ |
| 393 | 401 | make.left.equalToSuperview() |
| 394 | 402 | make.bottom.equalToSuperview() |
| 395 | 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 | 411 | }else{ |
| ... | ... | @@ -404,7 +416,11 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ |
| 404 | 416 | make.left.equalToSuperview() |
| 405 | 417 | make.bottom.equalTo(self.dingweiImgView.snp.top).offset(-5) |
| 406 | 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 | 426 | self.nameIconImgView.image = UIImage(named: "mine_jianli_preview_work") |
| ... | ... | @@ -552,7 +568,11 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ |
| 552 | 568 | make.left.equalToSuperview() |
| 553 | 569 | make.bottom.equalToSuperview() |
| 554 | 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 | 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 | 28 | super.init() |
| 29 | 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 | 37 | self.workModel = model |
| 31 | 38 | var companyH:Float = 25 |
| 32 | 39 | let companyStr = model.companyName |
| ... | ... | @@ -60,10 +67,10 @@ class CNLiveViateWorkModelLayout:NSObject{ |
| 60 | 67 | cityH = 35 |
| 61 | 68 | } |
| 62 | 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 | 71 | }else{//预览工作记录 |
| 65 | 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 | 76 | func getCellHModel()->CNLiveVitaeWorksModel{ |
| ... | ... | @@ -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 | 101 | super.init() |
| 95 | 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 | 110 | self.awardModel = model |
| 97 | 111 | var companyH:Float = 25 |
| 98 | 112 | let companyStr = model.company |
| ... | ... | @@ -118,10 +132,10 @@ class CNLiveViateAwardModelLayout:NSObject{ |
| 118 | 132 | } |
| 119 | 133 | var imgWH:Float = Float((KSreenWidth-60-15)/3.0+10) |
| 120 | 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 | 136 | }else{//预览获奖 |
| 123 | 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 | 141 | func getCellHModel()->CNLiveVitaeAwardsModel{ | ... | ... |
metaCode/Classes/Main/Model/Vitae/CNLiveVitaeModel.swift
| ... | ... | @@ -109,6 +109,7 @@ class CNLiveVitaeWorksModel:BaseModel{ |
| 109 | 109 | ///cell高度 |
| 110 | 110 | var cellH: Float = 0 |
| 111 | 111 | var isExpand:Bool = false//是否展开 |
| 112 | + var isShowExpand:Bool = false//是否显示 展开按钮 | |
| 112 | 113 | |
| 113 | 114 | } |
| 114 | 115 | |
| ... | ... | @@ -160,6 +161,8 @@ class CNLiveVitaeAwardsModel:BaseModel{ |
| 160 | 161 | ///cell高度 |
| 161 | 162 | var cellH: Float = 0 |
| 162 | 163 | var isExpand:Bool = false//是否展开 |
| 164 | + var isShowExpand:Bool = false//是否显示 展开按钮 | |
| 165 | + | |
| 163 | 166 | } |
| 164 | 167 | /** |
| 165 | 168 | "data": { | ... | ... |