fancy 5 лет назад
Родитель
Сommit
6b19b0b792

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

@@ -135,15 +135,21 @@ class TaskCreateViewController: FormViewController {
                     self.showError(title: "请选择身份")
                     self.showError(title: "请选择身份")
                     return
                     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()
         let bean = CreateProcessBean()
         bean.title = ""//不需要标题
         bean.title = ""//不需要标题
         bean.identity = identity
         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: "创建中,请稍候...")
         self.showLoading(title: "创建中,请稍候...")
         Alamofire.request(createURL!,method:.post, parameters: bean.toJSON(), encoding: JSONEncoding.default, headers: nil).responseJSON { response in
         Alamofire.request(createURL!,method:.post, parameters: bean.toJSON(), encoding: JSONEncoding.default, headers: nil).responseJSON { response in
             debugPrint(response.result)
             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: "创建失败")
+           }
+       }
+   }
 
 
     
     
 }
 }

+ 51 - 11
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_WORK = "JSON.encode(layout.appForm.businessData.work);"
     static let DATA_BUSINESS = "JSON.encode(layout.appForm.getData());"
     static let DATA_BUSINESS = "JSON.encode(layout.appForm.getData());"
     static let CHECK_FORM = "layout.appForm.formValidation(null, null)"
     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] {
     static func getDataWithJS(_ webView:UIWebView,jscode:String) -> [String:AnyObject] {
         let str = webView.stringByEvaluatingJavaScript(from: jscode)
         let str = webView.stringByEvaluatingJavaScript(from: jscode)
@@ -68,6 +69,7 @@ class TodoTaskDetailViewController: BaseWebViewUIViewController {
     
     
     var hasToolbar:Bool = false
     var hasToolbar:Bool = false
     
     
+    //任务模式
     var todoTask:TodoTask? {
     var todoTask:TodoTask? {
         didSet {
         didSet {
             var url:String?
             var url:String?
@@ -83,6 +85,15 @@ class TodoTaskDetailViewController: BaseWebViewUIViewController {
             self.loadUrl = url
             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 myTask: [String : AnyObject]?
     var myRead: [String : AnyObject]?
     var myRead: [String : AnyObject]?
@@ -95,7 +106,7 @@ class TodoTaskDetailViewController: BaseWebViewUIViewController {
         super.viewDidLoad()
         super.viewDidLoad()
         // 返回按钮重新定义
         // 返回按钮重新定义
         self.navigationItem.hidesBackButton = true
         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.navigationItem.leftItemsSupplementBackButton = true
         // 文档查看器
         // 文档查看器
         self.qlController.dataSource = qlController
         self.qlController.dataSource = qlController
@@ -145,15 +156,23 @@ class TodoTaskDetailViewController: BaseWebViewUIViewController {
         super.theWebView()
         super.theWebView()
         self.webViewContainer.addSubview(self.webView)
         self.webViewContainer.addSubview(self.webView)
         self.webView.translatesAutoresizingMaskIntoConstraints = false
         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])
         self.webViewContainer.addConstraints([top, bottom, trailing, leading])
         webView.navigationDelegate = self
         webView.navigationDelegate = self
         webView.uiDelegate = self
         webView.uiDelegate = self
         DDLogDebug("url:\(String(describing: loadUrl))")
         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
         webView.allowsBackForwardNavigationGestures = true
     }
     }
     
     
@@ -192,6 +211,18 @@ class TodoTaskDetailViewController: BaseWebViewUIViewController {
 
 
 //MARK: - private func
 //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() {
     @objc func goBack() {
         DDLogDebug("backFlag = \(backFlag)")
         DDLogDebug("backFlag = \(backFlag)")
         switch backFlag {
         switch backFlag {
@@ -630,18 +661,23 @@ class TodoTaskDetailViewController: BaseWebViewUIViewController {
             self.hasToolbar = true
             self.hasToolbar = true
             self.view.addSubview(self.toolbarView)
             self.view.addSubview(self.toolbarView)
             self.toolbarView.translatesAutoresizingMaskIntoConstraints = false
             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)
             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.addConstraints([bottom, leading, trailing])
             self.view.constraints.forEach { (constraint) in
             self.view.constraints.forEach { (constraint) in
                 if constraint.identifier == "webViewBottomConstraint" {
                 if constraint.identifier == "webViewBottomConstraint" {
                     self.view.removeConstraint(constraint)
                     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.addConstraint(webcTop)
             self.view.layoutIfNeeded()
             self.view.layoutIfNeeded()
         }
         }
@@ -913,6 +949,8 @@ extension TodoTaskDetailViewController: O2WKScriptMessageHandlerImplement {
                 case .unknown:
                 case .unknown:
                     DDLogDebug("Unknown")
                     DDLogDebug("Unknown")
                     
                     
+                @unknown default:
+                    DDLogDebug("Unknown")
                 }
                 }
             }
             }
         }, completion: nil)
         }, completion: nil)
@@ -1089,6 +1127,8 @@ extension TodoTaskDetailViewController: O2WKScriptMessageHandlerImplement {
                 case .unknown:
                 case .unknown:
                     DDLogDebug("Unknown")
                     DDLogDebug("Unknown")
                     
                     
+                @unknown default:
+                    DDLogDebug("Unknown")
                 }
                 }
             }
             }
         }, completion: nil)
         }, completion: nil)

