seimin 2 years ago
parent
commit
cb2d142eef
1 changed files with 3 additions and 3 deletions
  1. 3 3
      assets/js/controllers/customform/customformCtrl.js

+ 3 - 3
assets/js/controllers/customform/customformCtrl.js

@@ -22009,7 +22009,7 @@ appFormly.controller("CustomformCtrl", [
22009
                     currentUserRoles = $rootScope.user.role ? $rootScope.user.role.map(v=>String(v.id)) : [];
22009
                     currentUserRoles = $rootScope.user.role ? $rootScope.user.role.map(v=>String(v.id)) : [];
22010
                     intersection = integralRoles.filter(function (val) { return currentUserRoles.indexOf(val) > -1 })
22010
                     intersection = integralRoles.filter(function (val) { return currentUserRoles.indexOf(val) > -1 })
22011
                   }
22011
                   }
22012
-                  if(vm.model.start_code == "close"&&((integralMechanism == 1 && intersection.length) || (integralMechanism == 2 && $rootScope.user.userType.value == 2))){
22012
+                  if(vm.model.start_code == "close"&&((integralMechanism == 1 && intersection.length && integralRoles.length) || (integralMechanism == 2 && $rootScope.user.userType.value == 2))){
22013
                     $modal.open({
22013
                     $modal.open({
22014
                       templateUrl: 'assets/views/incident/tpl/toIntegralMechanism.tpl.html',
22014
                       templateUrl: 'assets/views/incident/tpl/toIntegralMechanism.tpl.html',
22015
                       controller: function ($scope, $modalInstance, api_bpm_domain, incidentData, currentUserId, Alert, api_user_data,api_wechatfile,scope,api_bpm_data) {
22015
                       controller: function ($scope, $modalInstance, api_bpm_domain, incidentData, currentUserId, Alert, api_user_data,api_wechatfile,scope,api_bpm_data) {
@@ -22168,7 +22168,7 @@ appFormly.controller("CustomformCtrl", [
22168
                           currentUserRoles = $rootScope.user.role ? $rootScope.user.role.map(v=>String(v.id)) : [];
22168
                           currentUserRoles = $rootScope.user.role ? $rootScope.user.role.map(v=>String(v.id)) : [];
22169
                           intersection = integralRoles.filter(function (val) { return currentUserRoles.indexOf(val) > -1 })
22169
                           intersection = integralRoles.filter(function (val) { return currentUserRoles.indexOf(val) > -1 })
22170
                         }
22170
                         }
22171
-                        if(vm.model.start_code == "close"&&((integralMechanism == 1 && intersection.length) || (integralMechanism == 2 && $rootScope.user.userType.value == 2))){
22171
+                        if(vm.model.start_code == "close"&&((integralMechanism == 1 && intersection.length && integralRoles.length) || (integralMechanism == 2 && $rootScope.user.userType.value == 2))){
22172
                           api_wechatfile.getDictionary({"key":"incident_integral_state","type":"list"}).then(function(res){
22172
                           api_wechatfile.getDictionary({"key":"incident_integral_state","type":"list"}).then(function(res){
22173
                             var auditState = res.find(v=>v.value == 0);
22173
                             var auditState = res.find(v=>v.value == 0);
22174
                             var postData = { 
22174
                             var postData = { 
@@ -22277,7 +22277,7 @@ appFormly.controller("CustomformCtrl", [
22277
                     currentUserRoles = $rootScope.user.role ? $rootScope.user.role.map(v=>String(v.id)) : [];
22277
                     currentUserRoles = $rootScope.user.role ? $rootScope.user.role.map(v=>String(v.id)) : [];
22278
                     intersection = integralRoles.filter(function (val) { return currentUserRoles.indexOf(val) > -1 })
22278
                     intersection = integralRoles.filter(function (val) { return currentUserRoles.indexOf(val) > -1 })
22279
                   }
22279
                   }
22280
-                  if($scope.formData.name === 'handlerform'&&((integralMechanism == 1 && intersection.length) || (integralMechanism == 2 && $rootScope.user.userType.value == 2))){
22280
+                  if($scope.formData.name === 'handlerform'&&((integralMechanism == 1 && intersection.length && integralRoles.length) || (integralMechanism == 2 && $rootScope.user.userType.value == 2))){
22281
                       $modal.open({
22281
                       $modal.open({
22282
                         templateUrl: 'assets/views/incident/tpl/toIntegralMechanism.tpl.html',
22282
                         templateUrl: 'assets/views/incident/tpl/toIntegralMechanism.tpl.html',
22283
                         controller: function ($scope, $modalInstance, api_bpm_domain, incidentData, currentUserId, Alert, api_user_data,api_wechatfile,scope,api_bpm_data) {
22283
                         controller: function ($scope, $modalInstance, api_bpm_domain, incidentData, currentUserId, Alert, api_user_data,api_wechatfile,scope,api_bpm_data) {