Files
BR_YKC/上位机/YKC/Pages/RealtimePage.xaml

171 lines
9.2 KiB
Plaintext
Raw Normal View History

2026-05-21 12:56:29 +08:00
<Page x:Class="YKC.RealtimePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:oxy="http://oxyplot.org/wpf"
Title="实时监控" Background="#F0F2F5">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel Margin="20">
<!-- 标题 + 选择器 -->
<Grid Margin="0,0,0,12">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock Text="实时监控" FontSize="16" FontWeight="SemiBold"
Foreground="#1E293B"/>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock Text="桩" Foreground="#64748B" FontSize="13"
VerticalAlignment="Center" Margin="0,0,6,0"/>
<ComboBox x:Name="cmbPile" Style="{StaticResource StyledCombo}" Width="80"
SelectedIndex="0" SelectionChanged="PileGun_Changed">
<ComboBoxItem>桩 01</ComboBoxItem><ComboBoxItem>桩 02</ComboBoxItem>
<ComboBoxItem>桩 03</ComboBoxItem><ComboBoxItem>桩 04</ComboBoxItem>
<ComboBoxItem>桩 05</ComboBoxItem><ComboBoxItem>桩 06</ComboBoxItem>
</ComboBox>
<TextBlock Text="枪" Foreground="#64748B" FontSize="13"
VerticalAlignment="Center" Margin="12,0,6,0"/>
<ComboBox x:Name="cmbGun" Style="{StaticResource StyledCombo}" Width="70"
SelectedIndex="0" SelectionChanged="PileGun_Changed">
<ComboBoxItem>枪 1</ComboBoxItem><ComboBoxItem>枪 2</ComboBoxItem>
</ComboBox>
</StackPanel>
</Grid>
<!-- 数值卡片行1 -->
<WrapPanel Margin="0,0,0,6">
<Border Background="White" CornerRadius="6" Width="170"
Padding="14,12" Margin="0,0,8,8">
<StackPanel>
<TextBlock Text="电流 (A)" Style="{StaticResource InfoLabel}"/>
<TextBlock x:Name="txtCurrent" Text="--" FontSize="22"
FontWeight="SemiBold" Foreground="#10B981"/>
</StackPanel>
</Border>
<Border Background="White" CornerRadius="6" Width="170"
Padding="14,12" Margin="0,0,8,8">
<StackPanel>
<TextBlock Text="电压 (V)" Style="{StaticResource InfoLabel}"/>
<TextBlock x:Name="txtVoltage" Text="--" FontSize="22"
FontWeight="SemiBold" Foreground="#1E293B"/>
</StackPanel>
</Border>
<Border Background="White" CornerRadius="6" Width="170"
Padding="14,12" Margin="0,0,8,8">
<StackPanel>
<TextBlock Text="功率 (kW)" Style="{StaticResource InfoLabel}"/>
<TextBlock x:Name="txtPower" Text="--" FontSize="22"
FontWeight="SemiBold" Foreground="#1E293B"/>
</StackPanel>
</Border>
<Border Background="White" CornerRadius="6" Width="170"
Padding="14,12" Margin="0,0,8,8">
<StackPanel>
<TextBlock Text="度数 (kWh)" Style="{StaticResource InfoLabel}"/>
<TextBlock x:Name="txtEnergy" Text="--" FontSize="22"
FontWeight="SemiBold" Foreground="#1E293B"/>
</StackPanel>
</Border>
<Border Background="White" CornerRadius="6" Width="170"
Padding="14,12" Margin="0,0,8,8">
<StackPanel>
<TextBlock Text="总金额 (元)" Style="{StaticResource InfoLabel}"/>
<TextBlock x:Name="txtTotalAmount" Text="--" FontSize="22"
FontWeight="SemiBold" Foreground="#FF5722"/>
</StackPanel>
</Border>
<Border Background="White" CornerRadius="6" Width="150"
Padding="14,12" Margin="0,0,8,8">
<StackPanel>
<TextBlock Text="状态" Style="{StaticResource InfoLabel}"/>
<TextBlock x:Name="txtStatus" Text="--" FontSize="22"
FontWeight="SemiBold" Foreground="#3B82F6"/>
</StackPanel>
</Border>
</WrapPanel>
<!-- 订单信息行 -->
<WrapPanel Margin="0,0,0,10">
<Border Background="White" CornerRadius="6" Width="280"
Padding="14,12" Margin="0,0,8,8">
<StackPanel>
<TextBlock Text="订单编号" Style="{StaticResource InfoLabel}"/>
<TextBlock x:Name="txtOrderNo" Text="--" FontSize="13"
FontWeight="SemiBold" Foreground="#1E293B"
FontFamily="Consolas" TextWrapping="Wrap"/>
</StackPanel>
</Border>
<Border Background="White" CornerRadius="6" Width="140"
Padding="14,12" Margin="0,0,8,8">
<StackPanel>
<TextBlock Text="目标 SOC" Style="{StaticResource InfoLabel}"/>
<TextBlock x:Name="txtSoc" Text="--" FontSize="22"
FontWeight="SemiBold" Foreground="#1E293B"/>
</StackPanel>
</Border>
<Border Background="White" CornerRadius="6" Width="180"
Padding="14,12" Margin="0,0,8,8">
<StackPanel>
<TextBlock Text="累计充电时间" Style="{StaticResource InfoLabel}"/>
<TextBlock x:Name="txtCumTime" Text="--" FontSize="18"
FontWeight="SemiBold" Foreground="#1E293B"
FontFamily="Consolas"/>
</StackPanel>
</Border>
<Border Background="White" CornerRadius="6" Width="180"
Padding="14,12" Margin="0,0,8,8">
<StackPanel>
<TextBlock Text="剩余时间" Style="{StaticResource InfoLabel}"/>
<TextBlock x:Name="txtRemTime" Text="--" FontSize="18"
FontWeight="SemiBold" Foreground="#1E293B"
FontFamily="Consolas"/>
</StackPanel>
</Border>
</WrapPanel>
<!-- 图表 2x2 -->
<Grid Height="580">
<Grid.RowDefinitions>
<RowDefinition Height="290"/>
<RowDefinition Height="290"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Grid.Row="0" Grid.Column="0" Background="White" CornerRadius="6"
Margin="0,0,7,7">
<Grid>
<TextBlock Text="电流曲线 (A)" Foreground="#94A3B8" FontSize="12"
Margin="14,10,0,0" VerticalAlignment="Top"/>
<oxy:PlotView x:Name="plotCurrent" Margin="8,32,8,8"/>
</Grid>
</Border>
<Border Grid.Row="0" Grid.Column="1" Background="White" CornerRadius="6"
Margin="7,0,0,7">
<Grid>
<TextBlock Text="电压曲线 (V)" Foreground="#94A3B8" FontSize="12"
Margin="14,10,0,0" VerticalAlignment="Top"/>
<oxy:PlotView x:Name="plotVoltage" Margin="8,32,8,8"/>
</Grid>
</Border>
<Border Grid.Row="1" Grid.Column="0" Background="White" CornerRadius="6"
Margin="0,7,7,0">
<Grid>
<TextBlock Text="功率曲线 (kW)" Foreground="#94A3B8" FontSize="12"
Margin="14,10,0,0" VerticalAlignment="Top"/>
<oxy:PlotView x:Name="plotPower" Margin="8,32,8,8"/>
</Grid>
</Border>
<Border Grid.Row="1" Grid.Column="1" Background="White" CornerRadius="6"
Margin="7,7,0,0">
<Grid>
<TextBlock Text="费用明细 (元)" Foreground="#94A3B8" FontSize="12"
Margin="14,10,0,0" VerticalAlignment="Top"/>
<oxy:PlotView x:Name="plotAmount" Margin="8,32,8,8"/>
</Grid>
</Border>
</Grid>
</StackPanel>
</ScrollViewer>
</Page>