合作伙伴

dev_partners
caishi 6 years ago
parent 495cc01315
commit a43a8d8322

@ -0,0 +1,28 @@
<p class="clearfix padding20-30 edu-back-white mb20">
<span class="fl font-16 lineh-40">共<span class="color-orange-tip">2</span>个权限组</span>
<a class="fr addControl" href="">
<i class="iconfont icon-tianjiachengyuan color-blue font-16 mr5"></i>新增权限组
</a>
</p>
<div class="edu-back-white mb20">
<p class="bor-bottom-greyE padding20-30">
<span class="font-16">管理者</span>
<span>(访问权限范围:客户列表中的全部客户)</span>
</p>
<div class="clearfix padding20-30">
<ul class="manageList">
<li>
<a href="/managements/add_partner_member_box?partner=1" class="addManage" data-remote="true">+</a>
</li>
<div id="partner_member_list" class="fl">
<li>
<img alt="G" src="/images/avatars/User/g" width="80" height="80">
<a href="javascript:void(0)" onclick="delete_confirm_box_2('/managements/delete_partner_member?partner=1&amp;partner_member=1', '确定要删除该管理员吗')" class="removeImg">
<i class="iconfont icon-htmal5icon19 color-grey-9"></i>
</a>
<span class="task-hide managementName">实训讲师</span>
</li>
</div>
</ul>
</div>
</div>

