273 lines
16 KiB
HTML
273 lines
16 KiB
HTML
{function razdel_54_tr fo='' escape=0}
|
||
<tr class="table_54_tr" data-fo="{$fo}">
|
||
<td>
|
||
<a href="#" class="btn btn-secondary btn-sm table_54_del_tr" data-fo="{$fo}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Удаление строки из таблицы, не забывайте сохранять!"><i class="bi bi-trash"></i></a>
|
||
</td>
|
||
<td><input type="text" class="form-control form-control-sm table_54_td_{$fo} table_54_tdinps table_54_td_{$fo}_sem" data-fo="{$fo}" data-name="sem" value="{if isset($data.sem)}{$data.sem}{/if}"></td>
|
||
<td><input type="text" class="form-control form-control-sm table_54_td_{$fo} inputModal" data-fo="{$fo}" data-name="nametema" value="{if isset($data.nametema)}{$data.nametema|escape}{/if}"></td>
|
||
<td><input type="text" class="form-control form-control-sm table_54_td_{$fo} table_54_tdinp" data-fo="{$fo}" data-name="ofo" value="{if isset($data.ofo)}{$data.ofo}{/if}"></td>
|
||
<td><input type="text" class="form-control form-control-sm table_54_td_{$fo} table_54_tdinp" data-fo="{$fo}" data-name="zfo" value="{if isset($data.zfo)}{$data.zfo}{/if}"></td>
|
||
<td><input type="text" class="form-control form-control-sm table_54_td_{$fo} table_54_tdinp" data-fo="{$fo}" data-name="ozfo" value="{if isset($data.ozfo)}{$data.ozfo}{/if}"></td>
|
||
<td><textarea class="form-control form-control-sm table_54_td_{$fo} inputModal" data-fo="{$fo}" data-name="soderg">{if isset($data.soderg)}{$data.soderg|escape}{/if}{if $escape==1}|/textarea|{else}</textarea>{/if}</td>
|
||
<td style="position: relative;"><input type="text" class="form-control form-control-sm table_54_td_{$fo} formkomp54" data-fo="{$fo}" data-name="formkomp" value="{if isset($data.formkomp)}{$data.formkomp|escape}{/if}"></td>
|
||
<td><textarea class="form-control form-control-sm table_54_td_{$fo} inputModal" data-fo="{$fo}" data-name="rezusv">{if isset($data.rezusv)}{$data.rezusv|escape}{else}Знать: Уметь: Владеть:{/if}{if $escape==1}|/textarea|{else}</textarea>{/if}</td>
|
||
<td style="position: relative;"><input type="text" class="form-control form-control-sm table_54_td_{$fo} obrtech54" data-fo="{$fo}" data-name="obrtech" value="{if isset($data.obrtech)}{$data.obrtech|escape}{/if}"></td>
|
||
</tr>
|
||
{/function}
|
||
{literal}<script>$(document).ready(function(){
|
||
function checkHours4_54(fo0,fo1,sem,val){
|
||
let znach = parseFloat($("#tabl4vz_"+fo1+"_"+sem+"_lek").text());
|
||
val = parseFloat(val);
|
||
//console.log("fo0="+fo0+"; fo1="+fo1+"; sem="+sem+"; val="+sem+"; znach="+znach);
|
||
let sum1 = 0;
|
||
let semc=0;
|
||
let tr = null;
|
||
let valc = 0;
|
||
$(".table_54_tr[data-fo=1]").each(function(){
|
||
tr = $(this);
|
||
semc = parseFloat(tr.find("[data-name=sem]").val()); //текущий семестр
|
||
if(semc == parseFloat(sem)){
|
||
valc = parseFloat(tr.find("[data-name="+fo0+"]").val());
|
||
sum1 += valc;
|
||
}
|
||
})
|
||
if (sum1>znach){
|
||
window.ToastShow1("Ошибка часов!","В текущей позиции для семестра "+sem+"<br>не может быть больше "+znach+"<br>Сумма введенных часов равна <b>"+sum1+"</b>",1);
|
||
return 0;
|
||
}else{
|
||
return 1;
|
||
}
|
||
}
|
||
//Изменение полей в таблице семестр, проверка на существование
|
||
$(document).on("change", ".table_54_tdinps", function() {
|
||
let fo = $(this).data('fo'); if(fo=='1') fo='och'; if(fo=='2') fo='zao'; if(fo=='3') fo='ochzao';
|
||
let sem = $(this).val();
|
||
let err=0;
|
||
if($("#tabl4s_och_"+sem).length){}else{
|
||
if($("#tabl4s_zao_"+sem).length){}else{
|
||
if($("#tabl4s_ochzao_"+sem).length){}else{ err=1;}
|
||
}
|
||
}
|
||
if(err==1){
|
||
window.ToastShow1("Ошибка семестра!","Семестра "+sem+" нет в таблице 4, введите существующий семестр!",1);
|
||
$(this).val("");
|
||
}
|
||
});
|
||
|
||
//Удаление строк из таблицы
|
||
$(document).on("click", ".table_54_del_tr", function(){
|
||
let fo = $(this).data('fo');
|
||
$(this).closest( "tr" ).remove();
|
||
calc54(fo);
|
||
$(".tooltip").hide();
|
||
return false;
|
||
});
|
||
//Изменение полей в таблице
|
||
$(document).on("change", ".table_54_tdinp", function(){
|
||
let fo = $(this).data('fo');
|
||
let fo0 = $(this).data('name');
|
||
let fo1 = ''; if(fo0=='ofo') fo1 = 'och'; if(fo0=='zfo') fo1 = 'zao'; if(fo0=='ozfo') fo1 = 'ochzao';
|
||
let sem = $(this).closest('tr').find(".table_54_td_"+fo+"_sem").val();
|
||
let val = $(this).val();
|
||
let err = checkHours4_54(fo0,fo1,sem,val);
|
||
if(err==0) $(this).val(0);
|
||
calc54(fo);
|
||
});
|
||
function calc54(fo){
|
||
let name = '',check=1;
|
||
let ofo=0, zfo=0, ozfo=0,val=0;
|
||
$(".table_54_td_"+fo).each(function( index ) {
|
||
name = $(this).data('name');
|
||
if($(this).val()=='') val=0; else val = parseFloat($(this).val().replace(',','.'));
|
||
if(name=='ofo') ofo = ofo + val;
|
||
if(name=='zfo') zfo = zfo + val;
|
||
if(name=='ozfo') ozfo = ozfo + val;
|
||
});
|
||
let ofoI = 0; valI = $(".table_54itogo_"+fo+"_ofo").html().replace(',','.'); if(valI=='') ofoI = 0; else ofoI = parseFloat(valI);
|
||
let zfoI = 0; valI = $(".table_54itogo_"+fo+"_zfo").html().replace(',','.'); if(valI=='') zfoI = 0; else zfoI = parseFloat(valI);
|
||
let ozfoI = 0; valI = $(".table_54itogo_"+fo+"_ozfo").html().replace(',','.'); if(valI=='') ozfoI = 0; else ozfoI = parseFloat(valI);
|
||
|
||
if (ofo!=ofoI){ $(".table_54itogo_"+fo+"_ofo").css({'color':'#dc3545'}); check=0; }
|
||
else{ $(".table_54itogo_"+fo+"_ofo").css({'color':'#198754'}); }
|
||
if (zfo!=zfoI){ $(".table_54itogo_"+fo+"_zfo").css({'color':'#dc3545'}); check=0; }
|
||
else{ $(".table_54itogo_"+fo+"_zfo").css({'color':'#198754'}); }
|
||
if (ozfo!=ozfoI){ $(".table_54itogo_"+fo+"_ozfo").css({'color':'#dc3545'}); check=0; }
|
||
else{ $(".table_54itogo_"+fo+"_ozfo").css({'color':'#198754'}); }
|
||
if(check==1) $(".table_54_td_"+fo+"_btnsave").show(); else $(".table_54_td_"+fo+"_btnsave").hide();
|
||
}
|
||
//Добавление строки в таблицу
|
||
$(document).on("click", ".btn_add_table_54_tr", function(){
|
||
let fo = $(this).data('fo');
|
||
let tr = $('#table_54_orig_'+fo).val(); //получили оригинал
|
||
$('#table_54_'+fo).append(tr.replace('|/textarea|','</textarea>')); //добавили
|
||
return false;
|
||
});
|
||
//Выбор компетенций для поля
|
||
var formkomp54El=null;
|
||
$(document).on("click", ".formkomp54", function(){
|
||
//console.log("1");
|
||
if($(".formkomp54_div").length){ }else {
|
||
formkomp54El = $(this);
|
||
let val = formkomp54El.val();
|
||
let index = "";
|
||
let comp = "";
|
||
let body = "";
|
||
let check = '';
|
||
$(".comp3_items").each(function () {
|
||
index = $(this).data("index");
|
||
comp = $(this).data("comp");
|
||
if (val.indexOf(index)>=0) check=' CHECKED'; else check='';
|
||
body += "<input type='CHECKBOX' class='form-checkbox formkomp54_checkbox' "+check+" data-index='" + index + "' data-comp='" + comp + "'> <b>" + index + "</b> " + comp + "<br>";
|
||
});
|
||
$(this).after("<div class='formkomp54_div'><div class='formkomp54_div_close'><a href='#' class='btn btn-sm btn-danger formkomp54_div_close_btn'><i class='bi bi-x-circle'></i></a></div>" + body + "</div>");
|
||
}
|
||
});
|
||
$(document).on("click", ".formkomp54_checkbox", function(){
|
||
let index = $(this).data("index");
|
||
let val = formkomp54El.val();
|
||
if ($(this).is(':checked')){
|
||
val += index+"; ";
|
||
}else{
|
||
val = val.replace(index+"; ","");
|
||
}
|
||
formkomp54El.val(val);
|
||
});
|
||
$(document).on("click", ".formkomp54_div_close_btn", function(){
|
||
$(this).closest(".formkomp54_div").remove();
|
||
return false;
|
||
});
|
||
//Выбор Образовательных технологий для поля
|
||
var obrtech54El=null;
|
||
$(document).on("click", ".obrtech54", function(){
|
||
if($(".obrtech54_div").length){ }else {
|
||
obrtech54El = $(this);
|
||
let val = obrtech54El.val();
|
||
let index = "";
|
||
let comp = "";
|
||
let body = "Выберите или выше напишите своё!<br>";
|
||
let check = '';
|
||
$(".obrtech_item").each(function () {
|
||
name = $(this).data("name");
|
||
if (val.indexOf(name)>=0){}
|
||
else {
|
||
body += "<a href=# class='obrtech_item_a' data-name='" + name + "'> " + name + "</a><br>";
|
||
}
|
||
});
|
||
$(this).after("<div class='obrtech54_div'><div class='obrtech54_div_close'><a href='#' class='btn btn-sm btn-danger obrtech54_div_close_btn'><i class='bi bi-x-circle'></i></a></div>" + body + "</div>");
|
||
}
|
||
});
|
||
$(document).on("click", ".obrtech_item_a", function(){
|
||
let name = $(this).data("name");
|
||
let oldval = obrtech54El.val();
|
||
obrtech54El.val(oldval+', '+name);
|
||
$(this).remove();
|
||
//$(this).closest(".obrtech54_div").remove();
|
||
return false;
|
||
});
|
||
$(document).on("click", ".obrtech54_div_close_btn", function(){
|
||
$(this).closest(".obrtech54_div").remove();
|
||
return false;
|
||
});
|
||
|
||
})</script>{/literal}
|
||
{function razdel_54}
|
||
<div class="razdel5_4">
|
||
{assign var=fo value='1'}
|
||
<p>Лекционный курс</p>
|
||
<textarea id="table_54_orig_{$fo}" style="display: none;">{razdel_54_tr fo=$fo escape=1}</textarea>
|
||
<table class="table table-bordered table-sm">
|
||
<thead>
|
||
<tr>
|
||
<th class="text-center" rowspan="2">№</th>
|
||
<th class="text-center" rowspan="2">Сем</th>
|
||
<th class="text-center" rowspan="2">Наименование темы практики</th>
|
||
<th class="text-center" colspan="3">Трудоемкость (часы)</th>
|
||
<th class="text-center" rowspan="2">Содержание</th>
|
||
<th class="text-center" rowspan="2">Формируемые компетенции</th>
|
||
<th class="text-center" rowspan="2">Результаты освоения (знать, уметь, владеть)</th>
|
||
<th class="text-center" rowspan="2">Образовательные технологии</th>
|
||
</tr>
|
||
<tr>
|
||
<th class="text-center">ОФО</th>
|
||
<th class="text-center">ЗФО</th>
|
||
<th class="text-center">ОЗФО</th>
|
||
</tr>
|
||
<tr>
|
||
<th class="col-1 text-center" style="width: 20px;">
|
||
<a href="#" class="btn btn-sm btn-warning btn_add_table_54_tr" data-fo="{$fo}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Добавление строки"><i class="bi bi-plus-square"></i></a>
|
||
</th>
|
||
<th class="col-1 text-center" style="width: 20px;">1</th>
|
||
<th class="col-2 text-center">2</th>
|
||
<th class="col-1 text-center" style="width: 20px;">3</th>
|
||
<th class="col-1 text-center" style="width: 20px;">4</th>
|
||
<th class="col-1 text-center" style="width: 20px;">5</th>
|
||
<th class="col-4 text-center">6</th>
|
||
<th class="col-1 text-center">7</th>
|
||
<th class="col-1 text-center">8</th>
|
||
<th class="col-1 text-center">9</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody id="table_54_{$fo}">
|
||
{if isset($save)&&count($save)&&count($save.razdel5_4)&&isset($save.razdel5_4[$fo])}
|
||
{foreach from=$save.razdel5_4[$fo] item=ss}
|
||
{razdel_54_tr fo=$fo data=$ss}
|
||
{/foreach}
|
||
{/if}
|
||
{razdel_54_tr fo=$fo}
|
||
</tbody>
|
||
<tfoot>
|
||
<tr>
|
||
<td>
|
||
<a href="#" class="btn btn-sm btn-danger table_54_td_{$fo}_btnsave btnsave_table" data-tds="table_54_td_{$fo}" data-form="table_54_{$fo}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="сохранение таблицы" style="display: none;"><i class="bi bi-save"></i></a>
|
||
</td>
|
||
<td></td>
|
||
<td class="fw-bolder">ИТОГО:</td>
|
||
<td class="table_54itogo_{$fo}_ofo fw-bolder">{if $sum_ofo!=0}{$sum_ofo}{/if}</td>
|
||
<td class="table_54itogo_{$fo}_zfo fw-bolder">{if $sum_zfo!=0}{$sum_zfo}{/if}</td>
|
||
<td class="table_54itogo_{$fo}_ozfo fw-bolder">{if $sum_ozfo!=0}{$sum_ozfo}{/if}</td>
|
||
<td></td>
|
||
<td></td>
|
||
<td></td>
|
||
<td></td>
|
||
</tr>
|
||
</tfoot>
|
||
</table>
|
||
</div>
|
||
{/function}
|
||
|
||
<div class="col-md-12">
|
||
<h4>5.4. Содержание разделов практики «<u>{$DISCIP_name}</u>», образовательные технологии {if $save.razdel5_4[0][0].sem=='null'}<a href="#" class="btn btn-danger razdelNot_btn" data-state="0" data-razdel="razdel5_4" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Учебным планом не предусмотрено"><i class="bi bi-x-square"></i></a>{else}<a href="#" class="btn btn-secondary razdelNot_btn" data-state="1" data-razdel="razdel5_4" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Учебным планом не предусмотрено"><i class="bi bi-x-square"></i></a>{/if}</h4>
|
||
<div class="obrtech_items">{foreach from=$OBRTECH item=obrtechI}<span class="obrtech_item" data-name="{$obrtechI.name}"></span>{/foreach}</div>
|
||
{assign var=sum_ofo value=0}
|
||
{assign var=sum_zfo value=0}
|
||
{assign var=sum_ozfo value=0}
|
||
{foreach from=$DISCIPS item=discipsfo key=fo}
|
||
{assign var=summ value=0}
|
||
{foreach from=$discipsfo.uchebplan.json item=Kurss key=kurs}
|
||
{foreach from=$Kurss item=Sems key=sem}
|
||
{if isset($Sems.lekcii)}{assign var=summ value=$summ+$Sems.lekcii}{/if}
|
||
{*if isset($Sems.lab)}{assign var=summ value=$summ+$Sems.lab}{/if}
|
||
{if isset($Sems.pr)}{assign var=summ value=$summ+$Sems.pr}{/if}
|
||
{if isset($Sems.srp)}{assign var=summ value=$summ+$Sems.srp}{/if}
|
||
{if isset($Sems.krat)}{assign var=summ value=$summ+$Sems.krat}{/if}
|
||
{if isset($Sems.kontrol)}{assign var=summ value=$summ+$Sems.kontrol}{/if}
|
||
{if isset($Sems.sr)}{assign var=summ value=$summ+$Sems.sr}{/if*}
|
||
{/foreach}
|
||
{/foreach}
|
||
{if $fo=='Очная'}{assign var=sum_ofo value=$sum_ofo+$summ}{/if}
|
||
{if $fo=='Заочная'}{assign var=sum_zfo value=$sum_zfo+$summ}{/if}
|
||
{if $fo=='Очно-заочная'}{assign var=sum_ozfo value=$sum_ozfo+$summ}{/if}
|
||
{/foreach}
|
||
{if isset($DISCIPS['Очная'])}
|
||
{razdel_54 DISCIPS=$DISCIPS['Очная'] title='Очная' sum_ofo=$sum_ofo sum_zfo=$sum_zfo sum_ozfo=$sum_ozfo}
|
||
{else}
|
||
{if isset($DISCIPS['Заочная'])}
|
||
{razdel_54 DISCIPS=$DISCIPS['Заочная'] title='Заочная' sum_ofo=$sum_ofo sum_zfo=$sum_zfo sum_ozfo=$sum_ozfo}
|
||
{else}
|
||
{if isset($DISCIPS['Очно-заочная'])}{razdel_54 DISCIPS=$DISCIPS['Очно-заочная'] title='Очно-заочная' sum_ofo=$sum_ofo sum_zfo=$sum_zfo sum_ozfo=$sum_ozfo}{/if}
|
||
{/if}
|
||
{/if}
|
||
<a href="#" class="btn btn-sm btn-info copy_51" data-to="table_54" data-fo="1" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Копирование строк из таблицы 5.1 только названия">Скопировать из 5.1</a>
|
||
</div>
|
||
|