whycwx
2021-07-31 a4c43ac50daa0a3d902523745c8cece9a3ee3b40
src/pages/switchboard/switchboard.vue
@@ -1,6 +1,7 @@
<template>
<div class="body_box">
     <div class="tipTitle">开关柜监控</div>
    <!-- 大功率整流电源监控 -->
     <div class="tipTitle">大功率整流电源监控</div>
    <div class="left_Box">
       
        <div class="diagram-content">
@@ -11,7 +12,7 @@
    <div class="content_box">
        <div class="content_top">
            <p class="title_into">当前运行情况</p>
            <el-form ref="form" label-width="120px">
            <el-form ref="form" label-width="125px">
                <el-form-item label="大功率整流电源:">
                    <el-input size="mini" v-model="formData.thisInfo.dglzldy" style="width:100px"></el-input>
                </el-form-item>
@@ -25,9 +26,9 @@
                        <el-input size="mini" v-model="formData.thisInfo.btdy" style="width:100px"></el-input>
                    </el-form-item>
                </el-col>
                <el-form-item label="直流配电板:">
                <!-- <el-form-item label="直流配电板:">
                    <el-input size="mini" v-model="formData.thisInfo.zlpdb" style="width:100px"></el-input>
                </el-form-item>
                </el-form-item> -->
            </el-form>
        </div>
        <div class="content_cent">
@@ -88,9 +89,9 @@
            <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>
@@ -98,11 +99,11 @@
    </div>
    <div class="right_box">
        <p class="title_into">实时曲线</p>
        <p class="title_echarts">A套电源电源电流</p>
        <p class="title_echarts">A套电源电压电流</p>
        <div class="echarts-right" ref="currA">
        </div>
        <p class="title_echarts">B套电源电源电流</p>
        <p class="title_echarts">B套电源电压电流</p>
        <div class="echarts-right" ref="currB">
        </div>
@@ -114,11 +115,13 @@
import getWsUrl from "@/assets/js/getWsUrl";
import * as echarts from 'echarts';
import gridCircuitDiagram from '@/pages/switchboard/js/gridCircuitDiagram'
import diagramStates from '@/pages/switchboard/js/diagramStates'
let diagram;
export default {
    chart: {},
    data(){
        return {
            isOpen:false,
            tableData:[],
            formData:{
                thisInfo:{
@@ -153,6 +156,7 @@
        
        let self = this;
        diagram = gridCircuitDiagram(this.$refs.static, this.$refs.flush);
        diagramStates(diagram, 'run1');
        self.initEcharts();
        self.openSocket();
    },
@@ -189,6 +193,7 @@
            let self = this;
            let result = JSON.parse(res.data)
            if(result.code == 1){
                this.isOpen = true;
                // 表单赋值
                self.formData.thisInfo.cxFivePanelCurr = result.data.screenRTList[0].panelCurr + "A";
                self.echartsList[0].echartsCurr.push(result.data.screenRTList[0].panelCurr);
@@ -225,7 +230,6 @@
                }
                self.setOption(item,true);
            });
            console.log(result)
        },
        getTime(){
            var myDate = new Date(); //实例一个时间对象;
@@ -265,7 +269,8 @@
                        bottom: '30'
                    },
                    tooltip: {
                        show: true
                        show: true,
                        "trigger":"axis",
                    },
                    xAxis: {
                        type: 'category',
@@ -303,6 +308,7 @@
                        // xAxisIndex: 0,
                        yAxisIndex: 0,//使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用。
                        type: 'line',
                        symbol: 'none',
                        step: false,
                        smooth: true
                    },{
@@ -310,6 +316,7 @@
                        // xAxisIndex: 0,
                        yAxisIndex: 1,//使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用。
                        type: 'line',
                        symbol: 'none',
                        // step: false,
                        smooth: true
                    },]