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 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 80
     $scope.transferUser = function(incidentData){
81
-      if(incidentData.state.value == 'pending' && incidentData.currentLog){
81
+      if(incidentData.state && incidentData.state.value == 'pending' && incidentData.currentLog){
82 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 84
         return incidentData.handlingPersonnelUser.name;
85 85
       }else{
86 86
         return '';