chenguo 9 часов назад
Родитель
Сommit
8f98c01749
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      src/views/company/companyTrafficLog/index.vue

+ 4 - 3
src/views/company/companyTrafficLog/index.vue

@@ -262,9 +262,10 @@ export default {
       this.single = selection.length !== 1
       this.multiple = !selection.length
     },
-
-    companyNameFormatter(row){
-      return this.formatterCompanyOptions.filter(item => item.dictValue === row.companyId)[0].dictLabel
+    companyNameFormatter(row) {
+      if (!row.companyId) return '';
+      const company = this.formatterCompanyOptions.find(item => item.dictValue === row.companyId);
+      return company ? company.dictLabel : '';
     },
 
     /** 导出按钮操作 */