@ -1,34 +1,96 @@
<p class="clearfix edu-back-white">
<p class="clearfix df edu-back-white">
<span class="column-No">序号</span>
<span class="column-2" style="width:260px">单位名称</span>
<span class="column-1">教师</span>
<span class="column-1">学生</span>
<span class="column-1">课堂</span>
<span class="column-1">发布实训</span>
<span class="column-1">实训报告</span>
<span class="flex1 edu-txt-left">单位名称</span>
<span class="column-7">权限控制</span>
<span class="column-11">教师</span>
<span class="column-11">学生</span>
<span class="column-11">课堂</span>
<span class="column-11">发布实训</span>
<span class="column-11">实训报告</span>
<span class="column-2">最新课堂动态时间</span>
<span class="column-2 fr">使用详情</span>
<span class="column-No fr">使用详情</span>
</p>
<ul class="minH-560 edu-back-white pb20 courselist">
<% @schools.each_with_index do |school, index| %>
<li class="clearfix bor-bottom-greyE" id="major_list">
<span class="column-No major_index"><%= index + 1 %></span>
<span class="column-2 fonthidden" style="width:260px"><%= school.name %></span>
<span class="column-1"><%= school.teacher_count %></span>
<span class="column-1"><%= school.student_count %></span>
<span class="column-1"><%= school.course_count %></span>
<span class="column-1"><%= school.shixun_count %></span>
<span class="column-1"><%= school.shixun_report_count %></span>
<span class="column-2"><%= school.course_act_time.present? ? format_time(school.course_act_time) : "--" %></span>
<span class="column-2 fr">
<li class="clearfix bor-bottom-greyE df" id="major_list">
<span class="column-No major_index"><%= index + 1 %></span>
<span class="flex1 edu-txt-left fonthidden"><%= school.name %></span>
<span class="column-7">
<div class="with100 fl pr mr20 edu-txt-left" select-more>
<input type="hidden" name="small_type" id="shixun_language">
<input type="text" class="input-100-35 pr20 color-grey-3 font-14 pointer" readonly="" value="" placeholder="选择权限组--">
<div class="down-select d-s-back-grey" style="padding: 2px 0px; display: none;">
<p data-shixun-value="21">
<input type="checkbox" class="magic-checkbox" id="mirror1_21" value="VNC">
<label style="top:0px" for="mirror1_21">VNC</label>
</p>
<p data-shixun-value="27">
<input type="checkbox" class="magic-checkbox" id="mirror1_27" value="Mysql">
<label style="top:0px" for="mirror1_27">Mysql</label>
</p>
<p data-shixun-value="35">
<input type="checkbox" class="magic-checkbox" id="mirror1_35" value="Html">
<label style="top:0px" for="mirror1_35">Html</label>
</p>
<p data-shixun-value="36">
<input type="checkbox" class="magic-checkbox" id="mirror1_36" value="Web">
<label style="top:0px" for="mirror1_36">Web</label>
</p>
</div>
</div>
</span>
<span class="column-11"><%= school.teacher_count %></span>
<span class="column-11"><%= school.student_count %></span>
<span class="column-11"><%= school.course_count %></span>
<span class="column-11"><%= school.shixun_count %></span>
<span class="column-11"><%= school.shixun_report_count %></span>
<span class="column-2"><%= school.course_act_time.present? ? format_time(school.course_act_time) : "--" %></span>
<span class="column-No fr">
<% if school.statistic_url != "" %>
<a href="<%= school.statistic_url %>" target="_blank" class="color-blue">查看</a>
<% else %>
--
<% end %>
</span>
</li>
</span>
</li>
<% end %>
<li class="clearfix bor-bottom-greyE df" id="major_list">
<span class="column-No major_index">1</span>
<span class="flex1 edu-txt-left fonthidden" style="width:260px">国防科技大学</span>
<span class="column-7">
<div class="with100 fl pr mr20 edu-txt-left" select-more>
<input type="hidden" name="small_type" id="shixun_language">
<input type="text" class="input-100-35 pr20 color-grey-3 font-14 pointer" readonly="" value="" placeholder="选择权限组--">
<div class="down-select d-s-back-grey" style="padding: 2px 0px; display: none;">
<p data-shixun-value="21">
<input type="checkbox" class="magic-checkbox" id="mirror2_21" value="VNC">
<label style="top:0px" for="mirror2_21">VNC</label>
</p>
<p data-shixun-value="27">
<input type="checkbox" class="magic-checkbox" id="mirror2_27" value="Mysql">
<label style="top:0px" for="mirror2_27">Mysql</label>
</p>
<p data-shixun-value="35">
<input type="checkbox" class="magic-checkbox" id="mirror2_35" value="Html">
<label style="top:0px" for="mirror2_35">Html</label>
</p>
<p data-shixun-value="36">
<input type="checkbox" class="magic-checkbox" id="mirror2_36" value="Web">
<label style="top:0px" for="mirror2_36">Web</label>
</p>
</div>
</div>
</span>
<span class="column-11">2</span>
<span class="column-11">222</span>
<span class="column-11">22</span>
<span class="column-11">20</span>
<span class="column-11">1</span>
<span class="column-2">2019-05-10 10:10</span>
<span class="column-No fr">
--
</span>
</li>
</ul>
<div class="educontent edu-txt-center mb80 mt20">
@ -39,3 +101,43 @@
<div class="cl"></div>
</div>
</div>
<script>
$(function(){
$("[select-more]").append("<i class='fa fa-sort-desc lesson_img color-grey-8'></i>");
$("[select-more]").hover(function () {
$(this).find(".down-select").show();
$(this).find(".search").show().focus();
var index=$(this).find(".down-select").find("input[type='checkbox']").eq(0).attr("name");
if($("input."+index+":checked").length>=3){
$("input."+index+":not(:checked)").attr("disabled","disabled");
}else{
$("input."+index+":not(:checked)").removeAttr("disabled");
}
}, function () {
$(this).find(".down-select").hide();
$(this).find(".search").hide();
});
$("[select-more] .down-select p input").bind("click", function () {
var index=$(this).attr("name");
var all = $(this).parents(".down-select");
var arr = "";
var idarr = [];
for (var i = 0; i < all.find("input").length; i++) {
if (all.find("input").eq(i).is(':checked')) {
arr += ";" + (all.find("input").eq(i).attr("value"));
idarr.push(all.find("input").eq(i).parents("p").attr("data-shixun-value").split("_")[1]);
}
}
$(this).parents(".down-select").siblings("input[type='hidden']").val(idarr);
$(this).parents(".down-select").siblings("input[type='text']").val(arr.substring(1));
var shixun_id = $(this).attr("data-shixun");
var tag_id = $(this).attr("data-value");
});
})
</script>

