|
@ -107,6 +107,7 @@ |
|
|
const redirectIsshow = ref(true);//重定向路由是否显示 |
|
|
const redirectIsshow = ref(true);//重定向路由是否显示 |
|
|
const keepAliveIsshow = ref(false);//缓存是否显示 |
|
|
const keepAliveIsshow = ref(false);//缓存是否显示 |
|
|
const hideChildrenIsshow = ref(true);//是否隐藏子级是否显示 |
|
|
const hideChildrenIsshow = ref(true);//是否隐藏子级是否显示 |
|
|
|
|
|
let isClicked = ref(true);//增加防重复点击 |
|
|
interface FormState { |
|
|
interface FormState { |
|
|
menuName: string; |
|
|
menuName: string; |
|
|
previousMenu:string; |
|
|
previousMenu:string; |
|
@ -161,6 +162,7 @@ |
|
|
const onClose = () => { |
|
|
const onClose = () => { |
|
|
visible.value = false; |
|
|
visible.value = false; |
|
|
formRef.value.resetFields(); |
|
|
formRef.value.resetFields(); |
|
|
|
|
|
isClicked.value = true; |
|
|
}; |
|
|
}; |
|
|
//菜单类型按钮切换 |
|
|
//菜单类型按钮切换 |
|
|
const chanageMenuType = (e:any,typeMenu:any)=>{ |
|
|
const chanageMenuType = (e:any,typeMenu:any)=>{ |
|
@ -247,22 +249,34 @@ |
|
|
params.hideChildren = formState.value.hideChildren;//是否隐藏子级 |
|
|
params.hideChildren = formState.value.hideChildren;//是否隐藏子级 |
|
|
} |
|
|
} |
|
|
if(addOrEditType.value==1){//新增 |
|
|
if(addOrEditType.value==1){//新增 |
|
|
|
|
|
if(isClicked.value){ |
|
|
|
|
|
isClicked.value = false; |
|
|
http.post(menuS.queryMenuPageAdd, params).then(() => { |
|
|
http.post(menuS.queryMenuPageAdd, params).then(() => { |
|
|
NsMessage.success('操作成功'); |
|
|
|
|
|
visible.value = !visible.value; |
|
|
visible.value = !visible.value; |
|
|
emit("editObject",formState) |
|
|
emit("editObject",formState); |
|
|
|
|
|
NsMessage.success('操作成功'); |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
isClicked.value = !visible.value; |
|
|
|
|
|
}, 500); |
|
|
}); |
|
|
}); |
|
|
|
|
|
} |
|
|
}else{ |
|
|
}else{ |
|
|
params.permissionId = currentLineData.value.permissionId; |
|
|
params.permissionId = currentLineData.value.permissionId; |
|
|
params.createTime = currentLineData.value.createTime; |
|
|
params.createTime = currentLineData.value.createTime; |
|
|
params.updateTime = currentLineData.value.updateTime; |
|
|
params.updateTime = currentLineData.value.updateTime; |
|
|
params.isDelete = currentLineData.value.isDelete; |
|
|
params.isDelete = currentLineData.value.isDelete; |
|
|
|
|
|
if(isClicked.value){ |
|
|
|
|
|
isClicked.value = false; |
|
|
http.post(menuS.queryMenuPageEdit, params).then(() => { |
|
|
http.post(menuS.queryMenuPageEdit, params).then(() => { |
|
|
NsMessage.success('操作成功'); |
|
|
|
|
|
visible.value = !visible.value; |
|
|
visible.value = !visible.value; |
|
|
emit("editObject",formState) |
|
|
emit("editObject",formState); |
|
|
|
|
|
NsMessage.success('操作成功'); |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
isClicked.value = !visible.value; |
|
|
|
|
|
}, 500); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
//获取菜单列表 |
|
|
//获取菜单列表 |
|
|