메인페이지 수정

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,18 +49,27 @@
</head> </head>
@section main{ @section main{
<form id="indexForm" method="post">
<div id="main"> <div id="main">
<div class="container"> <div class="container">
<div class="mainTop"> <div class="mainTop">
<h2>YICTE Smart Search</h2> <h2><span style="font:bold; font-size:50pt">YICTE</span> Smart Search</h2>
<p>나에게 필요한 교육을 찾아드립니다.</p> <p style="margin-top:0px">나에게 필요한 교육을 찾아드립니다.</p>
</div> </div>
<form action="">
<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="" />
<input type="hidden" id="Edutype" name="Edutype" />
@if (Model.Edutype == 0 || Model.Edutype == null)
{
<ul class="mainTab">
<li class="current" id="liTab1"><a href="#">법정교육</a></li>
<li id="liTab2"><a href="#">기타교육</a></li>
</ul>
<ul class="mainSch"> <ul class="mainSch">
<li class="msCont"> <li class="msCont">
<em>SKILL</em> <em>SKILL</em>
@ -79,7 +88,7 @@
<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> <div>
<ul> <ul>
@ -111,7 +120,7 @@
<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 id="spnTypeGrade">등급</span> <span>등급</span>
<div> <div>
<div> <div>
<ul> <ul>
@ -142,14 +151,78 @@
</li> </li>
<li><a href="#" class="msBtn">검색하기</a></li> <li><a href="#" class="msBtn">검색하기</a></li>
</ul> </ul>
}
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>
</form> </form>
</div>
</div>
} }
<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();
});
initSearch();
$('.msSel span').click(function () { $('.msSel span').click(function () {
if ($(this).parent().is('.active')) { if ($(this).parent().is('.active')) {
@ -174,6 +247,7 @@
} }
} }
}); });
});
function schIpt(num, code, name) { function schIpt(num, code, name) {
$('#sch' + num).val(code); $('#sch' + num).val(code);
$('#msSel' + num + '>span').text(name); $('#msSel' + num + '>span').text(name);
@ -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; }
} }
} }