194 lines
11 KiB
Plaintext
194 lines
11 KiB
Plaintext
|
|
@model NP.Model.VMCM
|
||
|
|
@{
|
||
|
|
Layout = "~/Views/Shared/_PopupLayout.cshtml";
|
||
|
|
}
|
||
|
|
<form id="mform" method="post" acton="/cm/qp">
|
||
|
|
<section class="panel panel-default clearfix devsearch">
|
||
|
|
@Html.Partial("./Partial/SearchCaption")
|
||
|
|
<div class="step-content">
|
||
|
|
<div class="step-pane active form-inline">
|
||
|
|
@Html.Partial("./Partial/Select", Model.CMs, new ViewDataDictionary { { "name", "stringval" }, { "selected", Model.stringval }, { "df", ":-과정선택" } })
|
||
|
|
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "ccdiff"), new ViewDataDictionary { { "name", "StringVal2" }, { "selected", Model.stringval2 }, { "cssclass", "searchcon " }, { "df", ":" + Model.ComGroups.Where(w => w.cgroup == "ccdiff").First().cgroupname } })
|
||
|
|
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "cc1"), new ViewDataDictionary { { "name", "StringVal3" }, { "selected", Model.stringval3 }, { "cssclass", "searchcon " }, { "df", ":" + Model.ComGroups.Where(w => w.cgroup == "cc1").First().cgroupname } })
|
||
|
|
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "cc2"), new ViewDataDictionary { { "name", "StringVal4" }, { "selected", Model.stringval4 }, { "cssclass", "searchcon " }, { "df", ":" + Model.ComGroups.Where(w => w.cgroup == "cc2").First().cgroupname } })
|
||
|
|
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "cc3"), new ViewDataDictionary { { "name", "StringVal5" }, { "selected", Model.stringval5 }, { "cssclass", "searchcon " }, { "df", ":" + Model.ComGroups.Where(w => w.cgroup == "cc3").First().cgroupname } })
|
||
|
|
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "cc4"), new ViewDataDictionary { { "name", "StringVal6" }, { "selected", Model.stringval6 }, { "cssclass", "searchcon " }, { "df", ":" + Model.ComGroups.Where(w => w.cgroup == "cc4").First().cgroupname } })
|
||
|
|
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "cc5"), new ViewDataDictionary { { "name", "StringVal7" }, { "selected", Model.stringval7 }, { "cssclass", "searchcon " }, { "df", ":" + Model.ComGroups.Where(w => w.cgroup == "cc5").First().cgroupname } })
|
||
|
|
@Html.Partial("./Partial/Button", new NP.Model.Button() { Special = "search" })
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</section>
|
||
|
|
<div class="col-md-12 resultbox" @*style="padding: 0; margin-bottom: 60px;"*@>
|
||
|
|
<table class="databox" id="box1" style="width:100%;">
|
||
|
|
<colgroup>
|
||
|
|
<col style="width: 30px;" />
|
||
|
|
<col style="width: 120px;" />
|
||
|
|
<col style="width: 50px;" />
|
||
|
|
<col style="width: 50px;" />
|
||
|
|
<col style="width: 70px;" />
|
||
|
|
<col style="width: 70px;" />
|
||
|
|
<col style="width: 70px;" />
|
||
|
|
<col style="width: 70px;" />
|
||
|
|
<col style="width: 70px;" />
|
||
|
|
<col style="width:*;" />
|
||
|
|
<col style="width: 70px;" />
|
||
|
|
<col style="width: 30px;" />
|
||
|
|
</colgroup>
|
||
|
|
<thead>
|
||
|
|
<tr>
|
||
|
|
<th><input type="checkbox" onclick="javascript: checkall('box1', this);" /></th>
|
||
|
|
<th>과정</th>
|
||
|
|
<th>문제유형</th>
|
||
|
|
<th>@Model.ComGroups.Where(w => w.cgroup == "ccdiff").First().cgroupname</th>
|
||
|
|
<th>@Model.ComGroups.Where(w => w.cgroup == "cc1").First().cgroupname</th>
|
||
|
|
<th>@Model.ComGroups.Where(w => w.cgroup == "cc2").First().cgroupname</th>
|
||
|
|
<th>@Model.ComGroups.Where(w => w.cgroup == "cc3").First().cgroupname</th>
|
||
|
|
<th>@Model.ComGroups.Where(w => w.cgroup == "cc4").First().cgroupname</th>
|
||
|
|
<th>@Model.ComGroups.Where(w => w.cgroup == "cc5").First().cgroupname</th>
|
||
|
|
<th>문제명</th>
|
||
|
|
<th>등록일</th>
|
||
|
|
<th>점수</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
@foreach (var item in Model.Qs)
|
||
|
|
{
|
||
|
|
<tr class="data center" data-qno="@item.qno" style="font-size:11px;">
|
||
|
|
<td><input type="checkbox" class="autocheck qno" value="@string.Format("{0}:{1}:{2}:{3}:{4}:{5}:{6}:{7}:{8}", item.qno, item.atype, item.qdiff, item.cc1, item.cc2, item.cc3, item.cc4, item.cc5, item.dpoint)" /></td>
|
||
|
|
<td class="text-left" data-val="@item.atype">@item.cname</td>
|
||
|
|
<td class="atype" data-val="@item.atype">@item.atypename</td>
|
||
|
|
<td class="qdiff" data-val="@item.qdiff">@item.qdiffname</td>
|
||
|
|
<td class="qp1" data-val="@item.cc1">@item.ccname1</td>
|
||
|
|
<td class="qp2" data-val="@item.cc2">@item.ccname2</td>
|
||
|
|
<td class="qp3" data-val="@item.cc3">@item.ccname3</td>
|
||
|
|
<td class="qp4" data-val="@item.cc4">@item.ccname4</td>
|
||
|
|
<td class="qp5" data-val="@item.cc5">@item.ccname5</td>
|
||
|
|
<td class="qts text-left">@item.qtextstring</td>
|
||
|
|
<td>@item.cdtymd</td>
|
||
|
|
<td class="dpoint">@item.dpoint</td>
|
||
|
|
</tr>
|
||
|
|
}
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
<div class="botfixempty" style="height:100px;"><br><br><br><br></div>
|
||
|
|
</div>
|
||
|
|
<div class="buttonbox" style="position: fixed; bottom: 0; z-index: 9; background-color: #999; left: 0; right: 0; padding: 10px 20px;">
|
||
|
|
@if (Model.stringval13 == "R" || Model.stringval13 == "RSC")
|
||
|
|
{
|
||
|
|
<select id="randomcount" class="form-control disp-init" style="width: 150px; vertical-align: middle;">
|
||
|
|
<option value="">랜덤선택</option>
|
||
|
|
@for (int i = 1; i < 101; i++)
|
||
|
|
{
|
||
|
|
<option value="@i">랜덤 @(i)개 선택</option>
|
||
|
|
}
|
||
|
|
</select>
|
||
|
|
}
|
||
|
|
<a href="#" onclick="javascript:closeframepop();" class="btn btn-s-xs btn-default f-r" style="margin-left: 10px;">닫기</a>
|
||
|
|
<a href="#" onclick="javascript:select();" class="btn btn-s-xs btn-info f-r" style="margin-left: 5px;">선택문제 추가</a>
|
||
|
|
@if (Model.stringval13 != "RSC")
|
||
|
|
{
|
||
|
|
<select id="randompoint" class="form-control disp-init f-r" style="width: 150px; vertical-align: middle;">
|
||
|
|
<option value="">일괄적용점수</option>
|
||
|
|
@for (int i = 1; i < 20; i++)
|
||
|
|
{
|
||
|
|
<option value="@i">일괄 @(i)점 적용</option>
|
||
|
|
}
|
||
|
|
</select>
|
||
|
|
}
|
||
|
|
</div>
|
||
|
|
@Html.HiddenFor(m=>m.stringval13)
|
||
|
|
</form>
|
||
|
|
@section styles{
|
||
|
|
<style type="text/css">
|
||
|
|
table.databox tbody tr td{padding: 3px 5px;}
|
||
|
|
</style>
|
||
|
|
}
|
||
|
|
@section scripts{
|
||
|
|
<script>
|
||
|
|
$(document).ready(function () {
|
||
|
|
$("#randomcount").on("click", function () {
|
||
|
|
$("#box1 tbody input.autocheck").prop("checked", false);
|
||
|
|
if ($(this).val() != "") {
|
||
|
|
if (getint($(this).val()) > $("#box1 tbody tr.data").length) {
|
||
|
|
$(this).val("");
|
||
|
|
alert("랜덤선택을 " + $("#box1 tbody tr.data").length + "개 이하로 선택해주세요.");
|
||
|
|
}
|
||
|
|
else {
|
||
|
|
var okcnt = 0;
|
||
|
|
var okfull = getint($(this).val());
|
||
|
|
while (okcnt < okfull) {
|
||
|
|
var rd = Math.floor(Math.random() * $("#box1 tbody tr.data").length);
|
||
|
|
if (!$("#box1 tbody input.autocheck:eq(" + rd + ")").prop("checked")) {
|
||
|
|
$("#box1 tbody input.autocheck:eq(" + rd + ")").prop("checked", true);
|
||
|
|
okcnt++;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
$(this).val("");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
});
|
||
|
|
//기등록문제 제거
|
||
|
|
parent.calcplist();
|
||
|
|
pqlist = parent.pqlist + ",";
|
||
|
|
if ($("#box1 tbody tr.data").length > 0) {
|
||
|
|
for (i = $("#box1 tbody tr.data").length - 1; i > -1; i--) {
|
||
|
|
if (pqlist.indexOf("," + $("#box1 tbody tr.data:eq(" + i + ")").attr("data-qno") + ",") > -1) {
|
||
|
|
$("#box1 tbody tr.data:eq(" + i + ")").remove();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
});
|
||
|
|
var pqlist = "";
|
||
|
|
function select() {
|
||
|
|
if ($("#box1 tbody tr.data input.autocheck:checked").length < 1) {
|
||
|
|
msg("추가할 문제를 선택해주세요.");
|
||
|
|
}
|
||
|
|
else {
|
||
|
|
var goselect = false;
|
||
|
|
var _point = 0;
|
||
|
|
if ($("#randompoint").length == 0 || $("#randompoint").val() == "") {
|
||
|
|
goselect = true;
|
||
|
|
}
|
||
|
|
else if (confirm("선택하신 문제를 " + $("#randompoint").val() + "점으로 일괄추가하시겠습니까?")) {
|
||
|
|
_point = getint($("#randompoint").val());
|
||
|
|
goselect = true;
|
||
|
|
}
|
||
|
|
if (goselect) {
|
||
|
|
var selected = [];
|
||
|
|
$.each($("#box1 tbody tr.data input.autocheck:checked"), function (i, r) {
|
||
|
|
var ds = $(r).val().split(':');
|
||
|
|
pqlist += "," + ds[0];
|
||
|
|
selected.push({
|
||
|
|
qno: ds[0],
|
||
|
|
atype: ds[1],
|
||
|
|
atypename: $(r).closest("tr").find("td.atype").text(),
|
||
|
|
qdiff: ds[2],
|
||
|
|
qdiffname: nulltoemt($(r).closest("tr").find("td.qdiff").text()),
|
||
|
|
cc1: ds[3],
|
||
|
|
ccname1: nulltoemt($(r).closest("tr").find("td.qp1").text()),
|
||
|
|
cc2: ds[4],
|
||
|
|
ccname2: nulltoemt($(r).closest("tr").find("td.qp2").text()),
|
||
|
|
cc3: ds[5],
|
||
|
|
ccname3: nulltoemt($(r).closest("tr").find("td.qp3").text()),
|
||
|
|
cc4: ds[6],
|
||
|
|
ccname4: nulltoemt($(r).closest("tr").find("td.qp4").text()),
|
||
|
|
cc5: ds[7],
|
||
|
|
ccname5: $(r).closest("tr").find("td.qp5").text(),
|
||
|
|
qtextstring: $(r).closest("tr").find("td.qts").text(),
|
||
|
|
dpoint: _point < 1 ? getint(ds[8]) : _point,
|
||
|
|
});
|
||
|
|
});
|
||
|
|
pqlist += ",";
|
||
|
|
parent.selectquestion(selected);
|
||
|
|
for (i = $("#box1 tbody tr.data").length - 1; i > -1; i--) {
|
||
|
|
if ($("#box1 tbody tr.data:eq(" + i + ")").find("input.autocheck.qno").prop("checked")) {
|
||
|
|
$("#box1 tbody tr.data:eq(" + i + ")").remove();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
msg("추가되었습니다.");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
//closeframepop();
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
}
|