Commit cedc12b4 authored by 郭铭瑶's avatar 郭铭瑶 🤘

修改海洋牧场左右移出效果

parent 28ea071b
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</i-col> </i-col>
</Row> </Row>
<m-scroll :length="model.length" :limit="12"> <m-scroll :length="model.length" :limit="12">
<Row class="row" v-for="(row, rowIndex) in model" :key="rowIndex" :style="`${row.count >= 15 ? 'color:#d04e4b': ''}`"> <Row @click.native="$emit('select')" class="row item" v-for="(row, rowIndex) in model" :key="rowIndex" :style="`${row.count >= 15 ? 'color:#d04e4b': ''}`">
<i-col class="col" v-for="col in layout" :key="col.key" :span="col.width" :offset="col.offset || 0"> <i-col class="col" v-for="col in layout" :key="col.key" :span="col.width" :offset="col.offset || 0">
<!-- <div v-if="typeof row[col.key] === 'number'" :style="`text-align: ${col.align || 'left'};color: ${col.color};width:100%;`"> <!-- <div v-if="typeof row[col.key] === 'number'" :style="`text-align: ${col.align || 'left'};color: ${col.color};width:100%;`">
<m-count :value="row[col.key]" :decimal="0"/> <m-count :value="row[col.key]" :decimal="0"/>
...@@ -73,6 +73,10 @@ export default { ...@@ -73,6 +73,10 @@ export default {
font-size 1rem font-size 1rem
&:nth-child(2n) &:nth-child(2n)
background-color $color-map(0.15) background-color $color-map(0.15)
&.item
cursor pointer
&:hover
color $edgeColor
.col .col
padding 0 .5rem padding 0 .5rem
display flex display flex
......
This diff is collapsed.
<template> <template>
<m-grid <div class="ocean-farm">
area="grid"
:template="[
'left . right',
]"
columns="1fr 2fr 1fr"
rows="1fr"
gap="0.5rem">
<div id="oceanMap"/> <div id="oceanMap"/>
<div v-if="showDetail" class="back-btn" @click="handleBack"> <div v-if="showDetail" class="back-btn" @click="handleBack">
<Icon type="md-arrow-round-back" /> 返回 <Icon type="md-arrow-round-back" /> 返回
...@@ -86,7 +79,7 @@ ...@@ -86,7 +79,7 @@
</m-card> </m-card>
</div> </div>
</m-animate> </m-animate>
</m-grid> </div>
</template> </template>
<script> <script>
...@@ -297,16 +290,16 @@ export default { ...@@ -297,16 +290,16 @@ export default {
<p><span>建设类型:</span>${type}</p> <p><span>建设类型:</span>${type}</p>
</div> </div>
` `
}).open(this.map, location) })
this.markerInfo.open(this.map, location)
}) })
return marker return marker
}) })
this.map.add(this.mapMarker) this.map.add(this.mapMarker)
}, },
handleBack() { handleBack() {
this.showDetail = false
this.polygonInfo && this.polygonInfo.close()
this.markerInfo && this.markerInfo.close() this.markerInfo && this.markerInfo.close()
this.showDetail = false
if (this.mapMarker.length > 0) { if (this.mapMarker.length > 0) {
this.mapMarker.forEach(marker => { this.mapMarker.forEach(marker => {
marker.setIcon(this.preIcon) marker.setIcon(this.preIcon)
...@@ -338,6 +331,8 @@ export default { ...@@ -338,6 +331,8 @@ export default {
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
.ocean-farm
position relative
#oceanMap #oceanMap
z-index 9 z-index 9
width 100% width 100%
...@@ -351,7 +346,7 @@ export default { ...@@ -351,7 +346,7 @@ export default {
height @width height @width
cursor pointer cursor pointer
z-index 9999 z-index 9999
transition all 1s ease-in-out transition all .5s ease-in-out
transform-origin center transform-origin center
&.on &.on
right 1rem right 1rem
...@@ -376,13 +371,17 @@ export default { ...@@ -376,13 +371,17 @@ export default {
font-family $font-pang !important font-family $font-pang !important
font-size 1.5rem !important font-size 1.5rem !important
.content .content
width 25%
height auto
display flex display flex
flex-direction column flex-direction column
width 100%
height 100%
overflow hidden overflow hidden
position absolute
z-index 10
top .5rem
bottom 0
>div >div
margin-top .5rem margin-bottom .5rem
&.part-left, &.part-left,
&.part-right &.part-right
>div >div
...@@ -390,7 +389,11 @@ export default { ...@@ -390,7 +389,11 @@ export default {
flex 1 flex 1
&:nth-child(2) &:nth-child(2)
flex 2 flex 2
&.part-right
right .5rem
&.part-left,
&.part-left2 &.part-left2
left .5rem
>div >div
flex 1 flex 1
</style> </style>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<AreaCount v-if="showProvince" :data="areaData"/> <AreaCount v-if="showProvince" :data="areaData"/>
</m-card> </m-card>
<m-card title="良种场列表"> <m-card title="良种场列表">
<PlaceList v-if="showProvince" /> <PlaceList @select="handleMapChoice" v-if="showProvince" />
</m-card> </m-card>
</div> </div>
</m-animate> </m-animate>
...@@ -189,6 +189,7 @@ export default { ...@@ -189,6 +189,7 @@ export default {
}, },
handleMapChoice() { handleMapChoice() {
this.showCompany = true this.showCompany = true
this.showProvince = false
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment