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

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

unknown 5 лет назад
Родитель
Сommit
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();
                 }
             }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();
                 }else{
                     checkCategory( category.subCategorys[0] )