Kaynağa Gözat

Merge branch 'feature/Process.log_add_postloadline_event' into 'develop'

Merge of feature/[流程管理]流程记录增加加载每行记录的事件 to develop

See merge request o2oa/o2oa!1401
蔡祥熠 5 yıl önce
ebeveyn
işleme
1b139fb3d8

+ 4 - 0
o2web/source/x_component_process_FormDesigner/Module/Log/template.json

@@ -29,6 +29,10 @@
 		  "code": "",
 		  "code": "",
 		  "html": ""
 		  "html": ""
 		},
 		},
+		"postLoadLine" : {
+			"code": "",
+			"html": ""
+		},
 		"load" : {
 		"load" : {
 		  "code": "",
 		  "code": "",
 		  "html": ""
 		  "html": ""

+ 13 - 1
o2web/source/x_component_process_Xform/Log.js

@@ -2,7 +2,7 @@ MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
 MWF.xApplication.process.Xform.Log = MWF.APPLog =  new Class({
 MWF.xApplication.process.Xform.Log = MWF.APPLog =  new Class({
 	Extends: MWF.APP$Module,
 	Extends: MWF.APP$Module,
     options: {
     options: {
-        "moduleEvents": ["load", "queryLoad", "postLoad", "postLoadData"]
+        "moduleEvents": ["load", "queryLoad", "postLoad", "postLoadData", "postLoadLine"]
     },
     },
 
 
 	_loadUserInterface: function(){
 	_loadUserInterface: function(){
@@ -538,6 +538,12 @@ MWF.xApplication.process.Xform.Log = MWF.APPLog =  new Class({
             textNode.set("html", html);
             textNode.set("html", html);
             if(iconNode)iconNode.setStyle("background-image", "url("+"../x_component_process_Xform/$Form/"+this.form.options.style+"/icon/rightRed.png)");
             if(iconNode)iconNode.setStyle("background-image", "url("+"../x_component_process_Xform/$Form/"+this.form.options.style+"/icon/rightRed.png)");
         }
         }
+        this.fireEvent("postLoadLine",[{
+            "data" : task,
+            "node" : logTaskNode,
+            "log" : this,
+            "type" : isTask ? "task" : "taskCompleted"
+        }]);
     },
     },
 
 
 
 
@@ -1551,6 +1557,12 @@ MWF.xApplication.process.Xform.Log = MWF.APPLog =  new Class({
             textNode.set("html", html);
             textNode.set("html", html);
             if(iconNode)iconNode.setStyle("background-image", "url("+"../x_component_process_Xform/$Form/"+this.form.options.style+"/icon/rightRed.png)");
             if(iconNode)iconNode.setStyle("background-image", "url("+"../x_component_process_Xform/$Form/"+this.form.options.style+"/icon/rightRed.png)");
         }
         }
+        this.fireEvent("postLoadLine",[{
+            "data" : task,
+            "node" : logTaskNode,
+            "log" : this,
+            "type" : isTask ? "task" : "taskCompleted"
+        }]);
     },
     },
     loadMediaOpinion: function(atts, node, type){
     loadMediaOpinion: function(atts, node, type){
         atts.each(function(att){
         atts.each(function(att){