This commit is contained in:
sjl
2024-11-20 11:02:50 +08:00
parent 963c0f5713
commit f6595f784a
11 changed files with 168 additions and 27 deletions

View File

@@ -17,7 +17,7 @@
<el-button
size="small"
type="primary"
@click="handelOpen(item.isActive)"
@click="handelOpen(item)"
:disabled="item.isActive == false"
>进入检测</el-button
>
@@ -33,7 +33,9 @@
import { useRouter } from "vue-router";
import { ElMessage } from "element-plus";
import { useAuthStore } from "@/stores/modules/auth";
import { useModeStore } from "@/stores/modules/mode"; // 引入模式 store
const authStore = useAuthStore();
const modeStore = useModeStore(); // 使用模式 store
const activeIndex = ref("1-1");
const router = useRouter();
const modeList = [
@@ -56,8 +58,10 @@ const modeList = [
isActive: false,
},
];
const handelOpen = async (isActive: any) => {
const handelOpen = async (item: any) => {
await authStore.setShowMenu();
modeStore.setCurrentMode(item.name); // 将模式名称存入 store
return;
if (isActive) {
router.push({ path: "/static" });