zhengnaiwen_citu 6 hónapja
szülő
commit
9213746f58

+ 8 - 1
src/views/humanResources/panorama/dynamic/panoramaDetailsBaseInfo.vue

@@ -8,7 +8,14 @@
 export default {
   name: 'panoramaDetailsBaseInfo',
   methods: {
-    onInitPanorama () {}
+    onInitPanorama (organizationNo, employeeNo) {
+      if (employeeNo) {
+        // 个人全景
+        return
+      }
+      // 机构全景
+      console.log('机构全景')
+    }
   }
 }
 </script>

+ 13 - 2
src/views/humanResources/panorama/panoramaDetails.vue

@@ -18,7 +18,18 @@
       </el-breadcrumb>
     </div>
     <div class="content-body">
-      <component :is="componentsPath" :key="$route.fullPath" :panorama="true" ref="panorama" @hook:mounted="onMounted"></component>
+      <!--
+        全景视图相关页面
+        根据菜单配置显示传入 panorama 参数为全景打开 (非必须,根据自己需要使用)
+        onMounted默认允许子页面内onInitPanorama方法(必须配置)传入两个参数为机构id和员工id
+      -->
+      <component
+        :is="componentsPath"
+        :key="$route.fullPath"
+        :panorama="true"
+        ref="panorama"
+        @hook:mounted="onMounted"
+      ></component>
     </div>
   </div>
 </template>
@@ -90,7 +101,7 @@ export default {
     },
     onMounted () {
       if (!this.$refs.panorama.onInitPanorama) {
-        this.$message.error('当前页面不支持全景功能')
+        this.$message.error('尚未配置实例化方法')
         return
       }
       this.$refs.panorama.onInitPanorama(this.$route.query.organizationNo, this.$route.query.employeeNo)