Просмотр исходного кода

Merge branch 'wrdp' into 'develop'

Wrdp

See merge request o2oa/o2oa!2390
蔡祥熠 5 лет назад
Родитель
Сommit
c48f6ef5c4

+ 2 - 0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionGetWithWorkOrWorkCompleted.java

@@ -64,12 +64,14 @@ class ActionGetWithWorkOrWorkCompleted extends BaseAction {
 			wo.setReadList(readFuture.get(10, TimeUnit.SECONDS));
 			wo.setReadList(readFuture.get(10, TimeUnit.SECONDS));
 			this.setCurrentReadIndex(effectivePerson, wo);
 			this.setCurrentReadIndex(effectivePerson, wo);
 			this.setCurrentTaskIndex(effectivePerson, wo);
 			this.setCurrentTaskIndex(effectivePerson, wo);
+			wo.setWork(gson.toJsonTree(work));
 		} else if (null != workCompleted) {
 		} else if (null != workCompleted) {
 			CompletableFuture<Data> dataFuture = this.dataFuture(workCompleted);
 			CompletableFuture<Data> dataFuture = this.dataFuture(workCompleted);
 			CompletableFuture<List<WoRead>> readFuture = this.readFuture(workCompleted.getJob());
 			CompletableFuture<List<WoRead>> readFuture = this.readFuture(workCompleted.getJob());
 			wo.setData(dataFuture.get(10, TimeUnit.SECONDS));
 			wo.setData(dataFuture.get(10, TimeUnit.SECONDS));
 			wo.setReadList(readFuture.get(10, TimeUnit.SECONDS));
 			wo.setReadList(readFuture.get(10, TimeUnit.SECONDS));
 			this.setCurrentReadIndex(effectivePerson, wo);
 			this.setCurrentReadIndex(effectivePerson, wo);
+			wo.setWork(gson.toJsonTree(workCompleted));
 		}
 		}
 
 
 		if (BooleanUtils.isFalse(checkControlFuture.get(10, TimeUnit.SECONDS))) {
 		if (BooleanUtils.isFalse(checkControlFuture.get(10, TimeUnit.SECONDS))) {

+ 18 - 1
o2web/source/x_component_cms_Index/Newer.js

@@ -503,7 +503,24 @@ MWF.xApplication.cms.Index.Newer = new Class({
             };
             };
             if( typeOf(this.options.autoSave) == "boolean" )options.autoSave = this.options.autoSave;
             if( typeOf(this.options.autoSave) == "boolean" )options.autoSave = this.options.autoSave;
             if( typeOf(this.options.saveOnClose) == "boolean" )options.saveOnClose = this.options.saveOnClose;
             if( typeOf(this.options.saveOnClose) == "boolean" )options.saveOnClose = this.options.saveOnClose;
-            this.app.desktop.openApplication(el, "cms.Document", options);
+            if( layout.inBrowser ){
+                debugger;
+                if( !window.o2RefreshCMSView ){
+                    window.o2CreateCMSDocumentCount = ( window.o2CreateCMSDocumentCount || 0 ) + 1;
+                    window.o2RefreshCMSView = function () {
+                        try{
+                            if(_self.view && _self.view.reload )_self.view.reload();
+                        }catch (e) {}
+                        if( window.o2CreateCMSDocumentCount )window.o2CreateCMSDocumentCount--;
+                        if( !window.o2CreateCMSDocumentCount || window.o2CreateCMSDocumentCount<0 ){
+                            window.o2RefreshCMSView = null;
+                        }
+                    }.bind(this)
+                }
+                this.app.desktop.openApplication(el, "cms.Document", options);
+            }else{
+                this.app.desktop.openApplication(el, "cms.Document", options);
+            }
         }
         }
     },
     },
     _createProcessDocument:function(e){
     _createProcessDocument:function(e){

+ 6 - 0
o2web/source/x_component_cms_Xform/Form.js

@@ -479,7 +479,13 @@ MWF.xApplication.cms.Xform.Form = MWF.CMSForm = new Class({
                 }
                 }
                 this.options.saveOnClose = false;
                 this.options.saveOnClose = false;
             }
             }
+            debugger;
             if( layout.inBrowser ){
             if( layout.inBrowser ){
+                try{
+                    if( window.opener && window.opener.o2RefreshCMSView ){
+                        window.opener.o2RefreshCMSView();
+                    }
+                }catch (e) {}
                 window.setTimeout(function () {
                 window.setTimeout(function () {
                     this.app.close();
                     this.app.close();
                 }.bind(this), 1500)
                 }.bind(this), 1500)

+ 8 - 0
o2web/source/x_component_process_Xform/$Input.js

@@ -308,6 +308,10 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input =  new Class({
         if (!!data && o2.typeOf(data.then)=="function"){
         if (!!data && o2.typeOf(data.then)=="function"){
             var p = o2.promiseAll(data).then(function(v){
             var p = o2.promiseAll(data).then(function(v){
                 this.__setValue(v);
                 this.__setValue(v);
+                if (this.node.getFirst() && !this.readonly && !this.json.isReadonly) {
+                    this.checkDescription();
+                    this.validationMode();
+                }
             }.bind(this), function(){});
             }.bind(this), function(){});
             this.moduleValueAG = p;
             this.moduleValueAG = p;
             p.then(function(){
             p.then(function(){
@@ -318,6 +322,10 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input =  new Class({
         }else{
         }else{
             this.moduleValueAG = null;
             this.moduleValueAG = null;
             this.__setValue(data);
             this.__setValue(data);
+            if (this.node.getFirst() && !this.readonly && !this.json.isReadonly) {
+                this.checkDescription();
+                this.validationMode();
+            }
         }
         }
             //this.__setData(data);
             //this.__setData(data);
         //}
         //}

+ 1 - 0
o2web/source/x_component_process_Xform/Checkbox.js

@@ -306,6 +306,7 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox =  new Class({
 					}
 					}
 				}
 				}
 			});
 			});
+            this.validationMode();
 		}
 		}
         this.fireEvent("setData");
         this.fireEvent("setData");
 	},
 	},

+ 1 - 0
o2web/source/x_component_process_Xform/Radio.js

@@ -360,6 +360,7 @@ MWF.xApplication.process.Xform.Radio = MWF.APPRadio =  new Class({
 					inputs[i].set("checked", false);
 					inputs[i].set("checked", false);
 				}
 				}
 			}
 			}
+            this.validationMode();
 		}
 		}
         this.fireEvent("setData");
         this.fireEvent("setData");
 	},
 	},

+ 1 - 0
o2web/source/x_component_process_Xform/Select.js

@@ -401,6 +401,7 @@ MWF.xApplication.process.Xform.Select = MWF.APPSelect =  new Class({
 					}
 					}
 				}
 				}
 			});
 			});
+			this.validationMode();
 		}
 		}
 		this.fireEvent("setData", [data]);
 		this.fireEvent("setData", [data]);
 	}
 	}