|
|
@@ -1,10 +1,13 @@
|
|
|
<script setup lang="ts" name="aidopS8OrderExecution">
|
|
|
-// ORDER-FLOW-OVERVIEW-SHELL-1:SO 订单执行档案总览页壳。
|
|
|
-// 仅本轮:4 Tab + KPI 三卡 + 客户分组列表;不接后端、不做链路全景、不做筛选条。
|
|
|
+// ORDER-FLOW-OVERVIEW-SHELL-1 + ORDER-FLOW-OVERVIEW-FILTERS-1:
|
|
|
+// 总览页壳 + 7 维筛选条(status/node/keyword/customer/productLine/region/severity)。
|
|
|
+// KPI / 命中订单 / 客户分组随 store.filteredOrders 变化;空结果时 KPI 显示 --。
|
|
|
import { computed, onMounted, ref } from 'vue';
|
|
|
import { useOrderExecutionStore } from '/@/stores/orderExecution';
|
|
|
+import type { OrderExecutionFilters } from '/@/views/aidop/s8/monitoring/data/order-execution/types';
|
|
|
import OrderExecutionKpiCards from './components/order-execution/OrderExecutionKpiCards.vue';
|
|
|
import OrderExecutionCustomerGroups from './components/order-execution/OrderExecutionCustomerGroups.vue';
|
|
|
+import OrderExecutionFiltersBar from './components/order-execution/OrderExecutionFilters.vue';
|
|
|
|
|
|
const store = useOrderExecutionStore();
|
|
|
|
|
|
@@ -12,13 +15,25 @@ onMounted(() => {
|
|
|
store.loadFixture();
|
|
|
});
|
|
|
|
|
|
-const customers = computed(() => store.customerGroups);
|
|
|
-const orders = computed(() => store.allOrders);
|
|
|
+const filters = computed(() => store.filters);
|
|
|
+const filterOptions = computed(() => store.filterOptions);
|
|
|
+const filteredOrders = computed(() => store.filteredOrders);
|
|
|
+const filteredCustomers = computed(() => store.filteredCustomerGroups);
|
|
|
const kpi = computed(() => store.kpiAverages);
|
|
|
const observedAt = computed(() => store.currentObservationTime);
|
|
|
-const ready = computed(() => store.initialized && orders.value.length > 0);
|
|
|
-const orderCount = computed(() => orders.value.length);
|
|
|
-const customerCount = computed(() => customers.value.length);
|
|
|
+const ready = computed(() => store.initialized && filteredOrders.value.length > 0);
|
|
|
+const orderCount = computed(() => filteredOrders.value.length);
|
|
|
+const customerCount = computed(() => filteredCustomers.value.length);
|
|
|
+const totalOrderCount = computed(() => store.allOrders.length);
|
|
|
+const isEmptyResult = computed(() => store.initialized && filteredOrders.value.length === 0);
|
|
|
+
|
|
|
+function onFiltersUpdate(next: OrderExecutionFilters) {
|
|
|
+ store.setFilters(next);
|
|
|
+}
|
|
|
+
|
|
|
+function onFiltersClear() {
|
|
|
+ store.clearFilters();
|
|
|
+}
|
|
|
|
|
|
const activeTab = ref<'overview' | 'execution' | 'source-dept' | 'handle-dept'>('overview');
|
|
|
</script>
|
|
|
@@ -39,16 +54,24 @@ const activeTab = ref<'overview' | 'execution' | 'source-dept' | 'handle-dept'>(
|
|
|
<el-tabs v-model="activeTab" class="oe-dashboard__tabs">
|
|
|
<el-tab-pane label="订单/客户总览" name="overview">
|
|
|
<section class="oe-dashboard__section">
|
|
|
+ <OrderExecutionFiltersBar
|
|
|
+ :model-value="filters"
|
|
|
+ :options="filterOptions"
|
|
|
+ @update:model-value="onFiltersUpdate"
|
|
|
+ @clear="onFiltersClear"
|
|
|
+ />
|
|
|
+
|
|
|
<OrderExecutionKpiCards :kpi="kpi" :ready="ready" />
|
|
|
|
|
|
<div class="oe-dashboard__counts">
|
|
|
<div class="oe-dashboard__count">
|
|
|
<span class="oe-dashboard__count-label">当前命中订单</span>
|
|
|
- <span class="oe-dashboard__count-value">{{ ready ? orderCount : '--' }}</span>
|
|
|
+ <span class="oe-dashboard__count-value">{{ orderCount }}</span>
|
|
|
+ <span class="oe-dashboard__count-total">/ {{ totalOrderCount }}</span>
|
|
|
</div>
|
|
|
<div class="oe-dashboard__count">
|
|
|
<span class="oe-dashboard__count-label">客户分组</span>
|
|
|
- <span class="oe-dashboard__count-value">{{ ready ? customerCount : '--' }}</span>
|
|
|
+ <span class="oe-dashboard__count-value">{{ customerCount }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -57,7 +80,14 @@ const activeTab = ref<'overview' | 'execution' | 'source-dept' | 'handle-dept'>(
|
|
|
<h2 class="oe-dashboard__group-text">客户分组</h2>
|
|
|
</div>
|
|
|
|
|
|
- <OrderExecutionCustomerGroups :customers="customers" :preview-limit="3" />
|
|
|
+ <OrderExecutionCustomerGroups
|
|
|
+ v-if="!isEmptyResult"
|
|
|
+ :customers="filteredCustomers"
|
|
|
+ :preview-limit="3"
|
|
|
+ />
|
|
|
+ <div v-else class="oe-dashboard__empty">
|
|
|
+ 当前筛选无匹配订单,可点击「重置」恢复全部。
|
|
|
+ </div>
|
|
|
</section>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
@@ -193,6 +223,24 @@ const activeTab = ref<'overview' | 'execution' | 'source-dept' | 'handle-dept'>(
|
|
|
color: var(--order-accent);
|
|
|
}
|
|
|
|
|
|
+.oe-dashboard__count-total {
|
|
|
+ font-size: 12px;
|
|
|
+ color: var(--order-text-muted);
|
|
|
+}
|
|
|
+
|
|
|
+.oe-dashboard__empty {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ min-height: 160px;
|
|
|
+ border-radius: 14px;
|
|
|
+ background: var(--order-panel);
|
|
|
+ border: 1px dashed var(--order-border);
|
|
|
+ color: var(--order-text-secondary);
|
|
|
+ font-size: 13px;
|
|
|
+ letter-spacing: 0.04em;
|
|
|
+}
|
|
|
+
|
|
|
.oe-dashboard__group-title {
|
|
|
display: flex;
|
|
|
align-items: center;
|