Browse Source

主页面样式与功能,除了导览栏

任一存 2 years ago
parent
commit
bb09ef458f

File diff suppressed because it is too large
+ 1188 - 1189
public/static/js/Hot.js


BIN
src/assets/images/auto.png


BIN
src/assets/images/dollhouse.png


BIN
src/assets/images/floor-1.png


BIN
src/assets/images/floor-2.png


BIN
src/assets/images/floor-3.png


BIN
src/assets/images/floor.png


BIN
src/assets/images/full.png


BIN
src/assets/images/fullAc.png


BIN
src/assets/images/inside.png


BIN
src/assets/images/music-muted.png


BIN
src/assets/images/music.png


BIN
src/assets/images/pause.png


BIN
src/assets/images/play.png


+ 10 - 10
src/assets/style/public.less

@@ -76,13 +76,13 @@ input:-ms-input-placeholder{  /* Internet Explorer 10-11 */
 }
 
 .cad{
-  top: 28px !important;
-  right: 20px !important;
-  width: 237px !important;
-  height: 149px !important;
-  border-radius: initial !important;
+  top: 24px !important;
+  right: 26px !important;
+  width: 222px !important;
+  height: 222px !important;
+  border-radius: 10px;
   z-index: 999;
-  background: initial !important;
+  background: rgba(0, 0, 0, 0.37) !important;
 }
 
 .mobile {
@@ -94,17 +94,17 @@ input:-ms-input-placeholder{  /* Internet Explorer 10-11 */
 
 .mobile[view-mode='floor-plain'], .mobile[view-mode='doll-house'], .mobile[view-mode='transitioning'] {
   .cad {
-    display: none;
+    // display: none;
   }
 }
 
 // 小地图 当前位置标志
 // 位置圆圈。默认半径2.69,圆圈粗细1.076
 #ele1 circle {
-  fill: #165491;
-  r: 2;
+  fill: #fff;
+  r: 0.8;
 }
 // 视野
 #ele1 path {
-  fill: #165491;
+  fill: rgba(117, 31, 17, 0.61);
 }

+ 26 - 24
src/pages/Home.vue

@@ -12,10 +12,16 @@
     <!-- 场景canvs主容器 -->
     <div id="player" />
 
-    <MiniMapDecorator class="mini-map-decorator" />
+    <!-- <MiniMapDecorator
+      v-show="!isShowPano"
+      class="mini-map-decorator"
+    /> -->
 
     <!-- 底部菜单 -->
-    <div id="gui-parent">
+    <div
+      v-show="!isShowPano"
+      id="gui-parent"
+    >
       <!-- 进度条加载 -->
       <gui-loading />
       <div id="hot" />
@@ -38,9 +44,6 @@
         <!-- 通用样式的标题,代码里必须有,但其实没有显示 -->
         <v-title />
         <!-- 针对本项目需求的标题 -->
-        <h1 v-if="!isMobile">
-          安徽省纪录小康工程数据库云展馆
-        </h1>
 
         <ModeSelectorMobile
           v-if="isMobile"
@@ -103,8 +106,8 @@
         />
 
         <button
-          class="startup"
-          @click="isShowPano = false"
+          class="begin"
+          @click="onClickBegin"
         >
           <img
             class=""
@@ -130,7 +133,7 @@ import guimsg from "@/views/gui/guimsg"
 import vError from "@/views/gui/error"
 import vrCon from "@/views/gui/vrcon"
 import vOther from "@/views/gui/other"
-import MiniMapDecorator from "@/views/gui/MiniMapDecorator.vue"
+// import MiniMapDecorator from "@/views/gui/MiniMapDecorator.vue"
 import ModeSelectorMobile from "@/views/gui/ModeSelectorMobile.vue"
 
 export default {
@@ -147,7 +150,7 @@ export default {
     vError,
     vrCon,
     vOther,
-    MiniMapDecorator,
+    // MiniMapDecorator,
     ModeSelectorMobile,
   },
 
@@ -156,8 +159,7 @@ export default {
       hotspots: "",
       // 控制背景音乐
       isMusicInitiallyPlayed: false,
-
-      isShowPano: true,
+      isShowPano: false,
     }
   },
 
@@ -178,6 +180,11 @@ export default {
         }, 1000)
       }
     }
