| | |
| | | border-radius: 8px; |
| | | padding: 15px; |
| | | min-height: 300px; |
| | | max-height: calc(100vh - 600px); |
| | | /* max-height: calc(100vh - 600px); */ |
| | | overflow: hidden; |
| | | margin-bottom: 20px; |
| | | } |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getRealTimeRentData } from './service' |
| | | export default { |
| | | name: 'RightPanel', |
| | | props: { |
| | |
| | | } |
| | | }, |
| | | data() { |
| | | return {} |
| | | return { |
| | | realTimeRentData: [] |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | getRealTimeRentData().then(res => { |
| | | this.realTimeRentData = res.data |
| | | }) |
| | | setInterval(() => { |
| | | getRealTimeRentData().then(res => { |
| | | this.realTimeRentData = res.data |
| | | }) |
| | | }, 10000) |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <div v-if="loading" class="main-content"> |
| | | <LeftPanel :staticsData="staticsData" :rentRank="rentRank" /> |
| | | <MapPanel /> |
| | | <RightPanel :staticsData="staticsData" :realTimeRentData="realTimeRentData" /> |
| | | <RightPanel :staticsData="staticsData" /> |
| | | </div> |
| | | <BottomCharts v-if="loading" :rentIncomeTrend="rentIncomeTrend" :tenantCountTrend="tenantCountTrend" /> |
| | | <div class="footer"></div> |
| | |
| | | import MapPanel from '@/components/MapPanel.vue' |
| | | import RightPanel from '@/components/RightPanel.vue' |
| | | import BottomCharts from '@/components/BottomCharts.vue' |
| | | import { getStaticsData, getRentRank, getRentIncomeTrend, getTenantCountTrend, getRealTimeRentData } from '@/components/service' |
| | | import { getStaticsData, getRentRank, getRentIncomeTrend, getTenantCountTrend } from '@/components/service' |
| | | |
| | | export default { |
| | | name: 'DataScreen', |
| | |
| | | rentRank: [], |
| | | rentIncomeTrend: [], |
| | | tenantCountTrend: [], |
| | | realTimeRentData: [], |
| | | loading: false |
| | | } |
| | | }, |
| | |
| | | }, |
| | | methods: { |
| | | fetchData() { |
| | | Promise.all([getStaticsData(), getRentRank(), getRentIncomeTrend(), getTenantCountTrend(), getRealTimeRentData()]).then(res => { |
| | | Promise.all([getStaticsData(), getRentRank(), getRentIncomeTrend(), getTenantCountTrend()]).then(res => { |
| | | this.staticsData = res[0].data |
| | | this.rentRank = res[1].data |
| | | this.rentIncomeTrend = res[2].data |
| | | this.tenantCountTrend = res[3].data |
| | | this.realTimeRentData = res[4].data |
| | | this.loading = true |
| | | }) |
| | | } |