1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876 |
- '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": "",
- "publishTime": ""
- }
- $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;
- publishDate.min = datas;
- publishDate.start = datas;
- $scope.applyData.endTime = datas;
- }
- };
- var publishDate = {
- elem: '#publishDate',
- choose: function(datas) {
- $scope.applyData.publishTime = datas;
- }
- };
- $scope.startDate = function() {
- laydate(start);
- }
- $scope.endDate = function() {
- laydate(end);
- }
- $scope.publishDate = function() {
- laydate(publishDate);
- }
- console.log($scope);
- //添加报名
- $scope.addApply = function() {
- $scope.applyData = {
- "year": "",
- "name": "",
- "status": "",
- "startTime": "",
- "endTime": "",
- "publishTime": ""
- }
- 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,
- "publishTime": $scope.applylists[k].publishTime
- }
- }
- }
- 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() {
- angular.element( document.querySelector( '#showExpertSP' ) ).remove();
- $state.go('app.step9', {}, { reload: true });
- }
- //首页
- $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',function($scope, $http, $state,$rootScope, toaster,$window) {
- $('.mytab>li').eq(1).addClass('on').siblings().removeClass('on');
- $scope.sampleParm = {
- "yearId": "",
- "tryPercent": ""
- }
- $scope.launchParm = {
- "yearId": "",
- "tryPercent": "",
- "total": "",
- "executor": [],
- "time": ""
- }
- $scope.expertname = [];
- $scope.pageData = {};
- $scope.areaParm = {areas: []};
- $scope.pingfenPages = [];
- angular.forEach(totalPingfenModules, function(item){
- $scope.pingfenPages.push({page:item, checked:false, available:true});
- });
- $scope.selectedExpertsAndPages = [];
- $scope.selectAllProvinces = true;
- $scope.selectAllProvincesChanged = function(){
- angular.forEach($scope.samplelists, function(item){
- item.checked = $scope.selectAllProvinces;
- });
- }
- $scope.getSampleData = function() {
- var params = {'tryPercent':parseFloat($scope.sampleParm.tryPercent / 100),'yearId':$scope.sampleParm.yearId};
- $http.get(main_host + '/api/EvalCalibrationStudents', {
- 'params': params
- }).success(function(data) {
- console.log(data);
- if (data.success) {
- $scope.samplelists = data.map.provinces;
- $scope.selectAllProvinces = true;
- angular.forEach($scope.samplelists, function(item){
- item.checked = true;
- })
- $scope.sampletotle = data.map.total;
- }
- });
- }
- //选择日期
- $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 = 0;
- $scope.launchParm.provinceIds = [];
- $scope.launchParm.provinceNames = '';
- angular.forEach($scope.samplelists, function(item){
- if(item.checked){
- $scope.launchParm.provinceIds.push(item.province_id);
- $scope.launchParm.total += item.person;
- $scope.launchParm.provinceNames += item.name + ";"
- }
- });
- var availablePages = [];
- angular.forEach($scope.pingfenPages, function(item){
- if(item.available){
- availablePages.push(item.page);
- }
- });
- if(availablePages.length > 0){
- toaster.pop('error','提示','尚有未分配的评分页面。');
- $scope.selectExpert();
- return;
- }
- $scope.launchParm.executors = [];
- angular.forEach($scope.selectedExpertsAndPages, function(item){
- for(var i = 0; i < item.expertUserIdArr.length; i++){
- $scope.launchParm.executors.push(item.expertUserIdArr[i]);
- }
- for(var i = 0; i < item.pages.length; i++){
- $scope.launchParm.executors.push(item.pages[i]);
- }
- $scope.launchParm.executors.push(0);
- })
- console.log($scope.launchParm.executors);
- if($scope.launchParm.yearId == '' || $scope.launchParm.tryPercent == '' || $scope.launchParm.total == 'underfined' || $scope.launchParm.executors.length == 0 || $scope.launchParm.time == ''){
- dialog({
- title:"提示",
- content:"请完善试评信息后再次发起试评",
- ok:function(){},
- okValue:"确定",
- cancel:function(){},
- cancelValue:"取消"
- }).showModal();
- }else{
- dialog({
- title:"提示",
- content:"是否发起试评",
- ok:function(){
- $rootScope.loading = $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();
- }
- $scope.expertname = [];
- $scope.expertUserIdArr = [];
- $scope.expertNameArr = [];
- $scope.selectAllPages = false;
- $scope.pingfenPages = [{page:1, checked:false, available:true},{page:2, checked:false, available:true},{page:3, checked:false, available:true},{page:4, checked:false, available:true},{page:5, checked:false, available:true},{page:6, checked:false, available:true},
- {page:7, checked:false, available:true},{page:8, checked:false, available:true},{page:9, checked:false, available:true},{page:10, checked:false, available:true},{page:11, checked:false, available:true},{page:12, checked:false, available:true}];
- }
- })
- },
- okValue:"确定",
- cancel:function(){},
- cancelValue:"取消"
- }).showModal();
- }
- }
- $scope.selectExpertOk = function (){
- var json = {'expertname': $scope.expertname, 'expertUserIdArr': $scope.expertUserIdArr, 'expertNameArr': $scope.expertNameArr};
- $scope.selectedExpertsAndPages.push(json);
- }
- //选择定标专家
- $scope.selectExpert = function() {
- $scope.expertname = [];
- // var expertUserIdArr = [];
- // var expertNameArr = [];
- $scope.expertname = [];
- $scope.expertUserIdArr = [];
- $scope.expertNameArr = [];
- $scope.selectAllPages = false;
- var availablePages = [];
- angular.forEach($scope.pingfenPages, function(item){
- if(item.available){
- availablePages.push(item.page);
- }
- });
- if(availablePages.length > 0){
- $rootScope.loading = $http.get(main_host + '/api/EvalCalibrationExecutors').success(function(data) {
- if (data.success) {
- $scope.dbexpertlists = data.map.data;
- var d = dialog({
- title: '选择专家',
- content: $('#showExpertSP'),
- width: 500,
- ok: function() {
- if($scope.expertUserIdArr.length == eval_exector_num){
- var pages = [];
- angular.forEach($scope.pingfenPages, function(item){
- if(item.checked && item.available){
- pages.push(item.page);
- item.available = false;
- }
- });
- if(pages.length > 0){
- $scope.$apply(function() {
- var json = {'expertname': $scope.expertname, 'expertUserIdArr': $scope.expertUserIdArr, 'expertNameArr': $scope.expertNameArr, 'pages': pages, 'id': pages[0]};
- $scope.selectedExpertsAndPages.push(json);
- });
- }else{
- toaster.pop('error','提示','未分配评分页面。');
- }
- }else{
- toaster.pop('error','提示','请选择'+ eval_exector_num + '位专家。');
- }
- },
- okValue: '确定',
- cancel: function() {},
- cancelValue: '取消'
- }).showModal();
- }
- });
- }else{
- toaster.pop('error','提示','没有可以分配的评分页面。');
- }
- }
- $scope.clickExpertName = function(item){
- if($scope.expertUserIdArr.length < eval_exector_num){
- var exists = false;
- angular.forEach($scope.expertUserIdArr, function(userId){
- if(userId == item.userId){
- exists = true;
- }
- })
- if(!exists){
- $scope.expertUserIdArr.push(item.userId);
- $scope.expertNameArr.push(item.name);
- $scope.expertname = [];
- $scope.expertname.push($scope.expertNameArr.join(' '));
- }
- }
- console.log($scope.expertUserIdArr);
- }
- $scope.selectAllPagesChanged = function(){
- angular.forEach($scope.pingfenPages, function(item){
- if(item.available){
- item.checked = $scope.selectAllPages;
- }
- });
- }
- $scope.deleteSelected = function(deleteItem){
- for(var i=0; i<$scope.selectedExpertsAndPages.length; i++){
- if(deleteItem.id == $scope.selectedExpertsAndPages[i].id){
- $scope.selectedExpertsAndPages.splice(i,1);
- break;
- }
- }
- angular.forEach($scope.pingfenPages, function(page){
- angular.forEach(deleteItem.pages, function(spage){
- if(spage == page.page){
- page.available = true;
- page.checked = false;
- }
- });
- });
-
- }
- $scope.clearAllSel = function() {
- console.log('clearAllSel');
- $scope.expertname = [];
- $scope.expertUserIdArr = [];
- $scope.expertNameArr = [];
- console.log($scope.expertname);
- $scope.launchParm.executors = [];
- // $("#showExpert .list li").each(function(index,element){
- // $(element).show();
- // });
- }
-
- })
- .controller('step3Ctrl', function($scope, $http, $state,$rootScope,toaster) {
- $('.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.saveSimplesType = function(id){
- $http.post(main_host + '/api/EvalCalibrationSimples/'+id + '?simpleType=' + $scope.simpleParm.simpleType).success(function(data) {
- if (data.success) {
- toaster.pop('success','提示','操作成功!');
- $scope.getCalibrationData();
- }
- });
- }
-
- $scope.setSimplesType = function(id,simpleType) {
- if(simpleType){
- $scope.simpleChecked = simpleType.charCodeAt(0) - 65;
- }else{
- $scope.simpleChecked = -1;
- }
- $scope.simpleParm.simpleType = simpleType;
- dialog({
- title:"设置样本类型",
- content:$('#popSimplestype'),
- ok:function(){
- $scope.saveSimplesType(id);
- },
- okValue:"确定",
- cancel:function(){
- },
- cancelValue:"关闭"
- }).showModal();
- }
- //选择标本类型
- $scope.selectSimpleType = function(type,row){
- $scope.simpleChecked = row;
- $scope.simpleParm.simpleType = type;
- }
- //重置标本
- $scope.resetSimplesType = function(id) {
- dialog({
- title:"提示",
- content:'是否确定重置标本?',
- ok:function(){
- $scope.simpleParm.simpleType = "";
- $scope.saveSimplesType(id);
- },
- okValue:"确定",
- cancel:function(){
- },
- cancelValue:"取消"
- }).showModal();
- }
- //重置试评打分
- $scope.resetShipingMark = function(id) {
- dialog({
- title:"提示",
- content:'是否确定重置试评打分(重置后将删除之前的打分数据)?',
- ok:function(){
- $rootScope.loading = $http.post(main_host+'/api/ResetShipingMark/' + id).success(function(data){
- if(data.success){
- toaster.pop('success','提示','重置试评打分成功!');
- $scope.getCalibrationData();
- }
- });
- },
- okValue:"确定",
- cancel:function(){
- },
- cancelValue:"取消"
- }).showModal();
- }
-
- //显示打分详情
- $scope.lookCalibrationDetail = function(id) {
- if(document.querySelectorAll( '#popCalibrationDetail_picketage_table' ).length > 1){
- var elementList = document.querySelectorAll( '#popCalibrationDetail_picketage_table');
- angular.element(elementList[1]).remove();
- }
- $rootScope.loading = $http.get(main_host + '/api/GetEvalMarkDetails/'+id).success(function(data) {
- if (data.success) {
- $scope.marklists = data.map.data;
- console.log($scope.marklists);
- dialog({
- title:"打分详情",
- content:$('#popCalibrationDetail_picketage_table'),
- ok:function(){
- var urlHref = $state.href('markstep.step1',{'taskId':'view-' + id,'module':1});
- window.open(urlHref);
- return false;
- },
- okValue: "查看评分页面",
- cancel: function() {},
- cancelValue: "关闭"
- }).showModal();
- }
- });
- }
- //首页
- $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() {
- angular.element( document.querySelector( '#showExpertFZPS' ) ).remove();
- $state.go('app.step10');
- }
- //点击删除
- $scope.delEvaluation = function(evalId) {
- var d = dialog({
- title: "提示",
- content: "是否确定要删除这条分组评审信息?(如果已经开始评审,则不能删除)",
- ok: function() {
- $http.post(main_host + '/api/DelEvalRealEvaluation/' + evalId).success(function(data) {
- if (data.success) {
- $scope.getEvaluationsData();
- }
- })
- },
- okValue: "确定",
- cancel: function() {},
- cancelValue: "取消"
- }).showModal();
- }
- }])
- // 正式评审任务
- .controller('step10Ctrl', function($scope, $http, $state,$rootScope,toaster) {
- $('.mytab>li').eq(3).addClass('on').siblings().removeClass('on');
- $scope.areaParm = {
- "areas": [],
- "pageIndex": 1,
- "pageSize": 20
- }
- $scope.launchParm = {
- "yearId": "",
- "executors": [],
- "time": ""
- }
-
- $scope.expertname = [];
- $scope.pageData = {};
- $scope.areaParm = {areas: []};
- $scope.pingfenPages = [];
- angular.forEach(totalPingfenModules, function(item){
- $scope.pingfenPages.push({page:item, checked:false, available:true});
- })
- $scope.selectedExpertsAndPages = [];
- $scope.getAreaStdData = function() {
- if(!$scope.areas || $scope.areas.length == 0){
- toaster.pop('error','提示','请添加高中区域');
- return;
- }
- // $scope.areaParm.areasStr = $scope.areas.join('@@');
- // $rootScope.loading = $http.post(main_host + '/api/EvalAreaStudents',
- // data: $scope.areaParm
- // )
- $scope.areaParm.areas = [];
- angular.forEach($scope.areas, function(item){
- var obj = {"province":null, "area":null, "city": null, "schoolId":null};
- if(item.province && item.province.province_id){
- obj.province = item.province.province_id;
- obj.provinceName = item.province.province_name;
- }
- if(item.area && item.area.area_id){
- obj.area = item.area.area_id;
- obj.areaName = item.area.area_name;
- }
- if(item.city && item.city.city_id){
- obj.city = item.city.city_id;
- obj.cityName = item.city.city_name;
- }
- if(item.school && item.school.school_id){
- obj.schoolId = item.school.school_id;
- obj.schoolName = item.school.school_name;
- }
- $scope.areaParm.areas.push(obj);
- })
- $rootScope.loading = $http({
- url : main_host + '/api/EvalAreaStudents',
- method : 'POST',
- data: $scope.areaParm
- })
- .success(function(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($scope.launchParm.executors);
- if(!$scope.areas || $scope.areas.length == 0){
- toaster.pop('error','提示','请添加高中区域');
- return;
- }
- if(!$scope.launchParm.executors){
- toaster.pop('error','提示','请指定评审专家');
- $scope.selectExpert();
- return;
- }
- if(!$scope.launchParm.time){
- toaster.pop('error','提示','请选择分组评审结束时间');
- $scope.psEndTime();
- return;
- }
- var availablePages = [];
- angular.forEach($scope.pingfenPages, function(item){
- if(item.available){
- availablePages.push(item.page);
- }
- });
- if(availablePages.length > 0){
- toaster.pop('error','提示','尚有未分配的评分页面。');
- $scope.selectExpert();
- return;
- }
- $scope.launchParm.executors = [];
- angular.forEach($scope.selectedExpertsAndPages, function(item){
- for(var i = 0; i < item.expertUserIdArr.length; i++){
- $scope.launchParm.executors.push(item.expertUserIdArr[i]);
- }
- for(var i = 0; i < item.pages.length; i++){
- $scope.launchParm.executors.push(item.pages[i]);
- }
- $scope.launchParm.executors.push(0);
- })
- console.log($scope.launchParm.executors);
- $scope.launchParm.areas = [];
- angular.forEach($scope.areas, function(item){
- var obj = {"province":null, "provinceName": null, "area":null, "areaName": null
- , "city": null, "cityName": null, "schoolId":null, "schoolName": null};
- if(item.province && item.province.province_id){
- obj.province = item.province.province_id;
- obj.provinceName = item.province.province_name;
- }
- if(item.area && item.area.area_id){
- obj.area = item.area.area_id;
- obj.areaName = item.area.area_name;
- }
- if(item.city && item.city.city_id){
- obj.city = item.city.city_id;
- obj.cityName = item.city.city_name;
- }
- if(item.school && item.school.school_id){
- obj.schoolId = item.school.school_id;
- obj.schoolName = item.school.school_name;
- }
- $scope.launchParm.areas.push(obj);
- })
- $rootScope.loading = $http.post(main_host + '/api/EvalRealEvaluation', $scope.launchParm).success(function(data) {
- if (data.success) {
- toaster.pop('success','提示','发起分组评审成功!');
- $state.go('app.step4');
- }
- });
- $scope.expertname = [];
- $scope.expertUserIdArr = [];
- $scope.expertNameArr = [];
- $scope.selectAllPages = false;
- $scope.pingfenPages = [{page:1, checked:false, available:true},{page:2, checked:false, available:true},{page:3, checked:false, available:true},{page:4, checked:false, available:true},{page:5, checked:false, available:true},{page:6, checked:false, available:true},
- {page:7, checked:false, available:true},{page:8, checked:false, available:true},{page:9, checked:false, available:true},{page:10, checked:false, available:true}
- ,{page:11, checked:false, available:true}// ,{page:12, checked:false, available:true}
- ];
- }
- //选择日期
- $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.selectExpertOk = function (){
- var json = {'expertname': $scope.expertname, 'expertUserIdArr': $scope.expertUserIdArr, 'expertNameArr': $scope.expertNameArr};
- $scope.selectedExpertsAndPages.push(json);
- }
- //选择定标专家
- $scope.selectExpert = function() {
- $scope.expertname = [];
- $scope.expertUserIdArr = [];
- $scope.expertNameArr = [];
- $scope.selectAllPages = false;
- var availablePages = [];
- console.log($scope.pingfenPages);
- angular.forEach($scope.pingfenPages, function(item){
- if(item.available){
- availablePages.push(item.page);
- }
- });
- if(availablePages.length > 0){
- $http.get(main_host + '/api/EvalReviewTeachers').success(function(data) {
- if (data.success) {
- $scope.dbexpertlists = data.map.data;
-
- var d = dialog({
- title: '选择专家',
- content: '',
- width: 500,
- ok: function() {
- if($scope.expertUserIdArr.length == eval_exector_num){
- var pages = [];
- angular.forEach($scope.pingfenPages, function(item){
- if(item.checked && item.available){
- pages.push(item.page);
- item.available = false;
- }
- });
- if(pages.length > 0){
- $scope.$apply(function() {
- var json = {'expertname': $scope.expertname, 'expertUserIdArr': $scope.expertUserIdArr, 'expertNameArr': $scope.expertNameArr, 'pages': pages, 'id': pages[0]};
- $scope.selectedExpertsAndPages.push(json);
- });
- }else{
- toaster.pop('error','提示','未分配评分页面。');
- }
- }else{
- toaster.pop('error','提示','请选择 ' + eval_exector_num + ' 位专家。');
- }
- },
- okValue: '确定',
- cancel: function() {},
- cancelValue: '取消'
- }).showModal();
- d.content($('#showExpertFZPS'));
- }
- });
- }else{
- toaster.pop('error','提示','没有可以分配的评分页面。');
- }
- }
- $scope.clickExpertName = function(item){
- console.log($scope.expertUserIdArr);
- if($scope.expertUserIdArr.length < eval_exector_num){
- $scope.expertUserIdArr.push(item.id);
- $scope.expertNameArr.push(item.name);
- $scope.expertname = [];
- $scope.expertname.push($scope.expertNameArr.join(' '));
- }
- }
- $scope.selectAllPagesChanged = function(){
- angular.forEach($scope.pingfenPages, function(item){
- if(item.available){
- item.checked = $scope.selectAllPages;
- }
- });
- }
- $scope.deleteSelected = function(deleteItem){
- for(var i=0; i<$scope.selectedExpertsAndPages.length; i++){
- if(deleteItem.id == $scope.selectedExpertsAndPages[i].id){
- $scope.selectedExpertsAndPages.splice(i,1);
- break;
- }
- }
- angular.forEach($scope.pingfenPages, function(page){
- angular.forEach(deleteItem.pages, function(spage){
- if(spage == page.page){
- page.available = true;
- page.checked = false;
- }
- });
- });
-
- }
- $scope.clearAllSel = function() {
- console.log('clearAllSel');
- $scope.expertname = [];
- $scope.expertUserIdArr = [];
- $scope.expertNameArr = [];
- console.log($scope.expertname);
- $scope.launchParm.executors = [];
- // $("#showExpert .list li").each(function(index,element){
- // $(element).show();
- // });
- }
- //********************* 选择高考区域 *********************/
-
- $scope.prov;
- $scope.city;
- $scope.dist;
-
- $scope.areas = []; //最终选择的区域数组,转字符串提交
- $scope.totalStds = 0;
- $rootScope.loading = $http.get(main_host + '/api/EvalStudentFzpsAreasSync')
- .success(function(data){
- $scope.provs = data.map.data;
- angular.forEach($scope.provs, function(prov){
- $scope.totalStds += prov.stds;
- })
- })
- $scope.selectProvince = function(){
- $scope.search.area = null;
- $scope.search.city = null;
- $rootScope.loading = $http.get(main_host + '/api/getAreaByProvince',{params:{'province_id':$scope.search.province.province_id}})
- .success(function(data){
- $scope.areaList = data.map.data;
- })
- }
- $scope.selectArea = function(){
- $scope.search.city = null;
- $rootScope.loading = $http.get(main_host + '/api/getCityByArea',{params:{'area_id':$scope.search.area.area_id}})
- .success(function(data){
- $scope.cityList = data.map.data;
- })
- }
- $scope.selectCity = function(){
- $scope.search.school = null;
- $rootScope.loading = $http.get(main_host + '/api/getSchoolByCity',{params:{'city_id':$scope.search.city.city_id}})
- .success(function(data){
- $scope.schoolList = data.map.data;
- })
- }
- $scope.add = function(){
- $scope.areas.push(angular.copy($scope.search));
- }
- $scope.remove = function(index){
- $scope.areas.splice(index,1);
- }
- /******************* 选择高中区域 end ***************/
- $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',{params:{'parentValue':prov}}).success(function(data){
- if(data.success){
- $scope.schoolcitys = 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',{params:{'parentValue':city}}).success(function(data){
- if(data.success){
- $scope.schooldists = 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/EvalPrePublishs', {
- 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.prepublishParm.pageIndex = 1;
- $scope.getPrePublishData();
- }
- //上一页
- $scope.bmPrevPage = function() {
- if ($scope.prepublishParm.pageIndex > 1) {
- $scope.prepublishParm.pageIndex--;
- $scope.getPrePublishData();
- }
- }
- //下一页
- $scope.bmNextPage = function() {
- if ($scope.prepublishParm.pageIndex < $scope.pageData.totalPages) {
- $scope.prepublishParm.pageIndex++;
- $scope.getPrePublishData();
- }
- }
- //尾页
- $scope.bmLastPage = function() {
- $scope.prepublishParm.pageIndex = $scope.pageData.totalPages;
- $scope.getPrePublishData();
- }
- }])
- .controller('step11Ctrl', ['$scope', '$http', '$state','toaster', function($scope, $http, $state,toaster) {
- $('.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.getPrePublishProvinces = function(){
- $http.post(main_host+'/api/EvalQueryStudentAreas').success(function(data){
- if(data.success){
- $scope.provinces = data.map.provinces;
- }
- })
- }
- $scope.exportsStdData = function() {
- var array = new Array();
- for (var p in $scope.prepublishstdParm) {
- var str = (p + "=" + $scope.prepublishstdParm[p]);
- array.push(str);
- }
- var params = array.join('&');
- var exp_url = main_host + '/api/ExpEvalPrePublishStudents?'+params;
- window.top.document.location.href=exp_url;
- }
- //查询学生数据
- $scope.queryPrePublishStd = function(){
- $scope.prepublishstdParm.pageIndex = 1;
- $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 = {
- "students":$scope.choseArr
- }
- $scope.launchPrePublish = function(){
- $http.post(main_host + '/api/EvalPrePublishs',$scope.launchpreParm).success(function(data){
- if(data.success){
- console.log(data);
- toaster.pop('success','提示','预发布成绩操作成功!');
- $scope.getPrePublishStdData();
- //$state.go('app.step11');
- }
- });
- }
- //首页
- $scope.bmFirstPage = function() {
- $scope.prepublishstdParm.pageIndex = 1;
- $scope.getPrePublishStdData();
- }
- //上一页
- $scope.bmPrevPage = function() {
- if ($scope.prepublishstdParm.pageIndex > 1) {
- $scope.prepublishstdParm.pageIndex--;
- $scope.getPrePublishStdData();
- }
- }
- //下一页
- $scope.bmNextPage = function() {
- if ($scope.prepublishstdParm.pageIndex < $scope.pageData.totalPages) {
- $scope.prepublishstdParm.pageIndex++;
- $scope.getPrePublishStdData();
- }
- }
- //尾页
- $scope.bmLastPage = function() {
- $scope.prepublishstdParm.pageIndex = $scope.pageData.totalPages;
- $scope.getPrePublishStdData();
- }
-
- //导入
- $scope.doimportstddata = function(){
- $('#myModal').modal('toggle');
- $(".modal-backdrop").remove();
- $http.post(main_host + '/api/EvalPrepublishedStudentImport',{type:'1',file_path:$("#importprepublishstdpath").val()}).success(function(data){
- if(data.success && data.map.code=='1'){
- $scope.getPrePublishStdData();
- dialog({
- title: '提示',
- content: '导入预发布考生操作成功',
- ok: function() {},
- okValue: '确定'
- }).showModal();
- }
- });
- }
- }])
- .controller('step6Ctrl', ['$scope', '$http', '$state','toaster', function($scope, $http, $state,toaster) {
- $('.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.bmFirstPage = function() {
- $scope.releaseParm.pageIndex = 1;
- $scope.getReleaseStdData();
- }
- //上一页
- $scope.bmPrevPage = function() {
- if ($scope.releaseParm.pageIndex > 1) {
- $scope.releaseParm.pageIndex--;
- $scope.getReleaseStdData();
- }
- }
- //下一页
- $scope.bmNextPage = function() {
- if ($scope.releaseParm.pageIndex < $scope.pageData.totalPages) {
- $scope.releaseParm.pageIndex++;
- $scope.getReleaseStdData();
- }
- }
- //尾页
- $scope.bmLastPage = function() {
- $scope.releaseParm.pageIndex = $scope.pageData.totalPages;
- $scope.getReleaseStdData();
- }
-
-
- //获取预发布的考生所在高中区域
- $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.releaseParm.pageIndex = 1;
- $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.releasePublish = function(){
- $scope.publishParm.students = $scope.choseArr;
- $http.post(main_host + '/api/EvalPublishStudents',$scope.publishParm).success(function(data){
- if(data.success){
- console.log(data);
- toaster.pop('success','提示','正式发布成绩操作成功!');
- $scope.getReleaseStdData();
- }
- })
- }
-
- //导入正式发布的考生
- $scope.doimportstddata = function(){
- $('#myModal').modal('toggle');
- $(".modal-backdrop").remove();
- $http.post(main_host + '/api/EvalPrepublishedStudentImport',{type:'2',file_path:$("#importprepublishstdpath").val()}).success(function(data){
- if(data.success && data.map.code=='1'){
- dialog({
- title: '提示',
- content: '导入正式发布考生操作成功',
- ok: function() {},
- okValue: '确定'
- }).showModal();
- }
- });
- }
- }])
- .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.getProvList = function() {
- $http.get(main_host + '/api/EvalPublishedStudentAreass').success(function(data) {
- if (data.success) {
- // alert(data.map.provinces);
- $scope.stdprovlists = data.map.provinces;
- }
- });
- }
-
- //导入考生面试成绩
- $scope.doimportstdabilityScore = function(){
- $('#importAbilityTestModal').modal('toggle');
- $(".modal-backdrop").remove();
- $http.post(main_host + '/api/EvalStudentAbilityScoreImport',{file_path:$("#importabilityscorepath").val()}).success(function(data){
- if(data.success && data.map.code=='1'){
- dialog({
- title: '提示',
- content: '考生能力测试成绩导入成功',
- ok: function() {},
- okValue: '确定'
- }).showModal();
- }
- });
- }
-
- //导出
- $scope.exportAbilityTestData = function(){
- var array = new Array();
- for (var p in $scope.abilitytestParm) {
- var str = (p + "=" + $scope.abilitytestParm[p]);
- array.push(str);
- }
- var params = array.join('&');
- var exp_url = main_host + '/api/EvalAbilityStudentExports?'+params;
- window.top.document.location.href=exp_url;
- }
- //首页
- $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/getAllEvalProvinces').success(function(data) {
- if (data.success) {
- $scope.stdprovlists = data.map.data;
- }
- });
- }
- //导出数据
- $scope.exportsStdData = function() {
- var array = new Array();
- for (var p in $scope.allstdParm) {
- var str = (p + "=" + $scope.allstdParm[p]);
- array.push(str);
- }
- var params = array.join('&');
- var exp_url = main_host + '/api/EvalStatisticsStudentExports?'+params;
- window.top.document.location.href=exp_url;
- }
- //查询
- $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(userId) {
- //console.log($rootScope.$state.go('student_details'));
- $rootScope.$state.go('student_details',{userId:userId});
- }
- }])
- .controller('TeamReviewTaskCtrl', ['$scope', '$http', '$state', '$rootScope', function($scope, $http, $state, $rootScope, toaster) {
- $scope.load = function(){
- $rootScope.loading = $http.get(main_host + '/api/getTeamReviewTaskProvinces').success(function(data) {
- if (data.success) {
- $scope.provinces = data.map.data;
- }
- });
- }
- $scope.load();
- //选择小组评议账号
- $scope.selectUser = function(province) {
- $scope.selectedProvince = province;
- if(document.querySelectorAll( '#showExpert' ).length > 1){
- var elementList = document.querySelectorAll( '#showExpert');
- angular.element(elementList[1]).remove();
- }
- $rootScope.loading = $http.get(main_host + '/api/getTeamReviewExecutors').success(function(data) {
- if (data.success) {
- $scope.dbexpertlists = data.map.data;
- $scope.selectUserDialog = dialog({
- title: '选择专家',
- content: $('#showExpert'),
- width: 500,
- ok: function() {},
- okValue: '确定',
- cancel: function() {},
- cancelValue: '取消'
- }).showModal();
- }
- });
- $scope.clickUser = function(user){
- $scope.selectedProvince.team_review_user_name = user.name;
- $scope.selectedProvince.team_review_user_id = user.userId;
- console.log(user);
- console.log($scope.selectedProvince);
- $rootScope.loading = $http.post(main_host + '/api/addTeamReviewProvinceUsers', $scope.selectedProvince).success(function(data) {
- $scope.selectUserDialog.close();
- $scope.load();
- });
- }
- }
- }])
- .controller('TeamReviewMarkCtrl', ['$scope', '$http', '$state', '$rootScope', function($scope, $http, $state, $rootScope, toaster) {
- $scope.load = function(){
- $rootScope.loading = $http.post(main_host + '/api/queryAllTeamReviewRemarkHistory').success(function(data) {
- if (data.success) {
- $scope.tasks = data.map.tasks;
- }
- });
- }
- $scope.load();
- //显示打分详情
- $scope.lookCalibrationDetail = function(id) {
- if(document.querySelectorAll( '#popCalibrationDetail_picketage_table' ).length > 1){
- var elementList = document.querySelectorAll( '#popCalibrationDetail_picketage_table');
- angular.element(elementList[1]).remove();
- }
- $rootScope.loading = $http.get(main_host + '/api/GetEvalMarkDetails/'+id).success(function(data) {
- if (data.success) {
- $scope.marklists = data.map.data;
- console.log($scope.marklists);
- dialog({
- title:"打分详情",
- content:$('#popCalibrationDetail_picketage_table'),
- ok:function(){
- var urlHref = $state.href('markstep.step1',{'taskId':'view-' + id,'module':1});
- window.open(urlHref);
- return false;
- },
- okValue: "查看评分页面",
- cancel: function() {},
- cancelValue: "关闭"
- }).showModal();
- }
- });
- }
- }])
- .controller('ZcTeacherCtrl', ['$scope', '$http', '$state', '$rootScope', function($scope, $http, $state, $rootScope, toaster) {
- $scope.load = function(){
- $rootScope.loading = $http.get(main_host + '/api/zcTeachers').success(function(data) {
- if (data.success) {
- $scope.zcTeachers = data.map.zcTeachers;
- $scope.userModuleMap = data.map.userModuleMap;
- console.log($scope.userModuleMap);
- }
- });
- }
- $scope.load();
- $scope.zcTeacherModuleInit = function(){
- $rootScope.loading = $http.post(main_host + '/api/zcTeacherModuleInit').success(function(data) {
- if (data.success) {
- $scope.load();
- // toaster.pop('success','提示','操作成功!');
- alert("操作成功!");
- }
- });
- }
- $scope.zcTeacherModuleUpdate = function(){
- var list = [];
- angular.forEach($scope.zcTeachers, function(teacher){
- angular.forEach($scope.userModuleMap[teacher.id], function(userModule){
- var item = {};
- item.userId = userModule.userId;
- item.module = userModule.module;
- item.selected = userModule.selected;
- list.push(item);
- })
- })
- $rootScope.loading = $http.post(main_host + '/api/zcTeacherModuleUpdate', list).success(function(data) {
- if (data.success) {
- $scope.load();
- // toaster.pop('success','提示','操作成功!');
- alert("操作成功!");
- }
- });
- // $.ajax({
- // url: main_host + '/api/zcTeacherModuleUpdate',
- // type: "POST",
- // data: JSON.stringify(list),
- // dataType: "JSON",
- // success: function(data) {
- // if(data.success){
- // $scope.load();
- // toaster.pop('success','提示','操作成功!');
- // }
- // }
- // });
- }
- $scope.selectAllModules = function(list){
- angular.forEach($scope.userModuleMap[list.id], function(userModule){
- userModule.selected = list.selecteAll;
- })
- }
- }]);
|