+
+    const locationQuerySection = new URLSearchParams(location.href.split('?')[1])
+    if (locationQuerySection.get('show-cover')) {
+      this.isShowPano = true
+    }
   },
 
   methods: {
@@ -186,6 +193,13 @@ export default {
       if (!this.isMusicInitiallyPlayed) window.manage.switchBgmState(true)
       this.isMusicInitiallyPlayed = true
     },
+    onClickBegin() {
+      this.isShowPano = false
+      const locationQuerySection = new URLSearchParams(location.href.split('?')[1])
+      locationQuerySection.delete('show-cover')
+      const newLocation = location.href.split('?')[0] + '?' + locationQuerySection.toString()
+      location.assign(newLocation)
+    }
   },
 }
 </script>
@@ -200,18 +214,6 @@ export default {
   height: 100%;
   > #gui-parent {
     > #gui {
-      > h1 {
-        position: absolute;
-        z-index: 1;
-        top: 23px;
-        left: 50%;
-        transform: translateX(-50%);
-        background: rgba(0,0,0,0.45);
-        border-radius: 33px;
-        font-size: 16px;
-        color: #FFFFFF;
-        padding: 9px 29px;
-      }
       > .mode-selector-mobile {
         position: absolute;
         z-index: 1;
@@ -249,7 +251,7 @@ export default {
     width: 100%;
     height: 100%;
   }
-  button.startup {
+  button.begin {
     position: absolute;
     bottom: 85px;
     left:50%;

+ 5 - 88
src/views/gui/MiniMapDecorator.vue

@@ -4,38 +4,7 @@
     :class="{
       mobile: isMobile,
     }"
-  >
-    <img class="roof" src="@/assets/images/mini-map-pc.png" alt="" draggable="false">
-    <div
-      v-if="isMobile"
-      class="bottom-bar"
-    >
-      <button
-        class="plain"
-        @click="onClickPlain"
-      >
-        <img
-          class=""
-          src="@/assets/images/dingbufushi-mobile.png"
-          alt=""
-          draggable="false"
-        >
-        <span>平面</span>
-      </button>
-      <button
-        class="model"
-        @click="onClick3D"
-      >
-        <img
-          class=""
-          src="@/assets/images/minimoxing-mobile.png"
-          alt=""
-          draggable="false"
-        >
-        <span>三维</span>
-      </button>
-    </div>
-  </div>
+  />
 </template>
 
 <script>
@@ -45,12 +14,6 @@ export default {
     }
   },
   methods: {
-    onClickPlain(e) {
-      document.onClickFloorPlain(e)
-    },
-    onClick3D(e) {
-      document.onClickDollHouse(e)
-    }
   }
 }
 </script>
@@ -58,58 +21,12 @@ export default {
 <style lang="less" scoped>
 .mini-map-dec {
   position: fixed;
-  top: 28px;
-  right: 20px;
-  width: 237px !important;
-  height: 149px !important;
+  top: 24px;
+  right: 26px;
+  width: 222px !important;
+  height: 222px !important;
   background: rgba(86,86,86,0.2);
-  backdrop-filter: blur(10px);
   z-index: 998;
-  .roof {
-    position: absolute;
-    left: 50%;
-    top: 0;
-    width: 254px;
-    height: 18px;
-    transform: translate(-50%, -100%);
-  }
-  .bottom-bar {
-    position: absolute;
-    left: 50%;
-    bottom: 13px;
-    transform: translateX(-50%);
-    width: 100%;
-    height: 18px;
-    display: flex;
-    justify-content: space-around;
-    align-items: center;
-    > button.plain {
-      display: flex;
-      align-items: center;
-      > img {
-        width: 19px;
-        height: 19px;
-        margin-right: 4px;
-      }
-      > span {
-        font-size: 16px;
-        color: #FFF0BD;
-      }
-    }
-    > button.model {
-      display: flex;
-      align-items: center;
-      > img {
-        width: 23px;
-        height: 22px;
-        margin-right: 4px;
-      }
-      > span {
-        font-size: 16px;
-        color: #FFF0BD;
-      }
-    }
-  }
 }
 
 .mobile.mini-map-dec {

+ 117 - 42
src/views/gui/menu.vue

@@ -6,9 +6,9 @@
     }"
   >
     <div class="pinBottom center">
-      <div id="view-controllers"></div>
+      <div id="view-controllers" />
     </div>
-    
+
     <div class="pinBottom left">
       <div>
         <div class="viewContainer">
@@ -37,7 +37,7 @@
             <a>
               <img
                 :src="require('@/assets/images/play.png')"
-              />
+              >
             </a>
           </div>
           <div
@@ -54,7 +54,7 @@
                 :src="require('@/assets/images/pause.png')"
                 data-original-title="暂停"
                 :style="{opacity: '1',}"
-              />
+              >
             </a>
           </div>
           <!-- <div
@@ -71,13 +71,16 @@
               ></i>
             </a>
           </div> -->
-          <div id="gui-modes-map" class="ui-icon double active">
+          <div
+            id="gui-modes-map"
+            class="ui-icon double active"
+          >
             <div
-              data-original-title="导览"
-              @click="isGuide = !isGuide"
               id="pullTab"
+              data-original-title="导览"
               rel="tooltip"
               title="场景导览"
+              @click="isGuide = !isGuide"
             >
               <!-- 鼠标移入的显示 -->
               <!-- <div class="hoverTit">导览列表</div> -->
@@ -88,13 +91,13 @@
                 :style="{
                   opacity: isGuide ? '1' : '',
                 }"
-              />
+              >
             </div>
 
             <div
               v-show="!isMobile"
-              data-original-title="全景漫游"
               id="gui-modes-inside"
+              data-original-title="全景漫游"
               rel="tooltip"
             >
               <!-- 鼠标移入的显示 -->
@@ -102,13 +105,13 @@
               <img
                 class="icon icon-inside"
                 :src="require('@/assets/images/inside.png')"
-              />
+              >
             </div>
             <div
               v-show="!isMobile"
+              id="gui-modes-dollhouse"
               title="迷你模型"
               data-original-title="迷你模型"
-              id="gui-modes-dollhouse"
               rel="tooltip"
             >
               <!-- 鼠标移入的显示 -->
@@ -116,12 +119,12 @@
               <img
                 class="icon icon-inside"
                 :src="require('@/assets/images/dollhouse.png')"
-              />
+              >
             </div>
             <div
               v-show="!isMobile"
-              data-original-title="俯视图"
               id="gui-modes-floorplan"
+              data-original-title="俯视图"
               rel="tooltip"
               title="顶部俯视"
             >
@@ -130,7 +133,7 @@
               <img
                 class="icon icon-inside"
                 :src="require('@/assets/images/floor.png')"
-              />
+              >
             </div>
             <!-- <div
               data-original-title="VR"
@@ -146,16 +149,16 @@
             </div> -->
             <!-- 没有这个元素会导致报错 -->
             <div
+              id="hotList"
               style="display: none;"
               data-original-title="热点列表"
-              id="hotList"
               rel="tooltip"
               title=""
             >
               <img
                 class="icon icon-inside"
                 :src="require('@/assets/images/hotlist.png')"
-              />
+              >
             </div>
             <!-- <div
               data-original-title="消除外壳"
@@ -176,6 +179,52 @@
 
     <div class="pinBottom right hideTarget">
       <div class="rightViewContainer clearfix">
+        <div
+          class="ui-icon my-floor"
+          @click="ChangeFloor('1265')"
+        >
+          <a>
+            <img
+              :class="{
+                active: currentSceneCode === '1265'
+              }"
+              src="@/assets/images/floor-1.png"
+              alt=""
+              draggable="false"
+            >
+          </a>
+        </div>
+        <div
+          class="ui-icon my-floor"
+          @click="ChangeFloor('1263')"
+        >
+          <a>
+            <img
+              :class="{
+                active: currentSceneCode === '1263'
+              }"
+              src="@/assets/images/floor-2.png"
+              alt=""
+              draggable="false"
+            >
+          </a>
+        </div>
+        <div
+          class="ui-icon my-floor"
+          @click="ChangeFloor('1264')"
+        >
+          <a>
+            <img
+              :class="{
+                active: currentSceneCode === '1264'
+              }"
+              src="@/assets/images/floor-3.png"
+              alt=""
+              draggable="false"
+            >
+          </a>
+        </div>
+
         <!-- 音乐 -->
         <div
           id="volume"
