diff --git a/src/main/resources/static/route/examination/distribution/show.html b/src/main/resources/static/route/examination/distribution/show.html
index 3a3b9eb..c550bd5 100644
--- a/src/main/resources/static/route/examination/distribution/show.html
+++ b/src/main/resources/static/route/examination/distribution/show.html
@@ -80,13 +80,13 @@
@@ -213,8 +213,9 @@
type:'get',
dataType:'json',
success: function (data) {
- var institutionAddress = data.institutionAddress;
+ var institutionAddress = "";
for (var i = 0; i < data.length; i++) {
+ // 拼接考试地点的地址, 因为涉及到跨考点,因此此处可能是多个地址,需要判断拼接
$.ajax({
url: 'api/organization/list?organizationType=' + data[i].institutionId,
async: false,
@@ -222,22 +223,29 @@
dataType: 'json',
success: function (orgData) {
// 回显 , 选中
+ var checkCount = 0;
for (var a = 0; a < orgData.length; a++) {
if(dataForm) {
for (var j = 0; j < dataForm.distributionFieldList.length; j++) {
if (orgData[a].organizationId == dataForm.distributionFieldList[j].fieldId) {
orgData[a].checked = 'checked="checked"';
+ checkCount++;
+ if(institutionAddress.indexOf(data[i].institutionAddress) == -1) {
+ institutionAddress = institutionAddress.length < 1 ? institutionAddress + data[i].institutionAddress : institutionAddress + "," + data[i].institutionAddress;
+ }
}
}
}
}
- var stationData = {stationName: data[i].institutionName, fieldArray: orgData};
- stationArray.push(stationData);
+ if(checkCount > 0 ){
+ var stationData = {stationName: data[i].institutionName, fieldArray: orgData};
+ stationArray.push(stationData);
+ }
}
});
}
- var inData = {address: institutionAddress , stationArray: stationArray}
- laytpl(document.getElementById('distributionFieldsBoxTemplate').innerHTML).render(stationArray, function (html) {
+ var inData = {address: institutionAddress , stationArray: stationArray};
+ laytpl(document.getElementById('distributionFieldsBoxTemplate').innerHTML).render(inData, function (html) {
console.log(stationArray);
document.getElementById('distributionFieldsBox').innerHTML = html;
});