修改导航不加载问题

This commit is contained in:
jingna 2025-07-02 10:15:57 +08:00
parent 3a4bc50d2b
commit 918d7b40f2
2 changed files with 6 additions and 8 deletions

View File

@ -55,7 +55,7 @@ function menuclick(index: any) {
} }
} }
} }
function childmenuclick(item: any) { function childmenuclick(item: any,index: any) {
if (props.isExecuteEvent) { if (props.isExecuteEvent) {
return return
} }
@ -63,6 +63,7 @@ function childmenuclick(item: any) {
showmodule.value = false showmodule.value = false
showUserInfo.value = false showUserInfo.value = false
if (item.module_id && item.module_id !== '') { if (item.module_id && item.module_id !== '') {
checkindex.value = index
currentrow.value = item currentrow.value = item
currentMoudleId.value = item.module_id currentMoudleId.value = item.module_id
showmodule.value = true showmodule.value = true
@ -162,12 +163,12 @@ function userdetails(){
<div class="Navbar-menu-content"> <div class="Navbar-menu-content">
<TimeDisplay /> <TimeDisplay />
<div class="Navbar-menu-item" <div class="Navbar-menu-item"
:class="{ 'Navbar-menu-items': checkindex == index && item.children.length == 0 }" :class="{ 'Navbar-menu-items': checkindex == index }"
v-for="(item, index) in navmenulist" :key="index" @click="menuclick(index)"> v-for="(item, index) in navmenulist" :key="index" @click="menuclick(index)">
<div v-if="!item.children || item.children.length == 0">{{ item.name }}</div> <div v-if="!item.children || item.children.length == 0">{{ item.name }}</div>
<el-popover v-else :show-arrow="false" class="tsmenu" placement="bottom" popper-class="tsmenu-popover"> <el-popover v-else :show-arrow="false" class="tsmenu" placement="bottom" popper-class="tsmenu-popover">
<div v-for="(items, indexs) in item.children" :key="indexs" class="Navbar-menu-item-child-item" <div v-for="(items, indexs) in item.children" :key="indexs" class="Navbar-menu-item-child-item"
@click="() => childmenuclick(items)"> @click="() => childmenuclick(items,index)">
{{ items.name }} {{ items.name }}
</div> </div>
<template #reference> <template #reference>

View File

@ -4,8 +4,6 @@ import DvPreview from '@/viewsnew/data-visualization/DvPreview.vue'
import FormCreate from '@/viewsnew/common/FormCreate.vue' import FormCreate from '@/viewsnew/common/FormCreate.vue'
import { initCanvasData } from '@/utils/canvasUtils' import { initCanvasData } from '@/utils/canvasUtils'
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain' import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import { moduleList } from '@/api/application/module'
import Navbar from '@/viewsnew/application/SfcEditor/NavbarEditor/assocPage.vue'
const props = defineProps({ const props = defineProps({
moduleinfo: Object, moduleinfo: Object,
applicationId: String applicationId: String
@ -61,9 +59,9 @@ onMounted(() => {
getInit() getInit()
}) })
watch(() => props.moduleinfo, (val) => { watch(() => props.moduleinfo, (val) => {
getInit()
isFormCreate.value = false isFormCreate.value = false
dataInitState.value = false dataInitState.value = false
getInit()
}) })
onBeforeMount(() => { onBeforeMount(() => {
dvMainStore.canvasDataInit() dvMainStore.canvasDataInit()
@ -105,7 +103,6 @@ function handleNodeClick(e) {
:canvas-style-preview="state.canvasStylePreview" :canvas-view-info-preview="state.canvasViewInfoPreview" :canvas-style-preview="state.canvasStylePreview" :canvas-view-info-preview="state.canvasViewInfoPreview"
:dv-info="state.dvInfo" :cur-preview-gap="state.curPreviewGap" :download-status="downloadStatus"></dv-preview> :dv-info="state.dvInfo" :cur-preview-gap="state.curPreviewGap" :download-status="downloadStatus"></dv-preview>
<form-create v-if="isFormCreate" :moduleInfo="moduleInfo"></form-create> <form-create v-if="isFormCreate" :moduleInfo="moduleInfo"></form-create>
<Navbar v-if="isNavbar"></Navbar> </div>
</div>
</template> </template>
<style lang="less" scoped></style> <style lang="less" scoped></style>