Переглянути джерело

Merge branch 'fix/ios_attachment_crash_bug' into 'develop'

修复ios13考勤打不开的bug,会议的bug,黑条的bug

See merge request o2oa/o2oa!594
楼国栋 5 роки тому
батько
коміт
c359c5c344
25 змінених файлів з 403 додано та 103 видалено
  1. 2 0
      o2ios/O2Platform.xcodeproj/project.pbxproj
  2. 98 0
      o2ios/O2Platform.xcodeproj/xcshareddata/xcschemes/O2Platform.xcscheme
  3. 2 0
      o2ios/O2Platform/App/Applications/c/O2AppViewController.swift
  4. 1 1
      o2ios/O2Platform/App/Login-绑定登录/c/LoginViewController.swift
  5. 2 2
      o2ios/O2Platform/App/Login-绑定登录/login.storyboard
  6. 10 6
      o2ios/O2Platform/App/NewAttance-考勤打卡/c/OOAttanceCheckInController.swift
  7. 35 25
      o2ios/O2Platform/App/NewAttance-考勤打卡/c/OOAttanceSettingController.swift
  8. 2 2
      o2ios/O2Platform/App/NewAttance-考勤打卡/c/OOAttanceTotalController.swift
  9. 7 7
      o2ios/O2Platform/App/NewAttance-考勤打卡/c/OONewAttanceController.swift
  10. 3 20
      o2ios/O2Platform/App/NewAttance-考勤打卡/checkin.storyboard
  11. 10 5
      o2ios/O2Platform/App/NewAttance-考勤打卡/v/OOAttanceHeaderView.swift
  12. 9 5
      o2ios/O2Platform/App/Work-工作/c/MainTaskSecondViewController.swift
  13. 40 3
      o2ios/O2Platform/App/Work-工作/c/TaskCreateViewController.swift
  14. 70 16
      o2ios/O2Platform/App/Work-工作/c/TodoTaskDetailViewController.swift
  15. 41 5
      o2ios/O2Platform/App/Work-工作/c/category/ZoneMenuViewController.swift
  16. 2 0
      o2ios/O2Platform/App/Work-工作/m/AppProcess.swift
  17. 2 0
      o2ios/O2Platform/App/Work-工作/m/Application.swift
  18. 39 0
      o2ios/O2Platform/App/Work-工作/m/CreateProcessBean.swift
  19. 11 4
      o2ios/O2Platform/App/meeting-会议/Controller/OOMeetingCreateViewController.swift
  20. 8 1
      o2ios/O2Platform/App/meeting-会议/Controller/OOMeetingInforController.swift
  21. 1 1
      o2ios/O2Platform/App/meeting-会议/ViewModel/OOMeetingCreateViewModel.swift
  22. 4 0
      o2ios/O2Platform/Extension/String+Extenstion.swift
  23. 1 0
      o2ios/O2Platform/UI/OOTabBarHelper.swift
  24. 1 0
      o2ios/O2Platform/config/O2.swift
  25. 2 0
      o2ios/O2Platform/config/O2URLContext.swift

+ 2 - 0
o2ios/O2Platform.xcodeproj/project.pbxproj

@@ -6711,6 +6711,7 @@
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE = "9ebefd7c-6117-4bee-a96c-7ddb06ad4c6f";
 				PROVISIONING_PROFILE_SPECIFIER = ZheJiangOfficeWorkMngDevProfile;
+				SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
 				SWIFT_ENFORCE_EXCLUSIVE_ACCESS = none;
 				SWIFT_OBJC_BRIDGING_HEADER = "O2Platform/O2Platform-Bridging-Header.h";
 				SWIFT_OBJC_INTERFACE_HEADER_NAME = "";
@@ -6825,6 +6826,7 @@
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE = "b23067fd-fb08-4b85-8255-d8f3d25abc8a";
 				PROVISIONING_PROFILE_SPECIFIER = ZheJiangOfficeWorkMngDisProfile;
+				SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
 				SWIFT_ENFORCE_EXCLUSIVE_ACCESS = none;
 				SWIFT_OBJC_BRIDGING_HEADER = "O2Platform/O2Platform-Bridging-Header.h";
 				SWIFT_OBJC_INTERFACE_HEADER_NAME = "";

+ 98 - 0
o2ios/O2Platform.xcodeproj/xcshareddata/xcschemes/O2Platform.xcscheme

@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "1140"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "E4B887121D9D477A002E1A46"
+               BuildableName = "O2Platform.app"
+               BlueprintName = "O2Platform"
+               ReferencedContainer = "container:O2Platform.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <Testables>
+         <TestableReference
+            skipped = "NO">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "E4B887261D9D477A002E1A46"
+               BuildableName = "O2PlatformTests.xctest"
+               BlueprintName = "O2PlatformTests"
+               ReferencedContainer = "container:O2Platform.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
+         <TestableReference
+            skipped = "NO">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "E4B887311D9D477A002E1A46"
+               BuildableName = "O2PlatformUITests.xctest"
+               BlueprintName = "O2PlatformUITests"
+               ReferencedContainer = "container:O2Platform.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
+      </Testables>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "E4B887121D9D477A002E1A46"
+            BuildableName = "O2Platform.app"
+            BlueprintName = "O2Platform"
+            ReferencedContainer = "container:O2Platform.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Release"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "E4B887121D9D477A002E1A46"
+            BuildableName = "O2Platform.app"
+            BlueprintName = "O2Platform"
+            ReferencedContainer = "container:O2Platform.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 2 - 0
o2ios/O2Platform/App/Applications/c/O2AppViewController.swift

