메인페이지 수정

This commit is contained in:
hyunho 2020-10-28 06:25:13 +00:00
parent ddf4647215
commit 713cef22f3
6 changed files with 257 additions and 109 deletions

View File

@ -1701,5 +1701,13 @@
<isNotNull property="cmno" prepend="and">cmno=#cmno#</isNotNull> <isNotNull property="cmno" prepend="and">cmno=#cmno#</isNotNull>
</dynamic> </dynamic>
</select> </select>
<select id="cm.cgetc" parameterClass="hashtable" resultClass="cm">
select
b.cgno,b.pcgno,b.cgname,b.cgcode,b.isuse,b.iscover,b.isdel,b.cdt,b.cno,b.udt,b.uno,b.uip
from cg a
left outer join cg b on a.cgno = b.pcgno
where a.isdel=0
<isNotNull property="cgcode" prepend="and">a.cgcode=#cgcode#</isNotNull>
</select>
</statements> </statements>
</sqlMap> </sqlMap>

View File

@ -31,6 +31,7 @@ namespace NP.FO.Controllers
ViewBag.POPUPXS = CookieGet("popup", ""); ViewBag.POPUPXS = CookieGet("popup", "");
ViewBag.IsMain = true; ViewBag.IsMain = true;
vm.Datas = Dao.Get<Data>("site.main", new System.Collections.Hashtable() { {"offcode", OffCode }, { "oncode", OnCode} }); vm.Datas = Dao.Get<Data>("site.main", new System.Collections.Hashtable() { {"offcode", OffCode }, { "oncode", OnCode} });
vm.CMs = Dao.Get<CM>("cm.cgetc", new System.Collections.Hashtable() { { "cgcode", "2" } });//cgcode = 기타교육 // 기타교육 cgcode 바뀌면 파라미터도 변경해야함
ViewBag.OnCode1 = OnCode1; ViewBag.OnCode1 = OnCode1;
return View(vm); return View(vm);

View File

