whycwx
2021-07-23 88e497e20a51a2a127c4bc59f036f5367ab0670e
src/pages/AFEinverter/afeInverter.vue
@@ -71,14 +71,14 @@
            <div class="clear"></div>
        </div>
        <div class="content_bottom">
            <p class="title_into">告警情况</p>
            <p class="title_into">报警情况</p>
            <!-- 表单 -->
            <div class="flex-page-content">
                <div class="batteryrHistoryquery" style="width: 100%;height: 100%;">
                    <el-table :data="tableData" style="width: 100%" max-height="145px"> 
                        <el-table-column prop="date" label="告警时间" width="180"></el-table-column>
                        <el-table-column prop="name" label="告警名称" width="180"></el-table-column>
                        <el-table-column prop="address" label="告警描述"></el-table-column>
                        <el-table-column prop="date" label="报警时间" width="180"></el-table-column>
                        <el-table-column prop="name" label="报警名称" width="180"></el-table-column>
                        <el-table-column prop="address" label="报警描述"></el-table-column>
                    </el-table>
                </div>
            </div>
@@ -111,7 +111,7 @@
import * as echarts from 'echarts';
// import ContentBox from "@/components/ContentBox";
import gridCircuitDiagram from '@/pages/AFEinverter/js/gridCircuitDiagram'
// import diagramStates from '@/pages/home/topoGraphdiagram/js/diagramStates'
import diagramStates from '@/pages/AFEinverter/js/diagramStates'
let diagram;
export default {
    chart: {},
@@ -150,6 +150,7 @@
    mounted() {
        let self = this;
        diagram = gridCircuitDiagram(this.$refs.static, this.$refs.flush);
        diagramStates(diagram, 'run1');
        self.initEcharts();
        self.openSocket();
        window.addEventListener('resize', () => {
@@ -248,7 +249,7 @@
            // 关闭websocket
            if (this.isOpen) {
                // 打印关闭信息
                console.log("关闭电源实时告警WebSocket");
                console.log("关闭电源实时报警WebSocket");
                this.socket.close();
            }
        },
@@ -264,6 +265,7 @@
                        bottom: '30'
                    },
                    tooltip: {
                        "trigger":"axis",
                        show: true
                    },
                    xAxis: {
@@ -302,6 +304,7 @@
                        // xAxisIndex: 0,
                        yAxisIndex: 0,//使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用。
                        type: 'line',
                        symbol: 'none',
                        step: false,
                        smooth: true
                    },{
@@ -309,6 +312,7 @@
                        // xAxisIndex: 0,
                        yAxisIndex: 1,//使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用。
                        type: 'line',
                        symbol: 'none',
                        // step: false,
                        smooth: true
                    },]