Commit e8f51d96 authored by weizhikai's avatar weizhikai

机构地区三级联动选到区县展示问题

parent fc1419ff
...@@ -696,7 +696,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', ' ...@@ -696,7 +696,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
// 加载城市信息 // 加载城市信息
var loadCityList = function (regionID) { var loadCityList = function (regionID) {
regionID = $scope.selectProvince.regionID;
if (regionID !== undefined && regionID !== null) { if (regionID !== undefined && regionID !== null) {
areaRegionService.getCities(regionID).success(function (data) { areaRegionService.getCities(regionID).success(function (data) {
if (data && data.length > 0) { if (data && data.length > 0) {
......
...@@ -436,35 +436,35 @@ ...@@ -436,35 +436,35 @@
<div class="form-group" ng-show="isLocal"> <div class="form-group" ng-show="isLocal">
<label class="col-sm-3 control-label"><span <label class="col-sm-3 control-label"><span
class="must-input">*</span>{{'AdministrativeRegion' | translate}}:</label> class="must-input">*</span>{{'AdministrativeRegion' | translate}}:</label>
<div class="col-sm-9 row"> <div class="col-sm-9" style="width: 69%;left: -3%;">
<div class="col-sm-5" style="padding-left: 0px;" <div class="col-sm-3" style="width: 31%"
ng-class="{'has-error':orgControlForm.selectProvince.$invalid && (orgControlForm.selectProvince.$dirty || orgControlForm.$submitted)}"> ng-class="{'has-error':orgControlForm.selectProvince.$invalid && (orgControlForm.selectProvince.$dirty || orgControlForm.$submitted)}">
<select class="form-control localRequired" name="selectProvince" <select class="form-control localRequired" style="width: 90px;" name="selectProvince"
style="width: 120px; " ng-change="populateCities()" ng-change="populateCities()"
ng-model="selectProvince" ng-model="selectProvince"
ng-options="x.regionName for x in ProvinceList"> ng-options="x.regionName for x in ProvinceList">
<option value="">{{pleaseSelect}}</option> <option value="">{{pleaseSelect}}</option>
</select> </select>
<p ng-show="orgControlForm.selectProvince.$error.required && (orgControlForm.selectProvince.$dirty || orgControlForm.$submitted)" <!--<p ng-show="orgControlForm.selectProvince.$error.required && (orgControlForm.selectProvince.$dirty || orgControlForm.$submitted)"-->
class="has-error label" style="margin-left: -16px"> <!--class="has-error label" style="margin-left: -16px">-->
{{resources.OrganizationMsgProvinceRequired}}</p> <!--{{resources.OrganizationMsgProvinceRequired}}</p>-->
</div> </div>
<div class="col-sm-5" style="padding-left: 10px;" <div class="col-sm-3" style="width: 31%"
ng-class="{'has-error':orgControlForm.selectCity.$invalid && (orgControlForm.selectCity.$dirty || orgControlForm.$submitted)}"> ng-class="{'has-error':orgControlForm.selectCity.$invalid && (orgControlForm.selectCity.$dirty || orgControlForm.$submitted)}">
<select class="form-control localRequired" name="selectCity" <select class="form-control localRequired" name="selectCity"
style="width: 120px; " ng-change="populateDistricts()" ng-change="populateDistricts()" style="width: 90px;"
ng-model="selectCity" ng-model="selectCity"
ng-options="x.regionName for x in CityList"> ng-options="x.regionName for x in CityList">
<option value="">{{pleaseSelect}}</option> <option value="">{{pleaseSelect}}</option>
</select> </select>
<p ng-show="orgControlForm.selectCity.$error.required && (orgControlForm.selectCity.$dirty || orgControlForm.$submitted)" <!--<p ng-show="orgControlForm.selectCity.$error.required && (orgControlForm.selectCity.$dirty || orgControlForm.$submitted)"-->
class="has-error label" style="margin-left: 30px"> <!--class="has-error label" style="margin-left: 30px">-->
{{resources.OrganizationMsgCityRequired}}</p> <!--{{resources.OrganizationMsgCityRequired}}</p>-->
</div> </div>
<div class="col-sm-5" style="padding-left: 10px;" <div class="col-sm-3" style="width: 31%"
ng-class="{'has-error':orgControlForm.selectDistrict.$invalid && (orgControlForm.selectDistrict.$dirty || orgControlForm.$submitted)}"> ng-class="{'has-error':orgControlForm.selectDistrict.$invalid && (orgControlForm.selectDistrict.$dirty || orgControlForm.$submitted)}">
<select class="form-control localRequired" name="selectDistrict" <select class="form-control localRequired" name="selectDistrict" style="width: 90px;"
id="selectDistrict" style="width: 119px; " id="selectDistrict"
ng-model="selectRegionID"> ng-model="selectRegionID">
<option value="">{{pleaseSelect}}</option> <option value="">{{pleaseSelect}}</option>
<option ng-repeat="x in DistrictList" value="{{x.regionID}}" <option ng-repeat="x in DistrictList" value="{{x.regionID}}"
...@@ -472,9 +472,9 @@ ...@@ -472,9 +472,9 @@
limitString:10}} limitString:10}}
</option> </option>
</select> </select>
<p ng-show="orgControlForm.selectDistrict.$error.required && (orgControlForm.selectDistrict.$dirty || orgControlForm.$submitted)" <!--<p ng-show="orgControlForm.selectDistrict.$error.required && (orgControlForm.selectDistrict.$dirty || orgControlForm.$submitted)"-->
class="has-error label" style="margin-left: 30px"> <!--class="has-error label" style="margin-left: 30px">-->
{{resources.OrganizationMsgCityRequired}}</p> <!--{{resources.OrganizationMsgCityRequired}}</p>-->
</div> </div>
</div> </div>
</div> </div>
......
...@@ -19,6 +19,10 @@ function ($http, apiConfig, httpCacheService) { ...@@ -19,6 +19,10 @@ function ($http, apiConfig, httpCacheService) {
//return $http.get('/areaRegion/getCities?parentID=' + parentID, apiConfig.create()); //return $http.get('/areaRegion/getCities?parentID=' + parentID, apiConfig.create());
return httpCacheService.get('/areaRegion/getCities?parentID=' + parentID); return httpCacheService.get('/areaRegion/getCities?parentID=' + parentID);
}, },
getCitiesNoCache: function (parentID) {
//return $http.get('/areaRegion/getCities?parentID=' + parentID, apiConfig.create());
return $http.get('/areaRegion/getCities?parentID=' + parentID);
},
getDistricts: function (parentID) { getDistricts: function (parentID) {
//return $http.get('/areaRegion/getCities?parentID=' + parentID, apiConfig.create()); //return $http.get('/areaRegion/getCities?parentID=' + parentID, apiConfig.create());
return httpCacheService.get('/areaRegion/getDistricts?parentID=' + parentID); return httpCacheService.get('/areaRegion/getDistricts?parentID=' + parentID);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment