Просмотр исходного кода

新增会议管理关联流程功能 选择器输出数据强化 修复工作附件下载等等一些bug

fancy 6 лет назад
Родитель
Сommit
5e4eedad02
39 измененных файлов с 1039 добавлено и 308 удалено
  1. 3 4
      o2ios/O2Platform/Contact-通讯录/Controller/ContactGroupPickerViewController.swift
  2. 5 6
      o2ios/O2Platform/Contact-通讯录/Controller/ContactIdentityPickerViewController.swift
  3. 1 3
      o2ios/O2Platform/Contact-通讯录/Controller/ContactPersonPickerViewController.swift
  4. 78 28
      o2ios/O2Platform/Contact-通讯录/Controller/ContactPickerViewController.swift
  5. 3 4
      o2ios/O2Platform/Contact-通讯录/Controller/ContactUnitPickerViewController.swift
  6. 139 0
      o2ios/O2Platform/Contact-通讯录/Model/OOContactModel.swift
  7. 70 2
      o2ios/O2Platform/Contact-通讯录/ViewModel/ContactPickerViewModel.swift
  8. 2 2
      o2ios/O2Platform/Info.plist
  9. 3 1
      o2ios/O2Platform/common/HTTP/ContactAPI/OOContactAPI.swift
  10. 7 1
      o2ios/O2Platform/common/HTTP/ContactAPI/OOContactExpressAPI.swift
  11. 6 5
      o2ios/O2Platform/common/HTTP/PersonalAPI/PersonalAPI.swift
  12. 19 2
      o2ios/O2Platform/common/HTTP/TaskAPI/OOApplicationAPI.swift
  13. 2 4
      o2ios/O2Platform/common/HTTP/TaskAPI/OOTaskAPI.swift
  14. 2 2
      o2ios/O2Platform/common/ext/UIViewController+Extension.swift
  15. 2 2
      o2ios/O2Platform/config/O2URLContext.swift
  16. 1 1
      o2ios/O2Platform/contacts/c/ContactHomeViewController.swift
  17. 5 4
      o2ios/O2Platform/file/c/FileBSImagePickerViewController.swift
  18. 1 1
      o2ios/O2Platform/framework/JMessage/ChatModule/Chat/View/Message/JCMessageVideoContentView.swift
  19. 1 1
      o2ios/O2Platform/framework/JMessage/ChatModule/Chat/ViewController/FriendsBusinessCardViewController.swift
  20. 116 44
      o2ios/O2Platform/framework/JMessage/ChatModule/Chat/ViewController/JCChatViewController.swift
  21. 49 6
      o2ios/O2Platform/meeting-会议/Controller/OOMeetingCreateViewController.swift
  22. 117 70
      o2ios/O2Platform/meeting-会议/Controller/OOMeetingInforController.swift
  23. 9 11
      o2ios/O2Platform/meeting-会议/Controller/OOMeetingMeetingRoomManageController.swift
  24. 41 1
      o2ios/O2Platform/meeting-会议/Model/OOMeetingModels.swift
  25. 7 7
      o2ios/O2Platform/meeting-会议/View/OOMeetingInforItemCell.swift
  26. 5 6
      o2ios/O2Platform/meeting-会议/View/OOMeetingInforItemCell.xib
  27. 1 1
      o2ios/O2Platform/meeting-会议/View/accept/OOMeetingConfirmHeaderView.swift
  28. 27 6
      o2ios/O2Platform/meeting-会议/View/accept/OOMeetingConfirmHeaderView.xib
  29. 5 5
      o2ios/O2Platform/meeting-会议/View/meeting/OOMeetingPersonCell.swift
  30. 2 5
      o2ios/O2Platform/meeting-会议/View/meeting/OOMeetingPersonCell.xib
  31. 54 0
      o2ios/O2Platform/meeting-会议/View/room/OOMeetingRoomMainCell.swift
  32. 15 3
      o2ios/O2Platform/meeting-会议/View/room/OOMeetingRoomMainCell.xib
  33. 91 59
      o2ios/O2Platform/meeting-会议/View/room/OOMeetingRoomTableHeaderView.xib
  34. 1 1
      o2ios/O2Platform/meeting-会议/ViewModel/OOMeetingCreateViewModel.swift
  35. 71 0
      o2ios/O2Platform/meeting-会议/ViewModel/OOMeetingMainViewModel.swift
  36. 6 2
      o2ios/O2Platform/meeting-会议/meeting.storyboard
  37. 1 0
      o2ios/O2Platform/task/c/TodoTaskDetailViewController.swift
  38. 5 8
      o2ios/O2Platform/task/m/O2WebViewModels.swift
  39. 66 0
      o2ios/O2Platform/task/m/TodoTask.swift

+ 3 - 4
o2ios/O2Platform/Contact-通讯录/Controller/ContactGroupPickerViewController.swift

@@ -59,11 +59,10 @@ class ContactGroupPickerViewController: UITableViewController {
     
     override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
         let value = self.groupDataList[indexPath.row].distinguishedName!
-        let name = self.groupDataList[indexPath.row].name!
         if self.isSelected(value: value) {
             self.removeSelected(value: value)
         }else {
-            self.addSelected(value: value, name: name)
+            self.addSelected(group: self.groupDataList[indexPath.row])
         }
         self.tableView.reloadRows(at: [indexPath], with: .automatic)
         
@@ -141,9 +140,9 @@ class ContactGroupPickerViewController: UITableViewController {
         }
     }
     