@ -1,26 +1,33 @@
<div id="Auth_main">
<div class="educontent mb30 mt20">
<div class="educontent mb30 mt20" id="Auth_main">
<ul class="clearfix edu-back-white tabMenu">
<li class="active"><a href="javascript:void(0)">客户列表</a></li>
<li><a href="javascript:void(0)">权限管理</a></li>
</ul>
<% if false %>
<div class="clearfix padding20-30 bor-bottom-greyE edu-back-white">
<span class="fl font-12 mt5">
<span class="color-orange-tip mr3" id="search_partner_count"><%= @obj_count %></span>
<span class="color-grey-9">个检索结果(<span id="all_major_count"><%= @all_count %></span> 单位)</span>
</span>
<span class="fl font-12 mt5">
<span class="color-orange-tip mr3" id="search_partner_count"><%= @obj_count %></span>
<span class="color-grey-9">个检索结果(<span id="all_major_count"><%= @all_count %></span> 单位)</span>
</span>
<div class="fr" id="pollingPanel">
<input type="text" name="search" maxlength="20" placeholder="请输入单位名称搜索" />
<a href="javascript:void(0)" onclick="submit_search_major()"><i class="iconfont icon-sousuo font-16 color-grey-9"></i></a>
</div>
</div>
<div class="ListTableLine ListTableLines" id="partner_school_list">
<div class="ListTableLine ListTableLines edu-back-white" id="partner_school_list">
<%= render :partial => "partner_item" %>
</div>
</div>
<% end %>
<%= render :partial => "partner_controlManage" %>
</div>
<script>
$(function(){
$(".tabMenu").on("click","li",function(){
$(".tabMenu li").removeClass("active")
$(this).addClass("active");
})
$("#pollingPanel").on("keydown", "input[name='search']", function(e){
// 兼容FF和IE和Opera

@ -1,8 +1,7 @@
<li class="clearfix tableHead">
<span>序号</span>
<span>客户名称</span>
<span><a href="<%= customers_list_managements_path(:partner_id => @current_partner.try(:id)) %>"
data-remote="true" class="color-blue">+添加</a></span>
<span>操作</span>
<span>添加时间</span>
</li>
<% @current_partner.try(:customers).try(:each_with_index) do |customer, index| %>

@ -1,7 +1,10 @@
<% if @current_partner.present? %>
<div class="with75 fl pl20">
<div class="edu-back-white">
<div>
<div class="edu-back-white mb20 padding15 color-grey-3 edu-txt-center">
<p class="mb5 font-16">北京真直科技股份有限公司</p>
<p>添加时间2019-05-08 1207</p>
</div>
<div class="padding10-20">
<p class="mb20"><span class="mr30 color-grey-9">添加时间</span><span class="color-grey-6"><%= format_time @current_partner.try(:created_at) %></span></p>
<div class="clearfix">
@ -16,10 +19,14 @@
</ul>
</div>
</div>
<div class="tableList" id="partner_customer_list">
<div class="edu-back-white tableList" id="partner_customer_list">
<div class="clearfix padding15-20">
<span class="fl font-16 color-grey-3">客户列表</span>
<a class="edu-default-btn edu-blueline-btn fr" href="<%= customers_list_managements_path(:partner_id => @current_partner.try(:id)) %>"
data-remote="true">+添加</a>
</div>
<%= render :partial => "partner_customer_list" %>
</div>
</div>
</div>
</div>
<% end %>

@ -6,7 +6,7 @@
</div>
<div class="clearfix mt20">
<div class="with25 fl">
<%= link_to "+添加", all_partners_managements_path,remote:true,class:"color-blue addOperation" %>
<%= link_to "<i class='iconfont icon-roundaddfill font-16 color-blue mr5'></i>添加".html_safe, all_partners_managements_path,remote:true,class:"color-blue addOperation" %>
<ul class="partnerList" id="partner_list">
<%= render :partial => "partner_list" %>
</ul>

File diff suppressed because one or more lines are too long

@ -3138,7 +3138,15 @@ line-height: 20px;display: inline-block;color: rgba(65, 140, 205, 1) !important;
}
#requireTable thead .td-head-child:last-child{border-right: none;}
/*客户管理*/
.tabMenu{border-bottom: 1px solid #eee;padding: 0px 30px;box-sizing: border-box}
.tabMenu li{float: left;padding: 0px 20px;font-size: 18px;color: #333;height: 70px;line-height: 70px;position: relative}
.tabMenu li a{color: #333;display: block}
.tabMenu li.active:after{position: absolute;left: 0px;height: 2px;bottom: 0px;width: 100%;background-color: #4cacff;content: ""}
.tabMenu li.active a{color: #4cacff}
/*权限管理*/
.addControl{padding: 0px 15px;border:1px solid #4cacff;color: #4cacff;border-radius: 20px;height: 40px;line-height: 40px;}
/*用户列表*/
.managerPanels a{margin-right:24px;}
.managerPanels a:nth-child(16n){margin-right: 0px;}
@ -3155,6 +3163,7 @@ line-height: 20px;display: inline-block;color: rgba(65, 140, 205, 1) !important;
}
.ListTableLines .column-No{
color:#999999;
width: 70px;
}
.courselist .column-2{
width: 150px;

Loading…
Cancel
Save