diff --git a/src/main/resources/static/route/examination/distribution/show.html b/src/main/resources/static/route/examination/distribution/show.html index efa470a..144aa95 100644 --- a/src/main/resources/static/route/examination/distribution/show.html +++ b/src/main/resources/static/route/examination/distribution/show.html @@ -150,68 +150,73 @@ var dataForm = {}; var stationArray; var classPlanArray; - var dataLength = 0; - var planLength = 0; // 初始化开班计划 function initDistributionClassPlans() { classPlanArray = new Array(); - top.restAjax.get(top.restAjax.path('api/classplan/list?classPlanIdListIds={classPlanIds}', [ planId ]), {}, null, function (code, data, args) { - planLength = data.length; - for (var i = 0; i < data.length; i++) { - var planData = {index: i, data: data[i]}; - top.restAjax.get(top.restAjax.path('api/applystudents/list-by-classid/{planId}', [ data[i].classPlanId ]), {}, planData, function (code, userData, args) { - var user = args.data; - user.applyCount = userData.length; - classPlanArray.push(user); - if (args.index == planLength - 1) { - laytpl(document.getElementById('distributionClassPlansBoxTemplate').innerHTML).render(classPlanArray, function (html) { - console.log(classPlanArray); - document.getElementById('distributionClassPlansBox').innerHTML = html; - }); - form.render('checkbox', 'distributionClassPlansBox'); - } - }, function (code, data) { - top.dialog.msg(data.msg); + $.ajax({ + url:'api/classplan/list?classPlanIdListIds=' + planId, + async:false, + type:'get', + dataType:'json', + success: function (data) { + for (var i = 0; i < data.length; i++) { + $.ajax({ + url: 'api/applystudents/list-by-classid/' + data[i].classPlanId, + async: false, + type: 'get', + dataType: 'json', + success: function (userData) { + data[i].applyCount = userData.length; + classPlanArray.push( data[i]); + } + }); + } + laytpl(document.getElementById('distributionClassPlansBoxTemplate').innerHTML).render(classPlanArray, function (html) { + console.log(classPlanArray); + document.getElementById('distributionClassPlansBox').innerHTML = html; }); + form.render('checkbox', 'distributionClassPlansBox'); } - }, function (code, data) { - top.dialog.msg(data.msg); }); } // 初始化考场 function initDistributionFields() { stationArray = new Array(); - top.restAjax.get(top.restAjax.path('api/institution/list?institutionType=考点信息', []), {}, null, function(code, data, args) { - dataLength = data.length; - for(var i = 0 ; i < data.length ; i++) { - var institutionData = {index:i, data:data[i]}; - top.restAjax.get(top.restAjax.path('api/organization/list?organizationType={organizationType}', [data[i].institutionId]), {}, institutionData, function(code, orgData, args) { - // 回显 , 选中 - for(var a = 0 ; a < orgData.length; a++) { - console.log(dataForm); - for(var j = 0 ; j < dataForm.distributionFieldList.length; j++) { - if(orgData[a].organizationId == dataForm.distributionFieldList[j].fieldId) { - orgData[a].checked = 'checked="checked"'; + $.ajax({ + url:'api/institution/list?institutionType=考点信息', + async:false, + type:'get', + dataType:'json', + success: function (data) { + for (var i = 0; i < data.length; i++) { + $.ajax({ + url: 'api/organization/list?organizationType=' + data[i].institutionId, + async: false, + type: 'get', + dataType: 'json', + success: function (orgData) { + // 回显 , 选中 + for (var a = 0; a < orgData.length; a++) { + console.log(dataForm); + for (var j = 0; j < dataForm.distributionFieldList.length; j++) { + if (orgData[a].organizationId == dataForm.distributionFieldList[j].fieldId) { + orgData[a].checked = 'checked="checked"'; + } + } } + var stationData = {stationName: data[i].institutionName, fieldArray: orgData}; + stationArray.push(stationData); } - } - var stationData = {stationName:args.data.institutionName, fieldArray:orgData}; - stationArray.push(stationData); - if(args.index == dataLength - 1) { - laytpl(document.getElementById('distributionFieldsBoxTemplate').innerHTML).render(stationArray, function(html) { - console.log(stationArray); - document.getElementById('distributionFieldsBox').innerHTML = html; - }); - form.render('checkbox', 'distributionFieldsBox'); - } - }, function(code, data) { - top.dialog.msg(data.msg); + }); + } + laytpl(document.getElementById('distributionFieldsBoxTemplate').innerHTML).render(stationArray, function (html) { + console.log(stationArray); + document.getElementById('distributionFieldsBox').innerHTML = html; }); + form.render('checkbox', 'distributionFieldsBox'); } - }, function(code, data) { - top.dialog.msg(data.msg); }); } diff --git a/src/main/resources/static/route/examination/distribution/update.html b/src/main/resources/static/route/examination/distribution/update.html index e5b9529..06f2e51 100644 --- a/src/main/resources/static/route/examination/distribution/update.html +++ b/src/main/resources/static/route/examination/distribution/update.html @@ -150,62 +150,125 @@ var stationArray; var classPlanArray; - var dataLength = 0; - var planLength = 0; // 初始化开班计划 function initDistributionClassPlans() { classPlanArray = new Array(); - top.restAjax.get(top.restAjax.path('api/classplan/list?classPlanIdListIds={classPlanIds}', [ planId ]), {}, null, function (code, data, args) { - planLength = data.length; - for (var i = 0; i < data.length; i++) { - var planData = {index: i, data: data[i]}; - top.restAjax.get(top.restAjax.path('api/applystudents/list-by-classid/{planId}', [ data[i].classPlanId ]), {}, planData, function (code, userData, args) { - var user = args.data; - user.applyCount = userData.length; - classPlanArray.push(user); - if (args.index == planLength - 1) { - laytpl(document.getElementById('distributionClassPlansBoxTemplate').innerHTML).render(classPlanArray, function (html) { - console.log(classPlanArray); - document.getElementById('distributionClassPlansBox').innerHTML = html; - }); - form.render('checkbox', 'distributionClassPlansBox'); - } - }, function (code, data) { - top.dialog.msg(data.msg); + $.ajax({ + url:'api/classplan/list?classPlanIdListIds=' + planId, + async:false, + type:'get', + dataType:'json', + success: function (data) { + for (var i = 0; i < data.length; i++) { + $.ajax({ + url: 'api/applystudents/list-by-classid/' + data[i].classPlanId, + async: false, + type: 'get', + dataType: 'json', + success: function (userData) { + data[i].applyCount = userData.length; + classPlanArray.push( data[i]); + } + }); + } + laytpl(document.getElementById('distributionClassPlansBoxTemplate').innerHTML).render(classPlanArray, function (html) { + console.log(classPlanArray); + document.getElementById('distributionClassPlansBox').innerHTML = html; }); + form.render('checkbox', 'distributionClassPlansBox'); } - }, function (code, data) { - top.dialog.msg(data.msg); }); } // 初始化考场 function initDistributionFields() { stationArray = new Array(); - top.restAjax.get(top.restAjax.path('api/institution/list?institutionType=考点信息', []), {}, null, function(code, data, args) { - dataLength = data.length; - for(var i = 0 ; i < data.length ; i++) { - var institutionData = {index:i, data:data[i]}; - top.restAjax.get(top.restAjax.path('api/organization/list?organizationType={organizationType}', [data[i].institutionId]), {}, institutionData, function(code, orgData, args) { - var stationData = {stationName:args.data.institutionName, fieldArray:orgData}; - stationArray.push(stationData); - if(args.index == dataLength - 1) { - laytpl(document.getElementById('distributionFieldsBoxTemplate').innerHTML).render(stationArray, function(html) { - console.log(stationArray); - document.getElementById('distributionFieldsBox').innerHTML = html; - }); - form.render('checkbox', 'distributionFieldsBox'); - } - }, function(code, data) { - top.dialog.msg(data.msg); + $.ajax({ + url:'api/institution/list?institutionType=考点信息', + async:false, + type:'get', + dataType:'json', + success: function (data) { + for (var i = 0; i < data.length; i++) { + $.ajax({ + url: 'api/organization/list?organizationType=' + data[i].institutionId, + async: false, + type: 'get', + dataType: 'json', + success: function (orgData) { + var stationData = {stationName: data[i].institutionName, fieldArray: orgData}; + stationArray.push(stationData); + } + }); + } + laytpl(document.getElementById('distributionFieldsBoxTemplate').innerHTML).render(stationArray, function (html) { + console.log(stationArray); + document.getElementById('distributionFieldsBox').innerHTML = html; }); + form.render('checkbox', 'distributionFieldsBox'); } - }, function(code, data) { - top.dialog.msg(data.msg); }); } + // var stationArray; + // var classPlanArray; + // var dataLength = 0; + // var planLength = 0; + // + // // 初始化开班计划 + // function initDistributionClassPlans() { + // classPlanArray = new Array(); + // top.restAjax.get(top.restAjax.path('api/classplan/list?classPlanIdListIds={classPlanIds}', [ planId ]), {}, null, function (code, data, args) { + // planLength = data.length; + // for (var i = 0; i < data.length; i++) { + // var planData = {index: i, data: data[i]}; + // top.restAjax.get(top.restAjax.path('api/applystudents/list-by-classid/{planId}', [ data[i].classPlanId ]), {}, planData, function (code, userData, args) { + // var user = args.data; + // user.applyCount = userData.length; + // classPlanArray.push(user); + // if (args.index == planLength - 1) { + // laytpl(document.getElementById('distributionClassPlansBoxTemplate').innerHTML).render(classPlanArray, function (html) { + // console.log(classPlanArray); + // document.getElementById('distributionClassPlansBox').innerHTML = html; + // }); + // form.render('checkbox', 'distributionClassPlansBox'); + // } + // }, function (code, data) { + // top.dialog.msg(data.msg); + // }); + // } + // }, function (code, data) { + // top.dialog.msg(data.msg); + // }); + // } + // + // // 初始化考场 + // function initDistributionFields() { + // stationArray = new Array(); + // top.restAjax.get(top.restAjax.path('api/institution/list?institutionType=考点信息', []), {}, null, function(code, data, args) { + // dataLength = data.length; + // for(var i = 0 ; i < data.length ; i++) { + // var institutionData = {index:i, data:data[i]}; + // top.restAjax.get(top.restAjax.path('api/organization/list?organizationType={organizationType}', [data[i].institutionId]), {}, institutionData, function(code, orgData, args) { + // var stationData = {stationName:args.data.institutionName, fieldArray:orgData}; + // stationArray.push(stationData); + // if(args.index == dataLength - 1) { + // laytpl(document.getElementById('distributionFieldsBoxTemplate').innerHTML).render(stationArray, function(html) { + // console.log(stationArray); + // document.getElementById('distributionFieldsBox').innerHTML = html; + // }); + // form.render('checkbox', 'distributionFieldsBox'); + // } + // }, function(code, data) { + // top.dialog.msg(data.msg); + // }); + // } + // }, function(code, data) { + // top.dialog.msg(data.msg); + // }); + // } + // 初始化成立日期时间戳 function initDistributionAllotTime() { laydate.render({ diff --git a/src/main/resources/static/route/insertscore/list.html b/src/main/resources/static/route/insertscore/list.html index 319f1c7..8d88693 100644 --- a/src/main/resources/static/route/insertscore/list.html +++ b/src/main/resources/static/route/insertscore/list.html @@ -51,7 +51,7 @@ var laydate = layui.laydate; var common = layui.common; var resizeTimeout = null; - var tableUrl = 'api/examapply/listpage'; + var tableUrl = 'api/examapply/listpage?checkStatus=1'; // 初始化表格 function initTable() { @@ -105,15 +105,6 @@ return rowData; } }, - {field: 'planPersonNum', width: 180, title: '计划人数', align:'center', - templet: function(row) { - var rowData = row.classPlanDTO[this.field]; - if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { - return '-'; - } - return rowData; - } - }, {field: 'planStartTime', width: 180, title: '计划开始时间', align:'center', templet: function(row) { var rowData = row.classPlanDTO[this.field]; diff --git a/src/main/resources/static/route/insertscore/user-list.html b/src/main/resources/static/route/insertscore/user-list.html index 97fcc75..29ba274 100644 --- a/src/main/resources/static/route/insertscore/user-list.html +++ b/src/main/resources/static/route/insertscore/user-list.html @@ -39,7 +39,7 @@