Make starter project delivery-ready

This commit is contained in:
zhougf committed 2026-05-31 00:55:04 +08:00
1 parent 5b300dee0d
commit d7bfde754b
22 files changed
+695 -71

No files matched your search

+53 -48
View File
@@ -1,4 +1,5 @@
import {
ChartPanel,
createAreaTrendOption,
createDualAxisOption,
createGaugeOption,
@@ -6,9 +7,8 @@ import {
createRadarOption,
createRankBarOption,
createStackedBarOption,
EChart
} from '@dev-screen-starter/charts'
import { MetricCard, Panel, ScreenStage, type ScaleMode } from '@dev-screen-starter/screen-core'
import { MetricCard, ScreenStage, type ScaleMode } from '@dev-screen-starter/screen-core'
import {
CornerFrame,
Divider,
@@ -112,75 +112,80 @@ export function DemoOverview() {
</section>
<section className="chart-grid">
<Panel title="面积趋势:吞吐走势">
{capacityTrend ? (
<EChart
option={createAreaTrendOption({
<ChartPanel
title="面积趋势:吞吐走势"
option={
capacityTrend
? createAreaTrendOption({
categories: capacityTrend.xAxis,
series: capacityTrend.series
})}
/>
) : null}
</Panel>
})
: null
}
/>
<Panel title="堆叠柱:区域订单">
{stackedOrders ? (
<EChart
option={createStackedBarOption({
<ChartPanel
title="堆叠柱:区域订单"
option={
stackedOrders
? createStackedBarOption({
categories: stackedOrders.categories,
series: stackedOrders.series
})}
/>
) : null}
</Panel>
})
: null
}
/>
<Panel title="排名条:区域排行">
{regionRank ? (
<EChart
option={createRankBarOption({
<ChartPanel
title="排名条:区域排行"
option={
regionRank
? createRankBarOption({
categories: regionRank.categories,
values: regionRank.values,
name: '订单',
color: '#7aa7ff'
})}
/>
) : null}
</Panel>
})
: null
}
/>
<Panel title="玫瑰图:异常来源">
<EChart option={createRosePieOption({ data: issueRose })} />
</Panel>
<ChartPanel title="玫瑰图:异常来源" option={createRosePieOption({ data: issueRose })} />
<Panel title="双轴图:订单与履约">
{fulfillmentMix ? (
<EChart
option={createDualAxisOption({
<ChartPanel
title="双轴图:订单与履约"
option={
fulfillmentMix
? createDualAxisOption({
categories: fulfillmentMix.categories,
leftName: '订单',
rightName: '履约率',
bar: { name: '订单', values: fulfillmentMix.orders, color: '#63a4ff' },
line: { name: '履约率', values: fulfillmentMix.rates, color: '#d8a13e' }
})}
/>
) : null}
</Panel>
})
: null
}
/>
<Panel title="雷达图:运营质量">
{qualityRadar ? (
<EChart
option={createRadarOption({
<ChartPanel
title="雷达图:运营质量"
option={
qualityRadar
? createRadarOption({
indicators: qualityRadar.indicators,
values: qualityRadar.values,
name: '质量评分',
color: '#d8a13e'
})}
/>
) : null}
</Panel>
})
: null
}
/>
<Panel title="仪表盘:履约率" className="compact-panel">
<EChart option={createGaugeOption({ name: '履约率', value: 87, unit: '%', color: '#56d08a' })} />
</Panel>
<ChartPanel
title="仪表盘:履约率"
className="compact-panel"
option={createGaugeOption({ name: '履约率', value: 87, unit: '%', color: '#56d08a' })}
/>
</section>
</ScreenStage>
)
+25
View File
@@ -170,9 +170,12 @@ body {
}
.screen-panel header {
align-items: center;
color: #d7e6f7;
display: flex;
font-size: 18px;
font-weight: 700;
justify-content: space-between;
margin-bottom: 12px;
}
@@ -202,6 +205,28 @@ body {
width: 100%;
}
.chart-panel-body {
position: relative;
}
.chart-panel-extra {
color: #88a1bd;
font-size: 12px;
font-weight: 400;
}
.chart-panel-state {
align-items: center;
color: #88a1bd;
display: flex;
height: 100%;
justify-content: center;
}
.chart-panel-state.is-error {
color: #ff9fa7;
}
.debug-badge {
background: rgb(3 8 13 / 80%);
border: 1px solid rgb(100 135 170 / 35%);