Эх сурвалжийг харах

运单视图-表格容错处理

zhongxiaoyu 2 жил өмнө
parent
commit
fb293c5536

+ 2 - 6
src/views/realTime/components/WaybillView/index.vue

@@ -26,11 +26,7 @@
       </div>
       <div class="waybill-header-operate flex-wrap">
         <Search @clear="clear" @search="search" />
-        <el-button
-          class="button-sqaure"
-          color="#ac014d"
-          @click="exportHandler"
-        >
+        <el-button class="button-sqaure" color="#ac014d" @click="exportHandler">
           <i class="icon-export" />
         </el-button>
         <ColumnSet
@@ -234,7 +230,7 @@ const tableData = computed(() => {
   )
   return mergedTableData.reduce((data: CommonData[], current) => {
     const { cargoSN } = current
-    if (typeof cargoSN === 'string') {
+    if (typeof cargoSN === 'string' && cargoSN.trim().length) {
       const splitedRows = cargoSN.split(',').map(splitedCargoSN => ({
         ...current,
         cargoSN: splitedCargoSN,