|
@@ -3,26 +3,19 @@
|
|
|
<!-- 左边的框 -->
|
|
|
<div class="leftList" v-if="oneShow">
|
|
|
<div class="leftCon">
|
|
|
- <div class="row" v-for="val in leftData.son" :key="val.id" @click="toZhan(3,leftData.id,val.id,val.code)">
|
|
|
+ <div
|
|
|
+ class="row"
|
|
|
+ v-for="val in leftData.son"
|
|
|
+ :key="val.id"
|
|
|
+ @click="toZhan(3, leftData.id, val.id, val.code)"
|
|
|
+ >
|
|
|
{{ val.name }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="main">
|
|
|
- <p class="botTit">第一展厅</p>
|
|
|
- <div
|
|
|
- v-for="item in data"
|
|
|
- :key="item.id"
|
|
|
- @click="boxClick(item)"
|
|
|
- :class="{
|
|
|
- active: oneShow === item.id,
|
|
|
- box6: item.id == 6,
|
|
|
- box7: item.id == 7,
|
|
|
- }"
|
|
|
- >
|
|
|
- {{ item.name }}
|
|
|
- </div>
|
|
|
+ <Map1 :oneShow='oneShow' @sonShowSon='sonShowSon'/>
|
|
|
</div>
|
|
|
<div class="rightZhan">
|
|
|
<div class="top" @keyup.enter="mySearch">
|
|
@@ -46,7 +39,7 @@
|
|
|
<!-- <div class="searTit">{{ item.name }}</div> -->
|
|
|
<div
|
|
|
class="searRow"
|
|
|
- @click="toZhan(3,item.id,val.id,val.code)"
|
|
|
+ @click="toZhan(3, item.id, val.id, val.code)"
|
|
|
v-for="val in item.son"
|
|
|
:key="val.id"
|
|
|
v-html="val.name"
|
|
@@ -80,7 +73,7 @@
|
|
|
</div>
|
|
|
<div class="contRowSon" v-if="item.id == oneShow">
|
|
|
<div
|
|
|
- @click="toZhan(3,item.id,val.id,val.code)"
|
|
|
+ @click="toZhan(3, item.id, val.id, val.code)"
|
|
|
v-for="val in item.son"
|
|
|
:key="val.id"
|
|
|
>
|
|
@@ -94,25 +87,17 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import Map1 from "../components/map.vue";
|
|
|
import { exArr3 } from "./zhan.js";
|
|
|
export default {
|
|
|
name: "Onezhan",
|
|
|
- components: {},
|
|
|
+ components: { Map1 },
|
|
|
data() {
|
|
|
return {
|
|
|
leftData: {},
|
|
|
searShow: false,
|
|
|
name: "",
|
|
|
searchData: [],
|
|
|
- data: [
|
|
|
- { name: "分区一", id: "1", class: "box1" },
|
|
|
- { name: "分区二", id: "2", class: "box2" },
|
|
|
- { name: "分区三", id: "3", class: "box3" },
|
|
|
- { name: "分区四", id: "4", class: "box4" },
|
|
|
- { name: "分区五", id: "5", class: "box5" },
|
|
|
- { name: "分区六", id: "6", class: "box6" },
|
|
|
- { name: "分区七", id: "7", class: "box7" },
|
|
|
- ],
|
|
|
oneShow: null,
|
|
|
rightData: exArr3,
|
|
|
};
|
|
@@ -120,24 +105,17 @@ export default {
|
|
|
watch: {
|
|
|
oneShow(val) {
|
|
|
if (val) {
|
|
|
- this.leftData = exArr3.find((v) => v.id === val)
|
|
|
- let dom = document.querySelector('.leftCon')
|
|
|
- if(dom) dom.scrollTop=0
|
|
|
- } else this.leftData = {};
|
|
|
+ this.leftData = exArr3.find((v) => v.id === val);
|
|
|
+ let dom = document.querySelector(".leftCon");
|
|
|
+ if (dom) dom.scrollTop = 0;
|
|
|
+ } else this.leftData = {};
|
|
|
},
|
|
|
},
|
|
|
computed: {},
|
|
|
methods: {
|
|
|
- toZhan(bs,id1,id2,code){
|
|
|
- if(code==='') return this.$message.warning('数据计算中,敬请期待')
|
|
|
- this.$emit('toZhan', bs,id1,id2,code)
|
|
|
- },
|
|
|
- // 方块盒子点击
|
|
|
- boxClick(item) {
|
|
|
- if (this.oneShow === item.id) return (this.oneShow = null);
|
|
|
- this.oneShow = item.id;
|
|
|
- this.searShow = false;
|
|
|
- this.name = "";
|
|
|
+ toZhan(bs, id1, id2, code) {
|
|
|
+ if (code === "") return this.$message.warning("数据计算中,敬请期待");
|
|
|
+ this.$emit("toZhan", bs, id1, id2, code);
|
|
|
},
|
|
|
|
|
|
mySearch() {
|
|
@@ -175,6 +153,9 @@ export default {
|
|
|
if (this.oneShow === id) this.oneShow = null;
|
|
|
else this.oneShow = id;
|
|
|
},
|
|
|
+ sonShowSon(id){
|
|
|
+ this.sonShow(id)
|
|
|
+ }
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
@@ -200,8 +181,8 @@ export default {
|
|
|
top: 80px;
|
|
|
left: 50%;
|
|
|
transform: translateX(-50%);
|
|
|
- background-image: url("../assets/img/zhanBac.png");
|
|
|
- background-size: 100% 100%;
|
|
|
+ background: url("../assets/img/zhanBac.png") no-repeat right top;
|
|
|
+
|
|
|
.leftList {
|
|
|
position: absolute;
|
|
|
z-index: 15;
|
|
@@ -245,106 +226,13 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.main {
|
|
|
- .botTit {
|
|
|
- position: absolute;
|
|
|
- bottom: 116px;
|
|
|
- left: 490px;
|
|
|
- font-size: 20px;
|
|
|
- color: #fff;
|
|
|
- letter-spacing: 8px;
|
|
|
- }
|
|
|
- & > div {
|
|
|
- z-index: 10;
|
|
|
- cursor: pointer;
|
|
|
- position: absolute;
|
|
|
- background-color: #034c52;
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- color: rgba(255, 255, 255, 0.7);
|
|
|
- transition: all 0.3s;
|
|
|
- &:hover {
|
|
|
- background-color: #c48871;
|
|
|
- color: #fff;
|
|
|
- }
|
|
|
- &:nth-of-type(1) {
|
|
|
- top: 150px;
|
|
|
- right: 489px;
|
|
|
- width: 184px;
|
|
|
- height: 114px;
|
|
|
- }
|
|
|
- &:nth-of-type(2) {
|
|
|
- width: 184px;
|
|
|
- height: 109px;
|
|
|
- top: 26px;
|
|
|
- right: 489px;
|
|
|
- }
|
|
|
- &:nth-of-type(3) {
|
|
|
- width: 94px;
|
|
|
- height: 239px;
|
|
|
- top: 26px;
|
|
|
- right: 683px;
|
|
|
- }
|
|
|
- &:nth-of-type(4) {
|
|
|
- width: 158px;
|
|
|
- height: 109px;
|
|
|
- top: 26px;
|
|
|
- left: 357px;
|
|
|
- }
|
|
|
- &:nth-of-type(5) {
|
|
|
- width: 177px;
|
|
|
- height: 114px;
|
|
|
- top: 150px;
|
|
|
- left: 339px;
|
|
|
- }
|
|
|
- &:nth-of-type(6) {
|
|
|
- background-color: transparent;
|
|
|
- z-index: 9;
|
|
|
- width: 165px;
|
|
|
- height: 161px;
|
|
|
- background-image: url("../assets/img/zhan/1_6.png");
|
|
|
- background-size: 100% 100%;
|
|
|
- top: 151px;
|
|
|
- left: 166px;
|
|
|
- padding-left: 20px;
|
|
|
- &::after {
|
|
|
- content: "";
|
|
|
- position: absolute;
|
|
|
- top: -1px;
|
|
|
- right: -8px;
|
|
|
- width: 12px;
|
|
|
- height: 115px;
|
|
|
- }
|
|
|
- &:hover {
|
|
|
- background-color: transparent;
|
|
|
- background-image: url("../assets/img/zhan/1_6Ac.png");
|
|
|
- }
|
|
|
- }
|
|
|
- &:nth-of-type(7) {
|
|
|
- z-index: 8;
|
|
|
- width: 272px;
|
|
|
- height: 204px;
|
|
|
- background-color: transparent;
|
|
|
- top: 27px;
|
|
|
- left: 73px;
|
|
|
- background-image: url("../assets/img/zhan/1_7.png");
|
|
|
- background-size: 100% 100%;
|
|
|
- padding-bottom: 20px;
|
|
|
- &:hover {
|
|
|
- background-image: url("../assets/img/zhan/1_7Ac.png");
|
|
|
- background-color: transparent;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .active {
|
|
|
- background-color: #c48871;
|
|
|
- }
|
|
|
- .box6.active {
|
|
|
- background-image: url("../assets/img/zhan/1_6Ac.png");
|
|
|
- }
|
|
|
- .box7.active {
|
|
|
- background-image: url("../assets/img/zhan/1_7Ac.png");
|
|
|
- }
|
|
|
+ z-index: 10;
|
|
|
+ position: absolute;
|
|
|
+ top: 5px;
|
|
|
+ left: 5px;
|
|
|
+ width: 852px;
|
|
|
+ height: 543px;
|
|
|
+ background: url("../assets/img/zhanBac2.png");
|
|
|
}
|
|
|
.rightZhan {
|
|
|
position: absolute;
|