新增日志
This commit is contained in:
@@ -59,11 +59,11 @@
|
||||
</div>
|
||||
<img v-if="isWifi" style="position: absolute; right: 20px; top: 10px; height: 30px;" src="@/assets/wifi.png"></img>
|
||||
<MultiLineInputDialog v-model:visible="showDialog" :initialText='initialTextStr' :title="dialogTitle"
|
||||
:index="selectedDevice" @confirm="onDialogConfirm" @cancel="stopAll(2000)" />
|
||||
:index="selectedDevice" @confirm="onDialogConfirm" @cancel="stopAll(2000, 'click')" />
|
||||
<HostListManagerDialog v-model:visible="showHostDlg" @save="onHostSaved" @invitType="invitTypeFun" />
|
||||
|
||||
<TranslationDialog v-model="showtransDlg" :type="transDlgType" :translateFn="doTranslate"
|
||||
storage-key-prefix="demo-translation" @confirm="onConfirm" @cancel="stopAll(2000)" />
|
||||
storage-key-prefix="demo-translation" @confirm="onConfirm" @cancel="stopAll(2000, 'click')" />
|
||||
</div>
|
||||
<!-- <AgentGuildDialog v-model="showMyInfo" :model="formInit" @save="handleSave" /> -->
|
||||
<AgentGuildDialog v-model="showMyInfo" :model="{
|
||||
@@ -418,7 +418,7 @@ const buttons = [
|
||||
// },
|
||||
{
|
||||
label: '全部停止',
|
||||
onClick: () => stopAll(2000),
|
||||
onClick: () => stopAll(2000, 'click'),
|
||||
show: () => true,
|
||||
img: {
|
||||
normal: new URL('@/assets/video/leftBtn8.png', import.meta.url).href,
|
||||
@@ -895,7 +895,7 @@ function getMesList(deviceId) {
|
||||
})
|
||||
}
|
||||
|
||||
async function stopAll(time) {
|
||||
async function stopAll(time, type) {
|
||||
stopLoading = ElLoading.service({
|
||||
lock: true,
|
||||
text: '停止中',
|
||||
@@ -904,6 +904,12 @@ async function stopAll(time) {
|
||||
|
||||
// 🔒 先强制关闭所有提示弹窗
|
||||
ElMessageBox.close();
|
||||
if (type == 'click') {
|
||||
// 关闭调度定时器
|
||||
clearInterval(scheduleTimer)
|
||||
scheduleTimer = null
|
||||
}
|
||||
|
||||
|
||||
scheduleEnabled.value = false;
|
||||
runType.value = '';
|
||||
@@ -1102,12 +1108,12 @@ onMounted(async () => {
|
||||
}
|
||||
|
||||
// 非 start:正常入缓冲 → 防抖批量 addTempAnchorData
|
||||
const country = data && data.country != null ? data.country : ''
|
||||
const text = data && (data.hostsId != null ? data.hostsId : data.text)
|
||||
const country = data && data.country != null ? data.country : data.region
|
||||
const text = data && (data.hostsId != null ? data.hostsId : data.displayId)
|
||||
const invitationType = data && (data.invitationType != null ? data.invitationType : '')
|
||||
const id = data && data.id != null ? data.id : ''
|
||||
if (!text) return
|
||||
|
||||
// console.log(text)
|
||||
batch.push({ country, text, invitationType, id })
|
||||
|
||||
scheduleFlush((items) => {
|
||||
@@ -1460,6 +1466,7 @@ function withTimeout(p, ms) {
|
||||
}
|
||||
|
||||
function startScheduleLoop() {
|
||||
|
||||
lastInterruptTs = Date.now()
|
||||
localStorage.setItem('INT_LAST_TS', String(lastInterruptTs))
|
||||
// 先按当前 index 跑一次,保持“即刻对齐”
|
||||
@@ -1523,8 +1530,9 @@ function startScheduleLoop() {
|
||||
|
||||
// —— 正常片段轮换(你原有的逻辑) ——
|
||||
const now = Date.now()
|
||||
const cur = schedulePlan[scheduleState.index]
|
||||
const cur = JSON.parse(localStorage.getItem('SCHEDULE_PLAN'))[scheduleState.index]
|
||||
const elapsed = now - scheduleState.startTime
|
||||
console.log('已调度', elapsed / 1000, '秒', cur.duration / 1000 + '秒后调度', printCurrentTime())
|
||||
|
||||
if (elapsed >= cur.duration) {
|
||||
scheduleState.index = (scheduleState.index + 1) % schedulePlan.length
|
||||
|
||||
Reference in New Issue
Block a user