123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265 |
- <template>
- <div class="shoula">
- <ul>
- <li
- @click="handleChange(item)"
- :style="{ '--bgColor': item.theme }"
- :class="{ active: item.id == $route.params.type }"
- v-for="(item, i) in themes"
- :key="i"
- >
- <img :src="require(`@/assets/images/proj2022/pc/diwen.png`)" alt="" />
- <div class="arrow" >
- <img :src="require(`@/assets/images/proj2022/pc/enter_1.png`)" alt="" />
- </div>
- <div class="txtcon">
- <span class="tag">{{ item.short }}</span>
- <span class="text" :title="item.desc || item.name">{{ item.desc || item.name }}</span>
- </div>
- </li>
- </ul>
- <img v-if="ishowzbtn" class="zhankai" @click="zhankai" :src="require(`@/assets/images/proj2022/pc/zhankai.png`)" alt="" />
- </div>
- </template>
- <script>
- import panodata from "@/components/mapsvg/pano.js";
- import { Booth } from "@/data/raw.js";
- export default {
- props: ["currentPanoid"],
- mounted() {
- this.$bus.$on("isShowAside", (data) => {
- this.isShow = data;
- });
- this.$bus.$on("toggleShowZX", (data) => {
- this.ishowzbtn = !data;
- });
- },
- data() {
- return {
- isShow: true,
- panodata,
- showMap: false,
- hoverName: "",
- booth: Booth,
- ishowzbtn: false,
- };
- },
- computed: {
- cp() {
- return "v" + this.$route.params.type;
- },
- currentItem() {
- return this.themes.find((item) => item.id == this.theme);
- },
- currentPano() {
- return Booth.find((item) => item.panoId == this.currentPanoid) || {};
- },
- },
- watch: {
- isShow(newVal) {
- this.$bus.$emit("closehotspot", newVal);
- },
- currentPano(newVal) {
- this.$emit("currentPano", newVal);
- },
- },
- methods: {
- zhankai() {
- this.$bus.$emit("toggleShowZX", true);
- },
- handleChange(item) {
- this.$router.push({ params: { type: item.id, isjump: "yes" } });
- },
- handleHover(data) {
- this.hoverName = data.name;
- },
- openMap() {
- this.showMap = true;
- this.isShow = false;
- },
- },
- };
- </script>
- <style lang="less" scoped>
- @conW: 220px;
- @gap: 20px;
- @lgap: 8px;
- .shoula {
- position: fixed;
- bottom: 120px;
- width: @conW;
- z-index: 999;
- > ul {
- margin: 0 auto;
- width: 100%;
- > li {
- width: 50%;
- height: 71px;
- display: block;
- margin-top: 10px;
- cursor: pointer;
- position: relative;
- overflow: hidden;
- font-size: 0;
- backdrop-filter: blur(15px) brightness(60%);
- transition: all ease 0.3s;
- clip-path: polygon(
- 0 0,
- 20px 0,
- 10px 8px,
- 10px + @lgap 8px,
- 20px + @lgap 0,
- 20px + 2 * @lgap 0,
- 10px + 2 * @lgap 8px,
- 10px + 3 * @lgap 8px,
- 20px + 3 * @lgap 0,
- 20px + 4 * @lgap 0,
- 10px + 4 * @lgap 8px,
- 10px + 5 * @lgap 8px,
- 20px + 5 * @lgap 0,
- 100% 0,
- 100% calc(100% - @gap),
- calc(100% - @gap) 100%,
- 0 100%
- );
- border-top-right-radius: 2px;
- &::before,
- &::after {
- background: linear-gradient(186deg, var(--bgColor) 0%, var(--bgColor) 40%, rgba(0, 144, 255, 0) 100%);
- content: "";
- width: 60%;
- height: 4px;
- position: absolute;
- top: 0;
- right: 0;
- }
- &::after {
- content: "";
- top: 4px;
- height: 50%;
- width: 4px;
- }
- > img {
- width: 100%;
- opacity: 0;
- }
- .arrow{
- opacity: 0;
- }
- .txtcon {
- position: absolute;
- top: 50%;
- transform: translateY(-50%);
- left: 22px;
- color: rgba(255, 255, 255, 0.8);
- max-width: 180px;
- .tag {
- font-size: 24px;
- display: block;
- font-family: "pangmen";
- }
- .text {
- display: inline-block;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- margin-top: 4px;
- padding-left: 10px;
- font-size: 14px;
- position: relative;
- line-height: 1;
- vertical-align: middle;
- transition: all ease 0.3s;
- width: 0;
- height: 0;
- &::before {
- position: absolute;
- display: none;
- content: "";
- width: 2px;
- height: 14px;
- left: 0;
- top: 50%;
- transform: translateY(-50%);
- background: rgba(255, 255, 255, 0.8);
- }
- }
- }
- &:hover {
- width: 100% !important;
- >img{
- opacity: 0.2;
- }
- .txtcon {
- .text {
- width: 100%;
- height: auto;
- &::before {
- position: absolute;
- display: inline-block;
- content: "";
- }
- }
- }
- }
- &.active {
- color: var(--bgColor);
- backdrop-filter: blur(15px) brightness(100%);
- background: linear-gradient(269deg, #FFFFFF 0%, rgba(255, 255, 255, 0.51) 100%);
- width: 54%;
- >img{
- opacity: 0;
- }
- .txtcon {
- color: var(--bgColor);
- .text {
- &::before {
- position: absolute;
- content: "";
- width: 2px;
- height: 14px;
- left: 0;
- top: 50%;
- transform: translateY(-50%);
- background: rgba(0, 0, 0, 0.2);
- }
- }
- }
- .arrow {
- width: 12px;
- position: absolute;
- opacity: 1;
- right: 14px;
- top: 50%;
- transform: translateY(-50%);
- z-index: 999;
- text-indent: -12px;
- overflow: hidden;
- >img{
- width: 100%;
- filter: drop-shadow(12px 0px var(--bgColor));
- }
- }
- }
- }
- }
- .zhankai {
- position: fixed;
- bottom: 65px;
- left: 20px;
- cursor: pointer;
- }
- }
- </style>
|