123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505 |
- <style>
- body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td { margin:0; padding:0; }
- body { background:#fff; color:#555; font-size:14px; font-family:'Microsoft YaHei'; }
- td,th,caption { font-size:14px; }
- h1, h2, h3, h4, h5, h6 { font-weight:normal; font-size:100%; }
- address, caption, cite, code, dfn, em, strong, th, var { font-style:normal; font-weight:normal;}
- a { color:#555; text-decoration:none; }
- // a:hover { text-decoration:underline; }
- img { border:none; }
- i{font-style: normal;}
- s{text-decoration: none;}
- ol,ul,li { list-style:none; }
- input, textarea, select, button { font:14px Verdana,Helvetica,Arial,sans-serif; }
- table { border-collapse:collapse; }
- html {overflow-y: scroll;}
- /* css common */
- .clearfix:after {content: "."; display: block; height:0; clear:both; visibility: hidden;}
- .clearfix { *zoom:1; }
- body{background-color: #fff;}
- .ellipsis{display:block;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
- .optimize-click-btn{background-color: #e5e5e5;}
- .optimize-click-btn:hover,.optimize-btn:hover{background-color: #2fa596!important;color: #fff!important;text-decoration: none;}
- /* .optimize-click-btn:active{background-color: #2fa596!important;} */
- .optimize-click-btn.active{background-color: #50d2c2!important;color: #fff!important}
- .optimize-btn{background-color: #50d2c2;}
- .fw{font-weight: bold;}
- .fl{float: left;}
- .fr{float: right;}
- .tac{text-align: center;}
- .flex{
- display: -webkit-flex;
- display: -moz-flex;
- display: -ms-flex;
- display: -o-flex;
- display: flex;
- }
- .pro-explain-con{margin: 10px 20px;}
- .explain-menu{width: 50px;}
- .explain-msg{-webkit-flex: 1;
- -moz-flex: 1;
- -ms-flex: 1;
- -o-flex: 1;
- flex: 1;line-height: 20px;}
- .product-model-con{margin: 10px 20px;}
- .pmc-top{margin: 16px 0 20px;}
- .pmc-title{font-size: 18px;font-weight: bold;line-height: 40px;}
- .pmc-opt-btns{cursor: pointer;width: 100px;height: 40px;line-height: 40px;border-radius: 6px;background: #2977ff;color: #fff;}
- .pmc-opt-btns:hover{background: #2977ff;}
- .pmc-main{flex-wrap: wrap;border-bottom: 1px solid;}
- .pmc-list{margin-bottom: 20px; margin-right: 20px;}
- .class-name{width: 106px;height: 60px;line-height: 60px;background: #f2f2f2;color: blue;text-decoration: underline;}
- .class-name a {line-height: 60px;background: #f2f2f2;color: blue;text-decoration: underline;}
- .upload-detail{margin-left: 10px;}
- .born-product{cursor: pointer;margin-top: 10px;line-height: 30px;width: 123px;color: #fff;background: #2977ff;border-radius: 6px;}
- .born-product:hover{background: #2977ff;}
- .born-product.gray-bg{background: #ccc;color: #000;}
- .backlog-reset{text-align: center}
- /*弹出层*/
- .confirmbox {
- background: #fff;
- border: 1px solid #cccccc;
- border-radius: 3px;
- padding: 40px 40px 30px;
- text-align: center;
- position: fixed;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
- z-index: 99;
- }
- .confirmbox-mask {
- background: rgba(0, 0, 0, .7);
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- z-index: 99;
- position: fixed;
- }
- .confirmbox-mask button {
- border: none;
- background: #2977ff;
- width: 80px;
- height: 26px;
- border-radius: 3px;
- font-size: 14px;
- color: #fff;
- outline: none;
- cursor: pointer;
- }
- .class-modal {
- width: 700px;
- background: #fff;
- // border-radius: 5px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- height:420px;
- }
- .class-modal-head {
- font-size: 14px;
- background:#2977ff;
- color:#fff;
- height:40px;
- line-height: 40px;
- padding: 0 0 0 15px;
- }
- .class-modal-body {
- margin-top: 5px;
- overflow: auto;
- padding:15px;
- min-height: 340px;
- }
- .class-modal-body .classes {
- margin-bottom: 20px;
- }
- .class-modal-body .classes > div {
- display: inline-block;
- max-width: 640px;
- vertical-align: top;
- }
- .class-modal-body .classes a {
- text-decoration: none;
- display: inline-block;
- margin: 0 5px 5px;
- color: #136bfb;
- font-size: 14px;
- }
- .class-modal-body .classes a.active {
- color: #fc091b;
- }
- .class-modal .icon-close{
- position: absolute;
- right: 20px;
- top: 6px;
- color:#fff;
- font-size:20px;
- }
- .c-red {
- color: #CC3300
- }
- .class_btn{
- text-align: center;
- }
- .confirmbox-mask p{
- word-wrap : break-word ;
- }
- .icon-close{
- cursor: pointer;
- }
- .model-input label{
- margin:0 15px;
- }
- table{margin-top:5px;}
- .table_list{
- height:250px;
- overflow: auto;
- }
- /* Tooltip 容器 */
- .tooltipclass {
- display: inline-block;
- }
- /* Tooltip 文本 */
- .tooltipclass .tooltiptext {
- visibility: hidden;
- width: 160px;
- background-color: #555;
- color: #fff;
- padding: 5px;
- border-radius: 6px;
- font-size:11px;
- text-align: left;
- /* 定位 */
- position: absolute;
- z-index: 1;
- }
- /* 鼠标移动上去后显示提示框 */
- .tooltipclass:hover .tooltiptext {
- visibility: visible;
- }
- </style>
- <div class="pro-explain-con flex">
- <div class="explain-menu">说明:</div>
- <div class="explain-msg">
- <?php if(Yii::app()->params['section']==0):?>
- 1、点击“生成产品”则系统开始对该班进行数据分析,随后生成错题本、个性化学习宝<br>
- <?php else:?>
- 1、点击“生成产品”则系统开始对该班进行数据分析,随后生成错题本、个性化学习宝等产品<br>
- <?php endif;?>
- 2、若班级未上传完成就生成产品,则未上传成绩的学生当0分计算,会导致班级排名等数据不准。可待上传完成后发日志重新生成<br>
- 3、若有学生缺考,可点击班级跳转到班级学生列表页,把缺考的学生从本次考试中删除,删除的学生计为缺考生
- </div>
- <div class="fr pmc-opt-btns backlog-reset " >重新发送 <img src="/images/icon-warning-red.png" title="已点击生成产品未能正常生成时可重新发送"></div>
- </div>
- <?php if($rs){
- foreach ($rs as $v){
- $uploadNum = 0;
- foreach ($v['result'] as $val){
- if($val['is_uploaded_count']==0 ){
- $uploadNum++;
- }
- }
- if($uploadNum == count($v['result'])){
- continue;
- }
- ?>
- <div class="product-model-con">
- <div class="pmc-top clearfix">
- <div class="fl pmc-title"><?php echo $v['exam_name']?></div>
- <div class="fr pmc-opt-btns tac" exam_group_id = "<?php echo $v['exam_group_id']?>">批量生成</div>
- </div>
- <div class="pmc-main flex">
- <?php foreach ($v['result'] as $val){
- if($val['is_uploaded_count']!=0 ){
- ?>
- <div class="pmc-list clearfix">
- <div class="fl class-name tac" ><a href="<?php echo $this->createUrl('print/change',array('cid'=>$val['class_id'],'eid'=>$val['exam_id']));?>"><?php echo $val['class_name']?></a></div>
- <div class="fl upload-detail">
- <?php
- $className='';
- if(isset($val['student_answer_img']) && $val['student_answer_img']) {
- if($val['is_uploaded_count']==$val['students_count'] && $val['student_answer_img']==$val['students_count']){
- $className='crate_back';
- }else{
- $className='gray-bg';
- }
- ?>
- <div class="upload-progress">成绩上传进度:<?php echo $val['is_uploaded_count']?>/<?php echo $val['students_count']?></div>
- <div class="upload-progress">答卷上传进度:<?php echo $val['student_answer_img']?>/<?php echo $val['students_count']?></div>
- <?php
- }else{
- if($val['is_uploaded_count']==$val['students_count'] ){
- $className='crate_back';
- }else{
- $className='gray-bg';
- }
- ?>
- <div class="upload-progress">成绩上传进度:<?php echo $val['is_uploaded_count']?>/<?php echo $val['students_count']?></div>
- <?php
- }
- ?>
- <div class="born-product tac <?php echo $className;?>" exam_id = "<?php echo $val['exam_id']?>" is_uploaded_count="<?php echo $val['is_uploaded_count']?>" students_count="<?php echo $val['students_count']?>" answer_upload='<?php if(isset($val['student_answer_img'])){echo $val['student_answer_img']; }else{
- echo 0;
- }?>' class_id = "<?php echo $val['class_id']?>">生成产品</div>
- </div>
- </div>
- <?php
- }
- }?>
- </div>
- </div>
- <?php
- }
- }?>
- <!-- 弹窗 -->
- <div class="confirmbox-mask" style="display:none " id="fieldModal">
- <div class="class-modal">
- <i class="icon close_1 icon-close">×</i>
- <div class="class-modal-head">重新发送</div>
- <form id="examSelect">
- <div class="class-modal-body">
- <input type="text" name="keyword" value="" placeholder="请输入考试名称">
- <button class="search_exam ">搜索</button> <span class="notice c-red "></span>
- <div class="table_list">
- <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
- </table>
- </div>
- </div>
- </form>
- </div>
- </div>
- <script>
- $(function(){
- $(".gray-bg").click(function () {
- answer_upload=$(this).attr('answer_upload');
- is_uploaded_count=$(this).attr('is_uploaded_count');
- students_count=$(this).attr('students_count');
- var msg = '有学生未上传成绩,现在生成产品,班级排名数据混乱。确认要现在生成吗?';
- if(students_count==is_uploaded_count){
- //全部上传
- if(answer_upload>0 &&answer_upload!=is_uploaded_count){
- var msg = '该场考试已上传成绩学生数量与已上传学生答题卡数量不一致,现在生成产品,会导致部分学生产品无作答图片,确认现在生成吗?';
- }
- }else{
- //有学生未上传
- if(answer_upload>0){
- if(answer_upload==is_uploaded_count){
- var msg = '有学生未上传成绩,现在生成产品,班级排名数据混乱。确认要现在生成吗?';
- }else{
- var msg = '有学生未上传成绩,且已上传成绩学生数量与已上传学生答题卡数量不一致,现在生成产品,班级排名数据混乱且会导致部分学生产品无作答图片,确认现在生成吗?';
-
- }
- }
-
- }
-
- var obj = $(this);
- layer.msg(msg, {
- time: 0,
- btn: ['确定', '取消'],
- area: ['370px', '180px'], //宽高
- yes: function(index){
- layer.close(index);
- var data ={
- exam_id:obj.attr('exam_id'),
- is_uploaded_count:obj.attr('is_uploaded_count'),
- class_id:obj.attr('class_id'),
- students_count:obj.attr('students_count')
- };
- $.post("<?php echo Yii::app()->createUrl('backlog/ajaxSend')?>",data,function (rs) {
- var m = JSON.parse(rs);
- if(m.status){
- layer.msg('发送成功,正在生成的路上...',{
- icon: 1
- }, function(){
- layer.closeAll();
- evaluationClient.rebacklog(m.count);
- location.reload();
- });
- }else {
- layer.msg('发送失败!',{
- icon: 5
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }
- });
- }
- });
- });
- $(".crate_back").click(function () {
- var obj = $(this);
- var data ={
- exam_id:obj.attr('exam_id')
- };
- $.post("<?php echo Yii::app()->createUrl('backlog/ajaxSend')?>",data,function (rs) {
- var m = JSON.parse(rs);
- if(m.status){
- layer.msg('发送成功,正在生成的路上...',{
- icon: 1
- }, function(){
- layer.closeAll();
- evaluationClient.rebacklog(m.count);
- location.reload();
- });
- }else {
- layer.msg('发送失败!',{
- icon: 5
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }
- });
- });
- $(".fr.pmc-opt-btns.tac").click(function () {
- var obj = $(this);
- var data ={
- exam_group_id:obj.attr('exam_group_id')
- };
- $.post("<?php echo Yii::app()->createUrl('backlog/ajaxAllSend')?>",data,function (rs) {
- var m = JSON.parse(rs);
- if(m.status){
- layer.msg('发送成功,正在生成的路上...',{
- icon: 1
- }, function(){
- layer.closeAll();
- evaluationClient.rebacklog(m.count);
- location.reload();
- });
- }else {
- layer.msg('发送失败!请继续上传成绩',{
- icon: 5
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }
- });
- });
- $('.backlog-reset').click(function(){
- $('#fieldModal').show();
- });
- $('.close_1').click(function(){
- $('#fieldModal').hide();
- });
- //搜索考试
- $('.search_exam').click(function(){
- $('.notice').html('');
- keyword=$('input[name=keyword]').val();
- if(keyword==''){
- layer.msg('请输入考试名称');
- return false;
- }
- $.ajax({
- url:'<?php echo $this->createUrl('backlog/ajaxGetBacklogExam')?>',
- type:'POST',
- dataType:'json',
- data:{examName:keyword},
- success:function(res){
- if(res.status==1){
- if(res.exam==0){
- $('.notice').html('未查询到对应考试名称');
- }else{
- $('#dynamic-table').html(res.data);
- }
- }
- }
- });
- return false;
- });
- $('#dynamic-table')
- .on('click','.send-repeat',function(){
- var data ={
- exam_id:$(this).attr('id')
- };
- text = '该班级已发送产品生成,确定再次发送吗?';
- layer.msg(text,
- {
- btn:['确定','取消'],
- time: 0,
- yes:function(){
- $.post("<?php echo Yii::app()->createUrl('backlog/ajaxSend')?>",data,function (rs) {
- var m = JSON.parse(rs);
- if(m.status){
- layer.msg('发送成功,正在生成的路上...',{
- icon: 1
- }, function(){
- layer.closeAll();
- });
- }else {
- layer.msg('发送失败!',{
- icon: 5
- }, function(){
- layer.closeAll();
- });
- }
- });
- }
- });
- })
- })
- </script>
- </body>
- </html>
|