|
@@ -1,23 +1,48 @@
|
|
|
<script setup lang='ts'>
|
|
|
import { useStore } from '@/stores';
|
|
|
+import { baseURl } from '@/utils/https';
|
|
|
|
|
|
const router = useRouter()
|
|
|
const store = useStore()
|
|
|
|
|
|
// info-简介 construction-结构 scene-场景
|
|
|
const curMoudle = ref('')
|
|
|
+const curInfoPart = ref({} as any)
|
|
|
+
|
|
|
+const curSelect = ref({} as any)
|
|
|
+const curMode = ref({} as any)
|
|
|
+
|
|
|
+const isShowGuide = ref(false)
|
|
|
+
|
|
|
+const goScenefu = () => {
|
|
|
+ store.mode = curMode.value;
|
|
|
+ store.currentInfoPart = curInfoPart.value;
|
|
|
+ router.push({
|
|
|
+ path: '/scene',
|
|
|
+ query: {
|
|
|
+ code: curInfoPart.value.sceneCode
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ if (Object.keys(store.currentInfoPart).length != 0) {
|
|
|
+ curInfoPart.value = store.currentInfoPart
|
|
|
+ }
|
|
|
+})
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
- <div class='detail-page'>
|
|
|
+ <div class='detail-page'
|
|
|
+ :style="{ backgroundImage: Object.keys(curMode).length === 0 ? '' : `url(${baseURl}/${curMode.name}/${Object.keys(curSelect).length > 0 ? curSelect.id + '.png' : curMode.mainBody})` }">
|
|
|
<!-- 功能区 -->
|
|
|
<div class="logo-welcome">
|
|
|
<div class="item" @click="curMoudle = 'info'">
|
|
|
<div>{{ store.dataAll.info.name }}</div>
|
|
|
<img :style="{ opacity: curMoudle == 'info' ? '1' : '' }" src="@/assets/images/begin-select.png" alt="">
|
|
|
</div>
|
|
|
- <div class="item" @click="curMoudle = 'construction'">
|
|
|
+ <div class="item" @click="() => { curMoudle = 'construction', curMode = store.dataAll.modeList[0] }">
|
|
|
<div>结构</div>
|
|
|
<img :style="{ opacity: curMoudle == 'construction' ? '1' : '' }" src="@/assets/images/begin-select.png" alt="">
|
|
|
</div>
|
|
@@ -36,6 +61,54 @@ const curMoudle = ref('')
|
|
|
<div class="disc">{{ store.dataAll.info.content.disc }}</div>
|
|
|
</div>
|
|
|
|
|
|
+ <!-- 结构相关样式 -->
|
|
|
+ <div v-show="curMoudle == 'construction'" class="construction-box">
|
|
|
+ <!-- 地图 -->
|
|
|
+ <img class="img-map" src="@/assets/images/map.png" alt="">
|
|
|
+ <!-- 左侧刻度 -->
|
|
|
+ <img class="img-left" src="@/assets/images/left.png" alt="">
|
|
|
+ <!-- 右侧刻度 -->
|
|
|
+ <img class="img-right" src="@/assets/images/right.png" alt="">
|
|
|
+ <!-- 底部渐变 -->
|
|
|
+ <img class="img-bottom" src="@/assets/images/bottom.png" alt="">
|
|
|
+
|
|
|
+ <!-- 船体列表 -->
|
|
|
+ <div class="list-box">
|
|
|
+ <div class="stereoscopic-box"
|
|
|
+ @click="() => { curSelect = {}, curMode = store.dataAll.modeList[0], curInfoPart = {}, isShowGuide = false }">
|
|
|
+ {{ store.dataAll.modeList[0].title }}
|
|
|
+ </div>
|
|
|
+ <div class="list-bottom">
|
|
|
+ <div class="list-item" :class="{ 'active': item.name == curSelect.name }"
|
|
|
+ @click="() => { curSelect = item, curMode = store.dataAll.modeList[1], curInfoPart = item, isShowGuide = true }"
|
|
|
+ v-for="(item, index) in store.dataAll.modeList[1].content" :key="item.id"
|
|
|
+ :style="{ borderBottom: index == store.dataAll.modeList[1].content.length - 1 ? 'none' : '' }">
|
|
|
+ {{ item.number + item.name }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 信息框 -->
|
|
|
+ <div class="info-box-detail" v-show="Object.keys(curSelect).length > 0 && isShowGuide">
|
|
|
+ <img class="close-icon" @click="isShowGuide = false" src="@/assets/images/close.png" alt="">
|
|
|
+ <div class="title">{{ curSelect.number + curSelect.name }}</div>
|
|
|
+ <div class="line"></div>
|
|
|
+ <div class="bottom-content">
|
|
|
+ <div>{{ curSelect.info }}</div>
|
|
|
+ <img :src="`${baseURl}/plane/pic${curSelect.id}.png`" alt="">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 指引 -->
|
|
|
+ <div class="guide-box" v-if="Object.keys(curSelect).length > 0 && isShowGuide"
|
|
|
+ :style="{ top: curInfoPart.guideP.top, left: curInfoPart.guideP.left }">
|
|
|
+ <img class="hot-icon" :style="{ top: curInfoPart.hotP.top, left: curInfoPart.hotP.left }" @click="goScenefu()"
|
|
|
+ src="@/assets/images/hot.png" alt="">
|
|
|
+ <img class="line"
|
|
|
+ :style="{ width: curInfoPart.lineP.width, height: curInfoPart.lineP.height, left: curInfoPart.lineP.left }"
|
|
|
+ :src="`${baseURl}/plane/line${curSelect.id}.png`" alt="">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -50,6 +123,7 @@ const curMoudle = ref('')
|
|
|
width: 40vw;
|
|
|
height: 15vh;
|
|
|
position: absolute;
|
|
|
+ z-index: 2;
|
|
|
left: 50%;
|
|
|
bottom: 0vh;
|
|
|
transform: translateX(-50%);
|
|
@@ -73,6 +147,7 @@ const curMoudle = ref('')
|
|
|
align-items: center;
|
|
|
width: 18%;
|
|
|
margin-top: 24px;
|
|
|
+ font-size: 0.9em;
|
|
|
|
|
|
|
|
|
img {
|
|
@@ -95,7 +170,7 @@ const curMoudle = ref('')
|
|
|
right: 0;
|
|
|
|
|
|
img {
|
|
|
- width: 45px;
|
|
|
+ width: 35px;
|
|
|
position: absolute;
|
|
|
right: 10px;
|
|
|
top: 10px;
|
|
@@ -106,19 +181,19 @@ const curMoudle = ref('')
|
|
|
text-align: center;
|
|
|
margin-bottom: 20px;
|
|
|
font-weight: bold;
|
|
|
- font-size: 1.5em;
|
|
|
+ font-size: 1.2em;
|
|
|
}
|
|
|
|
|
|
.disc {
|
|
|
letter-spacing: 2px;
|
|
|
- font-size: 1.2em;
|
|
|
+ font-size: 1em;
|
|
|
text-indent: 2em;
|
|
|
max-height: 100%;
|
|
|
overflow: auto;
|
|
|
}
|
|
|
|
|
|
::-webkit-scrollbar {
|
|
|
- width: 10px;
|
|
|
+ width: 2px;
|
|
|
/* 设置滚动条宽度 */
|
|
|
height: 10px;
|
|
|
/* 对于垂直滚动条的高度,也可以使用此属性 */
|
|
@@ -138,5 +213,190 @@ const curMoudle = ref('')
|
|
|
/* 可选,给滑块添加阴影效果 */
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .construction-box {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+
|
|
|
+ .img-map {
|
|
|
+ position: absolute;
|
|
|
+ left: 5%;
|
|
|
+ top: 5%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .img-left {
|
|
|
+ position: absolute;
|
|
|
+ left: 26px;
|
|
|
+ top: 50%;
|
|
|
+ transform: translateY(-50%)
|
|
|
+ }
|
|
|
+
|
|
|
+ .img-right {
|
|
|
+ position: absolute;
|
|
|
+ right: 26px;
|
|
|
+ top: 50%;
|
|
|
+ transform: translateY(-50%)
|
|
|
+ }
|
|
|
+
|
|
|
+ .img-bottom {
|
|
|
+ width: 100%;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .list-box {
|
|
|
+ width: 15vw;
|
|
|
+ height: 62vh;
|
|
|
+ background: url(@/assets/images/list-bg.png);
|
|
|
+ background-size: 100% 100%;
|
|
|
+ position: absolute;
|
|
|
+ right: 8%;
|
|
|
+ top: 20px;
|
|
|
+ z-index: 10px;
|
|
|
+ color: white;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding-bottom: 2%;
|
|
|
+ box-sizing: border-box;
|
|
|
+
|
|
|
+ .stereoscopic-box {
|
|
|
+ width: 100%;
|
|
|
+ height: 10%;
|
|
|
+ // background: rgba(0, 128, 0, 0.384);
|
|
|
+ margin-top: 7%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 1.4em;
|
|
|
+ letter-spacing: 2px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+
|
|
|
+ .list-bottom {
|
|
|
+ width: 100%;
|
|
|
+ margin-top: 8%;
|
|
|
+ height: calc(81% - 20px);
|
|
|
+ // background: rgba(0, 128, 0, 0.384);
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-around;
|
|
|
+ font-size: 1.4em;
|
|
|
+ letter-spacing: 2px;
|
|
|
+
|
|
|
+ .list-item {
|
|
|
+ width: 70%;
|
|
|
+ padding: 10px 0 10px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ border-bottom: 1px solid rgba(0, 0, 0, 0.219);
|
|
|
+ cursor: pointer;
|
|
|
+ flex-basis: 20%;
|
|
|
+ font-size: 0.7em;
|
|
|
+ }
|
|
|
+
|
|
|
+ .active {
|
|
|
+ background: #1286AB;
|
|
|
+ border-bottom: none;
|
|
|
+ width: 90%;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .info-box-detail {
|
|
|
+ width: 20vw;
|
|
|
+ // height: 20vh;
|
|
|
+ background: rgba(27, 27, 28, 0.6);
|
|
|
+ box-shadow: -4px 0px 4px 0px rgba(0, 0, 0, 0.3);
|
|
|
+ border-radius: 4px 4px 4px 4px;
|
|
|
+ position: absolute;
|
|
|
+ top: 10%;
|
|
|
+ right: 25%;
|
|
|
+ padding: 20px 20px;
|
|
|
+ z-index: 2;
|
|
|
+
|
|
|
+ .close-icon {
|
|
|
+ width: 35px;
|
|
|
+ height: 35px;
|
|
|
+ cursor: pointer;
|
|
|
+ position: absolute;
|
|
|
+ top: 10px;
|
|
|
+ right: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title {
|
|
|
+ color: #FFFFFF;
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 1.2em;
|
|
|
+ }
|
|
|
+
|
|
|
+ .line {
|
|
|
+ width: 100%;
|
|
|
+ height: 2px;
|
|
|
+ background: linear-gradient(to right, rgba(63, 151, 188, 1), rgba(63, 151, 188, 0));
|
|
|
+ margin: 10px 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .bottom-content {
|
|
|
+ display: flex;
|
|
|
+ color: white;
|
|
|
+
|
|
|
+ img {
|
|
|
+ width: 40%;
|
|
|
+ object-fit: contain;
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ div {
|
|
|
+ max-height: 10vh;
|
|
|
+ overflow: auto;
|
|
|
+ font-size: 0.9em;
|
|
|
+ }
|
|
|
+
|
|
|
+ ::-webkit-scrollbar {
|
|
|
+ width: 2px;
|
|
|
+ /* 设置滚动条宽度 */
|
|
|
+ height: 2px;
|
|
|
+ /* 对于垂直滚动条的高度,也可以使用此属性 */
|
|
|
+ background-color: #f5f5f531;
|
|
|
+ /* 背景颜色 */
|
|
|
+ border-radius: 5px;
|
|
|
+ /* 边角圆角 */
|
|
|
+ }
|
|
|
+
|
|
|
+ /* 定义滚动条拖动柄(滑块)样式 */
|
|
|
+ ::-webkit-scrollbar-thumb {
|
|
|
+ background-color: #ffffff81;
|
|
|
+ /* 滑块的颜色 */
|
|
|
+ border-radius: 5px;
|
|
|
+ /* 可选,给滑块添加边框 */
|
|
|
+ box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
|
|
|
+ /* 可选,给滑块添加阴影效果 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .guide-box {
|
|
|
+ position: absolute;
|
|
|
+
|
|
|
+ .hot-icon {
|
|
|
+ position: absolute;
|
|
|
+ z-index: 2;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+
|
|
|
+ .line {
|
|
|
+ position: absolute;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|