Преглед изворни кода

Merge branch 'feature/load_form' into 'develop'

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

See merge request o2oa/o2oa!595
胡起 пре 5 година
родитељ
комит
c7fa356272

+ 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));

+ 1 - 1
o2web/source/x_component_process_Xform/Form.js

@@ -1123,7 +1123,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
         var draft = {
             "data": data,
             "work": this.businessData.work,
-            "identity": this.businessData.work.creatorIdentity
+            "identity": this.businessData.work.creatorIdentityDn
         }
         this.workAction.saveDraft(draft, function (json) {
             this.workAction.getDraft(json.data.id, function (json) {