|
@@ -5,42 +5,47 @@
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="4">
|
|
<el-col :span="4">
|
|
|
<p style="font-size: 14px">流入量</p>
|
|
<p style="font-size: 14px">流入量</p>
|
|
|
- <p style="font-size: 20px">12345</p>
|
|
|
|
|
|
|
+ <p style="font-size: 20px">{{ detailData.inCount }}</p>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
<el-col :span="4">
|
|
|
<p style="font-size: 14px">流出量</p>
|
|
<p style="font-size: 14px">流出量</p>
|
|
|
- <p style="font-size: 20px">12345</p>
|
|
|
|
|
|
|
+ <p style="font-size: 20px">{{ detailData.outCount }}</p>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
<el-col :span="4">
|
|
|
<p style="font-size: 14px">总接待人数</p>
|
|
<p style="font-size: 14px">总接待人数</p>
|
|
|
- <p style="font-size: 20px">12345</p>
|
|
|
|
|
|
|
+ <p style="font-size: 20px">{{ detailData.inCount + detailData.outCount }}</p>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
<el-col :span="4">
|
|
|
<p style="font-size: 14px">实时容量</p>
|
|
<p style="font-size: 14px">实时容量</p>
|
|
|
- <p style="font-size: 20px">12345</p>
|
|
|
|
|
|
|
+ <p style="font-size: 20px">{{ detailData.inCount - detailData.outCount }}</p>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
<el-col :span="4">
|
|
|
<p style="font-size: 14px">平均停留时长</p>
|
|
<p style="font-size: 14px">平均停留时长</p>
|
|
|
- <p style="font-size: 20px">12345</p>
|
|
|
|
|
|
|
+ <p style="font-size: 20px">{{ detailData.avgStayTime }}秒</p>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
- <div style="height: 16px" />
|
|
|
|
|
|
|
+ <div style="height: 16px"/>
|
|
|
<el-row :gutter="16">
|
|
<el-row :gutter="16">
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-card>
|
|
<el-card>
|
|
|
<div slot="header">性别</div>
|
|
<div slot="header">性别</div>
|
|
|
- <div id="gender-box" style="width: 100%;height:200px;" />
|
|
|
|
|
|
|
+ <div id="gender-box" style="width: 100%;height:200px;"/>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-card>
|
|
<el-card>
|
|
|
<div slot="header">来源</div>
|
|
<div slot="header">来源</div>
|
|
|
- <div id="from-source-box" style="width: 100%;height:200px;" />
|
|
|
|
|
|
|
+ <div id="from-source-box" style="width: 100%;height:200px;"/>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
- <el-card />
|
|
|
|
|
|
|
+ <el-card>
|
|
|
|
|
+ <el-row v-for="item in detailData.listFromSource" :key="item.name" style="margin: 12px 0">
|
|
|
|
|
+ <el-col :span="12">{{ item.name }}</el-col>
|
|
|
|
|
+ <el-col :span="12">{{ item.value }}人次</el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ </el-card>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
@@ -48,23 +53,29 @@
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
import * as echarts from 'echarts'
|
|
import * as echarts from 'echarts'
|
|
|
|
|
+import { findDetail } from '@/api/equipment/equipment_passenger'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {},
|
|
components: {},
|
|
|
data() {
|
|
data() {
|
|
|
- return {}
|
|
|
|
|
|
|
+ return {
|
|
|
|
|
+ detailData: {}
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
computed: {},
|
|
computed: {},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
const id = this.$route.params.id
|
|
const id = this.$route.params.id
|
|
|
console.log(id)
|
|
console.log(id)
|
|
|
- this.buildFromSource()
|
|
|
|
|
- this.buildGender()
|
|
|
|
|
|
|
+ findDetail(id).then(detailData => {
|
|
|
|
|
+ this.detailData = detailData
|
|
|
|
|
+ this.buildGender(this.detailData.listGenders)
|
|
|
|
|
+ this.buildFromSource(this.detailData.listFromSource)
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- buildGender() {
|
|
|
|
|
|
|
+ buildGender(listGenders) {
|
|
|
const chart = echarts.init(document.getElementById('gender-box'))
|
|
const chart = echarts.init(document.getElementById('gender-box'))
|
|
|
chart.setOption({
|
|
chart.setOption({
|
|
|
tooltip: {
|
|
tooltip: {
|
|
@@ -93,15 +104,12 @@ export default {
|
|
|
labelLine: {
|
|
labelLine: {
|
|
|
show: false
|
|
show: false
|
|
|
},
|
|
},
|
|
|
- data: [
|
|
|
|
|
- { value: 1048, name: '男' },
|
|
|
|
|
- { value: 735, name: '女' }
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ data: listGenders
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- buildFromSource() {
|
|
|
|
|
|
|
+ buildFromSource(listFromSource) {
|
|
|
const chart = echarts.init(document.getElementById('from-source-box'))
|
|
const chart = echarts.init(document.getElementById('from-source-box'))
|
|
|
chart.setOption({
|
|
chart.setOption({
|
|
|
tooltip: {
|
|
tooltip: {
|
|
@@ -130,13 +138,7 @@ export default {
|
|
|
labelLine: {
|
|
labelLine: {
|
|
|
show: false
|
|
show: false
|
|
|
},
|
|
},
|
|
|
- data: [
|
|
|
|
|
- { value: 1048, name: '湖南' },
|
|
|
|
|
- { value: 735, name: '北京' },
|
|
|
|
|
- { value: 580, name: '天津' },
|
|
|
|
|
- { value: 484, name: '湖北' },
|
|
|
|
|
- { value: 300, name: '上海' }
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ data: listFromSource
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
})
|
|
})
|