Commit 98b4fcad authored by liwei's avatar liwei

删除了注释

parent a8c3e44a
...@@ -243,12 +243,6 @@ watch( ...@@ -243,12 +243,6 @@ watch(
if(route.path === '/AIStation/MoveMonitor') { if(route.path === '/AIStation/MoveMonitor') {
// 路由变化,执行相应操作 // 路由变化,执行相应操作
handleGetAIToken(); handleGetAIToken();
// setTimeout(() => {
// if(localStorage.getItem('AIToken')){
// getNumber()
// getData()
// }
// }, 500);
// 轮询检测 localStorage 是否更新 // 轮询检测 localStorage 是否更新
const checkAIToken = setInterval(() => { const checkAIToken = setInterval(() => {
if (localStorage.getItem('AIToken')) { if (localStorage.getItem('AIToken')) {
......
...@@ -43,6 +43,7 @@ const alarmNum = ref(0); ...@@ -43,6 +43,7 @@ const alarmNum = ref(0);
// 点击标签页切换事件 // 点击标签页切换事件
const handleTabClick = (tab, event) => { const handleTabClick = (tab, event) => {
console.log('tab', tab)
const itemName = tab.props.label const itemName = tab.props.label
const selectedItem = topBtn.value.find(item => item.name === itemName.slice(0, 4)); const selectedItem = topBtn.value.find(item => item.name === itemName.slice(0, 4));
if (selectedItem) { if (selectedItem) {
...@@ -268,12 +269,6 @@ watch( ...@@ -268,12 +269,6 @@ watch(
if(route.path === '/AIStation/PipelineTemp') { if(route.path === '/AIStation/PipelineTemp') {
// 路由变化,执行相应操作 // 路由变化,执行相应操作
handleGetAIToken(); handleGetAIToken();
// setTimeout(() => {
// if(localStorage.getItem('AIToken')){
// getNumber()
// getData()
// }
// }, 500);
// 轮询检测 localStorage 是否更新 // 轮询检测 localStorage 是否更新
const checkAIToken = setInterval(() => { const checkAIToken = setInterval(() => {
if (localStorage.getItem('AIToken')) { if (localStorage.getItem('AIToken')) {
......
...@@ -277,12 +277,6 @@ watch( ...@@ -277,12 +277,6 @@ watch(
if(route.path === '/AIStation/TransTemp') { if(route.path === '/AIStation/TransTemp') {
// 路由变化,执行相应操作 // 路由变化,执行相应操作
handleGetAIToken(); handleGetAIToken();
// setTimeout(() => {
// if(localStorage.getItem('AIToken')){
// getNumber()
// getData()
// }
// }, 500);
// 轮询检测 localStorage 是否更新 // 轮询检测 localStorage 是否更新
const checkAIToken = setInterval(() => { const checkAIToken = setInterval(() => {
if (localStorage.getItem('AIToken')) { if (localStorage.getItem('AIToken')) {
......
...@@ -322,8 +322,12 @@ watch( ...@@ -322,8 +322,12 @@ watch(
if(route.path === '/AIStation/VoiceCommandLocation') { if(route.path === '/AIStation/VoiceCommandLocation') {
// 路由变化,执行相应操作 // 路由变化,执行相应操作
handleGetAIToken(); handleGetAIToken();
loadData() const checkAIToken = setInterval(() => {
console.log('route.path',route.path) if (localStorage.getItem('AIToken')) {
clearInterval(checkAIToken); // 停止轮询
loadData();
}
}, 100); // 每100ms检查一次
} }
}, },
{ immediate: true } // 只在路径变化时触发 { immediate: true } // 只在路径变化时触发
......
...@@ -182,10 +182,13 @@ watch( ...@@ -182,10 +182,13 @@ watch(
() => route.path, // 只监听路径变化 () => route.path, // 只监听路径变化
() => { () => {
if(route.path === '/AIStation/VoiceCommand') { if(route.path === '/AIStation/VoiceCommand') {
// 路由变化,执行相应操作
handleGetAIToken(); handleGetAIToken();
loadData() const checkAIToken = setInterval(() => {
console.log('route.path',route.path) if (localStorage.getItem('AIToken')) {
clearInterval(checkAIToken); // 停止轮询
loadData();
}
}, 100); // 每100ms检查一次
} }
}, },
{ immediate: true } // 只在路径变化时触发 { immediate: true } // 只在路径变化时触发
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment