12345678910111213141516171819202122232425262728293031323334 |
- app.controller('StdMaterialCtrl', [ '$rootScope', '$scope', function($rootScope, $scope) {
-
- $scope.getMaterialArray = function(){
- $rootScope.ajaxRequest({
- url : '../enrol/std/material/all.htm'
- }, function(response) {
- $scope.materialArray = response.array;
- });
- }
- // 获取截止时间标志
- $scope.getDeadLineFlag = function() {
- $rootScope.ajaxRequest({
- url : '../enrol/std/modify/info/flag/get.htm'
- }, function(response) {
- $scope.modifyFlag = response.entity;
- });
- }
- $scope.getDeadLineFlag();
- $scope.getMaterialArray();
-
- $scope.showMaterial = function(m){
- // 没有上传或者审核失败
- if(m.material_id == undefined || m.verify_status == 'InActive') {
- $rootScope.uploadStdMaterial(m.material_type,function(){
- $scope.getMaterialArray();
- });
- }else {
- $rootScope.goLocation('std/material_info/' + m.material_id );
- }
- }
- } ])
|