@ -2,7 +2,7 @@
<head> <head>
<style> <style>
.mainTop *{ .mainTop * {
font-family: 'Noto Sans KR', sans-serif; font-family: 'Noto Sans KR', sans-serif;
font-size: 11pt; font-size: 11pt;
letter-spacing: -0.05em; letter-spacing: -0.05em;
@ -49,130 +49,204 @@
</head> </head>
@section main{ @section main{
<div id="main"> <form id="indexForm" method="post">
<div class="container"> <div id="main">
<div class="mainTop"> <div class="container">
<h2>YICTE Smart Search</h2> <div class="mainTop">
<p>나에게 필요한 교육을 찾아드립니다.</p> <h2><span style="font:bold; font-size:50pt">YICTE</span> Smart Search</h2>
</div> <p style="margin-top:0px">나에게 필요한 교육을 찾아드립니다.</p>
<form action=""> </div>
<input type="hidden" id="sch1" value="" /> <input type="hidden" id="sch1" value="" />
<input type="hidden" id="sch2" value="" /> <input type="hidden" id="sch2" value="" />
<input type="hidden" id="sch3" value="" /> <input type="hidden" id="sch3" value="" />
<input type="hidden" id="sch4" value="" /> <input type="hidden" id="sch4" value="" />
<input type="hidden" id="sch5" value="" /> <input type="hidden" id="sch5" value="" />
<ul class="mainSch">
<li class="msCont"> <input type="hidden" id="Edutype" name="Edutype" />
<em>SKILL</em> @if (Model.Edutype == 0 || Model.Edutype == null)
<div class="msSel active" id="msSel1"> {
<span>교육유형</span> <ul class="mainTab">
<div> <li class="current" id="liTab1"><a href="#">법정교육</a></li>
<li id="liTab2"><a href="#">기타교육</a></li>
</ul>
<ul class="mainSch">
<li class="msCont">
<em>SKILL</em>
<div class="msSel active" id="msSel1">
<span>교육유형</span>
<div> <div>
<ul> <div>
<li><a href="javascript:schIpt('1', '1', '온라인교육');">온라인교육</a></li> <ul>
<li><a href="javascript:schIpt('1', '0', '교육장교육');">교육장교육</a></li> <li><a href="javascript:schIpt('1', '1', '온라인교육');">온라인교육</a></li>
</ul> <li><a href="javascript:schIpt('1', '0', '교육장교육');">교육장교육</a></li>
</ul>
</div>
</div> </div>
</div> </div>
</div> </li>
</li> <li class="msCont">
<li class="msCont"> <em>JOB</em>
<em>JOB</em> <div class="msSel disable" id="msSel2">
<div class="msSel disable" id="msSel2"> <span>기술인분류</span>
<span>직무분야</span>
<div>
<div> <div>
<ul> <div>
@foreach (var t in Model.ComCodes.Where(w => w.cgroup.ToString() == "typeman")) <ul>
{ @foreach (var t in Model.ComCodes.Where(w => w.cgroup.ToString() == "typeman"))
<li><a href="javascript:schIpt('2', '@t.ccode', '@t.cname');">@t.cname</a></li> {
} <li><a href="javascript:schIpt('2', '@t.ccode', '@t.cname');">@t.cname</a></li>
</ul> }
</ul>
</div>
</div> </div>
</div> </div>
</div> </li>
</li> <li class="msCont">
<li class="msCont"> <em>OBJECT</em>
<em>OBJECT</em> <div class="msSel disable" id="msSel3">
<div class="msSel disable" id="msSel3"> <span>교육목적</span>
<span>교육목적</span>
<div>
<div> <div>
<ul> <div>
@foreach (var t in Model.ComCodes.Where(w => w.cgroup.ToString() == "typeedu")) <ul>
{ @foreach (var t in Model.ComCodes.Where(w => w.cgroup.ToString() == "typeedu"))
<li><a href="javascript:schIpt('3', '@t.ccode', '@t.cname');">@t.cname</a></li> {
} <li><a href="javascript:schIpt('3', '@t.ccode', '@t.cname');">@t.cname</a></li>
</ul> }
</ul>
</div>
</div> </div>
</div> </div>
</div> </li>
</li> <li class="msCont">
<li class="msCont"> <em>GRADE</em>
<em>GRADE</em> <div class="msSel disable" id="msSel4">
<div class="msSel disable" id="msSel4"> <span>등급</span>
<span id="spnTypeGrade">등급</span>
<div>
<div> <div>
<ul> <div>
@foreach (var t in Model.ComCodes.Where(w => w.cgroup.ToString() == "typegrade")) <ul>
{ @foreach (var t in Model.ComCodes.Where(w => w.cgroup.ToString() == "typegrade"))
<li id="liGrade@(t.ccode)"><a href="javascript:schIpt('4', '@t.ccode', '@t.cname');">@t.cname</a></li> {
} <li id="liGrade@(t.ccode)"><a href="javascript:schIpt('4', '@t.ccode', '@t.cname');">@t.cname</a></li>
</ul> }
</ul>
</div>
</div> </div>
</div> </div>
</div> </li>
</li> <li class="msCont">
<li class="msCont"> <em>TYPE</em>
<em>TYPE</em> <div class="msSel disable" id="msSel5">
<div class="msSel disable" id="msSel5"> <span>직무분야</span>
<span>직무분야</span>
<div>
<div> <div>
<ul> <div>
@foreach (var t in Model.ComCodes.Where(w => w.cgroup.ToString() == "typejob")) <ul>
{ @foreach (var t in Model.ComCodes.Where(w => w.cgroup.ToString() == "typejob"))
<li><a href="javascript:schIpt('5', '@t.ccode', '@t.cname');">@t.cname</a></li> {
} <li><a href="javascript:schIpt('5', '@t.ccode', '@t.cname');">@t.cname</a></li>
</ul> }
</ul>
</div>
</div> </div>
</div> </div>
</div> </li>
</li> <li><a href="#" class="msBtn">검색하기</a></li>
<li><a href="#" class="msBtn">검색하기</a></li> </ul>
</ul> }
</form> else if(Model.Edutype == 1)
{
<ul class="mainTab">
<li id="liTab1"><a href="#">법정교육</a></li>
<li class="current" id="liTab2"><a href="#">기타교육</a></li>
</ul>
<ul class="mainSch">
<li class="msCont">
<em>SKILL</em>
<div class="msSel active" id="msSel1">
<span>교육유형</span>
<div>
<div>
<ul>
<li><a href="javascript:schIpt('1', '1', '온라인교육');">온라인교육</a></li>
<li><a href="javascript:schIpt('1', '0', '교육장교육');">교육장교육</a></li>
</ul>
</div>
</div>
</div>
</li>
<li class="msCont">
<em>JOB</em>
<div class="msSel disable" id="msSel2">
<span>교육선택</span>
<div>
<div>
<ul>
@foreach (var t in Model.CMs)
{
<li><a href="javascript:schIpt('2', '@t.cgcode', '@t.cgname');">@t.cgname</a></li>
}
</ul>
</div>
</div>
</div>
</li>
<li class="msCont">
<em></em>
<div class="msSel disable" id="msSel3">
</div>
</li>
<li class="msCont">
<em></em>
<div class="msSel disable" id="msSel4">
</div>
</li>
<li class="msCont">
<em></em>
<div class="msSel disable" id="msSel5">
</div>
</li>
<li><a href="#" class="msBtn">검색하기</a></li>
</ul>
}
</div>
</div> </div>
</div> </form>
} }
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function () {
$("#lblTypeGrade").text("등급"); $('#liTab1').click(function () {
}); $("#Edutype").val(0);
$("#indexForm").submit();
});
$('#liTab2').click(function () {
$("#Edutype").val(1);
$("#indexForm").submit();
});
$('.msSel span').click(function () { initSearch();
if ($(this).parent().is('.active')) {
if ($(this).is('.on')) { $('.msSel span').click(function () {
$(this).removeClass('on'); if ($(this).parent().is('.active')) {
$(this).next().slideUp(300); if ($(this).is('.on')) {
$(this).removeClass('on');
$(this).next().slideUp(300);
} else {
$('.msSel span').removeClass('on');
$('.msSel > div').slideUp(300);
$(this).addClass('on');
$(this).next().slideDown(300);
}
} else { } else {
$('.msSel span').removeClass('on'); if ($(this).parent().attr('id') == 'msSel2') {
$('.msSel > div').slideUp(300); alert('교육유형을 선택해주세요.');
$(this).addClass('on'); } else if ($(this).parent().attr('id') == 'msSel3') {
$(this).next().slideDown(300); alert('직무분야를 선택해주세요.');
} else if ($(this).parent().attr('id') == 'msSel4') {
alert('교육목적을 선택해주세요.');
} else if ($(this).parent().attr('id') == 'msSel5') {
alert('등급을 선택해주세요.');
}
} }
} else { });
if ($(this).parent().attr('id') == 'msSel2') {
alert('교육유형을 선택해주세요.');
} else if ($(this).parent().attr('id') == 'msSel3') {
alert('직무분야를 선택해주세요.');
} else if ($(this).parent().attr('id') == 'msSel4') {
alert('교육목적을 선택해주세요.');
} else if ($(this).parent().attr('id') == 'msSel5') {
alert('등급을 선택해주세요.');
}
}
}); });
function schIpt(num, code, name) { function schIpt(num, code, name) {
$('#sch' + num).val(code); $('#sch' + num).val(code);
@ -183,14 +257,31 @@
$('#msSel' + (Number(num) + 1)).addClass('active'); $('#msSel' + (Number(num) + 1)).addClass('active');
$('#msSel' + (Number(num) + 1) + ' > div').slideDown(300); $('#msSel' + (Number(num) + 1) + ' > div').slideDown(300);
if (num == 3 && code == 58 && name == "승급교육") { if (num == 3 && name == "승급교육") {
$("#spnTypeGrade").html("승급가능등급"); $('#msSel4 > span').text("승급가능등급");
$("#liGrade59").hide(); $("#liGrade59").hide();
} }
else { else if (num == 3 && name != "승급교육") {
$("#spnTypeGrade").html("등급"); $('#msSel4 > span').text("등급");
$("#liGrade59").show(); $("#liGrade59").show();
} }
}; }
function initSearch() {
if ($("#liTab1").hasClass("current"))
{
$('#msSel2 > span').text("기술인분류");
$('#msSel3 > span').text("교육목적");
$('#msSel4 > span').text("등급");
$('#msSel5 > span').text("직무분야");
}
else if ($("#liTab1").hasClass("current"))
{
$('#msSel2 > span').text("교육선택");
$('#msSel3 > span').text("");
$('#msSel4 > span').text("");
$('#msSel5 > span').text("");
}
}
</script> </script>

