|
|
|
@ -8,12 +8,12 @@
|
|
|
|
|
<script src="${URL_STATIC_ROOT}/m/js/jquery.bxslider.js"></script>
|
|
|
|
|
<script type="text/javascript" src="${URL_STATIC_ROOT}/m/js/chart.min.js"></script>
|
|
|
|
|
<script src="${URL_STATIC_ROOT}/m/js/design.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
<!-- wrap -->
|
|
|
|
|
<div class="wrap wrap_nutrition">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- header_sub -->
|
|
|
|
|
<header class="header_wrapper">
|
|
|
|
|
<a href="javascript:back.return_url()" class="side_Lbtn hidden pre_btn">이전으로</a>
|
|
|
|
@ -30,7 +30,7 @@
|
|
|
|
|
<!-- nutrition_subMain -->
|
|
|
|
|
<div class="nutrition_subMain">
|
|
|
|
|
<!-- nutrition_subMain_wrap -->
|
|
|
|
|
<div class="nutrition_subMain_wrap">
|
|
|
|
|
<div class="nutrition_subMain_wrap">
|
|
|
|
|
|
|
|
|
|
<!-- //nutrition_subMain -->
|
|
|
|
|
<div class="nutrition_subMain_iframe">
|
|
|
|
@ -67,7 +67,7 @@
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<br />
|
|
|
|
|
<!-- nutrition_subMain_iframe -->
|
|
|
|
|
<div class="nutrition_subMain_iframe">
|
|
|
|
@ -76,10 +76,12 @@
|
|
|
|
|
<!-- //nutrition_subMain_iframe -->
|
|
|
|
|
|
|
|
|
|
<!-- nutrition_subMain_graph_list -->
|
|
|
|
|
<div class="nutrition_subMain_graph_list">
|
|
|
|
|
|
|
|
|
|
<div id="nutrition_subMain_graph_list" class="nutrition_subMain_graph_list">
|
|
|
|
|
|
|
|
|
|
<#if (model['rm_child']['past_month']<60)>
|
|
|
|
|
<h2 style="float: left; margin: 30px 0 15px;font-size: 20px; font-weight: 400;">오늘의 식품군</h2>
|
|
|
|
|
<h2 style="float: left; margin: 30px 0 15px;font-size: 20px; font-weight: 400;">
|
|
|
|
|
<span id="today_reg_dt">${model['today']['today_reg_dt']!}</span>의 식품군
|
|
|
|
|
</h2>
|
|
|
|
|
<#if (model['today']['today_recode']==true)>
|
|
|
|
|
<a href="${URL_ROOT}/m/bf_food/view_foodgroup_balance.do?return_url=index" class="detail_veiw_btn">자세히 보기 ></a>
|
|
|
|
|
</#if>
|
|
|
|
@ -90,14 +92,18 @@
|
|
|
|
|
<p class="tit">긍정식품군</p>
|
|
|
|
|
<p>모유, 분유, 곡류, 채소, 단백질, 과일 등</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="circleChart circleChart1" data-percent="${model['today']['healthyFood']!}"><span class="title"><#if model['today']['healthyFood']??>${model['today']['healthyFood']!}<#else>0</#if>점</span></div>
|
|
|
|
|
<div id="healthyFood_today" class="circleChart circleChart1" data-percent="${model['today']['healthyFood']!}">
|
|
|
|
|
<span id="healthyFood_today_data" class="title"><#if model['today']['healthyFood']??>${model['today']['healthyFood']!}<#else>0</#if>점</span>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<div class="txt">
|
|
|
|
|
<p class="tit">부정식품군</p>
|
|
|
|
|
<p>과일, 당 첨가식품, 음료, 과자 등</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="circleChart circleChart1" data-percent="${model['today']['unhealthyFood']!}"><span class="title"><#if model['today']['unhealthyFood']??>${model['today']['unhealthyFood']!}<#else>0</#if>점</span></div>
|
|
|
|
|
<div id="unhealthyFood_today" class="circleChart circleChart1" data-percent="${model['today']['unhealthyFood']!}">
|
|
|
|
|
<span id="unhealthyFood_today_data" class="title"><#if model['today']['unhealthyFood']??>${model['today']['unhealthyFood']!}<#else>0</#if>점</span>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
@ -188,9 +194,15 @@
|
|
|
|
|
icon: 'warning', // success
|
|
|
|
|
showConfirmButton: false,
|
|
|
|
|
timer: 2000
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function show(i){
|
|
|
|
|
if(i == 0){
|
|
|
|
|
document.getElementById('nutrition_subMain_graph_list').style.display = 'block'
|
|
|
|
|
}else{
|
|
|
|
|
document.getElementById('nutrition_subMain_graph_list').style.display = 'none'
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var swiper = new Swiper('.swiper-container1', {
|
|
|
|
|
slidesPerView: 3,
|
|
|
|
|
slidesPerGroup: 3,
|
|
|
|
@ -217,7 +229,8 @@
|
|
|
|
|
onStart: $.noop,
|
|
|
|
|
onStop: $.noop
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
chart1 = window.chart = $('#healthyFood_today').data('easyPieChart');
|
|
|
|
|
chart2 = window.chart = $('#unhealthyFood_today').data('easyPieChart');
|
|
|
|
|
// 높이 똑같게 맞추기
|
|
|
|
|
var equalHeight = function(element) {
|
|
|
|
|
var maxHeight = 0;
|
|
|
|
@ -241,12 +254,41 @@
|
|
|
|
|
var list = $(".nutrition_subMain_swiper .swiper-slide");
|
|
|
|
|
list.height(equalHeight(list));
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
function switch_chart_day(reg_dt) {
|
|
|
|
|
var data = {
|
|
|
|
|
reg_dt
|
|
|
|
|
}
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:'${URL_ROOT}/m/bf_growth/ajax_switch_daily_count.do?1=1',
|
|
|
|
|
type:'post',
|
|
|
|
|
data: data,
|
|
|
|
|
dataType:'json',
|
|
|
|
|
error:function(request,status,error){
|
|
|
|
|
Swal.fire({text:"등록되지 않았습니다"})
|
|
|
|
|
},
|
|
|
|
|
success:function(result){
|
|
|
|
|
console.log(result)
|
|
|
|
|
let healthyFood = result.result.healthyFood
|
|
|
|
|
let unhealthyFood = result.result.unhealthyFood
|
|
|
|
|
$('#today_reg_dt').html(reg_dt)
|
|
|
|
|
$('#healthyFood_today').attr("data-percent",healthyFood);
|
|
|
|
|
$('#unhealthyFood_today').attr("data-percent",unhealthyFood);
|
|
|
|
|
chart1.update(healthyFood);
|
|
|
|
|
chart2.update(unhealthyFood);
|
|
|
|
|
$('#healthyFood_today_data').html(healthyFood)
|
|
|
|
|
$('#unhealthyFood_today_data').html(unhealthyFood)
|
|
|
|
|
// Swal.fire({text:"처리 되었습니다"})
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 하단 네비 iyu_nav -->
|
|
|
|
|
<#include "/m/include/index_bottom_menu.ftl">
|
|
|
|
|
<#include "/m/include/index_bottom_menu.ftl">
|
|
|
|
|
<!-- //iyu_nav -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<#include "/m/bf_coach/include_return_url.ftl">
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
@ -274,4 +316,4 @@ function frmview(nr_no){
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<#include "/m/include/index_bottom.ftl">
|
|
|
|
|
<#include "/m/include/index_bottom.ftl">
|
|
|
|
|