|
@@ -12,11 +12,18 @@
|
|
|
<dv-decoration-10 style="width:100%;height:5px;margin: 30px 0;"/>
|
|
|
<dv-border-box-1>
|
|
|
<div class="sr-wrap">
|
|
|
- <dv-scroll-ranking-board :config="config" style="width:500px;height:300px" />
|
|
|
+ <dv-scroll-ranking-board :config="configClick" style="width:500px;height:300px" />
|
|
|
</div>
|
|
|
</dv-border-box-1>
|
|
|
<dv-decoration-6 style="width:100%;height:30px;margin: 30px 0;" />
|
|
|
</div>
|
|
|
+ <div class="scoped-rank">
|
|
|
+ <dv-border-box-11 title="搜索总榜">
|
|
|
+ <div class="sr-wrap2">
|
|
|
+ <dv-capsule-chart :config="configSearch" style="width:500px;height:610px" />
|
|
|
+ </div>
|
|
|
+ </dv-border-box-11>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -26,7 +33,11 @@ export default {
|
|
|
name: 'Dashboard',
|
|
|
data () {
|
|
|
return {
|
|
|
- config: {
|
|
|
+ configClick: {
|
|
|
+ data: [],
|
|
|
+ unit: '次',
|
|
|
+ },
|
|
|
+ configSearch: {
|
|
|
data: [],
|
|
|
unit: '次',
|
|
|
},
|
|
@@ -43,19 +54,32 @@ export default {
|
|
|
else if (hour < 17){this.timeTips = '下午好!'}
|
|
|
else if (hour < 19){this.timeTips = '傍晚好!'}
|
|
|
else if (hour < 22){this.timeTips = '晚上好!'}
|
|
|
- this.$api.other.admindexranklist().then(res => {
|
|
|
- console.log(res)
|
|
|
- const estateClickRank = res.estate_click_rank || []
|
|
|
- const newArr = estateClickRank.map(item => {
|
|
|
+ this.$api.other.admindexrankclick().then(res => {
|
|
|
+ const list = res.estate_click_rank || []
|
|
|
+ const newArr = list.map(item => {
|
|
|
return {
|
|
|
value: Number(item.click_num),
|
|
|
name: item.estate_name,
|
|
|
}
|
|
|
})
|
|
|
- let config = this.config
|
|
|
+ let config = this.configClick
|
|
|
config.data = [...newArr]
|
|
|
- this.config = {...config}
|
|
|
+ this.configClick = {...config}
|
|
|
})
|
|
|
+ this.$api.other.admindexranksearch().then(res => {
|
|
|
+ const list = res || []
|
|
|
+ console.log(list)
|
|
|
+ const newArr = list.map(item => {
|
|
|
+ return {
|
|
|
+ value: Number(item.search_num),
|
|
|
+ name: item.estate_name,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ let config = this.configSearch
|
|
|
+ config.data = [...newArr]
|
|
|
+ this.configSearch = {...config}
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters([
|
|
@@ -82,9 +106,11 @@ export default {
|
|
|
}
|
|
|
.scoped-rank {
|
|
|
width: 600px;
|
|
|
+ margin-right: 20px;
|
|
|
box-sizing: border-box;
|
|
|
padding: 20px;
|
|
|
display: inline-block;
|
|
|
+ vertical-align: top;
|
|
|
.sr-top-left {
|
|
|
display: inline-block;
|
|
|
vertical-align: middle;
|
|
@@ -100,5 +126,8 @@ export default {
|
|
|
.sr-wrap {
|
|
|
padding: 30px;
|
|
|
}
|
|
|
+ .sr-wrap2 {
|
|
|
+ padding: 60px 20px 20px;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|