diff --git a/app/admin/view/auth_group/index.html b/app/admin/view/auth_group/index.html index 31898439..791de6b5 100755 --- a/app/admin/view/auth_group/index.html +++ b/app/admin/view/auth_group/index.html @@ -17,6 +17,9 @@ +
+ +
{/block} {block name="table"}
diff --git a/app/admin/view/auth_group_access/index.html b/app/admin/view/auth_group_access/index.html index 867fa1e5..33765df5 100755 --- a/app/admin/view/auth_group_access/index.html +++ b/app/admin/view/auth_group_access/index.html @@ -28,6 +28,9 @@ +
+ +
{/block} {block name="table"}
diff --git a/app/admin/view/auth_rule/index.html b/app/admin/view/auth_rule/index.html index 921fdad2..c543ffcc 100755 --- a/app/admin/view/auth_rule/index.html +++ b/app/admin/view/auth_rule/index.html @@ -17,6 +17,9 @@ +
+ +
{/block} {block name="table"}
diff --git a/app/admin/view/index/index.html b/app/admin/view/index/index.html index 17431d47..6754d4cc 100755 --- a/app/admin/view/index/index.html +++ b/app/admin/view/index/index.html @@ -17,6 +17,9 @@ +
+ +
{/block} {block name="table"}
diff --git a/app/chengji/view/bjtongji/biaoge.html b/app/chengji/view/bjtongji/biaoge.html index f72caf0b..01a1bdc5 100755 --- a/app/chengji/view/bjtongji/biaoge.html +++ b/app/chengji/view/bjtongji/biaoge.html @@ -1,4 +1,3 @@ - {extend name=".././view/list.html" /} {block name="jsset"} {/block} @@ -13,44 +12,47 @@ {/block} {block name="search"}
- -
- -
-
-
- -
- -
-
-
- -
-
-
+ +
+ +
+ +
+ +
+ +
+
+
+ +
+
+
+
+ +
{/block} {block name="table"} -
+
{/block} {block name="echart"} -
-
-
-
-
- +
+
+
+
+
+ {/block} {block name="myjs"} - - - {/block} + // 加载图表 + function loadTubiao() { + var val = form.val('search'); + + // 条形统计图 平均分 + val.xiangmu = 'avg'; + echart.tiaoxing('myAvg', '/chengji/bjtj/myavg', val, '平均分'); + + // 条形统计图--及格率 + val.xiangmu = 'jigelv'; + echart.tiaoxing('myJige', '/chengji/bjtj/myavg', val, '及格率'); + + // 条形统计图--优秀率 + val.xiangmu = 'youxiulv'; + echart.tiaoxing('myYouxiu', '/chengji/bjtj/myavg', val, '优秀率'); + + // 条形统计图--标准差 + val.xiangmu = 'biaozhuncha'; + echart.tiaoxing('myBiaozhunca', '/chengji/bjtj/myavg', val, '标准差'); + + // 箱线图--差异 + var val = form.val('search'); + echart.xiangti('myXiangti', '/chengji/bjtj/myxiangti', val, '差异'); + } + +}); + + +{/block} diff --git a/app/chengji/view/bjtongji/dw_biaoge.html b/app/chengji/view/bjtongji/dw_biaoge.html index 5356c901..ad658bb7 100755 --- a/app/chengji/view/bjtongji/dw_biaoge.html +++ b/app/chengji/view/bjtongji/dw_biaoge.html @@ -1,40 +1,37 @@ {extend name=".././view/createhref.html" /} - {block name="form"} -
- -
- -
- -
-
-
- -
- -
-
- -
- -
-
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
{/block} - {block name="myjs"} {/block} - diff --git a/app/chengji/view/bjtongji/fenshuduan.html b/app/chengji/view/bjtongji/fenshuduan.html index 5f015398..5fc8511c 100755 --- a/app/chengji/view/bjtongji/fenshuduan.html +++ b/app/chengji/view/bjtongji/fenshuduan.html @@ -1,4 +1,3 @@ - {extend name=".././view/list.html" /} {block name="jsset"} {/block} @@ -13,51 +12,52 @@ {/block} {block name="search"}
- -
- -
+ +
+ +
- -
- -
-
-
- -
- -
-
-
- -
-
-
+ +
+ +
+ +
+ +
+ +
+
+
+ +
+
+
+
+ +
{/block} {block name="table"} {/block} {block name="echart"} - {volist name="list.subject_id" id="vo"} -
- {/volist} - - +{volist name="list.subject_id" id="vo"} +
+{/volist} + {/block} {block name="myjs"} - - - {/block} + + // 添加班级 + loadTubiao(); + + // 加载图表 + function loadTubiao() { + var val = form.val('search'); + console.log(val); + $.each(xk, function(index, element) { + val['subject_id'] = element.id; + echart.fenshuduan('myFenshuduan' + element.lieming, '/chengji/bjtj/myfenshuduan', val, element.title + '分数段统计'); + }); + } + +}); + + +{/block} diff --git a/app/chengji/view/bjtongji/renke.html b/app/chengji/view/bjtongji/renke.html index fc0edeba..0c7ce794 100755 --- a/app/chengji/view/bjtongji/renke.html +++ b/app/chengji/view/bjtongji/renke.html @@ -1,4 +1,3 @@ - {extend name=".././view/list.html" /} {block name="jsset"} {load href="__STATIC__/echarts/echarts.js" /} @@ -13,36 +12,37 @@ {/block} {block name="search"}
- -
- -
+ +
+ +
- -
- -
+ +
+ +
- -
-
+ +
+
- +
+ +
{/block} {block name="table"} -
+
{/block} - {block name="myjs"} - - - {/block} + +{/block} diff --git a/app/chengji/view/bjtongji/renke_edit.html b/app/chengji/view/bjtongji/renke_edit.html index 128f67c7..75a14ed4 100755 --- a/app/chengji/view/bjtongji/renke_edit.html +++ b/app/chengji/view/bjtongji/renke_edit.html @@ -1,149 +1,37 @@ {extend name=".././view/create.html" /} - {block name="form"} -
- {volist name="list.data" id="vo"} -
- -
-
- -
- - {/volist} -
- -
-
+
+ {volist name="list.data" id="vo"} +
+ +
+
+ +
+ {/volist} +
+ +
+
{/block} - {block name="myjs"} - - {/block} - diff --git a/app/chengji/view/bjtongji/renke_edit_teacher.html b/app/chengji/view/bjtongji/renke_edit_teacher.html index fd3564ae..06ea9c7f 100755 --- a/app/chengji/view/bjtongji/renke_edit_teacher.html +++ b/app/chengji/view/bjtongji/renke_edit_teacher.html @@ -1,84 +1,75 @@ {extend name=".././view/create.html" /} - {block name="form"} -
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
- -
- -
-
-
- - -
- -
-
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+
+ +
+
+
+ +
+ +
+
{/block} - {block name="myjs"} - - {/block} - diff --git a/app/chengji/view/index/deletecjs.html b/app/chengji/view/index/deletecjs.html index 7f933296..565eb670 100755 --- a/app/chengji/view/index/deletecjs.html +++ b/app/chengji/view/index/deletecjs.html @@ -1,69 +1,67 @@ {extend name=".././view/create.html" /} - {block name="form"} -
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
- -
- -
-
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+ +
+ +
+
{/block} - {block name="myjs"} {/block} - diff --git a/app/chengji/view/index/dw_chengji.html b/app/chengji/view/index/dw_chengji.html index 3e584964..75eb34cc 100755 --- a/app/chengji/view/index/dw_chengji.html +++ b/app/chengji/view/index/dw_chengji.html @@ -1,67 +1,65 @@ {extend name=".././view/create.html" /} - {block name="form"} -
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
-
- -
-
-
- -
- -
-
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+
+ +
+
+
+ +
+ +
+
{/block} - {block name="myjs"} {/block} - diff --git a/app/chengji/view/index/index.html b/app/chengji/view/index/index.html index 114a90a3..c6acb1af 100755 --- a/app/chengji/view/index/index.html +++ b/app/chengji/view/index/index.html @@ -1,61 +1,58 @@ - {extend name=".././view/list.html" /} {block name="jsset"} - {/block} {block name="nav"} - - 考试管理 - 更多操作 - 成绩查看 - 成绩列表 - + + 考试管理 + 更多操作 + 成绩查看 + 成绩列表 + {/block} {block name="search"} - -
- -
- -
-
- -
- -
- -
-
-
- -
- -
-
-
- -
-
-
- - +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+ +
+ +
{/block} {block name="table"} -
+
{/block} {block name="myjs"} {/block} diff --git a/app/chengji/view/index/read_add.html b/app/chengji/view/index/read_add.html index d1d62a67..f29429bc 100755 --- a/app/chengji/view/index/read_add.html +++ b/app/chengji/view/index/read_add.html @@ -1,25 +1,23 @@ - {extend name=".././view/list.html" /} {block name="jsset"} - {/block} {block name="nav"} - - 成绩管理 - 成绩列表 - 录入信息 - + + 成绩管理 + 成绩列表 + 录入信息 + {/block} {block name="search"} {/block} {block name="table"} -
+
{/block} {block name="myjs"} {/block} diff --git a/app/chengji/view/njtongji/biaoge.html b/app/chengji/view/njtongji/biaoge.html index d0b452f1..ea2b32d5 100755 --- a/app/chengji/view/njtongji/biaoge.html +++ b/app/chengji/view/njtongji/biaoge.html @@ -1,40 +1,42 @@ - {extend name=".././view/list.html" /} {block name="jsset"} {/block} {block name="nav"} - - 考试管理 - 更多操作 - 成绩查看 - 学校成绩统计表 - {$list['kaoshititle']} - + + 考试管理 + 更多操作 + 成绩查看 + 学校成绩统计表 + {$list['kaoshititle']} + {/block} {block name="search"} -
- -
- -
-
- +
+ +
+ +
+
+ +
+ +
{/block} {block name="table"} -
+
{/block} {block name="echart"} -
-
-
-
-
+
+
+
+
+
{/block} {block name="myjs"} - + {/block} diff --git a/app/chengji/view/njtongji/dw_biaoge.html b/app/chengji/view/njtongji/dw_biaoge.html index 75c3603d..cca723c1 100755 --- a/app/chengji/view/njtongji/dw_biaoge.html +++ b/app/chengji/view/njtongji/dw_biaoge.html @@ -1,30 +1,28 @@ {extend name=".././view/createhref.html" /} - {block name="form"} -
-
- -
- -
-
- -
- -
-
+
+
+ +
+ +
+
+ +
+ +
+
{/block} - {block name="myjs"} {/block} - diff --git a/app/chengji/view/schtongji/biaoge.html b/app/chengji/view/schtongji/biaoge.html index c94ba737..beb1d14b 100755 --- a/app/chengji/view/schtongji/biaoge.html +++ b/app/chengji/view/schtongji/biaoge.html @@ -1,34 +1,33 @@ - {extend name=".././view/list.html" /} {block name="jsset"} - {/block} {block name="nav"} - - 考试管理 - 更多操作 - 成绩查看 - 学校成绩统计表 - {$list['kaoshititle']} - + + 考试管理 + 更多操作 + 成绩查看 + 学校成绩统计表 + {$list['kaoshititle']} + {/block} {block name="search"} -
- -
- {foreach $list.nianji as $key=>$vo} - - {/foreach} -
+
+ +
+
- +
+ +
+ +
{/block} {block name="table"} -
+
{/block} {block name="myjs"} - + {/block} diff --git a/app/kaohao/view/index/create.html b/app/kaohao/view/index/create.html index 82cb07e7..f71100a8 100755 --- a/app/kaohao/view/index/create.html +++ b/app/kaohao/view/index/create.html @@ -1,84 +1,81 @@ {extend name=".././view/create.html" /} - {block name="form"} -
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
- - - -
- -
-
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+ + + +
+ +
+
{/block} - {block name="myjs"} {/block} - diff --git a/app/kaohao/view/index/create_all.html b/app/kaohao/view/index/create_all.html index 51a959d3..b81a695e 100755 --- a/app/kaohao/view/index/create_all.html +++ b/app/kaohao/view/index/create_all.html @@ -1,58 +1,55 @@ {extend name=".././view/create.html" /} - {block name="form"}
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
- -
- -
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+ +
+ +
{/block} - {block name="myjs"} {/block} - diff --git a/app/kaohao/view/index/read.html b/app/kaohao/view/index/read.html index 18efb2b6..8707eec9 100755 --- a/app/kaohao/view/index/read.html +++ b/app/kaohao/view/index/read.html @@ -1,359 +1,369 @@ + - - {$list.webtitle} - - - - {load href="__XADMIN__/css/font.css" /} - {load href="__XADMIN__/css/xadmin.css" /} - {load href="__XADMIN__/js/jquery.min.js" /} - {load href="__STATIC__/mayi/css/studentSearch.css" /} - {load href="__XADMIN__/lib/layui/layui.js" /} - {load href="__XADMIN__/js/xadmin.js" /} - {load href="__XADMIN__/js/cookie.js" /} - {load href="__XADMIN__/js/md5.min.js" /} - {load href="__STATIC__/echarts/echarts.js" /} - {$list.webtitle} + + {$list.webtitle} + + + + {load href="__XADMIN__/css/font.css" /} + {load href="__XADMIN__/css/xadmin.css" /} + {load href="__XADMIN__/js/jquery.min.js" /} + {load href="__STATIC__/mayi/css/studentSearch.css" /} + {load href="__XADMIN__/lib/layui/layui.js" /} + {load href="__XADMIN__/js/xadmin.js" /} + {load href="__XADMIN__/js/cookie.js" /} + {load href="__XADMIN__/js/md5.min.js" /} + {$list.webtitle} + -
-
-
-
-
- 各学科总分 -
-
-
-
-
-
-
-
-
- 各学科得分 -
-
-
-
-
-
-
-
-
- 各学科得分率 -
-
-
-
-
-
-
-
-
- 各学科成绩与平均分对比 -
-
-
-
-
-
-
-
-
- 各学科成绩位置 -
-
-
-
-
-
-
-
-
- 成绩报告 -
-
-
-
-
-
+
+
+
+
+
+ 各学科总分 +
+
+
+
+
+
+
+
+
+ 各学科得分 +
+
+
+
+
+
+
+
+
+ 各学科得分率 +
+
+
+
+
+
+
+
+
+ 各学科成绩与平均分对比 +
+
+
+
+
+
+
+
+
+ 各学科成绩位置 +
+
+
+
+
+
+
+
+
+ 成绩报告 +
+
+
+
+
+
+ diff --git a/app/kaoshi/controller/Index.php b/app/kaoshi/controller/Index.php index ab38a536..2df5c57c 100755 --- a/app/kaoshi/controller/Index.php +++ b/app/kaoshi/controller/Index.php @@ -407,23 +407,6 @@ class Index extends AdminBase } - // // 考试更多操作页面 - // public function moreAction($kaoshi_id) - // { - // // 获取考试信息 - // $kaoshi = KS::where('id', $kaoshi_id) - // ->field('id, title, bfdate, enddate') - // ->find(); - - // // 设置页面标题 - // $list['webtitle'] = $kaoshi->title . '(' . $kaoshi->bfdate . '~' . $kaoshi->enddate . ')'; - // $list['kaoshi_id'] = $kaoshi->id; - // $this->view->assign('list', $list); - // // 渲染 - // return $this->view->fetch(); - // } - - // 查询考试成绩 public function chengji($kaoshi_id) { diff --git a/app/kaoshi/route/kaoshi.php b/app/kaoshi/route/kaoshi.php index dba727c7..b7b09163 100755 --- a/app/kaoshi/route/kaoshi.php +++ b/app/kaoshi/route/kaoshi.php @@ -21,7 +21,6 @@ Route::group('index', function () { Route::rule('update/','Index/update','put'); # 更新信息 Route::rule('delete','Index/delete','delete'); # 删除信息 Route::rule('status','Index/setStatus','post'); # 删除信息 - Route::rule('more/','Index/moreAction','get'); # 修改信息 Route::rule('luru','Index/luru','post'); # 考试编辑状态 Route::rule('setp1','Index/createSetp1','get'); # 添加信息 Route::rule('setp2/','Index/createSetp2','get'); # 添加信息 diff --git a/app/kaoshi/view/index/chengji.html b/app/kaoshi/view/index/chengji.html index 54e4d8f2..db16a221 100644 --- a/app/kaoshi/view/index/chengji.html +++ b/app/kaoshi/view/index/chengji.html @@ -1,111 +1,121 @@ - - - {$list.webtitle} - - - - {load href="__XADMIN__/css/font.css" /} - {load href="__XADMIN__/css/xadmin.css" /} - {load href="__XADMIN__/js/jquery.min.js" /} - {load href="__XADMIN__/lib/layui/layui.js" /} - {load href="__XADMIN__/js/xadmin.js" /} - {load href="__XADMIN__/js/cookie.js" /} - {load href="__XADMIN__/js/md5.min.js" /} - {block name="jsset"}{/block} - - - + - - - - {php}$kaoshi_id =$list['kaoshi_id']; {/php} - - -
 