@@ -186,22 +235,22 @@
             <img
               id="openMusic"
               style="display: block"
-              @click="switchBGM(true)"
               src="../../assets/images/music-muted.png"
               alt=""
               title="打开音乐"
-            />
+              @click="switchBGM(true)"
+            >
             <img
               id="closeMusic"
               style="display: none"
-              @click="switchBGM(false)"
               :style="{
                 opacity: '1',
               }"
               src="../../assets/images/music.png"
               alt=""
               title="关闭音乐"
-            />
+              @click="switchBGM(false)"
+            >
           </a>
         </div>
 
@@ -214,7 +263,10 @@
           title="全屏"
         >
           <a>
-            <img title="全屏" :src="require('@/assets/images/full.png')" />
+            <img
+              title="全屏"
+              :src="require('@/assets/images/full.png')"
+            >
           </a>
         </div>
 
@@ -231,13 +283,11 @@
             <img
               title="关闭全屏"
               :src="require('@/assets/images/fullAc.png')"
-            />
+            >
           </a>
         </div>
-        
       </div>
     </div>
-
   </div>
 </template>
 
@@ -247,27 +297,40 @@ export default {
   data() {
     return {
       isGuide: false,
-    };
+    }
+  },
+  computed: {
+    currentSceneCode() {
+      return this.$route.query.m
+    }
   },
   watch: {
   },
