|
@@ -18,7 +18,7 @@
|
|
|
</el-breadcrumb>
|
|
|
</div>
|
|
|
<div class="content-body">
|
|
|
- <component :is="componentsPath" :key="$route.fullPath" ref="panorama"></component>
|
|
|
+ <component :is="componentsPath" :key="$route.fullPath" ref="panorama" @hook:mounted="onMounted"></component>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -62,7 +62,7 @@ export default {
|
|
|
},
|
|
|
created () {
|
|
|
this.getDept()
|
|
|
- this.componentsPath = () => import(`@/views/${this.activeIndex}`)
|
|
|
+ this.runPanorama()
|
|
|
},
|
|
|
methods: {
|
|
|
async getDept () {
|
|
@@ -76,9 +76,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 使用原菜单页面,通过ref调用开启页面内部的onInitPanorama方法开启全景页面
|
|
|
- // componentsPath () {
|
|
|
- // return import(`@/views/${this.activeIndex}`)
|
|
|
- // },
|
|
|
+ runPanorama () {
|
|
|
+ this.componentsPath = () => import(`@/views/${this.activeIndex}`)
|
|
|
+ },
|
|
|
+ onMounted () {
|
|
|
+ if (!this.$refs.panorama.onInitPanorama) {
|
|
|
+ this.$message.error('当前页面不支持全景功能')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$refs.panorama.onInitPanorama(this.$route.query.organizationNo, this.$route.query.employeeNo)
|
|
|
+ },
|
|
|
filterRoute (items) {
|
|
|
return items.filter(item => {
|
|
|
if (item.children && item.children.length) {
|
|
@@ -89,7 +96,7 @@ export default {
|
|
|
},
|
|
|
onSelect (v) {
|
|
|
this.activeIndex = v
|
|
|
- this.componentsPath = () => import(`@/views/${this.activeIndex}`)
|
|
|
+ this.runPanorama()
|
|
|
},
|
|
|
onRun (path) {
|
|
|
window.open(this.$route.path + '?organizationNo=' + path)
|