|
|
@ -225,6 +225,7 @@ export default { |
|
|
|
const selectedRows = ref([]); |
|
|
|
const dialogVisible = ref(false); |
|
|
|
const route = useRoute(); |
|
|
|
const router = useRouter(); |
|
|
|
const { t } = useI18n(); |
|
|
|
const buttons = ref(props.buttons ?? route.meta.buttons); |
|
|
|
const baseUrl = props.controller ?? `${route.meta.controller}`; |
|
|
@ -389,10 +390,22 @@ export default { |
|
|
|
}; |
|
|
|
const showList = (value, nav) => { |
|
|
|
if (!subDrawer.value) { |
|
|
|
const controller = nav.substr(0, nav.lastIndexOf(".")).toLowerCase(); |
|
|
|
const findRoute = (tree) => { |
|
|
|
for (const item of tree) { |
|
|
|
if (item.meta.controller === controller) { |
|
|
|
return item; |
|
|
|
} |
|
|
|
if (item.children) { |
|
|
|
return findRoute(item.children); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
const targetRoute = router.getRoutes().find((o) => o.meta?.controller === controller); |
|
|
|
subListQuery.value = { |
|
|
|
controller: nav.substr(0, nav.lastIndexOf(".")), |
|
|
|
controller, |
|
|
|
query: { [nav.substr(nav.lastIndexOf(".") + 1)]: value }, |
|
|
|
buttons: [], |
|
|
|
buttons: targetRoute.meta.buttons, |
|
|
|
}; |
|
|
|
subDrawer.value = true; |
|
|
|
} |
|
|
|