jinx 9 months ago
parent
commit
cfd12a64c4

+ 10 - 4
.env

@@ -3,13 +3,19 @@ VUE_APP_CDN_URL=
 # sdk文件地址
 VUE_APP_SDK_DIR=sdk
 # 激光接口地址
-VUE_APP_LASER_URL=/backend/
+# VUE_APP_LASER_URL=/backend/
 # 静态资源目录
 VUE_APP_STATIC_DIR=static
 # 场景资源地址
 VUE_APP_SERVER_URL=/
-VUE_APP_RESOURCE_URL=/
-VUE_APP_LASER_RESOURCE_URL=/
+VUE_APP_RESOURCE_URL=/laser-data
+VUE_APP_LASER_RESOURCE_URL=/laser-data/
 VUE_APP_TEST=0
 #ico 地址
-VUE_APP_ICO=/kankan_icon.ico
+VUE_APP_ICO=/kankan_icon.ico
+
+
+VUE_APP_DEV_PROXY=/
+
+VUE_APP_LASER_URL=/
+

+ 9 - 3
.env.development

@@ -2,8 +2,14 @@ VUE_APP_TEST=1
 VUE_APP_CDN_URL=https://oss.4dkankan.jp/v4-test/www/
 VUE_APP_RESOURCE_URL=https://oss.4dkankan.jp/
 # 激光接口地址
-VUE_APP_DEV_PROXY=https://test-jp.4dkankan.com/
+# VUE_APP_DEV_PROXY=https://test-jp.4dkankan.com/
+VUE_APP_DEV_PROXY=http://192.168.9.27/
 #VUE_APP_LASER_URL=https://uat-laser.4dkankan.com/
-  VUE_APP_LASER_URL=https://testlaser-jp.4dkankan.com/backend/
+  # VUE_APP_LASER_URL=https://testlaser-jp.4dkankan.com/backend/
+VUE_APP_LASER_URL=http://192.168.9.27/
+
+
+VUE_APP_RESOURCE_URL=http://192.168.9.27/laser-data
+VUE_APP_LASER_RESOURCE_URL=/laser-data/
 #环境区分
-#VUE_APP_ENV=jp
+#VUE_APP_ENV=jp

File diff suppressed because it is too large
+ 2 - 2
public/js/2.js


File diff suppressed because it is too large
+ 1 - 1
public/js/3.js


File diff suppressed because it is too large
+ 1 - 1
public/js/4.js


File diff suppressed because it is too large
+ 1 - 1
public/js/5.js


File diff suppressed because it is too large
+ 2 - 2
public/js/smart.js


File diff suppressed because it is too large
+ 1251 - 504
public/static/lib/potree/potree.js


File diff suppressed because it is too large
+ 1 - 1
public/static/lib/potree/potree.js.map


+ 22 - 11
src/components/calendar/index.vue

@@ -1,13 +1,16 @@
 <template>
     <div class="calendar">
-        <span class="prev" @click="emits('prev', props.name)" v-show="controls"><i class="iconfont icon-arrows_left"></i></span>
-        <span class="cale" @click="onPickDate()">{{ value.format('YYYY-mm-dd') }}<i class="iconfont icon-date"></i></span>
-        <span class="next" @click="emits('next', props.name)" v-show="controls"><i class="iconfont icon-arrows_right"></i></span>
-        <div class="calendar-list" v-if="showCalendar" @click="showCalendar = false">
-            <div @click.stop>
-                <datepicker :language="getLocale()" :inline="true" :value="value" :highlighted="highlighted" @selected="onSelected"></datepicker>
+        <div>
+            <span class="prev" @click="emits('prev', props.name)" v-show="controls"><i class="iconfont icon-arrows_left"></i></span>
+            <span class="cale" @click="onPickDate()">{{ value.format('YYYY-mm-dd') }}<i class="iconfont icon-date"></i></span>
+            <span class="next" @click="emits('next', props.name)" v-show="controls"><i class="iconfont icon-arrows_right"></i></span>
+            <div class="calendar-list" v-if="showCalendar" @click="showCalendar = false">
+                <div @click.stop>
+                    <datepicker :language="getLocale()" :inline="true" :value="value" :highlighted="highlighted" @selected="onSelected"></datepicker>
+                </div>
             </div>
         </div>
+        <div class="name">{{ sceneName }}</div>
     </div>
 </template>
 <script setup>
