import chart
This commit is contained in:
parent
9ea9a632c9
commit
62ab300c60
@ -1,3 +1,15 @@
|
|||||||
export default {
|
export default {
|
||||||
|
xAxis: {
|
||||||
}
|
type: 'category',
|
||||||
|
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
data: [150, 230, 224, 218, 135, 147, 260],
|
||||||
|
type: 'line'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
@ -28,8 +28,8 @@
|
|||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
<div class="temp-chart">
|
<div class="temp-chart" style="height: 300px;">
|
||||||
<div id="temp-chart" class="temp-chart__inner" />
|
<div id="temp-chart" class="temp-chart__inner" style="height: 100%;" />
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -38,6 +38,7 @@
|
|||||||
import BaseListTable from "@/components/BaseListTable.vue";
|
import BaseListTable from "@/components/BaseListTable.vue";
|
||||||
import chartConfig from "./configs/chart";
|
import chartConfig from "./configs/chart";
|
||||||
import tableConfig from "./configs/tableProps";
|
import tableConfig from "./configs/tableProps";
|
||||||
|
import * as echarts from "echarts";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TemperatureDialog",
|
name: "TemperatureDialog",
|
||||||
@ -62,6 +63,13 @@ export default {
|
|||||||
this.refreshLayoutKey = Math.random();
|
this.refreshLayoutKey = Math.random();
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
|
watch: {
|
||||||
|
dataList: {
|
||||||
|
handler: function (val) {
|
||||||
|
this.drawChart(val);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init(id) {
|
init(id) {
|
||||||
this.hisId = id;
|
this.hisId = id;
|
||||||
@ -108,6 +116,8 @@ export default {
|
|||||||
},
|
},
|
||||||
drawChart() {
|
drawChart() {
|
||||||
// 根据 dataList 绘制折线图
|
// 根据 dataList 绘制折线图
|
||||||
|
if (!this.chart) this.chart = echarts.init(document.getElementById("temp-chart"));
|
||||||
|
this.chart.setOption(this.chartConfig);
|
||||||
},
|
},
|
||||||
handleOperate() {},
|
handleOperate() {},
|
||||||
handlePageChange(page) {
|
handlePageChange(page) {
|
||||||
|
Loading…
Reference in New Issue
Block a user