考场分配详情页面
This commit is contained in:
parent
7a7db206a7
commit
14a249e42d
@ -80,13 +80,13 @@
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="layui-col-lg6" >
|
||||
<label class="layui-form-label">考试开始<span style="color:red">*</span></label>
|
||||
<label class="layui-form-label">考试开始</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="distributionAllotTime" readonly name="distributionAllotTime" style="cursor:pointer;" class="layui-input" value="" placeholder="请输入考试开始时间" maxlength="25" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6" >
|
||||
<label class="layui-form-label">考试结束<span style="color:red">*</span></label>
|
||||
<label class="layui-form-label">考试结束</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="distributionAllotEndTime" readonly name="distributionAllotEndTime" style="cursor:pointer;" class="layui-input" value="" placeholder="请输入考试结束时间" maxlength="25" lay-verify="required">
|
||||
</div>
|
||||
@ -118,9 +118,9 @@
|
||||
<label class="layui-form-label">{{ station.stationName }}</label>
|
||||
<div class="layui-input-block">
|
||||
{{# for(var i = 0, item; item = station.fieldArray[i++];) { }}
|
||||
{{# if(item.checked) {
|
||||
{{# if(item.checked) { }}
|
||||
<input type="checkbox" {{item.checked}} name="distributionFields[{{item.organizationId}}]" value="{{item.organizationId}}" title="{{item.organizationName}}【 {{item.organizationDesc == 1 ? '理论考场' : item.organizationDesc == 2 ? '实操考场' : '混合考场'}}】(可容纳{{item.organizationUserNum}}人)" lay-verify="required">
|
||||
} }}
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</div>
|
||||
</div>
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user