+ 38 - 2
o2ios/O2Platform/App/Work-工作/c/category/ZoneMenuViewController.swift

@@ -113,7 +113,12 @@ class ZoneMenuViewController: UIViewController {
                     let data = TaskCreateData(process: process, identitys: identitys)
                     let data = TaskCreateData(process: process, identitys: identitys)
                     self.gotoChooseIdentity(data: data)
                     self.gotoChooseIdentity(data: data)
                 }else if identitys.count == 1 {
                 }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 {
                 }else {
                     DispatchQueue.main.async {
                     DispatchQueue.main.async {
                         self.showError(title: "当前用户没有身份,无法创建工作!")
                         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){
     private func createProcess(processId: String, identity:String){
         let bean = CreateProcessBean()
         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])
         let createURL = AppDelegate.o2Collect.generateURLWithAppContextKey(WorkContext.workContextKey, query: WorkContext.workCreateQuery, parameter: ["##id##":processId as AnyObject])
         self.showLoading(title: "创建中,请稍候...")
         self.showLoading(title: "创建中,请稍候...")
         Alamofire.request(createURL!,method:.post, parameters: bean.toJSON(), encoding: JSONEncoding.default, headers: nil).responseJSON { response in
         Alamofire.request(createURL!,method:.post, parameters: bean.toJSON(), encoding: JSONEncoding.default, headers: nil).responseJSON { response in
-            debugPrint(response.result)
             switch response.result {
             switch response.result {
             case .success(let val):
             case .success(let val):
                 let taskList = JSON(val)["data"][0]
                 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 creatorPerson:String?
     var application:String?
     var application:String?
     var icon:String?
     var icon:String?
+    var defaultStartMode: String?
     
     
     required init?(map: Map) {
     required init?(map: Map) {
         
         
@@ -29,6 +30,7 @@ class AppProcess:Mappable {
         creatorPerson <- map["creatorPerson"]
         creatorPerson <- map["creatorPerson"]
         application <- map["application"]
         application <- map["application"]
         icon <- map["icon"]
         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 icon:String?
     var processList:[AppProcess]?
     var processList:[AppProcess]?
     
     
+    
     required init?(map: Map) {
     required init?(map: Map) {
         
         
     }
     }
@@ -27,6 +28,7 @@ class Application:Mappable{
         applicationCategory <- map["applicationCategory"]
         applicationCategory <- map["applicationCategory"]
         icon <- map["icon"]
         icon <- map["icon"]
         processList <- map["processList"]
         processList <- map["processList"]
+        
     }
     }
 
 
 }
 }

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

@@ -25,6 +25,45 @@ class CreateProcessBean:Mappable {
         identity <- map["identity"]
         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 {
 class CmsDocData:Mappable {
     var isNewDocument:Bool? = true
     var isNewDocument:Bool? = true

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

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

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

@@ -26,6 +26,7 @@ class OOTabBarHelper: NSObject {
         UITabBarItem.appearance().setTitleTextAttributes([
         UITabBarItem.appearance().setTitleTextAttributes([
             NSAttributedString.Key.font: UIFont.init(name: "PingFangSC-Regular", size: 12) ?? UIFont.systemFont(ofSize: 12),
             NSAttributedString.Key.font: UIFont.init(name: "PingFangSC-Regular", size: 12) ?? UIFont.systemFont(ofSize: 12),
             NSAttributedString.Key.foregroundColor: UIColor(hex: "#666666")], for: .normal)
             NSAttributedString.Key.foregroundColor: UIColor(hex: "#666666")], for: .normal)
+        
         UITabBarItem.appearance().setTitleTextAttributes([
         UITabBarItem.appearance().setTitleTextAttributes([
             NSAttributedString.Key.font: UIFont.init(name: "PingFangSC-Regular", size: 12) ?? UIFont.systemFont(ofSize: 12),
             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)
             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 {
 struct O2 {
+    public static let O2_Word_draft_mode = "draft"
     public static let O2_First_ID = "(0)"
     public static let O2_First_ID = "(0)"
     /// EZSE: Returns app's name
     /// EZSE: Returns app's name
     public static var appDisplayName: String? {
     public static var appDisplayName: String? {

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

@@ -171,6 +171,7 @@ struct ReadedContext {
 struct WorkContext {
 struct WorkContext {
     static let workContextKey = "x_processplatform_assemble_surface"
     static let workContextKey = "x_processplatform_assemble_surface"
     static let workCreateQuery = "jaxrs/work/process/##id##"
     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 DesktopContextKey = "x_desktop"
     static let todoDesktopQuery = "workmobilewithaction.html?workid=##workid##"
     static let todoDesktopQuery = "workmobilewithaction.html?workid=##workid##"
     static let todoedDestopQuery = "workmobilewithaction.html?workcompletedid=##workCompletedId##"
     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 bbsItemDetailQuery  = "forumdocMobile.html?id=##subjectId##"
     static let cmsItemDetailQuery = "cmsdocMobile.html?id=##documentId##"
     static let cmsItemDetailQuery = "cmsdocMobile.html?id=##documentId##"
     static let appDetailQuery = "appMobile.html?app=portal.Portal&status=##status##"
     static let appDetailQuery = "appMobile.html?app=portal.Portal&status=##status##"