- + + + + + {php}$kaoshi_id =$list['kaoshi_id']; {/php} + + +
 
+ + diff --git a/app/kaoshi/view/index/create_setp2.html b/app/kaoshi/view/index/create_setp2.html index c2bee409..bc6a644d 100644 --- a/app/kaoshi/view/index/create_setp2.html +++ b/app/kaoshi/view/index/create_setp2.html @@ -1,7 +1,7 @@ {extend name=".././view/create.html" /} {block name="jscss"} {/block} - {block name="form"}
-
开始
-
考试信息
-
各年级参加考试学科和分数线
-
生成参加考试学生名单
-
分配录入成绩任务
-
完成
+
开始
+
考试信息
+
各年级参加考试学科和分数线
+
生成参加考试学生名单
+
分配录入成绩任务
+
完成
-
- -
- -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
-
- -
-
-
-
- 上一步 - - 完成 -
+ + +
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+
+ +
+
+
+
+ 上一步 + + 完成 +
{/block} - {block name="myjs"} {/block} - diff --git a/app/kaoshi/view/index/index.html b/app/kaoshi/view/index/index.html index 2affd75a..91b11bcd 100755 --- a/app/kaoshi/view/index/index.html +++ b/app/kaoshi/view/index/index.html @@ -30,6 +30,9 @@
+
+ +
{/block} {block name="table"}
diff --git a/app/kaoshi/view/index/more_action.html b/app/kaoshi/view/index/more_action.html deleted file mode 100755 index 1db9682f..00000000 --- a/app/kaoshi/view/index/more_action.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - - {$list.webtitle} - - - - {load href="__XADMIN__/css/font.css" /} - {load href="__XADMIN__/css/xadmin.css" /} - {load href="__XADMIN__/js/jquery.min.js" /} - {load href="__XADMIN__/lib/layui/layui.js" /} - {load href="__XADMIN__/js/xadmin.js" /} - {load href="__XADMIN__/js/cookie.js" /} - {load href="__XADMIN__/js/md5.min.js" /} - {block name="jsset"}{/block} - - - - - -
- - 考试管理 - 考试列表 - 考试操作 - - - -
- {php}$kaoshi_id =$list['kaoshi_id']; {/php} -
- -
- - - - -
-
- - - diff --git a/app/kaoshi/view/index/tongji.html b/app/kaoshi/view/index/tongji.html index bac1c821..be89998e 100644 --- a/app/kaoshi/view/index/tongji.html +++ b/app/kaoshi/view/index/tongji.html @@ -1,97 +1,90 @@ {extend name=".././view/create.html" /} - {block name="form"} -
-
- -
- - - - - - - - - - - - - - - - - - - {volist name="$list['tjxm']" id="vo"} - - - - - - - - {/volist} - -
序号统计项目统计开关统计状态操作
{$i}{$vo.title} - - 等待统计
-
+
+
+ +
+ + + + + + + + + + + + + + + + + + + {volist name="$list['tjxm']" id="vo"} + + + + + + + + {/volist} + +
序号统计项目统计开关统计状态操作
{$i}{$vo.title} + + 等待统计
+
{/block} - {block name="myjs"} -{/block} - -'' \ No newline at end of file +{/block} \ No newline at end of file diff --git a/app/kaoshi/view/kaoshi_set/index.html b/app/kaoshi/view/kaoshi_set/index.html index bebe3b4c..963b6ba3 100755 --- a/app/kaoshi/view/kaoshi_set/index.html +++ b/app/kaoshi/view/kaoshi_set/index.html @@ -23,6 +23,9 @@
+
+ +
{/block} {block name="table"}
diff --git a/app/kaoshi/view/luru_fengong/create.html b/app/kaoshi/view/luru_fengong/create.html index bf776883..2f82a9bb 100644 --- a/app/kaoshi/view/luru_fengong/create.html +++ b/app/kaoshi/view/luru_fengong/create.html @@ -1,107 +1,105 @@ {extend name=".././view/create.html" /} {block name="jscss"} {/block} {block name="form"} -
- -
- -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
-
- -
-
-
-
- -
-
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
{/block} - {block name="myjs"} {/block} - diff --git a/app/kaoshi/view/luru_fengong/index.html b/app/kaoshi/view/luru_fengong/index.html index 4513bcbc..1c87cf0a 100644 --- a/app/kaoshi/view/luru_fengong/index.html +++ b/app/kaoshi/view/luru_fengong/index.html @@ -31,6 +31,9 @@ +
+ +
{/block} {block name="table"}
diff --git a/app/kaoshi/view/tongji_log/index.html b/app/kaoshi/view/tongji_log/index.html index 8e8e0512..39732519 100755 --- a/app/kaoshi/view/tongji_log/index.html +++ b/app/kaoshi/view/tongji_log/index.html @@ -1,7 +1,5 @@ - {extend name=".././view/list.html" /} {block name="jsset"} - {/block} {block name="nav"} @@ -31,52 +29,70 @@ {/block} diff --git a/app/kaoshi/view/tongji_xiangmu/create.html b/app/kaoshi/view/tongji_xiangmu/create.html index 3d539a3f..43c3550a 100755 --- a/app/kaoshi/view/tongji_xiangmu/create.html +++ b/app/kaoshi/view/tongji_xiangmu/create.html @@ -1,64 +1,45 @@ {extend name=".././view/create.html" /} - {block name="form"} -
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- {if (isset($list.data.tongji)) } - - - {else /} - - - {/if} -
-
-
- -
-
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ {if (isset($list.data.tongji)) } + {else /} + + {/if} +
+
+
+ +
+
{/block} - {block name="myjs"} - {/block} - diff --git a/app/kaoshi/view/tongji_xiangmu/index.html b/app/kaoshi/view/tongji_xiangmu/index.html index 1a390a4c..f4b774e3 100755 --- a/app/kaoshi/view/tongji_xiangmu/index.html +++ b/app/kaoshi/view/tongji_xiangmu/index.html @@ -1,37 +1,37 @@ - {extend name=".././view/list.html" /} {block name="jsset"} - {/block} {block name="nav"} - - 系统管理 - 统计项目 - + + 系统管理 + 统计项目 + {/block} {block name="search"} -
- -
- -
-
-
- -
- -
-
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
{/block} {block name="table"} -
+
{/block} {block name="myjs"} - + {/block} diff --git a/app/keti/view/keti_info/index.html b/app/keti/view/keti_info/index.html index b8084ce3..60004632 100755 --- a/app/keti/view/keti_info/index.html +++ b/app/keti/view/keti_info/index.html @@ -45,6 +45,9 @@ +
+ +
{/block} {block name="table"}
diff --git a/app/keti/view/keti_info/keti_list.html b/app/keti/view/keti_info/keti_list.html index 82294670..f6603c09 100755 --- a/app/keti/view/keti_info/keti_list.html +++ b/app/keti/view/keti_info/keti_list.html @@ -46,6 +46,9 @@ +
+ +
{/block} {block name="table"}
diff --git a/app/keti/view/ketice/index.html b/app/keti/view/ketice/index.html index ccd15572..78a0e8b1 100755 --- a/app/keti/view/ketice/index.html +++ b/app/keti/view/ketice/index.html @@ -30,6 +30,9 @@ +
+ +
{/block} {block name="table"}
diff --git a/app/luru/controller/Index.php b/app/luru/controller/Index.php index c04a26b2..9b431620 100755 --- a/app/luru/controller/Index.php +++ b/app/luru/controller/Index.php @@ -715,7 +715,6 @@ class Index extends AdminBase $list['set']['subjectList'] = $sbjList; $list['backurl'] = '/luru/index/online'; - // 模板赋值 $this->view->assign('list', $list); return $this->view->fetch(); diff --git a/app/luru/view/index/biaolu.html b/app/luru/view/index/biaolu.html index 76604390..9966ef48 100755 --- a/app/luru/view/index/biaolu.html +++ b/app/luru/view/index/biaolu.html @@ -1,172 +1,166 @@ {extend name=".././view/createhref.html" /} {block name="form"} -
- - 成绩采集 - 表格录入 - - - - -
-
-
-
-
-
-
-
- 1、表格下载 -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
-
- -
-
-
-
- -
- - -
-
-
-
-
-
-
- 2、表格上传 -
-
-
-
-
- -
- -
-
- {:token_meta()} -
-
- -

点击上传,或将文件拖拽到此处

-
-
- -
-
-
-
-
- -
- -
- +
+ + 成绩采集 + 表格录入 + + + + +
+
+
+
+
+
+
+
+ 1、表格下载 +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+ +
+
+
+
+
+
+ 2、表格上传 +
+
+
+
+
+ +
+ +
+
+ {:token_meta()} +
+
+ +

点击上传,或将文件拖拽到此处

