Procházet zdrojové kódy

修正草稿模式身份传输问题

huqi před 5 roky
rodič
revize
2509c91f09

+ 13 - 10
o2web/source/x_component_process_Xform/Documenteditor.js

@@ -655,16 +655,19 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
 
             o2.load("../o2_lib/diff-match-patch/diff_match_patch.js");
 
-            var id = this.form.businessData.data["$work"].job;
-            o2.Actions.load("x_processplatform_assemble_surface").DocumentVersionAction.listWithJobCategory(id, this.json.id, function(json){
-                this.historyDocumentList = json.data;
-                if (this.historyDocumentList.length){
-                    o2.Actions.load("x_processplatform_assemble_surface").DocumentVersionAction.get(this.historyDocumentList[this.historyDocumentList.length-1].id, function(json){
-                        var data = JSON.parse(json.data.data);
-                        this.originaHistoryData = data.data;
-                    }.bind(this));
-                }
-            }.bind(this));
+            if (this.form.businessData.data["$work"]){
+                var id = this.form.businessData.data["$work"].job;
+                o2.Actions.load("x_processplatform_assemble_surface").DocumentVersionAction.listWithJobCategory(id, this.json.id, function(json){
+                    this.historyDocumentList = json.data;
+                    if (this.historyDocumentList.length){
+                        o2.Actions.load("x_processplatform_assemble_surface").DocumentVersionAction.get(this.historyDocumentList[this.historyDocumentList.length-1].id, function(json){
+                            var data = JSON.parse(json.data.data);
+                            this.originaHistoryData = data.data;
+                        }.bind(this));
+                    }
+                }.bind(this));
+            }
+
 
             if (callback) callback();
         }.bind(this));