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
+40 -40
View File
@@ -73,6 +73,46 @@ html.theme-dark body {
} }
} }
.filters {
--td-search-bg-color: var(--tui-white);
--td-search-square-radius: 1rem;
top: -1rem;
margin: -1rem 0 1rem 0;
padding: 1rem 1rem 0 1rem;
z-index: 10;
position: sticky;
.t-input,
[class*="__input-box"] {
--td-button-border-radius: 99rem;
border: 1px solid var(--td-component-border);
height: 2.25rem;
padding: .25rem .25rem .25rem .75rem;
z-index: 2;
position: relative;
border-radius: 1rem;
}
.tabs {
--td-tab-item-height: 32px;
}
.menus {
--td-spacer-1: 6px;
width: 100%;
border: 1px solid rgba(148, 163, 184, .18);
overflow: hidden;
z-index: 1;
margin-top: -1rem;
border-top: none;
padding-top: .8rem;
border-radius: 0 0 1rem 1rem;
}
}
.pull-refresh { .pull-refresh {
flex: 1; flex: 1;
min-height: 0; min-height: 0;
@@ -93,46 +133,6 @@ html.theme-dark body {
overflow: visible !important; overflow: visible !important;
} }
} }
.filters {
--td-search-bg-color: var(--tui-white);
--td-search-square-radius: 1rem;
top: -1rem;
margin: -1rem 0 1rem 0;
padding: 1rem 1rem 0 1rem;
z-index: 10;
position: sticky;
.t-input,
[class*="__input-box"] {
--td-button-border-radius: 99rem;
border: 1px solid var(--td-component-border);
height: 2.25rem;
padding: .25rem .25rem .25rem .75rem;
z-index: 2;
position: relative;
border-radius: 1rem;
}
.tabs {
--td-tab-item-height: 32px;
}
.menus {
--td-spacer-1: 6px;
width: 100%;
border: 1px solid rgba(148, 163, 184, .18);
overflow: hidden;
z-index: 1;
margin-top: -1rem;
border-top: none;
padding-top: .8rem;
border-radius: 0 0 1rem 1rem;
}
}
} }
} }
+79 -78
View File
@@ -1,86 +1,88 @@
<template> <template>
<t-navbar <div class="page-layout navbar customer-data-charts-page">
fixed <t-navbar
:z-index="20" fixed
:title="routeNavBarTitle" :z-index="20"
left-arrow :title="routeNavBarTitle"
@left-click="$router.back()" left-arrow
/> @left-click="$router.back()"
<div v-can="permissionCodes.stat.read" class="customer-data-charts-page"> />
<div class="filters glass"> <main v-can="permissionCodes.stat.read" class="page-content scroll column">
<t-input <div class="filters glass">
v-model="customerCode" <t-input
class="customer-search" v-model="customerCode"
type="search" class="customer-search"
borderless type="search"
placeholder="输入客户编码或姓名" borderless
@clear="applyCustomerSearch" placeholder="输入客户编码或姓名"
@enter="applyCustomerSearch" @clear="applyCustomerSearch"
> @enter="applyCustomerSearch"
<template #suffix-icon> >
<t-button <template #suffix-icon>
size="extra-small" <t-button
theme="primary" size="extra-small"
variant="outline" theme="primary"
content="选择客户" variant="outline"
@click.stop="selectorVisible = true" content="选择客户"
/> @click.stop="selectorVisible = true"
</template> />
</t-input> </template>
</div> </t-input>
<customer-profile-card v-entrance-transition class="customer" :customer="selectedCustomer" /> </div>
<div class="charts"> <customer-profile-card v-entrance-transition class="customer" :customer="selectedCustomer" />
<t-segmented <div class="charts">
v-if="selectedCustomer" <t-segmented
v-model="chartMode" v-if="selectedCustomer"
class="chart-mode" v-model="chartMode"
block class="chart-mode"
:options="chartModeOptions" block
v-entrance-transition :options="chartModeOptions"
/>
<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
v-entrance-transition v-entrance-transition
:customer="selectedCustomer"
:month-cursor="monthCursor"
:selected-event-id-list="selectedEventIdList"
/> />
<customer-event-record-calendar-section <customer-order-charts
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 v-entrance-transition
v-if="selectedCustomer && chartMode === 'order'"
:customer-id="selectedCustomer.id || ''" :customer-id="selectedCustomer.id || ''"
:date-text-list="chartDateTextList" :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 v-entrance-transition
:customer-id="selectedCustomer.id || ''" v-model="selectedCustomerId"
:date-text-list="monthDateTextList" v-model:visible="selectorVisible"
:selected-event-id-list="selectedEventIdList" @change="handleCustomerSelected"
/> />
</template> </div>
<customer-selector </main>
v-entrance-transition
v-model="selectedCustomerId"
v-model:visible="selectorVisible"
@change="handleCustomerSelected"
/>
</div>
</div> </div>
</template> </template>
@@ -285,11 +287,10 @@ function getDateEnd(date: Date): Date {
<style scoped lang="less"> <style scoped lang="less">
.customer-data-charts-page { .customer-data-charts-page {
gap: 1rem;
padding: var(--app-nav-height) 0 1rem 0;
display: flex;
flex-direction: column;
.filters {
margin-bottom: 0;
}
.customer { .customer {
margin: 0 1rem; margin: 0 1rem;