|
|
|
@ -5,13 +5,16 @@
|
|
|
|
|
position: relative;
|
|
|
|
|
overflow: visible !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.layui-table a {
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#addGeneral_demo .layui-form-item {
|
|
|
|
|
margin-bottom: 5px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#addGeneral_demo .layui-table td {
|
|
|
|
|
padding: 5px 10px;
|
|
|
|
|
}
|
|
|
|
@ -23,8 +26,11 @@
|
|
|
|
|
<div class="layui-btn-group">
|
|
|
|
|
<!-- <layui:accessButton function="courseInfo.query" id="searchFormSearch" action="search"><i class="layui-icon"></i>搜索</layui:accessButton>-->
|
|
|
|
|
<layui:accessButton function="courseInfo.add" action="add"><i class="layui-icon"></i>新增</layui:accessButton>
|
|
|
|
|
<layui:accessButton function="courseInfo.query" action="refresh"><i class="layui-icon"></i>刷新</layui:accessButton>
|
|
|
|
|
<button class="layui-btn layui-btn-primary" type="button" style="border:1px solid #afafaf" onclick="Lib.closeFrame()">返回</button>
|
|
|
|
|
<layui:accessButton function="courseInfo.query" action="refresh"><i class="layui-icon"></i>刷新
|
|
|
|
|
</layui:accessButton>
|
|
|
|
|
<button class="layui-btn layui-btn-primary" type="button" style="border:1px solid #afafaf"
|
|
|
|
|
onclick="Lib.closeFrame()">返回
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<table id="courseInfoTable" lay-filter="courseInfoTable"></table>
|
|
|
|
@ -43,19 +49,22 @@
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">考试标题</label>
|
|
|
|
|
<div class="layui-input-block">
|
|
|
|
|
<input type="text" name="generalQuestionSettingName" placeholder="请输入考证名称" value="{{d.generalQuestionSettingName ||''}}" autocomplete="off" class="layui-input">
|
|
|
|
|
<input type="text" name="generalQuestionSettingName" placeholder="请输入考证名称"
|
|
|
|
|
value="{{d.generalQuestionSettingName ||''}}" autocomplete="off" class="layui-input">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">考试时间</label>
|
|
|
|
|
<div class="layui-input-block">
|
|
|
|
|
<input type="text" id="examTime_" name="examTime_" placeholder="请选择时间" value="" autocomplete="off" class="layui-input">
|
|
|
|
|
<input type="text" id="examTime_" name="examTime_" placeholder="请选择时间" value="" autocomplete="off"
|
|
|
|
|
class="layui-input">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">作答次数</label>
|
|
|
|
|
<div class="layui-input-block">
|
|
|
|
|
<input type="text" name="generalQuestionSettingDoCount" value="{{d.generalQuestionSettingDoCount ||''}}" placeholder="请输入作答次数" autocomplete="off" class="layui-input">
|
|
|
|
|
<input type="text" name="generalQuestionSettingDoCount" value="{{d.generalQuestionSettingDoCount ||''}}"
|
|
|
|
|
placeholder="请输入作答次数" autocomplete="off" class="layui-input">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
@ -63,23 +72,31 @@
|
|
|
|
|
<div class="layui-input-block">
|
|
|
|
|
<label style="width: 50%;float:left;">
|
|
|
|
|
<span style="float: left;width: 155px;line-height: 38px;">题目乱序(同一大题)</span>
|
|
|
|
|
<input type="radio" name="generalQuestionSettingQuestionNoOrder" value="1" title="是" {{d.generalQuestionSettingQuestionNoOrder==1||d.generalQuestionSettingQuestionNoOrder==null?'checked':''}}>
|
|
|
|
|
<input type="radio" name="generalQuestionSettingQuestionNoOrder" value="2" title="否" {{d.generalQuestionSettingQuestionNoOrder==2?'checked':''}}>
|
|
|
|
|
<input type="radio" lay-filter="generalQuestionSettingQuestionNoOrder" name="generalQuestionSettingQuestionNoOrder" value="1" title="是"
|
|
|
|
|
{{d.generalQuestionSettingQuestionNoOrder==1||d.generalQuestionSettingQuestionNoOrder==null?'checked':''}}>
|
|
|
|
|
<input type="radio" lay-filter="generalQuestionSettingQuestionNoOrder" name="generalQuestionSettingQuestionNoOrder" value="2" title="否"
|
|
|
|
|
{{d.generalQuestionSettingQuestionNoOrder==2?'checked':''}}>
|
|
|
|
|
</label>
|
|
|
|
|
<label style="width: 50%;float:left;">
|
|
|
|
|
<span style="float: left;width: 155px;line-height: 38px;">选项乱序(同一大题内)</span>
|
|
|
|
|
<input type="radio" name="generalQuestionSettingOptionNoOrder" value="1" title="是" {{d.generalQuestionSettingOptionNoOrder==1||d.generalQuestionSettingOptionNoOrder==null?'checked':''}}>
|
|
|
|
|
<input type="radio" name="generalQuestionSettingOptionNoOrder" value="2" title="否" {{d.generalQuestionSettingOptionNoOrder==2?'checked':''}}>
|
|
|
|
|
<input type="radio" lay-filter="generalQuestionSettingOptionNoOrder" name="generalQuestionSettingOptionNoOrder" value="1" title="是"
|
|
|
|
|
{{d.generalQuestionSettingOptionNoOrder==1||d.generalQuestionSettingOptionNoOrder==null?'checked':''}}>
|
|
|
|
|
<input type="radio" lay-filter="generalQuestionSettingOptionNoOrder" name="generalQuestionSettingOptionNoOrder" value="2" title="否"
|
|
|
|
|
{{d.generalQuestionSettingOptionNoOrder==2?'checked':''}}>
|
|
|
|
|
</label>
|
|
|
|
|
<label style="width: 50%;float:left;">
|
|
|
|
|
<span style="float: left;width: 155px;line-height: 38px;">答卷后显示答案解析</span>
|
|
|
|
|
<input type="radio" name="generalQuestionSettingEndShowQa" value="1" title="是" {{d.generalQuestionSettingEndShowQa==1||d.generalQuestionSettingEndShowQa==null?'checked':''}}>
|
|
|
|
|
<input type="radio" name="generalQuestionSettingEndShowQa" value="2" title="否" {{d.generalQuestionSettingEndShowQa==2?'checked':''}}>
|
|
|
|
|
<input type="radio" lay-filter="generalQuestionSettingEndShowQa" name="generalQuestionSettingEndShowQa" value="1" title="是"
|
|
|
|
|
{{d.generalQuestionSettingEndShowQa==1||d.generalQuestionSettingEndShowQa==null?'checked':''}}>
|
|
|
|
|
<input type="radio" lay-filter="generalQuestionSettingEndShowQa" name="generalQuestionSettingEndShowQa" value="2" title="否"
|
|
|
|
|
{{d.generalQuestionSettingEndShowQa==2?'checked':''}}>
|
|
|
|
|
</label>
|
|
|
|
|
<label style="width: 50%;float:left;">
|
|
|
|
|
<span style="float: left;width: 155px;line-height: 38px;">答卷后显示答案对错</span>
|
|
|
|
|
<input type="radio" name="generalQuestionSettingEndShowTrueFalse" value="1" title="是" {{d.generalQuestionSettingEndShowTrueFalse==1||d.generalQuestionSettingEndShowQa==null?'checked':''}}>
|
|
|
|
|
<input type="radio" name="generalQuestionSettingEndShowTrueFalse" value="2" title="否" {{d.generalQuestionSettingEndShowTrueFalse==2?'checked':''}}>
|
|
|
|
|
<input type="radio" lay-filter="generalQuestionSettingEndShowTrueFalse" name="generalQuestionSettingEndShowTrueFalse" value="1" title="是"
|
|
|
|
|
{{d.generalQuestionSettingEndShowTrueFalse==1||d.generalQuestionSettingEndShowQa==null?'checked':''}}>
|
|
|
|
|
<input type="radio" lay-filter="generalQuestionSettingEndShowTrueFalse" name="generalQuestionSettingEndShowTrueFalse" value="2" title="否"
|
|
|
|
|
{{d.generalQuestionSettingEndShowTrueFalse==2?'checked':''}}>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -138,6 +155,10 @@
|
|
|
|
|
var courseInfoList = [];
|
|
|
|
|
var questionSettingOptions = []; //出题内容
|
|
|
|
|
var xmSeInitValue = $("#searchForm input[name='businessId']").val();
|
|
|
|
|
var generalQuestionSettingQuestionNoOrder;
|
|
|
|
|
var generalQuestionSettingOptionNoOrder;
|
|
|
|
|
var generalQuestionSettingEndShowQa;
|
|
|
|
|
var generalQuestionSettingEndShowTrueFalse;
|
|
|
|
|
|
|
|
|
|
var demo1 = xmSelect.render({
|
|
|
|
|
el: '#demo1',
|
|
|
|
@ -191,7 +212,11 @@
|
|
|
|
|
title: '创建时间', align: "center", width: 160
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field : 'generalQuestionSettingPushStatus',width: 100,title : '状态',align:"center", templet: function (d) {
|
|
|
|
|
field: 'generalQuestionSettingPushStatus',
|
|
|
|
|
width: 100,
|
|
|
|
|
title: '状态',
|
|
|
|
|
align: "center",
|
|
|
|
|
templet: function (d) {
|
|
|
|
|
if (d.generalQuestionSettingPushStatus == 'PUSH') {
|
|
|
|
|
return "<span style='color:#73a2f8; '>发布</span>";
|
|
|
|
|
} else if (d.generalQuestionSettingPushStatus == "UN_PUSH") {
|
|
|
|
@ -304,11 +329,16 @@
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//添加考试信息
|
|
|
|
|
function addGeneral(data) {
|
|
|
|
|
getQuestionTypeGroupInfo($.isEmpty(data.generalQuestionSettingId) ? xmSeInitValue : data.sourceCourseInfoIds, data);
|
|
|
|
|
if (courseInfoList.length <= 0) {
|
|
|
|
|
var ret = Common.getAjax("/jlw/courseInfo/getValues.json",{"courseLabelType":"考证课程类","courseInfoStatus":1,courseInfoType:1});
|
|
|
|
|
var ret = Common.getAjax("/jlw/courseInfo/getValues.json", {
|
|
|
|
|
"courseLabelType": "考证课程类",
|
|
|
|
|
"courseInfoStatus": 1,
|
|
|
|
|
courseInfoType: 1
|
|
|
|
|
});
|
|
|
|
|
if (ret.code == 0) {
|
|
|
|
|
courseInfoList = ret.data;
|
|
|
|
|
demo1.update({
|
|
|
|
@ -344,16 +374,25 @@
|
|
|
|
|
view.innerHTML = html;
|
|
|
|
|
laydate.render({
|
|
|
|
|
elem: '#examTime_'
|
|
|
|
|
,range: "至" //或 range: '~' 来自定义分割字符
|
|
|
|
|
,type: 'datetime'
|
|
|
|
|
,value: $.isEmpty(data.generalQuestionStartTime)?'':(data.generalQuestionStartTime+' 至 '+data.generalQuestionEndTime)
|
|
|
|
|
,format: 'yyyy-MM-dd HH:mm:ss'
|
|
|
|
|
,
|
|
|
|
|
range: "至" //或 range: '~' 来自定义分割字符
|
|
|
|
|
,
|
|
|
|
|
type: 'datetime'
|
|
|
|
|
,
|
|
|
|
|
value: $.isEmpty(data.generalQuestionStartTime) ? '' : (data.generalQuestionStartTime + ' 至 ' + data.generalQuestionEndTime)
|
|
|
|
|
,
|
|
|
|
|
format: 'yyyy-MM-dd HH:mm:ss'
|
|
|
|
|
});
|
|
|
|
|
form.render();
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
form.render();
|
|
|
|
|
}
|
|
|
|
|
, yes: function (index, layero) {
|
|
|
|
|
var param = {generalQuestionSettingType:"EXAM",businessId:xmSeInitValue,businessType:"FROM_SYSTEM"};
|
|
|
|
|
var param = {
|
|
|
|
|
generalQuestionSettingType: "EXAM",
|
|
|
|
|
businessId: xmSeInitValue,
|
|
|
|
|
businessType: "FROM_SYSTEM"
|
|
|
|
|
};
|
|
|
|
|
var generalQuestionSettingName = $("#addGeneral_demo input[name='generalQuestionSettingName']").val();
|
|
|
|
|
if ($.isEmpty(generalQuestionSettingName)) {
|
|
|
|
|
Common.info("请输入考试标题!");
|
|
|
|
@ -397,10 +436,10 @@
|
|
|
|
|
var sourceCourseInfoIds = $("#addGeneral_demo input[name='sourceCourseInfoIds']").val(); //题目来源课程
|
|
|
|
|
param.sourceCourseInfoIds = sourceCourseInfoIds;
|
|
|
|
|
param.questionSettingOptions = questionSettingOptions;
|
|
|
|
|
var generalQuestionSettingQuestionNoOrder = $("#addGeneral_demo input[name='generalQuestionSettingQuestionNoOrder']:checked").val();
|
|
|
|
|
/*var generalQuestionSettingQuestionNoOrder = $("#addGeneral_demo input[name='generalQuestionSettingQuestionNoOrder']:checked").val();
|
|
|
|
|
var generalQuestionSettingOptionNoOrder = $("#addGeneral_demo input[name='generalQuestionSettingOptionNoOrder']:checked").val();
|
|
|
|
|
var generalQuestionSettingEndShowQa = $("#addGeneral_demo input[name='generalQuestionSettingEndShowQa']:checked").val();
|
|
|
|
|
var generalQuestionSettingEndShowTrueFalse = $("#addGeneral_demo input[name='generalQuestionSettingEndShowTrueFalse']:checked").val();
|
|
|
|
|
var generalQuestionSettingEndShowTrueFalse = $("#addGeneral_demo input[name='generalQuestionSettingEndShowTrueFalse']:checked").val();*/
|
|
|
|
|
param.generalQuestionSettingQuestionNoOrder = generalQuestionSettingQuestionNoOrder;
|
|
|
|
|
param.generalQuestionSettingOptionNoOrder = generalQuestionSettingOptionNoOrder;
|
|
|
|
|
param.generalQuestionSettingEndShowQa = generalQuestionSettingEndShowQa;
|
|
|
|
@ -408,6 +447,7 @@
|
|
|
|
|
param.generalQuestionSettingName = generalQuestionSettingName;
|
|
|
|
|
param.generalQuestionSettingDoCount = generalQuestionSettingDoCount;
|
|
|
|
|
param.generalQuestionSettingId = data.generalQuestionSettingId;
|
|
|
|
|
|
|
|
|
|
var url = "/api/generalQuestionSetting/addQuestionByType.do";
|
|
|
|
|
if (!$.isEmpty(param.generalQuestionSettingId)) {
|
|
|
|
|
url = "/jlw/generalQuestionSetting/edit.json";
|
|
|
|
@ -428,8 +468,20 @@
|
|
|
|
|
layer.close(index);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
form.render();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
form.on('radio(generalQuestionSettingQuestionNoOrder)', function (data) {
|
|
|
|
|
generalQuestionSettingQuestionNoOrder = data.value;
|
|
|
|
|
});
|
|
|
|
|
form.on('radio(generalQuestionSettingOptionNoOrder)', function (data) {
|
|
|
|
|
generalQuestionSettingOptionNoOrder = data.value;
|
|
|
|
|
});
|
|
|
|
|
form.on('radio(generalQuestionSettingEndShowQa)', function (data) {
|
|
|
|
|
generalQuestionSettingEndShowQa = data.value;
|
|
|
|
|
});
|
|
|
|
|
form.on('radio(generalQuestionSettingEndShowTrueFalse)', function (data) {
|
|
|
|
|
generalQuestionSettingEndShowTrueFalse = data.value;
|
|
|
|
|
});
|
|
|
|
|
//根据课程ID获取相应的题目数量及类型
|
|
|
|
|
function getQuestionTypeGroupInfo(ids, item) {
|
|
|
|
|
var map = {};
|
|
|
|
@ -438,7 +490,10 @@
|
|
|
|
|
map[it.questionType] = it;
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
var ret = Common.postAjax("/api/resourcesQuestion/questionTypeGroupInfo.do",{courseInfoIdPlural:ids,courseLabelTypePlural:"考证课程类"});
|
|
|
|
|
var ret = Common.postAjax("/api/resourcesQuestion/questionTypeGroupInfo.do", {
|
|
|
|
|
courseInfoIdPlural: ids,
|
|
|
|
|
courseLabelTypePlural: "考证课程类"
|
|
|
|
|
});
|
|
|
|
|
if (ret.code == 0) {
|
|
|
|
|
var ctNum = "", hjNum = "";
|
|
|
|
|
if (!$.isEmpty(ret.data)) {
|
|
|
|
@ -480,7 +535,7 @@
|
|
|
|
|
$("span[name='fzNum']").text();
|
|
|
|
|
$("span[name='hjNum']").text(zf);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
form.r
|
|
|
|
|
view.init();
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|