@@ -17,13 +20,14 @@ import { useI18n, getLocale } from '@/i18n'
 const props = defineProps({
     name: String,
     value: Date,
-    controls:Boolean,
+    controls: Boolean,
     highlighted: Object,
+    sceneName: String,
 })
 const emits = defineEmits(['prev', 'selected', 'next', 'pick'])
 const showCalendar = ref(false)
 const onPickDate = () => {
-    if(props.count<2){
+    if (props.count < 2) {
         return
     }
     showCalendar.value = !showCalendar.value
@@ -31,14 +35,14 @@ const onPickDate = () => {
         emits('pick', props.name)
     }
 }
-const onSelected =(payload)=>{
+const onSelected = payload => {
     emits('selected', { name: props.name, payload })
     showCalendar.value = false
 }
 </script>
 <style lang="scss" scoped>
 .calendar {
-    height: 50px;
+    min-height: 50px;
     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;
@@ -49,7 +53,14 @@ const onSelected =(payload)=>{
     margin-left: 10px;
     margin-right: 10px;
     font-size: 16px;
-    padding: 0 16px;
+    padding: 10px 16px;
+    flex-direction: column;
+    .name {
+        font-size: 12px;
+        color: #ffffffb3;
+        line-height: 14px;
+        margin-top: 10px;
+    }
     span {
         cursor: pointer;
     }

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

@@ -24,7 +24,7 @@
                     <i @click="openLink" class="iconfont icon-share"></i>
                 </li>
                 <li><em></em></li>
-                <li v-if="user" class="uinfo" @click="showDrop = true">
+                <!-- <li v-if="user" class="uinfo" @click="showDrop = true">
                     <img :src="creatAvatar(user.head)" alt="" />
                     <div class="menu">
                         <ul>
@@ -40,7 +40,7 @@
                 </li>
                 <li v-else class="login" @click="showLogin = true">
                     <span>{{ $t('common.login') }}</span>
-                </li>
+                </li> -->
             </ul>
         </div>
     </header>

+ 19 - 16
src/pages/Viewer.vue

@@ -13,6 +13,7 @@
                             :count="scenes.length"
                             :controls="controls"
                             :value="sourceDate"
+                            :sceneName="source.name"
                             :highlighted="sourceDays"
                             @selected="onSelected"
                             @pick="onPickDate"
@@ -49,6 +50,7 @@
                     <div class="item-date target">
                         <calendar
                             name="target"
+                            :sceneName="target.name"
                             :count="scenes.length"
                             :controls="controls"
                             :value="targetDate"
@@ -72,7 +74,7 @@
                 </div>
             </div>
             <div class="model" v-show="showWidget && !showAdjust && !showRules">
-                <div class="rule" :class="{ active: ruleChecked, disable: fileDisable }" v-show="!fscChecked && !showBim && !dbsChecked && !bimChecked">
+                <!-- <div class="rule" :class="{ active: ruleChecked, disable: fileDisable }" v-show="!fscChecked && !showBim && !dbsChecked && !bimChecked">
                     <div @click="onRuleChecked">
                         <i class="iconfont icon-measurement"></i>
                         <span>{{ $t('common.measure') }}</span>
@@ -90,7 +92,7 @@
                         <i class="iconfont icon-BIM"></i>
                         <span>BIM</span>
                     </div>
-                </div>
+                </div> -->
                 <div class="dbs" :class="{ active: dbsChecked, disable: dbsDisable }" v-show="!fscChecked && !showBim && !ruleChecked">
                     <div @click="onDbsChecked">
                         <i class="iconfont icon-split_screen"></i>
@@ -204,6 +206,7 @@ const scenes = computed(() => {
             num: item.num,
             type: item.type,
             createTime: item.createTime,
+            name: item.name,
         }
     })
 })
@@ -223,22 +226,23 @@ const sourceURL = computed(() => {
     if (!source.value) {
         return
     }
-    getTagList(source.value.num)
+    // getTagList(source.value.num)
     if (source.value.type < 2) {
         // 看看、看见场景
         return `smart-kankan.html?m=${source.value.num}${isDev ? '&dev' : ''}&lang=${getLocale()}`
     } else {
         getLaserInfo(source.value.num)
         // 深时场景
-        return `smart-laser.html?m=${source.value.num}${isDev ? '&dev' : ''}&lang=${getLocale()}&serve_link=${process.env.VUE_APP_LASER_URL}&panoResourceBasePath=${
-            process.env.VUE_APP_RESOURCE_URL
-        }&resourceBasePath=${process.env.VUE_APP_LASER_RESOURCE_URL}`
+        return `smart-laser.html?m=${source.value.num}${isDev ? '&dev' : ''}&lang=${getLocale()}&serve_link=${'/'}&panoResourceBasePath=${process.env.VUE_APP_RESOURCE_URL}&resourceBasePath=${
+            process.env.VUE_APP_LASER_RESOURCE_URL
+        }`
     }
 })
 const noPanorama = ref(true)
 const getLaserInfo = num => {
     axios
-        .get(process.env.VUE_APP_LASER_URL + `laser/dataset/${num}/getDataSet`)
+        // .get(process.env.VUE_APP_LASER_URL + `laser/dataset/${num}/getDataSet`)
+        .get(`/laser/dataset/${num}/getDataSet`)
         .then(res => {
             if (res.data.code == 200) {
                 let list = res.data.data
@@ -260,17 +264,16 @@ const getLaserInfo = num => {
 }
 const targetURL = computed(() => {
     if (bimChecked.value) {
-        return `smart-bim.html?m=${project.value.bimData.bimOssFilePath}&lang=${getLocale()}&serve_link=${process.env.VUE_APP_LASER_URL}`
+        return `smart-bim.html?m=${project.value.bimData.bimOssFilePath}&lang=${getLocale()}&serve_link=${'/'}`
     }
-    // getTagList(target.value.num)
     if (target.value.type < 2) {
         // 看看、看见场景
-        return `smart-kankan.html?m=${target.value.num}${isDev ? '&dev' : ''}&lang=${getLocale()}&serve_link=${process.env.VUE_APP_LASER_URL}`
+        return `smart-kankan.html?m=${target.value.num}${isDev ? '&dev' : ''}&lang=${getLocale()}&serve_link=${'/'}`
     } else {
         // 深时场景
-        return `smart-laser.html?m=${target.value.num}${isDev ? '&dev' : ''}&lang=${getLocale()}&serve_link=${process.env.VUE_APP_LASER_URL}&panoResourceBasePath=${
-            process.env.VUE_APP_RESOURCE_URL
-        }&resourceBasePath=${process.env.VUE_APP_LASER_RESOURCE_URL}`
+        return `smart-laser.html?m=${target.value.num}${isDev ? '&dev' : ''}&lang=${getLocale()}&serve_link=${'/'}&panoResourceBasePath=${process.env.VUE_APP_RESOURCE_URL}&resourceBasePath=${
+            process.env.VUE_APP_LASER_RESOURCE_URL
+        }`
     }
 })
 const sourceDate = computed(() => {
@@ -511,7 +514,7 @@ const onNextDate = name => {
             index = 0
         }
     }
-
+    console.error(scenes.value)
     scene.value = scenes.value[index]
 }
 
@@ -676,7 +679,8 @@ const getTagList = num => {
     })
 }
 const getInfo = () => {
-    http.get(`smart-site/project/info?projectId=${projectId}&sceneOrder=asc`)
+    // http.get(`smart-site/project/info?projectId=${projectId}&sceneOrder=asc`)
+    http.get(`relics/artifact/getInfo/${projectId}`)
         .then(response => {
             if (response.success) {
                 if (response.data) {
@@ -730,7 +734,6 @@ const projectId = browser.valueFromUrl('projectId') || 1
 
 onMounted(() => {
     getInfo()
-    // getTagList()
     document.addEventListener('fullscreenchange', () => {
         if (document.fullscreenElement) {
             if (!fscChecked.value) {

+ 27 - 13
vue.config.js

@@ -13,7 +13,7 @@ const devServer = {
     disableHostCheck: true,
     headers: {
         Connection: 'keep-alive',
-        'Cache-Control': 'no-store'
+        'Cache-Control': 'no-store',
     },
     proxy: {
         '/service': {
@@ -21,23 +21,37 @@ const devServer = {
             changeOrigin: true,
             headers: {
                 Connection: 'keep-alive',
-            }
+            },
         },
         '/smart-site': {
             target: process.env.VUE_APP_DEV_PROXY,
             changeOrigin: true,
             headers: {
                 Connection: 'keep-alive',
-            }
-            
-        }
-    }
+            },
+        },
+        //文物
+        '/relics': {
+            target: process.env.VUE_APP_DEV_PROXY,
+            changeOrigin: true,
+            headers: {
+                Connection: 'keep-alive',
+            },
+        },
+        '/laser': {
+          target: process.env.VUE_APP_LASER_URL,
+          changeOrigin: true,
+          headers: {
+              Connection: 'keep-alive',
+          },
+      },
+    },
 }
 
 const config = {
     assetsDir: 'static',
     publicPath: '',
-    outputDir: 'dist',//isDev ? 'dist' : path.resolve('../../dist/siter'),
+    outputDir: 'dist', //isDev ? 'dist' : path.resolve('../../dist/siter'),
     productionSourceMap: isDev,
     pages: {
         'smart-bim': 'src/pages/bim.js',
@@ -49,18 +63,18 @@ const config = {
     css: {
         extract: false,
         loaderOptions: {
-            scss: {}
-        }
+            scss: {},
+        },
     },
     devServer: devServer,
     configureWebpack: {
         resolve: {
             symlinks: false,
             alias: {
-                vue: path.resolve(`node_modules/vue`)
-            }
-        }
-    }
+                vue: path.resolve(`node_modules/vue`),
+            },
+        },
+    },
 }
 
 module.exports = config