-    private func addSelected(value: String, name: String) {
+    private func addSelected(group: OOGroupModel) {
         if let vc = self.parent as? ContactPickerViewController {
-            vc.addSelectedValue(type: .group, name: name, value: value)
+            vc.addSelectedGroup(group: group)
         }
     }
 

+ 5 - 6
o2ios/O2Platform/Contact-通讯录/Controller/ContactIdentityPickerViewController.swift

@@ -87,20 +87,19 @@ class ContactIdentityPickerViewController: UITableViewController {
         if indexPath.section == 2 {
             let value = self.identityDataList[indexPath.row].distinguishedName!
             let person = self.identityDataList[indexPath.row].person!
-            let name = self.identityDataList[indexPath.row].name!
             if backResultIsUser {
                 let isSelected = self.isSelected(value: person)
                 if isSelected {
                     self.removeSelected(value: person)
                 }else {
-                    self.addSelected(value: person, name: name)
+                    self.addSelected(self.identityDataList[indexPath.row])
                 }
             }else {
                 let isSelected = self.isSelected(value: value)
                 if isSelected {
                     self.removeSelected(value: value)
                 }else {
-                    self.addSelected(value: value, name: name)
+                    self.addSelected(self.identityDataList[indexPath.row])
                 }
             }
            
@@ -174,12 +173,12 @@ class ContactIdentityPickerViewController: UITableViewController {
         }
     }
     
-    private func addSelected(value: String, name: String) {
+    private func addSelected(_ identity: OOIdentityModel) {
         if let vc = self.parent as? ContactPickerViewController {
             if backResultIsUser {
-                vc.addSelectedValue(type: .person, name: name, value: value)
+                vc.addSelectedPerson(id: identity)
             }else {
-                vc.addSelectedValue(type: .identity, name: name, value: value)
+                vc.addSelectedIdentity(id: identity)
             }
             
         }

+ 1 - 3
o2ios/O2Platform/Contact-通讯录/Controller/ContactPersonPickerViewController.swift

@@ -118,9 +118,7 @@ class ContactPersonPickerViewController: UITableViewController {
     }
     
     private func addSelected(value: String, name: String) {
-        if let vc = self.parent as? ContactPickerViewController {
-            vc.addSelectedValue(type: .person, name: name, value: value)
-        }
+        
     }
     
     private func searchBarInit(_ searchBar:UISearchBar){

+ 78 - 28
o2ios/O2Platform/Contact-通讯录/Controller/ContactPickerViewController.swift

@@ -94,13 +94,17 @@ class ContactPickerViewController: UIViewController {
     var pickedDelegate: DidPickedContact?
     
     //已经选中的值
-    private var selectedDeptSet:[O2BizContactPickerResultItem] = []
-    private var selectedIdSet:[O2BizContactPickerResultItem] = []
-    private var selectedGroupSet:[O2BizContactPickerResultItem] = []
-    private var selectedUserSet:[O2BizContactPickerResultItem] = []
+    private var selectedDeptSet:[O2UnitPickerItem] = []
+    private var selectedIdSet:[O2IdentityPickerItem] = []
+    private var selectedGroupSet:[O2GroupPickerItem] = []
+    private var selectedUserSet:[O2PersonPickerItem] = []
     //选择按钮文字
     private var pickBtnTitle = ""
     
+    private let viewModel: ContactPickerViewModel = {
+        return ContactPickerViewModel()
+    }()
+    
     override func viewDidLoad() {
         super.viewDidLoad()
         if initDeptPickedArray.count > 0 {
@@ -111,7 +115,10 @@ class ContactPickerViewController: UIViewController {
                 }else {
                     name = s
                 }
-                selectedDeptSet.append(O2BizContactPickerResultItem(distinguishedName: s, name: name))
+                let unit = O2UnitPickerItem()
+                unit.distinguishedName = s
+                unit.name = name
+                selectedDeptSet.append(unit)
             }
         }
         if initIdPickedArray.count > 0 {
@@ -122,7 +129,10 @@ class ContactPickerViewController: UIViewController {
                 }else {
                     name = s
                 }
-                selectedIdSet.append(O2BizContactPickerResultItem(distinguishedName: s, name: name))
+                let id = O2IdentityPickerItem()
+                id.distinguishedName = s
+                id.name = name
+                selectedIdSet.append(id)
             }
         }
         if initGroupPickedArray.count > 0 {
@@ -133,7 +143,10 @@ class ContactPickerViewController: UIViewController {
                 }else {
                     name = s
                 }
-                selectedGroupSet.append(O2BizContactPickerResultItem(distinguishedName: s, name: name))
+                let group = O2GroupPickerItem()
+                group.distinguishedName = s
+                group.name = name
+                selectedGroupSet.append(group)
             }
         }
         if initUserPickedArray.count > 0 {
@@ -144,7 +157,10 @@ class ContactPickerViewController: UIViewController {
                 }else {
                     name = s
                 }
-                selectedUserSet.append(O2BizContactPickerResultItem(distinguishedName: s, name: name))
+                let person = O2PersonPickerItem()
+                person.distinguishedName = s
+                person.name = name
+                selectedUserSet.append(person)
             }
         }
         let c = selectedDeptSet.count + selectedIdSet.count + selectedGroupSet.count + selectedUserSet.count
@@ -257,33 +273,57 @@ class ContactPickerViewController: UIViewController {
         }
         self.refreshPickButton()
     }
-    // 添加一个选中的值
-    func addSelectedValue(type: ContactPickerType, name: String, value: String) {
+    // 选择一个组织
+    func addSelectedDept(dept: OOUnitModel) {
         let c = selectedDeptSet.count + selectedIdSet.count + selectedGroupSet.count + selectedUserSet.count
         if maxNumber > 0 && c >= maxNumber {
             self.showError(title: "不能添加更多了!")
             return
         }
-        switch type {
-        case .unit:
-            self.selectedDeptSet.append(O2BizContactPickerResultItem(distinguishedName: value, name: name))
-            break
-        case .identity:
-            self.selectedIdSet.append(O2BizContactPickerResultItem(distinguishedName: value, name: name))
-            break
-        case .group:
-            self.selectedGroupSet.append(O2BizContactPickerResultItem(distinguishedName: value, name: name))
-            break
-        case .person:
-            self.selectedUserSet.append(O2BizContactPickerResultItem(distinguishedName: value, name: name))
-            break
+        let item = O2UnitPickerItem()
+        item.copyFromUnitModel(dept: dept)
+        self.selectedDeptSet.append(item)
+        self.refreshPickButton()
+    }
+    // 选择一个身份
+    func addSelectedIdentity(id: OOIdentityModel) {
+        let c = selectedDeptSet.count + selectedIdSet.count + selectedGroupSet.count + selectedUserSet.count
+        if maxNumber > 0 && c >= maxNumber {
+            self.showError(title: "不能添加更多了!")
+            return
         }
+        let item = O2IdentityPickerItem()
+        item.copyFromIdentityModel(identity: id)
+        self.selectedIdSet.append(item)
+        //异步获取用户信息 然后填充进去
+        self.getPersonInfoFor(forType: "0", dn: id.person!)//这里的person是人员的id
+        self.refreshPickButton()
+    }
+    // 选择一个群组
+    func addSelectedGroup(group: OOGroupModel) {
+        let c = selectedDeptSet.count + selectedIdSet.count + selectedGroupSet.count + selectedUserSet.count
+        if maxNumber > 0 && c >= maxNumber {
+            self.showError(title: "不能添加更多了!")
+            return
+        }
+        let item = O2GroupPickerItem()
+        item.copyFromGroupModel(group: group)
+        self.selectedGroupSet.append(item)
+        self.refreshPickButton()
+    }
+    func addSelectedPerson(id: OOIdentityModel) {
+        let c = selectedDeptSet.count + selectedIdSet.count + selectedGroupSet.count + selectedUserSet.count
+        if maxNumber > 0 && c >= maxNumber {
+            self.showError(title: "不能添加更多了!")
+            return
+        }
+        let item = O2PersonPickerItem()
+        item.distinguishedName = id.person
+        self.selectedUserSet.append(item)
+        //异步获取用户信息 然后填充进去
+        self.getPersonInfoFor(forType: "1", dn: id.person!)//这里的person是人员的dn
         self.refreshPickButton()
     }
-    
-    
-    
-    
     
     // MARK: - private method 当前类私有方法
 
@@ -309,7 +349,6 @@ class ContactPickerViewController: UIViewController {
         pickBtnTitle = "选择(\(c))"
         if maxNumber > 0 {
             pickBtnTitle = "选择(\(c) / \(maxNumber))"
-            
         }
         navigationItem.rightBarButtonItem?.title = pickBtnTitle
     }
@@ -415,6 +454,17 @@ class ContactPickerViewController: UIViewController {
             DDLogDebug("click unkown")
         }
     }
+    
+    // forType 0:身份填充 1:用户填充
+    private func getPersonInfoFor(forType: String, dn: String) {
+        viewModel.getPersonInfo(dn: dn).then { (person) in
+            if (forType == "0") {
+                self.selectedIdSet.first(where: { $0.person == person.distinguishedName })?.updatePersonInfo(person: person)
+            }else {
+                self.selectedUserSet.first(where: { $0.distinguishedName == person.distinguishedName })?.copyFromPersonModel(person: person)
+            }
+        }
+    }
     /*
     // MARK: - Navigation
 

+ 3 - 4
o2ios/O2Platform/Contact-通讯录/Controller/ContactUnitPickerViewController.swift

@@ -71,11 +71,10 @@ class ContactUnitPickerViewController: UITableViewController {
     override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
         if indexPath.section == 1 {
             let value = dataList[indexPath.row].distinguishedName!
-            let name = dataList[indexPath.row].name!
             if self.isSelected(value: value) {
                 self.removeSelected(value: value)
             }else {
-                self.addSelected(value: value, name: name)
+                self.addSelected(dept: dataList[indexPath.row])
             }
             tableView.reloadRows(at: [indexPath], with: .automatic)
         }
@@ -149,9 +148,9 @@ class ContactUnitPickerViewController: UITableViewController {
         }
     }
     
-    private func addSelected(value: String, name: String) {
+    private func addSelected(dept: OOUnitModel) {
         if let vc = self.parent as? ContactPickerViewController {
-            vc.addSelectedValue(type: .unit, name: name, value: value)
+            vc.addSelectedDept(dept: dept)
         }
     }
     

+ 139 - 0
o2ios/O2Platform/Contact-通讯录/Model/OOContactModel.swift

@@ -55,6 +55,124 @@ struct ContactBreadcrumbBean {
     var level: Int = 0
 }
 
+
+// 选择器使用的对象
+//组织对象
+class O2UnitPickerItem: NSObject, DataModel {
+    
+    @objc open var id : String?
+    @objc open  var name : String?
+    @objc open var unique : String?
+    @objc open var distinguishedName : String?
+    @objc open  var typeList : [String]?
+    @objc open var shortName : String?
+    var level : Int?
+    @objc open var levelName : String?
+    
+    override required init(){}
+    
+    func copyFromUnitModel(dept: OOUnitModel) {
+        self.id = dept.id
+        self.name = dept.name
+        self.unique = dept.unique
+        self.distinguishedName = dept.distinguishedName
+        self.typeList = dept.typeList
+        self.shortName = dept.shortName
+        self.level = dept.level
+        self.levelName = dept.levelName
+    }
+    
+}
+//身份对象
+class O2IdentityPickerItem: NSObject, DataModel {
+    
+    @objc open var id : String?
+    @objc open var name : String?
+    @objc open var unique : String?
+    @objc open var distinguishedName : String?
+    @objc open var person : String?
+    @objc open var unit : String?
+    @objc open var unitName : String?
+    @objc open var personName : String?
+    @objc open var personUnique : String?
+    @objc open var personDn : String?
+    var unitLevel : Int?
+    @objc open var unitLevelName : String?
+    
+    override required init(){}
+    
+    func copyFromIdentityModel(identity: OOIdentityModel) {
+        self.id = identity.id
+        self.name = identity.name
+        self.unique = identity.unique
+        self.distinguishedName = identity.distinguishedName
+        self.unit = identity.unit
+        self.unitName = identity.unitName
+        self.unitLevel = identity.unitLevel
+        self.unitLevelName = identity.unitLevelName
+        self.person = identity.person
+        //person相关信息等获取用户信息后再填充
+    }
+    //更新用户相关的信息
+    func updatePersonInfo(person: OOPersonModel) {
+        self.person = person.id
+        self.personUnique = person.unique
+        self.personName = person.name
+        self.personDn = person.distinguishedName
+    }
+    
+}
+//群组对象
+class O2GroupPickerItem: NSObject, DataModel {
+    
+    @objc open var id : String?
+    @objc open var name : String?
+    @objc open var unique : String?
+    @objc open var distinguishedName : String?
+   
+    override required init(){}
+    
+    func copyFromGroupModel(group: OOGroupModel) {
+        self.id = group.id
+        self.name = group.name
+        self.unique = group.unique
+        self.distinguishedName = group.distinguishedName
+    }
+    
+}
+//人员对象
+class O2PersonPickerItem: NSObject, DataModel {
+    
+    @objc open var id : String?
+    @objc open var name : String?
+    @objc open var unique : String?
+    @objc open var distinguishedName : String?
+    @objc open var genderType : String?
+    @objc open var employee : String?
+    @objc open var mail : String?
+    @objc open var weixin : String?
+    @objc open var qq : String?
+    @objc open var mobile : String?
+    @objc open var officePhone : String?
+    
+    override required init(){}
+    
+    func copyFromPersonModel(person: OOPersonModel) {
+        self.id = person.id
+        self.distinguishedName = person.distinguishedName
+        self.name = person.name
+        self.unique = person.unique
+        self.genderType = person.genderType
+        self.employee = person.employee
+        self.mail = person.mail
+        self.weixin = person.weixin
+        self.qq = person.qq
+        self.mobile = person.mobile
+        self.officePhone = person.officePhone
+    }
+}
+
+
 // MARK: - Unit Model
 
 class OOUnitModel : NSObject, NSCoding, DataModel{
@@ -192,6 +310,27 @@ class OOUnitModel : NSObject, NSCoding, DataModel{
 }
 
 
+class OOPersonDNModel: NSObject, NSCoding, DataModel {
+    public override required init() {
+    }
+    
+    @objc var personList:[String]?
+    
+    
+    func encode(with aCoder: NSCoder) {
+        if personList != nil{
+            aCoder.encode(personList, forKey: "personList")
+        }
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+         personList = aDecoder.decodeObject(forKey: "personList") as? [String]
+    }
+    
+    
+    
+}
+
 
 // MARK: - OO Person Model
 class OOPersonModel : NSObject, NSCoding, DataModel{

+ 70 - 2
o2ios/O2Platform/Contact-通讯录/ViewModel/ContactPickerViewModel.swift

@@ -22,6 +22,23 @@ class ContactPickerViewModel: NSObject {
 
 extension ContactPickerViewModel {
     
+    func getPersonInfo(dn: String) -> Promise<OOPersonModel> {
+        return Promise { fulfill, reject in
+            self.orgControlAPI.request(.getPerson(dn)) { (result) in
+                let myResult = OOResult<BaseModelClass<OOPersonModel>>(result)
+                if myResult.isResultSuccess() {
+                    if let data = myResult.model?.data {
+                        fulfill(data)
+                    }else {
+                       reject(OOAppError.jsonMapping(message: "返回数据为空!!", statusCode: 1024, data: nil))
+                    }
+                } else {
+                    reject(myResult.error!)
+                }
+            }
+        }
+    }
+    
     //
     // 组织查询
     // @param parent 上级组织id -1就是顶层
@@ -190,7 +207,33 @@ extension ContactPickerViewModel {
                 let response = OOResult<BaseModelClass<[OOIdentityModel]>>(result)
                 if response.isResultSuccess() {
                     if let data = response.model?.data {
-                        fulfill(data)
+                        //person id 换 DN 人员选择的时候需要
+                        let idList = data.map({ (oo) -> String in
+                            return oo.person ?? ""
+                        })
+                        if idList.isEmpty {
+                            fulfill(data)
+                        }else {
+                            self.orgExpressAPI.request(.personListDN(idList), completion: { (dnResult) in
+                                let dnResponse = OOResult<BaseModelClass<OOPersonDNModel>>(dnResult)
+                                if dnResponse.isResultSuccess() {
+                                    if let dnList = dnResponse.model?.data?.personList {
+                                        var index = 0
+                                        let newData = data.map({ (ooId) -> OOIdentityModel in
+                                            ooId.person = dnList[index]
+                                            index += 1
+                                            return ooId
+                                        })
+                                        fulfill(newData)
+                                    }else {
+                                        fulfill(data)
+                                    }
+                                }else {
+                                    fulfill(data)
+                                }
+                            })
+                        }
+                        
                     }else {
                         reject(OOAppError.jsonMapping(message: "返回数据为空!!", statusCode: 1024, data: nil))
                     }
@@ -207,7 +250,32 @@ extension ContactPickerViewModel {
                 let response = OOResult<BaseModelClass<[OOIdentityModel]>>(result)
                 if response.isResultSuccess() {
                     if let data = response.model?.data {
-                        fulfill(data)
+                        //person id 换 DN 人员选择的时候需要
+                        let idList = data.map({ (oo) -> String in
+                            return oo.person ?? ""
+                        })
+                        if idList.isEmpty {
+                            fulfill(data)
+                        }else {
+                            self.orgExpressAPI.request(.personListDN(idList), completion: { (dnResult) in
+                                let dnResponse = OOResult<BaseModelClass<OOPersonDNModel>>(dnResult)
+                                if dnResponse.isResultSuccess() {
+                                    if let dnList = dnResponse.model?.data?.personList {
+                                        var index = 0
+                                        let newData = data.map({ (ooId) -> OOIdentityModel in
+                                            ooId.person = dnList[index]
+                                            index += 1
+                                            return ooId
+                                        })
+                                        fulfill(newData)
+                                    }else {
+                                        fulfill(data)
+                                    }
+                                }else {
+                                    fulfill(data)
+                                }
+                            })
+                        }
                     }else {
                         reject(OOAppError.jsonMapping(message: "返回数据为空!!", statusCode: 1024, data: nil))
                     }

+ 2 - 2
o2ios/O2Platform/Info.plist

@@ -17,7 +17,7 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>4.3.5</string>
+	<string>4.3.6</string>
 	<key>CFBundleURLTypes</key>
 	<array>
 		<dict>
@@ -32,7 +32,7 @@
 		</dict>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>55</string>
+	<string>56</string>
 	<key>LSRequiresIPhoneOS</key>
 	<true/>
 	<key>NSAppTransportSecurity</key>

+ 3 - 1
o2ios/O2Platform/common/HTTP/ContactAPI/OOContactAPI.swift

@@ -39,6 +39,7 @@ enum OOContactAPI {
     case groupListNext(String, Int)
     //根据组织查询身份列表
     case identityListByUnit(String)
+   
     
 }
 
@@ -93,7 +94,7 @@ extension OOContactAPI:TargetType {
             return "/jaxrs/group/list/\(flag)/next/\(count)"
         case .identityListByUnit(let unit):
             return "/jaxrs/identity/list/unit/\(unit)"
-            
+       
         }
     }
     
@@ -128,6 +129,7 @@ extension OOContactAPI:TargetType {
             return .requestParameters(parameters: ["unitList": idList], encoding: JSONEncoding.default)
         case .personLike(let searchText):
             return .requestParameters(parameters: ["key":searchText], encoding: JSONEncoding.default)
+       
         }
     }
     

+ 7 - 1
o2ios/O2Platform/common/HTTP/ContactAPI/OOContactExpressAPI.swift

@@ -14,6 +14,8 @@ import O2OA_Auth_SDK
 enum OOContactExpressAPI {
     //根据职务列表和组织查询 组织下对应的身份列表
     case identityListByUnitAndDuty([String], String)
+    //查询人员person的dn
+    case personListDN([String])
 }
 
 
@@ -40,12 +42,14 @@ extension OOContactExpressAPI: TargetType {
         switch self {
         case .identityListByUnitAndDuty(_, _):
             return "/jaxrs/unitduty/list/identity/unit/name/object"
+        case .personListDN(_):
+            return "/jaxrs/person/list"
         }
     }
     
     var method: Moya.Method {
         switch self {
-        case .identityListByUnitAndDuty(_, _):
+        case .identityListByUnitAndDuty(_, _), .personListDN(_):
             return .post
         }
     }
@@ -58,6 +62,8 @@ extension OOContactExpressAPI: TargetType {
         switch self {
         case .identityListByUnitAndDuty(let dutyList, let unit):
             return .requestParameters(parameters: ["nameList": dutyList, "unit": unit], encoding: JSONEncoding.default)
+        case .personListDN(let idList):
+            return.requestParameters(parameters: ["personList": idList], encoding: JSONEncoding.default)
         }
     }
     

+ 6 - 5
o2ios/O2Platform/common/HTTP/PersonalAPI/PersonalAPI.swift

@@ -14,6 +14,7 @@ enum PersonalAPI {
     case personInfo
     case updatePersonInfo(O2PersonInfo)
     case updatePersonIcon(UIImage)
+    case meetingConfig
 }
 
 extension PersonalAPI: OOAPIContextCapable {
@@ -43,16 +44,16 @@ extension PersonalAPI: TargetType {
             return "jaxrs/person"
         case .updatePersonIcon(_):
             return "jaxrs/person/icon"
+        case .meetingConfig:
+            return "jaxrs/definition/meetingConfig"
         }
     }
     
     var method: Moya.Method {
         switch self {
-        case .personInfo:
+        case .personInfo, .meetingConfig:
             return .get
-        case .updatePersonInfo(_):
-            return .put
-        case .updatePersonIcon(_):
+        case .updatePersonInfo(_), .updatePersonIcon(_):
             return .put
         }
     }
@@ -63,7 +64,7 @@ extension PersonalAPI: TargetType {
     
     var task: Task {
         switch self {
-        case .personInfo:
+        case .personInfo, .meetingConfig:
             return .requestPlain
         case .updatePersonInfo(let person):
             return .requestParameters(parameters: person.toJSON() ?? [:], encoding: JSONEncoding.default)

+ 19 - 2
o2ios/O2Platform/common/HTTP/TaskAPI/OOApplicationAPI.swift

@@ -15,6 +15,8 @@ enum OOApplicationAPI {
     case applicationList
     case applicationOnlyList
     case applicationItem(String)
+    case availableIdentityWithProcess(String)
+    case startProcess(String, String, String) // processId identity title
 }
 
 // MARK:- 上下文实现
@@ -47,11 +49,20 @@ extension OOApplicationAPI:TargetType {
             return "/jaxrs/application/list"
         case .applicationItem(let appId):
             return "/jaxrs/process/list/application/\(appId)"
+        case .availableIdentityWithProcess(let processId):
+            return "/jaxrs/process/list/available/identity/process/\(processId)"
+        case .startProcess(let processId, _, _):
+            return "/jaxrs/work/process/\(processId)"
         }
     }
     
     var method: Moya.Method {
-        return .get
+        switch self {
+        case .startProcess(_, _, _):
+            return .post
+        default:
+            return .get
+        }
     }
     
     var sampleData: Data {
@@ -59,7 +70,13 @@ extension OOApplicationAPI:TargetType {
     }
     
     var task: Task {
-        return .requestPlain
+        switch self {
+        case .startProcess(_, let identity, let title):
+            return .requestParameters(parameters: ["identity": identity, "title": title], encoding: JSONEncoding.default)
+        default:
+            return .requestPlain
+        }
+        
     }
     
     var headers: [String : String]? {

+ 2 - 4
o2ios/O2Platform/common/HTTP/TaskAPI/OOTaskAPI.swift

@@ -97,20 +97,18 @@ extension OOTaskAPI:TargetType{
             return "/jaxrs/attachment/upload/work/\(workId)"
         case .taskCreateAvaiableIdentityById(let processId):
             return "/jaxrs/process/list/available/identity/process/\(processId)"
-            
         case .readList(let id, let count):
             return "/jaxrs/read/list/\(id)/next/\(count)"
         case .readListFilter(let id, let count):
             return "/jaxrs/read/list/\(id)/next/\(count)/filter"
-            
         case .taskedList(let id, let count):
             return "/jaxrs/taskcompleted/list/\(id)/next/\(count)"
         case .taskedListFilter(let id, let count):
             return "/jaxrs/taskcompleted/list/\(id)/next/\(count)/filter"
         case .taskedDataById(let id):
-            return "jaxrs/taskcompleted/\(id)/reference"
+            return "/jaxrs/taskcompleted/\(id)/reference"
         case .taskedGetAttachmentInfo(let attachId,let workCompletedId):
-            return "jaxrs/attachment/\(attachId)/work/\(workCompletedId)"
+            return "/jaxrs/attachment/\(attachId)/work/\(workCompletedId)"
         case .taskedDownloadAttachment(let attachId, let workCompletedId):
             return "/jaxrs/attachment/download/\(attachId)/workcompleted/\(workCompletedId)"
         

+ 2 - 2
o2ios/O2Platform/common/ext/UIViewController+Extension.swift

@@ -220,10 +220,10 @@ extension UIViewController {
     func gotoApplicationSettings(alertMessage:String? = nil) {
         if alertMessage != nil {
             showDefaultConfirm(title: "提示", message: alertMessage!, okHandler: { (okAction) in
-                UIApplication.shared.openURL(URL(string: UIApplication.openSettingsURLString)!)
+                UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!, options: [:], completionHandler: nil)
             })
         }else {
-            UIApplication.shared.openURL(URL(string: UIApplication.openSettingsURLString)!)
+            UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!, options: [:], completionHandler: nil)
         }
     }
 }

+ 2 - 2
o2ios/O2Platform/config/O2URLContext.swift

@@ -156,8 +156,8 @@ struct TaskedContext {
     static let taskedListByPageSizeFilterQuery = "jaxrs/taskcompleted/list/##id##/next/##count##/filter"
     static let taskedDataByIdQuery = "jaxrs/taskcompleted/##id##/reference"
     static let taskedRetractQuery = "jaxrs/work/##work##/retract"
-    static let taskedGetAttachmentInfoQuery = "jaxrs/attachment/##attachmentId##/work/##workcompletedId##"
-    static let taskedGetAttachmentQuery = "/jaxrs/attachment/download/##attachmentId##/workcompleted/##workcompletedId##"
+    static let taskedGetAttachmentInfoQuery = "jaxrs/attachment/##attachmentId##/workcompleted/##workcompletedId##"
+    static let taskedGetAttachmentQuery = "jaxrs/attachment/download/##attachmentId##/workcompleted/##workcompletedId##"
 }
 
 

+ 1 - 1
o2ios/O2Platform/contacts/c/ContactHomeViewController.swift

@@ -317,7 +317,7 @@ class ContactHomeViewController: UITableViewController {
                                 case .success(let val):
                                     let objects = JSON(val)["data"]
                                     print(objects.description)
-                                    
+                                    self.contacts[order]?.removeAll()
                                     if let unit = Mapper<OrgUnit>().map(JSONString:objects.description) {
                                         unit.subDirectUnitCount = 1 //这个接口查询出来的组织没有下级组织的数量,假设是有下级组织的
                                         let tile = HeadTitle(name: "组织架构", icon: O2ThemeManager.string(for: "Icon.icon_bumen")!)

+ 5 - 4
o2ios/O2Platform/file/c/FileBSImagePickerViewController.swift

@@ -10,8 +10,9 @@ import UIKit
 import BSImagePicker
 
 class FileBSImagePickerViewController: BSImagePickerViewController {
-
-
+ 
+    var defaultmaxNumberOfSelections = 1
+    var defaultTakePhotos = true
     override func viewDidLoad() {
         super.viewDidLoad()
         self.navigationBar.isTranslucent = false
@@ -19,8 +20,8 @@ class FileBSImagePickerViewController: BSImagePickerViewController {
         self.navigationBar.tintColor = navbar_tint_color
         self.navigationBar.titleTextAttributes = [NSAttributedString.Key.font:navbar_text_font,NSAttributedString.Key.foregroundColor:navbar_tint_color]
         self.albumButton.setTitleColor(navbar_tint_color, for: .normal)
-        self.settings.maxNumberOfSelections = 1
-        self.settings.takePhotos = true
+        self.settings.maxNumberOfSelections = defaultmaxNumberOfSelections
+        self.settings.takePhotos = defaultTakePhotos
         
         
         //隐藏返回按钮文字

+ 1 - 1
o2ios/O2Platform/framework/JMessage/ChatModule/Chat/View/Message/JCMessageVideoContentView.swift

@@ -109,7 +109,7 @@ open class JCMessageVideoContentView: UIImageView, JCMessageContentViewType {
         addGestureRecognizer(tap)
     }
     
-    func _clickCell() {
+    @objc func _clickCell() {
         _delegate?.message?(message: _message, videoData: _data)
     }
 }

+ 1 - 1
o2ios/O2Platform/framework/JMessage/ChatModule/Chat/ViewController/FriendsBusinessCardViewController.swift

@@ -77,7 +77,7 @@ class FriendsBusinessCardViewController: UIViewController {
         navigationItem.leftBarButtonItem =  navLeftButton
     }
 
-    func _clickNavLeftButton() {
+    @objc func _clickNavLeftButton() {
         dismiss(animated: true, completion: nil)
     }
 

+ 116 - 44
o2ios/O2Platform/framework/JMessage/ChatModule/Chat/ViewController/JCChatViewController.swift

@@ -671,10 +671,56 @@ extension JCChatViewController: SAIToolboxInputViewDataSource, SAIToolboxInputVi
         return true
     }
     private func _pushToSelectPhotos() {
-        let vc = YHPhotoPickerViewController()
-        vc.maxPhotosCount = 9;
-        vc.pickerDelegate = self
-        present(vc, animated: true)
+//        let vc = YHPhotoPickerViewController()
+//        vc.maxPhotosCount = 9;
+//        vc.pickerDelegate = self
+//        present(vc, animated: true)
+        
+        
+        let vc = FileBSImagePickerViewController()
+        vc.defaultmaxNumberOfSelections = 9
+        vc.defaultTakePhotos = false
+        bs_presentImagePickerController(vc, animated: true,
+                                        select: { (asset: PHAsset) -> Void in
+                                            // User selected an asset.
+                                            // Do something with it, start upload perhaps?
+        }, deselect: { (asset: PHAsset) -> Void in
+            // User deselected an assets.
+            // Do something, cancel upload?
+        }, cancel: { (assets: [PHAsset]) -> Void in
+            // User cancelled. And this where the assets currently selected.
+        }, finish: { (assets: [PHAsset]) -> Void in
+//            for item in photos {
+//                guard let photo = item as? UIImage else {
+//                    return
+//                }
+//                DispatchQueue.main.async {
+//                    self.send(forImage: photo)
+//                }
+//            }
+            
+            for asset in assets {
+                if asset.mediaType == .image {
+                    let options = PHImageRequestOptions()
+                    options.isSynchronous = true
+                    options.deliveryMode = .fastFormat
+                    options.resizeMode = .none
+                    PHImageManager.default().requestImage(for: asset, targetSize: PHImageManagerMaximumSize, contentMode: .default, options: options, resultHandler: { (image, array) in
+                        guard let uiimage = image else {
+                            return
+                        }
+                        DispatchQueue.main.async {
+                            self.send(forImage: uiimage)
+                        }
+                    })
+                }
+            }
+        }, completion: nil)
+        
+        
+        
+        
+        
     }
     open func toolbox(_ toolbox: SAIToolboxInputView, didSelectFor item: SAIToolboxItem) {
         toolbar.resignFirstResponder()
@@ -684,14 +730,14 @@ extension JCChatViewController: SAIToolboxInputViewDataSource, SAIToolboxInputVi
                 PHPhotoLibrary.requestAuthorization({ (status) in
                     DispatchQueue.main.sync {
                         if status != .authorized {
-                            JCAlertView.bulid().setTitle("无权限访问照片").setMessage("请在设备的设置-极光 IM中允许访问照片。").setDelegate(self).addCancelButton("好的").addButton("去设置").setTag(10001).show()
+                            self.gotoApplicationSettings(alertMessage: "无权限访问照片,请在设备的设置中允许访问照片?")
                         } else {
                             self._pushToSelectPhotos()
                         }
                     }
                 })
             } else {
-                _pushToSelectPhotos()
+                self._pushToSelectPhotos()
             }
         case "page:camera":
             present(imagePicker, animated: true, completion: nil)
@@ -838,8 +884,34 @@ extension JCChatViewController: JCMessageDelegate {
     
     func clickTips(message: JCMessageType) {
         currentMessage = message
-        let alertView = UIAlertView(title: "重新发送", message: "是否重新发送该消息?", delegate: self, cancelButtonTitle: "取消", otherButtonTitles: "发送")
-        alertView.show()
+//        let alertView = UIAlertView(title: "重新发送", message: "是否重新发送该消息?", delegate: self, cancelButtonTitle: "取消", otherButtonTitles: "发送")
+        let okAction = UIAlertAction(title: "发送", style: .default) { (action) in
+            if let index = self.messages.index(self.currentMessage) {
+                self.messages.remove(at: index)
+                self.chatView.remove(at: index)
+                let msg = self.conversation.message(withMessageId: self.currentMessage.msgId)
+                self.currentMessage.options.state = .sending
+                
+                if let msg = msg {
+                    if let content = self.currentMessage.content as? JCMessageImageContent,
+                        let imageContent = msg.content as? JMSGImageContent
+                    {
+                        imageContent.uploadHandler = {  (percent:Float, msgId:(String?)) -> Void in
+                            content.upload?(percent)
+                        }
+                    }
+                }
+                self.messages.append(self.currentMessage as! JCMessage)
+                self.chatView.append(self.currentMessage)
+                self.conversation.send(msg!, optionalContent: JMSGOptionalContent.ex.default)
+                self.chatView.scrollToLast(animated: true)
+            }
+        }
+        let cancelAction = UIAlertAction(title: "取消", style: .cancel) { (action) in
+            //
+        }
+        self.showDefaultConfirm(title: "重新发送", message: "是否重新发送该消息?", okAction: okAction, cancelAction: cancelAction)
+//        alertView.show()
     }
     
     func tapAvatarView(message: JCMessageType) {
@@ -964,42 +1036,42 @@ extension JCChatViewController: JCChatViewDelegate {
     }
 }
 
-extension JCChatViewController: UIAlertViewDelegate {
-
-    func alertView(_ alertView: UIAlertView, clickedButtonAt buttonIndex: Int) {
-        if alertView.tag == 10001 {
-            if buttonIndex == 1 {
-                JCAppManager.openAppSetter()
-            }
-            return
-        }
-        switch buttonIndex {
-        case 1:
-            if let index = messages.index(currentMessage) {
-                messages.remove(at: index)
-                chatView.remove(at: index)
-                let msg = conversation.message(withMessageId: currentMessage.msgId)
-                currentMessage.options.state = .sending
-
-                if let msg = msg {
-                    if let content = currentMessage.content as? JCMessageImageContent,
-                        let imageContent = msg.content as? JMSGImageContent
-                    {
-                        imageContent.uploadHandler = {  (percent:Float, msgId:(String?)) -> Void in
-                            content.upload?(percent)
-                        }
-                    }
-                }
-                messages.append(currentMessage as! JCMessage)
-                chatView.append(currentMessage)
-                conversation.send(msg!, optionalContent: JMSGOptionalContent.ex.default)
-                chatView.scrollToLast(animated: true)
-            }
-        default:
-            break
-        }
-    }
-}
+//extension JCChatViewController: UIAlertViewDelegate {
+//
+//    func alertView(_ alertView: UIAlertView, clickedButtonAt buttonIndex: Int) {
+//        if alertView.tag == 10001 {
+//            if buttonIndex == 1 {
+//                JCAppManager.openAppSetter()
+//            }
+//            return
+//        }
+//        switch buttonIndex {
+//        case 1:
+//            if let index = messages.index(currentMessage) {
+//                messages.remove(at: index)
+//                chatView.remove(at: index)
+//                let msg = conversation.message(withMessageId: currentMessage.msgId)
+//                currentMessage.options.state = .sending
+//
+//                if let msg = msg {
+//                    if let content = currentMessage.content as? JCMessageImageContent,
+//                        let imageContent = msg.content as? JMSGImageContent
+//                    {
+//                        imageContent.uploadHandler = {  (percent:Float, msgId:(String?)) -> Void in
+//                            content.upload?(percent)
+//                        }
+//                    }
+//                }
+//                messages.append(currentMessage as! JCMessage)
+//                chatView.append(currentMessage)
+//                conversation.send(msg!, optionalContent: JMSGOptionalContent.ex.default)
+//                chatView.scrollToLast(animated: true)
+//            }
+//        default:
+//            break
+//        }
+//    }
+//}
 
 // MARK: - SAIInputBarDelegate & SAIInputBarDisplayable
 extension JCChatViewController: SAIInputBarDelegate, SAIInputBarDisplayable {

+ 49 - 6
o2ios/O2Platform/meeting-会议/Controller/OOMeetingCreateViewController.swift

@@ -7,6 +7,7 @@
 //
 
 import UIKit
+import CocoaLumberjack
 
 private let headerIdentifier = "OOMeetingPersonSelectHeaderView"
 private let footerIdentifier = "OOMeetingPersonFooterView"
@@ -48,6 +49,8 @@ class OOMeetingCreateViewController: UIViewController {
         }
         let mBean = OOMeetingFormBean(meetingForm: mForm)
         if mBean.checkFormValues() {
+            let jsno = mBean.toJSONString() ?? "default "
+            DDLogDebug(jsno)
             viewModel.createMeetingAction(mBean, completedBlock: { (resultMessage) in
                 if let message = resultMessage {
                     //error fail
@@ -73,6 +76,11 @@ class OOMeetingCreateViewController: UIViewController {
             destVC.delegate = self
             destVC.currentMode = 2
             destVC.title = "选择人员"
+        }else if segue.identifier == "showPickerRoom" {
+            if let dest = segue.destination as? OOMeetingMeetingRoomManageController {
+                dest.currentMode = 1 //单选
+                dest.delegate = self
+            }
         }
     }
     
@@ -116,6 +124,15 @@ extension OOMeetingCreateViewController:UICollectionViewDataSource,UICollectionV
         return reusableView
     }
     
+    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+        DDLogDebug("click item")
+        if let model = viewModel.collectionViewNodeForIndexPath(indexPath) {
+            self.viewModel.removeSelectPerson(model)
+            self.ooPersonCollectionView.reloadData()
+        }
+    }
+    
+    
 }
 
 extension OOMeetingCreateViewController:UICollectionViewDelegateFlowLayout {
@@ -132,7 +149,31 @@ extension OOMeetingCreateViewController:OOMeetingPersonActionCellDelegate{
     
     func addPersonActionClick(_ sender: UIButton) {
         //执行segue
-        self.performSegue(withIdentifier: "showPersonSelectedSegue", sender: nil)
+//        self.performSegue(withIdentifier: "showPersonSelectedSegue", sender: nil)
+    
+        if let v = ContactPickerViewController.providePickerVC(
+            pickerModes: [ContactPickerType.person],
+            multiple: true,
+            pickedDelegate: { (result: O2BizContactPickerResult) in
+                if let users = result.users {
+                    var persons :[OOPersonModel] = []
+                    users.forEach({ (item) in
+                        let pm = OOPersonModel()
+                        pm.id = item.id
+                        pm.name = item.name
+                        pm.genderType = item.genderType
+                        pm.distinguishedName = item.distinguishedName
+                        persons.append(pm)
+                    })
+                    if !persons.isEmpty {
+                        self.viewModel.selectedPersons = persons
+                        self.ooPersonCollectionView.reloadData()
+                    }
+                }
+                
+        }) {
+            self.navigationController?.pushViewController(v, animated: true)
+        }
     }
 }
 
@@ -169,11 +210,13 @@ extension OOMeetingCreateViewController:OOMeetingCreateFormViewDelegate{
     
     // MARK:- 会议室选择
     func performRoomSelected() {
-        let destVC = self.storyboard?.instantiateViewController(withIdentifier: "OOMeetingMeetingRoomManageController") as! OOMeetingMeetingRoomManageController
-        destVC.currentMode = 1 //单选
-        destVC.delegate = self
-        let navVC = ZLNavigationController(rootViewController: destVC)
-        self.present(navVC, animated: true, completion: nil)
+         self.performSegue(withIdentifier: "showPickerRoom", sender: nil)
+//        let destVC = self.storyboard?.instantiateViewController(withIdentifier: "OOMeetingMeetingRoomManageController") as! OOMeetingMeetingRoomManageController
+//        destVC.currentMode = 1 //单选
+//        destVC.delegate = self
+//        let navVC = ZLNavigationController(rootViewController: destVC)
+//        self.pushVC(navVC)
+//        self.present(navVC, animated: true, completion: nil)
     }
 }
 

+ 117 - 70
o2ios/O2Platform/meeting-会议/Controller/OOMeetingInforController.swift

@@ -9,40 +9,42 @@
 import UIKit
 import EmptyDataSet_Swift
 import Promises
+import CocoaLumberjack
 
 private let meetingIdentifier = "OOMeetingInforItemCell"
 
 class OOMeetingInforController: UIViewController {
-    
+
     @IBOutlet weak var tableView: UITableView!
-    
+
     private var sectionHeight = CGFloat(172.0)
-    
+
     private var hSectionHeight = CGFloat(387.0)
-    
+
     private var sFlag = false
-    
+
+    private var config: OOMeetingConfigInfo? = nil
+
     //指定日期的所有会议
-    private var theMeetingsByDay:[OOMeetingInfo] = []
-    
-    private lazy var viewModel:OOMeetingMainViewModel = {
+    private var theMeetingsByDay: [OOMeetingInfo] = []
+
+    private lazy var viewModel: OOMeetingMainViewModel = {
         return OOMeetingMainViewModel()
     }()
-    
-    private var headerView:OOMeetingInforHeaderView = {
-       let view = Bundle.main.loadNibNamed("OOMeetingInforHeaderView", owner: self, options:nil)?.first as! OOMeetingInforHeaderView
+
+    private var headerView: OOMeetingInforHeaderView = {
+        let view = Bundle.main.loadNibNamed("OOMeetingInforHeaderView", owner: self, options: nil)?.first as! OOMeetingInforHeaderView
         return view
     }()
-    
- 
-    private lazy var createView:O2BBSCreatorView = {
+
+    private lazy var createView: O2BBSCreatorView = {
         let view = Bundle.main.loadNibNamed("O2BBSCreatorView", owner: self, options: nil)?.first as! O2BBSCreatorView
         view.iconImage = #imageLiteral(resourceName: "icon_collection_pencil")
         view.delegate = self
-        view.frame = CGRect(x: kScreenW -  50 - 25, y: kScreenH -  50 - 25 - 40, width: 50, height: 50)
+        view.frame = CGRect(x: kScreenW - 50 - 25, y: kScreenH - 50 - 25 - 40, width: 50, height: 50)
         return view
     }()
-    
+
     override func viewDidLoad() {
         super.viewDidLoad()
         self.tabBarItem?.selectedImage = O2ThemeManager.image(for: "Icon.icon_huiyi_pro")
@@ -55,56 +57,78 @@ class OOMeetingInforController: UIViewController {
         tableView.mj_header = MJRefreshNormalHeader(refreshingBlock: {
             self.loadData()
         })
+        loadMeetConfig()
         loadData()
     }
-    
+
+    func loadMeetConfig() {
+        viewModel.loadMeetingConfig().then { (config) in
+            self.config = config
+        }.catch { (error) in
+            DDLogError("会议配置获取异常, \(error)")
+        }
+    }
+
     func loadData() {
         MBProgressHUD_JChat.showMessage(message: "loading...", toView: view)
-        all(viewModel.getMeetingsByYearAndMonth(Date()),viewModel.getMeetingByTheDay(Date())).then { (result) in
+        all(viewModel.getMeetingsByYearAndMonth(Date()), viewModel.getMeetingByTheDay(Date())).then { (result) in
             DispatchQueue.main.async {
-                self.headerView.eventsByDate = result.0 as? [String : [OOMeetingInfo]]
+                self.headerView.eventsByDate = result.0 as? [String: [OOMeetingInfo]]
                 self.viewModel.theMeetingsByDay.removeAll()
                 self.viewModel.theMeetingsByDay.append(contentsOf: result.1)
                 self.tableView.reloadData()
-               
             }
-            
-            }.always {
-                MBProgressHUD_JChat.hide(forView: self.view, animated: true)
-                if self.tableView.mj_header.isRefreshing() {
-                    self.tableView.mj_header.endRefreshing()
-                }
-                //self.tableView.reloadData()
-            }.catch { (myerror) in
-                let customError = myerror as! OOAppError
-                MBProgressHUD_JChat.show(text: customError.failureReason ?? "", view: self.view)
+        }.always {
+            MBProgressHUD_JChat.hide(forView: self.view, animated: true)
+            if self.tableView.mj_header.isRefreshing() {
+                self.tableView.mj_header.endRefreshing()
+            }
+            //self.tableView.reloadData()
+        }.catch { (myerror) in
+            let customError = myerror as! OOAppError
+            MBProgressHUD_JChat.show(text: customError.failureReason ?? "", view: self.view)
         }
     }
-    
-    
-    func loadCurrentMonthCalendar(_ theDate:Date?){
+
+
+    func loadCurrentMonthCalendar(_ theDate: Date?) {
         MBProgressHUD_JChat.showMessage(message: "loading...", toView: view)
         viewModel.getMeetingsByYearAndMonth(theDate ?? Date()).then { (resultDict) in
-            self.headerView.eventsByDate = resultDict as? [String : [OOMeetingInfo]]
-            }.always {
-                  MBProgressHUD_JChat.hide(forView: self.view, animated: true)
-            }.catch { (myerror) in
-                let customError = myerror as! OOAppError
-                MBProgressHUD_JChat.show(text: customError.failureReason ?? "", view: self.view)
+            self.headerView.eventsByDate = resultDict as? [String: [OOMeetingInfo]]
+        }.always {
+            MBProgressHUD_JChat.hide(forView: self.view, animated: true)
+        }.catch { (myerror) in
+            let customError = myerror as! OOAppError
+            MBProgressHUD_JChat.show(text: customError.failureReason ?? "", view: self.view)
         }
     }
-    
-    func loadtheDayMeetingInfo(_ theDate:Date?){
+
+    func loadtheDayMeetingInfo(_ theDate: Date?) {
         MBProgressHUD_JChat.showMessage(message: "loading...", toView: view)
         viewModel.getMeetingByTheDay(theDate ?? Date()).then { (infos) in
             self.viewModel.theMeetingsByDay.removeAll()
             self.viewModel.theMeetingsByDay.append(contentsOf: infos)
             self.tableView.reloadData()
-            }.always {
-                MBProgressHUD_JChat.hide(forView: self.view, animated: true)
-            }.catch { (myerror) in
-                let customError = myerror as! OOAppError
-                MBProgressHUD_JChat.show(text: customError.failureReason ?? "", view: self.view)
+        }.always {
+            MBProgressHUD_JChat.hide(forView: self.view, animated: true)
+        }.catch { (myerror) in
+            let customError = myerror as! OOAppError
+            MBProgressHUD_JChat.show(text: customError.failureReason ?? "", view: self.view)
+        }
+    }
+
+    private func startProcess(processId: String, identity: String) {
+        viewModel.startProcess(processId: processId, identity: identity).then { (list) in
+            let taskList = list
+            DispatchQueue.main.async {
+                let taskStoryboard = UIStoryboard(name: "task", bundle: Bundle.main)
+                let todoTaskDetailVC = taskStoryboard.instantiateViewController(withIdentifier: "todoTaskDetailVC") as! TodoTaskDetailViewController
+                todoTaskDetailVC.todoTask = taskList[0].copyToTodoTask()
+                todoTaskDetailVC.backFlag = 3
+                self.navigationController?.pushViewController(todoTaskDetailVC, animated: true)
+            }
+            }.catch { (error) in
+                self.showError(title: "启动会议流程出错!")
         }
     }
 
@@ -116,66 +140,89 @@ class OOMeetingInforController: UIViewController {
         super.viewWillAppear(animated)
         UIApplication.shared.windows.first?.addSubview(createView)
     }
-    
+
     override func viewWillDisappear(_ animated: Bool) {
         super.viewWillDisappear(animated)
         createView.removeFromSuperview()
     }
-    
+
 }
 
 // MARK:- EmptyDataSetSource,EmptyDataSetDelegate
-extension OOMeetingInforController:EmptyDataSetSource,EmptyDataSetDelegate{
+extension OOMeetingInforController: EmptyDataSetSource, EmptyDataSetDelegate {
     func title(forEmptyDataSet scrollView: UIScrollView) -> NSAttributedString? {
         let text = "您当前还没有会议"
-        let titleAttributes = [NSAttributedString.Key.foregroundColor:UIColor(hex:"#CCCCCC"),NSAttributedString.Key.font:UIFont.init(name: "PingFangSC-Regular", size: 18)!]
-        return  NSMutableAttributedString(string: text, attributes: titleAttributes)
+        let titleAttributes = [NSAttributedString.Key.foregroundColor: UIColor(hex: "#CCCCCC"), NSAttributedString.Key.font: UIFont.init(name: "PingFangSC-Regular", size: 18)!]
+        return NSMutableAttributedString(string: text, attributes: titleAttributes)
     }
-    
-    
+
+
     func image(forEmptyDataSet scrollView: UIScrollView) -> UIImage? {
         return #imageLiteral(resourceName: "icon_wuhuiyi")
     }
-    
+
     func backgroundColor(forEmptyDataSet scrollView: UIScrollView) -> UIColor? {
-        return UIColor(hex:"#F5F5F5")
+        return UIColor(hex: "#F5F5F5")
     }
-    
-    
+
+
     func emptyDataSetShouldDisplay(_ scrollView: UIScrollView) -> Bool {
         return true
     }
 }
 
-extension OOMeetingInforController:O2BBSCreatorViewDelegate{
+extension OOMeetingInforController: O2BBSCreatorViewDelegate {
     func creatorViewClicked(_ view: O2BBSCreatorView) {
         print("Creat Meeting")
-        self.performSegue(withIdentifier: "showCreateMeetingSgue", sender: nil)
+        if let c = self.config, let pId = c.process?.id {
+            self.showMessage(title: "Loading")
+            viewModel.loadMeetingProcess(processId: pId).then { (list) in
+                self.dismissProgressHUD()
+                if list.count == 1 {
+                    self.startProcess(processId: pId, identity: list[0].distinguishedName!)
+                } else {
+                    var actions: [UIAlertAction] = []
+                    list.forEach({ (identity) in
+                        let action = UIAlertAction(title: "\(identity.name!)(\(identity.unitName!))", style: .default, handler: { (a) in
+                            self.startProcess(processId: pId, identity: identity.distinguishedName!)
+                        })
+                        actions.append(action)
+                    })
+                    self.showSheetAction(title: "提示", message: "请选择创建会议流程的身份", actions: actions)
+                }
+            }.catch { (error) in
+                DDLogError("\(error)")
+                self.dismissProgressHUD()
+                self.performSegue(withIdentifier: "showCreateMeetingSgue", sender: nil)
+            }
+        } else {
+            self.performSegue(withIdentifier: "showCreateMeetingSgue", sender: nil)
+        }
     }
 }
 
 // MARK:- OOMeetingInforHeaderViewDelegate
-extension OOMeetingInforController:OOMeetingInforHeaderViewDelegate{
+extension OOMeetingInforController: OOMeetingInforHeaderViewDelegate {
     func selectedTheDay(_ theDay: Date?) {
-       loadtheDayMeetingInfo(theDay)
+        loadtheDayMeetingInfo(theDay)
     }
-    
+
     func selectedTheMonth(_ theMonth: Date?) {
         loadCurrentMonthCalendar(theMonth)
     }
 }
 
 // MARK:- UITableViewDataSource,UITableViewDelegate
-extension OOMeetingInforController:UITableViewDataSource,UITableViewDelegate {
-    
+extension OOMeetingInforController: UITableViewDataSource, UITableViewDelegate {
+
     func numberOfSections(in tableView: UITableView) -> Int {
         return viewModel.numberOfSections()
     }
-    
+
     func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
         return viewModel.numberOfRowsInSection(section)
     }
-    
+
     func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
         let cell = tableView.dequeueReusableCell(withIdentifier: meetingIdentifier, for: indexPath)
         let uCell = cell as! OOMeetingInforItemCell
@@ -184,15 +231,15 @@ extension OOMeetingInforController:UITableViewDataSource,UITableViewDelegate {
         uCell.config(withItem: item)
         return cell
     }
-    
+
     func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
         return 116.0
     }
-    
+
     func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
-        return  headerView.calendarManager?.settings.weekModeEnabled == false ?  hSectionHeight : sectionHeight
+        return headerView.calendarManager?.settings.weekModeEnabled == false ? hSectionHeight : sectionHeight
     }
-    
+
     func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
         return headerView
     }

+ 9 - 11
o2ios/O2Platform/meeting-会议/Controller/OOMeetingMeetingRoomManageController.swift

@@ -77,7 +77,7 @@ class OOMeetingMeetingRoomManageController: UIViewController {
         if currentMode != 0 {
             self.navigationItem.rightBarButtonItem = UIBarButtonItem(title:"确认", style: .plain, target: self, action: #selector(selectSubmit(_:)))
         }
-        if currentMode == 1{
+        if currentMode == 1 {
             self.tableView.allowsSelection = true
         }else if currentMode == 2 {
             self.tableView.allowsMultipleSelection = true
@@ -113,7 +113,7 @@ class OOMeetingMeetingRoomManageController: UIViewController {
             return
         }
         block.backResult("OOMeetingMeetingRoomManageController", selectedMeetingRooms)
-        self.dismiss(animated: true, completion: nil)
+        self.popVC()
     }
     
     @objc func closeWindow() {
@@ -174,17 +174,15 @@ extension OOMeetingMeetingRoomManageController:UITableViewDataSource,UITableView
         let cell = tableView.dequeueReusableCell(withIdentifier: reuseIdentifier, for: indexPath)
         let uCell = cell as! OOMeetingRoomMainCell
         let item = viewModel.nodeForIndexPath(indexPath)
-        uCell.config(withItem: item)
+        uCell.newConfig(withItem: item, showSelected: self.currentMode == 1)
         return cell
     }
     
     func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
-        print("viewForHeaderInSection section=\(section)")
         return viewModel.headerViewOfSection(section)
     }
     
     func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
-        print("viewForFooterInSection section=\(section)")
         return viewModel.footerViewOfSection(section)
     }
     
@@ -195,19 +193,19 @@ extension OOMeetingMeetingRoomManageController:UITableViewDataSource,UITableView
         }else{
             self.selectedMeetingRooms.append(item!)
             self.selectedCellIndexPaths.append(indexPath)
-            let cell = tableView.cellForRow(at: indexPath)
-            cell?.selectedBackgroundView = cellBackView
+            let cell = tableView.cellForRow(at: indexPath) as? OOMeetingRoomMainCell
+            cell?.selectRoom(isSelected: true)
         }
     }
     
     
     func tableView(_ tableView: UITableView, didDeselectRowAt indexPath: IndexPath) {
         let item = viewModel.nodeForIndexPath(indexPath)
-        if let index = self.selectedMeetingRooms.index(of: item!) {
+        if let index = self.selectedMeetingRooms.firstIndex(of: item!) {
             self.selectedMeetingRooms.remove(at: index)
-            self.selectedCellIndexPaths.remove(at: selectedCellIndexPaths.index(of: indexPath)!)
+            self.selectedCellIndexPaths.remove(at: selectedCellIndexPaths.firstIndex(of: indexPath)!)
         }
-        let cell = tableView.cellForRow(at: indexPath)
-        cell?.selectedBackgroundView = nil
+        let cell = tableView.cellForRow(at: indexPath) as? OOMeetingRoomMainCell
+        cell?.selectRoom(isSelected: false)
     }
 }

+ 41 - 1
o2ios/O2Platform/meeting-会议/Model/OOMeetingModels.swift

@@ -9,6 +9,47 @@
 import Foundation
 import HandyJSON
 
+class OOMeetingConfigProcess: NSObject, DataModel {
+    @objc var name: String?
+    @objc var id: String?
+    @objc var application: String?
+    @objc var applicationName: String?
+    @objc var alias: String?
+    
+    required override init() {
+        
+    }
+}
+
+class OOMeetingConfigInfo: NSObject, DataModel {
+    var process: OOMeetingConfigProcess?
+    var mobileCreateEnable:  Bool?
+    var weekBegin: Int?
+    
+    required override init() {
+        
+    }
+}
+
+class OOMeetingProcessIdentity: NSObject, DataModel {
+    @objc var name: String?
+    @objc var unique: String?
+    @objc var desc:String?
+    @objc var distinguishedName: String?
+    @objc var person: String?
+    @objc var unit: String?
+    @objc var unitName: String?
+    var unitLevel: Int?
+    @objc var unitLevelName: String?
+    
+    required override init() {
+        
+    }
+    func mapping(mapper: HelpingMapper) {
+        mapper <<< self.desc <-- "description"
+    }
+}
+
 class OOMeetingBuildInfo: NSObject,DataModel {
     
     @objc var address : String?
@@ -20,7 +61,6 @@ class OOMeetingBuildInfo: NSObject,DataModel {
     @objc var roomList : [OOMeetingRoomInfo]?
     @objc var updateTime : String?
     
-    
     required override init() {
         
     }

+ 7 - 7
o2ios/O2Platform/meeting-会议/View/OOMeetingInforItemCell.swift

@@ -63,13 +63,13 @@ class OOMeetingInforItemCell: UITableViewCell,Configurable {
         
         titleLabel.text = model.subject
         
-//        viewModel?.loadMeetingRoomById(model.room!, completed: { (roomResult) in
-//            guard let itemRoom = roomResult else{
-//                self.meetingroomLabel.text = "未知会议室"
-//                return
-//            }
-//            self.meetingroomLabel.text = itemRoom.name
-//        })
+        viewModel?.loadMeetingRoomById(model.room!, completed: { (roomResult) in
+            guard let itemRoom = roomResult else{
+                self.meetingroomLabel.text = "未知会议室"
+                return
+            }
+            self.meetingroomLabel.text = itemRoom.name
+        })
         
        let persons = model.invitePersonList?.map({ (p) -> String in
            return String(p.split(separator: "@")[0])

+ 5 - 6
o2ios/O2Platform/meeting-会议/View/OOMeetingInforItemCell.xib

@@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
-        <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -30,7 +29,7 @@
                         <nil key="highlightedColor"/>
                     </label>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="e3G-KL-pn2">
-                        <rect key="frame" x="16" y="38" width="288" height="21"/>
+                        <rect key="frame" x="16" y="58" width="288" height="21"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="21" id="JOF-73-Rxe"/>
                         </constraints>
@@ -38,8 +37,8 @@
                         <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
-                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="meetingroom" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0qh-ay-pZQ">
-                        <rect key="frame" x="16" y="63" width="288" height="20"/>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0qh-ay-pZQ">
+                        <rect key="frame" x="16" y="83" width="288" height="0.0"/>
                         <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="14"/>
                         <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>

+ 1 - 1
o2ios/O2Platform/meeting-会议/View/accept/OOMeetingConfirmHeaderView.swift

@@ -22,7 +22,7 @@ class OOMeetingConfirmHeaderView: UIView {
     override func awakeFromNib() {
         control1.bounds  = CGRect(x: 0, y: 0, width: kScreenW, height: 40)
         control1.titles = ["收到的邀请","发出的邀请"]
-        control1.autoresizingMask = [.flexibleWidth,.flexibleHeight]
+//        control1.autoresizingMask = [.flexibleWidth,.flexibleHeight]
         control1.titleFont = UIFont(name: "PingFangSC-Regular", size: 16.0)!
         control1.selectedTitleFont = UIFont(name: "PingFangSC-Regular", size: 16.0)!
     }

+ 27 - 6
o2ios/O2Platform/meeting-会议/View/accept/OOMeetingConfirmHeaderView.xib

@@ -1,18 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="OOMeetingConfirmHeaderView" customModule="o2app" customModuleProvider="target">
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="OOMeetingConfirmHeaderView" customModule="O2Platform" customModuleProvider="target">
             <rect key="frame" x="0.0" y="0.0" width="375" height="40"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
@@ -21,17 +21,38 @@
                     <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <userDefinedRuntimeAttributes>
                         <userDefinedRuntimeAttribute type="color" keyPath="selectedTitleColor">
-                            <color key="value" red="0.98431372549019602" green="0.27843137254901962" blue="0.27843137254901962" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="color" keyPath="indicatorViewBackgroundColor">
-                            <color key="value" red="0.96078431369999995" green="0.96078431369999995" blue="0.96078431369999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <color key="value" red="0.98431372549999996" green="0.2784313725" blue="0.2784313725" alpha="1" colorSpace="calibratedRGB"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="color" keyPath="indicatorViewBorderColor">
+                            <color key="value" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="number" keyPath="indicatorViewBorderWidth">
+                            <real key="value" value="0.0"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                            <color key="value" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                            <real key="value" value="0.0"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="number" keyPath="indicatorViewInset">
+                            <real key="value" value="4"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="20"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="color" keyPath="titleColor">
+                            <color key="value" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         </userDefinedRuntimeAttribute>
                     </userDefinedRuntimeAttributes>
                     <connections>
                         <action selector="betterSegmentedControlClick:" destination="iN0-l3-epB" eventType="valueChanged" id="IqG-Jn-C0r"/>
                     </connections>
                 </view>
-                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Cqg-LY-uCE">
+                <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Cqg-LY-uCE">
                     <rect key="frame" x="0.0" y="39.5" width="375" height="0.5"/>
                     <color key="backgroundColor" red="0.98431372549019602" green="0.27843137254901962" blue="0.27843137254901962" alpha="1" colorSpace="calibratedRGB"/>
                     <constraints>

+ 5 - 5
o2ios/O2Platform/meeting-会议/View/meeting/OOMeetingPersonCell.swift

@@ -30,11 +30,11 @@ class OOMeetingPersonCell: UICollectionViewCell,Configurable {
     }
     
     
-    @IBAction func delectPersonAction(_ sender: UIButton) {
-        print("delectPersonAction")
-        //发送需要删除的p
-        
-    }
+//    @IBAction func delectPersonAction(_ sender: UIButton) {
+//        print("delectPersonAction")
+//        //发送需要删除的p
+//
+//    }
     
     func config(withItem item: Any?) {
         guard let p = item as? OOPersonModel else {

+ 2 - 5
o2ios/O2Platform/meeting-会议/View/meeting/OOMeetingPersonCell.xib

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -48,9 +48,6 @@
                                         <constraint firstAttribute="height" constant="22" id="KBQ-o2-Fed"/>
                                     </constraints>
                                     <state key="normal" image="icon_delete_1"/>
-                                    <connections>
-                                        <action selector="delectPersonAction:" destination="gTV-IL-0wX" eventType="touchUpInside" id="p37-Nx-Z51"/>
-                                    </connections>
                                 </button>
                                 <visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CeS-Rg-xWT">
                                     <rect key="frame" x="0.0" y="0.0" width="50" height="50"/>

+ 54 - 0
o2ios/O2Platform/meeting-会议/View/room/OOMeetingRoomMainCell.swift

@@ -22,6 +22,10 @@ class OOMeetingRoomMainCell: UITableViewCell,Configurable {
     
     @IBOutlet weak var meetingCountLabel: UILabel!
     
+    @IBOutlet weak var rightArrowImageView: UIImageView!
+    
+    @IBOutlet weak var selectImageView: UIImageView!
+    
     override func awakeFromNib() {
         super.awakeFromNib()
         // Initialization code
@@ -60,6 +64,56 @@ class OOMeetingRoomMainCell: UITableViewCell,Configurable {
         deviceListView.deviceNameList = model.device
         //meetingCount
         meetingCountLabel.text = "\(model.meetingList?.count ?? 0)个"
+        self.selectImageView.isHidden = true
+        self.rightArrowImageView.isHidden = false
+        self.meetingCountLabel.isHidden = false
+    }
+    
+    func newConfig(withItem item: Any?, showSelected: Bool = false) {
+        guard let model = item as? OOMeetingRoomInfo else {
+            return
+        }
+        roomNameLabel.text = model.name
+        if model.available == false {
+            meetingStatusImageView.image = UIImage(named: "pic_guanbi")
+            roomNameLabel.textColor = UIColor(hex: "#999999")
+        }else{
+            if model.idle! {
+                meetingStatusImageView.image = UIImage(named: "pic_kongxian")
+                roomNameLabel.textColor = UIColor(hex: "#66CC80")
+            }else{
+                meetingStatusImageView.image = UIImage(named: "pic_yuyue")
+                roomNameLabel.theme_textColor = ThemeColorPicker(keyPath: "Base.base_color")
+            }
+        }
+        
+        //楼层:6,房间:6012
+        locationLabel.text = "楼层:\(model.floor!),房间:\(model.roomNumber!)"
+        //容纳人数:10人
+        capacityLabel.text = "容纳人数:\(model.capacity!)人"
+        //deviceViewList
+        //        let dView = OOMeetingRoomDeviceListView()
+        //        dView.deviceNameList = model.device
+        deviceListView.deviceNameList = model.device
+        //meetingCount
+        meetingCountLabel.text = "\(model.meetingList?.count ?? 0)个"
+        if showSelected {
+            self.selectImageView.isHidden = false
+            self.rightArrowImageView.isHidden = true
+            self.meetingCountLabel.isHidden = true
+        }else {
+            self.selectImageView.isHidden = true
+            self.rightArrowImageView.isHidden = false
+            self.meetingCountLabel.isHidden = false
+        }
+    }
+    
+    func selectRoom(isSelected: Bool) {
+        if isSelected {
+            self.selectImageView.image = UIImage(named: "selected")
+        }else {
+            self.selectImageView.image = UIImage(named: "unselected")
+        }
     }
     
 }

+ 15 - 3
o2ios/O2Platform/meeting-会议/View/room/OOMeetingRoomMainCell.xib

@@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
-        <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -88,15 +87,25 @@
                         <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
+                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="unselected" translatesAutoresizingMaskIntoConstraints="NO" id="0il-aQ-oBf">
+                        <rect key="frame" x="335" y="86" width="24" height="24"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="24" id="ADg-sa-OLo"/>
+                            <constraint firstAttribute="width" constant="24" id="yJj-5x-kM0"/>
+                        </constraints>
+                    </imageView>
                 </subviews>
                 <constraints>
+                    <constraint firstItem="0il-aQ-oBf" firstAttribute="leading" secondItem="7uJ-Fe-h0m" secondAttribute="trailing" constant="2" id="5X8-tn-LKH"/>
                     <constraint firstItem="VTr-24-uWu" firstAttribute="top" secondItem="hpM-v8-Ei0" secondAttribute="bottom" constant="3" id="6E7-ow-gAC"/>
                     <constraint firstItem="gsY-ZN-LnF" firstAttribute="top" secondItem="VTr-24-uWu" secondAttribute="bottom" constant="4" id="87G-Lf-XZX"/>
                     <constraint firstItem="gsY-ZN-LnF" firstAttribute="leading" secondItem="K2w-aA-daS" secondAttribute="trailing" id="AbA-NM-YoN"/>
                     <constraint firstItem="7uJ-Fe-h0m" firstAttribute="top" secondItem="VTr-24-uWu" secondAttribute="bottom" constant="4" id="FWB-a0-1Ld"/>
                     <constraint firstItem="1Jv-Dd-BZU" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" id="KEc-b0-LBZ"/>
                     <constraint firstItem="VTr-24-uWu" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" id="RIw-1E-Vny"/>
+                    <constraint firstItem="0il-aQ-oBf" firstAttribute="top" secondItem="VTr-24-uWu" secondAttribute="bottom" constant="4" id="bgX-Gg-KqU"/>
                     <constraint firstItem="HnR-dL-ggq" firstAttribute="top" secondItem="VTr-24-uWu" secondAttribute="bottom" constant="4" id="bwD-1w-6A8"/>
+                    <constraint firstAttribute="trailing" secondItem="0il-aQ-oBf" secondAttribute="trailing" constant="16" id="bzK-1A-v33"/>
                     <constraint firstItem="K2w-aA-daS" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="dbk-17-n0u"/>
                     <constraint firstItem="1Jv-Dd-BZU" firstAttribute="trailing" secondItem="H2p-sc-9uM" secondAttribute="trailingMargin" id="dli-FK-2S1"/>
                     <constraint firstItem="hpM-v8-Ei0" firstAttribute="top" secondItem="dQd-5f-rxY" secondAttribute="bottom" constant="5" id="fSH-o0-hEb"/>
@@ -120,7 +129,9 @@
                 <outlet property="locationLabel" destination="hpM-v8-Ei0" id="6SS-ps-yNM"/>
                 <outlet property="meetingCountLabel" destination="7uJ-Fe-h0m" id="9W9-T7-5mj"/>
                 <outlet property="meetingStatusImageView" destination="1Jv-Dd-BZU" id="Qji-zY-Jvx"/>
+                <outlet property="rightArrowImageView" destination="HnR-dL-ggq" id="0Oz-Bv-eVG"/>
                 <outlet property="roomNameLabel" destination="dQd-5f-rxY" id="X1C-7S-Ese"/>
+                <outlet property="selectImageView" destination="0il-aQ-oBf" id="sHm-Lc-ndG"/>
             </connections>
             <point key="canvasLocation" x="5.5" y="13"/>
         </tableViewCell>
@@ -128,5 +139,6 @@
     <resources>
         <image name="icon_arrow" width="22" height="22"/>
         <image name="pic_yuyue" width="50" height="18"/>
+        <image name="unselected" width="30" height="30"/>
     </resources>
 </document>

+ 91 - 59
o2ios/O2Platform/meeting-会议/View/room/OOMeetingRoomTableHeaderView.xib

@@ -1,89 +1,118 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
-    <customFonts key="customFonts">
-        <array key="PingFang.ttc">
-            <string>PingFangSC-Regular</string>
-        </array>
-    </customFonts>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="OOMeetingRoomTableHeaderView" customModule="o2app" customModuleProvider="target">
-            <rect key="frame" x="0.0" y="0.0" width="375" height="45"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="OOMeetingRoomTableHeaderView" customModule="O2Platform" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="375" height="81"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="日期:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6is-Fa-V44">
-                    <rect key="frame" x="10" y="8" width="37" height="21"/>
+                <stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="hG5-nM-iBm">
+                    <rect key="frame" x="10" y="8" width="355" height="25"/>
+                    <subviews>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="日期:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6is-Fa-V44">
+                            <rect key="frame" x="0.0" y="2" width="37" height="21"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="37" id="I9A-07-N9I"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/>
+                            <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ejB-Li-fF7">
+                            <rect key="frame" x="42" y="0.0" width="283" height="25"/>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="25" id="u5V-km-cuZ"/>
+                            </constraints>
+                            <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
+                            <textInputTraits key="textInputTraits"/>
+                        </textField>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_arrow2_down" translatesAutoresizingMaskIntoConstraints="NO" id="tNk-Qe-Wh8">
+                            <rect key="frame" x="330" y="0.0" width="25" height="25"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="25" id="FiH-d4-MEm"/>
+                                <constraint firstAttribute="width" constant="25" id="fdE-Tw-nyw"/>
+                            </constraints>
+                        </imageView>
+                    </subviews>
                     <constraints>
-                        <constraint firstAttribute="height" constant="21" id="F2Q-vk-xam"/>
-                        <constraint firstAttribute="width" constant="37" id="I9A-07-N9I"/>
+                        <constraint firstAttribute="height" constant="25" id="XhH-G0-3sF"/>
                     </constraints>
-                    <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/>
-                    <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aaa-JA-wzc">
-                    <rect key="frame" x="0.0" y="35" width="375" height="10"/>
-                    <color key="backgroundColor" red="0.96078431372549022" green="0.96078431372549022" blue="0.96078431372549022" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="10" id="Ibj-6w-JLq"/>
-                    </constraints>
-                </view>
-                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ejB-Li-fF7">
-                    <rect key="frame" x="47" y="7" width="167" height="25"/>
+                </stackView>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7SD-YO-t6Y">
+                    <rect key="frame" x="10" y="35" width="355" height="1"/>
                     <color key="backgroundColor" red="0.96078431369999995" green="0.96078431369999995" blue="0.96078431369999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                     <constraints>
-                        <constraint firstAttribute="width" constant="167" id="MyM-a1-avJ"/>
-                        <constraint firstAttribute="height" constant="25" id="u5V-km-cuZ"/>
+                        <constraint firstAttribute="height" constant="1" id="tq5-iE-4Tq"/>
                     </constraints>
-                    <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                    <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
-                    <textInputTraits key="textInputTraits"/>
-                </textField>
-                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="5R4-vV-h7Z">
-                    <rect key="frame" x="289" y="6" width="80" height="25"/>
-                    <color key="backgroundColor" red="0.96078431369999995" green="0.96078431369999995" blue="0.96078431369999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                </view>
+                <stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="yBT-u6-m4F">
+                    <rect key="frame" x="10" y="42" width="355" height="25"/>
+                    <subviews>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="持续时间:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="l9m-ER-88a">
+                            <rect key="frame" x="0.0" y="2" width="67" height="21"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="67" id="cHS-4H-MA4"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/>
+                            <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="5R4-vV-h7Z">
+                            <rect key="frame" x="72" y="0.0" width="253" height="25"/>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="25" id="iql-bI-Lch"/>
+                            </constraints>
+                            <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
+                            <textInputTraits key="textInputTraits"/>
+                        </textField>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_arrow2_down" translatesAutoresizingMaskIntoConstraints="NO" id="MZY-Rb-rVD">
+                            <rect key="frame" x="330" y="0.0" width="25" height="25"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="25" id="Ipw-zb-Q9c"/>
+                                <constraint firstAttribute="width" constant="25" id="gWr-R4-azx"/>
+                            </constraints>
+                        </imageView>
+                    </subviews>
                     <constraints>
-                        <constraint firstAttribute="height" constant="25" id="iql-bI-Lch"/>
+                        <constraint firstAttribute="height" constant="25" id="WHv-g8-gjM"/>
                     </constraints>
-                    <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                    <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
-                    <textInputTraits key="textInputTraits"/>
-                </textField>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="持续时间:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="l9m-ER-88a">
-                    <rect key="frame" x="222" y="9" width="67" height="21"/>
+                </stackView>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aaa-JA-wzc">
+                    <rect key="frame" x="0.0" y="69" width="375" height="10"/>
+                    <color key="backgroundColor" red="0.96078431372549022" green="0.96078431372549022" blue="0.96078431372549022" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                     <constraints>
-                        <constraint firstAttribute="height" constant="21" id="ZmW-bN-Wfz"/>
-                        <constraint firstAttribute="width" constant="67" id="cHS-4H-MA4"/>
+                        <constraint firstAttribute="height" constant="10" id="Ibj-6w-JLq"/>
                     </constraints>
-                    <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/>
-                    <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
-                    <nil key="highlightedColor"/>
-                </label>
+                </view>
             </subviews>
             <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
             <constraints>
-                <constraint firstItem="l9m-ER-88a" firstAttribute="leading" secondItem="ejB-Li-fF7" secondAttribute="trailing" constant="8" id="4w1-BS-Vyf"/>
-                <constraint firstItem="6is-Fa-V44" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="10" id="Fam-S6-pDj"/>
-                <constraint firstItem="6is-Fa-V44" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="8" id="Gei-2b-tLt"/>
-                <constraint firstItem="5R4-vV-h7Z" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="6" id="ILp-JO-OvY"/>
-                <constraint firstItem="aaa-JA-wzc" firstAttribute="bottom" secondItem="vUN-kp-3ea" secondAttribute="bottom" id="MWz-V4-rTg"/>
-                <constraint firstItem="l9m-ER-88a" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="9" id="QVe-C9-JEo"/>
+                <constraint firstItem="hG5-nM-iBm" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="10" id="2qc-du-fkP"/>
+                <constraint firstItem="yBT-u6-m4F" firstAttribute="top" secondItem="7SD-YO-t6Y" secondAttribute="bottom" constant="6" id="5gT-2U-8qf"/>
+                <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="7SD-YO-t6Y" secondAttribute="trailing" constant="10" id="5gm-AK-JWL"/>
+                <constraint firstItem="7SD-YO-t6Y" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="10" id="Agb-L8-Jjf"/>
+                <constraint firstItem="7SD-YO-t6Y" firstAttribute="top" secondItem="hG5-nM-iBm" secondAttribute="bottom" constant="2" id="Bst-8e-Z5B"/>
+                <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="hG5-nM-iBm" secondAttribute="trailing" constant="10" id="D9l-wp-HO2"/>
+                <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="yBT-u6-m4F" secondAttribute="trailing" constant="10" id="Jpz-JK-swq"/>
+                <constraint firstItem="hG5-nM-iBm" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="8" id="T3p-Rw-Fb2"/>
                 <constraint firstItem="aaa-JA-wzc" firstAttribute="trailing" secondItem="vUN-kp-3ea" secondAttribute="trailing" id="VLo-6h-Jeo"/>
-                <constraint firstItem="ejB-Li-fF7" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="7" id="WVy-VJ-vjN"/>
                 <constraint firstItem="aaa-JA-wzc" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="eaM-vH-kKP"/>
-                <constraint firstItem="5R4-vV-h7Z" firstAttribute="leading" secondItem="l9m-ER-88a" secondAttribute="trailing" id="jSJ-L0-WTH"/>
-                <constraint firstItem="ejB-Li-fF7" firstAttribute="leading" secondItem="6is-Fa-V44" secondAttribute="trailing" id="kBG-FV-w8c"/>
-                <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="5R4-vV-h7Z" secondAttribute="trailing" constant="6" id="kWq-k6-gFn"/>
+                <constraint firstItem="aaa-JA-wzc" firstAttribute="top" secondItem="yBT-u6-m4F" secondAttribute="bottom" constant="2" id="rhc-fF-kcW"/>
+                <constraint firstItem="yBT-u6-m4F" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="10" id="zcZ-9o-pRM"/>
             </constraints>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
             <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
@@ -92,7 +121,10 @@
                 <outlet property="theDateField" destination="ejB-Li-fF7" id="Bph-qc-8AI"/>
                 <outlet property="theTimeField" destination="5R4-vV-h7Z" id="AmX-Sn-hIe"/>
             </connections>
-            <point key="canvasLocation" x="27.5" y="-232.5"/>
+            <point key="canvasLocation" x="26.399999999999999" y="-216.34182908545728"/>
         </view>
     </objects>
+    <resources>
+        <image name="icon_arrow2_down" width="22" height="22"/>
+    </resources>
 </document>

+ 1 - 1
o2ios/O2Platform/meeting-会议/ViewModel/OOMeetingCreateViewModel.swift

@@ -128,7 +128,7 @@ extension OOMeetingCreateViewModel{
     }
     
     func removeSelectPerson(_ p:OOPersonModel){
-        if let i = self.selectedPersons.index(of: p) {
+        if let i = self.selectedPersons.firstIndex(of: p) {
              self.selectedPersons.remove(at:i)
         }
     }

+ 71 - 0
o2ios/O2Platform/meeting-会议/ViewModel/OOMeetingMainViewModel.swift

@@ -14,6 +14,9 @@ import Promises
 class OOMeetingMainViewModel: NSObject {
     //HTTP API
     private let o2MeetingAPI = OOMoyaProvider<O2MeetingAPI>()
+    private let o2PersonalAPI = OOMoyaProvider<PersonalAPI>()
+    private let o2ProcessAPI = OOMoyaProvider<OOApplicationAPI>()
+    
     //所有本月所有会议
     private var meetingsByMonth:[OOMeetingInfo] = [] {
         didSet {
@@ -50,6 +53,73 @@ class OOMeetingMainViewModel: NSObject {
 
 extension OOMeetingMainViewModel {
     
+    //获取会议配置信息
+    func loadMeetingConfig() -> Promise<OOMeetingConfigInfo> {
+        return Promise { fulfill, reject in
+            self.o2PersonalAPI.request(.meetingConfig, completion: { (result) in
+                let config = OOResult<BaseModelClass<String>>(result)
+                if config.isResultSuccess() {
+                    if let jsonString = config.model?.data {
+                        if let info = OOMeetingConfigInfo.deserialize(from: jsonString) {
+                            fulfill(info)
+                        }else {
+                            reject(OOAppError.jsonMapping(message: "json解析异常", statusCode: 1024, data: nil))
+                        }
+                    } else {
+                        reject(OOAppError.apiResponseError("返回数据是空"))
+                    }
+                }else {
+                    reject(config.error!)
+                }
+            })
+            
+        }
+    }
+    
+    //会议流程对应的身份信息
+    func loadMeetingProcess(processId: String) -> Promise<[OOMeetingProcessIdentity]> {
+        return Promise { fulfill, reject in
+            self.o2ProcessAPI.request(.availableIdentityWithProcess(processId), completion: { (result) in
+                let myResult = OOResult<BaseModelClass<[OOMeetingProcessIdentity]>>(result)
+                if myResult.isResultSuccess() {
+                    if let item = myResult.model?.data {
+                        fulfill(item)
+                    }else{
+                        let customError = OOAppError.common(type: "会议异常", message: "会议流程身份读取错误", statusCode: 7001)
+                        reject(customError)
+                    }
+                }else{
+                    reject(myResult.error!)
+                }
+            })
+        }
+    }
+    
+    //启动会议流程
+    func startProcess(processId: String, identity: String) -> Promise<[TodoTaskData]> {
+        return Promise { fulfill, reject in
+            self.o2ProcessAPI.request(.startProcess(processId, identity, ""), completion: { (result) in
+                let myResult = OOResult<BaseModelClass<[StartProcessData]>>(result)
+                if myResult.isResultSuccess() {
+                     if let item = myResult.model?.data {
+                        if let taskList = item[0].taskList {
+                            fulfill(taskList)
+                        }else {
+                            let customError = OOAppError.common(type: "启动会议流程异常", message: "启动会议流程异常", statusCode: 7001)
+                            reject(customError)
+                        }
+                     }else {
+                        let customError = OOAppError.common(type: "启动会议流程异常", message: "启动会议流程异常", statusCode: 7001)
+                        reject(customError)
+                    }
+                } else {
+                     reject(myResult.error!)
+                }
+            })
+        }
+    }
+    
+
     // MARK:- 读取会议室信息
     func loadMeetingRoomById(_ roomId:String) -> Promise<OOMeetingRoomInfo> {
         return Promise { fulfill,reject in
@@ -70,6 +140,7 @@ extension OOMeetingMainViewModel {
         }
     }
     
+    
     func loadMeetingRoomById(_ roomId:String,completed:@escaping (_ room:OOMeetingRoomInfo?) -> Void){
         o2MeetingAPI.request(.roomItemById(roomId)) { (result) in
             let myResult = OOResult<BaseModelClass<OOMeetingRoomInfo>>(result)

+ 6 - 2
o2ios/O2Platform/meeting-会议/meeting.storyboard

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="wSi-n3-2Nh">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="wSi-n3-2Nh">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -208,6 +208,7 @@
                         <outlet property="ooPersonCollectionView" destination="rKZ-tL-7bA" id="WVi-yx-oNR"/>
                         <outlet property="topLayouConstraint" destination="uH9-6Y-G6K" id="wh4-bC-P4e"/>
                         <segue destination="VXJ-tL-8ic" kind="presentation" identifier="showPersonSelectedSegue" id="3c1-8o-qOu"/>
+                        <segue destination="VTD-mP-cJf" kind="show" identifier="showPickerRoom" id="tQL-f1-ym1"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="cC9-lv-qiD" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -290,4 +291,7 @@
         <image name="icon_zjhy_nor" width="22" height="22"/>
         <image name="icon_zjhy_pro" width="22" height="22"/>
     </resources>
+    <inferredMetricsTieBreakers>
+        <segue reference="tQL-f1-ym1"/>
+    </inferredMetricsTieBreakers>
 </document>

+ 1 - 0
o2ios/O2Platform/task/c/TodoTaskDetailViewController.swift

@@ -899,6 +899,7 @@ extension TodoTaskDetailViewController: O2WKScriptMessageHandlerImplement {
     }
     private func showAttachViewInController(_ infoURL:String,_ downURL:String){
         self.showMessage(title: "下载中...")
+        DDLogDebug("infoUrl:\(infoURL) ,down url:\(downURL)")
         Alamofire.request(infoURL).responseJSON { (response) in
             switch response.result {
             case .success(let val):

+ 5 - 8
o2ios/O2Platform/task/m/O2WebViewModels.swift

@@ -149,12 +149,9 @@ struct O2BizComplexPickerResults: HandyJSON {
     var results: [String]?
 }
 struct O2BizContactPickerResult: HandyJSON {
-    var departments: [O2BizContactPickerResultItem]?
-    var identities: [O2BizContactPickerResultItem]?
-    var groups: [O2BizContactPickerResultItem]?
-    var users: [O2BizContactPickerResultItem]?
-}
-struct O2BizContactPickerResultItem: HandyJSON {
-    var distinguishedName: String?
-    var name: String?
+    var departments: [O2UnitPickerItem]?
+    var identities: [O2IdentityPickerItem]?
+    var groups: [O2GroupPickerItem]?
+    var users: [O2PersonPickerItem]?
 }
+

+ 66 - 0
o2ios/O2Platform/task/m/TodoTask.swift

@@ -58,6 +58,72 @@ class WorkControl: NSObject, Mappable {
     }
 }
 
+class StartProcessData: NSObject,DataModel {
+    var currentTaskIndex: Int?
+    @objc var createTime:String?
+    @objc var updateTime:String?
+    @objc var id:String?
+    var completed:Bool?
+    @objc var fromActivity:String?
+    @objc var fromActivityType:String?
+    @objc var fromActivityName:String?
+    @objc var fromActivityToken:String?
+    @objc var fromTime:String?
+    var connected:Bool?
+    var splitting:Bool?
+    @objc var splitTokenList:[String]?
+    @objc var taskList: [TodoTaskData]?
+    
+    required override init() {
+        
+    }
+}
+
+
+class TodoTaskData: NSObject,DataModel {
+    
+    @objc var id:String?
+    @objc var updateTime:String?
+    @objc var job:String?
+    @objc var title:String?
+    @objc var startTime:String?
+    @objc var work:String?
+    @objc var application:String?
+    @objc var applicationName:String?
+    @objc var process:String?
+    @objc var processName:String?
+    @objc var person:String?
+    @objc var identity:String?
+    @objc var department:String?
+    var completed:Bool?
+    @objc var workCompleted:String?
+    @objc var company:String?
+    @objc var activity:String?
+    @objc var activityName:String?
+    @objc var activityType:String?
+    @objc var activityToken:String?
+    @objc var routeList:String?
+    @objc var routeNameList:String?
+    
+   
+    override var description: String {
+        return "task:[\(id),\(title),\(job),\(work)]"
+    }
+    
+    required override init() {
+        
+    }
+    
+    func copyToTodoTask() -> TodoTask? {
+        if let json = self.toJSON() {
+            return TodoTask.init(JSON: json)
+        }else {
+            return nil
+        }
+    }
+    
+}
+
 class TodoTask:NSObject,Mappable {
     
     var id:String?