diff --git a/frontend/src/views/PowerControl.vue b/frontend/src/views/PowerControl.vue index 2e3744c..ca9977e 100644 --- a/frontend/src/views/PowerControl.vue +++ b/frontend/src/views/PowerControl.vue @@ -42,9 +42,6 @@ @@ -58,7 +55,6 @@ ▸ 打开供电 @@ -66,7 +62,6 @@ ■ 关闭供电 @@ -80,9 +75,6 @@ @@ -96,7 +88,6 @@ ▸ 打开供电 @@ -104,7 +95,6 @@ ■ 关闭供电 @@ -118,23 +108,18 @@

控制扫描过程的启动与停止。

-

确保 Scanner 电源已开启后再启动扫描。

▶ 启动扫描 @@ -142,17 +127,11 @@ ■ 停止扫描
- -
- - 扫描进行中... -
@@ -195,10 +174,7 @@ const hvsLoading = ref(false) const scannerLoading = ref(false) // 扫描状态 -const scanStatus = ref<'ready' | 'running' | 'stopped'>('ready') const scanLoading = ref(false) -const scanProgress = ref(0) -let scanProgressInterval: number | null = null // 操作日志 const operationLogs = ref>([ @@ -287,14 +263,6 @@ const controlScan = async (action: 'start' | 'stop') => { if (response.data.status === 'success') { ElMessage.success(`扫描${actionText}成功`) addLog('success', `扫描${actionText}成功`) - - if (action === 'start') { - scanStatus.value = 'running' - startScanProgress() - } else { - scanStatus.value = 'stopped' - stopScanProgress() - } } else { ElMessage.error('操作失败') addLog('error', `扫描${actionText}失败`) @@ -308,25 +276,6 @@ const controlScan = async (action: 'start' | 'stop') => { } } -// 开始扫描进度 -const startScanProgress = () => { - scanProgress.value = 0 - scanProgressInterval = window.setInterval(() => { - if (scanProgress.value < 95) { - scanProgress.value += Math.random() * 5 - } - }, 500) -} - -// 停止扫描进度 -const stopScanProgress = () => { - if (scanProgressInterval) { - clearInterval(scanProgressInterval) - scanProgressInterval = null - } - scanProgress.value = 100 -} - // 添加日志 const addLog = (type: string, message: string) => { operationLogs.value.unshift({ @@ -450,20 +399,6 @@ h2 { border-left: 4px solid #409eff; } -.scan-progress { - margin-top: 20px; - padding-top: 16px; - border-top: 1px dashed #ebeef5; -} - -.progress-text { - display: block; - text-align: center; - margin-top: 8px; - color: #409eff; - font-size: 14px; -} - .control-content { padding: 20px; }