SelfcheckentranceCtrl.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. angular.module('push')
  2. .controller('SelfcheckentranceCtrl', function ($scope,SelfcheckService,taskModuleService,$stateParams) {
  3. $scope.titleid=$stateParams.id
  4. SelfcheckService.getSelfcheckentrance($stateParams.id).then(function (res){
  5. console.log(res)
  6. if(res.code==3350){
  7. $scope.list=res.data
  8. }else {
  9. $ionicPopup.alert({
  10. title: '提示',
  11. template: res.message
  12. });
  13. }
  14. }).catch(function (res){
  15. $ionicPopup.alert({
  16. title: '提示',
  17. template: "服务器错误"
  18. });
  19. })
  20. $scope.JumpEntry=function (item){
  21. //等于1跳转自检页面
  22. if($scope.titleid==1){
  23. if(item.sort==0){
  24. taskModuleService.judgeUserInOrgForTL().then(function (res) {
  25. console.log(res)
  26. if (res.code == 3350) {
  27. if (res.data) {
  28. $scope.go('orgInspectList', {isuserlist: false});
  29. } else {
  30. $scope.go('orgInspectList', {isuserlist: true});
  31. }
  32. }
  33. })
  34. }else {
  35. $scope.go('Selfchecklist', {restype: item.sort,name:item.title});
  36. }
  37. }else {
  38. $scope.go('cultivatelist', {restype: item.sort,name:item.title});
  39. }
  40. }
  41. })