-  computed: {},
   mounted() {
+    console.log('sakldfjklwfl', this.currentSceneCode)
   },
   methods: {
     switchBGM(flag) {
       if (flag) {
-        window.manage.switchBgmState(true);
-        document.querySelector("#openMusic").style.display = "none";
-        document.querySelector("#closeMusic").style.display = "block";
+        window.manage.switchBgmState(true)
+        document.querySelector("#openMusic").style.display = "none"
+        document.querySelector("#closeMusic").style.display = "block"
       } else {
-        window.manage.switchBgmState(false);
-        document.querySelector("#openMusic").style.display = "block";
-        document.querySelector("#closeMusic").style.display = "none";
+        window.manage.switchBgmState(false)
+        document.querySelector("#openMusic").style.display = "block"
+        document.querySelector("#closeMusic").style.display = "none"
       }
     },
+    ChangeFloor(sceneCode) {
+      console.log(sceneCode)
+      const locationQuerySection = new URLSearchParams(location.href.split('?')[1])
+      locationQuerySection.set('m', sceneCode)
+      const newLocation = location.href.split('?')[0] + '?' + locationQuerySection.toString()
+      location.assign(newLocation)
+      location.reload(true)
+    }
   },
-};
+}
 </script>
 
 <style lang="less" scoped>
@@ -326,20 +389,21 @@ export default {
 // }
 // -------end of tooltip相关--------------
 
-@wh: 50px;
+@width: 99px;
+@height: 125px;
 // ----------左下方菜单--------------
 .pinBottom.left {
   bottom: 30px;
   > div {
     > .viewContainer {
       flex-direction: row;
-      margin-left: 30px;
+      margin-left: 50px;
       padding: 0;
       #play,
       #pause {
         margin-right: 30px;
-        width: @wh;
-        height: @wh;
+        width: 99px;
+        height: 125px;
         padding: 0;
         img {
           height: 100%;
@@ -350,8 +414,8 @@ export default {
       #gui-modes-map {
         > div {
           margin-right: 30px;
-          width: @wh;
-          height: @wh;
+          width: @width;
+          height: @height;
           padding: 0;
           > img {
             height: 100%;
@@ -377,10 +441,11 @@ export default {
   .rightViewContainer {
     display: flex !important;
     align-items: center !important;
-    margin-right: 30px;
+    margin-right: 54px;
+    padding-bottom: 20px;
     .ui-icon {
-      width: @wh;
-      height: @wh;
+      width: 88px;
+      height: 91px;
       margin-left: 30px;
       margin-right: initial;
       background: none;
@@ -394,6 +459,16 @@ export default {
           height: 100%;
           opacity: 0.7;
         }
+        > img.active {
+          opacity: 1;
+        }
+      }
+    }
+    > #gui-fullscreen, #gui-fullscreen-exit {
+      > a {
+        > img {
+          opacity: 1;
+        }
       }
     }
   }