【后台管理】新增需求(运营统计报表 对比报表 新增对比报表 (前端

openi_sso
杨树明 6 years ago
parent 9fe6c7322b
commit 597a66b764

@ -38,6 +38,10 @@
<li><%= link_to "课堂列表", classroom_classment_managements_path %></li> <li><%= link_to "课堂列表", classroom_classment_managements_path %></li>
<li><%= link_to "实训作业", shixun_task_managements_path%></li> <li><%= link_to "实训作业", shixun_task_managements_path%></li>
<li><%= link_to "项目列表", project_list_managements_path%></li> <li><%= link_to "项目列表", project_list_managements_path%></li>
<!-- <li>统计总表</li>-->
<!-- <li>统计总表对比</li>-->
<!-- <li>统计总表日新增</li>-->
</ul> </ul>
</li> </li>
<li class="fl edu-admin-nav-li edu-position <%= 'active' if @menu_type == 3 %>"><a href="javascript:void(0);" class="edu-admin-nav-a">精选实训+</a> <li class="fl edu-admin-nav-li edu-position <%= 'active' if @menu_type == 3 %>"><a href="javascript:void(0);" class="edu-admin-nav-a">精选实训+</a>

@ -0,0 +1,65 @@
<table class="edu-pop-table edu-txt-center" cellpadding="0" cellspacing="0" style="table-layout: fixed">
<thead>
<tr>
<th width="5%">序号</th>
<th width="8%">ID</th>
<th width="20%" class="edu-txt-left">单位名称</th>
<th width="10%">新增教师<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
<th width="10%">新增学生<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
<th width="10%">新增课堂<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
<th width="10%">新增实训<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
<th width="10%">活跃用户<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
</tr>
</thead>
<tbody>
<tr id="courselist_show_">
<td>1</td>
<td>2222</td>
<td class="edu-txt-left">
湖南湘潭大学
</td>
<td>
98
</td>
<td>
98
</td>
<td>
98
</td>
<td>98</td>
<td>98</td>
</tr>
</tbody>
</table>
<div class="cl"></div>
<div style="text-align:center;" class="new_expand">
<div class="pages_user_show" style="width:auto; display:inline-block;margin: 18px 0;">
<ul id="homework_pository_ref_pages">
<%= pagination_links_full @courselist_pages, @courselist_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
</ul>
<div class="cl"></div>
</div>
</div>
<script>
$(".eud-pointer").on("click", function(ev){
var nArrow = $(this).find("i");
var sx_order = nArrow.hasClass("fa-long-arrow-down") ? "asc" : "desc";
$("input[name='sx_order']").val(sx_order);
$.ajax({
url:"<%= classroom_managements_path %>",
data: $("#classroom").serialize(),
dateType: "script"
});
});
$("input[name='support_shixuns_search']").click(function(){
var support_shixuns_search_val = $(this).val();
$.ajax({
url:"<%= support_shixuns_search_managements_path %>",
data: {shixun_id: support_shixuns_search_val},
type: 'post',
dateType: "script"
});
})
</script>

@ -0,0 +1,95 @@
<div>
<table class="edu-pop-table edu-txt-center" cellpadding="0" cellspacing="0" style="table-layout: fixed">
<thead>
<tr>
<th width="5%">序号</th>
<th width="8%">ID</th>
<th width="20%" class="edu-txt-left">单位名称</th>
<th width="15%">
<div>
时段一
<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i>
</div>
<div class="color-grey-3">2019-04-01至2019-04-08</div>
</th>
<th width="15%">
<div>
时段二
<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i>
</div>
<div class="color-grey-3">2019-04-01至2019-04-08</div>
</th>
<th width="15%">
<div>
变化情况
<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i>
</div>
<div class="color-grey-3">(新增数 | 新增百分比)</div>
</th>
</tr>
</thead>
<tbody>
<tr id="courselist_show_">
<td>1</td>
<td>2222</td>
<td class="edu-txt-left color-grey-3">
湖南湘潭大学
</td>
<td>
98
</td>
<td>
98
</td>
<td>
<div>
<span class="color-red-dd">+1</span>
<span class="coolor838383">|</span>
<span class="color-red-dd">+1.52%</span>
</div>
<div>
<span class="color-green">-1</span>
<span class="coolor838383">|</span>
<span class="color-green">-1.52%</span>
</div>
</td>
</tr>
</tbody>
</table>
<div class="cl"></div>
<div style="text-align:center;" class="new_expand">
<div class="pages_user_show" style="width:auto; display:inline-block;margin: 18px 0;">
<ul id="homework_pository_ref_pages">
<%= pagination_links_full @courselist_pages, @courselist_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
</ul>
<div class="cl"></div>
</div>
</div>
</div>
<script>
$(".eud-pointer").on("click", function(ev){
var nArrow = $(this).find("i");
var sx_order = nArrow.hasClass("fa-long-arrow-down") ? "asc" : "desc";
$("input[name='sx_order']").val(sx_order);
$.ajax({
url:"<%= classroom_managements_path %>",
data: $("#classroom").serialize(),
dateType: "script"
});
});
$("input[name='support_shixuns_search']").click(function(){
var support_shixuns_search_val = $(this).val();
$.ajax({
url:"<%= support_shixuns_search_managements_path %>",
data: {shixun_id: support_shixuns_search_val},
type: 'post',
dateType: "script"
});
})
</script>

@ -0,0 +1,70 @@
<table class="edu-pop-table edu-txt-center" cellpadding="0" cellspacing="0" style="table-layout: fixed">
<thead>
<tr>
<th width="5%">序号</th>
<th width="8%">ID</th>
<th width="20%" class="edu-txt-left">单位名称</th>
<th width="10%">教师总人数<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
<th width="10%">学生总人数<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
<th width="10%">课堂总数<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
<th width="10%">正在进行课堂数<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
<th width="10%">实训作业总数<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
<th width="10%">其他作业总数<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
<th>动态时间<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
</tr>
</thead>
<tbody>
<tr id="courselist_show_">
<td>1</td>
<td>2222</td>
<td class="edu-txt-left">
湖南湘潭大学
</td>
<td>
98
</td>
<td>
98
</td>
<td>
98
</td>
<td>98</td>
<td>98</td>
<td>98</td>
<td>2019-04-11 16:42</td>
</tr>
</tbody>
</table>
<div class="cl"></div>
<div style="text-align:center;" class="new_expand">
<div class="pages_user_show" style="width:auto; display:inline-block;margin: 18px 0;">
<ul id="homework_pository_ref_pages">
<%= pagination_links_full @courselist_pages, @courselist_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
</ul>
<div class="cl"></div>
</div>
</div>
<script>
$(".eud-pointer").on("click", function(ev){
var nArrow = $(this).find("i");
var sx_order = nArrow.hasClass("fa-long-arrow-down") ? "asc" : "desc";
$("input[name='sx_order']").val(sx_order);
$.ajax({
url:"<%= classroom_managements_path %>",
data: $("#classroom").serialize(),
dateType: "script"
});
});
$("input[name='support_shixuns_search']").click(function(){
var support_shixuns_search_val = $(this).val();
$.ajax({
url:"<%= support_shixuns_search_managements_path %>",
data: {shixun_id: support_shixuns_search_val},
type: 'post',
dateType: "script"
});
})
</script>

@ -0,0 +1,130 @@
<link rel="stylesheet" href="/javascripts/layDate-v5.0.9/laydate/theme/default/laydate.css" />
<%= form_tag(url_for(classroom_managements_path),:id=>"classroom",:method => "post",:remote=>true) do %>
<div class="edu-con-top clearfix xmt10 bor-grey-e mt10">
<%#= select_tag :major_level,options_for_select(major_level_option, 0), {:id=>"major_level", :class=>"fl task-form-15 task-height-30", :style => "margin:0px 10px 0px 25px;"} %>
<%#= select_tag :discipline_category_id,options_for_select(discipline_category_option, nil), {:id=>"discipline_category_id", :class=>"fl task-form-15 task-height-30", :style => "margin:0px 30px 0px 50px;"} %>
<%#= select_tag :first_level_discipline_id,options_for_select(first_level_discipline_option, nil), {:id=>"first_level_discipline_id", :class=>"fl task-form-20 task-height-30", :style => "margin:0px 30px 0px 25px;"} %>
<%#= select_tag :major_id,options_for_select(syllabus_major_option, nil), {:id=>"major_id", :class=>"fl task-form-20 task-height-30", :style => "margin:0px 30px 0px 25px;"} %>
<input class="fl task-form-20 task-height-30 mt10 ml20 width200" placeholder="请选择时间段一" type="text" id="starttime">
<div class="fl mt10 ml5 mr5">VS</div>
<input class="fl task-form-20 task-height-30 mt10 width200 mr20" placeholder="请选择时间段一" type="text" id="endtime">
<a href="javascript:void(0);" class="fl task-btn task-btn-orange ml5 mt10 mr20" onclick="$('#classroom').submit();">时间对比</a>
<a href="javascript:clearSearchCondition()" class="fl task-btn ml5 mt2 mt10 mr10" id="clear_contents">日新增</a>
<input class="fl task-form-20 task-height-30 mt10 width350mr20" placeholder="请输入单位名称或者ID关键字进行搜索" name="search" maxlength="" type="text" id="Look_name">
<a href="javascript:void(0);" class="fl task-btn task-btn-orange ml5 mt10 mr20" onclick="$('#classroom').submit();">搜索</a>
<a href="javascript:clearSearchCondition()" class="fl task-btn ml5 mt2 mt10 mr10" id="clear_contents">清除</a>
<input name="sx_order" type="hidden">
</div>
<% end %>
<div class="edu-con-bg01 mt15" id="classroom_list">
<%= render :partial => "managements/schooladd_list" %>
</div>
<script src="/javascripts/layDate-v5.0.9/laydate/laydate.js" type="text/javascript"></script>
<script>
let starttime; //开始时间
let endtime; //结束时间
//日期时间范围
laydate.render({
elem: '#starttime'
,range: true,change: function(value, date, endDate){
// console.log(value); //得到日期生成的值2017-08-18
starttime=value;
// console.log(date); //得到日期时间对象:{year: 2017, month: 8, date: 18, hours: 0, minutes: 0, seconds: 0}
// console.log(endDate); //得结束的日期时间对象开启范围选择range: true才会返回。对象成员同上。
getdata()
}
});
laydate.render({
elem: '#endtime'
,range: true,change: function(value, date, endDate){
// console.log(value); //得到日期生成的值2017-08-18
endtime=value;
// console.log(date); //得到日期时间对象:{year: 2017, month: 8, date: 18, hours: 0, minutes: 0, seconds: 0}
// console.log(endDate); //得结束的日期时间对象开启范围选择range: true才会返回。对象成员同上。
getdata()
}
});
function getdata(){
console.log(starttime);
console.log(endtime);
}
//支持实训检索
$("#join_course_role_0").on("click",function(){
$('#classroom').submit();
});
function clearSearchCondition(){
// $("#part").val("");
$("#condition").val("u_name");
$("#Look_name").val("");
// $("#major_level").val("");
// $("#discipline_category_id").val("");
// $("#major_id").val("0");
// $("#first_level_discipline_id").val("");
$.get('<%= classroom_managements_path() %>');
}
$("input[name='school']").on('input', function (e) {
throttle(department_search_fn, window, e);
});
var d_lastSearchCondition = '';
var d_page = 1; //唯一控制页码 变量
var d_count = 0; //查询结果的总量
var d_maxPage = 0;//最大页面值
function department_search_fn(e) {
if($(e.target).val().trim() == ''){
$("#search_school_result_list").hide();
$("input[name='school_id']").val("");
return;
}
if ($(e.target).val().trim() == d_lastSearchCondition && $(e.target).val().trim() != '') {//如果输入框没有改变或者输入框为空就返回
return;
}
d_lastSearchCondition = $(e.target).val().trim();
page = 1; //有新的搜索页面重置为1
$.ajax({
url: '<%= url_for(:controller => 'school',:action => 'on_search') %>' + '?name=' + e.target.value + '&school_id=' + $("input[name='occupation']").val() + '&page=' + d_page,
type: 'post',
success: function (data) {
d_schoolsResult = data.schools;
count = data.count;
maxPage = Math.ceil(count / 100); //最大页码值
if (d_schoolsResult.length != undefined && d_schoolsResult.length != 0) {
var i = 0;
$("#search_school_result_list").html('');
for (; i < d_schoolsResult.length; i++) {
link = '<a onclick="window.changeSchoolValue(\'' + d_schoolsResult[i].school.name.replace(/\s/g, " ") + '\',\'' + d_schoolsResult[i].school.id + '\')" href="javascript:void(0)">' + d_schoolsResult[i].school.name + '</a><br/>';
$("#search_school_result_list").append(link);
}
$("#search_school_result_list").css('left', $(e.target).offset().left);
$("#search_school_result_list").css('top', $(e.target).offset().top + 40);
$("#search_school_result_list").css("position", "absolute");
$("#search_school_result_list").show();
} else {
$("#search_school_result_list").css('left', $(e.target).offset().left);
$("#search_school_result_list").css('top', $(e.target).offset().top + 40);
$("#search_school_result_list").css("position", "absolute");
$("#search_school_result_list").html('你的学校不在列表中?请确认后输入');
$("#search_school_result_list").show();
}
}
});
}
//修改部门
function changeSchoolValue(value, data) {
console.log(value+","+data)
$("input[name='school']").val(value);
$("input[name='school_id']").val(data);
$("#search_school_result_list").hide();
}
</script>

@ -0,0 +1,147 @@
<link rel="stylesheet" href="/javascripts/layDate-v5.0.9/laydate/theme/default/laydate.css" />
<%= form_tag(url_for(classroom_managements_path),:id=>"classroom",:method => "post",:remote=>true) do %>
<div class="edu-con-top clearfix xmt10 bor-grey-e mt10">
<%#= select_tag :major_level,options_for_select(major_level_option, 0), {:id=>"major_level", :class=>"fl task-form-15 task-height-30", :style => "margin:0px 10px 0px 25px;"} %>
<%#= select_tag :discipline_category_id,options_for_select(discipline_category_option, nil), {:id=>"discipline_category_id", :class=>"fl task-form-15 task-height-30", :style => "margin:0px 30px 0px 50px;"} %>
<%#= select_tag :first_level_discipline_id,options_for_select(first_level_discipline_option, nil), {:id=>"first_level_discipline_id", :class=>"fl task-form-20 task-height-30", :style => "margin:0px 30px 0px 25px;"} %>
<%#= select_tag :major_id,options_for_select(syllabus_major_option, nil), {:id=>"major_id", :class=>"fl task-form-20 task-height-30", :style => "margin:0px 30px 0px 25px;"} %>
<input class="fl task-form-20 task-height-30 mt10 ml20 width200" placeholder="请选择时间段一" type="text" id="starttime">
<div class="fl mt10 ml5 mr5">VS</div>
<input class="fl task-form-20 task-height-30 mt10 width200 mr20" placeholder="请选择时间段一" type="text" id="endtime">
<a href="javascript:void(0);" class="fl task-btn task-btn-orange ml5 mt10 mr20" onclick="$('#classroom').submit();">时间对比</a>
<a href="javascript:clearSearchCondition()" class="fl task-btn ml5 mt2 mt10 mr10" id="clear_contents">日新增</a>
<input class="fl task-form-20 task-height-30 mt10 width350mr20" placeholder="请输入单位名称或者ID关键字进行搜索" name="search" maxlength="" type="text" id="Look_name">
<a href="javascript:void(0);" class="fl task-btn task-btn-orange ml5 mt10 mr20" onclick="$('#classroom').submit();">搜索</a>
<a href="javascript:clearSearchCondition()" class="fl task-btn ml5 mt2 mt10 mr10" id="clear_contents">清除</a>
<input name="sx_order" type="hidden">
</div>
<% end %>
<div class="edu-con-bg01 mt15" id="classroom_list">
<div class="relative">
<div class=" contrasttitle">学校数据统计(新增教师变化统计情况)
</div>
<div class="fl groupBoxs">
<div class="fl groupBox">
<input type="text" class="positionInput" readonly value="新增教师"/>
<i class="iconfont icon-sanjiaoxing-down color-grey-8 positionIcon"></i>
<ul class="edu-menu-list menuItem" style="top:35px;left: 0px;width: 100%;">
<li><a href="javascript:void(0)" str="diff" value="123">1</a></li>
<li><a href="javascript:void(0)" str="diff" value="123">1</a></li>
<li><a href="javascript:void(0)" str="diff" value="123">1</a></li>
</ul>
</div>
</div>
</div>
<%= render :partial => "managements/schoolcontrast_list" %>
</div>
<script src="/javascripts/layDate-v5.0.9/laydate/laydate.js" type="text/javascript"></script>
<script>
let starttime; //开始时间
let endtime; //结束时间
//日期时间范围
laydate.render({
elem: '#starttime'
,range: true,change: function(value, date, endDate){
// console.log(value); //得到日期生成的值2017-08-18
starttime=value;
// console.log(date); //得到日期时间对象:{year: 2017, month: 8, date: 18, hours: 0, minutes: 0, seconds: 0}
// console.log(endDate); //得结束的日期时间对象开启范围选择range: true才会返回。对象成员同上。
getdata()
}
});
laydate.render({
elem: '#endtime'
,range: true,change: function(value, date, endDate){
// console.log(value); //得到日期生成的值2017-08-18
endtime=value;
// console.log(date); //得到日期时间对象:{year: 2017, month: 8, date: 18, hours: 0, minutes: 0, seconds: 0}
// console.log(endDate); //得结束的日期时间对象开启范围选择range: true才会返回。对象成员同上。
getdata()
}
});
function getdata(){
console.log(starttime);
console.log(endtime);
}
//支持实训检索
$("#join_course_role_0").on("click",function(){
$('#classroom').submit();
});
function clearSearchCondition(){
// $("#part").val("");
$("#condition").val("u_name");
$("#Look_name").val("");
// $("#major_level").val("");
// $("#discipline_category_id").val("");
// $("#major_id").val("0");
// $("#first_level_discipline_id").val("");
$.get('<%= classroom_managements_path() %>');
}
$("input[name='school']").on('input', function (e) {
throttle(department_search_fn, window, e);
});
var d_lastSearchCondition = '';
var d_page = 1; //唯一控制页码 变量
var d_count = 0; //查询结果的总量
var d_maxPage = 0;//最大页面值
function department_search_fn(e) {
if($(e.target).val().trim() == ''){
$("#search_school_result_list").hide();
$("input[name='school_id']").val("");
return;
}
if ($(e.target).val().trim() == d_lastSearchCondition && $(e.target).val().trim() != '') {//如果输入框没有改变或者输入框为空就返回
return;
}
d_lastSearchCondition = $(e.target).val().trim();
page = 1; //有新的搜索页面重置为1
$.ajax({
url: '<%= url_for(:controller => 'school',:action => 'on_search') %>' + '?name=' + e.target.value + '&school_id=' + $("input[name='occupation']").val() + '&page=' + d_page,
type: 'post',
success: function (data) {
d_schoolsResult = data.schools;
count = data.count;
maxPage = Math.ceil(count / 100); //最大页码值
if (d_schoolsResult.length != undefined && d_schoolsResult.length != 0) {
var i = 0;
$("#search_school_result_list").html('');
for (; i < d_schoolsResult.length; i++) {
link = '<a onclick="window.changeSchoolValue(\'' + d_schoolsResult[i].school.name.replace(/\s/g, " ") + '\',\'' + d_schoolsResult[i].school.id + '\')" href="javascript:void(0)">' + d_schoolsResult[i].school.name + '</a><br/>';
$("#search_school_result_list").append(link);
}
$("#search_school_result_list").css('left', $(e.target).offset().left);
$("#search_school_result_list").css('top', $(e.target).offset().top + 40);
$("#search_school_result_list").css("position", "absolute");
$("#search_school_result_list").show();
} else {
$("#search_school_result_list").css('left', $(e.target).offset().left);
$("#search_school_result_list").css('top', $(e.target).offset().top + 40);
$("#search_school_result_list").css("position", "absolute");
$("#search_school_result_list").html('你的学校不在列表中?请确认后输入');
$("#search_school_result_list").show();
}
}
});
}
//修改部门
function changeSchoolValue(value, data) {
console.log(value+","+data)
$("input[name='school']").val(value);
$("input[name='school_id']").val(data);
$("#search_school_result_list").hide();
}
</script>

@ -0,0 +1,101 @@
<%= form_tag(url_for(classroom_managements_path),:id=>"classroom",:method => "post",:remote=>true) do %>
<div class="edu-con-top clearfix xmt10 bor-grey-e mt10">
<%#= select_tag :major_level,options_for_select(major_level_option, 0), {:id=>"major_level", :class=>"fl task-form-15 task-height-30", :style => "margin:0px 10px 0px 25px;"} %>
<%#= select_tag :discipline_category_id,options_for_select(discipline_category_option, nil), {:id=>"discipline_category_id", :class=>"fl task-form-15 task-height-30", :style => "margin:0px 30px 0px 50px;"} %>
<%#= select_tag :first_level_discipline_id,options_for_select(first_level_discipline_option, nil), {:id=>"first_level_discipline_id", :class=>"fl task-form-20 task-height-30", :style => "margin:0px 30px 0px 25px;"} %>
<%#= select_tag :major_id,options_for_select(syllabus_major_option, nil), {:id=>"major_id", :class=>"fl task-form-20 task-height-30", :style => "margin:0px 30px 0px 25px;"} %>
<!--<li class="clearfix mb10 ml35 mt15 fl" style="display: inline-block">-->
<!--<input nhname="tag" autocomplete="off" maxlength="36" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" id="province" name="school" class="task-height-40 panel-box-sizing fl" type="text" placeholder="请选择学校" style="width: 330px" />-->
<!--<input nhname="tag" nh_tag_5="true" class="fl" id="school_id" name="school_id" style="display:none;" type="text"/> &lt;!&ndash; 单位名称的test框选中下拉列表框的id &ndash;&gt;-->
<!--<div class="cl"></div>-->
<!--</li>-->
<!--<div id="search_school_result_list" style="width: 330px;line-height: 1.5;min-height:20px; max-height: 200px; height: auto !important;display:none;background: white;overflow: scroll;border: solid 1px #cccccc; overflow-x: hidden; overflow-y: auto;">-->
<!--</div>-->
<!--</select>-->
<!-- <select class="fl task-form-15 task-height-30" style="margin:10px 0px 10px 25px;width: 11%" name="keyword" id="condition">-->
<!-- <option value="u_name">创建者姓名搜索</option>-->
<!-- <option value="cla_name">课程名称搜索</option>-->
<!-- </select>-->
<input class="fl task-form-20 task-height-30 mt10 ml20 width260 mr20" style="width:300px" name="search" maxlength="" placeholder="请输入单位名称或者ID关键字进行搜索" type="text" id="Look_name">
<a href="javascript:void(0);" class="fl task-btn task-btn-orange ml5 mt10 mr20" onclick="$('#classroom').submit();">搜索</a>
<a href="javascript:clearSearchCondition()" class="fl task-btn ml5 mt2 mt10" id="clear_contents">清除</a>
<!-- <span class="fr shixun_webssh mt10">-->
<!-- <input type="checkbox" class="mr5 magic-checkbox" name="support_shixuns_search_title" value="1" id="join_course_role_0">-->
<!-- <label style="top:2px;padding-left:23px;" for="join_course_role_0"><span class="only_view">支持实训检索</span></label>-->
<!-- </span>-->
<input name="sx_order" type="hidden">
</div>
<% end %>
<div class="edu-con-bg01 mt15" id="classroom_list">
<%= render :partial => "managements/schoolstatistics_list" %>
</div>
<script>
//支持实训检索
$("#join_course_role_0").on("click",function(){
$('#classroom').submit();
});
function clearSearchCondition(){
// $("#part").val("");
$("#condition").val("u_name");
$("#Look_name").val("");
// $("#major_level").val("");
// $("#discipline_category_id").val("");
// $("#major_id").val("0");
// $("#first_level_discipline_id").val("");
$.get('<%= classroom_managements_path() %>');
}
$("input[name='school']").on('input', function (e) {
throttle(department_search_fn, window, e);
});
var d_lastSearchCondition = '';
var d_page = 1; //唯一控制页码 变量
var d_count = 0; //查询结果的总量
var d_maxPage = 0;//最大页面值
function department_search_fn(e) {
if($(e.target).val().trim() == ''){
$("#search_school_result_list").hide();
$("input[name='school_id']").val("");
return;
}
if ($(e.target).val().trim() == d_lastSearchCondition && $(e.target).val().trim() != '') {//如果输入框没有改变或者输入框为空就返回
return;
}
d_lastSearchCondition = $(e.target).val().trim();
page = 1; //有新的搜索页面重置为1
$.ajax({
url: '<%= url_for(:controller => 'school',:action => 'on_search') %>' + '?name=' + e.target.value + '&school_id=' + $("input[name='occupation']").val() + '&page=' + d_page,
type: 'post',
success: function (data) {
d_schoolsResult = data.schools;
count = data.count;
maxPage = Math.ceil(count / 100); //最大页码值
if (d_schoolsResult.length != undefined && d_schoolsResult.length != 0) {
var i = 0;
$("#search_school_result_list").html('');
for (; i < d_schoolsResult.length; i++) {
link = '<a onclick="window.changeSchoolValue(\'' + d_schoolsResult[i].school.name.replace(/\s/g, " ") + '\',\'' + d_schoolsResult[i].school.id + '\')" href="javascript:void(0)">' + d_schoolsResult[i].school.name + '</a><br/>';
$("#search_school_result_list").append(link);
}
$("#search_school_result_list").css('left', $(e.target).offset().left);
$("#search_school_result_list").css('top', $(e.target).offset().top + 40);
$("#search_school_result_list").css("position", "absolute");
$("#search_school_result_list").show();
} else {
$("#search_school_result_list").css('left', $(e.target).offset().left);
$("#search_school_result_list").css('top', $(e.target).offset().top + 40);
$("#search_school_result_list").css("position", "absolute");
$("#search_school_result_list").html('你的学校不在列表中?请确认后输入');
$("#search_school_result_list").show();
}
}
});
}
//修改部门
function changeSchoolValue(value, data) {
console.log(value+","+data)
$("input[name='school']").val(value);
$("input[name='school_id']").val(data);
$("#search_school_result_list").hide();
}
</script>

File diff suppressed because one or more lines are too long

@ -0,0 +1,45 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!--
2013-9-30: Created.
-->
<svg>
<metadata>
Created by iconfont
</metadata>
<defs>
<font id="laydate-icon" horiz-adv-x="1024" >
<font-face
font-family="laydate-icon"
font-weight="500"
font-stretch="normal"
units-per-em="1024"
ascent="896"
descent="-128"
/>
<missing-glyph />
<glyph glyph-name="x" unicode="x" horiz-adv-x="1001"
d="M281 543q-27 -1 -53 -1h-83q-18 0 -36.5 -6t-32.5 -18.5t-23 -32t-9 -45.5v-76h912v41q0 16 -0.5 30t-0.5 18q0 13 -5 29t-17 29.5t-31.5 22.5t-49.5 9h-133v-97h-438v97zM955 310v-52q0 -23 0.5 -52t0.5 -58t-10.5 -47.5t-26 -30t-33 -16t-31.5 -4.5q-14 -1 -29.5 -0.5
t-29.5 0.5h-32l-45 128h-439l-44 -128h-29h-34q-20 0 -45 1q-25 0 -41 9.5t-25.5 23t-13.5 29.5t-4 30v167h911zM163 247q-12 0 -21 -8.5t-9 -21.5t9 -21.5t21 -8.5q13 0 22 8.5t9 21.5t-9 21.5t-22 8.5zM316 123q-8 -26 -14 -48q-5 -19 -10.5 -37t-7.5 -25t-3 -15t1 -14.5
t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-5 19 -11 39h-368zM336 498v228q0 11 2.5 23t10 21.5t20.5 15.5t34 6h188q31 0 51.5 -14.5t20.5 -52.5v-227h-327z" />
<glyph glyph-name="youyou" unicode="&#58882;" d="M283.648 721.918976 340.873216 780.926976 740.352 383.997952 340.876288-12.925952 283.648 46.077952 619.52 383.997952Z" horiz-adv-x="1024" />
<glyph glyph-name="zuozuo" unicode="&#58883;" d="M740.352 721.918976 683.126784 780.926976 283.648 383.997952 683.123712-12.925952 740.352 46.077952 404.48 383.997952Z" horiz-adv-x="1024" />
<glyph glyph-name="xiayiye" unicode="&#58970;" d="M62.573 384.103l423.401 423.662c18.985 18.985 49.757 18.985 68.727 0 18.982-18.972 18.985-49.746 0-68.729l-355.058-355.067 356.796-356.796c18.977-18.971 18.976-49.746 0-68.727-18.982-18.976-49.751-18.976-68.727 0l-39.753 39.753 0.269 0.246-385.655 385.661zM451.365 384.103l423.407 423.662c18.985 18.985 49.757 18.985 68.727 0 18.982-18.972 18.985-49.746 0-68.729l-355.058-355.067 356.796-356.796c18.977-18.971 18.976-49.746 0-68.727-18.982-18.976-49.757-18.977-68.727 0l-39.762 39.754 0.273 0.249-385.662 385.661zM451.365 384.103z" horiz-adv-x="1024" />
<glyph glyph-name="xiayiye1" unicode="&#58971;" d="M948.066926 382.958838l-411.990051-412.24426c-18.47333-18.47333-48.417689-18.47333-66.875207 0-18.47333 18.461167-18.47333 48.405526 0 66.875207L814.691135 383.088983 467.512212 730.269123c-18.466032 18.458735-18.466032 48.405526 0 66.873991 18.468465 18.464816 48.410391 18.464816 66.872774 0l38.682336-38.682336-0.261507-0.239614 375.259894-375.265975v0.003649m-378.312834 0L157.756743-29.285422c-18.47333-18.47333-48.415256-18.47333-66.872775 0-18.47333 18.461167-18.47333 48.405526 0 66.875207L436.369787 383.088983 89.19208 730.269123c-18.4636 18.458735-18.4636 48.405526 0 66.873991 18.470898 18.464816 48.415256 18.464816 66.872774 0l38.692067-38.682336-0.266372-0.239614 375.267191-375.265975-0.004865 0.003649m0 0z" horiz-adv-x="1024" />
</font>
</defs></svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

File diff suppressed because one or more lines are too long

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>使用 layDate 独立版</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<style>
body{padding: 20px;}
.demo-input{padding-left: 10px; height: 38px; min-width: 262px; line-height: 38px; border: 1px solid #e6e6e6; background-color: #fff; border-radius: 2px;}
.demo-footer{padding: 50px 0; color: #999; font-size: 14px;}
.demo-footer a{padding: 0 5px; color: #01AAED;}
</style>
</head>
<body>
<input type="text" class="demo-input" placeholder="请选择日期" id="test1">
<div class="demo-footer">
<a href="http://www.layui.com/laydate/" target="_blank">layDate<cite id="version"></cite></a>
<a href="http://www.layui.com/doc/modules/laydate.html" target="_blank">文档</a>
<span>&copy; <a href="http://www.layui.com/" target="_blank">layui.com</a> By 贤心<span>
</div>
<script src="laydate/laydate.js"></script> <!-- 改成你的路径 -->
<script>
lay('#version').html('-v'+ laydate.v);
//执行一个laydate实例
laydate.render({
elem: '#test1' //指定元素
});
</script>
</body>
</html>

@ -0,0 +1,6 @@
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InternetShortcut]
URL=http://www.layui.com/laydate/
IDList=
HotKey=0

@ -0,0 +1,8 @@
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InternetShortcut]
URL=http://www.layui.com/doc/modules/laydate.html
IDList=
HotKey=0
IconIndex=0
IconFile=C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

@ -0,0 +1,8 @@
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InternetShortcut]
URL=http://fly.layui.com/
IDList=
HotKey=0
IconIndex=0
IconFile=C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

@ -0,0 +1,6 @@
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InternetShortcut]
URL=http://www.layui.com/laydate/changelog.html
IDList=
HotKey=0

@ -3227,3 +3227,26 @@ line-height: 20px;display: inline-block;color: rgba(65, 140, 205, 1) !important;
top: 0px; top: 0px;
left: 0px; left: 0px;
} }
.width200{width: 200px !important;}
.width350mr20{
width: 350px !important;
margin-right: 20px;
}
.contrasttitle{
height: 60px;
line-height: 60px;
text-align: center;
font-size: 18px;
font-weight: bold;
}
.relative{
position:relative;
}
.groupBoxs{
position:absolute;
top: 12px;
right: 20px;
}

@ -889,3 +889,7 @@ html>body #ajax-indicator { position: fixed; }
text-overflow:ellipsis; text-overflow:ellipsis;
white-space:nowrap white-space:nowrap
} }
.coolor838383{
color:#838383;
}
Loading…
Cancel
Save