<template>
|
<div class="soil-water-box"
|
ref='publicLegendAll'>
|
<div class="public-legends"
|
v-show="legendFlag">
|
<div v-for="(item, index) in legendsDetail"
|
:key="index">
|
<ul>
|
<li v-for="(it, ind) in item.content"
|
:key="ind">
|
|
<el-button disabled
|
plain
|
@click="layerControl(it)"
|
:class="it.btnClass"
|
:ref="it.type">
|
|
<span> {{ it.label }} </span>
|
|
</el-button>
|
|
</li>
|
</ul>
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
|
export default {
|
name: 'soilWater',
|
props: ['legendsDetail'],
|
data () {
|
return {
|
legendFlag: true
|
}
|
},
|
methods: {
|
layerControl (item) {
|
this.$parent.layerControl(item)
|
},
|
|
riskLayerNormal () {
|
|
},
|
|
riskLayerWarn () {
|
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scope>
|
.soil-water-box {
|
margin: auto;
|
position: fixed;
|
top: auto;
|
left: calc(100% / 2);
|
right: auto;
|
bottom: 2px;
|
width: auto;
|
height: auto !important;
|
text-align: center;
|
z-index: 1111 !important;
|
transform: translate(-50%, 0px);
|
|
.public-legends {
|
border-radius: 10px;
|
text-align: center;
|
max-height: 320px;
|
& > div {
|
position: relative;
|
h3 {
|
position: absolute;
|
top: -22px;
|
left: 20px;
|
background: #fff;
|
color: #4fa9fd;
|
padding: 0 8px;
|
font-size: 13px;
|
border-radius: 10px;
|
}
|
ul {
|
margin: 0;
|
border-radius: 10px;
|
display: flex;
|
justify-content: center;
|
li {
|
margin: 0 4px;
|
display: flex;
|
list-style: none;
|
align-items: center;
|
font-size: 16px;
|
|
.el-button {
|
width: 106px;
|
height: 48px;
|
color: #000 !important;
|
border: none;
|
background: rgba(0, 0, 0, 0.1);
|
}
|
|
.el-button:focus,
|
.el-button:hover {
|
color: #000 !important;
|
border: none;
|
background: rgba(0, 0, 0, 0.1);
|
}
|
|
.el-button.btn-one {
|
background: #3399ff;
|
}
|
|
.el-button.btn-one:focus,
|
.el-button.btn-one:hover {
|
background: #3399ff;
|
}
|
|
.el-button.btn-two {
|
background: #ffff66;
|
}
|
|
.el-button.btn-two:focus,
|
.el-button.btn-two:hover {
|
background: #ffff66;
|
}
|
|
.el-button.btn-three {
|
background: #ff6633;
|
}
|
|
.el-button.btn-three:focus,
|
.el-button.btn-three:hover {
|
background: #ff6633;
|
}
|
|
.el-button.btn-four {
|
background: #ff0000;
|
}
|
|
.el-button.btn-four:focus,
|
.el-button.btn-four:hover {
|
background: #ff0000;
|
}
|
}
|
}
|
}
|
}
|
}
|
</style>
|