Files
dvcp_v2_webapp/project/dv/apps/components/PdGrid.vue

245 lines
6.1 KiB
Vue
Raw Normal View History

2022-08-10 10:59:08 +08:00
<template>
2022-08-10 14:49:16 +08:00
<div class="pdgrid" @click="isShowGrid1 = false">
<div class="pdgrid-title">
2022-08-10 10:59:08 +08:00
<h2>幸福郫都微网实格架构</h2>
</div>
2022-08-10 16:49:28 +08:00
<div class="pdgrid-grid__title">
<h2>郫都某街道</h2>
</div>
2022-08-10 14:49:16 +08:00
<div class="pdgrid-body">
<div class="pdgrid-body__item">
2022-08-10 11:27:20 +08:00
<h2>240</h2>
<p>多层网格</p>
</div>
2022-08-10 14:49:16 +08:00
<div class="pdgrid-body__item" @click.stop="isShowGrid1 = true">
2022-08-10 11:27:20 +08:00
<h2>240</h2>
<p>第一网格</p>
</div>
2022-08-10 14:49:16 +08:00
<div class="pdgrid-body__item">
2022-08-10 11:27:20 +08:00
<h2>240</h2>
<p>微网格</p>
</div>
</div>
2022-08-10 14:54:14 +08:00
<transition name="fade">
<div class="grid-dialog" v-show="isShowGrid1">
<div class="mask"></div>
<div class="grid-container">
<h2>已选择的网格</h2>
<div class="grid-list">
<div
:class="[currIndex1 === index ? 'grid-active' : '']"
v-for="(item, index) in 20"
:key="index"
@click.stop="currIndex1 = index">
幸福郫都微网实格架构
</div>
2022-08-10 14:49:16 +08:00
</div>
</div>
2022-08-10 14:54:14 +08:00
</div>
</transition>
2022-08-10 10:59:08 +08:00
</div>
</template>
<script>
export default {
2022-08-10 14:49:16 +08:00
name: 'pdgrid',
2022-08-10 10:59:08 +08:00
data () {
return {
2022-08-10 14:54:14 +08:00
isShowGrid1: false,
currIndex1: 0
2022-08-10 10:59:08 +08:00
}
}
}
</script>
<style lang="scss">
2022-08-10 14:49:16 +08:00
.pdgrid {
2022-08-10 10:59:08 +08:00
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
box-sizing: border-box;
background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/middle-bg.png) no-repeat center;
background-size: contain;
2022-08-10 14:54:14 +08:00
.fade-enter-active, .fade-leave-active {
transition: opacity .3s ease-in-out;
}
.fade-enter, .fade-leave-to {
opacity: 0;
}
2022-08-10 11:27:20 +08:00
* {
box-sizing: border-box;
}
2022-08-10 16:49:28 +08:00
.pdgrid-grid__title {
position: absolute;
top: 40px;
left: 50%;
width: 271px;
height: 53px;
line-height: 53px;
text-align: center;
background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/grid-title-sbg.png) no-repeat center;
background-size: 100% 100%;
transform: translateX(-50%);
h2 {
color: #FFFFFF;
font-size: 21px;
text-shadow: 0px 0px 13px rgb(59 182 255 / 80%);
background: #fff;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
2022-08-10 14:49:16 +08:00
.pdgrid-title {
2022-08-10 10:59:08 +08:00
position: absolute;
2022-08-10 11:36:55 +08:00
top: 220px;
2022-08-10 10:59:08 +08:00
left: 50%;
width: 640px;
height: 80px;
line-height: 80px;
text-align: center;
background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/middle-titlebg.png) no-repeat center;
background-size: 100% 100%;
transform: translateX(-50%);
h2 {
color: #FFFFFF;
2022-08-10 11:27:20 +08:00
font-size: 32px;
2022-08-10 11:13:56 +08:00
text-shadow: 0px 0px 13px rgb(59 182 255 / 80%);
background: #fff;
2022-08-10 10:59:08 +08:00
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
2022-08-10 11:27:20 +08:00
2022-08-10 14:49:16 +08:00
.pdgrid-body {
2022-08-10 11:27:20 +08:00
display: flex;
position: absolute;
justify-content: space-between;
2022-08-10 16:49:28 +08:00
bottom: 200px;
2022-08-10 11:27:20 +08:00
left: 0;
width: 100%;
padding: 0 112px;
2022-08-10 14:49:16 +08:00
.pdgrid-body__item {
2022-08-10 11:27:20 +08:00
display: flex;
flex-direction: column;
width: 200px;
height: 187px;
align-items: center;
padding-top: 71px;
2022-08-10 14:49:16 +08:00
cursor: pointer;
2022-08-10 11:27:20 +08:00
background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/item-bg.png) no-repeat center;
background-size: 100% 100%;
2022-08-10 14:49:16 +08:00
transition: opacity ease 0.3s;
&:hover {
opacity: 0.8;
}
2022-08-10 11:27:20 +08:00
&:nth-of-type(2) {
position: relative;
top: 67px;
}
h2 {
font-size: 36px;
color: #FFFFFF;
text-shadow: 0px 0px 13px rgb(59 182 255 / 80%);
background: #fff;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
p {
font-size: 18px;
color: #FFFFFF;
text-shadow: 0px 0px 13px rgb(59 182 255 / 80%);
background: #fff;
-webkit-background-clip: text;
font-weight: 600;
-webkit-text-fill-color: transparent;
}
}
}
2022-08-10 14:49:16 +08:00
.grid-dialog {
position: fixed;
top: 0;
left: 0;
z-index: 111;
width: 100%;
height: 100%;
& > .mask {
position: absolute;
left: 0;
top: 0;
z-index: 1;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
}
.grid-container {
display: flex;
position: absolute;
flex-direction: column;
left: 50%;
top: 50%;
z-index: 2;
width: 640px;
height: 640px;
background: rgba(7,13,41,0.9);
border: 1px solid #144662;
transform: translate(-50%, -50%);
& > h2 {
width: 100%;
height: 67px;
line-height: 67px;
text-align: center;
color: #FFFFFF;
font-size: 27px;
text-shadow: 0px 0px 13px rgb(59 182 255 / 80%);
background: url(https://cdn.cunwuyun.cn/dvcp/dv/pddv/grid-title-bg.png) no-repeat center;
background-size: 100% 100%;
}
.grid-list {
flex: 1;
overflow-y: auto;
& > div {
height: 67px;
line-height: 67px;
text-align: center;
color: #FFFFFF;
font-size: 27px;
2022-08-10 15:19:50 +08:00
cursor: pointer;
transition: all ease 0.5s;
2022-08-10 14:49:16 +08:00
&.grid-active {
background: linear-gradient(270deg, rgba(0,48,124,0) 0%, #00307C 16%, rgba(0,99,255,0.9100) 50%, rgba(0,48,124,0.8200) 87%, rgba(0,48,124,0) 100%);
box-shadow: inset 0px -1px 0px 0px rgba(16,34,54,1);
text-shadow: 0px 3px 5px rgba(0,0,0,0.5000);
}
2022-08-10 14:54:14 +08:00
&:hover {
background: linear-gradient(270deg, rgba(0,48,124,0) 0%, #00307C 16%, rgba(0,99,255,0.9100) 50%, rgba(0,48,124,0.8200) 87%, rgba(0,48,124,0) 100%);
box-shadow: inset 0px -1px 0px 0px rgba(16,34,54,1);
text-shadow: 0px 3px 5px rgba(0,0,0,0.5000);
}
2022-08-10 14:49:16 +08:00
}
}
}
}
2022-08-10 10:59:08 +08:00
}
</style>