12345678910111213141516171819202122232425262728293031323334353637383940 |
- angular.module('push')
- .controller('tongluPermissionApplyCtrl', function ($scope, $stateParams, AuthorityService, UtilService, $timeout, UserService, ConstantService, CommonService) {
- if ($scope.app) {
- $scope.setStatusBar(0);
- }
- var resource = $stateParams.resource;
- $scope.applymessage = {content: ""};
- //初始化当前信息
- var authoritydata = angular.fromJson($stateParams.authoritydata);
- // console.log(authoritydata);
- $scope.goToTaskHoll = function(){
- $scope.go('taskHoll');
- }
- $scope.apply = function () {
- if ($scope.applymessage.content.length < 1) {
- if ($scope.app) {
- UtilService.showMess("申请理由不能为空");
- } else {
- CommonService.showMessage('申请理由不能为空', $scope);
- }
- return;
- }
- AuthorityService.applyAuthorityForTonglu(resource.unique, resource.creator, $scope.applymessage.content).then(function (response) {
- if (response.code == ConstantService.INTERFACE_STATUS_CODE_3350) {
- if ($scope.app) {
- UtilService.showMess("权限申请发送成功,请耐心等待");
- } else {
- CommonService.showMessage('权限申请发送成功,请耐心等待', $scope);
- }
- }
- $timeout(function () {
- $scope.goToTaskHoll();
- }, 1000);
- }, function () {
- });
- };
- });
|