handy 1 mês atrás
pai
commit
5a5605df94
1 arquivos alterados com 6 adições e 1 exclusões
  1. 6 1
      src/App.vue

+ 6 - 1
src/App.vue

@@ -10,6 +10,7 @@
       <h1 class="title">
         宝时立库
         <span class="title-meta">· 总库位 {{ locations.length }}</span>
+        <span class="title-meta">· 可用库位 {{ availableLocationsCount }}</span>
         <span class="title-legend">
           <span class="legend-chip legend-chip-a">A</span>
           <span class="legend-chip legend-chip-b">B</span>
@@ -18,7 +19,7 @@
       </h1>
       <div class="controls">
         <label class="filter-item">
-          <span class="selector-label">资源类型</span>
+          <span class="selector-label">库位类型</span>
           <select v-model="selectedCategory" class="level-select">
             <option value="">全部</option>
             <option v-for="category in categoryOptions" :key="category" :value="category">
@@ -293,6 +294,10 @@ const categoryOptions = computed(() => {
   return [...new Set(locations.value.map((loc) => loc.category).filter(Boolean))].sort()
 })
 
+const availableLocationsCount = computed(() => {
+  return locations.value.filter((loc) => loc.locationAttribute === 'OK').length
+})
+
 const locationAttributeOptions = computed<LocationAttributeCode[]>(() => {
   return [...new Set(locations.value.map((loc) => loc.locationAttribute).filter(Boolean))] as LocationAttributeCode[]
 })