rindy 2 rokov pred
rodič
commit
a291f460ff
1 zmenil súbory, kde vykonal 12 pridanie a 6 odobranie
  1. 12 6
      src/pages/Viewer.vue

+ 12 - 6
src/pages/Viewer.vue

@@ -2,9 +2,9 @@
     <AppHeader v-show="!fscChecked" :project="project" :show-adjust="showAdjust" @update="onPointsUpdate" />
     <AppHeader v-show="!fscChecked" :project="project" :show-adjust="showAdjust" @update="onPointsUpdate" />
     <article>
     <article>
         <main>
         <main>
-            <div class="split" v-if="source">
-                <iframe ref="sourceFrame" :src="sourceURL" frameborder="0" @load="onLoadSource"></iframe>
-                <div class="tools" v-show="!showAdjust && !fscChecked && (dbsChecked || (!target && !bimChecked))">
+            <div class="split">
+                <iframe ref="sourceFrame" v-if="sourceURL" :src="sourceURL" frameborder="0" @load="onLoadSource"></iframe>
+                <div class="tools" v-if="source" v-show="!showAdjust && !fscChecked && (dbsChecked || (!target && !bimChecked))">
                     <div class="item-date">
                     <div class="item-date">
                         <calendar name="source" :count="scenes.length" :value="sourceDate" :highlighted="sourceDays" @selected="onSelected" @pick="onPickDate" @prev="onPrevDate" @next="onNextDate"></calendar>
                         <calendar name="source" :count="scenes.length" :value="sourceDate" :highlighted="sourceDays" @selected="onSelected" @pick="onPickDate" @prev="onPrevDate" @next="onNextDate"></calendar>
                     </div>
                     </div>
@@ -115,6 +115,10 @@ const sourceURL = computed(() => {
         return `smart-bim.html?m=${project.value.bimData.bimOssFilePath}`
         return `smart-bim.html?m=${project.value.bimData.bimOssFilePath}`
     }
     }
        
        
+    if(!source.value){
+        return
+    }
+
     if (source.value.type < 2) {
     if (source.value.type < 2) {
         // 看看、看见场景
         // 看看、看见场景
         return `smart-kankan.html?m=${source.value.num}&dev`
         return `smart-kankan.html?m=${source.value.num}&dev`
@@ -427,6 +431,7 @@ onMounted(() => {
         .then(response => {
         .then(response => {
             if (response.success) {
             if (response.success) {
                 if (response.data) {
                 if (response.data) {
+                    document.title = response.data.projectName
                     if (response.data.panos) {
                     if (response.data.panos) {
                         try {
                         try {
                             response.data.panos = JSON.parse(response.data.panos)
                             response.data.panos = JSON.parse(response.data.panos)
@@ -440,7 +445,10 @@ onMounted(() => {
  
  
                     }
                     }
                     project.value = response.data
                     project.value = response.data
-                    if (project.value.sceneList.length) {
+                    if (showBim.value) {
+                        onBimChecked()
+                    }
+                    else if (project.value.sceneList.length) {
                         if (num) {
                         if (num) {
                             source.value = project.value.sceneList.find(c => c.num == num)
                             source.value = project.value.sceneList.find(c => c.num == num)
                         }
                         }
@@ -450,8 +458,6 @@ onMounted(() => {
                         if (showAdjust.value || showSplit.value) {
                         if (showAdjust.value || showSplit.value) {
                             onBimChecked()
                             onBimChecked()
                             nextTick(() => onDbsChecked())
                             nextTick(() => onDbsChecked())
-                        } else if (showBim.value) {
-                            onBimChecked()
                         }
                         }
                     }
                     }
                 }
                 }