96ead719 by lihua

解决菜单删除问题

1 parent 8f6925b5
......@@ -73,15 +73,18 @@ const removeTab = (targetName) => {
tabbarActive.value = activeName;
tabbarList.value = tabbarList.value.filter((tab) => tab.fullPath !== targetName);
userStore.setTabbar(tabbarList.value);
//被删除之后,需要同步清除activeTabbar里的信息。
const oldCombPath = targetName?.split('/')?.[1];
oldCombPath && userStore.setActiveTabbar(oldCombPath, '');
const combPath = activeName.split('/')[1]
userStore.setActiveTabbar(combPath, activeName);
let tabIndex = visibleTabs.value.findIndex(v => v === targetName)
if (tabIndex > -1) {
visibleTabs.value.splice(tabIndex, 1);
if (activeTab && router.currentRoute.value.fullPath != targetName) {
keepAliveStore.remove(activeTab.meta.reuse ? activeTab.fullPath : activeTab.matched.at(-1)?.components?.default?.name)
}
}
// let tabIndex = visibleTabs.value.findIndex(v => v === targetName)
// if (tabIndex > -1) {
// visibleTabs.value.splice(tabIndex, 1);
// if (activeTab && router.currentRoute.value.fullPath != targetName) {
// keepAliveStore.remove(activeTab.meta.reuse ? activeTab.fullPath : activeTab.matched.at(-1)?.components?.default?.name)
// }
// }
nextTick(() => {
nextTab.name && router.push({ name: nextTab.name, query: nextTab.query });
// setTabVisible()
......
......@@ -654,7 +654,7 @@ const getCodeRuleData = () => {
getCoderuleList(params).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data
data.map(item => {
data?.map(item => {
item.label = item.ruleName
item.value = item.guid
})
......@@ -1573,6 +1573,7 @@ const drawerBtnClick = (btn, info) => {
params.dataDictionarySchemaAddDTOS = dtos
if (drawerInfo.value.type == 'add') {
formTable.value.tableInfo.loading = true
params.state = 1; //添加字典时默认启用
addDictionary(params).then((res: any) => {
if (res.code == proxy.$passCode) {
ElMessage({
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!