Просмотр исходного кода

fix: Merge branch 'dev' of http://face3d.4dage.com:7005/4dkankan/4dkankan_bim into dev

bill 3 лет назад
Родитель
Сommit
03bc201aca

+ 2 - 1
.env

@@ -3,4 +3,5 @@ VUE_APP_CDN_URL=https://4dkk.4dage.com/v4/www/
 # sdk文件地址
 VUE_APP_SDK_DIR=https://4dkk.4dage.com/v4-test/www/sdk/
 # 静态资源目录
-VUE_APP_STATIC_DIR=static
+VUE_APP_STATIC_DIR=static
+VUE_APP_TEST=0

+ 1 - 1
.env.development

@@ -1 +1 @@
-VUE_APP_TEST=0
+VUE_APP_TEST=1

+ 0 - 3
.env.staging

@@ -1,3 +0,0 @@
-NODE_ENV=production
-# 静态资源地址
-VUE_APP_CDN_URL=https://4dkk.4dage.com/v4-test/www/

+ 8 - 0
.env.test

@@ -0,0 +1,8 @@
+NODE_ENV=production
+# 静态资源地址
+VUE_APP_CDN_URL=https://4dkk.4dage.com/v4/www/
+# sdk文件地址
+VUE_APP_SDK_DIR=https://4dkk.4dage.com/v4-test/www/sdk/
+# 静态资源目录
+VUE_APP_STATIC_DIR=static
+VUE_APP_TEST=1

+ 2 - 1
package.json

