add 设备加工数量-图表,设备状态和参数,设备全参数查询
This commit is contained in:
69
src/views/monitoring/equipmentProcessAmount/graph.vue
Normal file
69
src/views/monitoring/equipmentProcessAmount/graph.vue
Normal file
@@ -0,0 +1,69 @@
|
||||
<!--
|
||||
filename: graph.vue
|
||||
author: liubin
|
||||
date: 2023-08-31 14:00:02
|
||||
description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="chart-wrapper">
|
||||
<h4>line graph</h4>
|
||||
<div class="chart" ref="chart"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
export default {
|
||||
name: 'LineChartInEquipmentProcessAmount',
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
option: {
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: [120, 200, 150, 80, 70, 110, 130],
|
||||
type: 'bar',
|
||||
showBackground: true,
|
||||
backgroundStyle: {
|
||||
color: 'rgba(180, 180, 180, 0.2)',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
if (!this.chart) this.chart = echarts.init(this.$refs.chart);
|
||||
this.chart.setOption(this.option);
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.chart.dispose();
|
||||
},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.chart-wrapper {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
background: #f1f1f1;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.chart {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user