菜单动态路由及头部角色切换修改

This commit is contained in:
duyufeng
2024-08-30 10:25:42 +08:00
parent c76dcaa7c5
commit 699754c902
10 changed files with 262 additions and 41 deletions

View File

@@ -106,7 +106,7 @@
const componentIsshow = ref(false);//前端组件是否显示
const redirectIsshow = ref(true);//重定向路由是否显示
const keepAliveIsshow = ref(false);//缓存是否显示
const hideChildrenIsshow = ref(false);//是否隐藏子级是否显示
const hideChildrenIsshow = ref(true);//是否隐藏子级是否显示
interface FormState {
menuName: string;
previousMenu:string;
@@ -183,7 +183,7 @@
componentIsshow.value = false;
redirectIsshow.value = true;
keepAliveIsshow.value = false;
hideChildrenIsshow.value = false;
hideChildrenIsshow.value = true;
}else if(currentType==2){//二级菜单
menuNameIsshow.value = true;
preMenuIsshow.value = true;
@@ -244,6 +244,7 @@
}
if(menuRadioType.value==1){
params.pid = currentLineData.value?currentLineData.value.pid:"root";//一级菜单pid,传'root'
params.hideChildren = formState.value.hideChildren;//是否隐藏子级
}
if(addOrEditType.value==1){//新增
http.post(menuS.queryMenuPageAdd, params).then(() => {
@@ -312,7 +313,9 @@
menuCode:'',
type:'',
menuJumpUrl:'',
menuRedirect:''
menuRedirect:'',
keepAlive:false,
hideChildren:false
};
}else if(type==2){//编辑
drawerTitele.value = '编辑菜单';