This commit is contained in:
杜建超 2020-09-14 10:18:32 +08:00
parent 619ccf2465
commit 8fed6dedb7
2 changed files with 79 additions and 0 deletions

6
src/api/api_report.js Normal file
View File

@ -0,0 +1,6 @@
import http from '../utils/http'
// 获取侧边菜单栏
export const apiGetOwnResult = params => {
return http({url: '/lz_management/report/own/result', method: 'get', params})
}

View File

@ -0,0 +1,73 @@
<template>
<div>
<!-- echarts容器 -->
<el-row>
<el-col :span="12">
<!-- Elemenet组件 阴影卡片 -->
<el-card shadow="always">
<div class="echarts-trend" style="width: 700px;height:500px;"></div>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
// ECharts
import echarts from 'echarts'
import {apiGetOwnResult} from '@/api/api_report'
export default {
data () {
return {
data: [],
option: {
name: '用户访问趋势',
type: 'line',
data: []
}
}
},
//
async mounted () {
// domecharts
let myChart = echarts.init(document.querySelector('.echarts-trend'))
//
myChart.setOption({
title: {
text: '成长曲线分析'
},
tooltip: {},
xAxis: {
data: this.data
},
yAxis: {},
series: [this.option]
})
},
activated () {
this.getOwnResult
},
methods: {
getOwnResult () {
apiGetOwnResult({
'startTime': '',
'endTime': ''
}).then(data => {
if (data && data.code === 0) {
this.data = data.page.list
this.totalPage = data.page.totalCount
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
}
}
}
</script>
<style scoped>
</style>