<template>
|
<div
|
class="card animation-target"
|
:style="{ backgroundImage: data.topUrl }"
|
@click="opens"
|
>
|
<div class="floatCard">
|
<el-button type="primary" class="floatCard_buts" round v-show="handle"
|
>点击办理</el-button
|
>
|
<el-button type="success" class="floatCard_butsd" round v-show="!handle"
|
>您已成功办理,点击可查询进度</el-button
|
>
|
</div>
|
<div class="title">{{ data.menuName }}</div>
|
<!-- <img :src="data.topUrl" alt="" /> -->
|
</div>
|
</template>
|
|
<script>
|
import { mapGetters } from "vuex";
|
export default {
|
props: ["data", "ind"],
|
data() {
|
return {};
|
},
|
computed: {
|
...mapGetters(["handle"]),
|
},
|
methods: {
|
opens() {
|
var d = this.handle ? "open" : "openLook";
|
this.$emit("open", this.ind, d);
|
},
|
},
|
};
|
</script>
|
|
<style lang="scss" scoped>
|
.card {
|
position: relative;
|
float: left;
|
width: 21%;
|
height: 236px;
|
padding: 0 10px;
|
margin-bottom: 15px;
|
margin-right: 35px;
|
border-radius: 5px;
|
background-size: 100% 85%;
|
overflow: hidden;
|
background-repeat: no-repeat;
|
// background-image: url(/img/permit/服务许可背景图.jpg);
|
border: 1px solid rgba($color: #000000, $alpha: 0.1);
|
border-top: 0px solid rgba($color: #000000, $alpha: 0.3);
|
&:hover {
|
box-shadow: 0px 5px 15px rgba($color: #000000, $alpha: 0.3);
|
cursor: pointer;
|
}
|
.title {
|
width: 100%;
|
height: 35px;
|
position: absolute;
|
top: 176px;
|
left: 0;
|
}
|
}
|
.floatCard {
|
opacity: 0;
|
position: absolute;
|
width: 100%;
|
height: 100%;
|
left: 0;
|
top: 0;
|
background-color: rgba($color: #fff, $alpha: 0.6);
|
.floatCard_buts {
|
width: 110px;
|
height: 40px;
|
position: relative;
|
left: calc(50% - 55px);
|
top: calc(50% - 20px);
|
}
|
.floatCard_butsd {
|
width: 250px;
|
height: 40px;
|
position: relative;
|
left: calc(50% - 125px);
|
top: calc(50% - 20px);
|
}
|
}
|
.animation-target {
|
animation: animationA 400ms linear both;
|
&:hover {
|
animation: animation 400ms linear both;
|
.floatCard {
|
animation: floatCardanimation 200ms linear both;
|
}
|
}
|
}
|
|
@keyframes animationA {
|
0% {
|
top: -15px;
|
}
|
100% {
|
top: 0px;
|
}
|
}
|
|
@keyframes animation {
|
0% {
|
top: 0px;
|
}
|
100% {
|
top: -15px;
|
}
|
}
|
@keyframes floatCardanimation {
|
0% {
|
opacity: 0;
|
}
|
100% {
|
opacity: 1;
|
}
|
}
|
</style>
|