Commit 5165fae5 authored by wanghao's avatar wanghao

1 进入管理系统 强制刷新界面调整

parent 2155d4e9
<template>
<dv-full-screen-container v-if="!isRedirecting" class="screen-container">
<dv-full-screen-container class="screen-container">
<!-- 管理系统入口按钮 -->
<div @click="goToAdmin" class="management-entry" style="width:100px;height:30px;">进入管理系统</div>
<!-- 顶部导航栏 -->
......@@ -91,7 +91,6 @@ export default {
{ icon: '🔍', text: '托盘与设备绑定', component: 'TrayBinding' } // 新增菜单项
],
modbusDeviceData: null, // 存储传递的柜子ID
isRedirecting: false
}
},
......@@ -127,8 +126,19 @@ export default {
this.selectedMenu = index;
},
goToAdmin() {
this.isRedirecting = true;
// 先手动销毁 DataV 相关组件
const dataVContainers = document.querySelectorAll('.dv-full-screen-container');
dataVContainers.forEach(container => {
container.remove();
});
// 清理可能的残留样式
const dataVStyles = document.querySelectorAll('style[data-v]');
dataVStyles.forEach(style => {
if (style.innerHTML.includes('dv-full-screen-container')) {
style.remove();
}
});
setTimeout(() => {
this.$router.push('/index').then(() => {
......
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