@@ -4,7 +4,8 @@
   "version": "1.0.0",
   "scripts": {
     "serve": "vue-cli-service serve",
-    "build": "vue-cli-service build"
+    "build": "vue-cli-service build",
+    "build:test": "vue-cli-service build --mode test"
   },
   "dependencies": {
     "axios": "^0.21.1",

+ 1 - 1
public/smart-sviewer.html

@@ -6,7 +6,7 @@
         <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
         <link rel="icon" type="image/svg+xml" href="//4dkk.4dage.com/FDKKIMG/icon/kankan_icon.ico" />
         <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/ext/iconfont/iconfont.css" />
-        <link rel="stylesheet" href="//at.alicdn.com/t/c/font_3693743_qnz6eozqyvk.css" />
+        <link rel="stylesheet" href="//at.alicdn.com/t/c/font_3693743_j4ly3fuf3y.css" />
         <script src="<%= VUE_APP_STATIC_DIR %>/ext/mobile-detect.js"></script>
         <script src="<%= VUE_APP_STATIC_DIR %>/ext/base64.min.js"></script>
         <script src="<%= VUE_APP_STATIC_DIR %>/lib/three.js/build/three.min.js"></script>

+ 1 - 1
public/smart-viewer.html

@@ -6,7 +6,7 @@
         <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
         <link rel="icon" type="image/svg+xml" href="//4dkk.4dage.com/FDKKIMG/icon/kankan_icon.ico" />
         <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/ext/iconfont/iconfont.css" />
-        <link rel="stylesheet" href="//at.alicdn.com/t/c/font_3693743_qnz6eozqyvk.css" />
+        <link rel="stylesheet" href="//at.alicdn.com/t/c/font_3693743_j4ly3fuf3y.css" />
         <script src="<%= VUE_APP_STATIC_DIR %>/ext/mobile-detect.js"></script>
         <script src="<%= VUE_APP_STATIC_DIR %>/ext/base64.min.js"></script>
         <script src="<%= VUE_APP_STATIC_DIR %>/lib/three.js/build/three.min.js"></script>

+ 1 - 1
src/components/calendar/mobile.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="calendar" v-show="!showCalendar">
         <span class="prev" @click="emits('prev')"><i class="iconfont icon-arrows_left"></i></span>
-        <span class="cale" @click="onPickDate()">{{ date }}<i class="iconfont icon-date"></i></span>
+        <span class="cale" @click="onPickDate()">{{ date }}<i style="display: none;" class="iconfont icon-date"></i></span>
         <span class="next" @click="emits('next')"><i class="iconfont icon-arrows_right"></i></span>
     </div>
     <div class="calendar-list" v-if="showCalendar" @click="showCalendar = false">

+ 10 - 2
src/components/header/index.vue

@@ -82,17 +82,25 @@ const getCurPosInfo = () => {
 }
 
 const onSetP1 = () => {
+    let p1 = getCurPosInfo()
+    if(points.value.p2 && points.value.p2.id == p1.id){
+        return  showTips.value = '匹配失败,请选择不同点位进行同步'
+    }
     if (points.value.p1) {
         showTips.value = '关联位置已更新'
     }
-    points.value.p1 = getCurPosInfo()
+    points.value.p1 = p1
     emits('update', 'p1', points.value.p1)
 }
 const onSetP2 = () => {
+    let p2 = getCurPosInfo()
+    if(points.value.p1 && points.value.p1.id == p2.id){
+        return  showTips.value = '匹配失败,请选择不同点位进行同步'
+    }
     if (points.value.p2) {
         showTips.value = '关联位置已更新'
     }
-    points.value.p2 = getCurPosInfo()
+    points.value.p2 = p2
     emits('update', 'p2', points.value.p2)
 }
 

+ 129 - 59
src/pages/SViewer.vue

@@ -9,7 +9,7 @@
                 <span v-show="showBimTips">BIM</span>
             </div>
         </div>
-        <div class="tools"  v-if="source" v-show="!bimChecked">
+        <div class="tools" v-if="source" v-show="!bimChecked">
             <div class="item-date">
                 <Calendar :value="sourceDate" :highlighted="sourceDays" @selected="onSelected" @prev="onPrevDate" @next="onNextDate" />
             </div>
@@ -17,6 +17,17 @@
                 <div class="iconfont icon-show_roaming" :class="{ active: mode == 0 }" @click="onModeChange(0)"></div>
                 <div class="iconfont icon-show_plane" :class="{ active: mode == 1 }" @click="onModeChange(1)"></div>
             </div>
+            <div class="item-density" v-if="source.type == 2 && mode == 1" @click="showDensity = true">
+                <span>{{ densityType.text }}</span>
+                <div @click.stop="(showDensity = false)" v-if="showDensity">
+                    <ul>
+                        <li class="title">密度选择</li>
+                        <li v-for="density in densityTypes" @click="onDensityChange(density)">
+                            {{ density.text }}<i class="iconfont" :class="{ 'icon-check': density.type == densityType.type }"></i>
+                        </li>
+                    </ul>
+                </div>
+            </div>
         </div>
     </main>
     <Toast v-if="showTips" type="warn" :content="showTips" :close="() => (showTips = null)" />
@@ -28,7 +39,7 @@ import { http } from '@/utils/request'
 import Toast from '@/components/dialog/Toast'
 import browser from '@/utils/browser'
 import Calendar from '@/components/calendar/mobile.vue'
-import sync, {laserChangeMode, loadSourceScene, loadTargetScene , setPanoWithBim} from '@/utils/sync'
+import sync, { laserChangeMode, loadSourceScene, loadTargetScene, setPanoWithBim } from '@/utils/sync'
 const isDev = process.env.VUE_APP_TEST == 1
 // 点位信息
 let lastFakeApp = null
@@ -38,6 +49,7 @@ let panoData
 const showBim = ref(browser.urlHasValue('bim'))
 const showBimTips = ref(false)
 const showTips = ref(null)
+const showDensity = ref(false)
 const bimChecked = ref(null)
 const sourceFrame = ref(null)
 const mode = ref(0)
@@ -45,6 +57,13 @@ const source = ref(null)
 const target = ref(null)
 const project = ref(null)
 
+const densityTypes = ref([
+    { type: 'high', text: '高' },
+    { type: 'middle', text: '中' },
+    { type: 'low', text: '低' },
+])
+
+const densityType = ref(densityTypes.value[0])
 
 const scenes = computed(() => {
     if (!project.value) {
@@ -59,75 +78,63 @@ const scenes = computed(() => {
     })
 })
 const sourceURL = computed(() => {
-      
-    if(lastFakeApp && sourceFrame.value.contentWindow.fakeApp/* && sourceFrame.value && ( sourceFrame.value.contentWindow.app || sourceFrame.value.contentWindow.viewer)*/){//fakeApp代表已经初始化完毕
-         
-        sync.views.fakeAppUpdateInfo(sourceFrame.value.contentWindow)  
+    if (lastFakeApp && sourceFrame.value.contentWindow.fakeApp /* && sourceFrame.value && ( sourceFrame.value.contentWindow.app || sourceFrame.value.contentWindow.viewer)*/) {
+        //fakeApp代表已经初始化完毕
+
+        sync.views.fakeAppUpdateInfo(sourceFrame.value.contentWindow)
     }
-    if(bimChecked.value){
+    if (bimChecked.value) {
         return `smart-bim.html?m=${project.value.bimData.bimOssFilePath}`
     }
-    if(!source.value){
+    if (!source.value) {
         return
     }
-    if(source.value.type < 2) {
+    if (source.value.type < 2) {
         return `smart-kankan.html?m=${source.value.num}`
     } else {
-        return `smart-laser.html?m=${source.value.num}${isDev?'&dev':''}`
+        return `smart-laser.html?m=${source.value.num}${isDev ? '&dev' : ''}`
     }
 })
 
-const onLoadSource = () => { 
-    let win = sourceFrame.value.contentWindow 
-        window.app = win
-        
-    let loaded = ()=>{
+const onLoadSource = () => {
+    let win = sourceFrame.value.contentWindow
+    window.app = win
+
+    let loaded = () => {
         if (lastFakeApp) {
-            if(bimChecked.value || lastFakeApp.sceneType == 'bim'){//->bim   也可能是bim和bim转,当快速点击按钮,其他类型的没加载好就跳回bim 
-                sync.views.bindFakeWithBim(lastFakeApp, win, panoData) 
-            }else{
-                sync.views.bindWithSameFakeType(lastFakeApp,win) 
+            if (bimChecked.value || lastFakeApp.sceneType == 'bim') {
+                //->bim   也可能是bim和bim转,当快速点击按钮,其他类型的没加载好就跳回bim
+                sync.views.bindFakeWithBim(lastFakeApp, win, panoData)
+            } else {
+                sync.views.bindWithSameFakeType(lastFakeApp, win)
             }
-            
-              
         }
-        if(project.value.sceneList.length) {
-            lastFakeApp = sync.views.createFakeApp(sourceFrame.value.contentWindow);  
+        if (project.value.sceneList.length) {
+            lastFakeApp = sync.views.createFakeApp(sourceFrame.value.contentWindow)
         }
-    } 
+    }
 
- 
-     
-    if(bimChecked.value){//bim
+    if (bimChecked.value) {
+        //bim
         win.sceneType = 'bim'
-        win.loaded.then(sdk => { 
-            loaded() 
-        }) 
-    }else if (source.value.type < 2) { 
+        win.loaded.then(sdk => {
+            loaded()
+        })
+    } else if (source.value.type < 2) {
         win.sceneType = 'kankan'
-        let sdk = win.app 
+        let sdk = win.app
         sdk.Scene.on('loaded', () => {
-            loaded() 
-        })  
-    }else{ 
-        win.sceneType = 'laser' 
-        win.loaded.then(sdk => { 
+            loaded()
+        })
+    } else {
+        win.sceneType = 'laser'
+        win.loaded.then(sdk => {
             sync.views.laserInit(win, mode.value)
-            loaded();
-            
-            
-         }) 
+            loaded()
+        })
     }
-     
-     
 }
 
-
-
-
-
-
-
 const sourceDate = computed(() => {
     if (source.value) {
         return source.value.createTime.toDate()
@@ -157,8 +164,6 @@ const sourceDays = computed(() => {
     return outDays
 })
 
-
-
 const onModeChange = targetMode => {
     if (sourceFrame.value && sourceFrame.value.contentWindow.loaded) {
         sourceFrame.value.contentWindow.loaded.then(sdk => sdk.scene.changeMode(targetMode))
@@ -167,6 +172,18 @@ const onModeChange = targetMode => {
     }
 }
 
+const onDensityChange = density => {
+    if (sourceFrame.value && sourceFrame.value.contentWindow.loaded) {
+        sourceFrame.value &&
+            sourceFrame.value.contentWindow.loaded.then(sdk => {
+                let data = sdk.scene.changePointDensity(density.type)
+                sdk.scene.changeDensityPercent(data.percent)
+            })
+        densityType.value = density
+    }
+    showDensity.value = false
+}
+
 const onSelected = data => {
     if (!data.payload) {
         return
@@ -237,19 +254,18 @@ onMounted(() => {
                     if (num) {
                         source.value = project.value.sceneList.find(c => c.num == num)
                     } else {
-                        source.value = project.value.sceneList[project.value.sceneList.length-1]
+                        source.value = project.value.sceneList[project.value.sceneList.length - 1]
                     }
                     if (!source.value) {
-                        return  showTips.value = '当前场景已被删除,无法进行查看'
+                        return (showTips.value = '当前场景已被删除,无法进行查看')
                     }
                 } else {
-                        return  showTips.value = '当前场景已被删除,无法进行查看'
+                    return (showTips.value = '当前场景已被删除,无法进行查看')
                 }
-                if(response.data.panos){
+                if (response.data.panos) {
                     response.data.panos = JSON.parse(response.data.panos)
-                    panoData = response.data.panos  //convert with bim
+                    panoData = response.data.panos //convert with bim
                 }
-                
             } else {
                 showTips.value = response.message
             }
@@ -291,8 +307,6 @@ main {
             display: flex;
             justify-content: center;
             align-items: center;
-            margin-left: 10px;
-            margin-right: 10px;
             font-size: 16px;
             padding: 0 16px;
             div {
@@ -306,6 +320,62 @@ main {
                 color: #0076f6;
             }
         }
+
+        .item-density {
+            position: relative;
+            cursor: pointer;
+            height: 50px;
+            width: 50px;
+            background: rgba(27, 27, 28, 0.8);
+            box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
+            border-radius: 50%;
+            border: 1px solid #000000;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            margin-left: 10px;
+            margin-right: 10px;
+            font-size: 16px;
+            padding: 0 16px;
+            > div {
+                position: fixed;
+                left: 0;
+                right: 0;
+                bottom: 0;
+                height: 100vh;
+                z-index: 1000;
+                background: rgba(0, 0, 0, 0.5);
+                display: flex;
+                align-items: flex-end;
+                justify-content: center;
+            }
+            ul {
+                width: 100%;
+                padding-bottom: 20px;
+                border-radius: 12px;
+                background: rgba(27, 27, 28, 0.8);
+                box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
+                border: 1px solid #000000;
+                list-style: none;
+                .title {
+                    justify-content: center;
+                    font-weight: 500;
+                    padding: 20px 0;
+                    border-bottom: solid 1px rgba(255, 255, 255, 0.1);
+                }
+                li {
+                    display: flex;
+                    align-items: center;
+                    justify-content: space-between;
+                    padding: 25px 20px;
+                    font-size: 18px;
+                    i {
+                        color: #0076f6;
+                        font-size: 20px;
+                    }
+                }
+            }
+        }
     }
 
     .model {

+ 148 - 50
src/pages/Viewer.vue

@@ -6,12 +6,29 @@
                 <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">
-                        <calendar name="source" :count="scenes.length" :controls="controls" :value="sourceDate" :highlighted="sourceDays" @selected="onSelected" @pick="onPickDate" @prev="onPrevDate" @next="onNextDate"></calendar>
+                        <calendar
+                            name="source"
+                            :count="scenes.length"
+                            :controls="controls"
+                            :value="sourceDate"
+                            :highlighted="sourceDays"
+                            @selected="onSelected"
+                            @pick="onPickDate"
+                            @prev="onPrevDate"
+                            @next="onNextDate"
+                        ></calendar>
                     </div>
                     <div class="item-mode" v-if="source.type == 2">
                         <div class="iconfont icon-show_roaming" :class="{ active: mode == 0 }" @click="onModeChange(0)"></div>
                         <div class="iconfont icon-show_plane" :class="{ active: mode == 1 }" @click="onModeChange(1)"></div>
                     </div>
+                    <div class="item-density" v-if="(source.type == 2 && mode == 1)" :class="{active:showDensity}" @click="showDensity=!showDensity">
+                        <span>{{densityType.text}}</span>
+                        <i class="iconfont icon-arrows_down"></i>
+                        <ul>
+                            <li v-for="density in densityTypes" @click="onDensityChange(density)">{{density.text}}</li>
+                        </ul>
+                    </div>
                 </div>
                 <div class="points" v-if="showAdjust">
                     <div :class="{ active: points.p1 }" @click="onP1Click('left')">
@@ -28,12 +45,22 @@
                 <iframe ref="targetFrame" :src="targetURL" frameborder="0" @load="onLoadTarget"></iframe>
                 <div class="tools" v-show="!fscChecked && !bimChecked">
                     <div class="item-date target">
-                        <calendar name="target" :count="scenes.length" :controls="controls" :value="targetDate" :highlighted="targetDays" @selected="onSelected" @pick="onPickDate" @prev="onPrevDate" @next="onNextDate"></calendar>
+                        <calendar
+                            name="target"
+                            :count="scenes.length"
+                            :controls="controls"
+                            :value="targetDate"
+                            :highlighted="targetDays"
+                            @selected="onSelected"
+                            @pick="onPickDate"
+                            @prev="onPrevDate"
+                            @next="onNextDate"
+                        ></calendar>
                     </div>
                 </div>
                 <div class="points" v-if="showAdjust">
                     <div :class="{ active: points.p1 }" @click="onP1Click('right')">
-                        <i class="iconfont"  :class="[points.p1 ? 'icon-positioning01' : 'icon-positioning02']"></i>
+                        <i class="iconfont" :class="[points.p1 ? 'icon-positioning01' : 'icon-positioning02']"></i>
                         <span>P1</span>
                     </div>
                     <div :class="{ active: points.p2 }" @click="onP2Click('right')">
@@ -43,13 +70,13 @@
                 </div>
             </div>
             <div class="model" v-show="!showAdjust">
-                <div class="bim" :class="{ active: bimChecked, disable: bimDisable }" v-show="!fscChecked  && !showBim">
+                <div class="bim" :class="{ active: bimChecked, disable: bimDisable }" v-show="!fscChecked && !showBim">
                     <div @click="onBimChecked">
                         <i class="iconfont icon-BIM"></i>
                         <span>BIM</span>
                     </div>
                 </div>
-                <div class="dbs" :class="{ active: dbsChecked, disable: dbsDisable }"  v-show="!fscChecked && !showBim">
+                <div class="dbs" :class="{ active: dbsChecked, disable: dbsDisable }" v-show="!fscChecked && !showBim">
                     <div @click="onDbsChecked">
                         <i class="iconfont icon-split_screen"></i>
                         <span>分屏</span>
@@ -72,7 +99,7 @@ import browser from '@/utils/browser'
 import Toast from '@/components/dialog/Toast'
 import AppHeader from '@/components/header'
 import Calendar from '@/components/calendar'
-import sync, { laserChangeMode, beforeChangeURL, loadSourceScene, loadTargetScene, setPanoWithBim, flyToP1P2} from '@/utils/sync'
+import sync, { laserChangeMode, beforeChangeURL, loadSourceScene, loadTargetScene, setPanoWithBim, flyToP1P2 } from '@/utils/sync'
 const isDev = process.env.VUE_APP_TEST == 1
 // 是否BIM模式
 const showBim = ref(browser.urlHasValue('bim'))
@@ -95,8 +122,18 @@ const target = ref(null)
 const project = ref(null)
 const points = ref({ p1: null, p2: null })
 
+const densityTypes = ref([
+    {type:'high',text:'高'},
+    {type:'middle',text:'中'},
+    {type:'low',text:'低'}
+])
+
+const densityType = ref(densityTypes.value[0])
+
 const showTips = ref(null)
 
+const showDensity = ref(false)
+
 const scenes = computed(() => {
     if (!project.value) {
         return []
@@ -109,30 +146,29 @@ const scenes = computed(() => {
         }
     })
 })
-const controls = computed(()=>{
-    if(bimChecked.value){
-        return scenes.value.length>1
+const controls = computed(() => {
+    if (bimChecked.value) {
+        return scenes.value.length > 1
     }
-    return dbsChecked.value? scenes.value.length>2: scenes.value.length>1
+    return dbsChecked.value ? scenes.value.length > 2 : scenes.value.length > 1
 })
 const sourceURL = computed(() => {
-
-    beforeChangeURL('source' ) 
+    beforeChangeURL('source')
 
     if (bimChecked.value && !dbsChecked.value) {
         return `smart-bim.html?m=${project.value.bimData.bimOssFilePath}`
     }
-       
-    if(!source.value){
+
+    if (!source.value) {
         return
     }
 
     if (source.value.type < 2) {
         // 看看、看见场景
-        return `smart-kankan.html?m=${source.value.num}${isDev?'&dev':''}`
+        return `smart-kankan.html?m=${source.value.num}${isDev ? '&dev' : ''}`
     } else {
         // 深时场景
-        return `smart-laser.html?m=${source.value.num}${isDev?'&dev':''}`
+        return `smart-laser.html?m=${source.value.num}${isDev ? '&dev' : ''}`
     }
 })
 const targetURL = computed(() => {
@@ -142,10 +178,10 @@ const targetURL = computed(() => {
 
     if (source.value.type < 2) {
         // 看看、看见场景
-        return `smart-kankan.html?m=${target.value.num}${isDev?'&dev':''}`
+        return `smart-kankan.html?m=${target.value.num}${isDev ? '&dev' : ''}`
     } else {
         // 深时场景
-        return `smart-laser.html?m=${target.value.num}${isDev?'&dev':''}`
+        return `smart-laser.html?m=${target.value.num}${isDev ? '&dev' : ''}`
     }
 })
 const sourceDate = computed(() => {
@@ -193,17 +229,19 @@ const targetDays = computed(() => {
     }
 })
 
-const bimDisable = computed(()=>{
-    if(!project.value || !project.value.bimData){
+const bimDisable = computed(() => {
+    if (!project.value || !project.value.bimData) {
         return true
     }
 })
 
-const dbsDisable = computed(()=>{
-    if(scenes.value.length == 0){ // 没有场景的情况
+const dbsDisable = computed(() => {
+    if (scenes.value.length == 0) {
+        // 没有场景的情况
         return 1
     }
-    if(!bimChecked.value && scenes.value.length == 1){ // 只有1个场景的情况
+    if (!bimChecked.value && scenes.value.length == 1) {
+        // 只有1个场景的情况
         return 2
     }
 })
@@ -232,6 +270,17 @@ const onModeChange = targetMode => {
         sync.views.laserChangeMode(mode.value)
     }
 }
+
+const onDensityChange = (density)=>{
+    if (sync.sourceInst) {
+        sync.sourceInst.loaded.then(sdk => {
+            let data = sdk.scene.changePointDensity(density.type)
+            sdk.scene.changeDensityPercent(data.percent)
+        })
+        densityType.value = density
+    }
+}
+
 const onPickDate = name => {
     datepickName.value = name
 }
@@ -258,7 +307,7 @@ const onSelected = data => {
                 }
             }
         }
-    } else{
+    } else {
         showTips.value = '选择日期未上传场景'
     }
 
@@ -333,10 +382,12 @@ const onNextDate = name => {
     scene.value = scenes.value[index]
 }
 
+
+
 // bim点击
 const onBimChecked = () => {
     if (bimDisable.value) {
-        return showTips.value = '未发现BIM文件'
+        return (showTips.value = '未发现BIM文件')
     }
     if (bimChecked.value) {
         bimChecked.value = false
@@ -364,14 +415,14 @@ const onBimChecked = () => {
 
 // 分屏点击
 const onDbsChecked = () => {
-    if(dbsDisable.value && !dbsChecked.value){
-        return showTips.value = '未发现对比场景'        
+    if (dbsDisable.value && !dbsChecked.value) {
+        return (showTips.value = '未发现对比场景')
     }
     dbsChecked.value = !dbsChecked.value
     if (dbsChecked.value) {
         if (bimChecked.value) {
             // BIM分屏
-            source.value = scenes.value[scenes.value.length-1]
+            source.value = scenes.value[scenes.value.length - 1]
             target.value = project.value.bimData
         } else {
             // 四维看看、激光场景分屏
@@ -418,29 +469,28 @@ const onFscChecked = () => {
     }
 }
 
-const onPointsUpdate = (type,data) => {
+const onPointsUpdate = (type, data) => {
     points.value[type] = data
 }
 
-const onP1Click = (type) =>{
-    if(!points.value.p1){
+const onP1Click = type => {
+    if (!points.value.p1) {
         showTips.value = '您还未选择关联位置'
         return
     }
     console.log(points.value.p1)
     // todo 定位
-     
+
     flyToP1P2(points.value.p1)
-    
 }
 
-const onP2Click = (type) =>{
-    if(!points.value.p2){
+const onP2Click = type => {
+    if (!points.value.p2) {
         showTips.value = '您还未选择关联位置'
         return
     }
     // todo 定位
-    
+
     flyToP1P2(points.value.p2)
 }
 
@@ -458,31 +508,28 @@ onMounted(() => {
                             points.value.p1 = response.data.panos.p1
                             points.value.p2 = response.data.panos.p2
                             setPanoWithBim(response.data.panos)
-                        
                         } catch (error) {
                             console.error(error)
                         }
- 
                     }
                     project.value = response.data
                     if (showBim.value) {
                         onBimChecked()
-                    }
-                    else if (project.value.sceneList.length) {
+                    } else if (project.value.sceneList.length) {
                         if (num) {
                             source.value = project.value.sceneList.find(c => c.num == num)
                         } else {
-                            source.value = project.value.sceneList[project.value.sceneList.length-1]
+                            source.value = project.value.sceneList[project.value.sceneList.length - 1]
                         }
                         if (!source.value) {
-                           return  showTips.value = '当前场景已被删除,无法进行查看'
+                            return (showTips.value = '当前场景已被删除,无法进行查看')
                         }
                         if (showAdjust.value || showSplit.value) {
                             onBimChecked()
                             nextTick(() => onDbsChecked())
                         }
                     } else {
-                        return  showTips.value = '当前场景已被删除,无法进行查看'
+                        return (showTips.value = '当前场景已被删除,无法进行查看')
                     }
                 }
             } else {
@@ -492,7 +539,6 @@ onMounted(() => {
                 } else {
                     showTips.value = response.message
                 }
-                
             }
         })
         .catch(() => {
@@ -570,7 +616,7 @@ main {
             transform: translateX(-50%);
 
             div {
-                cursor:pointer;
+                cursor: pointer;
                 margin-left: 20px;
                 width: 70px;
                 height: 88px;
@@ -676,6 +722,58 @@ main {
                 color: #0076f6;
             }
         }
+        .item-density {
+            position: relative;
+            cursor: pointer;
+            height: 50px;
+            width: 68px;
+            background: rgba(27, 27, 28, 0.8);
+            box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
+            border-radius: 47px 47px 47px 47px;
+            border: 1px solid #000000;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            margin-left: 10px;
+            margin-right: 10px;
+            font-size: 16px;
+            padding: 0 16px;
+            &.active{
+                ul{
+                    display: block;
+                }
+                i{
+                    transform: scale(0.8) rotate(180deg)
+                }
+            }
+            span {
+                margin-right: 4px;
+            }
+            i {
+                transform: scale(0.8);
+                font-size: 14px;
+            }
+            ul {
+                display: none;
+                position: absolute;
+                left: 0;
+                bottom: calc(100% + 10px);
+                width: 68px;
+                padding: 10px 0;
+                border-radius: 12px;
+                text-align: center;
+                background: rgba(27, 27, 28, 0.8);
+                box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
+                border: 1px solid #000000;
+                list-style: none;
+                li{
+                    padding: 5px 0;
+                    &:hover{
+                        color: #0076f6;
+                    }
+                }
+            }
+        }
     }
 }
 </style>
@@ -717,16 +815,16 @@ main {
 .vuejs3-datepicker__calendar header .next:not(.disabled):hover {
     background: rgba(0, 0, 0, 0.3);
 }
-.vuejs3-datepicker__calendar .cell{
-    font-size:16px !important;
-    border-radius:4px;
+.vuejs3-datepicker__calendar .cell {
+    font-size: 16px !important;
+    border-radius: 4px;
 }
 .highlighted {
-    color:#076EDE !important;
+    color: #076ede !important;
     background: transparent !important;
 }
 .selected {
-    color:#fff !important;
+    color: #fff !important;
     background: #0076f6 !important;
 }
 </style>

+ 1 - 1
src/utils/ConvertViews.js

@@ -380,7 +380,7 @@ export default class ConvertViews extends THREE.EventDispatcher{
             
             let data = this.getCameraData(sourceApp)
             let camera = bimViewer.getViewer().camera
-            if(camera.fov != data.fov){
+            if(data.fov && camera.fov != data.fov){
                 camera.fov = data.fov
                 camera.updateProjectionMatrix()
             }

+ 2 - 2
vue.config.js

@@ -16,11 +16,11 @@ const devServer = {
     },
     proxy: {
         '/service': {
-            target: 'https://www.4dkankan.com/',
+            target: 'https://test.4dkankan.com/',
             changeOrigin: true
         },
         '/smart-site': {
-            target: 'https://www.4dkankan.com/',
+            target: 'https://test.4dkankan.com/',
             changeOrigin: true
         }
     }