Browse Source

设备类型管理下拉调整

CharlesLeocc 3 years ago
parent
commit
c84d045c2b
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/widgets/DeviceTypeManagement/Widget.ts

+ 7 - 1
src/widgets/DeviceTypeManagement/Widget.ts

@@ -377,9 +377,15 @@ class DeviceTypeManagement extends BaseWidget {
                             var id = currentTypeId.split(",")[i];
                             if(item.id==id){
                                 html+="<option value='"+item.id+"' selected='selected'>"+item.name+"</option>";
+                                break;
+                            }else if(i == currentTypeId.split(",").length-1){
+                                html+="<option value='"+item.id+"'>"+item.name+"</option>";
+                                break;
                             }else{
-
+                                //html+="<option value='"+item.id+"'>"+item.name+"</option>";
+                                //break;
                             }
+
                         }
 
                     }else{