소스 검색

协同人展示

seimin 11 달 전
부모
커밋
3cc07538ac
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  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 '';