Sfoglia il codice sorgente

Merge branch 'fix/Selector.identity_getData' into 'wrdp'

Merge of fix/Selector.identity_getData to wrdp

See merge request o2oa/o2oa!2669
蔡祥熠 5 anni fa
parent
commit
551fc9d553

+ 10 - 1
o2web/source/x_component_Selector/Identity.js

@@ -652,6 +652,10 @@ MWF.xApplication.Selector.Identity.Item = new Class({
                 if (callback) callback();
                 if (callback) callback();
             }
             }
         }else{
         }else{
+            if( this.selector.options.ignorePerson || this.selector.options.storeRange === "simple" ){
+                if(callback)callback();
+                return;
+            }
             if (!isWait && callback) callback();
             if (!isWait && callback) callback();
             if (!this.data.woPerson && (!this.data.personDn || !this.data.personEmployee || !this.data.personUnique)){
             if (!this.data.woPerson && (!this.data.personDn || !this.data.personEmployee || !this.data.personUnique)){
                 this.selector.orgAction.getPerson(function(json){
                 this.selector.orgAction.getPerson(function(json){
@@ -736,6 +740,10 @@ MWF.xApplication.Selector.Identity.ItemSelected = new Class({
                 if (callback) callback();
                 if (callback) callback();
             }
             }
         }else if (!this.data.woPerson && (!this.data.personDn || !this.data.personEmployee || !this.data.personUnique) ){
         }else if (!this.data.woPerson && (!this.data.personDn || !this.data.personEmployee || !this.data.personUnique) ){
+            if( this.selector.options.ignorePerson || this.selector.options.storeRange === "simple" ){
+                if(callback)callback();
+                return;
+            }
             if (!isWait && callback) callback();
             if (!isWait && callback) callback();
             if (this.data.person){
             if (this.data.person){
                 this.selector.orgAction.getPerson(function(json){
                 this.selector.orgAction.getPerson(function(json){
@@ -879,7 +887,8 @@ MWF.xApplication.Selector.Identity.ItemCategory = new Class({
         this.iconNode.setStyle("background-image", "url("+"../x_component_Selector/$Selector/"+style+"/icon/companyicon.png)");
         this.iconNode.setStyle("background-image", "url("+"../x_component_Selector/$Selector/"+style+"/icon/companyicon.png)");
     },
     },
     _beforeSelectAll : function( _selectAllFun ){
     _beforeSelectAll : function( _selectAllFun ){
-        if( this.selector.options.ignorePerson ){
+        debugger;
+        if( this.selector.options.ignorePerson || ( this.selector.options.storeRange === "simple" && this.selector.options.resultType !== "person") ){
             _selectAllFun();
             _selectAllFun();
             return;
             return;
         }
         }

+ 2 - 0
o2web/source/x_component_Selector/Person.js

@@ -43,6 +43,8 @@ MWF.xApplication.Selector.Person = new Class({
         "itemHeight" : 29,
         "itemHeight" : 29,
         "identityItemWidth" : 0, //选项宽度,如果不为0,设置为float:left,
         "identityItemWidth" : 0, //选项宽度,如果不为0,设置为float:left,
 
 
+        "storeRange" : "full", //数据是否保存为精简,可选值:full,simple
+
         "showEmptyText" : true
         "showEmptyText" : true
     },
     },
     initialize: function(container, options){
     initialize: function(container, options){

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

@@ -1839,11 +1839,13 @@ MWF.APPOrg.GroupOptions = new Class({
         if( this.json.groupRange==="group" ){
         if( this.json.groupRange==="group" ){
             return {
             return {
                 "count": count,
                 "count": count,
+                "storeRange" : this.json.storeRange,
                 "include": this.getSelectRange( true )
                 "include": this.getSelectRange( true )
             }
             }
         }else{
         }else{
             return {
             return {
-                "count": count
+                "count": count,
+                "storeRange" : this.json.storeRange
             }
             }
         }
         }
     },
     },
@@ -1894,6 +1896,7 @@ MWF.APPOrg.UnitOptions = new Class({
             "count": count,
             "count": count,
             "units": selectUnits,
             "units": selectUnits,
             "unitType": (this.json.selectUnitType==="all") ? "" : this.json.selectUnitType,
             "unitType": (this.json.selectUnitType==="all") ? "" : this.json.selectUnitType,
+            "storeRange" : this.json.storeRange,
             "expandSubEnable" : (this.json.unitExpandSubEnable=="no") ? false : true
             "expandSubEnable" : (this.json.unitExpandSubEnable=="no") ? false : true
         };
         };
     },
     },
@@ -2061,6 +2064,7 @@ MWF.APPOrg.IdentityOptions = new Class({
                 "noUnit" : true,
                 "noUnit" : true,
                 "count": count,
                 "count": count,
                 "resultType" : this.json.identityResultType,
                 "resultType" : this.json.identityResultType,
+                "storeRange" : this.json.storeRange,
                 "include" : this._getInclude()
                 "include" : this._getInclude()
             };
             };
         }else{
         }else{
@@ -2074,6 +2078,7 @@ MWF.APPOrg.IdentityOptions = new Class({
                 "resultType" : this.json.identityResultType,
                 "resultType" : this.json.identityResultType,
                 "categoryType": this.json.categoryType || "unit",
                 "categoryType": this.json.categoryType || "unit",
                 "dutyUnitLevelBy" : this.json.dutyUnitLevelBy || "duty",
                 "dutyUnitLevelBy" : this.json.dutyUnitLevelBy || "duty",
+                "storeRange" : this.json.storeRange,
                 "include" : this._getInclude()
                 "include" : this._getInclude()
             };
             };
         }
         }