This commit is contained in:
熊成强 2020-11-18 14:55:06 +08:00
parent 1e1bbd4667
commit d367ae32a9
2 changed files with 33 additions and 4 deletions

View File

@ -169,7 +169,7 @@ export default {
} }
&-right{ &-right{
box-sizing: border-box; box-sizing: border-box;
width: 600px; width: 520px;
min-height: 100px; min-height: 100px;
padding: 25px 20px; padding: 25px 20px;
&-content{ &-content{

View File

@ -1,6 +1,19 @@
<!-- --> <!-- -->
<template> <template>
<div> <div>
<div class="commonFont report">
<div>个人成长曲线</div>
<el-date-picker
size="mini"
@change='changeTime'
v-model="value1"
value-format='yyyy-MM-dd'
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</div>
<div id="myChart" :style="{width: '100%', height: '200px'}"></div> <div id="myChart" :style="{width: '100%', height: '200px'}"></div>
</div> </div>
</template> </template>
@ -12,14 +25,23 @@ export default {
name: '', name: '',
data () { data () {
return { return {
value1: [],
charts: '', charts: '',
opinionData: ['3', '2', '4', '4', '5'], opinionData: ['3', '2', '4', '4', '5'],
xAxis: [1, 2, 3, 4, 5] xAxis: [1, 2, 3, 4, 5]
} }
}, },
methods: { methods: {
changeTime () {
this.drawLine('myChart')
},
async handleData () { async handleData () {
let res = await apiOwnResult({}) const parmas = {}
if (this.value1.length > 0) {
parmas.startTime = this.value1[0]
parmas.endTime = this.value1[1]
}
let res = await apiOwnResult(parmas)
if (res.code !== 200) { if (res.code !== 200) {
this.$message.error(res.msg) this.$message.error(res.msg)
return [] return []
@ -38,6 +60,7 @@ export default {
this.charts = echarts.init(document.getElementById(id)) this.charts = echarts.init(document.getElementById(id))
this.charts.setOption({ this.charts.setOption({
grid: { grid: {
top: '1%',
left: '3%', left: '3%',
right: '4%', right: '4%',
bottom: '3%', bottom: '3%',
@ -83,6 +106,12 @@ export default {
} }
} }
</script> </script>
<style lang='' scoped> <style lang='less' scoped>
.report{
font-size: 14px;
margin: 0 0 10px 0;
display: flex;
align-items: center;
justify-content: space-between;
}
</style> </style>