Răsfoiți Sursa

Merge branch 'fix/input_setData' into 'wrdp'

setData修复和org组件change事件

See merge request o2oa/o2oa!2405
胡起 5 ani în urmă
părinte
comite
df3aa62c8f

+ 10 - 10
o2web/source/x_component_process_Xform/$Input.js

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

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

@@ -873,7 +873,7 @@ MWF.xApplication.process.Xform.Org = MWF.APPOrg =  new Class({
         }else if (values.length || oldValues.length) {
             change = true;
         }
-        // if (change) this.fireEvent("change");
+        if (change) this.fireEvent("change");
     },
     setData: function(value){
         if (!value) return false;