fix
This commit is contained in:
parent
619ccf2465
commit
8fed6dedb7
6
src/api/api_report.js
Normal file
6
src/api/api_report.js
Normal 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})
|
||||||
|
}
|
||||||
73
src/views/modules/result/report/own-result.vue
Normal file
73
src/views/modules/result/report/own-result.vue
Normal 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 () {
|
||||||
|
// 基于准备好的dom,初始化echarts实例
|
||||||
|
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>
|
||||||
Loading…
x
Reference in New Issue
Block a user