()
| 1165 | } |
| 1166 | |
| 1167 | async function continueWithNextDataCollection() { |
| 1168 | const collectionInfo = document.getElementById('collectionInfo'); |
| 1169 | |
| 1170 | try { |
| 1171 | // 重置UI状态 |
| 1172 | resetUIState(); |
| 1173 | |
| 1174 | // 发送新的任务描述到后端 |
| 1175 | await sendTaskDescription(currentTaskDescription); |
| 1176 | |
| 1177 | // 更新状态显示 |
| 1178 | collectionInfo.innerHTML = `应用:${currentAppName} | 类型:${currentTaskType}<br/>任务:${currentTaskDescription}`; |
| 1179 | |
| 1180 | // 自动获取新截图 |
| 1181 | await takeScreenshot(); |
| 1182 | |
| 1183 | // 重置suspend状态 |
| 1184 | isSuspended = false; |
| 1185 | const suspendBtn = document.getElementById('suspendBtn'); |
| 1186 | suspendBtn.classList.remove('suspended'); |
| 1187 | suspendBtn.textContent = '🚫 人工介入'; |
| 1188 | |
| 1189 | // 自动开启自动刷新功能 |
| 1190 | if (!autoRefreshEnabled) { |
| 1191 | startAutoRefresh(); |
| 1192 | const autoRefreshBtn = document.getElementById('autoRefreshBtn'); |
| 1193 | autoRefreshBtn.textContent = '⏹️ 停止刷新'; |
| 1194 | const statusPanel = document.getElementById('autoRefreshStatus'); |
| 1195 | statusPanel.style.display = 'block'; |
| 1196 | } |
| 1197 | |
| 1198 | updateStatus(`已切换下一条数据,自动刷新已开启`, 'success'); |
| 1199 | |
| 1200 | } catch (error) { |
| 1201 | updateStatus(`切换到下一条数据失败: ${error.message}`, 'error'); |
| 1202 | } |
| 1203 | } |
| 1204 | |
| 1205 | // 文本输入功能 |
| 1206 | function showInputModal() { |
no test coverage detected