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{
box-sizing: border-box;
width: 600px;
width: 520px;
min-height: 100px;
padding: 25px 20px;
&-content{

View File

@ -1,6 +1,19 @@
<!-- -->
<template>
<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>
</template>
@ -12,14 +25,23 @@ export default {
name: '',
data () {
return {
value1: [],
charts: '',
opinionData: ['3', '2', '4', '4', '5'],
xAxis: [1, 2, 3, 4, 5]
}
},
methods: {
changeTime () {
this.drawLine('myChart')
},
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) {
this.$message.error(res.msg)
return []
@ -38,6 +60,7 @@ export default {
this.charts = echarts.init(document.getElementById(id))
this.charts.setOption({
grid: {
top: '1%',
left: '3%',
right: '4%',
bottom: '3%',
@ -83,6 +106,12 @@ export default {
}
}
</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>