|
@@ -34,13 +34,12 @@ import { ElMessage } from 'element-plus'
|
|
|
|
|
|
|
|
const examStore = useExamStore()
|
|
const examStore = useExamStore()
|
|
|
const analysisStore = useAnalysisStore()
|
|
const analysisStore = useAnalysisStore()
|
|
|
-const getChildMenuPath = computed(() => analysisStore?.childMenuPath || '');
|
|
|
|
|
// --- 响应式数据 ---
|
|
// --- 响应式数据 ---
|
|
|
const route = useRoute()//读取当前路由对象
|
|
const route = useRoute()//读取当前路由对象
|
|
|
const router = useRouter()//访问全局路由方法
|
|
const router = useRouter()//访问全局路由方法
|
|
|
|
|
|
|
|
const stepOnIndex = ref<number>(0)//步骤索引
|
|
const stepOnIndex = ref<number>(0)//步骤索引
|
|
|
-const childMenuPath = ref<string>(getChildMenuPath.value)//子级菜单路径
|
|
|
|
|
|
|
+const childMenuPath = computed(() => analysisStore?.childMenuPath || '')//子级菜单路径
|
|
|
const menuListRaw = ref<any[]>([]) // 用于存储计算后的菜单列表,以便 watch 能检测到变化(如果需要)
|
|
const menuListRaw = ref<any[]>([]) // 用于存储计算后的菜单列表,以便 watch 能检测到变化(如果需要)
|
|
|
|
|
|
|
|
// --- 计算属性 ---
|
|
// --- 计算属性 ---
|
|
@@ -200,7 +199,7 @@ const MenuChange = (index: number, item: any) => {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
stepOnIndex.value = index
|
|
stepOnIndex.value = index
|
|
|
- childMenuPath.value = ''
|
|
|
|
|
|
|
+ analysisStore.setChildMenuPath('')//清空子菜单选中状态
|
|
|
emit('menuChange')
|
|
emit('menuChange')
|
|
|
router.push('/exam/'+item.path)
|
|
router.push('/exam/'+item.path)
|
|
|
}
|
|
}
|
|
@@ -213,8 +212,7 @@ const MenuSelect = (menu: any) => {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
stepOnIndex.value = 2;
|
|
stepOnIndex.value = 2;
|
|
|
- childMenuPath.value = menu.path;
|
|
|
|
|
- analysisStore.setChildMenuPath(menu.path);
|
|
|
|
|
|
|
+ analysisStore.setChildMenuPath(menu.path);//设置子级菜单选中状态
|
|
|
emit('menuChange')
|
|
emit('menuChange')
|
|
|
// 执行路由跳转
|
|
// 执行路由跳转
|
|
|
router.push(`/exam/analysis/${menu.path}`)
|
|
router.push(`/exam/analysis/${menu.path}`)
|
|
@@ -255,13 +253,12 @@ onMounted(async () => {
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
.step_exam_item {
|
|
.step_exam_item {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
- height: 100%;
|
|
|
|
|
.left_line {
|
|
.left_line {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
top: 0;
|
|
top: 0;
|
|
|
left: 15.55px;
|
|
left: 15.55px;
|
|
|
z-index: 6;
|
|
z-index: 6;
|
|
|
- height: 480px;
|
|
|
|
|
|
|
+ height: 100%;
|
|
|
width: 0;
|
|
width: 0;
|
|
|
border-left: 1px dashed #C0C4CC;
|
|
border-left: 1px dashed #C0C4CC;
|
|
|
}
|
|
}
|