|
|
|
@ -168,12 +168,13 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="modal-backdrop" :class="{ open: createTaskOpen }" @click.self="createTaskOpen = false"> |
|
|
|
<div class="modal add-dock-dialog task-dialog" role="dialog" aria-modal="true" aria-label="新建任务"> |
|
|
|
<header> |
|
|
|
<div><span>任务管理</span><h3>新建任务</h3></div> |
|
|
|
<button class="icon-button" type="button" @click="createTaskOpen = false"><svg><use href="#i-x" /></svg></button> |
|
|
|
</header> |
|
|
|
<t-dialog |
|
|
|
v-model:visible="createTaskOpen" |
|
|
|
header="新建任务" |
|
|
|
width="520px" |
|
|
|
dialog-class-name="add-dock-dialog task-dialog" |
|
|
|
placement="center" |
|
|
|
> |
|
|
|
<form novalidate @submit.prevent="submitCreateTask"> |
|
|
|
<label><span>任务名称<b>*</b></span><t-input v-model="taskForm.name" :maxlength="40" placeholder="例如:园区西侧道路巡检" /></label> |
|
|
|
<div class="form-row"> |
|
|
|
@ -203,27 +204,32 @@ |
|
|
|
<label class="task-video-option"><span><strong>原始视频录制</strong><small>任务结束后自动上传原始文件</small></span><t-switch v-model="taskForm.rawRecordingEnabled" /></label> |
|
|
|
</div> |
|
|
|
<div class="form-error">{{ taskFormError }}</div> |
|
|
|
<footer> |
|
|
|
<button class="plain-command" type="button" @click="createTaskOpen = false">取消</button> |
|
|
|
<button class="primary-command" type="submit" :disabled="creatingTask">{{ creatingTask ? '创建中…' : '创建任务' }}</button> |
|
|
|
</footer> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="modal-backdrop" :class="{ open: waypointEditorOpen }" @click.self="closeWaypointEditor"> |
|
|
|
<div class="modal add-dock-dialog waypoint-dialog" role="dialog" aria-modal="true" aria-label="编辑航点"> |
|
|
|
<header><div><span>航线编辑</span><h3>编辑航点 {{ editingWaypointIndex + 1 }}</h3></div><button class="icon-button" type="button" @click="closeWaypointEditor"><svg><use href="#i-x" /></svg></button></header> |
|
|
|
<template #footer> |
|
|
|
<button class="plain-command" type="button" @click="createTaskOpen = false">取消</button> |
|
|
|
<button class="primary-command" type="button" :disabled="creatingTask" @click="submitCreateTask">{{ creatingTask ? '创建中…' : '创建任务' }}</button> |
|
|
|
</template> |
|
|
|
</t-dialog> |
|
|
|
|
|
|
|
<t-dialog |
|
|
|
v-model:visible="waypointEditorOpen" |
|
|
|
:header="`编辑航点 ${editingWaypointIndex + 1}`" |
|
|
|
width="540px" |
|
|
|
dialog-class-name="add-dock-dialog waypoint-dialog" |
|
|
|
placement="center" |
|
|
|
> |
|
|
|
<form novalidate @submit.prevent="saveWaypoint"> |
|
|
|
<div class="waypoint-id-row"><span>航点 ID</span><strong>{{ editingWaypointIndex + 1 }}</strong></div> |
|
|
|
<div class="form-row"><label><span>经度 <b>*</b></span><t-input-number v-model="waypointForm.longitude" theme="normal" :min="-180" :max="180" :step="0.000001" style="width: 100%" /></label><label><span>纬度 <b>*</b></span><t-input-number v-model="waypointForm.latitude" theme="normal" :min="-90" :max="90" :step="0.000001" style="width: 100%" /></label></div> |
|
|
|
<div class="form-row"><label><span>高度 <b>*</b></span><div class="number-input"><t-input-number v-model="waypointForm.altitude" theme="normal" :min="20" :max="120" style="width: 100%" /><em>m</em></div></label><label><span>速度 <b>*</b></span><div class="number-input"><t-input-number v-model="waypointForm.speed" theme="normal" :min="1" :max="20" :step="0.1" style="width: 100%" /><em>m/s</em></div></label></div> |
|
|
|
<label><span>转弯方式</span><div class="mode-segment waypoint-turn-segment"><button type="button" :class="{ active: waypointForm.turnMode === 'auto' }" @click="waypointForm.turnMode = 'auto'">自动转弯</button><button type="button" :class="{ active: waypointForm.turnMode === 'stop' }" @click="waypointForm.turnMode = 'stop'">定点转弯</button></div></label> |
|
|
|
<div class="route-form-error">{{ waypointFormError }}</div> |
|
|
|
<footer><button class="plain-command" type="button" @click="closeWaypointEditor">取消</button><button class="primary-command" type="submit">保存航点</button></footer> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<template #footer> |
|
|
|
<button class="plain-command" type="button" @click="closeWaypointEditor">取消</button> |
|
|
|
<button class="primary-command" type="button" @click="saveWaypoint">保存航点</button> |
|
|
|
</template> |
|
|
|
</t-dialog> |
|
|
|
</section> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -978,10 +984,6 @@ async function downloadRawVideo(record) { |
|
|
|
.toolbar-group :deep(.t-select) { |
|
|
|
flex-shrink: 0; |
|
|
|
} |
|
|
|
.add-dock-dialog :deep(.t-input), |
|
|
|
.add-dock-dialog :deep(.t-input-number), |
|
|
|
.add-dock-dialog :deep(.t-select), |
|
|
|
.add-dock-dialog :deep(.t-time-picker), |
|
|
|
.route-config-panel :deep(.t-input), |
|
|
|
.route-config-panel :deep(.t-input-number) { |
|
|
|
width: 100%; |
|
|
|
@ -996,3 +998,12 @@ async function downloadRawVideo(record) { |
|
|
|
justify-self: end; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|
|
|
|
<style> |
|
|
|
.add-dock-dialog .t-input, |
|
|
|
.add-dock-dialog .t-input-number, |
|
|
|
.add-dock-dialog .t-select, |
|
|
|
.add-dock-dialog .t-time-picker { |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|