新增日志
This commit is contained in:
@@ -4,8 +4,8 @@ VUE_APP_BASE_LOCAL=http://127.0.0.1:34567/
|
|||||||
# VUE_APP_BASE_LOCAL=http://192.168.1.209:34567/
|
# VUE_APP_BASE_LOCAL=http://192.168.1.209:34567/
|
||||||
|
|
||||||
# 业务后端(开发用内网地址)
|
# 业务后端(开发用内网地址)
|
||||||
VUE_APP_BASE_REMOTE=https://crawlclient.api.yolozs.com
|
# VUE_APP_BASE_REMOTE=https://crawlclient.api.yolozs.com
|
||||||
# VUE_APP_BASE_REMOTE=http://192.168.1.144:8101/
|
VUE_APP_BASE_REMOTE=http://192.168.1.144:8101/
|
||||||
|
|
||||||
# AI 服务
|
# AI 服务
|
||||||
VUE_APP_BASE_SPECIAL=https://ai.yolozs.com
|
VUE_APP_BASE_SPECIAL=https://ai.yolozs.com
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
<el-switch :disabled="!userdata.aiReplay" style="margin-right: 20px;" v-model="auto" />
|
<el-switch :disabled="!userdata.aiReplay" style="margin-right: 20px;" v-model="auto" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-button @click="onClose">取消</el-button>
|
<el-button @click="onClose">取消</el-button>
|
||||||
<el-button type="primary" :disabled="!canConfirm" @click="onConfirm">确定</el-button>
|
<el-button type="primary" @click="onConfirm">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -345,7 +345,7 @@ const getLangLabel = (v) => (languageOptions.value.find((x) => x.value === v)?.l
|
|||||||
/** 计算属性 */
|
/** 计算属性 */
|
||||||
const canTranslate = computed(() => sentences.length > 0 && selectedLangs.value.length > 0)
|
const canTranslate = computed(() => sentences.length > 0 && selectedLangs.value.length > 0)
|
||||||
const isAnyLoading = computed(() => Object.values(loadingLangs).some(Boolean))
|
const isAnyLoading = computed(() => Object.values(loadingLangs).some(Boolean))
|
||||||
const canConfirm = computed(() => !!activeTab.value && !!(translations[activeTab.value] || []).length)
|
// const canConfirm = computed(() => !!activeTab.value && !!(translations[activeTab.value] || []).length)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 方法 - 源文本
|
* 方法 - 源文本
|
||||||
@@ -500,7 +500,7 @@ watch([sentences, selectedLangs, translations, activeTab], () => {
|
|||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
|
|
||||||
async function onConfirm() {
|
async function onConfirm() {
|
||||||
if (!activeTab.value) return
|
// if (!activeTab.value) return
|
||||||
|
|
||||||
// 如果关闭了翻译功能,则先提示
|
// 如果关闭了翻译功能,则先提示
|
||||||
if (!isTranslation.value) {
|
if (!isTranslation.value) {
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ import { getToken, setToken, setUser, setUserPass, getUserPass } from '@/stores/
|
|||||||
import { ElLoading, ElMessage } from 'element-plus';
|
import { ElLoading, ElMessage } from 'element-plus';
|
||||||
import { passToken } from '@/api/ios';
|
import { passToken } from '@/api/ios';
|
||||||
|
|
||||||
let version = ref('2.8.0');
|
let version = ref('2.9.1');
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -59,11 +59,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<img v-if="isWifi" style="position: absolute; right: 20px; top: 10px; height: 30px;" src="@/assets/wifi.png"></img>
|
<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"
|
<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" />
|
<HostListManagerDialog v-model:visible="showHostDlg" @save="onHostSaved" @invitType="invitTypeFun" />
|
||||||
|
|
||||||
<TranslationDialog v-model="showtransDlg" :type="transDlgType" :translateFn="doTranslate"
|
<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>
|
</div>
|
||||||
<!-- <AgentGuildDialog v-model="showMyInfo" :model="formInit" @save="handleSave" /> -->
|
<!-- <AgentGuildDialog v-model="showMyInfo" :model="formInit" @save="handleSave" /> -->
|
||||||
<AgentGuildDialog v-model="showMyInfo" :model="{
|
<AgentGuildDialog v-model="showMyInfo" :model="{
|
||||||
@@ -418,7 +418,7 @@ const buttons = [
|
|||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
label: '全部停止',
|
label: '全部停止',
|
||||||
onClick: () => stopAll(2000),
|
onClick: () => stopAll(2000, 'click'),
|
||||||
show: () => true,
|
show: () => true,
|
||||||
img: {
|
img: {
|
||||||
normal: new URL('@/assets/video/leftBtn8.png', import.meta.url).href,
|
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({
|
stopLoading = ElLoading.service({
|
||||||
lock: true,
|
lock: true,
|
||||||
text: '停止中',
|
text: '停止中',
|
||||||
@@ -904,6 +904,12 @@ async function stopAll(time) {
|
|||||||
|
|
||||||
// 🔒 先强制关闭所有提示弹窗
|
// 🔒 先强制关闭所有提示弹窗
|
||||||
ElMessageBox.close();
|
ElMessageBox.close();
|
||||||
|
if (type == 'click') {
|
||||||
|
// 关闭调度定时器
|
||||||
|
clearInterval(scheduleTimer)
|
||||||
|
scheduleTimer = null
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
scheduleEnabled.value = false;
|
scheduleEnabled.value = false;
|
||||||
runType.value = '';
|
runType.value = '';
|
||||||
@@ -1102,12 +1108,12 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 非 start:正常入缓冲 → 防抖批量 addTempAnchorData
|
// 非 start:正常入缓冲 → 防抖批量 addTempAnchorData
|
||||||
const country = data && data.country != null ? data.country : ''
|
const country = data && data.country != null ? data.country : data.region
|
||||||
const text = data && (data.hostsId != null ? data.hostsId : data.text)
|
const text = data && (data.hostsId != null ? data.hostsId : data.displayId)
|
||||||
const invitationType = data && (data.invitationType != null ? data.invitationType : '')
|
const invitationType = data && (data.invitationType != null ? data.invitationType : '')
|
||||||
const id = data && data.id != null ? data.id : ''
|
const id = data && data.id != null ? data.id : ''
|
||||||
if (!text) return
|
if (!text) return
|
||||||
|
// console.log(text)
|
||||||
batch.push({ country, text, invitationType, id })
|
batch.push({ country, text, invitationType, id })
|
||||||
|
|
||||||
scheduleFlush((items) => {
|
scheduleFlush((items) => {
|
||||||
@@ -1460,6 +1466,7 @@ function withTimeout(p, ms) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function startScheduleLoop() {
|
function startScheduleLoop() {
|
||||||
|
|
||||||
lastInterruptTs = Date.now()
|
lastInterruptTs = Date.now()
|
||||||
localStorage.setItem('INT_LAST_TS', String(lastInterruptTs))
|
localStorage.setItem('INT_LAST_TS', String(lastInterruptTs))
|
||||||
// 先按当前 index 跑一次,保持“即刻对齐”
|
// 先按当前 index 跑一次,保持“即刻对齐”
|
||||||
@@ -1523,8 +1530,9 @@ function startScheduleLoop() {
|
|||||||
|
|
||||||
// —— 正常片段轮换(你原有的逻辑) ——
|
// —— 正常片段轮换(你原有的逻辑) ——
|
||||||
const now = Date.now()
|
const now = Date.now()
|
||||||
const cur = schedulePlan[scheduleState.index]
|
const cur = JSON.parse(localStorage.getItem('SCHEDULE_PLAN'))[scheduleState.index]
|
||||||
const elapsed = now - scheduleState.startTime
|
const elapsed = now - scheduleState.startTime
|
||||||
|
console.log('已调度', elapsed / 1000, '秒', cur.duration / 1000 + '秒后调度', printCurrentTime())
|
||||||
|
|
||||||
if (elapsed >= cur.duration) {
|
if (elapsed >= cur.duration) {
|
||||||
scheduleState.index = (scheduleState.index + 1) % schedulePlan.length
|
scheduleState.index = (scheduleState.index + 1) % schedulePlan.length
|
||||||
|
|||||||
Reference in New Issue
Block a user