|
@@ -467,7 +467,7 @@
|
|
|
<!-- 速度滑块 -->
|
|
<!-- 速度滑块 -->
|
|
|
<div class="speed-slider">
|
|
<div class="speed-slider">
|
|
|
<span class="label">{{ t('速度') }}</span>
|
|
<span class="label">{{ t('速度') }}</span>
|
|
|
- <el-slider v-model="ptzSpeed" :min="10" :max="100" :step="10" size="small" />
|
|
|
|
|
|
|
+ <el-slider v-model="ptzSpeed" :min="1" :max="100" :step="1" size="small" />
|
|
|
<span class="value">{{ ptzSpeed }}</span>
|
|
<span class="value">{{ ptzSpeed }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</el-collapse-item>
|
|
</el-collapse-item>
|
|
@@ -1576,20 +1576,14 @@ function cancelEditPresetName() {
|
|
|
editingPresetName.value = ''
|
|
editingPresetName.value = ''
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// 保存预置位名称
|
|
|
|
|
-async function savePresetName(preset: LocalPreset) {
|
|
|
|
|
|
|
+// 保存预置位名称(仅更新本地,不立即调用API)
|
|
|
|
|
+function savePresetName(preset: LocalPreset) {
|
|
|
const newName = editingPresetName.value.trim()
|
|
const newName = editingPresetName.value.trim()
|
|
|
if (!newName || newName === preset.name) {
|
|
if (!newName || newName === preset.name) {
|
|
|
cancelEditPresetName()
|
|
cancelEditPresetName()
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const cameraId = currentMediaStream.value?.cameraId
|
|
|
|
|
- if (!cameraId) {
|
|
|
|
|
- cancelEditPresetName()
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
// 找到对应的时间轴点(通过 pointId)
|
|
// 找到对应的时间轴点(通过 pointId)
|
|
|
const point = timelinePoints.value.find((p) => p.id === preset.pointId)
|
|
const point = timelinePoints.value.find((p) => p.id === preset.pointId)
|
|
|
if (!point) {
|
|
if (!point) {
|
|
@@ -1597,27 +1591,10 @@ async function savePresetName(preset: LocalPreset) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- try {
|
|
|
|
|
- const res = await presetSet({
|
|
|
|
|
- cameraId,
|
|
|
|
|
- presetId: point.presetId!, // 使用实际的 presetId
|
|
|
|
|
- presetName: newName
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- if (res.code === 200) {
|
|
|
|
|
- // 更新本地时间轴点的名称
|
|
|
|
|
- point.presetName = newName
|
|
|
|
|
- saveTimelineConfig()
|
|
|
|
|
- ElMessage.success(t('名称已更新'))
|
|
|
|
|
- } else {
|
|
|
|
|
- ElMessage.error(res.errMsg || t('更新失败'))
|
|
|
|
|
- }
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- console.error('更新预置位名称失败', error)
|
|
|
|
|
- ElMessage.error(t('更新失败'))
|
|
|
|
|
- } finally {
|
|
|
|
|
- cancelEditPresetName()
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 仅更新本地状态,不调用API(等用户点击"设置"按钮时才保存到后端)
|
|
|
|
|
+ point.presetName = newName
|
|
|
|
|
+ saveTimelineConfig()
|
|
|
|
|
+ cancelEditPresetName()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 跳转到本地预置位
|
|
// 跳转到本地预置位
|
|
@@ -2554,7 +2531,7 @@ onMounted(async () => {
|
|
|
top: 0;
|
|
top: 0;
|
|
|
left: 0;
|
|
left: 0;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
- background: linear-gradient(to right, #cfcfcf, #f8f8f8);
|
|
|
|
|
|
|
+ background: linear-gradient(to right, #e0ecfc, #d0e4ff);
|
|
|
border-radius: 2px 0 0 2px;
|
|
border-radius: 2px 0 0 2px;
|
|
|
pointer-events: none;
|
|
pointer-events: none;
|
|
|
transition: width 0.3s ease;
|
|
transition: width 0.3s ease;
|
|
@@ -2631,12 +2608,9 @@ onMounted(async () => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
&.passed {
|
|
&.passed {
|
|
|
- background: #818cf8; // 巡航走过 - 主题色(紫蓝色)
|
|
|
|
|
- box-shadow: 0 0 8px rgba(129, 140, 248, 0.6);
|
|
|
|
|
-
|
|
|
|
|
- // .point-number {
|
|
|
|
|
- // color: #fff;
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ background: var(--color-primary); // 巡航走过 - 主题色(紫蓝色)
|
|
|
|
|
+ color: white;
|
|
|
|
|
+ box-shadow: 0 0 8px rgba(var(--color-primary-light-3), 0.6);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
&.dragging {
|
|
&.dragging {
|