app/views/educode_sales/activities/index.html.erb in educode_sales-0.9.62 vs app/views/educode_sales/activities/index.html.erb in educode_sales-0.9.63

- old
+ new

@@ -72,11 +72,13 @@ <a href="javascript:void(0);" lay-event="teachers" class="layui-table-link">{{ d.name}}</a> </script> <script type="text/html" id="teachers_count"> <a href="javascript:void(0);" lay-event="teachers_count" class="layui-table-link">{{ d.teachers_count}}</a> </script> - +<script type="text/html" id="schools_count"> + <a href="javascript:void(0);" lay-event="schools_count" class="layui-table-link">{{ d.schools_count}}</a> +</script> <script> layui.use(['form', 'table', 'miniPage', 'element', 'request'], function () { var $ = layui.jquery, form = layui.form, table = layui.table, @@ -138,20 +140,27 @@ field: 'days', title: '天数', width: 200 }, { + field: 'schools_count', + title: '学校数', + width: 200, + totalRow: true, + templet: '#schools_count' + }, + { field: 'teachers_count', title: '教师数', width: 200, - totalRow:true, + totalRow:true, templet: '#teachers_count' }, { field: 'students_count', title: '学生数', - totalRow:'{{ parseInt(d.TOTAL_NUMS) }}', + totalRow:'{{ parseInt(d.TOTAL_NUMS) }}', width: 200 }, { title: '操作', width: 120, @@ -282,11 +291,35 @@ layer.full(index); }); return false; } else if (obj.event === 'teachers_count') { - activity_id = obj.data.id + activity_id = obj.data.id; + school_id = ''; content = miniPage.getHrefContent('/missions/activities/show_teachers'); + openWH = miniPage.getOpenWidthHeight(); + index2 = layer.open({ + title: '活动列表/' + data.name, + type: 1, + shade: 0.2, + maxmin: true, + shadeClose: true, + area: [openWH[0] + 'px', openWH[1] + 'px'], + offset: [openWH[2] + 'px', openWH[3] + 'px'], + content: content, + success: function (layero, index) { + form.render('select'); + }, + }); + $(window).on("resize", function () { + layer.full(index); + }); + return false; + } else if (obj.event == 'schools_count') { + activity_id = obj.data.id; + activity_name = data.name; + school_id = ''; + content = miniPage.getHrefContent('/missions/activities/' + obj.data.id +'/show_schools'); openWH = miniPage.getOpenWidthHeight(); index2 = layer.open({ title: '活动列表/' + data.name, type: 1, shade: 0.2, \ No newline at end of file