123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311 |
- <link type="text/css" rel="stylesheet" href="/css/needDetail.css" />
- <div class="main-content-inner">
- <ul class="clearfix main-content-inner-ul">
- <?php if(Yii::app()->session['coachInfo']['leader']==1){?>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("semester/index");?>"' class="button button_normal button_group button_arrow" data-button="red">学期管理</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <?php }?>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("teacher/index");?>"' class="button button_normal button_group button_arrow" data-button="red">教师管理</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("classes/index");?>"' class="button button_normal button_group button_arrow" data-button="red">班级管理</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("studentinfo/index");?>"' class="button button_normal button_group button_arrow button_active" data-button="red">学生管理</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("classes/export");?>"' class="button button_normal button_group button_arrow " data-button="red">导出学生</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- </ul>
- <div class="layout-gap">
- <section class="anc-top flex status_1 <?php if(isset($is_last) && $is_last==1) echo 'hide'?>">
- <div class="flex-one flex">
- <p class="anc-title">学生账号异常检测</p>
- </div>
- <div class="anc-opt-btn green-font pointer reback" ><a href="<?php echo $this->createUrl('studentinfo/index');?>">返回</a></div>
- </section>
- <?php
- if(isset($is_last) && $is_last==1){
- if($count==0){
- echo '<section class="anc-top flex status_2" >';
- }else{
- echo '<section class="anc-top flex status_2 hide" >';
- }
- }else{
- echo '<section class="anc-top flex status_2 hide" >';
- }
- ?>
- <div class="flex-one flex">
- <div><img src="/images/finish.png" alt="" class="anc-status-icon"></div>
- <div class="flex-one title-center">
- <p class="anc-title">学生账号全部正常</p>
- <p class="anc-title-explain">点击完成使结果生效</p>
- </div>
- </div>
- <div class="anc-opt-btn green-font pointer give-up-check">放弃检测</div>
- <?php
- if($is_last==1 && $count==0){
- echo ' <div class="anc-opt-btn green-font pointer give-up-check">重新检测</div>';
- }
- ?>
- </section>
- <?php
- if(isset($is_last) && $is_last==1){
- if($count==0){
- echo '<section class="anc-top flex status_3 hide" >';
- }else{
- echo '<section class="anc-top flex status_3 " >';
- }
- }else{
- echo '<section class="anc-top flex status_3 hide" >';
- }
- ?>
- <div class="flex-one flex">
- <div><img src="/images/warn.png" alt="" class="anc-status-icon"></div>
- <div class="flex-one title-center">
- <p class="anc-title">检测到异常账号</p>
- <p class="anc-title-explain">处理完重名学生,才能完成生效</p>
- </div>
- </div>
- <div class="anc-opt-btn green-font pointer give-up-check">放弃检测</div>
- </section>
- <section class="anc-main-con">
- <?php
- if(!isset($is_last) || $is_last==0){
- ?>
- <div class="anc-index-msg">该功能可实现重名检测;若同一学生有多个账号,可绑定账号,使学生的考试成绩汇总到一个账号</div>
- <div class="begain-check-btn pointer">开始检测</div>
- <?php
- }
- ?>
- <!-- 检测状态部分 -->
- <ul class="anc-status-con <?php if(!isset($is_last) || !$is_last) echo 'hide'?>" >
- <li class="anc-status-list now-status first <?php if(isset($is_last) && $is_last==1) echo 'finish-status'?>">
- <p class="status-top-msg">读取学生</p>
- <p class="gray-font status-charact "><?php if(isset($is_last) && $is_last==1){ echo '读取完成';}else{echo '正在读取学校全部学生账号...';}?></p>
- </li>
- <li class="anc-status-list second <?php if(isset($is_last) && $is_last==1) echo 'finish-status'?>">
- <p class="status-top-msg">姓名异常(学生姓名中包含非汉字字符)</p>
- <p class="gray-font status-charact"></p>
- </li>
- <li class="anc-status-list third <?php if(isset($is_last) && $is_last==1) echo 'finish-status'?>">
- <p class="status-top-msg">自动修复(若同一姓名的学生有多个账号且不重名,自动关联为一人)</p>
- <p class="gray-font status-charact"></p>
- </li>
- <li class="anc-status-list fourth <?php if(isset($count) && $count>0){ echo 'error-status';}elseif($is_last==1){echo 'finish-status';}?>">
- <p class="status-top-msg">重名学生</p>
- <?php if(isset($count) && $count>0){
- echo '<p class="gray-font status-charact href-underline">检测完成,共有'.$count.'组重名学生>></p>';
- }elseif($is_last==1){
- echo '<p class="gray-font status-charact href-underline">检测完成,未发现重名学生</p>';
- }else{
- echo '<p class="gray-font status-charact "></p>';
- }
- ?>
- </li>
- </ul>
- </section>
- <section class="anc-finish-opt gray-border-top" >
- <div class="anc-finish-btn save_result <?php if( $count>0 || $is_last==0) {echo 'hide';}?>" >完成</div>
- <div class="anc-finish-btn forbidden-btn <?php if(isset($count) && $count==0) {echo 'hide';}?>" >完成</div>
- </section>
- </div>
- </div>
- <div class="anc-pop">
- <div class="confirm-pop-con">
- <div class="need-pop-top clearfix">
- <div class="npt-title put-need fl">提示</div>
- <div class="npt-close fr">×</div>
- </div>
- <div class="confirm-msg red-font tac">
- 确认要放弃本次检测吗?
- </div>
- <div class="pop-btns">
- <div class="confirm-pop-btn-sure">确认</div>
- <div class="confirm-pop-btn-cancel cancel-btn">取消</div>
- </div>
- </div>
- </div>
- <script>
- $(function(){
- $('.begain-check-btn').click(function(){
- $('.anc-status-con').removeClass('hide');
- $(this).hide();
- $('.anc-index-msg').hide();
- loadStudent();
- //relation();
- });
- //保存结果
- $('.save_result').click(function(){
- //更新姓名
- $.ajax({
- url:'<?php echo $this->createUrl('checkstudent/ajaxupdaterealname')?>',
- dataType:'json',
- type:'POST',
- success:function(res){
- if(res.status==1){
- layer.msg('更新完成',function(){
- window.location.href="<?php echo $this->createUrl('studentinfo/index')?>";
- });
- }
- }
- });
- });
- $('.fourth').on('click','.href-underline',function(){
- window.location.href='<?php echo $this->createUrl('checkstudent/handledata')?>';
- });
- //第一步,读取数据
- function loadStudent(){
- var count=0;
- $.ajax({
- url:'<?php echo $this->createUrl('checkstudent/ajaxloaddata')?>',
- dataType:'json',
- type:'POST',
- success:function(res){
- if(res.status==1){
- count=res.data;
- //return count;
- $('.first .status-charact').html('读取完成,共读取需检测学生账号'+count+'名');
- $('.first').addClass('finish-status');
- $('.first').removeClass('now-status');
- checkAbnormal();
- }
- }
- });
- }
- //第二步,姓名异常
- function checkAbnormal(){
- $('.second .status-charact').html('正在检测...');
- $('.second').addClass('now-status');
- $.ajax({
- url:'<?php echo $this->createUrl('checkstudent/ajaxcheckdata')?>',
- dataType:'json',
- type:'POST',
- success:function(res){
- if(res.status==1){
- count=res.count;
- $('.second .status-charact').html('检测完成,已为'+count+'名学生去除姓名中的非汉字字符');
- $('.second').addClass('finish-status');
- $('.second').removeClass('now-status');
- relation();
- }else{
- $('.second .status-charact').html('检测失败');
- $('.second').addClass('error-status');
- $('.second').removeClass('now-status');
- }
- }
- });
- }
- //第三步,关联账号
- function relation(){
- $('.third .status-charact').html('正在自动修复...');
- $('.third').addClass('now-status');
- $.ajax({
- url:'<?php echo $this->createUrl('checkstudent/ajaxrelation')?>',
- dataType:'json',
- type:'POST',
- success:function(res){
- if(res.status==1){
- count=res.count;
- $('.third .status-charact').html('修复完成,已修复'+count+'名学生的账号');
- $('.third').addClass('finish-status');
- $('.third').removeClass('now-status');
- checkRepeat();
- }else{
- $('.third .status-charact').html('没有可自动修复的数据');
- $('.third').addClass('error-status');
- $('.third').removeClass('now-status');
- checkRepeat();
- }
- }
- });
- }
- //第四步
- function checkRepeat(){
- $('.fourth .status-charact').html('正在检测...');
- $('.fourth').addClass('now-status');
- $.ajax({
- url:'<?php echo $this->createUrl('checkstudent/ajaxrepeat')?>',
- dataType:'json',
- type:'POST',
- success:function(res){
- if(res.status==1){
- count=res.count;
- if(count==0){
- $('.fourth .status-charact').html('检测完成,未发现重名学生');
- $('.fourth').addClass('finish-status');
- $('.fourth').removeClass('now-status');
- $('.status_1').hide();
- $('.status_2').removeClass('hide');
- $('.save_result').removeClass('hide');
- }else{
- $('.fourth .status-charact').html('检测完成,共有'+count+'组重名学生>>');
- $('.fourth .status-charact').addClass('href-underline');
- $('.fourth').addClass('error-status');
- $('.fourth').removeClass('now-status');
- $('.forbidden-btn').removeClass('hide');
- $('.status_1').hide();
- $('.status_3').removeClass('hide');
- }
- }else{
- $('.fourth .status-charact').html('检测失败,请稍后再试');
- $('.fourth').addClass('error-status');
- $('.fourth').removeClass('now-status');
- }
- }
- });
- }
- $('.give-up-check').click(function(){
- $('.anc-pop').show()
- })
- $('.npt-close,.confirm-pop-btn-cancel').click(function(){
- $('.anc-pop').hide()
- })
- $('.confirm-pop-btn-sure').click(function () {
- $.ajax({
- url:'<?php echo $this->createUrl('checkstudent/giveup')?>',
- dataType:'json',
- type:'POST',
- success:function(res){
- if(res.status==1){
- $('.anc-pop').hide();
- location.reload();
- }else{
- $('.anc-pop').hide();
- }
- }
- });
- });
- })
- </script>
|