|
@@ -1,216 +1,193 @@
|
|
|
<template>
|
|
|
- <div class="parimaryExhibtion" :class="{daolanactive:isShow}">
|
|
|
+ <div class="parimaryExhibtion" :class="{ daolanactive: isShow }">
|
|
|
<div class="p-title">
|
|
|
- <span>当前位置:{{current.name}}</span>
|
|
|
+ <div class="p-left">{{ Mylangue ? "当前位置" : "Current Position" }}</div>
|
|
|
+ <div class="p-right">{{ Mylangue ? current.name : current.name2 }}</div>
|
|
|
</div>
|
|
|
<div class="exh-con">
|
|
|
- <img :src="require('@/assets/images/map.png')">
|
|
|
+ <img :src="require('@/assets/images/map.png')" />
|
|
|
</div>
|
|
|
<ul class="exhi-list">
|
|
|
- <li @click="handleItem(item)" v-for="(item,i) in list" :key="i">
|
|
|
- {{item.name}}
|
|
|
+ <li
|
|
|
+ @click="handleItem(item.Logo)"
|
|
|
+ v-for="(item, i) in list"
|
|
|
+ :key="i"
|
|
|
+ :class="{ active: item.id === current.id }"
|
|
|
+ >
|
|
|
+ {{ Mylangue ? item.name : item.name2 }}
|
|
|
</li>
|
|
|
</ul>
|
|
|
- <div class="daolan" @click="isShow = !isShow ">
|
|
|
- <img :src="require('@/assets/images/icon/daolan.png')">
|
|
|
- <span>{{isShow?'收起':'展开'}}导航</span>
|
|
|
+ <div class="daolan" @click="isShow = !isShow">
|
|
|
+ <img :src="require('@/assets/images/icon/daolan.png')" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
export default {
|
|
|
- data(){
|
|
|
- return{
|
|
|
- isShow:false,
|
|
|
- list:[
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ isShow: false,
|
|
|
+ list: [
|
|
|
{
|
|
|
- id:1,
|
|
|
- name:'英雄广场',
|
|
|
- pano:"56fa4a8ee09542e69e0e5e763cf3a4eb",
|
|
|
- quaternion:{
|
|
|
- w: 0.732101964384876,
|
|
|
- x: -0.01689940520219317,
|
|
|
- y: 0.6808040582684568,
|
|
|
- z: 0.015715275089404925
|
|
|
- }
|
|
|
+ id: 1,
|
|
|
+ name: "负一楼",
|
|
|
+ name2: "-1F",
|
|
|
+ pano: "56fa4a8ee09542e69e0e5e763cf3a4eb",
|
|
|
+ Logo: "1173",
|
|
|
},
|
|
|
{
|
|
|
- id:2,
|
|
|
- name:'第一展区 序厅',
|
|
|
- pano:"bd279aa2ee3445658d5949ccdc3d0dec",
|
|
|
- quaternion:{
|
|
|
- w: -0.6115252203661626,
|
|
|
- x: -0.00202956708438099,
|
|
|
- y: 0.7912137782061446,
|
|
|
- z: -0.003695157689334756
|
|
|
- }
|
|
|
+ id: 2,
|
|
|
+ name: "一楼",
|
|
|
+ name2: "1F",
|
|
|
+ Logo: "1171",
|
|
|
+ pano: "bd279aa2ee3445658d5949ccdc3d0dec",
|
|
|
},
|
|
|
{
|
|
|
- id:3,
|
|
|
- name:'第二展区 发展历程厅',
|
|
|
- pano:'b2431912b20d4df7b81f47821fca6d1a',
|
|
|
- quaternion:{
|
|
|
- w: 0.11635247170122785,
|
|
|
- x: 0.00932045997324726,
|
|
|
- y: 0.9899930039071927,
|
|
|
- z: -0.07930377265884167
|
|
|
- }
|
|
|
+ id: 3,
|
|
|
+ name: "二楼",
|
|
|
+ name2: "2F",
|
|
|
+ Logo: "1172",
|
|
|
+ pano: "b2431912b20d4df7b81f47821fca6d1a",
|
|
|
},
|
|
|
- {
|
|
|
- id:4,
|
|
|
- name:'第三展区 建设成就厅',
|
|
|
- pano:"353a5de969da46779551bd811a9f9249",
|
|
|
- quaternion:{
|
|
|
- w: 0.7058518315845261,
|
|
|
- x: 0.017866627768183364,
|
|
|
- y: 0.7079073967480722,
|
|
|
- z: -0.017918657894228647
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- id:5,
|
|
|
- name:'第四展区 经典战例厅',
|
|
|
- pano:"2eb9d9d718c8416391993b7a9099ca25",
|
|
|
- quaternion:{
|
|
|
- w: 0.9947693640853533,
|
|
|
- x: 0.09500869955101461,
|
|
|
- y: 0.03734343676475115,
|
|
|
- z: -0.003566606968767554
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- id:6,
|
|
|
- name:'第五展区 英模荣誉厅',
|
|
|
- pano:"2eb9d9d718c8416391993b7a9099ca25",
|
|
|
- quaternion:{
|
|
|
- w: 0.9947693640853533,
|
|
|
- x: 0.09500869955101461,
|
|
|
- y: 0.03734343676475115,
|
|
|
- z: -0.003566606968767554
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- id:7,
|
|
|
- name:'第六展区 辅展厅',
|
|
|
- pano:"2eb9d9d718c8416391993b7a9099ca25",
|
|
|
- quaternion:{
|
|
|
- w: 0.9947693640853533,
|
|
|
- x: 0.09500869955101461,
|
|
|
- y: 0.03734343676475115,
|
|
|
- z: -0.003566606968767554
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
],
|
|
|
- current: {
|
|
|
- id:1,
|
|
|
- name:'序厅',
|
|
|
- pano:"56fa4a8ee09542e69e0e5e763cf3a4eb",
|
|
|
- quaternion:{
|
|
|
- w: 0.732101964384876,
|
|
|
- x: -0.01689940520219317,
|
|
|
- y: 0.6808040582684568,
|
|
|
- z: 0.015715275089404925
|
|
|
- }
|
|
|
- },
|
|
|
- }
|
|
|
+ current: {},
|
|
|
+ };
|
|
|
},
|
|
|
- methods:{
|
|
|
- handleItem(item){
|
|
|
- this.current = item
|
|
|
- let { x, y, z, w } = item.quaternion
|
|
|
- console.log(x, y, z, w);
|
|
|
- // item.pano && player.blackToPano({
|
|
|
- // pano:player.model.panos.index[item.pano],
|
|
|
- // quaternion: new THREE.Quaternion(x, y, z, w)
|
|
|
- // }
|
|
|
- // )
|
|
|
- }
|
|
|
+ methods: {
|
|
|
+ handleItem(val) {
|
|
|
+ // 中文版
|
|
|
+ if (this.Mylangue) {
|
|
|
+ window.location.href = window.location.origin + `#/?m=${val}`;
|
|
|
+ } else window.location.href = window.location.origin + `#/?m=${val}_1`;
|
|
|
+ location.reload(true);
|
|
|
+ },
|
|
|
},
|
|
|
- watch:{
|
|
|
- isShow(newVal){
|
|
|
- let css =newVal? '10px':'-310px'
|
|
|
- $('.cad').css({right:css})
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+ watch: {
|
|
|
+ isShow(newVal) {
|
|
|
+ let css = newVal ? "10px" : "-310px";
|
|
|
+ $(".cad").css({ right: css });
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.list.forEach((v) => {
|
|
|
+ if (window.location.href.includes(v.Logo)) {
|
|
|
+ this.current = v;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
-
|
|
|
- .parimaryExhibtion {
|
|
|
- border: 2px solid #f18c06;
|
|
|
- width: 300px;
|
|
|
+.parimaryExhibtion {
|
|
|
+ width: 300px;
|
|
|
+ transform: translateX(300px);
|
|
|
+ transition: all 0.3s ease;
|
|
|
+ color: #fff;
|
|
|
+ .daolan {
|
|
|
+ cursor: pointer;
|
|
|
+ position: absolute;
|
|
|
+ right: 300px;
|
|
|
background: rgba(0, 0, 0, 0.4);
|
|
|
- transform: translateX(300px);
|
|
|
- transition: all 0.3s ease;
|
|
|
+ border-radius: 10px 0px 0px 10px;
|
|
|
+ border-left: 5px solid #68a0c5;
|
|
|
+ top: 24%;
|
|
|
+ padding: 15px 5px;
|
|
|
+ > img {
|
|
|
+ width: 16px;
|
|
|
+ transform: rotate(180deg);
|
|
|
+ margin-bottom: 4px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .p-title {
|
|
|
+ transform: translateX(-8px);
|
|
|
+ position: relative;
|
|
|
+ height: 60px;
|
|
|
color: #fff;
|
|
|
- .daolan {
|
|
|
- cursor: pointer;
|
|
|
+ .p-left {
|
|
|
+ opacity: 0;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ width: 150px;
|
|
|
+ height: 60px;
|
|
|
+ background: url("../../assets/img/mapt.png");
|
|
|
+ background-size: 100% 100%;
|
|
|
+ font-size: 16px;
|
|
|
+ padding-top: 10px;
|
|
|
+ }
|
|
|
+ .p-right {
|
|
|
+ border-radius: 8px 22px 0 0;
|
|
|
position: absolute;
|
|
|
- right: 298px;
|
|
|
- background: rgba(0, 0, 0, 0.4);
|
|
|
- border-radius: 5px 0px 0px 5px;
|
|
|
- top: 24%;
|
|
|
- padding: 10px;
|
|
|
- > img {
|
|
|
- width: 16px;
|
|
|
- transform: rotate(180deg);
|
|
|
- margin-bottom: 4px;
|
|
|
- }
|
|
|
+ bottom: 0;
|
|
|
+ left: 142px;
|
|
|
+ width: calc(100% - 134px);
|
|
|
+ height: 45px;
|
|
|
+ background-color: rgba(104, 160, 197, 0.5);
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 16px;
|
|
|
}
|
|
|
- .p-title {
|
|
|
+ }
|
|
|
+ .exh-con {
|
|
|
+ background: rgba(0, 0, 0, 0.4);
|
|
|
+ width: 100%;
|
|
|
+ height: 200px;
|
|
|
+ border: 2px solid #68a0c5;
|
|
|
+ }
|
|
|
+ .exhi-list {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ > li {
|
|
|
+ // text-align: center;
|
|
|
+ background: rgba(0, 0, 0, 0.4);
|
|
|
+ border-radius: 0 0 5px 5px;
|
|
|
+ flex: 1;
|
|
|
+ height: 40px;
|
|
|
+ line-height: 40px;
|
|
|
text-align: center;
|
|
|
- background: #b9412e;
|
|
|
- position: relative;
|
|
|
- border-bottom: 2px solid #f18c06;
|
|
|
- height: 60px;
|
|
|
- > span {
|
|
|
- padding-left: 0;
|
|
|
- line-height: 60px;
|
|
|
- height: 60px;
|
|
|
- font-weight: bold;
|
|
|
- font-size: 16px;
|
|
|
- letter-spacing: 1px;
|
|
|
+ cursor: pointer;
|
|
|
+ &:hover {
|
|
|
+ background: #68a0c5;
|
|
|
}
|
|
|
}
|
|
|
- .exh-con {
|
|
|
- width: 100%;
|
|
|
- height: 200px;
|
|
|
- }
|
|
|
- .exhi-list {
|
|
|
- border-top: 2px solid #f18c06;
|
|
|
- width: 100%;
|
|
|
- > li {
|
|
|
- // text-align: center;
|
|
|
- height: 40px;
|
|
|
- line-height: 40px;
|
|
|
- padding: 0 30px;
|
|
|
- cursor: pointer;
|
|
|
- &:hover {
|
|
|
- background: #b9412e;
|
|
|
- }
|
|
|
- }
|
|
|
+ .active {
|
|
|
+ background: #68a0c5;
|
|
|
+ pointer-events: none;
|
|
|
}
|
|
|
}
|
|
|
-.exh-con{
|
|
|
+}
|
|
|
+.exh-con {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
- >img{
|
|
|
+ > img {
|
|
|
width: 80%;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-.daolanactive{
|
|
|
+.daolanactive {
|
|
|
transform: translateX(0);
|
|
|
- .daolan{
|
|
|
- >img{
|
|
|
+ .p-left {
|
|
|
+ opacity: 1 !important;
|
|
|
+ }
|
|
|
+ .daolan {
|
|
|
+ > img {
|
|
|
width: 16px;
|
|
|
transform: rotate(0);
|
|
|
margin-bottom: 4px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+@media screen and (max-width: 600px) {
|
|
|
+ .parimaryExhibtion {
|
|
|
+ transform: translateX(255px) scale(0.7);
|
|
|
+ }
|
|
|
+ .daolanactive {
|
|
|
+ transform: translateX(45px) scale(0.7);
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|