|
|
|
|
@ -18,7 +18,7 @@
@@ -18,7 +18,7 @@
|
|
|
|
|
@if (isTargetOperationInProgress) |
|
|
|
|
{ |
|
|
|
|
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span> |
|
|
|
|
<span>@(isTargetActive ? "停止中..." : "启动中...")</span> |
|
|
|
|
<span>@(isTargetActive ? "启动中..." : "停止中...")</span> |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
@ -36,6 +36,22 @@
@@ -36,6 +36,22 @@
|
|
|
|
|
<p>空轨移动中,请等待...</p> |
|
|
|
|
</div> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
<div class="form-group"> |
|
|
|
|
<label for="deviceId">校准零点位置:</label> |
|
|
|
|
<InputNumber id="deviceId" class="form-control" @bind-Value="@MoveStep" /> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="control-section"> |
|
|
|
|
<button class="btn btn-primary" @onclick="SetPosition"> |
|
|
|
|
<span>调整零点位置</span> |
|
|
|
|
</button> |
|
|
|
|
<button class="btn btn-info" @onclick="SetZero"> |
|
|
|
|
<span>设置零点</span> |
|
|
|
|
</button> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
@code { |
|
|
|
|
@ -44,6 +60,7 @@
@@ -44,6 +60,7 @@
|
|
|
|
|
private bool isTargetActive = false; |
|
|
|
|
private bool isTargetOperationInProgress = false; |
|
|
|
|
public ModelTrackControl ModelTrackControl { set; get; } |
|
|
|
|
public int MoveStep { set; get; } = 0; |
|
|
|
|
protected override void OnInitialized() |
|
|
|
|
{ |
|
|
|
|
ModelTrackControl = this.GetModule<ModelTrackControl>(); |
|
|
|
|
@ -73,6 +90,14 @@
@@ -73,6 +90,14 @@
|
|
|
|
|
StateHasChanged(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void SetPosition(){ |
|
|
|
|
this.ModelTrackControl.SetTargetPosition(MoveStep); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void SetZero(){ |
|
|
|
|
this.ModelTrackControl.ManualClear(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
<style> |
|
|
|
|
@ -169,4 +194,21 @@
@@ -169,4 +194,21 @@
|
|
|
|
|
align-items: center; |
|
|
|
|
z-index: 100; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.form-group { |
|
|
|
|
margin-bottom: 1.5rem; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.form-group label { |
|
|
|
|
display: block; |
|
|
|
|
margin-bottom: 0.5rem; |
|
|
|
|
font-weight: 500; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.form-control { |
|
|
|
|
width: 100%; |
|
|
|
|
padding: 0.5rem; |
|
|
|
|
border: 1px solid #ced4da; |
|
|
|
|
border-radius: 0.25rem; |
|
|
|
|
} |
|
|
|
|
</style> |