123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140 |
- 'use strict';
- var app = angular.module('app')
- .controller('step1Ctrl', ['$scope', '$http', '$state','main_host','UserService', function($scope, $http, $state,main_host,UserService) {
- var user = UserService.getUserInfo();
- console.log(user);
- $('.mytab>li').eq(0).addClass('on').siblings().removeClass('on');
- $scope.applyParm = {
- "year": "",
- "name": "",
- "status": "",
- "pageIndex": 1,
- "pageSize": 20
- }
- $scope.applyData = {
- "year": "",
- "name": "",
- "status": "",
- "startTime": "",
- "endTime": ""
- }
- $scope.pageData = {}
- $scope.getBmData = function() {
- $http.get(main_host + '/api/EvalStudentBmManages', {
- params: $scope.applyParm
- }).success(function(data) {
- if (data.success) {
- $scope.applylists = data.map.data.list;
- $scope.pageData = {
- "pageIndex": data.map.data.pageIndex,
- "pageSize": data.map.data.pageSize,
- "totalCounts": data.map.data.totalCounts,
- "totalPages": data.map.data.totalPages
- }
- }
- });
- }
- //日期选择
- var start = {
- elem: '#startDate',
- choose: function(datas) {
- end.min = datas;
- end.start = datas;
- $scope.applyData.startTime = datas;
- }
- };
- var end = {
- elem: '#endDate',
- choose: function(datas) {
- start.max = datas;
- $scope.applyData.endTime = datas;
- }
- };
- $scope.startDate = function() {
- laydate(start);
- }
- $scope.endDate = function() {
- laydate(end);
- }
- console.log($scope);
- //添加报名
- $scope.addApply = function() {
- $scope.applyData = {
- "year": "",
- "name": "",
- "status": "",
- "startTime": "",
- "endTime": ""
- }
- var d = dialog({
- title: "添加学生报名",
- content: $('.pop_stdBm'),
- width: 500,
- ok: function() {
- $http.post(main_host + '/api/EvalStudentBmManages', $scope.applyData).success(function(data) {
- if (data.success) {
- $scope.getBmData();
- $scope.$parent.$parent.getBmYear();
- }
- })
- },
- okValue: '确定',
- cancel: function() {},
- cancelValue: '取消'
- }).showModal();
- }
- //修改报名
- $scope.editApply = function() {
- for (k in $scope.applylists) {
- if ($scope.applylists[k].id == $scope.choseArr[0]) {
- $scope.applyData = {
- "year": $scope.applylists[k].year,
- "name": $scope.applylists[k].name,
- "status": $scope.applylists[k].status,
- "startTime": $scope.applylists[k].startTime,
- "endTime": $scope.applylists[k].endTime
- }
- }
- }
- var d = dialog({
- title: "添加学生报名",
- content: $('.pop_stdBm'),
- width: 500,
- ok: function() {
- $http.put(main_host + '/api/EvalStudentBmManages/' + $scope.choseArr[0], $scope.applyParm).success(function(data) {
- if (data.success) {
- $scope.getBmData();
- $scope.$parent.$parent.getBmYear();
- }
- });
- },
- okValue: '确定',
- cancel: function() {},
- cancelValue: '取消'
- }).showModal();
- }
- //删除报名
- $scope.delApply = function() {
- if ($scope.choseArr.length > 0) {
- var d = dialog({
- title: "提示",
- content: "是否确定要删除这条报名信息?",
- ok: function() {
- $http.delete(main_host + '/api/EvalStudentBmManages/' + $scope.choseArr.join(',')).success(function(data) {
- if (data.success) {
- $scope.getBmData();
- $scope.$parent.$parent.getBmYear();
- }
- })
- },
- okValue: "确定",
- cancel: function() {},
- cancelValue: "取消"
- }).showModal();
- }
- }
- $scope.choseArr = [];
- $scope.showEdit = false;
- $scope.multipleChecked = function(x, z) {
- if (x) {
- if ($scope.choseArr.indexOf(z) == -1) {
- $scope.choseArr.push(z);
- }
- } else {
- for (k in $scope.choseArr) {
- if ($scope.choseArr[k] == z) {
- $scope.choseArr.splice(k,1);
- }
- }
- }
- if ($scope.choseArr.length == 1) {
- $scope.showEdit = true;
- } else {
- $scope.showEdit = false;
- }
- }
- //报名状态
- $scope.bmStatus = function(id, status) {
- var statusParm = {
- "status": status
- }
- if (status == '1') {
- statusParm.status = "0"
- } else {
- statusParm.status = "1"
- }
- $http.put(main_host + '/api/EvalStudentBmManageStatus/' + id, statusParm).success(function(data) {
- if (data.success) {
- $scope.getBmData();
- $scope.$parent.$parent.getBmYear();
- }
- })
- }
- //查询
- $scope.queryBmData = function() {
- $scope.getBmData();
- }
- //首页
- $scope.bmFirstPage = function() {
- $scope.applyParm.pageIndex = 1;
- $scope.getBmData();
- }
- //上一页
- $scope.bmPrevPage = function() {
- if ($scope.applyParm.pageIndex > 1) {
- $scope.applyParm.pageIndex--;
- $scope.getBmData();
- }
- }
- //下一页
- $scope.bmNextPage = function() {
- if ($scope.applyParm.pageIndex < $scope.pageData.totalPages) {
- $scope.applyParm.pageIndex++;
- $scope.getBmData();
- }
- }
- //尾页
- $scope.bmLastPage = function() {
- $scope.applyParm.pageIndex = $scope.pageData.totalPages;
- $scope.getBmData();
- }
- }])
- .controller('step2Ctrl', ['$scope', '$http', '$state', function($scope, $http, $state) {
- $('.mytab>li').eq(1).addClass('on').siblings().removeClass('on');
- $scope.commentParm = {
- "pageIndex": 1,
- "pageSize": 20
- }
- $scope.pageData = {}
- $scope.getCommentData = function() {
- $http.get(main_host + '/api/EvalCalibrationInfos', {
- params: $scope.commentParm
- }).success(function(data) {
- console.log(data);
- if (data.success) {
- $scope.commentlists = data.map.data.list;
- $scope.pageData = {
- "pageIndex": data.map.data.pageIndex,
- "pageSize": data.map.data.pageSize,
- "totalCounts": data.map.data.totalCounts,
- "totalPages": data.map.data.totalPages
- }
- }
- })
- }
- //添加数据
- $scope.addCommentData = function() {
- $state.go('app.step9');
- }
- //首页
- $scope.bmFirstPage = function() {
- $scope.commentParm.pageIndex = 1;
- $scope.getCommentData();
- }
- //上一页
- $scope.bmPrevPage = function() {
- if ($scope.commentParm.pageIndex > 1) {
- $scope.commentParm.pageIndex--;
- $scope.getCommentData();
- }
- }
- //下一页
- $scope.bmNextPage = function() {
- if ($scope.commentParm.pageIndex < $scope.pageData.totalPages) {
- $scope.commentParm.pageIndex++;
- $scope.getCommentData();
- }
- }
- //尾页
- $scope.bmLastPage = function() {
- $scope.commentParm.pageIndex = $scope.pageData.totalPages;
- $scope.getCommentData();
- }
- }])
- .controller('step9Ctrl', ['$scope', '$http', '$state', function($scope, $http, $state) {
- $('.mytab>li').eq(1).addClass('on').siblings().removeClass('on');
- $scope.sampleParm = {
- "yearId": "",
- "tryPercent": ""
- }
- $scope.launchParm = {
- "yearId": "",
- "tryPercent": "",
- "total": "",
- "executor": [],
- "time": ""
- }
- $scope.getSampleData = function() {
- $scope.sampleParm.tryPercent = parseFloat($scope.sampleParm.tryPercent / 100);
- $http.get(main_host + '/api/EvalCalibrationStudents', {
- params: $scope.sampleParm
- }).success(function(data) {
- console.log(data);
- if (data.success) {
- $scope.samplelists = data.map.provinces;
- $scope.sampletotle = data.map.total;
- }
- $scope.sampleParm.tryPercent = $scope.sampleParm.tryPercent * 100;
- });
- }
- //选择日期
- $scope.spEndTime = function() {
- laydate({
- elem: '#spEndTime',
- min: laydate.now(),
- choose: function(datas) {
- $scope.launchParm.time = datas;
- }
- });
- }
- //发起试评
- $scope.launchComment = function() {
- $scope.launchParm.yearId = $scope.sampleParm.yearId;
- $scope.launchParm.tryPercent = parseFloat($scope.sampleParm.tryPercent / 100);
- $scope.launchParm.total = $scope.sampletotle;
- console.log($scope.launchParm);
- if($scope.launchParm.yearId == '' || $scope.launchParm.tryPercent == '' || $scope.launchParm.total == 'underfined' || $scope.launchParm.executor.length == 0 || $scope.launchParm.time == ''){
- dialog({
- title:"提示",
- content:"请完善试评信息后再次发起试评",
- ok:function(){},
- okValue:"确定",
- cancel:function(){},
- cancelValue:"取消"
- }).showModal();
- }else{
- dialog({
- title:"提示",
- content:"是否发起试评",
- ok:function(){
- $http.post(main_host + '/api/EvalCalibrationInfos', $scope.launchParm).success(function(data) {
- if (data.success) {
- console.log(data);
- if (data.map.code == 1) {
- var d = dialog({
- title: "提示",
- content: data.map.msg,
- width: 200,
- height: 40,
- ok: function() {
- $state.go('app.step2');
- },
- okValue: "确定"
- }).showModal();
- }
- }
- })
- },
- okValue:"确定",
- cancel:function(){},
- cancelValue:"取消"
- }).showModal();
- }
- }
- //选择定标专家
- $scope.selectExpert = function() {
- $scope.expertname = [];
- var expertUserIdArr = [];
- var expertNameArr = [];
- var d = dialog({
- title: '选择专家',
- content: '',
- width: 500,
- ok: function() {
- var arr = [];
- $.each(expertUserIdArr, function(i, n) {
- arr.push(n);
- if (i % 2 == 1) {
- $scope.launchParm.executor.push(arr);
- arr = [];
- }
- });
- $(this).parent().html('<ul>' + $('#showExpert .group').html() + '</ul>');
- },
- okValue: '确定',
- cancel: function() {},
- cancelValue: '取消'
- }).showModal();
- $http.get(main_host + '/api/EvalCalibrationExecutors').success(function(data) {
- if (data.success) {
- $scope.dbexpertlists = data.map.data;
- d.content($('#showExpert'));
- }
- });
- $('#showExpert .list').off('click').on('click', 'label', function() {
- if (expertUserIdArr.length < 6) {
- var ename = $(this).text();
- var euserid = $(this).data('userid');
- $(this).parent().remove();
- expertUserIdArr.push(euserid);
- expertNameArr.push(ename);
- if ((expertUserIdArr.length) % 2 == 0) {
- $scope.$apply(function() {
- $scope.expertname.push(expertNameArr.join(' '));
- });
- expertNameArr = [];
- }
- }
- });
- }
- }])
- .controller('step3Ctrl', ['$scope', '$http', '$state', function($scope, $http, $state) {
- $('.mytab>li').eq(2).addClass('on').siblings().removeClass('on');
- $scope.calibrationParm = {
- "averageScoreStart": "",
- "averageScoreEnd": "",
- "executorName": "",
- "simpleType": "",
- "studentName": "",
- "pageIndex": 1,
- "pageSize": 20
- }
- $scope.pageData = {}
- $scope.getCalibrationData = function() {
- $http.get(main_host + '/api/EvalCalibrationSimples', {
- params: $scope.calibrationParm
- }).success(function(data) {
- console.log(data);
- if (data.success) {
- $scope.calibrationlists = data.map.data.list;
- $scope.pageData = {
- "pageIndex": data.map.data.pageIndex,
- "pageSize": data.map.data.pageSize,
- "totalCounts": data.map.data.totalCounts,
- "totalPages": data.map.data.totalPages
- }
- }
- })
- }
- //查询
- $scope.queryCalibration = function() {
- $scope.getCalibrationData();
- }
- //设置样本类型
- $scope.simpleParm = {
- "simpleType": ""
- }
- $scope.setSimplesType = function(id) {
- function putSimpleType(){
- $http.post(main_host + '/api/EvalCalibrationSimples/'+id, $scope.simpleParm).success(function(data) {
- if (data.success) {
- $scope.getCalibrationData();
- }
- });
- }
- dialog({
- title:"设置样本类型",
- content:$('.pop_simplestype'),
- ok:function(){
- putSimpleType();
- },
- okValue:"确定",
- cancel:function(){
- $scope.simpleParm.simpleType = "";
- putSimpleType();
- },
- cancelValue:"重置"
- }).showModal();
- }
- //选择标本类型
- $scope.selectSimpleType = function(type,row){
- $scope.simpleChecked = row;
- $scope.simpleParm.simpleType = type;
- }
- //首页
- $scope.bmFirstPage = function() {
- $scope.calibrationParm.pageIndex = 1;
- $scope.getCalibrationData();
- }
- //上一页
- $scope.bmPrevPage = function() {
- if ($scope.calibrationParm.pageIndex > 1) {
- $scope.calibrationParm.pageIndex--;
- $scope.getCalibrationData();
- }
- }
- //下一页
- $scope.bmNextPage = function() {
- if ($scope.calibrationParm.pageIndex < $scope.pageData.totalPages) {
- $scope.calibrationParm.pageIndex++;
- $scope.getCalibrationData();
- }
- }
- //尾页
- $scope.bmLastPage = function() {
- $scope.calibrationParm.pageIndex = $scope.pageData.totalPages;
- $scope.getCalibrationData();
- }
- }])
- .controller('step4Ctrl', ['$scope', '$http', '$state', function($scope, $http, $state) {
- $('.mytab>li').eq(3).addClass('on').siblings().removeClass('on');
- $scope.evaluationsParm = {
- "pageIndex": 1,
- "pageSize": 20
- }
- $scope.pageData = {}
- //获取历史分组评审
- $scope.getEvaluationsData = function() {
- $http.get(main_host + '/api/EvalRealEvaluations', {
- params: $scope.evaluationsParm
- }).success(function(data) {
- console.log(data);
- if (data.success) {
- $scope.evaluationslists = data.map.data.list;
- $scope.pageData = {
- "pageIndex": data.map.data.pageIndex,
- "pageSize": data.map.data.pageSize,
- "totalCounts": data.map.data.totalCounts,
- "totalPages": data.map.data.totalPages
- }
- }
- });
- }
-
- //首页
- $scope.bmFirstPage = function() {
- $scope.evaluationsParm.pageIndex = 1;
- $scope.getEvaluationsData();
- }
- //上一页
- $scope.bmPrevPage = function() {
- if ($scope.evaluationsParm.pageIndex > 1) {
- $scope.evaluationsParm.pageIndex--;
- $scope.getEvaluationsData();
- }
- }
- //下一页
- $scope.bmNextPage = function() {
- if ($scope.evaluationsParm.pageIndex < $scope.pageData.totalPages) {
- $scope.evaluationsParm.pageIndex++;
- $scope.getEvaluationsData();
- }
- }
- //尾页
- $scope.bmLastPage = function() {
- $scope.evaluationsParm.pageIndex = $scope.pageData.totalPages;
- $scope.getEvaluationsData();
- }
- //点击添加
- $scope.addEvaluations = function() {
- $state.go('app.step10');
- }
- }])
- .controller('step10Ctrl', ['$scope', '$http', '$state', function($scope, $http, $state) {
- $('.mytab>li').eq(3).addClass('on').siblings().removeClass('on');
- $scope.areaParm = {
- "areas": [],
- "pageIndex": 1,
- "pageSize": 20
- }
- $scope.launchParm = {
- "yearId": "",
- "areas": [],
- "executors": [],
- "time": ""
- }
- $scope.pageData = {}
- $scope.getAreaStdData = function() {
- $http.get(main_host + '/api/EvalAreaStudents', {
- params: $scope.areaParm
- }).success(function(data) {
- console.log(data);
- if (data.success) {
- $scope.areastdlists = data.map.data.list;
- $scope.pageData = {
- "pageIndex": data.map.data.pageIndex,
- "pageSize": data.map.data.pageSize,
- "totalCounts": data.map.data.totalCounts,
- "totalPages": data.map.data.totalPages
- }
- }
- });
- }
- //发起分组评审
- $scope.launchEvaluation = function() {
- console.log('---------- controller.js -------------');
- $scope.launchParm.areas = $scope.areaParm.areas;
- console.log($scope.launchParm)
- $http.post(main_host + '/api/EvalRealEvaluation', $scope.launchParm).success(function(data) {
- if (data.success) {
- console.log(data);
- }
- });
- }
- //选择日期
- $scope.psEndTime = function() {
- laydate({
- elem: '#psEndTime',
- min: laydate.now(),
- choose: function(datas) {
- $scope.launchParm.time = datas;
- }
- });
- }
- //查询学生数量
- $scope.queryAreaStdData = function(){
- $scope.getAreaStdData();
- }
- //首页
- $scope.bmFirstPage = function() {
- $scope.areaParm.pageIndex = 1;
- $scope.getAreaStdData();
- }
- //上一页
- $scope.bmPrevPage = function() {
- if ($scope.areaParm.pageIndex > 1) {
- $scope.areaParm.pageIndex--;
- $scope.getAreaStdData();
- }
- }
- //下一页
- $scope.bmNextPage = function() {
- if ($scope.areaParm.pageIndex < $scope.pageData.totalPages) {
- $scope.areaParm.pageIndex++;
- $scope.getAreaStdData();
- }
- }
- //尾页
- $scope.bmLastPage = function() {
- $scope.areaParm.pageIndex = $scope.pageData.totalPages;
- $scope.getAreaStdData();
- }
- //选择定标专家
- $scope.selectExpert = function() {
- $scope.expertname = [];
- var expertUserIdArr = [];
- var expertNameArr = [];
- var d = dialog({
- title: '选择专家',
- content: '',
- width: 500,
- ok: function() {
- var arr = [];
- $.each(expertUserIdArr, function(i, n) {
- arr.push(n);
- if (i % 2 == 1) {
- $scope.launchParm.executors.push(arr);
- arr = [];
- }
- });
- $(this).parent().html('<ul>' + $('#showExpert .group').html() + '</ul>');
- },
- okValue: '确定',
- cancel: function() {},
- cancelValue: '取消'
- }).showModal();
- $http.get(main_host + '/api/EvalReviewTeachers').success(function(data) {
- if (data.success) {
- $scope.dbexpertlists = data.map.data;
- d.content($('#showExpert'));
- }
- });
- $('#showExpert .list').off('click').on('click', 'label', function() {
- if (expertUserIdArr.length < 6) {
- var ename = $(this).text();
- var euserid = $(this).data('userid');
- $(this).parent().remove();
- expertUserIdArr.push(euserid);
- expertNameArr.push(ename);
- if ((expertUserIdArr.length) % 2 == 0) {
- $scope.$apply(function() {
- $scope.expertname.push(expertNameArr.join(' '));
- });
- expertNameArr = [];
- }
- }
- });
- }
- //选择高考区域
- $scope.selectExamArea = function() {
- getProvData();
- var provArr = [],cityArr = [], distArr = [];
- function areaPopBox(tit,fn){
- var d = dialog({
- title: tit,
- content: $('#showExamArea'),
- width: 500,
- ok:function(){
- if(fn){
- fn();
- }
- },
- okValue: '确定'
- }).showModal();
- }
- function getProvData() {
- $http.get(main_host + '/api/EvalStudentFzpsAreas').success(function(data) {
- if (data.success) {
- $scope.schoolprovs = data.map.data;
- areaPopBox('选择省份',function(){
- if(provArr.length > 1){
- for(k in provArr){
- $scope.areaParm.areas.push({
- "province":provArr[k],
- "city":"",
- "dist":""
- })
- }
- }else{
- getCityData(provArr[0]);
- }
- });
- }
- });
- }
- function getCityData(prov){
- $http.get(main_host + '/api/EvalStudentFzpsAreas/'+prov).success(function(data){
- if(data.success){
- $scope.schoolcity = data.map.data;
- areaPopBox('选择城市',function(){
- if(cityArr.length > 1){
- for(k in cityArr){
- $scope.areaParm.areas.push({
- "province":provArr[0],
- "city":cityArr[k],
- "dist":""
- })
- }
- }else{
- getDistData(cityArr[0]);
- }
- });
- }
- })
- }
- function getDistData(city){
- $http.get(main_host + '/api/EvalStudentFzpsAreas/'+city).success(function(data){
- if(data.success){
- $scope.schoolcity = data.map.data;
- areaPopBox('选择地区',function(){
- if(distArr.length > 1){
- for(k in distArr){
- $scope.areaParm.areas.push({
- "province":provArr[0],
- "city":cityArr[0],
- "dist":distArr[k]
- })
- }
- }else{
- $scope.areaParm.areas.push({
- "province":provArr[0],
- "city":cityArr[0],
- "dist":distArr[0]
- })
- }
- });
- }
- })
- }
- $('#showExamArea ul.prov').off('click').on('click','li',function(){
- if(provArr.indexOf($(this).text()) == -1){
- $(this).addClass('on');
- provArr.push($(this).text());
- }else{
- for(k in provArr){
- if(provArr[k] == $(this).text()){
- $(this).removeAttr('class');
- provArr.splice(k,1);
- }
- }
- }
- });
- $('#showExamArea ul.city').off('click').on('click','li',function(){
- if(cityArr.indexOf($(this).text()) == -1){
- $(this).addClass('on');
- cityArr.push($(this).text());
- }else{
- for(k in cityArr){
- if(cityArr[k] == $(this).text()){
- $(this).removeAttr('class');
- cityArr.splice(k,1);
- }
- }
- }
- });
- $('#showExamArea ul.dist').off('click').on('click','li',function(){
- if(distArr.indexOf($(this).text()) == -1){
- $(this).addClass('on');
- distArr.push($(this).text());
- }else{
- for(k in distArr){
- if(distArr[k] == $(this).text()){
- $(this).removeAttr('class');
- distArr.splice(k,1);
- }
- }
- }
- });
- }
- }])
- .controller('step5Ctrl', ['$scope', '$http', '$state', function($scope, $http, $state) {
- $('.mytab>li').eq(4).addClass('on').siblings().removeClass('on');
- //获取预发布数据
- $scope.prepublishParm = {
- "pageIndex": 1,
- "pageSize": 20
- }
- $scope.pageData = {}
- $scope.getPrePublishData = function() {
- $http.get(main_host + '/api/EvalPrepublishedStudents', {
- params: $scope.prepublishParm
- }).success(function(data) {
- if (data.success) {
- $scope.prepublishlists = data.map.data.list;
- console.log(data.map.data);
- $scope.pageData = {
- "pageIndex": data.map.data.pageIndex,
- "pageSize": data.map.data.pageSize,
- "totalCounts": data.map.data.totalCounts,
- "totalPages": data.map.data.totalPages
- }
- }
- });
- }
- $scope.choseArr = [];
- $scope.multipleChecked = function(x, z) {
- if (x) {
- if ($scope.choseArr.indexOf(z) == -1) {
- $scope.choseArr.push(z);
- }
- } else {
- for (k in $scope.choseArr) {
- if ($scope.choseArr[k] == z) {
- $scope.choseArr.splice(k,1);
- }
- }
- }
- }
- $scope.addPrePublish = function() {
- $state.go('app.step11');
- }
- $scope.delPrePublish = function() {
- $http.delete(main_host + '/api/EvalPrePublishs/'+$scope.choseArr.join(',')).success(function(data){
- if(data.success){
- $scope.getPrePublishData()
- }
- })
- }
- //首页
- $scope.bmFirstPage = function() {
- $scope.areaParm.pageIndex = 1;
- $scope.getAreaStdData();
- }
- //上一页
- $scope.bmPrevPage = function() {
- if ($scope.areaParm.pageIndex > 1) {
- $scope.areaParm.pageIndex--;
- $scope.getAreaStdData();
- }
- }
- //下一页
- $scope.bmNextPage = function() {
- if ($scope.areaParm.pageIndex < $scope.pageData.totalPages) {
- $scope.areaParm.pageIndex++;
- $scope.getAreaStdData();
- }
- }
- //尾页
- $scope.bmLastPage = function() {
- $scope.areaParm.pageIndex = $scope.pageData.totalPages;
- $scope.getAreaStdData();
- }
- }])
- .controller('step11Ctrl', ['$scope', '$http', '$state', function($scope, $http, $state) {
- $('.mytab>li').eq(4).addClass('on').siblings().removeClass('on');
- $scope.prepublishstdParm = {
- "province":"",
- "sex":"",
- "wenliType":"",
- "pageIndex":1,
- "pageSize":20
- }
- //获取待预发布考生
- $scope.pageData = {}
- $scope.getPrePublishStdData = function(){
- $http.get(main_host + '/api/EvalPrePublishStudents',{params:$scope.prepublishstdParm}).success(function(data){
- if(data.success){
- $scope.prepublishstdlists = data.map.data.list;
- $scope.pageData = {
- "pageIndex": data.map.data.pageIndex,
- "pageSize": data.map.data.pageSize,
- "totalCounts": data.map.data.totalCounts,
- "totalPages": data.map.data.totalPages
- }
- }
- })
- }
- //查询学生数据
- $scope.queryPrePublishStd = function(){
- $scope.getPrePublishStdData();
- }
- $scope.choseArr = [];
- $scope.multipleChecked = function(x, z) {
- if (x) {
- if ($scope.choseArr.indexOf(z) == -1) {
- $scope.choseArr.push(z);
- }
- } else {
- for (k in $scope.choseArr) {
- if ($scope.choseArr[k] == z) {
- $scope.choseArr.splice(k,1);
- }
- }
- }
- }
- //发起初审
- $scope.launchpreParm = {
- "studentIds":$scope.choseArr
- }
- $scope.launchPrePublish = function(){
- $http.post(main_host + '/api/EvalPrePublishs',$scope.launchpreParm).success(function(data){
- if(data.success){
- console.log(data);
- }
- });
- }
- //首页
- $scope.bmFirstPage = function() {
- $scope.areaParm.pageIndex = 1;
- $scope.getAreaStdData();
- }
- //上一页
- $scope.bmPrevPage = function() {
- if ($scope.areaParm.pageIndex > 1) {
- $scope.areaParm.pageIndex--;
- $scope.getAreaStdData();
- }
- }
- //下一页
- $scope.bmNextPage = function() {
- if ($scope.areaParm.pageIndex < $scope.pageData.totalPages) {
- $scope.areaParm.pageIndex++;
- $scope.getAreaStdData();
- }
- }
- //尾页
- $scope.bmLastPage = function() {
- $scope.areaParm.pageIndex = $scope.pageData.totalPages;
- $scope.getAreaStdData();
- }
- }])
- .controller('step6Ctrl', ['$scope', '$http', '$state', function($scope, $http, $state) {
- $('.mytab>li').eq(5).addClass('on').siblings().removeClass('on');
- $scope.releaseParm = {
- "province": "",
- "name": "",
- "status": "",
- "pageIndex": 1,
- "pageSize": 20
- }
- //获取已经预发布的考生
- $scope.pageData = {}
- $scope.getReleaseStdData = function() {
- $http.get(main_host+'/api/EvalPrepublishedStudents',{params:$scope.releaseParm}).success(function(data){
- if(data.success){
- console.log(data);
- $scope.releaselists = data.map.data.list;
- $scope.pageData = {
- "pageIndex": data.map.data.pageIndex,
- "pageSize": data.map.data.pageSize,
- "totalCounts": data.map.data.totalCounts,
- "totalPages": data.map.data.totalPages
- }
- }
- })
- }
- //获取预发布的考生所在高中区域
- $scope.getPrePublishProvinces = function(){
- $http.get(main_host+'/api/EvalPrepublishedStudentAreas').success(function(data){
- console.log(data);
- if(data.success){
- $scope.provinces = data.map.provinces;
- }
- })
- }
- //查询预发布的考生
- $scope.queryReleaseStd = function(){
- $scope.getReleaseStdData();
- }
- $scope.publishParm = {
- "students":$scope.choseArr,
- "feedbackTime":""
- }
- $scope.choseArr = [];
- $scope.multipleChecked = function(x, z) {
- if (x) {
- if ($scope.choseArr.indexOf(z) == -1) {
- $scope.choseArr.push(z);
- }
- } else {
- for (k in $scope.choseArr) {
- if ($scope.choseArr[k] == z) {
- $scope.choseArr.splice(k,1);
- }
- }
- }
- }
- $scope.zsEndTime = function() {
- laydate({
- elem: '#zsEndTime',
- min: laydate.now(),
- choose: function(datas) {
- $scope.publishParm.feedbackTime = datas;
- }
- });
- }
-
- //正式发布
- $scope.releasePublish = function(){
- $http.post(main_host + '/api/EvalPublishStudents',$scope.publishParm).success(function(data){
- if(data.success){
- console.log(data);
- }
- })
- }
- }])
- .controller('step7Ctrl', ['$scope', '$http', '$state', function($scope, $http, $state) {
- $('.mytab>li').eq(6).addClass('on').siblings().removeClass('on');
- $scope.abilitytestParm = {
- "province": "",
- "name": "",
- "accepted": "",
- "pageIndex": 1,
- "pageSize": 20
- }
- $scope.pageData = {}
- //获取能力测试数据
- $scope.getAbilityTestData = function() {
- $http.get(main_host + '/api/EvalAbilityTestStudents', {
- params: $scope.abilitytestParm
- }).success(function(data) {
- if (data.success) {
- console.log(data);
- $scope.abilitytestlists = data.map.data.list;
- $scope.pageData = {
- "pageIndex": data.map.data.pageIndex,
- "pageSize": data.map.data.pageSize,
- "totalCounts": data.map.data.totalCounts,
- "totalPages": data.map.data.totalPages
- }
- }
- });
- }
- //查询
- $scope.queryAbilityTestData = function() {
- console.log($scope.abilitytestParm);
- $scope.getAbilityTestData();
- }
- //导出
- $scope.exportAbilityTestData = function(){
- $http.get(main_host + '/api/EvalAbilityStudentExports', {
- params: $scope.abilitytestParm
- }).success(function(data) {});
- }
- //首页
- $scope.bmFirstPage = function() {
- $scope.allstdParm.pageIndex = 1;
- $scope.getAbilityTestData();
- }
- //上一页
- $scope.bmPrevPage = function() {
- if ($scope.allstdParm.pageIndex > 1) {
- $scope.allstdParm.pageIndex--;
- $scope.getAbilityTestData();
- }
- }
- //下一页
- $scope.bmNextPage = function() {
- if ($scope.allstdParm.pageIndex < $scope.pageData.totalPages) {
- $scope.allstdParm.pageIndex++;
- $scope.getAbilityTestData();
- }
- }
- //尾页
- $scope.bmLastPage = function() {
- $scope.allstdParm.pageIndex = $scope.pageData.totalPages;
- $scope.getAbilityTestData();
- }
- }])
- .controller('step8Ctrl', ['$scope', '$http', '$state', '$rootScope', function($scope, $http, $state, $rootScope) {
- $('.mytab>li').eq(7).addClass('on').siblings().removeClass('on');
- $scope.allstdParm = {
- "province": "",
- "name": "",
- "wenliType": "",
- "studentType": "",
- "sex": "",
- "pageIndex": 1,
- "pageSize": 20
- }
- $scope.pageData = {}
- //获取所有学生数据
- $scope.getAllStdData = function() {
- $http.get(main_host + '/api/EvalAllStudents',{
- params: $scope.allstdParm
- }).success(function(data) {
- console.log(data);
- if (data.success) {
- $scope.allstdlists = data.map.data.list;
- $scope.pageData = {
- "pageIndex": data.map.data.pageIndex,
- "pageSize": data.map.data.pageSize,
- "totalCounts": data.map.data.totalCounts,
- "totalPages": data.map.data.totalPages
- }
- }
- })
- }
- $scope.getAllProvList = function() {
- $http.get(main_host + '/api/EvalStudentAreas').success(function(data) {
- if (data.success) {
- $scope.stdprovlists = data.map.data;
- }
- });
- }
- //导出数据
- $scope.exportsStdData = function() {
- $http.get(main_host + '/api/EvalStatisticsStudentExports', {
- params: $scope.allstdParm
- }).success(function(data) {
- if (data.success) {
- console.log(EvalStatisticsStudentExports)
- }
- })
- }
- //查询
- $scope.queryAllStdData = function() {
- console.log();
- $scope.getAllStdData();
- }
- //首页
- $scope.bmFirstPage = function() {
- $scope.allstdParm.pageIndex = 1;
- $scope.getAllStdData();
- }
- //上一页
- $scope.bmPrevPage = function() {
- if ($scope.allstdParm.pageIndex > 1) {
- $scope.allstdParm.pageIndex--;
- $scope.getAllStdData();
- }
- }
- //下一页
- $scope.bmNextPage = function() {
- if ($scope.allstdParm.pageIndex < $scope.pageData.totalPages) {
- $scope.allstdParm.pageIndex++;
- $scope.getAllStdData();
- }
- }
- //尾页
- $scope.bmLastPage = function() {
- $scope.allstdParm.pageIndex = $scope.pageData.totalPages;
- $scope.getAllStdData();
- }
- $scope.lookStdDetail = function(id) {
- console.log($rootScope.$state.go('detail'));
- $state.go('detail');
- }
- }]);
|