Explorar el Código

Merge branch 'fix/Xscript.createCMSDict_miss' into 'develop'

Merge of fix/[内容管理]修复脚本 new this.Dict 报错的问题 to develop

See merge request o2oa/o2oa!1116
蔡祥熠 hace 5 años
padre
commit
964f791d3b

+ 2 - 2
o2web/source/o2_core/o2/xScript/CMSEnvironment.js

@@ -1529,7 +1529,7 @@ MWF.xScript.CMSJSONData = function(data, callback, key, parent){
 //    }
 //};
 var dictLoaded = {};
-MWF.xScript.createDict = function(application){
+MWF.xScript.createCMSDict = function(application){
     //optionsOrName : {
     //  type : "", //默认为process, 可以为  process  cms
     //  application : "", //流程/CMS的名称/别名/id, 默认为当前应用
@@ -1543,7 +1543,7 @@ MWF.xScript.createDict = function(application){
             options = { name : options };
         }
         var name = this.name = options.name;
-        var type = ( options.type && options.application ) ?  options.type : "process";
+        var type = ( options.type && options.application ) ?  options.type : "cms";
         var applicationId = options.application || application;
         var enableAnonymous = options.enableAnonymous || false;
 

+ 3 - 2
o2web/source/x_component_Selector/Identity.js

@@ -1206,6 +1206,7 @@ MWF.xApplication.Selector.Identity.Include = new Class({
     },
 
     listByFilter : function( type, key, callback ){
+        debugger;
         var arr1 = this.listByFilterPerson(key) || [];
         this.listByFilterUnitAndGroup( type, key, function(arr2){
             this.listByFilterGroup( type, key, function(arr3){
@@ -1258,8 +1259,8 @@ MWF.xApplication.Selector.Identity.Include = new Class({
         //根据关键字获取组织和群组内的身份
         var keyString = typeOf( key )==="string" ? key.toLowerCase() : key.key.toLowerCase();
 
-        if ( this.includeUnit && this.includeUnit.length ){
-            key = this.getUnitFilterKey( key, this.includeUnit, this.includeGroup );
+        if ( (this.includeUnit && this.includeUnit.length) || (this.includeGroup && this.includeGroup.length) ){
+            key = this.getUnitFilterKey( key, this.includeUnit || [], this.includeGroup || [] );
 
             this.orgAction.listIdentityByKey(function(json){
                 if (callback) callback(json.data);