浏览代码

修复人员选择待选项唯一默认选中可能出现的问题

unknown 5 年之前
父节点
当前提交
8a358316a8
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      o2web/source/x_component_Selector/Person.js

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

@@ -1471,7 +1471,8 @@ MWF.xApplication.Selector.Person = new Class({
                     if( !category.subItems[0].isSelected )category.subItems[0].clickItem();
                     if( !category.subItems[0].isSelected )category.subItems[0].clickItem();
                 }
                 }
             }else if(category.subCategorys.length === 1){
             }else if(category.subCategorys.length === 1){
-                if( !category.subCategorys[0]._hasChild || !category.subCategorys[0]._hasChild() ){ //category.subCategorys[0].isItem &&
+                if( category.subItems && category.subItems.length > 0 ){
+                }else if( !category.subCategorys[0]._hasChild || !category.subCategorys[0]._hasChild() ){ //category.subCategorys[0].isItem &&
                     if( !category.subItems[0].isSelected )category.subItems[0].clickItem();
                     if( !category.subItems[0].isSelected )category.subItems[0].clickItem();
                 }else{
                 }else{
                     checkCategory( category.subCategorys[0] )
                     checkCategory( category.subCategorys[0] )