You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

new_project.js 1.3 kB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. app.controller('NewProjectController', ['$scope', '$http', 'auth', 'config', 'alertService','$location','rms','common', function($scope, $http, auth, config, alertService, $location,rms,common){
  2. // common.checkLogin();
  3. var vm = $scope;
  4. vm.alertService = alertService.create();
  5. vm.project = {
  6. name:""
  7. };
  8. vm.addClass = function(){
  9. vm.syllabus.courses.push({});
  10. };
  11. vm.deleteClass = function(index){
  12. vm.syllabus.courses.splice(index, 1);
  13. }
  14. vm.newProject = function (frm, project) {
  15. frm.$setSubmitted();
  16. console.log(project);
  17. if(!frm.$valid){
  18. console.log(frm.$error);
  19. return;
  20. }
  21. $http.post(config.apiUrl+"projects/create", {
  22. token: auth.token(),
  23. name: project.name
  24. }).then(function(response){
  25. if(response.data.status!=0){
  26. vm.alertService.showMessage('出错了', response.data.message);
  27. } else {
  28. vm.alertService.showMessage('提示', '新建项目成功', function(){
  29. // window.history.back();
  30. rms.save('projects',[]);
  31. $location.path("/project_list");
  32. });
  33. }
  34. console.log(response.data.data);
  35. });
  36. }
  37. }] );

软件技术创新是当今国家整体创新能力的重要基础和发展引擎。近年来,大众参与的软件创新与创业活动已经成为网络时代软件开发和应用的新形态,正在快速改变着全球软件创新模式和软件产业格局。 ...