This commit is contained in:
lb 2023-04-28 11:09:06 +08:00
vanhempi 9ea9a632c9
commit 62ab300c60
2 muutettua tiedostoa jossa 26 lisäystä ja 4 poistoa

Näytä tiedosto

@ -1,3 +1,15 @@
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'
}
]
};

Näytä tiedosto

@ -28,8 +28,8 @@
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div>
<div class="temp-chart">
<div id="temp-chart" class="temp-chart__inner" />
<div class="temp-chart" style="height: 300px;">
<div id="temp-chart" class="temp-chart__inner" style="height: 100%;" />
</div>
</el-dialog>
</template>
@ -38,6 +38,7 @@
import BaseListTable from "@/components/BaseListTable.vue";
import chartConfig from "./configs/chart";
import tableConfig from "./configs/tableProps";
import * as echarts from "echarts";
export default {
name: "TemperatureDialog",
@ -62,6 +63,13 @@ export default {
this.refreshLayoutKey = Math.random();
},
mounted() {},
watch: {
dataList: {
handler: function (val) {
this.drawChart(val);
},
},
},
methods: {
init(id) {
this.hisId = id;
@ -108,6 +116,8 @@ export default {
},
drawChart() {
// dataList 线
if (!this.chart) this.chart = echarts.init(document.getElementById("temp-chart"));
this.chart.setOption(this.chartConfig);
},
handleOperate() {},
handlePageChange(page) {