修复工单Bug
This commit is contained in:
1 parent
7982f7e348
commit
8e0cc20649
12 files changed
+602
-236
No files matched your search
@@ -18,38 +18,21 @@ public partial class OrderSupportTicketView : UserControl
|
||||
private Window _hostWindow;
|
||||
|
||||
public OrderSupportTicketView()
|
||||
: this(
|
||||
new TicketApiService(),
|
||||
new EventSourceTicketRealtimeService(),
|
||||
CreateDefaultOptions(),
|
||||
ownsRealtime: true)
|
||||
{
|
||||
}
|
||||
|
||||
public OrderSupportTicketView(
|
||||
ITicketApiService api,
|
||||
ITicketRealtimeService realtime,
|
||||
TicketClientOptions options = null)
|
||||
: this(api, realtime, options, ownsRealtime: true)
|
||||
: this(new TicketService(), CreateDefaultOptions())
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建工单页。ownsRealtime 为 false 时复用宿主提供的共享 SSE 连接,
|
||||
/// 页面关闭不会停止该连接。
|
||||
/// 使用工单业务服务创建工单页。
|
||||
/// </summary>
|
||||
public OrderSupportTicketView(
|
||||
ITicketApiService api,
|
||||
ITicketRealtimeService realtime,
|
||||
TicketClientOptions options,
|
||||
bool ownsRealtime)
|
||||
TicketService ticketService,
|
||||
TicketClientOptions options = null)
|
||||
{
|
||||
InitializeComponent();
|
||||
ViewModel = new OrderSupportTicketViewModel(
|
||||
api,
|
||||
realtime,
|
||||
options ?? CreateDefaultOptions(),
|
||||
ownsRealtime);
|
||||
ticketService,
|
||||
options ?? CreateDefaultOptions());
|
||||
DataContext = ViewModel;
|
||||
Loaded += OnLoaded;
|
||||
Unloaded += OnUnloaded;
|
||||
|
||||
Reference in new issue
Block a user