@@ -75,6 +75,7 @@ class O2AppViewController: UIViewController{
     
     override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
         if segue.identifier == "showMailSegue" {
+            segue.destination.modalPresentationStyle = .fullScreen
             if let nav = segue.destination as? ZLNavigationController {
                 nav.viewControllers.forEach { (vc) in
                     if vc is MailViewController {
@@ -164,6 +165,7 @@ extension O2AppViewController:ZLCollectionViewDelegate{
                             AppConfigSettings.shared.taskIndex = 0
                         }
                     }
+                    destVC.modalPresentationStyle = .fullScreen
                     if destVC.isKind(of: ZLNavigationController.self) {
                         DDLogInfo("cloudFIle 进来了?")
                         self.show(destVC, sender: nil)

+ 1 - 1
o2ios/O2Platform/App/Login-绑定登录/c/LoginViewController.swift

@@ -200,7 +200,7 @@ class LoginViewController: UIViewController {
     //登录后返回执行此方法
     
     override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
-        
+        segue.destination.modalPresentationStyle = .fullScreen
     }
     
     deinit {

+ 2 - 2
o2ios/O2Platform/App/Login-绑定登录/login.storyboard

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="2FW-oB-Z7W">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="2FW-oB-Z7W">
     <device id="retina4_7" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15509"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>

+ 10 - 6
o2ios/O2Platform/App/NewAttance-考勤打卡/c/OOAttanceCheckInController.swift

@@ -35,6 +35,7 @@ class OOAttanceCheckInController: UITableViewController {
     
     override func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(animated)
+        headerView.startBMKMapViewService()
         NotificationCenter.default.addObserver(self, selector: #selector(locationReceive(_:)), name: OONotification.location.notificationName, object: nil)
         if myButton != nil {
             myButton.isHidden = false
@@ -43,6 +44,7 @@ class OOAttanceCheckInController: UITableViewController {
     
     override func viewWillDisappear(_ animated: Bool) {
         super.viewWillDisappear(animated)
+        headerView.stopBMKMapViewService()
         NotificationCenter.default.removeObserver(self)
         if myButton != nil {
             myButton.isHidden = true
@@ -54,13 +56,14 @@ class OOAttanceCheckInController: UITableViewController {
         super.viewDidAppear(animated)
         getWorkPlace()
     }
+    
 
    
     override func viewDidLoad() {
         super.viewDidLoad()
-        title = "打卡"
-        headerView.startBMKMapViewService()
-        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "关闭", style: .plain, target: self, action: #selector(closeWindow))
+//        title = "打卡"
+        
+//        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "关闭", style: .plain, target: self, action: #selector(closeWindow))
         //tableView.tableHeaderView = headerView
         //tableView.contentInset = UIEdgeInsets(top: 230, left: 0, bottom: 0, right: 0)
         //register Cell
@@ -70,6 +73,7 @@ class OOAttanceCheckInController: UITableViewController {
         self.perform(#selector(createButton), with: nil, afterDelay: 0)
     }
     
+    
     @objc func closeWindow() {
         self.tabBarController?.navigationController?.dismiss(animated: true, completion: nil)
     }
@@ -248,7 +252,7 @@ class OOAttanceCheckInController: UITableViewController {
     }
     
     
-    deinit {
-         headerView.stopBMKMapViewService()
-    }
+//    deinit {
+//         headerView.stopBMKMapViewService()
+//    }
 }

+ 35 - 25
o2ios/O2Platform/App/NewAttance-考勤打卡/c/OOAttanceSettingController.swift

@@ -37,13 +37,13 @@ class OOAttanceSettingController: UIViewController {
     
     override func viewDidLoad() {
         super.viewDidLoad()
-        title = "设置"
-        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "关闭", style: .plain, target: self, action: #selector(closeWindow))
-        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "地点管理", style: .plain, target: self, action: #selector(navWorkPlaceManager(_:)))
+//        title = "设置"
+//        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "关闭", style: .plain, target: self, action: #selector(closeWindow))
+//        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "地点管理", style: .plain, target: self, action: #selector(navWorkPlaceManager(_:)))
         loadAdmin()
         //增加mapView
-        commonDataView()
         commonMapView()
+        commonDataView()
         
     }
     
@@ -153,11 +153,9 @@ class OOAttanceSettingController: UIViewController {
     }
     
     func commonDataView() {
-        let window = UIApplication.shared.windows[0]
-        //let barHeight = self.cyl_tabBarController.tabBarHeight
+        let window = UIApplication.shared.windows.last
         dataView.frame = CGRect(x: 0, y: SCREEN_HEIGHT - 125 - 50, width: SCREEN_WIDTH, height: 125)
-        //view.insertSubview(dataView, aboveSubview: mapView)
-        window.addSubview(dataView)
+        window?.addSubview(dataView)
     }
     
     
@@ -204,7 +202,7 @@ extension OOAttanceSettingController:BMKMapViewDelegate {
         let re = BMKReverseGeoCodeSearchOption()
         re.location = coordinate
         let flag = searchAddress.reverseGeoCode(re)
-        DDLogDebug("searchAddress \(flag)")
+        DDLogDebug("coordinate searchAddress \(flag)")
     }
     
     
@@ -213,7 +211,7 @@ extension OOAttanceSettingController:BMKMapViewDelegate {
         let coordinate = mapPoi.pt
         re.location = coordinate
         let flag = searchAddress.reverseGeoCode(re)
-        DDLogDebug("searchAddress \(flag)")
+        DDLogDebug("mapPoi searchAddress \(flag)")
         
     }
     
@@ -224,23 +222,35 @@ extension OOAttanceSettingController:BMKMapViewDelegate {
 
 extension OOAttanceSettingController:BMKLocationManagerDelegate {
     
-    func willStartLocatingUser() {
-        DDLogDebug("willStartLocatingUser")
-        MBProgressHUD_JChat.showMessage(message:"正在定位中,请稍候", toView: self.mapView)
-    }
-    
-    func didUpdate(_ userLocation: BMKUserLocation!) {
-        DDLogDebug("当前位置,\(userLocation.location.coordinate.latitude),\(userLocation.location.coordinate.longitude)")
-        mapView.updateLocationData(userLocation)
-        mapView.centerCoordinate = userLocation.location.coordinate
-        //定位完成停止定位
-        locService.stopUpdatingLocation()
+//    func willStartLocatingUser() {
+//        DDLogDebug("willStartLocatingUser")
+//        MBProgressHUD_JChat.showMessage(message:"正在定位中,请稍候", toView: self.mapView)
+//    }
+    func bmkLocationManager(_ manager: BMKLocationManager, didUpdate location: BMKLocation?, orError error: Error?) {
+        if let loc = location?.location {
+           DDLogDebug("设置 当前位置,\(loc.coordinate.latitude),\(loc.coordinate.longitude)")
+           let user = BMKUserLocation()
+           user.location = loc
+           mapView.updateLocationData(user)
+           mapView.centerCoordinate = CLLocationCoordinate2D(latitude: loc.coordinate.latitude, longitude: loc.coordinate.longitude)
+            
+           //定位完成停止定位
+           locService.stopUpdatingLocation()
+        }
     }
     
-    func didStopLocatingUser() {
-        
-        MBProgressHUD_JChat.hide(forView: self.mapView, animated: true)
-    }
+//    func didUpdate(_ userLocation: BMKUserLocation!) {
+//        DDLogDebug("当前位置,\(userLocation.location.coordinate.latitude),\(userLocation.location.coordinate.longitude)")
+//        mapView.updateLocationData(userLocation)
+//        mapView.centerCoordinate = userLocation.location.coordinate
+//        //定位完成停止定位
+//        locService.stopUpdatingLocation()
+//    }
+//
+//    func didStopLocatingUser() {
+//
+//        MBProgressHUD_JChat.hide(forView: self.mapView, animated: true)
+//    }
 }
 
 extension OOAttanceSettingController:BMKGeoCodeSearchDelegate {

+ 2 - 2
o2ios/O2Platform/App/NewAttance-考勤打卡/c/OOAttanceTotalController.swift

@@ -25,10 +25,10 @@ class OOAttanceTotalController: UITableViewController {
         
     override func viewDidLoad() {
         super.viewDidLoad()
-        title = "统计"
+//        title = "统计"
         NotificationCenter.default.addObserver(self, selector: #selector(showDatePicker(_:)), name: OONotification.staticsTotal.notificationName, object: nil)
         tableView.register(UINib.init(nibName: "OOAttandanceTotalItemCell", bundle: nil), forCellReuseIdentifier: "OOAttandanceTotalItemCell")
-        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "关闭", style: .plain, target: self, action: #selector(closeWindow))
+//        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "关闭", style: .plain, target: self, action: #selector(closeWindow))
         let currentDate = Date()
         let year = String(currentDate.year)
         let month = currentDate.month > 9 ? "\(currentDate.month)" : "0\(currentDate.month)"

+ 7 - 7
o2ios/O2Platform/App/NewAttance-考勤打卡/c/OONewAttanceController.swift

@@ -44,17 +44,17 @@ public class OONewAttanceController: UITabBarController, UITabBarControllerDeleg
    private static let myViewControllers: [UIViewController] = {
         //打卡
         let vc1 = OOAttanceCheckInController(nibName: "OOAttanceCheckInController", bundle: nil)
-        let nav1 = ZLNavigationController(rootViewController: vc1)
-        nav1.tabBarItem = UITabBarItem(title: "打卡", image: UIImage(named: "icon_daka_nor"), selectedImage: O2ThemeManager.image(for: "Icon.at_daka")!)
+//        let nav1 = ZLNavigationController(rootViewController: vc1)
+        vc1.tabBarItem = UITabBarItem(title: "打卡", image: UIImage(named: "icon_daka_nor"), selectedImage: O2ThemeManager.image(for: "Icon.at_daka")!)
         //统计
         let vc2 = OOAttanceTotalController(nibName: "OOAttanceTotalController", bundle: nil)
-        let nav2 = ZLNavigationController(rootViewController: vc2)
-        nav2.tabBarItem = UITabBarItem(title: "统计", image: UIImage(named: "icon_tongji_nor"), selectedImage: O2ThemeManager.image(for: "Icon.at_tongji")!)
+//        let nav2 = ZLNavigationController(rootViewController: vc2)
+        vc2.tabBarItem = UITabBarItem(title: "统计", image: UIImage(named: "icon_tongji_nor"), selectedImage: O2ThemeManager.image(for: "Icon.at_tongji")!)
         //设置
         let vc3 = OOAttanceSettingController(nibName: "OOAttanceSettingController", bundle: nil)
-        let nav3 = ZLNavigationController(rootViewController: vc3)
-        nav3.tabBarItem = UITabBarItem(title: "设置", image: UIImage(named: "icon_setup_nor"), selectedImage: O2ThemeManager.image(for: "Icon.at_setting")!)
-        return [nav1,nav2,nav3]
+//        let nav3 = ZLNavigationController(rootViewController: vc3)
+        vc3.tabBarItem = UITabBarItem(title: "设置", image: UIImage(named: "icon_setup_nor"), selectedImage: O2ThemeManager.image(for: "Icon.at_setting")!)
+        return [vc1,vc2,vc3]
     }()
 
     

+ 3 - 20
o2ios/O2Platform/App/NewAttance-考勤打卡/checkin.storyboard

@@ -1,11 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="a7I-UG-59Q">
-    <device id="retina4_7" orientation="portrait">
-        <adaptation id="fullscreen"/>
-    </device>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="4UB-xR-X6P">
+    <device id="retina4_7" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
@@ -24,20 +22,5 @@
             </objects>
             <point key="canvasLocation" x="212" y="-76"/>
         </scene>
-        <!--Navigation Controller-->
-        <scene sceneID="Lkw-De-GDw">
-            <objects>
-                <navigationController hidesBottomBarWhenPushed="YES" navigationBarHidden="YES" id="a7I-UG-59Q" customClass="ZLNavigationController" customModule="O2Platform" customModuleProvider="target" sceneMemberID="viewController">
-                    <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="Tvf-11-wiX">
-                        <autoresizingMask key="autoresizingMask"/>
-                    </navigationBar>
-                    <connections>
-                        <segue destination="4UB-xR-X6P" kind="relationship" relationship="rootViewController" id="ZUt-ji-9Ee"/>
-                    </connections>
-                </navigationController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="pHm-MZ-Xva" userLabel="First Responder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="-646" y="-76"/>
-        </scene>
     </scenes>
 </document>

+ 10 - 5
o2ios/O2Platform/App/NewAttance-考勤打卡/v/OOAttanceHeaderView.swift

@@ -29,17 +29,17 @@ class OOAttanceHeaderView: UIView {
     
     override init(frame: CGRect) {
         super.init(frame: frame)
-        //commonInit()
+        commonInit()
     }
     
     required init?(coder aDecoder: NSCoder) {
         super.init(coder: aDecoder)
-        //commonInit()
+        commonInit()
     }
     
-    func startBMKMapViewService(){
+    func commonInit() {
         mapView = BMKMapView(frame: CGRect(x: 0, y: 0, width: SCREEN_WIDTH, height: 280))
-        mapView.delegate = self
+        
         mapView.showsUserLocation = true
         mapView.isSelectedAnnotationViewFront = true
         mapView.showMapScaleBar = true
@@ -52,6 +52,11 @@ class OOAttanceHeaderView: UIView {
         self.backgroundColor = UIColor.white
         self.addSubview(mapView)
         
+    }
+    
+    func startBMKMapViewService(){
+        
+        mapView.delegate = self
         
         locService =  BMKLocationManager()
         locService.desiredAccuracy = kCLLocationAccuracyBest
@@ -107,7 +112,7 @@ class OOAttanceHeaderView: UIView {
         let annotation = BMKPointAnnotation()
         let longitude  = Double((workPlace.longitude)!)
         let latitude  = Double((workPlace.latitude)!)
-        DDLogDebug("placeAlias=\(workPlace.placeAlias ?? ""),longitude=\(longitude),latitude=\(latitude)")
+        DDLogDebug("placeAlias=\(workPlace.placeAlias ?? ""),longitude=\(String(describing: longitude)),latitude=\(latitude)")
         annotation.coordinate = CLLocationCoordinate2DMake(latitude!,longitude!);
         annotation.title = workPlace.placeAlias ?? ""
         annotation.subtitle = workPlace.placeName ?? ""

+ 9 - 5
o2ios/O2Platform/App/Work-工作/c/MainTaskSecondViewController.swift

@@ -459,11 +459,15 @@ extension MainTaskSecondViewController:UITableViewDataSource,UITableViewDelegate
     }
     
     private func forwardTodoTaskDetail(_ todoTask:TodoTask){
+        DDLogError("反反复复。。。。。。")
         let taskStoryboard = UIStoryboard(name: "task", bundle: Bundle.main)
         let todoTaskDetailVC = taskStoryboard.instantiateViewController(withIdentifier: "todoTaskDetailVC") as! TodoTaskDetailViewController
         todoTaskDetailVC.todoTask = todoTask
         todoTaskDetailVC.backFlag = 3
-        self.navigationController?.pushViewController(todoTaskDetailVC, animated: true)
+        todoTaskDetailVC.modalPresentationStyle = .fullScreen
+//        self.show(todoTaskDetailVC, sender: nil)
+//        self.presentVC(todoTaskDetailVC)
+        self.navigationController?.pushViewController(todoTaskDetailVC, animated: false)
     }
 }
 //分类显示点击代理
@@ -551,7 +555,7 @@ extension MainTaskSecondViewController:NewMainAppTableViewCellDelegate{
                 if destVC.isKind(of: ZLNavigationController.self) {
                     self.show(destVC, sender: nil)
                 }else{
-                    self.navigationController?.pushViewController(destVC, animated: true)
+                    self.navigationController?.pushViewController(destVC, animated: false)
                 }
                 
             }
@@ -594,7 +598,7 @@ extension MainTaskSecondViewController:ImageSlidesShowViewDelegate{
                     DDLogError(JSON(val).description)
                 }
             case .failure(let err):
-                DDLogDebug(err as! String)
+                DDLogError(err.localizedDescription)
             }
         }
     }
@@ -604,8 +608,8 @@ extension MainTaskSecondViewController:ImageSlidesShowViewDelegate{
         let destVC = bbsStoryboard.instantiateViewController(withIdentifier: "CMSSubjectDetailVC") as! CMSItemDetailViewController
         destVC.documentId = entity.infoId
         destVC.title = entity.title
-        //self.navigationController?.navigationBar.isHidden = false
-        self.pushVC(destVC)
+        destVC.modalPresentationStyle = .fullScreen
+        self.navigationController?.pushViewController(destVC, animated: false)
 
     }
 }

+ 40 - 3
o2ios/O2Platform/App/Work-工作/c/TaskCreateViewController.swift

@@ -135,15 +135,21 @@ class TaskCreateViewController: FormViewController {
                     self.showError(title: "请选择身份")
                     return
                 }
-                self.createProcess(identity: id.distinguishedName!)
+                
+                if let mode = self.process?.defaultStartMode, mode == O2.O2_Word_draft_mode {
+                    self.createDraft(processId: self.process!.id!, identity: id.distinguishedName!)
+                }else {
+                    self.createProcess(processId: self.process!.id!, identity: id.distinguishedName!)
+                }
             })
     }
     
-    func createProcess(identity:String){
+    //开启流程 创建工作
+    func createProcess(processId: String, identity:String){
         let bean = CreateProcessBean()
         bean.title = ""//不需要标题
         bean.identity = identity
-        let createURL = AppDelegate.o2Collect.generateURLWithAppContextKey(WorkContext.workContextKey, query: WorkContext.workCreateQuery, parameter: ["##id##":(process?.id)! as AnyObject])
+        let createURL = AppDelegate.o2Collect.generateURLWithAppContextKey(WorkContext.workContextKey, query: WorkContext.workCreateQuery, parameter: ["##id##":processId as AnyObject])
         self.showLoading(title: "创建中,请稍候...")
         Alamofire.request(createURL!,method:.post, parameters: bean.toJSON(), encoding: JSONEncoding.default, headers: nil).responseJSON { response in
             debugPrint(response.result)
@@ -171,6 +177,37 @@ class TaskCreateViewController: FormViewController {
         }
     }
        
+    //创建草稿
+   private func createDraft(processId: String, identity: String) {
+       let bean = CreateProcessBean()
+              bean.title = ""
+              bean.identity = identity
+       let draftCreateUrl = AppDelegate.o2Collect.generateURLWithAppContextKey(WorkContext.workContextKey, query: WorkContext.draftWorkCreateQuery, parameter: ["##processId##":processId as AnyObject])
+       self.showLoading(title: "创建中,请稍候...")
+       Alamofire.request(draftCreateUrl!,method:.post, parameters: bean.toJSON(), encoding: JSONEncoding.default, headers: nil).responseJSON { response in
+           
+           switch response.result {
+           case .success(let val):
+               let draftData = JSON(val)["data"]
+               DDLogDebug(draftData.description)
+               if let draft = Mapper<ProcessDraftBean>().map(JSONString:draftData["work"].debugDescription) {
+                   let taskStoryboard = UIStoryboard(name: "task", bundle: Bundle.main)
+                   let todoTaskDetailVC = taskStoryboard.instantiateViewController(withIdentifier: "todoTaskDetailVC") as! TodoTaskDetailViewController
+                   todoTaskDetailVC.draft = draft
+                   todoTaskDetailVC.backFlag = 1
+                   self.navigationController?.pushViewController(todoTaskDetailVC, animated: true)
+                   DispatchQueue.main.async {
+                       self.hideLoading()
+                   }
+               } else {
+                   self.showError(title: "创建失败")
+               }
+           case .failure(let err):
+               DDLogError(err.localizedDescription)
+               self.showError(title: "创建失败")
+           }
+       }
+   }
 
     
 }

+ 70 - 16
o2ios/O2Platform/App/Work-工作/c/TodoTaskDetailViewController.swift

@@ -28,6 +28,7 @@ struct TodoTaskJS {
     static let DATA_WORK = "JSON.encode(layout.appForm.businessData.work);"
     static let DATA_BUSINESS = "JSON.encode(layout.appForm.getData());"
     static let CHECK_FORM = "layout.appForm.formValidation(null, null)"
+    static let CLOSE_WORK = "layout.app.appForm.finishOnMobile()"
 
     static func getDataWithJS(_ webView:UIWebView,jscode:String) -> [String:AnyObject] {
         let str = webView.stringByEvaluatingJavaScript(from: jscode)
@@ -68,6 +69,7 @@ class TodoTaskDetailViewController: BaseWebViewUIViewController {
     
     var hasToolbar:Bool = false
     
+    //任务模式
     var todoTask:TodoTask? {
         didSet {
             var url:String?
@@ -83,6 +85,15 @@ class TodoTaskDetailViewController: BaseWebViewUIViewController {
             self.loadUrl = url
         }
     }
+    //草稿模式
+    var draft: ProcessDraftBean? {
+        didSet {
+            if let json = draft?.toJSONString() {
+                self.loadUrl =  AppDelegate.o2Collect.genrateURLWithWebContextKey(DesktopContext.DesktopContextKey, query: DesktopContext.todoDraftQuery, parameter: ["##draft##":json as AnyObject])
+            }
+            
+        }
+    }
     
     var myTask: [String : AnyObject]?
     var myRead: [String : AnyObject]?
@@ -95,7 +106,7 @@ class TodoTaskDetailViewController: BaseWebViewUIViewController {
         super.viewDidLoad()
         // 返回按钮重新定义
         self.navigationItem.hidesBackButton = true
-        self.navigationItem.leftBarButtonItem = UIBarButtonItem(image: UIImage(named: "icon_fanhui"), style: .plain, target: self, action: #selector(goBack))
+        self.navigationItem.leftBarButtonItem = UIBarButtonItem(image: UIImage(named: "icon_fanhui"), style: .plain, target: self, action: #selector(closeForBackBtn))
         self.navigationItem.leftItemsSupplementBackButton = true
         // 文档查看器
         self.qlController.dataSource = qlController
@@ -105,10 +116,12 @@ class TodoTaskDetailViewController: BaseWebViewUIViewController {
         //toolbar
         self.toolbarView = UIToolbar(frame: CGRect(x: 0, y: self.view.height - 44, width: self.view.width, height: 44))
        
-        self.automaticallyAdjustsScrollViewInsets = false
+        
         myTitle = todoTask?.title
-        if myTitle != nil {
+        if myTitle?.isBlank == false  {
             title = myTitle
+        }else if todoTask?.processName?.isBlank == false {
+            title = todoTask?.processName
         }
         
         //添加工作页面特殊的js处理
@@ -126,7 +139,11 @@ class TodoTaskDetailViewController: BaseWebViewUIViewController {
         super.viewWillAppear(animated)
         //监控进度
         webView.addObserver(self, forKeyPath: "estimatedProgress", options: .new, context: nil)
-       
+       if #available(iOS 13.0, *) {
+           DispatchQueue.main.async {
+               self.navigationController?.navigationBar.setNeedsLayout()
+           }
+       }
     }
     
     override func viewWillDisappear(_ animated: Bool) {
@@ -139,15 +156,23 @@ class TodoTaskDetailViewController: BaseWebViewUIViewController {
         super.theWebView()
         self.webViewContainer.addSubview(self.webView)
         self.webView.translatesAutoresizingMaskIntoConstraints = false
-        let top = NSLayoutConstraint(item: self.webView, attribute: NSLayoutConstraint.Attribute.top, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.webViewContainer, attribute: NSLayoutConstraint.Attribute.top, multiplier: 1, constant: 0)
-        let bottom = NSLayoutConstraint(item: self.webView, attribute: NSLayoutConstraint.Attribute.bottom, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.webViewContainer, attribute: NSLayoutConstraint.Attribute.bottom, multiplier: 1, constant: 0)
-        let trailing = NSLayoutConstraint(item: self.webView, attribute: NSLayoutConstraint.Attribute.trailing, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.webViewContainer, attribute: NSLayoutConstraint.Attribute.trailing, multiplier: 1, constant: 0)
-        let leading = NSLayoutConstraint(item: self.webView, attribute: NSLayoutConstraint.Attribute.leading, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.webViewContainer, attribute: NSLayoutConstraint.Attribute.leading, multiplier: 1, constant: 0)
+        let top = NSLayoutConstraint(item: self.webView!, attribute: NSLayoutConstraint.Attribute.top, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.webViewContainer, attribute: NSLayoutConstraint.Attribute.top, multiplier: 1, constant: 0)
+        
+        let bottom = NSLayoutConstraint(item: self.webView!, attribute: NSLayoutConstraint.Attribute.bottom, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.webViewContainer, attribute: NSLayoutConstraint.Attribute.bottom, multiplier: 1, constant: 0)
+        
+        let trailing = NSLayoutConstraint(item: self.webView!, attribute: NSLayoutConstraint.Attribute.trailing, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.webViewContainer, attribute: NSLayoutConstraint.Attribute.trailing, multiplier: 1, constant: 0)
+        
+        let leading = NSLayoutConstraint(item: self.webView!, attribute: NSLayoutConstraint.Attribute.leading, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.webViewContainer, attribute: NSLayoutConstraint.Attribute.leading, multiplier: 1, constant: 0)
+        
         self.webViewContainer.addConstraints([top, bottom, trailing, leading])
         webView.navigationDelegate = self
         webView.uiDelegate = self
         DDLogDebug("url:\(String(describing: loadUrl))")
-        webView.load(Alamofire.request(loadUrl!).request!)
+        if let url = loadUrl {
+            webView.load(Alamofire.request(url).request!)
+        }else {
+            webView.loadHTMLString("<h2>没有获取到正确的URL!</h2>", baseURL: nil)
+        }
         webView.allowsBackForwardNavigationGestures = true
     }
     
@@ -186,6 +211,18 @@ class TodoTaskDetailViewController: BaseWebViewUIViewController {
 
 //MARK: - private func
     
+    @objc func closeForBackBtn() {
+        DDLogDebug("点击关闭按钮了。。。。。。。。。")
+        //调用 js的 关闭当前工作的 函数 js会做新建检查工作
+        self.webView.evaluateJavaScript(TodoTaskJS.CLOSE_WORK, completionHandler: { (data, err) in
+            DDLogDebug("执行关闭js了。。 data:\(String(describing: data)) err:\(String(describing: err))")
+            guard err == nil else {
+                self.goBack()
+                return
+            }
+        })
+    }
+    
     @objc func goBack() {
         DDLogDebug("backFlag = \(backFlag)")
         switch backFlag {
@@ -624,18 +661,23 @@ class TodoTaskDetailViewController: BaseWebViewUIViewController {
             self.hasToolbar = true
             self.view.addSubview(self.toolbarView)
             self.toolbarView.translatesAutoresizingMaskIntoConstraints = false
-            let heightC = NSLayoutConstraint(item: self.toolbarView, attribute: NSLayoutConstraint.Attribute.height, relatedBy: NSLayoutConstraint.Relation.equal, toItem: nil, attribute: NSLayoutConstraint.Attribute.notAnAttribute, multiplier: 0.0, constant: 44)
+            let heightC = NSLayoutConstraint(item: self.toolbarView!, attribute: NSLayoutConstraint.Attribute.height, relatedBy: NSLayoutConstraint.Relation.equal, toItem: nil, attribute: NSLayoutConstraint.Attribute.notAnAttribute, multiplier: 0.0, constant: 44)
+            
             self.toolbarView.addConstraint(heightC)
-            let bottom = NSLayoutConstraint(item: self.toolbarView, attribute: NSLayoutConstraint.Attribute.bottom, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.view, attribute: NSLayoutConstraint.Attribute.bottom, multiplier: 1, constant: 0)
-            let trailing = NSLayoutConstraint(item: self.toolbarView, attribute: NSLayoutConstraint.Attribute.trailing, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.view, attribute: NSLayoutConstraint.Attribute.trailing, multiplier: 1, constant: 0)
-            let leading = NSLayoutConstraint(item: self.toolbarView, attribute: NSLayoutConstraint.Attribute.leading, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.view, attribute: NSLayoutConstraint.Attribute.leading, multiplier: 1, constant: 0)
+            
+            let bottom = NSLayoutConstraint(item: self.toolbarView!, attribute: NSLayoutConstraint.Attribute.bottom, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.view, attribute: NSLayoutConstraint.Attribute.bottom, multiplier: 1, constant: 0)
+            
+            let trailing = NSLayoutConstraint(item: self.toolbarView!, attribute: NSLayoutConstraint.Attribute.trailing, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.view, attribute: NSLayoutConstraint.Attribute.trailing, multiplier: 1, constant: 0)
+            
+            let leading = NSLayoutConstraint(item: self.toolbarView!, attribute: NSLayoutConstraint.Attribute.leading, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.view, attribute: NSLayoutConstraint.Attribute.leading, multiplier: 1, constant: 0)
+            
             self.view.addConstraints([bottom, leading, trailing])
             self.view.constraints.forEach { (constraint) in
                 if constraint.identifier == "webViewBottomConstraint" {
                     self.view.removeConstraint(constraint)
                 }
             }
-            let webcTop = NSLayoutConstraint(item: self.webViewContainer, attribute: NSLayoutConstraint.Attribute.bottom, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.toolbarView, attribute: NSLayoutConstraint.Attribute.top, multiplier: 1, constant: 0)
+            let webcTop = NSLayoutConstraint(item: self.webViewContainer!, attribute: NSLayoutConstraint.Attribute.bottom, relatedBy: NSLayoutConstraint.Relation.equal, toItem: self.toolbarView, attribute: NSLayoutConstraint.Attribute.top, multiplier: 1, constant: 0)
             self.view.addConstraint(webcTop)
             self.view.layoutIfNeeded()
         }
@@ -849,14 +891,22 @@ extension TodoTaskDetailViewController: O2WKScriptMessageHandlerImplement {
                     options.resizeMode = .none
                     PHImageManager.default().requestImageData(for: asset, options: options, resultHandler: { (imageData, result, imageOrientation, dict) in
                         //DDLogDebug("result = \(result) imageOrientation = \(imageOrientation) \(dict)")
-                        let fileURL = dict?["PHImageFileURLKey"] as! URL
+                        var fileName = ""
+                        
+                        if dict?["PHImageFileURLKey"] != nil {
+                            let fileURL = dict?["PHImageFileURLKey"] as! URL
+                            fileName = fileURL.lastPathComponent
+                        }else {
+                            fileName = result ?? "untitle.png"
+                        }
+                        
                         DispatchQueue.main.async {
                             self.showLoading(title: "上传中...")
                         }
                         DispatchQueue.global(qos: .userInitiated).async {
                             Alamofire.upload(multipartFormData: { (mData) in
                                 //mData.append(fileURL, withName: "file")
-                                mData.append(imageData!, withName: "file", fileName: fileURL.lastPathComponent, mimeType: "application/octet-stream")
+                                mData.append(imageData!, withName: "file", fileName: fileName, mimeType: "application/octet-stream")
                                 let siteData = site.data(using: String.Encoding.utf8, allowLossyConversion: false)
                                 mData.append(siteData!, withName: "site")
                             }, to: url, encodingCompletion: { (encodingResult) in
@@ -899,6 +949,8 @@ extension TodoTaskDetailViewController: O2WKScriptMessageHandlerImplement {
                 case .unknown:
                     DDLogDebug("Unknown")
                     
+                @unknown default:
+                    DDLogDebug("Unknown")
                 }
             }
         }, completion: nil)
@@ -1075,6 +1127,8 @@ extension TodoTaskDetailViewController: O2WKScriptMessageHandlerImplement {
                 case .unknown:
                     DDLogDebug("Unknown")
                     
+                @unknown default:
+                    DDLogDebug("Unknown")
                 }
             }
         }, completion: nil)

+ 41 - 5
o2ios/O2Platform/App/Work-工作/c/category/ZoneMenuViewController.swift

@@ -51,13 +51,13 @@ class ZoneMenuViewController: UIViewController {
         self.automaticallyAdjustsScrollViewInsets = false
         //mainMenu
         if let mainVC = self.storyboard?.instantiateViewController(withIdentifier: "mainMenu") {
-            self.mainVC = mainVC as! ZoneMainCategoryViewController
+            self.mainVC = mainVC as? ZoneMainCategoryViewController
             self.addChild(mainVC)
             mainVC.view.frame = CGRect(x: 0, y: 0, width: view.bounds.width * 0.4, height: view.bounds.height)
             self.view.addSubview(mainVC.view)
         }
         if let subVC = self.storyboard?.instantiateViewController(withIdentifier: "subMenu") {
-            self.subVC = subVC as! ZoneSubCategoryViewController
+            self.subVC = subVC as? ZoneSubCategoryViewController
             self.addChild(subVC)
             subVC.view.frame = CGRect(x: view.bounds.width * 0.4, y: 0, width: view.bounds.width * 0.6, height: view.bounds.height)
             //let tView = subVC.view as! UITableView
@@ -73,7 +73,7 @@ class ZoneMenuViewController: UIViewController {
     
     @objc private func reveiveCategoryNotification(_ notification:NSNotification){
         let obj = notification.object
-        self.subVC.app = obj as! Application
+        self.subVC.app = obj as? Application
     }
     
     @objc private func receiveSubNotification(_ notification:NSNotification){
@@ -113,7 +113,12 @@ class ZoneMenuViewController: UIViewController {
                     let data = TaskCreateData(process: process, identitys: identitys)
                     self.gotoChooseIdentity(data: data)
                 }else if identitys.count == 1 {
-                    self.createProcess(processId: process!.id!, identity: identitys[0].distinguishedName!)
+                    //草稿模式
+                    if let mode = process?.defaultStartMode, mode == O2.O2_Word_draft_mode {
+                        self.createDraft(processId: process!.id!, identity: identitys[0].distinguishedName!)
+                    }else {
+                        self.createProcess(processId: process!.id!, identity: identitys[0].distinguishedName!)
+                    }
                 }else {
                     DispatchQueue.main.async {
                         self.showError(title: "当前用户没有身份,无法创建工作!")
@@ -128,6 +133,38 @@ class ZoneMenuViewController: UIViewController {
         }
     }
     
+    //创建草稿
+    private func createDraft(processId: String, identity: String) {
+        let bean = CreateProcessBean()
+               bean.title = ""
+               bean.identity = identity
+        let draftCreateUrl = AppDelegate.o2Collect.generateURLWithAppContextKey(WorkContext.workContextKey, query: WorkContext.draftWorkCreateQuery, parameter: ["##processId##":processId as AnyObject])
+        self.showLoading(title: "创建中,请稍候...")
+        Alamofire.request(draftCreateUrl!,method:.post, parameters: bean.toJSON(), encoding: JSONEncoding.default, headers: nil).responseJSON { response in
+            
+            switch response.result {
+            case .success(let val):
+                let draftData = JSON(val)["data"]
+                DDLogDebug(draftData.description)
+                if let draft = Mapper<ProcessDraftBean>().map(JSONString:draftData["work"].debugDescription) {
+                    let taskStoryboard = UIStoryboard(name: "task", bundle: Bundle.main)
+                    let todoTaskDetailVC = taskStoryboard.instantiateViewController(withIdentifier: "todoTaskDetailVC") as! TodoTaskDetailViewController
+                    todoTaskDetailVC.draft = draft
+                    todoTaskDetailVC.backFlag = 1
+                    self.navigationController?.pushViewController(todoTaskDetailVC, animated: true)
+                    DispatchQueue.main.async {
+                        self.hideLoading()
+                    }
+                } else {
+                    self.showError(title: "创建失败")
+                }
+            case .failure(let err):
+                DDLogError(err.localizedDescription)
+                self.showError(title: "创建失败")
+            }
+        }
+    }
+    
     //创建流程
     private func createProcess(processId: String, identity:String){
         let bean = CreateProcessBean()
@@ -136,7 +173,6 @@ class ZoneMenuViewController: UIViewController {
         let createURL = AppDelegate.o2Collect.generateURLWithAppContextKey(WorkContext.workContextKey, query: WorkContext.workCreateQuery, parameter: ["##id##":processId as AnyObject])
         self.showLoading(title: "创建中,请稍候...")
         Alamofire.request(createURL!,method:.post, parameters: bean.toJSON(), encoding: JSONEncoding.default, headers: nil).responseJSON { response in
-            debugPrint(response.result)
             switch response.result {
             case .success(let val):
                 let taskList = JSON(val)["data"][0]

+ 2 - 0
o2ios/O2Platform/App/Work-工作/m/AppProcess.swift

@@ -16,6 +16,7 @@ class AppProcess:Mappable {
     var creatorPerson:String?
     var application:String?
     var icon:String?
+    var defaultStartMode: String?
     
     required init?(map: Map) {
         
@@ -29,6 +30,7 @@ class AppProcess:Mappable {
         creatorPerson <- map["creatorPerson"]
         application <- map["application"]
         icon <- map["icon"]
+        defaultStartMode <- map["defaultStartMode"]
     }
 
 }

+ 2 - 0
o2ios/O2Platform/App/Work-工作/m/Application.swift

@@ -16,6 +16,7 @@ class Application:Mappable{
     var icon:String?
     var processList:[AppProcess]?
     
+    
     required init?(map: Map) {
         
     }
@@ -27,6 +28,7 @@ class Application:Mappable{
         applicationCategory <- map["applicationCategory"]
         icon <- map["icon"]
         processList <- map["processList"]
+        
     }
 
 }

+ 39 - 0
o2ios/O2Platform/App/Work-工作/m/CreateProcessBean.swift

@@ -25,6 +25,45 @@ class CreateProcessBean:Mappable {
         identity <- map["identity"]
     }
 }
+//草稿对象
+class ProcessDraftBean: Mappable {
+    var id: String?
+    var title: String?
+    var creatorPerson: String?
+    var creatorIdentity: String?
+    var creatorUnit: String?
+    var application: String?
+    var applicationName: String?
+    var applicationAlias: String?
+    var process: String?
+    var processName: String?
+    var processAlias: String?
+    var workCreateType: String?
+    var form: String?
+    init(){
+           
+   }
+   
+   required init?(map: Map) {
+       
+   }
+    func mapping(map: Map) {
+        id <- map["id"]
+        title <- map["title"]
+        creatorPerson <- map["creatorPerson"]
+        creatorIdentity <- map["creatorIdentity"]
+        creatorUnit <- map["creatorUnit"]
+        application <- map["application"]
+        applicationName <- map["applicationName"]
+        applicationAlias <- map["applicationAlias"]
+        process <- map["process"]
+        processName <- map["processName"]
+        processAlias <- map["processAlias"]
+        workCreateType <- map["workCreateType"]
+        form <- map["form"]
+    }
+   
+}
 
 class CmsDocData:Mappable {
     var isNewDocument:Bool? = true

+ 11 - 4
o2ios/O2Platform/App/meeting-会议/Controller/OOMeetingCreateViewController.swift

@@ -45,7 +45,7 @@ class OOMeetingCreateViewController: UIViewController {
     @objc func createMeetingAction(_ sender:Any){
         let mForm = ooFormView.getFormDataFormBean()
         self.viewModel.selectedPersons.forEach { (p) in
-            mForm.invitePersonList.append(p.id!)
+            mForm.invitePersonList.append(p.distinguishedName!)
         }
         let mBean = OOMeetingFormBean(meetingForm: mForm)
         if mBean.checkFormValues() {
@@ -148,12 +148,19 @@ extension OOMeetingCreateViewController:UICollectionViewDelegateFlowLayout {
 extension OOMeetingCreateViewController:OOMeetingPersonActionCellDelegate{
     
     func addPersonActionClick(_ sender: UIButton) {
-        //执行segue
-//        self.performSegue(withIdentifier: "showPersonSelectedSegue", sender: nil)
-    
+        //已经选择的人员
+        var alreadyChoosePersons: [String] = []
+        if !self.viewModel.selectedPersons.isEmpty {
+            self.viewModel.selectedPersons.forEach { (model) in
+                if let dn = model.distinguishedName {
+                    alreadyChoosePersons.append(dn)
+                }
+            }
+        }
         if let v = ContactPickerViewController.providePickerVC(
             pickerModes: [ContactPickerType.person],
             multiple: true,
+            initUserPickedArray: alreadyChoosePersons,
             pickedDelegate: { (result: O2BizContactPickerResult) in
                 if let users = result.users {
                     var persons :[OOPersonModel] = []

+ 8 - 1
o2ios/O2Platform/App/meeting-会议/Controller/OOMeetingInforController.swift

@@ -64,6 +64,13 @@ class OOMeetingInforController: UIViewController {
     func loadMeetConfig() {
         viewModel.loadMeetingConfig().then { (config) in
             self.config = config
+            if let c = self.config {
+                if c.mobileCreateEnable == true {
+                    DispatchQueue.main.async {
+                        UIApplication.shared.windows.first?.addSubview(self.createView)
+                    }
+                }
+            }
         }.catch { (error) in
             DDLogError("会议配置获取异常, \(error)")
         }
@@ -138,7 +145,7 @@ class OOMeetingInforController: UIViewController {
     }
     override func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(animated)
-        UIApplication.shared.windows.first?.addSubview(createView)
+        
     }
 
     override func viewWillDisappear(_ animated: Bool) {

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

@@ -84,7 +84,7 @@ extension OOMeetingCreateViewModel{
     }
     // MARK: - 获取icon
     func getIconOfPerson(_ person:OOPersonModel,compeletionBlock:@escaping (_ image:UIImage?,_ errMsg:String?) -> Void) {
-        ooContactAPI.request(.iconByPerson(person.id!)) { (result) in
+        ooContactAPI.request(.iconByPerson(person.distinguishedName!)) { (result) in
             if let err = result.error {
                 compeletionBlock(#imageLiteral(resourceName: "icon_?"),err.errorDescription)
             }else{

+ 4 - 0
o2ios/O2Platform/Extension/String+Extenstion.swift

@@ -71,6 +71,10 @@ extension String {
         return self.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed)!
     }
     
+    var urlEncoded: String {
+        return self.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? ""
+    }
+    
     
     // MARK:- 获取字符串的CGSize
     func getSize(with fontSize: CGFloat) -> CGSize {

+ 1 - 0
o2ios/O2Platform/UI/OOTabBarHelper.swift

@@ -26,6 +26,7 @@ class OOTabBarHelper: NSObject {
         UITabBarItem.appearance().setTitleTextAttributes([
             NSAttributedString.Key.font: UIFont.init(name: "PingFangSC-Regular", size: 12) ?? UIFont.systemFont(ofSize: 12),
             NSAttributedString.Key.foregroundColor: UIColor(hex: "#666666")], for: .normal)
+        
         UITabBarItem.appearance().setTitleTextAttributes([
             NSAttributedString.Key.font: UIFont.init(name: "PingFangSC-Regular", size: 12) ?? UIFont.systemFont(ofSize: 12),
             NSAttributedString.Key.foregroundColor: O2ThemeManager.color(for: "Base.base_color")!], for: .selected)

+ 1 - 0
o2ios/O2Platform/config/O2.swift

@@ -10,6 +10,7 @@ import Foundation
 
 
 struct O2 {
+    public static let O2_Word_draft_mode = "draft"
     public static let O2_First_ID = "(0)"
     /// EZSE: Returns app's name
     public static var appDisplayName: String? {

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

@@ -171,6 +171,7 @@ struct ReadedContext {
 struct WorkContext {
     static let workContextKey = "x_processplatform_assemble_surface"
     static let workCreateQuery = "jaxrs/work/process/##id##"
+    static let draftWorkCreateQuery = "jaxrs/draft/process/##processId##"
     
 }
 
@@ -265,6 +266,7 @@ struct DesktopContext {
     static let DesktopContextKey = "x_desktop"
     static let todoDesktopQuery = "workmobilewithaction.html?workid=##workid##"
     static let todoedDestopQuery = "workmobilewithaction.html?workcompletedid=##workCompletedId##"
+    static let todoDraftQuery = "workmobilewithaction.html?draft=##draft##" //draft 对象 ProcessDraftBean
     static let bbsItemDetailQuery  = "forumdocMobile.html?id=##subjectId##"
     static let cmsItemDetailQuery = "cmsdocMobile.html?id=##documentId##"
     static let appDetailQuery = "appMobile.html?app=portal.Portal&status=##status##"