微调
This commit is contained in:
@@ -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" });
|
||||
|
||||
Reference in New Issue
Block a user