Commit 70fd0438 authored by 姜春辉's avatar 姜春辉

完善预约登记页面视图模型

parent 2b28637c
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GS.Terminal.VisitorSelfService.Logic.Core
{
public partial class AppointmentDetailPageHandler :
Corebase<ViewModels.Pages.AppointmentDetailPage.ViewModel>
{
public override void Init()
{
}
}
}
......@@ -105,6 +105,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Core\AppointmentDetailPageHandler.cs" />
<Compile Include="Core\AuthenticationPageHandler.cs" />
<Compile Include="Core\Corebase.cs" />
<Compile Include="Core\MenuPageHandler.cs" />
......
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using GS.Terminal.LogicShell.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace ViewModels.Pages.AppointmentDetailPage
{
......@@ -12,9 +14,65 @@ namespace ViewModels.Pages.AppointmentDetailPage
{
public string ViewID => "06d0ebdb-2518-4dc7-bc17-5b3fc5012af4";
private AppointmentItem _Appointment;
public AppointmentItem Appointment
{
get { return _Appointment; }
set { _Appointment = value; RaisePropertyChanged("Appointment"); }
}
private Visibility _ShowExtendInfo = Visibility.Collapsed;
public Visibility ShowExtendInfo
{
get { return _ShowExtendInfo; }
set { _ShowExtendInfo = value; RaisePropertyChanged("ShowExtendInfo"); }
}
public RelayCommand ShowExtendInfoCommand => new RelayCommand(() =>
{
ShowExtendInfo = Visibility.Visible;
});
public RelayCommand CloseExtendInfoCommand => new RelayCommand(() =>
{
ShowExtendInfo = Visibility.Collapsed;
});
public void Reset()
{
}
}
public class AppointmentItem
{
public string visitorName { get; set; }
public string photoUrl { get; set; }
public string idCardNum { get; set; }
public string phoneNum { get; set; }
public DateTime startDate { get; set; }
public DateTime endDate { get; set; }
public string areaName { get; set; }
public int visitPeople { get; set; }
public string beVisitPerson { get; set; }
public List<AppointmentExtendGroup> extends { get; set; }
}
public class AppointmentExtendGroup
{
public string groupName { get; set; }
public List<AppointmentExtendInfo> items { get; set; }
}
public class AppointmentExtendInfo
{
public string title { get; set; }
public string content { get; set; }
public int infotype { get; set; }
}
}
......@@ -32,11 +32,12 @@
<Border Grid.Column="1" CornerRadius="5"
Padding="31,31,31,0" BorderThickness="4" BorderBrush="#e5e4e6">
<StackPanel>
<Image Width="260" Height="370"/>
<TextBlock Text="张三" FontSize="42" HorizontalAlignment="Center" Margin="0,5,0,0"/>
<Image Source="{Binding Appointment.photoUrl}" Width="260" Height="370"/>
<TextBlock Text="{Binding Appointment.visitorName}" FontSize="42" HorizontalAlignment="Center" Margin="0,5,0,0"/>
</StackPanel>
</Border>
<Button Width="100" Height="100" HorizontalAlignment="Left"
Command="{Binding ShowExtendInfoCommand}"
VerticalAlignment="Bottom" Margin="20,0,0,0" Grid.Column="2">
<Button.Template>
<ControlTemplate TargetType="Button">
......@@ -78,26 +79,30 @@
</Grid.RowDefinitions>
<TextBlock Text="身份证号码" Style="{StaticResource AppointmentDetailPage_Title}"/>
<TextBlock Text="333333*******3333333" Style="{StaticResource AppointmentDetailPage_Value}"/>
<TextBlock Text="{Binding Appointment.idCardNum}" Style="{StaticResource AppointmentDetailPage_Value}"/>
<TextBlock Text="手机号码" Grid.Row="1" Style="{StaticResource AppointmentDetailPage_Title}"/>
<TextBlock Text="133****3333" Grid.Row="1" Style="{StaticResource AppointmentDetailPage_Value}"/>
<TextBlock Text="{Binding Appointment.phoneNum}" Grid.Row="1" Style="{StaticResource AppointmentDetailPage_Value}"/>
<ContentControl Grid.Row="2" Template="{StaticResource AppointmentDetailPage_Line}" Grid.ColumnSpan="2"/>
<TextBlock Text="来访日期" Grid.Row="3" Style="{StaticResource AppointmentDetailPage_Title}"/>
<TextBlock Text="2020-07-27 到 2020-07-27" Grid.Row="3" Style="{StaticResource AppointmentDetailPage_Value}"/>
<TextBlock Grid.Row="3" Style="{StaticResource AppointmentDetailPage_Value}">
<Run Text="{Binding Appointment.startDate,StringFormat={}{0:yyyy-MM-dd}}"/>
<Run Text=" 到 "/>
<Run Text="{Binding Appointment.endDate,StringFormat={}{0:yyyy-MM-dd}}"/>
</TextBlock>
<TextBlock Text="来访区域" Grid.Row="4" Style="{StaticResource AppointmentDetailPage_Title}"/>
<TextBlock Text="区域一" Grid.Row="4" Style="{StaticResource AppointmentDetailPage_Value}"/>
<TextBlock Text="{Binding Appointment.photoUrl}" Grid.Row="4" Style="{StaticResource AppointmentDetailPage_Value}"/>
<TextBlock Text="来访人数" Grid.Row="5" Style="{StaticResource AppointmentDetailPage_Title}"/>
<TextBlock Text="2人" Grid.Row="5" Style="{StaticResource AppointmentDetailPage_Value}"/>
<TextBlock Text="{Binding Appointment.photoUrl,StringFormat={}{0}人}" Grid.Row="5" Style="{StaticResource AppointmentDetailPage_Value}"/>
<ContentControl Grid.Row="6" Template="{StaticResource AppointmentDetailPage_Line}" Grid.ColumnSpan="2"/>
<TextBlock Text="被访人" Grid.Row="7" Style="{StaticResource AppointmentDetailPage_Title}"/>
<TextBlock Text="被访人字段包括被访人姓名以及部门信息" TextWrapping="WrapWithOverflow" Grid.Row="7" Style="{StaticResource AppointmentDetailPage_Value}"/>
<TextBlock Text="{Binding Appointment.photoUrl}" TextWrapping="WrapWithOverflow" Grid.Row="7" Style="{StaticResource AppointmentDetailPage_Value}"/>
</Grid>
<!--按钮-->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment