系统菜单组件修改

This commit is contained in:
duyufeng
2024-08-26 09:53:32 +08:00
parent d4b0e13fa1
commit 8bb0e07a3b

View File

@@ -164,6 +164,7 @@
};
//菜单类型按钮切换
const chanageMenuType = (e:any,typeMenu:any)=>{
console.log(e)
let currentType = null;
if(e && e.target){
currentType = e.target.value;
@@ -201,7 +202,7 @@
preMenuIsshow.value = true;
btnPermissIsshow.value = true;
authorMarkIsshow.value = true;
sortIsshow.value = false;
sortIsshow.value = true;
menuCodeIsshow.value = false;
menuRouteIsshow.value = false;
componentIsshow.value = false;
@@ -216,6 +217,7 @@
formRef.value
.validate()
.then(() => {
//请求添加接口提交数据
let params:any={
pid:'root',
@@ -244,6 +246,8 @@
if(menuRadioType.value==1){
params.pid = currentLineData.value?currentLineData.value.pid:"root";//一级菜单pid,传'root'
}
console.log("1234567777")
console.log(menuRadioType.value)
if(addOrEditType.value==1){//新增
http.post(menuS.queryMenuPageAdd, params).then(() => {
NsMessage.success('操作成功');
@@ -373,6 +377,7 @@
}
}else{
menuRadioType.value = 1;
chanageMenuType(null,1);
}
}
defineExpose({