View File

@ -340,9 +340,56 @@ body {}
font-weight: 300; font-weight: 300;
margin-top: 20px; margin-top: 20px;
} }
.mainTab {
margin-top: 100px;
}
.mainTab:after {
content: '';
display: table;
clear: both;
}
.mainTab li {
float: left;
position: relative;
padding-right: 16px;
margin-right: 15px;
}
.mainTab li:last-child {
margin-right: 0;
padding-right: 0;
}
.mainTab li:after {
content: '';
display: block;
width: 1px;
height: 14px;
background: #fff;
position: absolute;
right: 0;
top: 50%;
margin-top: -7px;
}
.mainTab li:last-child:after {
display: none;
}
.mainTab li a {
display: block;
font-size: 14pt;
color: rgba(255,255,255,0.5);
}
.mainTab li.current a {
color: #fff;
}
.mainSch { .mainSch {
margin-top: 140px; margin-top: 15px;
} }
.mainSch:after { .mainSch:after {

View File

@ -1,8 +1,8 @@
$(window).on("keydown", function (e) { $(window).on("keydown", function (e) {
if (e.keyCode == 116 || e.keyCode == 123) { //if (e.keyCode == 116 || e.keyCode == 123) {
prv(); return false; // prv(); return false;
} //}
else if (e.keyCode == 119 && typeof (save) == "function" && $("#layermessage:visible").length < 1) { if (e.keyCode == 119 && typeof (save) == "function" && $("#layermessage:visible").length < 1) {
save(); save();
} }
else if (e.keyCode == 115 && typeof (del) == "function" && $("#layermessage:visible").length < 1) { else if (e.keyCode == 115 && typeof (del) == "function" && $("#layermessage:visible").length < 1) {

View File

@ -15,5 +15,6 @@ namespace NP.Model
public IList<CM> CMs { get; set; } public IList<CM> CMs { get; set; }
public IList<Data> Datas { get; set; } public IList<Data> Datas { get; set; }
public IList<CMInning> CMInnings { get; set; } public IList<CMInning> CMInnings { get; set; }
public int? Edutype { get; set; }
} }
} }