gistfile1.txt /portal/dictSelect.action?cateEname=ctyfatherValue=0$rootScope.dictTxtFun = function(cateEname,firstVal,secondVal,thirdVal){ var firstValue = "0"; var dictTxt = ""; if(secondVal!='' secondVal != null secondVal != undefined){ f
/portal/dictSelect.action?cateEname=cty&fatherValue=0
$rootScope.dictTxtFun = function(cateEname,firstVal,secondVal,thirdVal){
var firstValue = "0";
var dictTxt = "";
if(secondVal!='' && secondVal != null && secondVal != undefined){
firstValue = firstVal;
}
dictService.loadDict(cateEname,firstValue)
.then(function(res) {
for (var i = 0; i < res.length; i++) {
if (firstVal == res[i].id) {
dictTxt = res[i].text;
}
}
}).then(function(res){
if(secondVal!='' && secondVal != null && secondVal != undefined){
dictService.loadDict(cateEname,firstValue,secondVal)
.then(function(res) {
for (var i = 0; i < res.data.length; i++) {
if (secondVal == res.data[i].id) {
dictTxt = dictTxt + res.data[i].text;
}
}
})
}
}).then(function(res){
if(thirdVal!='' && thirdVal != null && thirdVal != undefined){
dictService.loadDict(cateEname,secondVal,thirdVal)
.then(function(res) {
for (var i = 0; i < res.data.length; i++) {
if (thirdVal == res.data[i].id) {
dictTxt = dictTxt + res.data[i].text;
}
}
})
}
})
return dictTxt;
}
