Просмотр исходного кода

参加外部质量评价活动计划

shenqilong 6 месяцев назад
Родитель
Сommit
0c12890f88
1 измененных файлов с 8 добавлено и 6 удалено
  1. 8 6
      src/views/component/sjzlpjjhx/sjzlpjjhx.vue

+ 8 - 6
src/views/component/sjzlpjjhx/sjzlpjjhx.vue

@@ -494,20 +494,22 @@ export default {
           return this.$message.warning('导入的文件没有数据,请填写完整上传!')
         }
         for (let i = 0; i < list.length; i++) {
-          const item = list[i]
           list[i].yanZhengLeiXing = list[i].yanZhengLeiXing
-            .replace(/' '/g, '')
-            .replace(/\(/g, '(')
-            .replace(/\)/g, ')')
+            ? list[i].yanZhengLeiXing
+                .replace(/' '/g, '')
+                .replace(/\(/g, '(')
+                .replace(/\)/g, ')')
+            : ''
           list[i].canYuRenYuan = list[i].canYuRenYuan
-            .replace(/' '/g, '')
-            .replace(/,/g, ',')
+            ? list[i].canYuRenYuan.replace(/' '/g, '').replace(/,/g, ',')
+            : ''
           if (list[i].tiGongZhe == '/') {
             list[i].tiGongZhe = ''
           }
           if (list[i].biDuiFang == '/') {
             list[i].biDuiFang = ''
           }
+          const item = list[i]
           if (!this.validateItem(item, i)) return
         }
         this.sjzlpjjhxData.push(...list)