activitySignMangerCtrl.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. angular.module('push')
  2. .controller('activitySignMangerCtrl', function ($scope, ActivityService, $stateParams, UtilService) {
  3. /* $scope.setStatusBar(1);*/
  4. //切换到对应页面
  5. var activity = ['successSign', 'failSign'];
  6. $scope.act = activity[0];
  7. $scope.changeAct = function (num) {
  8. //获取配对成功/失败列表(访客列表暂时不做)0配对成功,1未配对
  9. if (num == 0) {
  10. $scope.act = activity[num];
  11. } else if (num == 1) {
  12. $scope.act = activity[num];
  13. }
  14. };
  15. var activityid = $stateParams.activityid;
  16. $scope.personlist1 = [];//已签到
  17. $scope.personlist2 = [];//未签到
  18. // 获取签到管理信息
  19. var getCheckinManagerInfo = function () {
  20. $scope.showLoadingToast();
  21. ActivityService.getCheckinManagerInfo(activityid).then(function (response) {
  22. // ischeckin 0未签到,1已签到 type 1正常人员 2临时加入人员
  23. // console.log(response);
  24. if (UtilService.isDefined(response) && response.length > 0) {
  25. angular.forEach(response, function (value, index) {
  26. if (value.ischeckin == 0) {
  27. $scope.personlist2.push(value);
  28. } else {
  29. $scope.personlist1.push(value);
  30. }
  31. })
  32. }
  33. $scope.hideLoadingToast();
  34. }, function () {
  35. $scope.hideLoadingToast();
  36. })
  37. };
  38. getCheckinManagerInfo();
  39. //拨打电话
  40. $scope.openTel = function (tel) {
  41. window.open("tel:" + tel);
  42. };
  43. });