123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278 |
- <div class="main-content-inner">
- <!-- 导航栏开始-->
- <?php include(Yii::app()->basePath.'/views/layouts/view_production_navigation.php');?>
- <!-- 导航栏结束-->
- <div class="page-content">
- <div class="row" style="margin:0px">
- <div class="col-xs-12">
- <!-- PAGE CONTENT BEGINS -->
- <div id="dynamic-table_wrapper" class="dataTables_wrapper form-inline no-footer">
- <div class="row">
- <div class="col-xs-10">
- <form method="get" id="form1" action="<?php echo $this->createUrl("print/changeraisescheme", array("type" => $type));?>">
- <div class="dataTables_length" style="margin: 6px 0px;">
- <div class="dataTables_length">
- <label><input type="text" class="form-control input-sm" placeholder="请输入学生姓名" name="sname" value="<?php echo $sname;?>"></label>
- <button style="padding:4px 12px;"class="label-primary-s bth-s">搜索</button>
- </div>
- </div>
-
- <input type="hidden" name="cid" value="<?php echo $class_id;?>" />
- <input type="hidden" name="eid" value="<?php echo $exam_id;?>" />
- <input type="hidden" name="subid" value="<?php echo $subjectId;?>" />
- </form>
- </div>
- <div class="col-xs-2">
- <div class="dataTables_filter" id="dynamic-table_filter" style="padding-top:15px">
- <a href="javascript:void(0);" class="btn label-primary-green btn-sm" id="selectPrint">
- <i style="font-style: normal;" class="fa fa-print"></i> 下载
- </a>
- <a href="javascript:void(0);" printType="<?php echo $printType; ?>" class="btn label-primary-green btn-sm" id="selectPrintTools">
- <i style="font-style: normal;" class="fa fa-print"></i> 打印
- </a>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-xs-12" style="font-weight:bold;padding:0px 15px">
- <?php echo $printTaskName;?>
- </div>
- </div>
- <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" style="font-size:12px">
- <thead>
- <tr>
- <th class="center">
- <input type="checkbox" class="ace selectAll">
- </th>
- <th>序号</th>
- <th>个性化学习宝名称</th>
- <th>学生名称</th>
- <th>学生编号</th>
- <th>个性化学习宝PDF</th>
- <th>下载功能</th>
- </tr>
- </thead>
- <tbody>
- <?php if(!empty($result)):foreach($result as $rt):?>
- <tr>
- <td class="center">
- <?php if (($rt['ispStatus'] == 2)) { ?>
- <input type="checkbox" class="ace myselect" value="<?php echo $rt['studentCode'];?>" stnm="<?php echo $rt['studentName'];?>">
- <?php } else { ?>
- <input type="checkbox" disabled='disabled' class="ace myselect" value="<?php echo $rt['studentCode'];?>" stnm="<?php echo $rt['studentName'];?>">
- <?php } ?>
- </td>
- <td><?php echo $rt['no'];?></td>
- <td><?php echo $rt['planName'];?></td>
- <td><?php echo $rt['studentName'];?><?php if($rt['isAbsent']):?><span style="float: right;color: #FF0000">缺考</span><?php endif;?></td>
- <td><?php echo $rt['studentCode'];?></td>
- <td>
- <?php if ($rt['ispStatus'] == 0 || ($rt['ispStatus'] == 3 && $rt['complete_time'] > time() - 7*24*3600)): ?>
- <?php include('student_isp_error_msg.php');?>
- <!--红-->
- <!-- <span class="label label-sm label-danger" style="font-size:12px">未生成</span> -->
- <?php elseif ($rt['ispStatus'] == 1): ?>
- <span class="label label-sm label-warning" style="font-size:12px">正在生成中</span> <!--黄-->
- <?php elseif ($rt['ispStatus'] == 2): ?>
- <span class="label label-sm label-success" style="font-size:12px">已生成</span><!--绿-->
- <?php elseif ($rt['ispStatus'] == 3): ?>
- <span class="label label-sm" style="font-size:12px;background-color:gray;">已删除</span><!--灰-->
- <?php else: ?>
- <span class="label label-sm" style="font-size:12px;background-color:gray;">未知状态</span><!--灰-->
- <?php endif; ?>
- </td>
- <td>
- <?php
- if($limitstu==0){
- echo '<span class="label label-sm label-success" style="font-size:12px">已开通</span>';
- }elseif($limitstu==-1){
- echo '<span class="label label-sm label-danger" style="font-size:12px">未开通</span>';
- }else{
- if(isset($limitstu[$rt['studentCode']])){
- echo '<span class="label label-sm label-success" style="font-size:12px">已开通</span>';
- }else{
- echo '<span class="label label-sm label-danger" style="font-size:12px">未开通</span>';
- }
- }
- ?>
- </td>
- </tr>
- <?php endforeach;else:?>
- <tr><td colspan="6">暂无数据!</td></tr>
- <?php endif;?>
- </tbody>
- </table>
- </div>
- <input type="hidden" name="paperId" id="paperId" value="<?php echo $paper_id;?>" />
- <input type="hidden" name="classId" id="classId" value="<?php echo $class_id;?>" />
- <input type="hidden" name="examId" id="examId" value="<?php echo $exam_id;?>" />
- <!-- PAGE CONTENT ENDS -->
- </div>
- </div>
- </div>
- </div>
- <?php require_once "_print.php" ?>
- <script type="text/javascript">
- type = "<?php echo $type;?>";
- improveName = "";
- if(type == "isp"){
- type = 2;
- improveName = "个性化学习方案";
- }
- else if(type == "studytrend"){
- type = 3;
- improveName = "个性化学习宝";
- }
- else if(type == "third_isp"){
- type = 3;
- improveName = "个性化学习宝";
- }
- else{
- type = 0;
- }
- html = ""+
- '<div style="padding:20px 30px 0px 30px">'+
- '<div style="padding:8px 0;">请复制下方链接下载'+improveName+'。</div>'+
- '<div id="downloadUrl" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:455px;"></div>'+
- '<div class="row" style="margin:30px auto 0px auto;text-align:center"><button id="confirm" class="label-primary-s bth-s" style="padding:4px 12px;margin:5px 0 10px 15px;background:gray;border-color:gray;">关闭</button>'+
- '</div>'+
- '</div>'+
- "";
- $(function(){
-
- // 全选\反选
- $(".selectAll").click(function(){
-
- if ($(this).prop("checked")) {
- var s_obj = $(".myselect");
- var s_len = s_obj.length;
- for (var i=0;i<s_len;i++) {
- if (!s_obj[i].disabled) {
- s_obj[i].checked=true;
- }
- }
- } else {
- $(".myselect").prop("checked",false);
- }
- });
-
-
- $("#selectPrint").click(function(){
- // 判断是否有选中
- if (!$("input[class='ace myselect']").is(':checked')) {
- layer.msg('请至少选择一个学生!');return false;
- }
- layer.msg("您确定下载"+improveName+"吗?", {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- var classId = $("#classId").val();
- var examId = $("#examId").val();
- if (!classId || !examId || !type) {
- layer.msg('参数错误!');return false;
- }
- var result = [];
- $(".myselect").each(function(m,n){
- if ($(this).prop('checked')) {
- if ($(this).val() && $(this).attr("stnm")) {
- result.push($(this).val());
- }
- }
- })
- if (result.length < 1) {
- layer.msg('未找到要下载的学生!');return false;
- }
- $.ajax({
- url: "<?php echo $this->createUrl('productdownload/getImproveFile');?>",
- type: "GET",
- dataType: "json",
- data: {"examId": examId, "classId": classId,"studentsIds":result, "type": type,"printType":"<?php echo $printType;?>"},
- timeout: <?php echo Yii::app()->params["product_download_time_limit"];?>,
- beforeSend:function(){
- layer.msg("下载中请稍后...",{"time": <?php echo Yii::app()->params["product_download_time_limit"];?>});
- },
- error: function (jqXHR, textStatus, errorThrown) {
- if(textStatus=="timeout"){
- $.ajax({
- type:'GET',
- url: "<?php echo $this->createUrl("productdownload/addIspTask");?>",
- data: {"examId": examId, "classId": classId, "studentsIds":result,"type": type,"printType":"<?php echo $printType;?>"},
- dataType: "json",
- success:function (data) {
- layer.alert('文件正在打包,请去右上角“下载”窗口获取下载链接!',{
- icon: 1,
- yes:function(){
- layer.closeAll();
- }
- });
- }
- })
- }else {
- layer.msg('返回失败!',{
- icon: 5
- }, function(){
- layer.closeAll();
- });
- }
- },
- success: function (data){
- layer.closeAll();
- if(data.success == 1||data.success == 2){
- layer.open({
- type: 1,
- area: ['550px', '220px'],
- title: "下载个性化学习宝",
- content: html,
- success: function(index, layerObj){
- // 更试卷打印时间
- $.post("<?php echo $this->createUrl('print/updatepaperprinttime');?>", {"examId": examId, "classId": classId, "studentsIds":result,"type": type,"printType":"<?php echo $printType;?>"} );
- jQuery("#downloadUrl").html('下载地址:<span style=""><input id="url" type="text" size="40" readonly value="'+data.downloadPath+'" /></span><button id="copy" class="label-primary-s bth-s" style="padding:4px 12px;margin:5px 0 10px 15px;">全选</button>');
- jQuery("#confirm, #cancel").on("click", function(){
- layer.close(layerObj);
- });
- jQuery("#copy").on("click", function(){
- jQuery("#url").select();
- });
- },
- end: function(){
- }
- });
- }else if(data.success == 3){
- // 更试卷打印时间
- $.post("<?php echo $this->createUrl('print/updatepaperprinttime');?>", {"examId": examId, "classId": classId, "studentsIds":result,"type": type,"printType":"<?php echo $printType;?>"} );
- layer.alert('文件正在打包,请去右上角“下载”窗口获取下载链接!',{
- icon: 1,
- yes:function(){
- layer.closeAll();
- }
- });
- }
- else if(data.success == 0){
- layer.msg(data.message, {"time": 3000});
- }
- },
- });
- }
- });
- });
- })
- </script>
|