Commit 47b76129 authored by 姜春辉's avatar 姜春辉

完成历史来访记录查询页面

parent 290dc647
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<Datas> <Datas>
<Data Description="获取人员有效预约单" Key="VisitorAvailableAppointment" ServiceUri="/api/GS.Sub.Vistor/VisitorSelfServiceTerminal/VisitorAvailableAppointment" /> <Data Description="获取人员有效预约单" Key="VisitorAvailableAppointment" ServiceUri="/api/GS.Sub.Vistor/VisitorSelfServiceTerminal/VisitorAvailableAppointment" />
<Data Description="提交预约单到访" Key="SubmitVisitInfo" ServiceUri="/api/GS.Sub.Vistor/VisitorSelfServiceTerminal/SubmitVisitInfo" /> <Data Description="提交预约单到访" Key="SubmitVisitInfo" ServiceUri="/api/GS.Sub.Vistor/VisitorSelfServiceTerminal/SubmitVisitInfo" />
<Data Description="获取历史来访记录" Key="GetHistoryVisitInfo" ServiceUri="/api/GS.Sub.Vistor/VisitorSelfServiceTerminal/GetHistoryVisitInfo/{idnum}" />
</Datas> </Datas>
</Structure> </Structure>
</Structures> </Structures>
......
...@@ -78,6 +78,7 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core ...@@ -78,6 +78,7 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
internal void ShowDetail(List<Appointment> datas, IViewModel exitView = null) internal void ShowDetail(List<Appointment> datas, IViewModel exitView = null)
{ {
Handlers.GetHandler<HeadHandler>().Start();
if (datas?.Count == 0) if (datas?.Count == 0)
{ {
MainShell.ShowPrompt($"无效信息"); MainShell.ShowPrompt($"无效信息");
...@@ -93,7 +94,7 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core ...@@ -93,7 +94,7 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
item.endDate = ss.endDate; item.endDate = ss.endDate;
item.idCardNum = ss.visitorIdNum; item.idCardNum = ss.visitorIdNum;
item.phoneNum = ss.visitorPhone; item.phoneNum = ss.visitorPhone;
item.photoUrl = productPhotoUrl(ss.photo); item.photoUrl = Tools.ProductPhotoUrl(ss.photo);
item.startDate = ss.startDate; item.startDate = ss.startDate;
item.visitorName = ss.visitorName; item.visitorName = ss.visitorName;
item.visitPeople = ss.numberOfPeople; item.visitPeople = ss.numberOfPeople;
...@@ -106,7 +107,7 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core ...@@ -106,7 +107,7 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
items = g.Select(content => new ViewModels.Pages.AppointmentDetailPage.AppointmentExtendInfo items = g.Select(content => new ViewModels.Pages.AppointmentDetailPage.AppointmentExtendInfo
{ {
title = content.title, title = content.title,
content = content.type == "image" ? productPhotoUrl(content.content) : content.content, content = content.type == "image" ? Tools.ProductPhotoUrl(content.content) : content.content,
infotype = content.type infotype = content.type
}).ToList() }).ToList()
}).ToList(); }).ToList();
...@@ -118,9 +119,5 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core ...@@ -118,9 +119,5 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
ShowView(); ShowView();
} }
private string productPhotoUrl(string origin)
{
return $"{LocalSetting.AppConfig.WebPath.TrimEnd('/')}/FileStore/Image/{origin}?q=H";
}
} }
} }
...@@ -166,11 +166,13 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core ...@@ -166,11 +166,13 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
_faceWebSocket.Close(); _faceWebSocket.Close();
ThirdAddon.FastRecognization.Pause(_FaceEngineId); ThirdAddon.FastRecognization.Pause(_FaceEngineId);
ThirdAddon.FaceRecognization.UnRegistOutPutMatEvent(VideoOut); ThirdAddon.FaceRecognization.UnRegistOutPutMatEvent(VideoOut);
_waiter.Reset();
} }
private void VM_OnNavigateInto() private void VM_OnNavigateInto()
{ {
VM.AuthMode = ViewModels.Pages.AuthenticationPage.AuthenticationMode.Face; VM.AuthMode = ViewModels.Pages.AuthenticationPage.AuthenticationMode.Face;
Handlers.GetHandler<HeadHandler>().Start();
} }
private void VideoOut(Mat mat) private void VideoOut(Mat mat)
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace GS.Terminal.VisitorSelfService.Logic.Core
{
public class HeadHandler : Corebase<ViewModels.Head>
{
private Task _mainTask;
private EventWaitHandle _Waiter = new EventWaitHandle(false, EventResetMode.ManualReset);
public override void Init()
{
_mainTask = Task.Factory.StartNew(async () =>
{
while (true)
{
_Waiter.WaitOne();
await Task.Delay(1000);
VM.Downcount--;
if (VM.Downcount == 0)
{
ThirdAddon.LogicShell.ShowView(vmLocator.MenuPage);
Stop();
}
}
});
}
public void Start(int downcount = 60)
{
VM.Downcount = downcount;
VM.Show = true;
_Waiter.Set();
}
public void Stop()
{
VM.Show = false;
_Waiter.Reset();
}
}
}
...@@ -28,11 +28,12 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core ...@@ -28,11 +28,12 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
private void VM_OnVisitInfoClick() private void VM_OnVisitInfoClick()
{ {
Handlers.GetHandler<HistoryVisitPageHandler>()?.ShowView(_idNum, VM);
} }
public void ShowView(string idNum) public void ShowView(string idNum)
{ {
Handlers.GetHandler<HeadHandler>().Start();
_idNum = idNum; _idNum = idNum;
ShowView(); ShowView();
} }
......
using GS.Terminal.LogicShell.Interface; using GalaSoft.MvvmLight.Threading;
using GS.Terminal.LogicShell.Interface;
using GS.Terminal.VisitorSelfService.Logic.Remote;
using GS.Terminal.VisitorSelfService.Logic.Remote.Models;
using GS.Terminal.VisitorSelfService.Logic.ThirdAddon;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -10,13 +14,102 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core ...@@ -10,13 +14,102 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
public class HistoryVisitPageHandler : Corebase<ViewModels.Pages.HistoryVisitPage.ViewModel> public class HistoryVisitPageHandler : Corebase<ViewModels.Pages.HistoryVisitPage.ViewModel>
{ {
public string _IDNum; public string _IDNum;
private IViewModel _backview;
private int _currentpage = 1;
private const int PAGESIZE = 5;
public override void Init() public override void Init()
{ {
VM.OnBackClicked += VM_OnBackClicked;
VM.OnNavigateInto += VM_OnNavigateInto;
VM.OnNavigateOut += VM_OnNavigateOut;
VM.OnMoreClicked += VM_OnMoreClicked;
}
private void VM_OnMoreClicked()
{
_currentpage++;
MainShell.ShowLoading("加载中...");
search().ContinueWith(task =>
{
MainShell.HideLoading();
if (!task.Result)
_currentpage--;
});
}
private void VM_OnNavigateOut()
{
VM.Datas = new System.Collections.ObjectModel.ObservableCollection<ViewModels.Pages.HistoryVisitPage.VisitInfoItem>();
_IDNum = "";
_backview = null;
}
private void VM_OnNavigateInto()
{
Handlers.GetHandler<HeadHandler>().Start();
_currentpage = 0;
VM_OnMoreClicked();
}
private async Task<bool> search()
{
var serviceUri = LocalSetting.ServiceList.GetSerivceUri("GetHistoryVisitInfo");
serviceUri = serviceUri.Replace("{idnum}", _IDNum);
var response = await WebApi.PostAsync<WebApiPagingResponseBody<HistoryVisitInfo>>(serviceUri, new
{
paging = new
{
currentIndex = _currentpage,
pageSize = PAGESIZE
}
});
if (response != null)
{
if (response.Status)
{
if (response.paging != null)//如果服务端没有返回分页信息,那就通过返回的记录数判断是否是最后一页
{
VM.IsLastPage = response.paging.currentIndex == response.paging.totalPage;
}
else
{
VM.IsLastPage = !(response.records != null && response.records.Count == 0);
}
foreach (var item in response.records ?? new List<HistoryVisitInfo>())
{
DispatcherHelper.CheckBeginInvokeOnUI(() =>
{
VM.Datas.Add(new ViewModels.Pages.HistoryVisitPage.VisitInfoItem
{
Id = item.visitInfoId,
SignInPlace = item.signInPlace,
SignOut = item.signOut,
VisitorIdNum = item.visitorIdNum,
VisitorName = item.visitorName,
VisitorPhone = item.visitorPhone,
VisitPerson = item.visitPerson,
VisitTime = item.visitTime,
Photo = Tools.ProductPhotoUrl(item.photo)
});
});
}
return true;
}
}
ThirdAddon.MainShell.ShowPrompt("通讯异常.");
return false;
}
private void VM_OnBackClicked()
{
ThirdAddon.LogicShell.ShowView(_backview ?? vmLocator.MenuPage);
} }
public void ShowView(string idnum, IViewModel backview = null) public void ShowView(string idnum, IViewModel backview = null)
{ {
_IDNum = idnum; _IDNum = idnum;
_backview = backview;
ShowView(); ShowView();
} }
} }
......
...@@ -13,6 +13,12 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core ...@@ -13,6 +13,12 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
public override void Init() public override void Init()
{ {
VM.OnMenuItemClick += VM_OnMenuItemClick; VM.OnMenuItemClick += VM_OnMenuItemClick;
VM.OnNavigateInto += VM_OnNavigateInto;
}
private void VM_OnNavigateInto(LogicShell.Interface.IViewModel obj)
{
Handlers.GetHandler<HeadHandler>().Stop();
} }
private void VM_OnMenuItemClick(ViewModels.Pages.MenuPage.MenuItemType menuItem) private void VM_OnMenuItemClick(ViewModels.Pages.MenuPage.MenuItemType menuItem)
...@@ -59,7 +65,7 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core ...@@ -59,7 +65,7 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
} }
else if (mode == AuthenticationMode.IdCard) else if (mode == AuthenticationMode.IdCard)
{ {
Handlers.GetHandler<HistoryMenuPageHandler>()?.ShowView(((dynamic)data).idnum); Handlers.GetHandler<HistoryMenuPageHandler>()?.ShowView(((dynamic)data).number);
} }
return true; return true;
} }
......
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
<Compile Include="Core\Corebase.cs" /> <Compile Include="Core\Corebase.cs" />
<Compile Include="Core\FeatureCompareHandler.cs" /> <Compile Include="Core\FeatureCompareHandler.cs" />
<Compile Include="Core\FootHandler.cs" /> <Compile Include="Core\FootHandler.cs" />
<Compile Include="Core\HeadHandler.cs" />
<Compile Include="Core\HistoryAppointmentPageHandler.cs" /> <Compile Include="Core\HistoryAppointmentPageHandler.cs" />
<Compile Include="Core\HistoryMenuPageHandler.cs" /> <Compile Include="Core\HistoryMenuPageHandler.cs" />
<Compile Include="Core\HistoryVisitPageHandler.cs" /> <Compile Include="Core\HistoryVisitPageHandler.cs" />
...@@ -121,6 +122,7 @@ ...@@ -121,6 +122,7 @@
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Remote\Models\Appointment.cs" /> <Compile Include="Remote\Models\Appointment.cs" />
<Compile Include="Remote\Models\HistoryVisitInfo.cs" />
<Compile Include="Remote\Models\WebApiCollectionResponseBody.cs" /> <Compile Include="Remote\Models\WebApiCollectionResponseBody.cs" />
<Compile Include="Remote\Models\WebApiPagingResponseBody.cs" /> <Compile Include="Remote\Models\WebApiPagingResponseBody.cs" />
<Compile Include="Remote\Models\WebApiResponseBody.cs" /> <Compile Include="Remote\Models\WebApiResponseBody.cs" />
...@@ -132,6 +134,7 @@ ...@@ -132,6 +134,7 @@
<Compile Include="ThirdAddon\LogicShell.cs" /> <Compile Include="ThirdAddon\LogicShell.cs" />
<Compile Include="ThirdAddon\MainShell.cs" /> <Compile Include="ThirdAddon\MainShell.cs" />
<Compile Include="ThirdAddon\TerminalConsole.cs" /> <Compile Include="ThirdAddon\TerminalConsole.cs" />
<Compile Include="Tools.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GS.Terminal.VisitorSelfService.Logic.Remote.Models
{
public class HistoryVisitInfo
{
public Guid visitInfoId { get; set; }
public string visitorName { get; set; }
public string photo { get; set; }
public string visitorIdNum { get; set; }
public string visitorPhone { get; set; }
public string visitPerson { get; set; }
public DateTime visitTime { get; set; }
public bool signOut { get; set; }
public string signInPlace { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GS.Terminal.VisitorSelfService.Logic
{
public static class Tools
{
public static string ProductPhotoUrl(string resourceid)
{
return $"{LocalSetting.AppConfig.WebPath.TrimEnd('/')}/FileStore/Image/{resourceid}?q=H";
}
}
}
...@@ -12,6 +12,23 @@ namespace ViewModels ...@@ -12,6 +12,23 @@ namespace ViewModels
{ {
public string ViewID => "e6e8e46f-c8e6-4f34-b088-bba5b9276276"; public string ViewID => "e6e8e46f-c8e6-4f34-b088-bba5b9276276";
private int _Downcount;
public int Downcount
{
get { return _Downcount; }
set { _Downcount = value; RaisePropertyChanged("Downcount"); }
}
private bool _Show;
public bool Show
{
get { return _Show; }
set { _Show = value; RaisePropertyChanged("Show"); }
}
public void Reset() public void Reset()
{ {
......
using GalaSoft.MvvmLight; using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using GS.Terminal.LogicShell.Interface; using GS.Terminal.LogicShell.Interface;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace ViewModels.Pages.HistoryVisitPage namespace ViewModels.Pages.HistoryVisitPage
{ {
public partial class ViewModel : ViewModelBase, IViewModel public partial class ViewModel : ViewModelBase, IViewModel, IViewModelBehavior
{ {
public string ViewID => "e07d718f-dd64-45e8-8fbe-5d8196d3eb59"; public string ViewID => "e07d718f-dd64-45e8-8fbe-5d8196d3eb59";
private ObservableCollection<VisitInfoItem> _Datas;
public ObservableCollection<VisitInfoItem> Datas
{
get { return _Datas ?? (_Datas = new ObservableCollection<VisitInfoItem>()); }
set { _Datas = value; RaisePropertyChanged("Datas"); }
}
public event Action OnBackClicked;
public RelayCommand BackCommand => new RelayCommand(() =>
{
OnBackClicked?.Invoke();
});
public event Action OnMoreClicked;
public RelayCommand MoreCommand => new RelayCommand(() =>
{
OnMoreClicked?.Invoke();
});
private bool _IsLastPage;
public bool IsLastPage
{
get { return _IsLastPage; }
set { _IsLastPage = value; RaisePropertyChanged("IsLastPage"); }
}
public void Reset() public void Reset()
{ {
throw new NotImplementedException();
}
public event Action OnNavigateInto;
public void NavigateInto(IViewModel from)
{
OnNavigateInto?.Invoke();
} }
public event Action OnNavigateOut;
public void NavigateOut(IViewModel to)
{
OnNavigateOut?.Invoke();
}
}
public class VisitInfoItem
{
public Guid Id { get; set; }
public string VisitorName { get; set; }
public string Photo { get; set; }
public string VisitorIdNum { get; set; }
public string VisitorPhone { get; set; }
public string VisitPerson { get; set; }
public DateTime VisitTime { get; set; }
public bool SignOut { get; set; }
public string SignInPlace { get; set; }
} }
} }
...@@ -16,7 +16,7 @@ namespace ViewModels.Pages.MenuPage ...@@ -16,7 +16,7 @@ namespace ViewModels.Pages.MenuPage
NoAppointment, NoAppointment,
History History
} }
public partial class ViewModel : ViewModelBase, IViewModel public partial class ViewModel : ViewModelBase, IViewModel, IViewModelBehavior
{ {
public string ViewID => "31fa8506-2213-44a4-bd07-a68fba474038"; public string ViewID => "31fa8506-2213-44a4-bd07-a68fba474038";
...@@ -49,5 +49,16 @@ namespace ViewModels.Pages.MenuPage ...@@ -49,5 +49,16 @@ namespace ViewModels.Pages.MenuPage
{ {
} }
public event Action<IViewModel> OnNavigateInto;
public void NavigateInto(IViewModel from)
{
OnNavigateInto?.Invoke(from);
}
public void NavigateOut(IViewModel to)
{
}
} }
} }
...@@ -7,14 +7,18 @@ ...@@ -7,14 +7,18 @@
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="180" d:DesignWidth="800" d:DesignHeight="180" d:DesignWidth="800"
Title="Head"> Title="Head">
<Page.Resources>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
</Page.Resources>
<Grid> <Grid>
<Border Width="100" Height="100" CornerRadius="50" <Border Width="100" Height="100" CornerRadius="50"
Visibility="{Binding Show, Converter={StaticResource BooleanToVisibilityConverter}}"
HorizontalAlignment="Right" Margin="0,0,30,0" HorizontalAlignment="Right" Margin="0,0,30,0"
BorderThickness="4" BorderBrush="#4070ff"> BorderThickness="4" BorderBrush="#4070ff">
<TextBlock Foreground="#4070ff" HorizontalAlignment="Center" VerticalAlignment="Center" <TextBlock Foreground="#4070ff" HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="60" FontSize="60"
Text="59"> Text="{Binding Downcount}">
</TextBlock> </TextBlock>
</Border> </Border>
</Grid> </Grid>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition/> <ColumnDefinition/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Command="{Binding VisitInfoCommand}"> <Button Command="{Binding AppointmentCommand}">
<Button.Template> <Button.Template>
<ControlTemplate TargetType="Button"> <ControlTemplate TargetType="Button">
<Grid> <Grid>
...@@ -33,13 +33,13 @@ ...@@ -33,13 +33,13 @@
<RowDefinition Height="320"/> <RowDefinition Height="320"/>
<RowDefinition/> <RowDefinition/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<gs:ImageButtonFix Width="320" Image="/Views;component/Resources/history_appointment.png"/> <gs:ImageButtonFix Command="{TemplateBinding Command}" Width="320" Image="/Views;component/Resources/history_appointment.png"/>
<TextBlock Text="历史预约单" FontSize="48" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"/> <TextBlock Text="历史预约单" FontSize="48" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid> </Grid>
</ControlTemplate> </ControlTemplate>
</Button.Template> </Button.Template>
</Button> </Button>
<Button Grid.Column="1" Command="{Binding AppointmentCommand}"> <Button Grid.Column="1" Command="{Binding VisitInfoCommand}">
<Button.Template> <Button.Template>
<ControlTemplate TargetType="Button"> <ControlTemplate TargetType="Button">
<Grid> <Grid>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<RowDefinition Height="320"/> <RowDefinition Height="320"/>
<RowDefinition/> <RowDefinition/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<gs:ImageButtonFix Width="320" Image="/Views;component/Resources/history_visit.png"/> <gs:ImageButtonFix Command="{TemplateBinding Command}" Width="320" Image="/Views;component/Resources/history_visit.png"/>
<TextBlock Text="历史到访记录" FontSize="48" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"/> <TextBlock Text="历史到访记录" FontSize="48" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid> </Grid>
</ControlTemplate> </ControlTemplate>
......
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Views.Pages.HistoryVisitPage">
<ControlTemplate x:Key="HistoryVisit_ListItem_Signout" TargetType="ListViewItem">
<Border BorderThickness="4" BorderBrush="#7F62ba67"
Margin="0,50,0,0" Padding="36"
Background="#0C62ba67"
CornerRadius="5" Height="410">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="272"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!--照片 姓名-->
<StackPanel>
<Grid>
<Image Source="{Binding Photo}" Stretch="Fill" Width="200" Height="270"/>
</Grid>
<TextBlock Text="{Binding VisitorName}" FontSize="42" Margin="0,10,0,0" HorizontalAlignment="Center"/>
</StackPanel>
<!--基本信息-->
<StackPanel Grid.Column="1">
<StackPanel.Resources>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="#2a2b2d"/>
</Style>
</StackPanel.Resources>
<TextBlock HorizontalAlignment="Right" FontSize="36" Margin="0,26,0,0" Text="{Binding VisitTime,StringFormat='yyyy-MM-dd HH:mm:ss'}"/>
<TextBlock HorizontalAlignment="Right" FontSize="30" Margin="0,20,0,0" Text="{Binding SignInPlace}"/>
<TextBlock HorizontalAlignment="Right" FontSize="30" Margin="0,20,0,0" Text="{Binding VisitPerson}" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis"/>
<TextBlock HorizontalAlignment="Right" FontSize="30" Margin="0,20,0,0" Text="{Binding VisitorPhone}"/>
<TextBlock HorizontalAlignment="Right" FontSize="40" Margin="0,26,0,0" Text="已离开" FontWeight="Black" Foreground="#62ba67"/>
</StackPanel>
</Grid>
</Border>
</ControlTemplate>
<ControlTemplate x:Key="HistoryVisit_ListItem_Sign" TargetType="ListViewItem">
<Border BorderThickness="4" BorderBrush="#7Ff38900"
Margin="0,50,0,0" Padding="36"
Background="#0CF38900"
CornerRadius="5" Height="410">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="272"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!--照片 姓名-->
<StackPanel>
<Grid>
<Image Source="{Binding Photo}" Stretch="Fill" Width="200" Height="270"/>
</Grid>
<TextBlock Text="{Binding VisitorName}" FontSize="42" Margin="0,10,0,0" HorizontalAlignment="Center"/>
</StackPanel>
<!--基本信息-->
<StackPanel Grid.Column="1">
<StackPanel.Resources>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="#2a2b2d"/>
</Style>
</StackPanel.Resources>
<TextBlock HorizontalAlignment="Right" FontSize="36" Margin="0,26,0,0" Text="{Binding VisitTime,StringFormat='yyyy-MM-dd HH:mm:ss'}"/>
<TextBlock HorizontalAlignment="Right" FontSize="30" Margin="0,20,0,0" Text="{Binding SignInPlace}"/>
<TextBlock HorizontalAlignment="Right" FontSize="30" Margin="0,20,0,0" Text="{Binding VisitPerson}" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis"/>
<TextBlock HorizontalAlignment="Right" FontSize="30" Margin="0,20,0,0" Text="{Binding VisitorPhone}"/>
<TextBlock HorizontalAlignment="Right" FontSize="40" Margin="0,26,0,0" Text="未离开" FontWeight="Black" Foreground="#f38900"/>
</StackPanel>
</Grid>
</Border>
</ControlTemplate>
</ResourceDictionary>
\ No newline at end of file
...@@ -154,6 +154,10 @@ ...@@ -154,6 +154,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="Pages\HistoryVisitPage\Style.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\MenuPage\Index.xaml"> <Page Include="Pages\MenuPage\Index.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
......
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