Browse Source

协同人展示

seimin 11 months ago
parent
commit
3cc07538ac
1 changed files with 3 additions and 3 deletions
  1. 3 3
      assets/js/controllers/incident/incidentDetailCtrl.js

+ 3 - 3
assets/js/controllers/incident/incidentDetailCtrl.js

@@ -73,14 +73,14 @@ app.controller('incidentDetailCtrl', ["$scope", "$http", "i18nService", "$rootSc
73
 
73
 
74
     // 转换协同人
74
     // 转换协同人
75
     $scope.transferSynergetic = function(synergetic){
75
     $scope.transferSynergetic = function(synergetic){
76
-      return synergetic.length ? synergetic.map(v => v.name).join(',') : ''
76
+      return (synergetic && synergetic.length) ? synergetic.map(v => v.name).join(',') : ''
77
     }
77
     }
78
 
78
 
79
     // 转换处理人
79
     // 转换处理人
80
     $scope.transferUser = function(incidentData){
80
     $scope.transferUser = function(incidentData){
81
-      if(incidentData.state.value == 'pending' && incidentData.currentLog){
81
+      if(incidentData.state && incidentData.state.value == 'pending' && incidentData.currentLog){
82
         return incidentData.currentLog.workerName;
82
         return incidentData.currentLog.workerName;
83
-      }else if(incidentData.state.value != 'pending' && incidentData.handlingPersonnelUser){
83
+      }else if(incidentData.state && incidentData.state.value != 'pending' && incidentData.handlingPersonnelUser){
84
         return incidentData.handlingPersonnelUser.name;
84
         return incidentData.handlingPersonnelUser.name;
85
       }else{
85
       }else{
86
         return '';
86
         return '';