<div class="form-group" > <label class="col-xs-2 control-label col-xs-offset-1"><span class="red">*</span>系统选择</label> <div class="col-xs-9"> <div class="col-xs-3 pl0" ng-repeat="param in params"> <div class="radio c-radio"> <label> <input ng-show="ls" type="checkbox" name="radioSys" class="checkSysId radioSys" ng-true-value="{{param.sysId}}" value="{{param.sysId}}" ng-trim="false" ng-click="getSysId($parent.conff[$index])" ng-model="$parent.conff[$index]"> <span ng-show="ls" class="fa fa-check"></span>{{param.sysName}} </label> </div> </div> </div> </div>
//点击获取系统ID $scope.getSysId = function(t){ u=""; // $("#s1 option").remove(); // $("#s2 option").remove(); t=""; for(var prop in $scope.conff){ if($scope.conff[prop] != false){ t+=$scope.conff[prop]; t=t+‘\,‘; var k = $scope.conff[prop]; var CoreUrl2 = new coreUrl({"transCode":"B000603","sysId":k}); CoreUrl2.$save(function(objc){ u+=objc.row[0].sysName; u=u+‘ ‘ $scope.uu = u; }); } // if($scope.conff[prop] != false){ // t+=$scope.conff[prop]; // t=t+‘\,‘; // } } t = t.substr(0,t.length-1); $scope.userSysList = t };
利用$index判断获取选中的checkbox
时间: 2024-10-10 07:51:25