+
+
+ +
+
+
+
+
+
+
+
{/block} {block name="myjs"} {/block} - diff --git a/app/luru/view/index/biaoqian.html b/app/luru/view/index/biaoqian.html index bf1d46d7..59067171 100644 --- a/app/luru/view/index/biaoqian.html +++ b/app/luru/view/index/biaoqian.html @@ -1,85 +1,81 @@ {extend name=".././view/createhref.html" /} - {block name="form"} -
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
-
- -
-
-
-
- -
- -
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
{/block} - {block name="myjs"} {/block} - diff --git a/app/luru/view/index/index.html b/app/luru/view/index/index.html index ba01c4ec..fb703845 100755 --- a/app/luru/view/index/index.html +++ b/app/luru/view/index/index.html @@ -1,7 +1,5 @@ - {extend name=".././view/list.html" /} {block name="jsset"} - {/block} {block name="nav"} @@ -15,29 +13,31 @@ 关键字
- +
{php} - $sbj = new \app\teach\model\Subject; - $src = [ - 'status' => 1, - 'kaoshi' => 1 - ]; - $subject = $sbj->search($src); - {/php} + $sbj = new \app\teach\model\Subject; + $src = [ + 'status' => 1, + 'kaoshi' => 1 + ]; + $subject = $sbj->search($src); +{/php}
- +
+
+ +
{/block} {block name="table"}
@@ -45,7 +45,7 @@ {block name="myjs"} {/block} diff --git a/app/luru/view/index/malu.html b/app/luru/view/index/malu.html index 652a3904..e70b02f6 100755 --- a/app/luru/view/index/malu.html +++ b/app/luru/view/index/malu.html @@ -1,126 +1,119 @@ {extend name=".././view/create.html" /} {block name="form"} -
- -
- -
-
-
学校
-
-
班级
-
-
姓名
-
-
学科
-
-
-
-
-
- -
- - - -
-
-
- - +
+ +
+
+
+
学校
+
+
班级
+
+
姓名
+
+
学科
+
+
+
+
+
+ +
+ + + +
+
+
{/block} - {block name="myjs"} {/block} - diff --git a/app/luru/view/index/online.html b/app/luru/view/index/online.html index eb99e612..4f05ab5d 100644 --- a/app/luru/view/index/online.html +++ b/app/luru/view/index/online.html @@ -1,113 +1,82 @@ {extend name=".././view/createhref.html" /} - {block name="form"} -
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
-
- -
-
-
- -
- -
- -
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+
+ +
+
+
+ +
+ +
+
{/block} - {block name="myjs"} {/block} - diff --git a/app/luru/view/index/onlineedit.html b/app/luru/view/index/onlineedit.html index 925950e0..d755eea5 100644 --- a/app/luru/view/index/onlineedit.html +++ b/app/luru/view/index/onlineedit.html @@ -1,38 +1,37 @@ - {extend name=".././view/list.html" /} {block name="jsset"} - + {/block} {block name="nav"} - - 成绩采集 - 在线录入 - 学生列表 - + + 成绩采集 + 在线录入 + 学生列表 + {/block} {block name="search"} - - {volist name="list.set.src.banji_id" id="vo"} - - {/volist} - {volist name="list.set.src.subject_id" id="vo"} - - {/volist} + +{volist name="list.set.src.banji_id" id="vo"} + +{/volist} +{volist name="list.set.src.subject_id" id="vo"} + +{/volist} {/block} {block name="table"} -
-
- Enter 换下一行 Shift+Eenter 移动到上一行
- Tab 移动移动到下一列 Shift+Tab 移动到下一列 -
+
+
+ Enter 换下一行 Shift+Eenter 移动到上一行
+ Tab 移动移动到下一列 Shift+Tab 移动到下一列 +
{/block} {block name="myjs"} {/block} diff --git a/app/luru/view/index/yilu_cnt.html b/app/luru/view/index/yilu_cnt.html index aca79982..60f9f358 100644 --- a/app/luru/view/index/yilu_cnt.html +++ b/app/luru/view/index/yilu_cnt.html @@ -1,32 +1,27 @@ {extend name=".././view/createhref.html" /} - {block name="form"} -
-
- -
- -
-
- -
- -
- -
+
+
+ +
+ +
+
+ +
+ +
+
{/block} - {block name="myjs"} {/block} - diff --git a/app/luru/view/index/yilu_cnt_table.html b/app/luru/view/index/yilu_cnt_table.html index 0cd40e13..ef848d06 100644 --- a/app/luru/view/index/yilu_cnt_table.html +++ b/app/luru/view/index/yilu_cnt_table.html @@ -1,38 +1,39 @@ - {extend name=".././view/list.html" /} {block name="jsset"} - {/block} {block name="nav"} - 考试管理 - 已录成绩统计 - {$list['kaoshititle']} + 考试管理 + 已录成绩统计 + {$list['kaoshititle']} {/block} {block name="search"}
- -
- -
-
-
- -
- -
-
-
- -
-
-
+ +
+ +
+ +
+ +
+ +
+
+
+ +
+
+
+
+ +
{/block} {block name="table"}
@@ -40,7 +41,7 @@ {block name="myjs"} {/block} diff --git a/app/rongyu/view/danwei/index.html b/app/rongyu/view/danwei/index.html index e2184175..bbf282d7 100755 --- a/app/rongyu/view/danwei/index.html +++ b/app/rongyu/view/danwei/index.html @@ -37,6 +37,9 @@ +
+ +
{/block} {block name="table"}
diff --git a/app/rongyu/view/jiaoshi/index.html b/app/rongyu/view/jiaoshi/index.html index d8187483..5a8daa47 100755 --- a/app/rongyu/view/jiaoshi/index.html +++ b/app/rongyu/view/jiaoshi/index.html @@ -30,6 +30,9 @@ +
+ +
{/block} {block name="table"}
diff --git a/app/rongyu/view/js_rongyu_info/index.html b/app/rongyu/view/js_rongyu_info/index.html index c8570e4d..0a5b1378 100755 --- a/app/rongyu/view/js_rongyu_info/index.html +++ b/app/rongyu/view/js_rongyu_info/index.html @@ -38,6 +38,9 @@ +
+ +
{/block} {block name="table"}
diff --git a/app/rongyu/view/js_rongyu_info/rongyu_list.html b/app/rongyu/view/js_rongyu_info/rongyu_list.html index 6a49a912..12ad2207 100755 --- a/app/rongyu/view/js_rongyu_info/rongyu_list.html +++ b/app/rongyu/view/js_rongyu_info/rongyu_list.html @@ -32,6 +32,9 @@ +
+ +
{/block} {block name="table"}
diff --git a/app/student/controller/Chengji.php b/app/student/controller/Chengji.php index ed68178d..4160606d 100755 --- a/app/student/controller/Chengji.php +++ b/app/student/controller/Chengji.php @@ -34,7 +34,8 @@ class Chengji extends AdminBase // 获取参加考试学科 $sbj = new \app\teach\model\Subject; - $ksSbj = $sbj->kaoshi()->toArray(); + $src = ['kaoshi'=>1]; + $ksSbj = $sbj->search($src)->toArray(); $myInfo['sbj'] = $ksSbj; // 设置页面标题 diff --git a/app/student/view/chengji/read.html b/app/student/view/chengji/read.html index 1aa37c18..889d5c13 100755 --- a/app/student/view/chengji/read.html +++ b/app/student/view/chengji/read.html @@ -1,7 +1,5 @@ - {extend name=".././view/list.html" /} {block name="jsset"} -{load href="__STATIC__/echarts/echarts.js" /} {/block} {block name="nav"} @@ -22,22 +20,17 @@
- +
- - {php} $category = categoryChildren(108);{/php} - {volist name="category" id="vo"} - - {/volist} +
- +
- {php} $category = categoryChildren(109);{/php} - {volist name="category" id="vo"} - - {/volist} +
@@ -53,22 +46,23 @@
- - +
+ +
{/block} {block name="table"} -
+
{/block} {block name="echart"} - {volist name="$list.sbj" id="vo"} -
- {/volist} +{volist name="$list.sbj" id="vo"} +
+{/volist} {/block} {block name="myjs"} {/block} diff --git a/app/student/view/index/by_list.html b/app/student/view/index/by_list.html index 84826114..67ca415a 100755 --- a/app/student/view/index/by_list.html +++ b/app/student/view/index/by_list.html @@ -24,7 +24,7 @@ -
+
-
-
-
- -
- - {php} $category = categoryChildren(108);{/php} - {volist name="category" id="vo"} - - {/volist} -
-
-
- -
- {php} $category = categoryChildren(109);{/php} - {volist name="category" id="vo"} - - {/volist} -
-
-
-
- -
- -
-
- -
-
-
- -
- -
- -
- - - -
- -
- {volist name="$list.sbj" id="vo"} -
- {/volist} -
-
-
-
-
- 感谢{$list.thinks}提供技术支持。
- 本系统由{$list.danwei}负责管理 -
-
-
- - - - // 禁止使用回车提交表单 - $('#searchval').on("keydown", function(e){ - var e = e || window.event; - if(e.keyCode == 13){ - $("#srcsubmit").click(); - return false; - } - return true; - }) - - - //开始时间 - laydate.render({ - elem: '#bfdate' - ,type: 'datetime' - ,trigger: 'click' //采用click弹出 - ,format: 'yyyy-M-d' //可任意组合 - ,done: function(value, date, endDate){ - form.val("search",{ - "bfdate" : value, - }); - $("#srcsubmit").click(); - } - }); - //结束时间 - laydate.render({ - elem: '#enddate' - ,type: 'datetime' - ,trigger: 'click' //采用click弹出 - ,format: 'yyyy-M-d' //可任意组合 - ,done: function(value, date, endDate){ - form.val("search",{ - "enddate" : value, - }); - $("#srcsubmit").click(); - } - }); - - - // 表格重载 - function tablereload() - { - options.where = form.val("search"); - chengjiTable = table.render(options); //获取数据并渲染 - } - - // 条形统计图--平均分 - function getDefenlv(sbjid, sbjlieming, sbjtitle){ - var id = sbjlieming; - var url = '/tools/onestudentchengji/xkold'; - var val = form.val('search'); - val.subject_id = sbjid; - var title = sbjtitle; - createZhexian(id, url, val, title); - } - - - }); - - /** - * 异步获取图表中的数据 - * - * @access public - * @param id 要添加数据的div - * @param url 异步地址 - * @param val 异步时携带的参数 - * @param val 图表标题 - * @return array 返回类型 - */ - function createZhexian(id, url, val, title) - { - var myZhexian = echarts.init(document.getElementById(id)); - $.post(url,val).done(function (data) { - myZhexian.setOption({ - title: { - text: title - }, - tooltip: { - trigger: 'axis' - }, - legend: { - data: data.legend - }, - grid: { - left: '3%', - right: '4%', - bottom: '3%', - containLabel: true - }, - toolbox: { - feature: { - saveAsImage: {} - } - }, - xAxis: { - type: 'category', - boundaryGap: false, - data: data.xAxis, - }, - yAxis: { - type: 'value' - }, - series: data.series, - }); - }); - } - - - diff --git a/app/system/view/back_up/index.html b/app/system/view/back_up/index.html index 75fdfbfc..f61e200e 100755 --- a/app/system/view/back_up/index.html +++ b/app/system/view/back_up/index.html @@ -45,7 +45,7 @@ layui.use(['table', 'backUp', 'form'], function() { { field: 'yasuo', title: '压缩', sort: true, minWidth: 100 }, { field: 'lsize', title: '文件大小', minWidth: 100, sort: true }, { field: 'status', title: '状态', minWidth: 100, sort: true }, - { field: 'id', title: '操作', toolbar: '#barDemo', minWidth: 90, fixed: 'right'} + { field: 'id', title: '操作', toolbar: '#barDemo', minWidth: 90} ] ]; @@ -79,116 +79,6 @@ layui.use(['table', 'backUp', 'form'], function() { break; }; }); - - - // // 删除备份 - // function mydel(url) - // { - // $.post( - // url, - // '', - // function(data){ - // layer.msg(data.msg); - // if(data.val === 1) - // { - // userTable = table.render(options); //获取数据并渲染 - // } - // }, "json"); - // } - - // // 创建备份 - // function mypost() - // { - // layer.msg("正在发送备份请求..."); - - // $.post( - // '/system/backup/export', - // '', - // function(data){ - // if(data.code==1){ - // layer.alert( "开始备份,请不要关闭本页面!"); - // backup(data.data.tab); - // }else{ - // layer.msg(data.msg); - // } - - // }, "json"); - // return false; - // } - - // //递归备份表 - // function backup(tab,status){ - // $.ajax({ - // url:"/system/backup/export", - // data:tab, - // async:false, - // type:"GET", - // dataType:"json", - // timeout:0, - // success:function(data){ - // if(data.code==1){ - // if(!$.isPlainObject(data.data.tab)){ - // layer.msg("备份完成"); - // // window.onbeforeunload = function(){ return null } - // return; - // } - - // backup(data.data.tab, tab.id != data.data.tab.id); - // } else { - // userTable = table.render(options); //获取数据并渲染 - // layer.msg("备份完成"); - // } - // } - // }); - // } - - - // 创建备份 - function myhuifu(url, a, time) { - myStatus = $(a).parent().parent().prev().children('div'); - $(myStatus).text('等待还原'); - $.ajax({ - url: url, - type: 'POST', - async: true, - data: { - time: time, - }, - success, - error: function(result) { - layer.msg('数据扔半道,回不来啦。', function() {}); - } - }); - - layer.alert('正在还原数据库,请不要关闭!'); - return false; - - function success(data) { - if (data.code == 1) { - $(myStatus).text(data.msg); - if (data.data.part) { - $.ajax({ - url: url, - type: 'POST', - async: true, - data: { - time: time, - part: data.data.part, - start: data.data.start, - }, - success, - error: function(result) { - layer.msg('数据扔半道,回不来啦。', function() {}); - } - }); - } else { - layer.msg(data.msg); - } - } else { - layer.msg(data.msg); - } - } - } }); diff --git a/app/system/view/category/index.html b/app/system/view/category/index.html index 9eeb88b1..7532e53e 100755 --- a/app/system/view/category/index.html +++ b/app/system/view/category/index.html @@ -22,6 +22,9 @@ +
+ +
{/block} {block name="table"}
diff --git a/app/system/view/fields/index.html b/app/system/view/fields/index.html index b34a4490..8a02e757 100755 --- a/app/system/view/fields/index.html +++ b/app/system/view/fields/index.html @@ -17,6 +17,9 @@ +
+ +
{/block} {block name="table"}
diff --git a/app/system/view/school/index.html b/app/system/view/school/index.html index c682480e..a609787a 100755 --- a/app/system/view/school/index.html +++ b/app/system/view/school/index.html @@ -36,6 +36,9 @@ +
+ +
{/block} {block name="table"}
diff --git a/app/teach/controller/BanjiChengji.php b/app/teach/controller/BanjiChengji.php index e1587caf..24c0330c 100755 --- a/app/teach/controller/BanjiChengji.php +++ b/app/teach/controller/BanjiChengji.php @@ -23,7 +23,8 @@ class BanjiChengji extends AdminBase $list['banji_id'] = $banji; $sbj = new \app\teach\model\Subject; - $list['subject_id'] = $sbj->kaoshi()->toArray(); + $src = ['kaoshi'=>1]; + $list['subject_id'] = $sbj->search($src)->toArray(); $list['tjxm'] = srcTjxm(12201); // 模板赋值 diff --git a/app/teach/view/ban_zhu_ren/index.html b/app/teach/view/ban_zhu_ren/index.html index 77c3ed98..08ac6a6d 100755 --- a/app/teach/view/ban_zhu_ren/index.html +++ b/app/teach/view/ban_zhu_ren/index.html @@ -33,6 +33,9 @@ +
+ +
{/block} {block name="table"}
diff --git a/app/teach/view/banji/index.html b/app/teach/view/banji/index.html index e1943f5a..1a79a017 100755 --- a/app/teach/view/banji/index.html +++ b/app/teach/view/banji/index.html @@ -23,6 +23,9 @@ +
+ +
{/block} {block name="table"}
diff --git a/app/teach/view/banji_chengji/index.html b/app/teach/view/banji_chengji/index.html index f670247b..f062d612 100755 --- a/app/teach/view/banji_chengji/index.html +++ b/app/teach/view/banji_chengji/index.html @@ -1,6 +1,5 @@ {extend name=".././view/list.html" /} {block name="jsset"} -{load href="__STATIC__/echarts/echarts.js" /} {/block} {block name="nav"} @@ -19,22 +18,17 @@
- +
- - {php} $category = categoryChildren(108);{/php} - {volist name="category" id="vo"} - - {/volist} +
- +
- {php} $category = categoryChildren(109);{/php} - {volist name="category" id="vo"} - - {/volist} +
@@ -51,6 +45,9 @@
+
+ +
{/block} {block name="table"}
@@ -76,126 +73,121 @@ {/block} diff --git a/app/teach/view/subject/index.html b/app/teach/view/subject/index.html index 7225901e..68c76997 100755 --- a/app/teach/view/subject/index.html +++ b/app/teach/view/subject/index.html @@ -17,6 +17,9 @@ +
+ +
{/block} {block name="table"}
diff --git a/app/teach/view/xueqi/index.html b/app/teach/view/xueqi/index.html index 09a3b6e8..83323f02 100755 --- a/app/teach/view/xueqi/index.html +++ b/app/teach/view/xueqi/index.html @@ -30,6 +30,9 @@ +
+ +
{/block} {block name="table"}
diff --git a/app/teacher/view/index/del_list.html b/app/teacher/view/index/del_list.html index b7e9c05c..50851636 100644 --- a/app/teacher/view/index/del_list.html +++ b/app/teacher/view/index/del_list.html @@ -1,41 +1,41 @@ - {extend name=".././view/list.html" /} {block name="jsset"} - {/block} {block name="nav"} - - 师生名单 - 教师管理 - 异动教师 - + + 师生名单 + 教师管理 + 异动教师 + {/block} {block name="search"} -
- -
- -
-
-
- -
- - {php} $schoollist = danweiJibie('校级', '区级');{/php} - {volist name="schoollist" id="vo"} - - {/volist} -
+
+ +
+
+
+
+ +
+ + {php} $schoollist = danweiJibie('校级', '区级');{/php} + {volist name="schoollist" id="vo"} + + {/volist} +
+
+
+ +
{/block} {block name="table"} -
+
{/block} {block name="myjs"} - + {/block} diff --git a/app/teacher/view/index/index.html b/app/teacher/view/index/index.html index f402c904..ecfafb66 100644 --- a/app/teacher/view/index/index.html +++ b/app/teacher/view/index/index.html @@ -1,78 +1,78 @@ - {extend name=".././view/list.html" /} {block name="jsset"} - {/block} {block name="nav"} - - 师生名单 - 教师管理 - 教师列表 - + + 师生名单 + 教师管理 + 教师列表 + {/block} {block name="search"} -
- -
- -
-
-
- -
- - {php} $schoollist = danweiJibie('校级', '区级');{/php} - {volist name="schoollist" id="vo"} - - {/volist} -
+
+ +
+
-
- -
- - {php} $category = categoryChildren(107);{/php} - {volist name="category" id="vo"} - - {/volist} -
+
+
+ +
+ + {php} $schoollist = danweiJibie('校级', '区级');{/php} + {volist name="schoollist" id="vo"} + + {/volist}
-
- -
- - {php} $category = categoryChildren(105);{/php} - {volist name="category" id="vo"} - - {/volist} -
+
+
+ +
+ + {php} $category = categoryChildren(107);{/php} + {volist name="category" id="vo"} + + {/volist}
-
- -
- - {php} $category = categoryChildren(106);{/php} - {volist name="category" id="vo"} - - {/volist} -
+
+
+ +
+ + {php} $category = categoryChildren(105);{/php} + {volist name="category" id="vo"} + + {/volist}
-
- -
- - -
+
+
+ +
+ + {php} $category = categoryChildren(106);{/php} + {volist name="category" id="vo"} + + {/volist}
+
+
+ +
+ + +
+
+
+ +
{/block} {block name="table"} -
+
{/block} {block name="myjs"} - + {/block} diff --git a/public/static/x-admin2.2/js/backUp.js b/public/static/x-admin2.2/js/backUp.js index 468e9811..df9714cc 100644 --- a/public/static/x-admin2.2/js/backUp.js +++ b/public/static/x-admin2.2/js/backUp.js @@ -2,124 +2,125 @@ 扩展cjgl模块 **/ - layui.define(['table'], function(exports){ - //提示:模块也可以依赖其它模块,如:layui.define('layer', callback); - var table = layui.table - form = layui.form; +layui.define(['table'], function(exports) { + //提示:模块也可以依赖其它模块,如:layui.define('layer', callback); + var table = layui.table + form = layui.form; - var obj = { - // 删除备份 - del: function(url) { - $.post( - url, - function(data){ - layer.msg(data.msg); - if(data.val === 1) - { - table.render(options); //获取数据并渲染 - } - }, "json"); - }, - - - // 提交备份请求 - post:function(){ - layer.msg("正在发送备份请求..."); - $.post( - '/system/backup/export', - '', - function(data){ - if(data.code==1){ - layer.alert( "开始备份,请不要关闭本页面!"); - backUp.beifen(data.data.tab); - }else{ - layer.msg(data.msg); - } - }, "json"); - return false; - }, + var obj = { + // 删除备份 + del: function(url) { + $.post( + url, + function(data) { + layer.msg(data.msg); + if (data.val === 1) { + table.render(options); //获取数据并渲染 + } + }, "json"); + }, - // 备份 - beifen:function(tab,status){ - $.ajax({ - url:"/system/backup/export", - data:tab, - async:false, - type:"GET", - dataType:"json", - timeout:0, - success:function(data){ - if(data.code==1){ - if(!$.isPlainObject(data.data.tab)){ - layer.msg("备份完成"); - // window.onbeforeunload = function(){ return null } - return; - } - - backUp.beifen(data.data.tab, tab.id != data.data.tab.id); - } else { - userTable = table.render(options); //获取数据并渲染 - layer.msg("备份完成"); - } - } - }); - }, + // 提交备份请求 + post: function() { + layer.msg("正在发送备份请求..."); + $.post( + '/system/backup/export', + '', + function(data) { + console.log(data); + if (data.code == 1) { + layer.msg("开始备份,请不要关闭或刷新本页面!"); + layui.backUp.beifen(data.data.tab); + } else { + layer.msg(data.msg); + } + }, "json"); + return false; + }, - // 恢复数据 - back:function(url, a, time){ - myStatus = $(a).parent().parent().prev().children('div'); - $(myStatus).text('等待还原'); - $.ajax({ - url:url, - type:'POST', - async: true, - data:{ - time:time, - }, - success:function(data){ - backUp.success(data, url, time); - }, - error:function(result){ - layer.msg('数据扔半道,回不来啦。',function(){}); - } - }); - - layer.alert('正在还原数据库,请不要关闭!'); - return false; - }, + // 备份 + beifen: function(tab, status) { + $.ajax({ + url: "/system/backup/export", + data: tab, + async: false, + type: "GET", + dataType: "json", + timeout: 0, + success: function(data) { + if (data.code == 1) { + if (!$.isPlainObject(data.data.tab)) { + layer.msg("备份完成"); + return; + } + layui.backUp.beifen(data.data.tab, tab.id != data.data.tab.id); + } else { + userTable = table.render(options); //获取数据并渲染 + layer.msg("备份完成"); + } + } + }); + }, - // 恢复成绩 - success:function(data, url, time){ - if (data.code==1) { - $(myStatus).text(data.msg); - if (data.data.part) { - $.ajax({ - url:url, - type:'POST', - async: true, - data:{ - time:time, - part:data.data.part, - start:data.data.start, - }, - success:function(data){ - backUp.success(data, url); - }, - error:function(result){ - layer.msg('数据扔半道,回不来啦。',function(){}); - } - }); - } else { - layer.msg(data.msg); - } - } else { - layer.msg(data.msg); - } - }, -}; - //输出test接口 - exports('backUp', obj); + // 恢复数据 + back: function(url, a, time) { + myStatus = $(a).parents("td").prev().children('div'); + console.log(myStatus); + $(myStatus).text('等待还原'); + $.ajax({ + url: url, + type: 'POST', + async: true, + data: { + time: time, + }, + success: function(data) { + layui.backUp.success(data, url, time); + }, + error: function(result) { + layer.msg('数据扔半道,回不来啦。', function() {}); + } + }); + + layer.msg('正在还原数据库,请不要关闭或刷新本页面!'); + return false; + }, + + + // 恢复成绩 + success: function(data, url, time) { + if (data.code == 1) { + $(myStatus).text(data.msg); + if (data.data.part) { + $.ajax({ + url: url, + type: 'POST', + async: true, + data: { + time: time, + part: data.data.part, + start: data.data.start, + }, + success: function(data) { + layui.backUp.success(data, url); + }, + error: function(result) { + layer.msg('数据扔半道,回不来啦。', function() {}); + } + }); + } else { + layer.msg(data.msg); + } + } else { + layer.msg(data.msg); + } + }, + + + }; + //输出test接口 + exports('backUp', obj); }); diff --git a/public/static/x-admin2.2/js/canyuKaoshi.js b/public/static/x-admin2.2/js/canyuKaoshi.js index b5f6d00c..57825a6b 100644 --- a/public/static/x-admin2.2/js/canyuKaoshi.js +++ b/public/static/x-admin2.2/js/canyuKaoshi.js @@ -3,227 +3,227 @@ **/ layui.define(['table', 'form', 'upload'], function(exports) { - //提示:模块也可以依赖其它模块,如:layui.define('layer', callback); - var table = layui.table, - form = layui.form, - upload = layui.upload; + //提示:模块也可以依赖其它模块,如:layui.define('layer', callback); + var table = layui.table, + form = layui.form, + upload = layui.upload; - var obj = { - gradeSelect: function(myid, kaoshi_id, value='', hasNull = true) { - $.ajax({ - url: '/kaoshi/kscy/grade', - type: 'POST', - data: { - kaoshi_id: kaoshi_id - }, - success: function(result) { - $('#' + myid).children().remove(); - if (hasNull == true) { - str = ''; - } else { - str = ''; - } - temp = ""; - $(result.data).each(function(i, el) { - if (value != '' && value == el.id) { - temp = ''; - } else { - temp = ''; - } - str = str + temp; - }); - $('#' + myid).append(str); - form.render('select'); - }, - error: function(result) { - layer.msg('数据扔半道啦。', function() {}); - }, - }); - }, + var obj = { + gradeSelect: function(myid, kaoshi_id, value = '', hasNull = true) { + $.ajax({ + url: '/kaoshi/kscy/grade', + type: 'POST', + data: { + kaoshi_id: kaoshi_id + }, + success: function(result) { + $('#' + myid).children().remove(); + if (hasNull == true) { + str = ''; + } else { + str = ''; + } + temp = ""; + $(result.data).each(function(i, el) { + if (value != '' && value == el.id) { + temp = ''; + } else { + temp = ''; + } + str = str + temp; + }); + $('#' + myid).append(str); + form.render('select'); + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, - // 参与本次考试学科 - subjectSelect: function(myid, data, value= '', hasNull = true){ - $.ajax({ - url: '/kaoshi/kscy/subject', - type: 'POST', - data: data, - success: function(result) { - $('#' + myid).children().remove(); - if (hasNull == true) { - str = ''; - } else { - str = ''; - } - temp = ""; - $(result.data).each(function(i, el) { - if (value != '' && value == el.id) { - temp = ''; - } else { - temp = ''; - } - str = str + temp; - }); - $('#' + myid).append(str); - form.render('select'); - }, - error: function(result) { - layer.msg('数据扔半道啦。', function() {}); - }, - }); - }, + // 参与本次考试学科 + subjectSelect: function(myid, data, value = '', hasNull = true) { + $.ajax({ + url: '/kaoshi/kscy/subject', + type: 'POST', + data: data, + success: function(result) { + $('#' + myid).children().remove(); + if (hasNull == true) { + str = ''; + } else { + str = ''; + } + temp = ""; + $(result.data).each(function(i, el) { + if (value != '' && value == el.id) { + temp = ''; + } else { + temp = ''; + } + str = str + temp; + }); + $('#' + myid).append(str); + form.render('select'); + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, - // 已经参与本次考试学科 - subjectCheckbox: function(myid, data,hasAll = true){ - $.ajax({ - url: '/kaoshi/kscy/subject', - type: 'POST', - data: data, - success: function(result) { - $('#' + myid).children().remove(); - if (hasAll == true) { - str = ''; - } else { - str = ''; - } - temp = ""; - $(result.data).each(function(i, el) { - temp = ''; - str = str + temp; - }); - $('#' + myid).append(str); - form.render('checkbox'); - }, - error: function(result) { - layer.msg('数据扔半道啦。', function() {}); - }, - }); - }, + // 已经参与本次考试学科 + subjectCheckbox: function(myid, data, hasAll = true) { + $.ajax({ + url: '/kaoshi/kscy/subject', + type: 'POST', + data: data, + success: function(result) { + $('#' + myid).children().remove(); + if (hasAll == true) { + str = ''; + } else { + str = ''; + } + temp = ""; + $(result.data).each(function(i, el) { + temp = ''; + str = str + temp; + }); + $('#' + myid).append(str); + form.render('checkbox'); + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, - // 参与本次考试班级 - banjiSelect: function(myid, data, value= '', hasNull = true){ - $.ajax({ - url: '/kaoshi/kscy/class', - type: 'POST', - data: data, - success: function(result) { - $('#' + myid).children().remove(); - if (hasNull == true) { - str = ''; - } else { - str = ''; - } - temp = ""; - $(result.data).each(function(i, el) { - if (value != '' && value == el.id) { - temp = ''; - } else { - temp = ''; - } - str = str + temp; - }); - $('#' + myid).append(str); - form.render('select'); - }, - error: function(result) { - layer.msg('数据扔半道啦。', function() {}); - }, - }); - }, + // 参与本次考试班级 + banjiSelect: function(myid, data, value = '', hasNull = true) { + $.ajax({ + url: '/kaoshi/kscy/class', + type: 'POST', + data: data, + success: function(result) { + $('#' + myid).children().remove(); + if (hasNull == true) { + str = ''; + } else { + str = ''; + } + temp = ""; + $(result.data).each(function(i, el) { + if (value != '' && value == el.id) { + temp = ''; + } else { + temp = ''; + } + str = str + temp; + }); + $('#' + myid).append(str); + form.render('select'); + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, - // 已经参与本次考试班级 - banjiCheckbox: function(myid, data,hasAll = true){ - $.ajax({ - url: '/kaoshi/kscy/class', - type: 'POST', - data: data, - success: function(result) { - $('#' + myid).children().remove(); - if (hasAll == true) { - str = ''; - } else { - str = ''; - } - temp = ""; - $(result.data).each(function(i, el) { - temp = ''; - str = str + temp; - }); - $('#' + myid).append(str); - form.render('checkbox'); - }, - error: function(result) { - layer.msg('数据扔半道啦。', function() {}); - }, - }); - }, + // 已经参与本次考试班级 + banjiCheckbox: function(myid, data, hasAll = true) { + $.ajax({ + url: '/kaoshi/kscy/class', + type: 'POST', + data: data, + success: function(result) { + $('#' + myid).children().remove(); + if (hasAll == true) { + str = ''; + } else { + str = ''; + } + temp = ""; + $(result.data).each(function(i, el) { + temp = ''; + str = str + temp; + }); + $('#' + myid).append(str); + form.render('checkbox'); + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, - // 参与本次考试学校 - schoolSelect: function(myid, kaoshi_id, value= '', hasNull = true){ - $.ajax({ - url: '/kaoshi/kscy/school', - type: 'POST', - data: { - kaoshi_id:kaoshi_id - }, - success: function(result) { - $('#' + myid).children().remove(); - if (hasNull == true) { - str = ''; - } else { - str = ''; - } - temp = ""; - $(result.data).each(function(i, el) { - if (value != '' && value == el.id) { - temp = ''; - } else { - temp = ''; - } - str = str + temp; - }); - $('#' + myid).append(str); - form.render('select'); - }, - error: function(result) { - layer.msg('数据扔半道啦。', function() {}); - }, - }); - }, + // 参与本次考试学校 + schoolSelect: function(myid, kaoshi_id, value = '', hasNull = true) { + $.ajax({ + url: '/kaoshi/kscy/school', + type: 'POST', + data: { + kaoshi_id: kaoshi_id + }, + success: function(result) { + $('#' + myid).children().remove(); + if (hasNull == true) { + str = ''; + } else { + str = ''; + } + temp = ""; + $(result.data).each(function(i, el) { + if (value != '' && value == el.id) { + temp = ''; + } else { + temp = ''; + } + str = str + temp; + }); + $('#' + myid).append(str); + form.render('select'); + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, - // 获取可以编辑的考试 - kaoshiSelect: function(myid, hasNull = true){ - $.ajax({ - url: '/kaoshi/index/srceditkaoshi', - type: 'POST', - success: function(result) { - $('#' + myid).children().remove(); - if (hasNull == true) { - str = ''; - } else { - str = ''; - } - temp = ""; - $(result.data).each(function(i, el) { - temp = ''; - str = str + temp; - }); - $('#' + myid).append(str); - form.render('select'); - }, - error: function(result) { - layer.msg('数据扔半道啦。', function() {}); - }, - }); - }, + // 获取可以编辑的考试 + kaoshiSelect: function(myid, hasNull = true) { + $.ajax({ + url: '/kaoshi/index/srceditkaoshi', + type: 'POST', + success: function(result) { + $('#' + myid).children().remove(); + if (hasNull == true) { + str = ''; + } else { + str = ''; + } + temp = ""; + $(result.data).each(function(i, el) { + temp = ''; + str = str + temp; + }); + $('#' + myid).append(str); + form.render('select'); + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, - }; - //输出test接口 - exports('canyuKaoshi', obj); + }; + //输出test接口 + exports('canyuKaoshi', obj); }); diff --git a/public/static/x-admin2.2/js/cjgl.js b/public/static/x-admin2.2/js/cjgl.js deleted file mode 100644 index c7fbfe6b..00000000 --- a/public/static/x-admin2.2/js/cjgl.js +++ /dev/null @@ -1,481 +0,0 @@ -/** - 扩展cjgl模块 - **/ - -layui.define(['table', 'form'],function(exports){ //提示:模块也可以依赖其它模块,如:layui.define('layer', callback); - var table = layui.table - form = layui.form; - var obj = { - // 删除单条记录 - del:function(obj,url){ - layer.confirm('确认要删除吗?',function(index){ - $.ajax({ - url:url + '/m', - type:'DELETE', - data:{ - id:obj.data.id - }, - success:function(result){ - if(result.val == 1) - { - obj.del(); - layer.msg(result.msg); - }else{ - layer.msg(result.msg,function(){}); - } - }, - error:function(result){ - layer.msg('数据扔半道啦。',function(){}); - }, - }); - }); - }, - - // 恢复单条记录 - redel:function(obj,url){ - layer.confirm('确认要恢复删除吗?',function(index){ - $.ajax({ - url:url+'/'+obj.data.id, - type:'DELETE', - data:{ - id:obj.data.id - }, - success:function(result){ - if(result.val == 1) - { - obj.del(); - layer.msg(result.msg); - }else{ - layer.msg(result.msg,function(){}); - } - }, - error:function(result){ - layer.msg('数据扔半道啦。',function(){}); - }, - }); - }); - }, - - // 删除全部 - delAll:function(obj,url,tableid){ - //判断是否选择数据 - if(obj.data.length==0){ - parent.layer.msg('请先选择要删除的数据行!',function(){}); - return ; - } - - layer.confirm('确认要删除吗?',function(index){ - // 捉一下所有被选中的数据 - var ids = ""; - for(var i=0;i
请选择
'); - // 声明变量 - var mydl = srcInput.next().children('dl'); - - // 获取数据 - $.post( - "/admin/index/srcteacher", - { - "str":val, - }, - function(data,status){ - data = data.data; - if($.isEmptyObject(data)) - { - return true; - } - var str; - for (var i = data.length - 1; i >= 0; i--) { - str = ''; - str = '
'; - str = str + data[i].xingming+' '+data[i].adSchool.jiancheng+' '+data[i].shengri; - str = str + '
'; - mydl.append(str); - } - } - ); - }, - - - // Select获取焦点 - searchTeacherOld:function(myobj,val,addname,myfunction){ - // 声明变量 - var srcInput = $(myobj); - // 删除原来列表 - srcInput.next().remove(); - // 添加列表div - srcInput.after('
请选择
'); - // 声明变量 - var mydl = srcInput.next().children('dl'); - - // 获取数据 - $.post( - "/teacher/index/srcteacher", - { - "str":val, - }, - function(data,status){ - data = data.data; - if($.isEmptyObject(data)) - { - return true; - } - var str; - for (var i = data.length - 1; i >= 0; i--) { - str = ''; - str = '
'; - str = str + data[i].xingming+' '+data[i].jsDanwei.jiancheng+' '+data[i].shengri; - str = str + '
'; - mydl.append(str); - } - } - ); - }, - - // 添加教师 - addTeacher:function(myobj){ - var myId = $(myobj).attr('id') - ,teachername = $(myobj).attr('teachername') - ,addname = $(myobj).attr('addname') - ,myTitle = $(myobj).text() - ,myList = $(myobj).parent().parent() - ,myBut = $(myList).parent().parent() - ,schoolName = $(myobj).attr('schoolName'); - if(myId){ - var str = '
'; - str = str + '
'; - str = str + teachername; - str = str + '
' - $(myBut).append(str); - } - $(myList).prev().val(''); - $(myList).remove(); - }, - - // 添加教师ID - addTeacherID:function(myobj){ - var myId = $(myobj).attr('id') - ,teachername = $(myobj).attr('teachername') - ,addname = $(myobj).attr('addname') - ,myTitle = $(myobj).text() - ,myList = $(myobj).parent().parent() - ,myBut = $(myList).parent().parent(); - - $(myList).prev().val(myId); - $(myList).remove(); - }, - - // 删除教师 - delTeacher:function(myobj){ - $(myobj).parent().remove(); - }, - - /** - * 动太获取复选框列表并添加列表 - * - * @access public - * @param parentId 要添加checkbox的divID - * @param array val post时需要的参数 - * @param url post地址 - * @param createName 新checkbox名 - * @param title 输出返回数组的列 - * @return array 返回类型 - */ - createCheckbox:function(parentId,val,url,createName,title='title'){ - $('#'+parentId).children().remove(); - $.post( - url, - val, - function(data,status){ - if(data.count > 0){ - cnt = data.count; - mydata = data.data; - - }else{ - cnt = 0; - mydata = Array(); - } - - // if(cnt>0){ - $('#'+parentId).append(''); - // } - for(x in mydata){ - $('#'+parentId).append(''); - } - form.render(); - } - ); - }, - - - /** - * 动太获取复选框列表并添加列表 - * - * @access public - * @param idd 要添加select的ID - * @param array val post时需要的参数 - * @param url post地址 - * @param createName 新checkbox名 - * @param title 输出返回数组的列 - * @return array 返回类型 - */ - createSelectOption:function(id, val, url, cloval='id', cloname='title', checkval=null){ - $('#' + id).children().remove(); - $.post( - url, - val, - function(data,status){ - cnt = data.count; - mydata = data.data; - if(cnt>0){ - $('#' + id).append(''); - } - for(x in mydata){ - if(mydata[x][cloval] == checkval) - { - $('#' + id).append(''); - }else{ - $('#' + id).append(''); - } - } - form.render(); - } - ); - }, - - /** - * 单击全选按钮,全部选中或取消选中后面的checkbox - * 选中所有全部checkbox - * - * @access public - * @param parentId 选中checkbox父级div的id - * @param checked post时需要的参数 - * @return array 返回类型 - */ - checkboxAll:function(parentId,checked){ - if(checked==true) - { - $('#'+parentId).find("input[checkall='c']").prop('checked',true); - }else{ - $('#'+parentId).find("input[checkall='c']").prop('checked',false); - } - form.render(); - }, - - /** - * 如果有选中的checkbox,那么就选中全选按钮,否则取消选中 - * - * @access public - * @param parentId 选中checkbox父级div的id - * @return array 返回类型 - */ - checkboxParent:function(parentId){ - children = $('#'+parentId).find(".layui-form-checked").prev("input[checkall='c']"); - children = children.length; - if(children==0) - { - $('#'+parentId).find("input[checkall='p']").prop('checked',false); - }else{ - $('#'+parentId).find("input[checkall='p']").prop('checked',true); - } - form.render(); - }, - - /** - * 如果二级checkbox全部选中,那么就选中全选按钮,否则取消选中 - * - * @access public - * @param parentId 选中checkbox父级div的id - * @return array 返回类型 - */ - checkboxParentList:function(parentId){ - cnt = $('#'+parentId).children("input[checkall='c']").length; - checkedCnt = $('#'+parentId).children("input:checkbox[checkall='c']:checked").length; - if(cnt == checkedCnt) - { - $('#'+parentId).find("input[checkall='p']").prop('checked',true); - }else{ - $('#'+parentId).find("input[checkall='p']").prop('checked',false); - } - - form.render(); - }, - - /** - * 在创建角色中,选中类别时的动作 - * - * @access public - * @param id 选中复选框的ID - * @param checked 选中复选框的状态 - * @return array 返回类型 - */ - checkedAuth:function(id,checed){ - obj = $('#p'+id).html(); - aa = $('#p'+id).find("input[type='checkbox']").prop('checked',checked); - form.render(); - }, - - /** - * 成绩统计 - * @access public - * @param id 选中复选框的ID - * @param checked 选中复选框的状态 - * @return array 返回类型 - */ - tongjiCj:function(url,val){ - $.ajax({ - url:url, - type:'POST', - async: true, - data:val, - beforeSend: function () { - $("body").append('
'); - }, - complete: function () { - $("#load").remove(); - }, - success:function(result){ - layer.msg(result.msg); - }, - error:function(result){ - layer.msg('数据扔半道,回不来啦。',function(){}); - }, - }); - }, - - }; - //输出test接口 - exports('cjgl', obj); -}); diff --git a/public/static/x-admin2.2/js/cookie.js b/public/static/x-admin2.2/js/cookie.js index 79b05ac7..90a09e41 100755 --- a/public/static/x-admin2.2/js/cookie.js +++ b/public/static/x-admin2.2/js/cookie.js @@ -1,38 +1,38 @@ function setCookie(name, value, expires, path, domain, secure) { - if(typeof is_remember!="undefined") - return false; - var today = new Date(); - today.setTime( today.getTime() ); - var expires_date = new Date( today.getTime() + (expires) ); - document.cookie= name + "=" + escape(value) + - ((expires) ? "; expires=" + expires_date.toGMTString() : "") + - ((path) ? "; path=" + path : "") + - ((domain) ? "; domain=" + domain : "") + - ((secure) ? "; secure" : ""); + if (typeof is_remember != "undefined") + return false; + var today = new Date(); + today.setTime(today.getTime()); + var expires_date = new Date(today.getTime() + (expires)); + document.cookie = name + "=" + escape(value) + + ((expires) ? "; expires=" + expires_date.toGMTString() : "") + + ((path) ? "; path=" + path : "") + + ((domain) ? "; domain=" + domain : "") + + ((secure) ? "; secure" : ""); } + function getCookie(name) { - var dc = document.cookie; - var prefix = name + "="; - var begin = dc.indexOf("; " + prefix); - if (begin == -1) { - begin = dc.indexOf(prefix); - if (begin != 0) return null; - } else { - begin += 2; - } - var end = document.cookie.indexOf(";", begin); - if (end == -1) { - end = dc.length; - } - return unescape(dc.substring(begin + prefix.length, end)); + var dc = document.cookie; + var prefix = name + "="; + var begin = dc.indexOf("; " + prefix); + if (begin == -1) { + begin = dc.indexOf(prefix); + if (begin != 0) return null; + } else { + begin += 2; + } + var end = document.cookie.indexOf(";", begin); + if (end == -1) { + end = dc.length; + } + return unescape(dc.substring(begin + prefix.length, end)); } + function deleteCookie(name, path, domain) { - if (getCookie(name)) { - document.cookie = name + "=" + - ((path) ? "; path=" + path : "") + - ((domain) ? "; domain=" + domain : "") + - "; expires=Thu, 01-Jan-70 00:00:01 GMT"; - } + if (getCookie(name)) { + document.cookie = name + "=" + + ((path) ? "; path=" + path : "") + + ((domain) ? "; domain=" + domain : "") + + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; + } } - - diff --git a/public/static/x-admin2.2/js/createInput.js b/public/static/x-admin2.2/js/createInput.js index ad1c309f..6e49ea9f 100644 --- a/public/static/x-admin2.2/js/createInput.js +++ b/public/static/x-admin2.2/js/createInput.js @@ -3,614 +3,608 @@ **/ layui.extend({ - // 根路径下的具体路径(xmSelect/xmSelect.js) - xmSelect: "xm-select" + // 根路径下的具体路径(xmSelect/xmSelect.js) + xmSelect: "xm-select" }).define(['table', 'form', 'xmSelect', 'upload'], function(exports) { - //提示:模块也可以依赖其它模块,如:layui.define('layer', callback); - var table = layui.table, - form = layui.form, - upload = layui.upload, - xmSelect = layui.xmSelect; + //提示:模块也可以依赖其它模块,如:layui.define('layer', callback); + var table = layui.table, + form = layui.form, + upload = layui.upload, + xmSelect = layui.xmSelect; - var obj = { - // 创建类别的Select - categorySelect: function(myid, pid, value = '', hasNull = true) { - $.ajax({ - url: '/system/category/children', - type: 'POST', - data: { - p_id: pid - }, - success: function(result) { - $('#' + myid).children().remove(); - if (hasNull == true) { - str = ''; - } else { - str = ''; - } - temp = ""; - $(result.data).each(function(i, el) { - if (value != '' && value == el.id) { - temp = ''; - } else { - temp = ''; - } - str = str + temp; - }); - $('#' + myid).append(str); - form.render('select'); - }, - error: function(result) { - layer.msg('数据扔半道啦。', function() {}); - }, - }); - }, + var obj = { + // 创建类别的Select + categorySelect: function(myid, pid, value = '', hasNull = true) { + $.ajax({ + url: '/system/category/children', + type: 'POST', + data: { + p_id: pid + }, + success: function(result) { + $('#' + myid).children().remove(); + if (hasNull == true) { + str = ''; + } else { + str = ''; + } + temp = ""; + $(result.data).each(function(i, el) { + if (value != '' && value == el.id) { + temp = ''; + } else { + temp = ''; + } + str = str + temp; + }); + $('#' + myid).append(str); + form.render('select'); + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, - // 选中checkbox - checkboxCheckedAuth: function(data) { - pid = $(data.elem).attr('pid'); - cid = $(data.elem).attr('cid'); - check = data.elem.checked; - editCid(cid, check); - editPid(pid, check); + // 选中checkbox + checkboxCheckedAuth: function(data) { + pid = $(data.elem).attr('pid'); + cid = $(data.elem).attr('cid'); + check = data.elem.checked; + editCid(cid, check); + editPid(pid, check); - function editCid(cid, check) { - $("input[pid='" + cid + "']").each(function(i, el) { - this.checked = check; - cid = $(this).attr('cid'); - editCid(cid, check); - }); - } + function editCid(cid, check) { + $("input[pid='" + cid + "']").each(function(i, el) { + this.checked = check; + cid = $(this).attr('cid'); + editCid(cid, check); + }); + } - function editPid(pid, check) { - if (check == true) { - $("input[cid='" + pid + "']").each(function(i, el) { - this.checked = check; - pid = $(this).attr('pid'); - editPid(pid, check); - }); - } else { - cnt = $("input[pid='" + pid + "']:checked").length; - if (cnt == 0) { - $("input[cid='" + pid + "']").each(function(i, el) { - this.checked = check; - pid = $(this).attr('pid'); - editPid(pid, check); - }); - } - } - } + function editPid(pid, check) { + if (check == true) { + $("input[cid='" + pid + "']").each(function(i, el) { + this.checked = check; + pid = $(this).attr('pid'); + editPid(pid, check); + }); + } else { + cnt = $("input[pid='" + pid + "']:checked").length; + if (cnt == 0) { + $("input[cid='" + pid + "']").each(function(i, el) { + this.checked = check; + pid = $(this).attr('pid'); + editPid(pid, check); + }); + } + } + } - form.render('checkbox'); + form.render('checkbox'); - }, + }, - // 选中checkbox - checkboxChecked: function(data) { - check = data.elem.checked; - editCid(data.elem, check); - editPid(data.elem, check); + // 选中checkbox + checkboxChecked: function(data) { + check = data.elem.checked; + editCid(data.elem, check); + editPid(data.elem, check); - function editCid(elem, check) { - cid = $(elem).attr("cid"); - if(typeof(cid)!="undefined") - { - myCid = $(elem).siblings("input[pid='" + cid + "']"); - layui.each(myCid, function(i, el){ - this.checked = check; - // editCid(el); - }) - } - return false; - } + function editCid(elem, check) { + cid = $(elem).attr("cid"); + if (typeof(cid) != "undefined") { + myCid = $(elem).siblings("input[pid='" + cid + "']"); + layui.each(myCid, function(i, el) { + this.checked = check; + // editCid(el); + }) + } + return false; + } - function editPid(elem, check) { - pid = $(elem).attr("pid"); - if(typeof(pid)!="undefined") - { - cid = $(elem).attr("cid"); - myPid = $(elem).siblings("input[cid='" + pid + "']"); - if(check == true) - { - layui.each(myPid, function(i, el){ - this.checked = check; - // editPid(el, check); - }) - }else{ - myTongji = $(elem).siblings("input[pid='" + pid + "']:checked"); - if(myTongji.length == 0) - { - layui.each(myPid, function(i, el){ - this.checked = check; - }) - } - } - } - return false; - } + function editPid(elem, check) { + pid = $(elem).attr("pid"); + if (typeof(pid) != "undefined") { + cid = $(elem).attr("cid"); + myPid = $(elem).siblings("input[cid='" + pid + "']"); + if (check == true) { + layui.each(myPid, function(i, el) { + this.checked = check; + // editPid(el, check); + }) + } else { + myTongji = $(elem).siblings("input[pid='" + pid + "']:checked"); + if (myTongji.length == 0) { + layui.each(myPid, function(i, el) { + this.checked = check; + }) + } + } + } + return false; + } - form.render('checkbox'); - }, + form.render('checkbox'); + }, - // 创建单位的Select - schoolSelect: function(myid, low = '班级', high = '其它级', value, kaoshi='', hasNull = true) { - $.ajax({ - url: '/system/school/srcschool', - type: 'POST', - data: { - low: low, - high: high, - kaoshi:kaoshi - }, - success: function(result) { - $('#' + myid).children().remove(); - if (hasNull == true) { - str = ''; - } else { - str = ''; - } - temp = ""; - $(result.data).each(function(i, el) { - if (value != '' && value == el.id) { - temp = ''; - } else { - temp = ''; - } - str = str + temp; - }); - $('#' + myid).append(str); - form.render('select'); - }, - error: function(result) { - layer.msg('数据扔半道啦。', function() {}); - }, - }); - }, + // 创建单位的Select + schoolSelect: function(myid, low = '班级', high = '其它级', value, kaoshi = '', hasNull = true) { + $.ajax({ + url: '/system/school/srcschool', + type: 'POST', + data: { + low: low, + high: high, + kaoshi: kaoshi + }, + success: function(result) { + $('#' + myid).children().remove(); + if (hasNull == true) { + str = ''; + } else { + str = ''; + } + temp = ""; + $(result.data).each(function(i, el) { + if (value != '' && value == el.id) { + temp = ''; + } else { + temp = ''; + } + str = str + temp; + }); + $('#' + myid).append(str); + form.render('select'); + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, - // 查询老师 - searchTeacher: function(id, radio = false, name = '') { - if(name == '') - { - name = id; - } - var school_id = ''; - x = xmSelect.render({ - el: '#' + id, - name: name, - autoRow: true, - toolbar: { show: true }, - filterable: true, - remoteSearch: true, - tips: '请选择教师', - theme: { - color: '#1cbbb4', - }, - prop: { - name: 'xingming', - value: 'id', - }, - // height: '25px', - size: 'mini', - radio: radio, - showCount: 8, - repeat: false, - model: { - label: { - type: 'text', - //使用字符串拼接的方式 - text: { - //左边拼接的字符 - left: '【', - //右边拼接的字符 - right: '】', - //中间的分隔符 - separator: ',', - }, - } - }, - remoteMethod: function(val, cb, show) { - //这里如果val为空, 则不触发搜索 - if (!val) { - return cb([]); - } + // 查询老师 + searchTeacher: function(id, radio = false, name = '') { + if (name == '') { + name = id; + } + var school_id = ''; + x = xmSelect.render({ + el: '#' + id, + name: name, + autoRow: true, + toolbar: { show: true }, + filterable: true, + remoteSearch: true, + tips: '请选择教师', + theme: { + color: '#1cbbb4', + }, + prop: { + name: 'xingming', + value: 'id', + }, + // height: '25px', + size: 'mini', + radio: radio, + showCount: 8, + repeat: false, + model: { + label: { + type: 'text', + //使用字符串拼接的方式 + text: { + //左边拼接的字符 + left: '【', + //右边拼接的字符 + right: '】', + //中间的分隔符 + separator: ',', + }, + } + }, + remoteMethod: function(val, cb, show) { + //这里如果val为空, 则不触发搜索 + if (!val) { + return cb([]); + } - $.ajax({ - url: '/admin/index/srcteacher', - type: 'POST', - data: { - searchval: val, - school_id: school_id - }, - success: function(result) { - cb(result.data) - }, - error: function(result) { - layer.msg('数据扔半道啦。', function() {}); - }, - }); - }, - }) - return x; - }, + $.ajax({ + url: '/admin/index/srcteacher', + type: 'POST', + data: { + searchval: val, + school_id: school_id + }, + success: function(result) { + cb(result.data) + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, + }) + return x; + }, - // 查询老师 - searchStudent: function(id, radio = false, name = '') { - if(name == '') - { - name = id; - } - var banji_id = ''; - x = xmSelect.render({ - el: '#' + id, - name: name, - autoRow: true, - toolbar: { show: true }, - filterable: true, - remoteSearch: true, - tips: '请选择教师', - theme: { - color: '#1cbbb4', - }, - prop: { - name: 'xingming', - value: 'id', - }, - // height: '25px', - size: 'mini', - radio: radio, - showCount: 8, - repeat: false, - model: { - label: { - type: 'text', - //使用字符串拼接的方式 - text: { - //左边拼接的字符 - left: '【', - //右边拼接的字符 - right: '】', - //中间的分隔符 - separator: ',', - }, - } - }, - remoteMethod: function(val, cb, show) { + // 查询老师 + searchStudent: function(id, radio = false, name = '') { + if (name == '') { + name = id; + } + var banji_id = ''; + x = xmSelect.render({ + el: '#' + id, + name: name, + autoRow: true, + toolbar: { show: true }, + filterable: true, + remoteSearch: true, + tips: '请选择教师', + theme: { + color: '#1cbbb4', + }, + prop: { + name: 'xingming', + value: 'id', + }, + // height: '25px', + size: 'mini', + radio: radio, + showCount: 8, + repeat: false, + model: { + label: { + type: 'text', + //使用字符串拼接的方式 + text: { + //左边拼接的字符 + left: '【', + //右边拼接的字符 + right: '】', + //中间的分隔符 + separator: ',', + }, + } + }, + remoteMethod: function(val, cb, show) { - //这里如果val为空, 则不触发搜索 - if (!val) { - return cb([]); - } + //这里如果val为空, 则不触发搜索 + if (!val) { + return cb([]); + } - $.ajax({ - url: '/student/index/srcstudent', - type: 'POST', - data: { - searchval: val, - banji_id: 1, - kaoshi:1 - }, - success: function(result) { - cb(result.data); - }, - error: function(result) { - layer.msg('数据扔半道啦。', function() {}); - }, - }); - }, - }) - return x; - }, + $.ajax({ + url: '/student/index/srcstudent', + type: 'POST', + data: { + searchval: val, + banji_id: 1, + kaoshi: 1 + }, + success: function(result) { + cb(result.data); + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, + }) + return x; + }, - // 载入搜索框中已经保存的教师 - loadTeacher: function(obj, url, data) { - $.ajax({ - url: url, - type: 'POST', - data: data, - success: function(result) { - obj.update({ - data: result.data - }) - }, - error: function(result) { - layer.msg('数据扔半道啦。', function() {}); - }, - }); - }, + // 载入搜索框中已经保存的教师 + loadTeacher: function(obj, url, data) { + $.ajax({ + url: url, + type: 'POST', + data: data, + success: function(result) { + obj.update({ + data: result.data + }) + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, - // 上传图片 - uploadPic: function(uploadId, url, category, serurl, backId) { - upload.render({ - elem: '#' + uploadId, //绑定元素 - url: url, //上传接口 - done: function(res) { - if (res.val == 1) { - $('#' + backId).val(res.url); - document.getElementById("img").src = "/uploads/" + res.url; - } - layer.msg(res.msg); - }, - data: { - text: category, - serurl: serurl - }, - acceptMime: '.jpg,.jpeg,.png', - exts: 'jpg|jpeg|png', - auto: true, - error: function() { - //请求异常回调 - } - }); - }, + // 上传图片 + uploadPic: function(uploadId, url, category, serurl, backId) { + upload.render({ + elem: '#' + uploadId, //绑定元素 + url: url, //上传接口 + done: function(res) { + if (res.val == 1) { + $('#' + backId).val(res.url); + document.getElementById("img").src = "/uploads/" + res.url; + } + layer.msg(res.msg); + }, + data: { + text: category, + serurl: serurl + }, + acceptMime: '.jpg,.jpeg,.png', + exts: 'jpg|jpeg|png', + auto: true, + error: function() { + //请求异常回调 + } + }); + }, - // 上传图片 - uploadPicMore: function(uploadId, url, category, serurl) { - upload.render({ - elem: '#' + uploadId, //绑定元素 - url: url, //改成您自己的上传接口 - async: false, - done: function(res) { - layer.msg('上传成功'); - layui.$('#uploadDemoView').removeClass('layui-hide').find('img').attr('src', res.files.file); - }, - data: { - text: category, - serurl: serurl - }, - multiple: true, - number: 100, - acceptMime: '.jpg,.jpeg,.png', - exts: 'jpg|jpeg|png', - auto: true, - error: function() { - //请求异常回调 - layer.msg('上传错误'); - }, - }) - }, + // 上传图片 + uploadPicMore: function(uploadId, url, category, serurl) { + upload.render({ + elem: '#' + uploadId, //绑定元素 + url: url, //改成您自己的上传接口 + async: false, + done: function(res) { + layer.msg('上传成功'); + layui.$('#uploadDemoView').removeClass('layui-hide').find('img').attr('src', res.files.file); + }, + data: { + text: category, + serurl: serurl + }, + multiple: true, + number: 100, + acceptMime: '.jpg,.jpeg,.png', + exts: 'jpg|jpeg|png', + auto: true, + error: function() { + //请求异常回调 + layer.msg('上传错误'); + }, + }) + }, - // 上传电子表格 - uploadXls: function(uploadId, category, serurl, backId) { - upload.render({ - elem: '#' + uploadId, //绑定元素 - url: '/tools/file/upload', //上传接口 - done: function(res) { - if (res.val == 1) { - $('#' + backId).val(res.url); - } - layer.msg(res.msg); - }, - data: { - category_id: category, - serurl: serurl - }, - acceptMime: '.xls,.xlsx', - exts: 'xls|xlsx', - auto: true, - error: function() { - //请求异常回调 - } - }); - }, + // 上传电子表格 + uploadXls: function(uploadId, category, serurl, backId) { + upload.render({ + elem: '#' + uploadId, //绑定元素 + url: '/tools/file/upload', //上传接口 + done: function(res) { + if (res.val == 1) { + $('#' + backId).val(res.url); + } + layer.msg(res.msg); + }, + data: { + category_id: category, + serurl: serurl + }, + acceptMime: '.xls,.xlsx', + exts: 'xls|xlsx', + auto: true, + error: function() { + //请求异常回调 + } + }); + }, - // 上传文件 - uploadFileMore: function(uploadId, category, serurl, backId) { - upload.render({ - elem: '#' + uploadId, //绑定元素 - url: '/tools/file/upload', //改成您自己的上传接口 - async: false, - done: function(res) { - layer.msg('上传成功'); - // layui.$('#uploadDemoView').removeClass('layui-hide').find('img').attr('src', res.files.file); - if (res.val == 1) { - $('#' + backId).val(res.url); - } - layer.msg(res.msg); - }, - data: { - category_id: category - ,serurl: 'chengji' + // 上传文件 + uploadFileMore: function(uploadId, category, serurl, backId) { + upload.render({ + elem: '#' + uploadId, //绑定元素 + url: '/tools/file/upload', //改成您自己的上传接口 + async: false, + done: function(res) { + layer.msg('上传成功'); + // layui.$('#uploadDemoView').removeClass('layui-hide').find('img').attr('src', res.files.file); + if (res.val == 1) { + $('#' + backId).val(res.url); + } + layer.msg(res.msg); + }, + data: { + category_id: category, + serurl: 'chengji' - }, - multiple: true, - acceptMime: '.xls,.xlsx', - exts: 'xls|xlsx', - auto: true, - error: function() { - //请求异常回调 - layer.msg('上传错误'); - }, - }) - }, + }, + multiple: true, + acceptMime: '.xls,.xlsx', + exts: 'xls|xlsx', + auto: true, + error: function() { + //请求异常回调 + layer.msg('上传错误'); + }, + }) + }, - // 放大、缩小图片 - imgMax: function(obj) { - var max; - max = $(obj).attr('max'); - if (max == 0) { - $(obj).css("max-width", "800px"); - $(obj).css("max-height", "1000px"); - $(obj).attr('max', 1); - } else { - $(obj).css("max-width", "500px"); - $(obj).css("max-height", "300px"); - $(obj).attr('max', 0); - } - }, + // 放大、缩小图片 + imgMax: function(obj) { + var max; + max = $(obj).attr('max'); + if (max == 0) { + $(obj).css("max-width", "800px"); + $(obj).css("max-height", "1000px"); + $(obj).attr('max', 1); + } else { + $(obj).css("max-width", "500px"); + $(obj).css("max-height", "300px"); + $(obj).attr('max', 0); + } + }, - // 创建类别的Select - subjectSelect: function(myid, value = '', kaoshi = '', hasNull = true) { - $.ajax({ - url: '/teach/subject/data', - type: 'POST', - data: { - status: 1, - kaoshi: kaoshi - }, - success: function(result) { - $('#' + myid).children().remove(); - if (hasNull == true) { - str = ''; - } else { - str = ''; - } - temp = ""; - $(result.data).each(function(i, el) { - if (value != '' && value == el.id) { - temp = ''; - } else { - temp = ''; - } - str = str + temp; - }); - $('#' + myid).append(str); - form.render('select'); - }, - error: function(result) { - layer.msg('数据扔半道啦。', function() {}); - }, - }); - }, + // 创建类别的Select + subjectSelect: function(myid, value = '', kaoshi = '', hasNull = true) { + $.ajax({ + url: '/teach/subject/data', + type: 'POST', + data: { + status: 1, + kaoshi: kaoshi + }, + success: function(result) { + $('#' + myid).children().remove(); + if (hasNull == true) { + str = ''; + } else { + str = ''; + } + temp = ""; + $(result.data).each(function(i, el) { + if (value != '' && value == el.id) { + temp = ''; + } else { + temp = ''; + } + str = str + temp; + }); + $('#' + myid).append(str); + form.render('select'); + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, - // 创建班级checkbox - banjiCheckbox: function(myid, data, value='', hasAll = true) { - $.ajax({ - url: '/teach/banji/mybanji', - type: 'POST', - data: data, - success: function(result) { - $('#' + myid).children().remove(); - if (hasAll == true) { - str = ''; - } else { - str = ''; - } - temp = ""; - $(result.data).each(function(i, el) { - if (value != '' && value == el.id) { - temp = ''; - } else { - temp = ''; - } - str = str + temp; - }); - $('#' + myid).append(str); - form.render('checkbox'); - }, - error: function(result) { - layer.msg('数据扔半道啦。', function() {}); - }, - }); - }, + // 创建班级checkbox + banjiCheckbox: function(myid, data, value = '', hasAll = true) { + $.ajax({ + url: '/teach/banji/mybanji', + type: 'POST', + data: data, + success: function(result) { + $('#' + myid).children().remove(); + if (hasAll == true) { + str = ''; + } else { + str = ''; + } + temp = ""; + $(result.data).each(function(i, el) { + if (value != '' && value == el.id) { + temp = ''; + } else { + temp = ''; + } + str = str + temp; + }); + $('#' + myid).append(str); + form.render('checkbox'); + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, - // 创建班级checkbox - banjiSelect: function(myid, data, value='', hasAll = true) { - $.ajax({ - url: '/teach/banji/mybanji', - type: 'POST', - data: data, - success: function(result) { - $('#' + myid).children().remove(); - if (hasAll == true) { - str = ''; - } else { - str = ''; - } - temp = ""; - $(result.data).each(function(i, el) { - if (value != '' && value == el.id) { - temp = ''; - } else { - temp = ''; - } - str = str + temp; - }); - $('#' + myid).append(str); - form.render('select'); - }, - error: function(result) { - layer.msg('数据扔半道啦。', function() {}); - }, - }); - }, + // 创建班级checkbox + banjiSelect: function(myid, data, value = '', hasAll = true) { + $.ajax({ + url: '/teach/banji/mybanji', + type: 'POST', + data: data, + success: function(result) { + $('#' + myid).children().remove(); + if (hasAll == true) { + str = ''; + } else { + str = ''; + } + temp = ""; + $(result.data).each(function(i, el) { + if (value != '' && value == el.id) { + temp = ''; + } else { + temp = ''; + } + str = str + temp; + }); + $('#' + myid).append(str); + form.render('select'); + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, - // 创建年级的Select - nanjiSelect: function(myid, data, value='', hasNull = true) { - $.ajax({ - url: '/teach/banji/njlist', - type: 'POST', - data: data, - success: function(result) { - $('#' + myid).children().remove(); - if (hasNull == true) { - str = ''; - } else { - str = ''; - } - temp = ""; - layui.each(result.data, function(x, val){ - if (value != '' && value == x) { - temp = ''; - } else { - temp = ''; - } - str = str + temp; - }) - $('#' + myid).append(str); - form.render('select'); - }, - error: function(result) { - layer.msg('数据扔半道啦。', function() {}); - }, - }); - }, + // 创建年级的Select + nanjiSelect: function(myid, data, value = '', hasNull = true) { + $.ajax({ + url: '/teach/banji/njlist', + type: 'POST', + data: data, + success: function(result) { + $('#' + myid).children().remove(); + if (hasNull == true) { + str = ''; + } else { + str = ''; + } + temp = ""; + layui.each(result.data, function(x, val) { + if (value != '' && value == x) { + temp = ''; + } else { + temp = ''; + } + str = str + temp; + }) + $('#' + myid).append(str); + form.render('select'); + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, - // 创建学期的Select - xueqiSelect: function(myid, value = '', hasNull = true) { - $.ajax({ - url: '/teach/xueqi/srcxueqi', - type: 'POST', - success: function(result) { - $('#' + myid).children().remove(); - if (hasNull == true) { - str = ''; - } else { - str = ''; - } - temp = ""; - $(result.data).each(function(i, el) { - if (value != '' && value == el.id) { - temp = ''; - } else { - temp = ''; - } - str = str + temp; - }); - $('#' + myid).append(str); - form.render('select'); - }, - error: function(result) { - layer.msg('数据扔半道啦。', function() {}); - }, - }); - }, + // 创建学期的Select + xueqiSelect: function(myid, value = '', hasNull = true) { + $.ajax({ + url: '/teach/xueqi/srcxueqi', + type: 'POST', + success: function(result) { + $('#' + myid).children().remove(); + if (hasNull == true) { + str = ''; + } else { + str = ''; + } + temp = ""; + $(result.data).each(function(i, el) { + if (value != '' && value == el.id) { + temp = ''; + } else { + temp = ''; + } + str = str + temp; + }); + $('#' + myid).append(str); + form.render('select'); + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, - }; - //输出test接口 - exports('createInput', obj); + }; + //输出test接口 + exports('createInput', obj); }); diff --git a/public/static/x-admin2.2/js/myEchart.js b/public/static/x-admin2.2/js/myEchart.js index 2eeedda3..e700cb43 100644 --- a/public/static/x-admin2.2/js/myEchart.js +++ b/public/static/x-admin2.2/js/myEchart.js @@ -3,315 +3,477 @@ **/ layui.extend({ - echarts: 'echarts/echarts' - }).define(['echarts'], function(exports) { - //提示:模块也可以依赖其它模块,如:layui.define('layer', callback); - var echarts = layui.echarts; + echarts: 'echarts/echarts' +}).define(['echarts'], function(exports) { + //提示:模块也可以依赖其它模块,如:layui.define('layer', callback); + var echarts = layui.echarts; - var obj = { + var obj = { - /** - * 异步获取图表中的数据 - * - * @access public - * @param id 要添加数据的div - * @param url 异步地址 - * @param val 异步时携带的参数 - * @param val 图表标题 - * @return array 返回类型 - */ - tiaoxing:function (id, url, val, title) { - var myTiaoxing = echarts.init(document.getElementById(id), 'infographic'); - $.post(url,val).done(function (data) { - myTiaoxing.setOption({ - title:{ - text:title, - left: 'center', - }, - legend: { - top: '10%', - }, - grid: { - left: '10%', - top: '20%', - right: '10%', - bottom: '15%' - }, - tooltip: { - show: true, - axisPointer: { - type: 'cross' - } - }, - toolbox: { - id:id, - show:true, - orient:'horizontal', - showTitle:true, - feature: { - restore: { //重置 - show: true - }, - saveAsImage: { //保存文件 - show: true - }, - }, - }, - dataset: { - source:data.data - }, - xAxis: { - type: 'category', - axisLabel: { - rotate:30 - } - }, - yAxis: {}, - dataZoom: [ - { - type: 'inside', - start: 0, - end: 100 - }, - { - show: true, - height: 20, - type: 'slider', - top: '90%', - xAxisIndex: [0], - start: 0, - end: 100 - } - ], - series: data.series, - }); - }); - }, + /** + * 异步获取图表中的数据 + * + * @access public + * @param id 要添加数据的div + * @param url 异步地址 + * @param val 异步时携带的参数 + * @param val 图表标题 + * @return array 返回类型 + */ + tiaoxing: function(id, url, val, title) { + var myTiaoxing = echarts.init(document.getElementById(id), 'infographic'); + $.post(url, val).done(function(data) { + myTiaoxing.setOption({ + title: { + text: title, + left: 'center', + }, + legend: { + top: '10%', + }, + grid: { + left: '10%', + top: '20%', + right: '10%', + bottom: '15%' + }, + tooltip: { + show: true, + axisPointer: { + type: 'cross' + } + }, + toolbox: { + id: id, + show: true, + orient: 'horizontal', + showTitle: true, + feature: { + restore: { //重置 + show: true + }, + saveAsImage: { //保存文件 + show: true + }, + }, + }, + dataset: { + source: data.data + }, + xAxis: { + type: 'category', + axisLabel: { + rotate: 30 + } + }, + yAxis: {}, + dataZoom: [{ + type: 'inside', + start: 0, + end: 100 + }, + { + show: true, + height: 20, + type: 'slider', + top: '90%', + xAxisIndex: [0], + start: 0, + end: 100 + } + ], + series: data.series, + }); + }); + }, - /** - * 异步获取箱线图表中的数据 - * - * @access public - * @param id 要添加数据的div - * @param url 异步地址 - * @param val 异步时携带的参数 - * @param title 图表标题 - * @return array 返回类型 - */ - xiangti:function (id, url, val, title) - { - $.post(url,val).done(function (data) { - axisData = data.axisData; - category = data.category; - boxData = data.boxData; - myseries = Array(); + /** + * 异步获取箱线图表中的数据 + * + * @access public + * @param id 要添加数据的div + * @param url 异步地址 + * @param val 异步时携带的参数 + * @param title 图表标题 + * @return array 返回类型 + */ + xiangti: function(id, url, val, title) { + $.post(url, val).done(function(data) { + axisData = data.axisData; + category = data.category; + boxData = data.boxData; + myseries = Array(); - for(var i in category) - { - myseries.push({ - 'name':category[i], - 'type':'boxplot', - 'data':boxData[i], - 'tooltip':{formatter: formatter}, - }); - } + for (var i in category) { + myseries.push({ + 'name': category[i], + 'type': 'boxplot', + 'data': boxData[i], + 'tooltip': { formatter: layui.myEchart.formatter }, + }); + } - // 设置初始值 - option = { - title: { - text: title, - left: 'center', - }, - legend: { - top: '10%', - // data: - }, - tooltip: { - trigger: 'item', - axisPointer: { - type: 'shadow' - } - }, - toolbox: { - id:id, - show:true, - orient:'horizontal', - showTitle:true, - feature: { - restore: { //重置 - show: true - }, - saveAsImage: { //保存文件 - show: true - }, - }, - }, - grid: { - left: '10%', - top: '20%', - right: '10%', - bottom: '15%' - }, - xAxis: { - type: 'category', - data: axisData, - boundaryGap: true, - nameGap: 30, - splitArea: { - show: true - }, - axisLabel: { - // formatter: 'expr {value}' - }, - splitLine: { - show: false - } - }, - yAxis: { - type: 'value', - name: '得分', - // min: -400, - // max: 600, - splitArea: { - show: false - } - }, - dataZoom: [ - { - type: 'inside', - start: 0, - end: 100 - }, - { - show: true, - height: 20, - type: 'slider', - top: '90%', - xAxisIndex: [0], - start: 0, - end: 100 - } - ], - series: myseries, - }; + // 设置初始值 + option = { + title: { + text: title, + left: 'center', + }, + legend: { + top: '10%', + // data: + }, + tooltip: { + trigger: 'item', + axisPointer: { + type: 'shadow' + } + }, + toolbox: { + id: id, + show: true, + orient: 'horizontal', + showTitle: true, + feature: { + restore: { //重置 + show: true + }, + saveAsImage: { //保存文件 + show: true + }, + }, + }, + grid: { + left: '10%', + top: '20%', + right: '10%', + bottom: '15%' + }, + xAxis: { + type: 'category', + data: axisData, + boundaryGap: true, + nameGap: 30, + splitArea: { + show: true + }, + axisLabel: { + // formatter: 'expr {value}' + }, + splitLine: { + show: false + } + }, + yAxis: { + type: 'value', + name: '得分', + // min: -400, + // max: 600, + splitArea: { + show: false + } + }, + dataZoom: [{ + type: 'inside', + start: 0, + end: 100 + }, + { + show: true, + height: 20, + type: 'slider', + top: '90%', + xAxisIndex: [0], + start: 0, + end: 100 + } + ], + series: myseries, + }; - var myXiangti = echarts.init(document.getElementById(id), 'infographic'); - myXiangti.setOption(option); - }); - }, + var myXiangti = echarts.init(document.getElementById(id), 'infographic'); + myXiangti.setOption(option); + }); + }, - /** - * 异步获取箱线图表中的数据 - * - * @access public - * @param id 要添加数据的div - * @param url 异步地址 - * @param val 异步时携带的参数 - * @param title 图表标题 - * @return array 返回类型 - */ - fenshuduan: function(id, url, val, title){ - // var colors = ['#5793f3', '#d14a61', '#675bba']; - $.post(url,val).done(function (data) { + /** + * 异步获取箱线图表中的数据 + * + * @access public + * @param id 要添加数据的div + * @param url 异步地址 + * @param val 异步时携带的参数 + * @param title 图表标题 + * @return array 返回类型 + */ + fenshuduan: function(id, url, val, title) { + // var colors = ['#5793f3', '#d14a61', '#675bba']; + $.post(url, val).done(function(data) { - // 设置初始值 - option = { - tooltip: { - show: true, - trigger: 'axis', - }, - legend: { - top: '10%', - // data:data.legend - }, - title: { - text: title, - left: 'center', - }, - grid: { - left: '10%', - top: '20%', - right: '10%', - bottom: '15%' - }, - toolbox: { - id:id, - show:true, - orient:'horizontal', - showTitle:true, - feature: { - restore: { //重置 - show: true - }, - saveAsImage: { //保存文件 - show: true - }, - }, - }, - xAxis: { - type: 'category', - boundaryGap: true, - nameGap: 30, - splitArea: { - show: true - }, - splitLine: { - show: false - }, - data: data.xAxis - }, - yAxis: { - type: 'value', - name: '得分', - splitArea: { - show: false - } - }, - dataZoom:[ - { - type: 'inside', - start: 0, - end: 100 - }, - { - show: true, - height: 20, - type: 'slider', - top: '90%', - xAxisIndex: [0], - start: 0, - end: 100 - } - ], - series: { - data: data.series, - type:'line', - // smooth: true - }, - }; + // 设置初始值 + option = { + tooltip: { + show: true, + trigger: 'axis', + }, + legend: { + top: '10%', + // data:data.legend + }, + title: { + text: title, + left: 'center', + }, + grid: { + left: '10%', + top: '20%', + right: '10%', + bottom: '15%' + }, + toolbox: { + id: id, + show: true, + orient: 'horizontal', + showTitle: true, + feature: { + restore: { //重置 + show: true + }, + saveAsImage: { //保存文件 + show: true + }, + }, + }, + xAxis: { + type: 'category', + boundaryGap: true, + nameGap: 30, + splitArea: { + show: true + }, + splitLine: { + show: false + }, + data: data.xAxis + }, + yAxis: { + type: 'value', + name: '得分', + splitArea: { + show: false + } + }, + dataZoom: [{ + type: 'inside', + start: 0, + end: 100 + }, + { + show: true, + height: 20, + type: 'slider', + top: '90%', + xAxisIndex: [0], + start: 0, + end: 100 + } + ], + series: { + data: data.series, + type: 'line', + // smooth: true + }, + }; - var myFenshuduan = echarts.init(document.getElementById(id), 'infographic'); - myFenshuduan.setOption(option); - }); - }, + var myFenshuduan = echarts.init(document.getElementById(id), 'infographic'); + myFenshuduan.setOption(option); + }); + }, - - formatter:function (param) { - return [ - param.name, - '最低分: ' + param.data[1], - '25%: ' + param.data[2], - '50%: ' + param.data[3], - '75%: ' + param.data[4], - '最高: ' + param.data[5] - ].join('
'); - }, + /** + * 异步获取图表中的数据 + * + * @access public + * @param id 要添加数据的div + * @param url 异步地址 + * @param val 异步时携带的参数 + * @param val 图表标题 + * @return array 返回类型 + */ + zhexian: function(id, url, val, title) { + var myZhexian = echarts.init(document.getElementById(id)); + $.post(url, val).done(function(data) { + myZhexian.setOption({ + title: { + text: title + }, + tooltip: { + trigger: 'axis' + }, + legend: { + data: data.legend + }, + grid: { + left: '3%', + right: '4%', + bottom: '3%', + containLabel: true + }, + toolbox: { + feature: { + saveAsImage: {} + } + }, + xAxis: { + type: 'category', + boundaryGap: false, + data: data.xAxis, + }, + yAxis: { + type: 'value' + }, + series: data.series, + }); + }); + }, - }; - //输出test接口 - exports('myEchart', obj); + /** + * 异步获取图表中的数据 + * + * @access public + * @param id 要添加数据的div + * @param url 异步地址 + * @param val 异步时携带的参数 + * @param val 图表标题 + * @return array 返回类型 + */ + leida: function(url, val, title) { + var myLeiDa = echarts.init(document.getElementById('leida')); + $.post(url, val).done(function(data) { + myLeiDa.setOption({ + title: { + text: '', + }, + tooltip: {}, + legend: { + data: data.legend, + top: 40, + left: 0, + orient: 'vertical', + }, + grid: { + left: '10%', + right: '10%', + top: '30%', + bottom: '10%', + height: 'auto', + }, + toolbox: { + id: 'leida', + show: true, + orient: 'horizontal', + showTitle: true, + feature: { + saveAsImage: { //保存文件 + show: true + }, + }, + }, + radar: { + // shape: 'circle', + name: { + textStyle: { + color: '#fff', + backgroundColor: '#999', + borderRadius: 3, + padding: [3, 5] + } + }, + indicator: data.indicator + }, + series: data.series + }) + }); + }, + + + /** + * 异步获取图表中的数据 + * @access public + * @param id 要添加数据的div + * @param url 异步地址 + * @param val 异步时携带的参数 + * @param val 图表标题 + * @return array 返回类型 + */ + yibiao: function(url, val, title) { + var myYiBiao = echarts.init(document.getElementById('yibiao')); + $.post(url, val).done(function(data) { + myYiBiao.setOption({ + title: { + text: data.title, + }, + tooltip: {}, + toolbox: { + id: 'yibiao', + show: true, + orient: 'horizontal', + showTitle: true, + feature: { + saveAsImage: { //保存文件 + show: true + }, + }, + }, + series: { + name: data.series.name, + type: data.series.type, + data: data.series.data, + detail: { formatter: data.series.data[0].value + '%' } + } + }) + }); + }, + + + // 获取学生成绩报告 + baogao:function(kaohao_id) { + $.ajax({ + url: '/tools/onestudentchengji/baogao', + type: 'POST', + data: { + 'kaohao_id': kaohao_id + }, + success: function(result) { + if (result.val == 1) { + $('#baogao').text(result.baogao); + } else { + layer.msg(result.msg); + } + }, + error: function(result) { + layer.msg('数据扔半道啦。', function() {}); + }, + }); + }, + + + formatter: function(param) { + return [ + param.name, + '最低分: ' + param.data[1], + '25%: ' + param.data[2], + '50%: ' + param.data[3], + '75%: ' + param.data[4], + '最高: ' + param.data[5] + ].join('
'); + }, + + }; + //输出test接口 + exports('myEchart', obj); }); diff --git a/view/create.html b/view/create.html index 8299378b..55ff3182 100755 --- a/view/create.html +++ b/view/create.html @@ -51,29 +51,6 @@ mytable.saveForm("{$list.set.url}", "{$list.set.formpost}", data.field); return false; }); - - // // 监听复选框 - // form.on('checkbox', function(data) { - // checkall = $(data.elem).attr('checkall'); - // parentId = $(data.elem).parents("div").attr('id'); - // fields = $(data.elem).attr('lay-filter'); - // if (checkall == 'p') { - // cjgl.checkboxAll(parentId, data.elem.checked); - // } else if (checkall == 'c') { - // cjgl.checkboxParentList(parentId); - // } - // action = $(data.elem).attr('action'); - // if (action == 'btmOnclick') { - // id = $(data.elem).attr('id'); - // ischecked = data.elem.checked - // btmOnclick(id, ischecked); - // } - // if (fields == 'auth') { - // id = $(data.elem).attr('id'); - // checked = data.elem.checked; - // cjgl.checkedAuth(id, checked); - // } - // }); }); diff --git a/view/list.html b/view/list.html index 42c7ac8e..96e7b985 100755 --- a/view/list.html +++ b/view/list.html @@ -46,9 +46,6 @@