fix CustomerDataCharts.vue style

This commit is contained in:
Timi
2026-10-30 11:54:25 +08:00
parent 98e14f318b
commit 267149868c
2 changed files with 119 additions and 118 deletions
+79 -78
View File
@@ -1,86 +1,88 @@
<template>
<t-navbar
fixed
:z-index="20"
:title="routeNavBarTitle"
left-arrow
@left-click="$router.back()"
/>
<div v-can="permissionCodes.stat.read" class="customer-data-charts-page">
<div class="filters glass">
<t-input
v-model="customerCode"
class="customer-search"
type="search"
borderless
placeholder="输入客户编码或姓名"
@clear="applyCustomerSearch"
@enter="applyCustomerSearch"
>
<template #suffix-icon>
<t-button
size="extra-small"
theme="primary"
variant="outline"
content="选择客户"
@click.stop="selectorVisible = true"
/>
</template>
</t-input>
</div>
<customer-profile-card v-entrance-transition class="customer" :customer="selectedCustomer" />
<div class="charts">
<t-segmented
v-if="selectedCustomer"
v-model="chartMode"
class="chart-mode"
block
:options="chartModeOptions"
v-entrance-transition
/>
<customer-order-charts
v-entrance-transition
v-if="selectedCustomer && chartMode === 'order'"
:customer-id="selectedCustomer.id || ''"
:date-text-list="chartDateTextList"
:store-id="selectedCustomer.storeId"
/>
<template v-else-if="selectedCustomer">
<customer-chart-summary
<div class="page-layout navbar customer-data-charts-page">
<t-navbar
fixed
:z-index="20"
:title="routeNavBarTitle"
left-arrow
@left-click="$router.back()"
/>
<main v-can="permissionCodes.stat.read" class="page-content scroll column">
<div class="filters glass">
<t-input
v-model="customerCode"
class="customer-search"
type="search"
borderless
placeholder="输入客户编码或姓名"
@clear="applyCustomerSearch"
@enter="applyCustomerSearch"
>
<template #suffix-icon>
<t-button
size="extra-small"
theme="primary"
variant="outline"
content="选择客户"
@click.stop="selectorVisible = true"
/>
</template>
</t-input>
</div>
<customer-profile-card v-entrance-transition class="customer" :customer="selectedCustomer" />
<div class="charts">
<t-segmented
v-if="selectedCustomer"
v-model="chartMode"
class="chart-mode"
block
:options="chartModeOptions"
v-entrance-transition
:customer="selectedCustomer"
:month-cursor="monthCursor"
:selected-event-id-list="selectedEventIdList"
/>
<customer-event-record-calendar-section
v-entrance-transition
v-model="monthCursor"
v-model:selected-event-id-list="selectedEventIdList"
:customer-id="selectedCustomer.id || ''"
:customer-name="selectedCustomer.name"
:store-id="selectedCustomer.storeId"
@list="toEventRecordList"
/>
<customer-record-trend-chart
<customer-order-charts
v-entrance-transition
v-if="selectedCustomer && chartMode === 'order'"
:customer-id="selectedCustomer.id || ''"
:date-text-list="chartDateTextList"
:selected-event-id-list="selectedEventIdList"
:store-id="selectedCustomer.storeId"
/>
<customer-event-structure-chart
<template v-else-if="selectedCustomer">
<customer-chart-summary
v-entrance-transition
:customer="selectedCustomer"
:month-cursor="monthCursor"
:selected-event-id-list="selectedEventIdList"
/>
<customer-event-record-calendar-section
v-entrance-transition
v-model="monthCursor"
v-model:selected-event-id-list="selectedEventIdList"
:customer-id="selectedCustomer.id || ''"
:customer-name="selectedCustomer.name"
:store-id="selectedCustomer.storeId"
@list="toEventRecordList"
/>
<customer-record-trend-chart
v-entrance-transition
:customer-id="selectedCustomer.id || ''"
:date-text-list="chartDateTextList"
:selected-event-id-list="selectedEventIdList"
/>
<customer-event-structure-chart
v-entrance-transition
:customer-id="selectedCustomer.id || ''"
:date-text-list="monthDateTextList"
:selected-event-id-list="selectedEventIdList"
/>
</template>
<customer-selector
v-entrance-transition
:customer-id="selectedCustomer.id || ''"
:date-text-list="monthDateTextList"
:selected-event-id-list="selectedEventIdList"
v-model="selectedCustomerId"
v-model:visible="selectorVisible"
@change="handleCustomerSelected"
/>
</template>
<customer-selector
v-entrance-transition
v-model="selectedCustomerId"
v-model:visible="selectorVisible"
@change="handleCustomerSelected"
/>
</div>
</div>
</main>
</div>
</template>
@@ -285,11 +287,10 @@ function getDateEnd(date: Date): Date {
<style scoped lang="less">
.customer-data-charts-page {
gap: 1rem;
padding: var(--app-nav-height) 0 1rem 0;
display: flex;
flex-direction: column;
.filters {
margin-bottom: 0;
}
.customer {
margin: 0 1rem;