mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
commit
a6bcceb716
|
|
@ -112,7 +112,7 @@
|
|||
</template>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<CreateApplicationDialog ref="CreateApplicationDialogRef" />
|
||||
<CreateApplicationDialog ref="CreateApplicationDialogRef" @refresh="refresh" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
|
@ -127,7 +127,7 @@ const router = useRouter()
|
|||
const {
|
||||
meta: { activeMenu },
|
||||
params: { id }
|
||||
} = route
|
||||
} = route as any
|
||||
|
||||
onBeforeRouteLeave((to, from) => {
|
||||
common.saveBreadcrumb(null)
|
||||
|
|
@ -140,19 +140,14 @@ const loading = ref(false)
|
|||
const breadcrumbData = computed(() => common.breadcrumb)
|
||||
|
||||
const current = computed(() => {
|
||||
const {
|
||||
params: { id }
|
||||
} = route
|
||||
return list.value?.filter((v) => v.id === id)?.[0]
|
||||
})
|
||||
|
||||
const isApplication = computed(() => {
|
||||
const { meta } = route as any
|
||||
return meta?.activeMenu.includes('application')
|
||||
return activeMenu.includes('application')
|
||||
})
|
||||
const isDataset = computed(() => {
|
||||
const { meta } = route as any
|
||||
return meta?.activeMenu.includes('dataset')
|
||||
return activeMenu.includes('dataset')
|
||||
})
|
||||
|
||||
function openCreateDialog() {
|
||||
|
|
@ -207,6 +202,12 @@ function getApplication() {
|
|||
loading.value = false
|
||||
})
|
||||
}
|
||||
function refresh() {
|
||||
if (isApplication.value) {
|
||||
common.saveBreadcrumb(null)
|
||||
getApplication()
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
if (!breadcrumbData.value) {
|
||||
if (isDataset.value) {
|
||||
|
|
|
|||
|
|
@ -198,6 +198,7 @@ import emptyImg from '@/assets/hit-test-empty.png'
|
|||
|
||||
const route = useRoute()
|
||||
const {
|
||||
meta: { activeMenu },
|
||||
params: { id }
|
||||
} = route as any
|
||||
|
||||
|
|
@ -223,12 +224,10 @@ const questionTitle = ref('')
|
|||
const isDisabledChart = computed(() => !inputValue.value)
|
||||
|
||||
const isApplication = computed(() => {
|
||||
const { meta } = route as any
|
||||
return meta?.activeMenu.includes('application')
|
||||
return activeMenu.includes('application')
|
||||
})
|
||||
const isDataset = computed(() => {
|
||||
const { meta } = route as any
|
||||
return meta?.activeMenu.includes('dataset')
|
||||
return activeMenu.includes('dataset')
|
||||
})
|
||||
|
||||
function changeHandle(val: string) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue