3 Commits 73d7a91cd9 ... 801045d883

Author SHA1 Message Date
  Jehu 801045d883 Merge branch 'xzh_220504#feature_trace_center' of http://112.74.164.79:3000/chenying/X-web into xzh_220504#feature_trace_center 3 years ago
  Jehu ac5de6450f 追溯中心产品列表调整 3 years ago
  Jehu 07bf5a4228 追溯中心产品列表调整 3 years ago
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/views/modules/trace/product-list.vue

+ 4 - 2
src/views/modules/trace/product-list.vue

@@ -52,7 +52,7 @@
           align="center"
           label="状态">
           <template slot-scope="scope">
-            <span>{{scope.row.state?optionsState[Number(scope.row.state) - 3].value:''}}</span>
+            <span>{{scope.row.state?find(optionsState, function(o) { return o.code == scope.row.state }).value:''}}</span>
           </template>
         </el-table-column>
         <el-table-column
@@ -87,6 +87,7 @@
 <script>
   import Detail from './product-detail'
   import { getProductByCode } from '@/api/trace'
+  import find from 'lodash/find'
   export default {
     name: 'product-list',
     components: {Detail},
@@ -195,7 +196,8 @@
       },
       closeDialogEvent () {
         this.detailsVisible = false
-      }
+      },
+      find
     }
   }
 </script>