whyczyk
2021-10-13 a355aafef5a635bd31a701127cea097338cee0a7
图形跳转对应参数界面功能
18个文件已修改
1个文件已添加
497 ■■■■ 已修改文件
src/assets/js/charts/persons/wangxuan.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/charts/persons/zengyvkai.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/powerInfoData.js 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/charts/AcInputWarp.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/charts/CustomPie.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/charts/PictorialBar.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/charts/RoseChart.vue 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/charts/RoseChartED.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/charts/abeamProChart.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/charts/chinaMap.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/charts/dischargeCircuit.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/charts/histogramAlternating.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/charts/imgPieChart.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/charts/latticeBar.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/charts/monomerVoltage.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/charts/powerChart.vue 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/charts/prossPieChart.vue 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/charts/triangleBarChart.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/indexPanel/InfoPanel.vue 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/charts/persons/wangxuan.js
@@ -6,8 +6,8 @@
    chartData: {
        name: '交流ABC',
        id: 11,
        w: 0.300,
        h: 0.35,
        w: 0.235,
        h: 0.25,
        x: 0.35,
        y: 0.35,
        type: 'histogramAlternating',
@@ -29,7 +29,7 @@
        y: 0.35,
        type: 'monomerVoltage',
        setData: {
            yAxisData: ['单体电压高告警', '单体电压低告警', '单体内阻高告警', '单体内阻低告警', '单体温度高告警', '单体内阻低告警'],
            yAxisData: ['单体电压高告警', '单体电压低告警', '单体内阻高告警', '单体内阻低告警', '单体温度高告警', '单体温度低告警'],
            data: [{
                name: '告警数',
                type: 'bar',
src/assets/js/charts/persons/zengyvkai.js
@@ -103,7 +103,7 @@
        y: 0.35,
        type: 'abeamProChart',
        setData: {
            yData: ['浮充数量', '放电数量', '充电数量'],
            yData: ['浮充', '放电', '充电'],
            color: ['#f58881', '#b4d465', '#ffcb29'],
            bgColor: ['rgba(245,136,129,0.35)', 'rgba(255,255,255,0.35)', 'rgba(255,203,41,0.35)'],
            data: [32, 15, 20]
src/assets/js/powerInfoData.js
New file
@@ -0,0 +1,100 @@
export const checkboxs = {
    // 交流ABC
    jl: [
        { value: "110001,110004,110007", label: "过压", model: true },
        { value: "110002,110005,110008", label: "欠压", model: true },
        { value: "110003,110006,110009", label: "缺相", model: true },
        { value: "110003,110006,110009", label: "过流", model: true }
    ],
    // 整流器
    zlq: [
        { value: "110017,110018,110019,110020,110021,110022,110023,110024,110025,110026,110027,110028,110029,110030,110031,110032", label: "整流器总故障", model: true },
        { value: "110063,110064,110065,110066,110067,110068,110069,110070,110071,110072,110073,110074,110075,110076,110077,110078", label: "整流器欠压", model: true },
        { value: "110079,110080,110081,110082,110083,110084,110085,110086,110087,110088,110089,110090,110091,110092,110093,110094", label: "整流器过流", model: true },
        { value: "110095,110096,110097,110098,110099,110100,110101,110102,110103,110104,110105,110106,110107,110108,110109,110110", label: "整流器交流异常", model: true },
        { value: "110047,110048,110049,110050,110051,110052,110053,110054,110055,110056,110057,110058,110059,110060,110061,1100602", label: "整流器过压", model: true },
    ],
    // 故障
    gz: [
        { value: "110033", label: "交流总故障", model: true },
        { value: "110034", label: "直流总故障", model: true },
        { value: "110011", label: "防雷器故障", model: true },
        { value: "110038", label: "监控器故障", model: true },
        { value: "110119, 110120", label: "通讯故障", model: true },
        { value: "110040", label: "开关柜故障", model: true },
    ],
    // 状态
    zt: [
        { value: "110010", label: "交流停电", model: true },
        { value: "110012,110013", label: "直流电压异常", model: true },
        { value: "110014", label: "负载熔断", model: true },
        { value: "110039", label: "直流过流", model: true },
    ],
    // 电池组
    dcz: [
        { value: "110015,110016", label: "熔断", model: true },
        { value: "110041,110042", label: "电压低", model: true },
        { value: "110043,110044", label: "下电", model: true },
        { value: "110045,110046", label: "充电过流", model: true },
    ],
    // 交流输入
    jlsr: [
        { value: "110111,110112", label: "跳闸", model: true },
        { value: "110113,110114", label: "熔丝告警", model: true },
        { value: "110115,110116", label: "三相不平衡", model: true },
        { value: "110117,110118", label: "频率异常", model: true },
    ],
    // 交流输入
    jlin: [
        { value: "110121,110122", label: "停电", model: true },
        { value: "110123,110124", label: "通信故障", model: true },
    ],
    // 温湿度和烟感
    wsy: [
        { value: "110125, 110126, 110127, 110128, 110129, 110130, 110134, 110135, 110136", label: "通信故障", model: true },
        { value: "110131, 110132, 110133", label: "烟感报警", model: true },
    ],
    //电池告警
    dcgj: [
        { value: "119001", label: "在线电压", model: true },
        { value: "119002", label: "组端电压", model: true },
        { value: "119003", label: "充电电流", model: true },
        { value: "119004", label: "放电电流", model: true },
        { value: "119005", label: "单体电压", model: true },
        { value: "119006", label: "单体温度", model: true },
        { value: "119007", label: "单体内阻", model: true },
        { value: "119012", label: "漏液电压", model: true },
    ],
    //设备状态
    sbzt: [
        { value: "0", label: "浮充", model: true },
        { value: "1", label: "充电", model: true },
        { value: "2", label: "放电", model: true },
        { value: "3", label: "停电放电", model: true },
        { value: "4", label: "内阻测试", model: true },
        { value: "5", label: "K1/D1测试", model: true },
    ],
    //通讯故障
    txgz: [
        { value: "0", label: "通讯正常", model: true },
        { value: "1", label: "通讯异常", model: true },
    ],
    //续航
    jfxh: [
        { value: "1", label: "续航1小时内", model: true },
        { value: "2", label: "续航1小时到2小时", model: true },
        { value: "3", label: "续航2小时到3小时", model: true },
        { value: "4", label: "续航3小时到5小时", model: true },
        { value: "5", label: "续航5小时到8小时", model: true },
        { value: "6", label: "续航8小时以上", model: true },
    ]
};
// 告警等级
export const estateFn = function (str) {
    let estateArr = ["一级告警", "二级告警", "三级告警", "四级告警", "五级告警", "六级告警", "七级告警"];
    if (str < 1) {
        console.log("告警等级为0")
        return ""
    }
    return estateArr[str - 1];
}
src/components/charts/AcInputWarp.vue
@@ -1,15 +1,15 @@
<template>
    <div class="chartCon" @click="toParentPage">
        <div class="chartItem">
    <div class="chartCon">
        <div class="chartItem" @click="clickItem('熔丝告警')">
            <ac-input id="AcInput0" ref="AcInput0"></ac-input>
        </div>
        <div class="chartItem">
        <div class="chartItem" @click="clickItem('跳闸')">
            <ac-input id="AcInput1" ref="AcInput1"></ac-input>
        </div>
        <div class="chartItem">
        <div class="chartItem" @click="clickItem('频率异常')">
            <ac-input id="AcInput2" ref="AcInput2"></ac-input>
        </div>
        <div class="chartItem">
        <div class="chartItem" @click="clickItem('三相不平衡')">
            <ac-input id="AcInput3" ref="AcInput3"></ac-input>
        </div>
    </div>
@@ -18,6 +18,7 @@
<script>
import AcInput from './AcInput.vue'
import { WebSocketClass } from '@/assets/js/socket'
import { checkboxs } from '@/assets/js/powerInfoData'
export default {
    components: {
        AcInput
@@ -31,18 +32,27 @@
    },
    methods: {
        toParentPage() {
        toParentPage(value) {
            if (typeof (value) == 'string') {
            window.parent.parent.postMessage({
                cmd: "syncPage",
                params: {
                    pageInfo: {
                        label: "电源实时告警",
                        name: "powerRealtimeInfo",
                        src: "#/powerRealtimeInfo",
                            src: '#/powerRealtimeInfo/?alarmType=' + value,
                        closable: true
                    },
                }
            }, "*");
            }
        },
        clickItem(name) {
            checkboxs.jlsr.map(item => {
                if (item.label == name) {
                    this.toParentPage(item.value)
                }
            })
        },
        setData(data) {
            this.$nextTick(() => {
src/components/charts/CustomPie.vue
@@ -1,5 +1,5 @@
<template>
    <div class="echarts-wrapper" @click="toParentPage">
    <div class="echarts-wrapper">
        <div class="echarts-content" ref="chart"></div>
    </div>
</template>
@@ -11,6 +11,7 @@
    chartFontsize
} from '@/assets/js/chartFontsize';
import { WebSocketClass } from '@/assets/js/socket'
import { checkboxs } from '@/assets/js/powerInfoData'
export default {
    name: "CustomPie",
    chart: "",
@@ -21,21 +22,31 @@
        }
    },
    methods: {
        toParentPage() {
        toParentPage(value) {
            if (typeof (value) == 'string') {
            window.parent.parent.postMessage({
                cmd: "syncPage",
                params: {
                    pageInfo: {
                        label: "电源实时告警",
                        name: "powerRealtimeInfo",
                        src: "#/powerRealtimeInfo",
                            src: '#/powerRealtimeInfo/?alarmType=' + value,
                        closable: true
                    },
                }
            }, "*");
            }
        },
        setOption(opt) {
            this.$options.chart.setOption(opt);
            this.$options.chart.on('click', (params) => {
                let name = params.name;
                checkboxs.gz.map(item => {
                    if (item.label == name) {
                        this.toParentPage(item.value)
                    }
                })
            })
        },
        organizeData(data) {
            let angle = 0;
src/components/charts/PictorialBar.vue
@@ -7,6 +7,7 @@
<script>
import * as echarts from "echarts";
import { WebSocketClass } from '@/assets/js/socket'
import { checkboxs } from '@/assets/js/powerInfoData'
export default {
    name: "PictorialBar",
    chart: "",
@@ -23,21 +24,37 @@
        }
    },
    methods: {
        toParentPage() {
        toParentPage(value) {
            if (typeof (value) == 'string') {
            window.parent.parent.postMessage({
                cmd: "syncPage",
                params: {
                    pageInfo: {
                        label: "电池实时告警",
                        name: "batteryrTimequery",
                        src: "#/batteryrTimequery",
                            src: "#/batteryrTimequery/?alarmType=" + value,
                        closable: true
                    },
                }
            }, "*");
            }
        },
        setOption(opt) {
            this.$options.chart.setOption(opt);
            this.$options.chart.on('click', (params) => {
                console.log(params)
                let name;
                if (params.seriesName == '在线电压') {
                    name = '在线电压';
                } else if (params.seriesName == '组端电压') {
                    name = '组端电压';
                }
                checkboxs.dcgj.map(item => {
                    if (item.label == name) {
                        this.toParentPage(item.value)
                    }
                })
            })
        },
        organizeData(data) {
            let option = {
src/components/charts/RoseChart.vue
@@ -7,6 +7,7 @@
<script>
import * as echarts from 'echarts';
import { WebSocketClass } from '@/assets/js/socket'
import { checkboxs } from '@/assets/js/powerInfoData'
export default {
    name: "RoseChart",
    chart: "",
@@ -23,21 +24,72 @@
        }
    },
    methods: {
        toParentPage() {
        toParentPage(value) {
            if (typeof (value) == 'string') {
            window.parent.parent.postMessage({
                cmd: "syncPage",
                params: {
                    pageInfo: {
                        label: "设备状态查询",
                        name: 'btsStatusTest',
                        src: '#/dataMager/btsStatus',
                            name: "btsStatusTest",
                            src: "#/dataMager/btsStatus?workStauts=" + value,
                        closable: true
                    },
                }
            }, "*");
            }
        },
        toParentPage2(value) {
            if (typeof (value) == 'string') {
                window.parent.parent.postMessage({
                    cmd: "syncPage",
                    params: {
                        pageInfo: {
                            label: "设备工作状态",
                            name: "deviceWorkState",
                            src: "#/device-work-state?signalStatus=" + value,
                            closable: true
                        },
                    }
                }, "*");
            }
        },
        setOption(opt) {
            this.$options.chart.setOption(opt);
            this.$options.chart.on('click', (params) => {
                let name;
                if (params.name == '在线浮充') {
                    name = '浮充'
                    checkboxs.sbzt.map(item => {
                        if (item.label == name) {
                            this.toParentPage(item.value)
                        }
                    })
                } else if (params.name == '充电数量') {
                    name = '充电'
                    checkboxs.sbzt.map(item => {
                        if (item.label == name) {
                            this.toParentPage(item.value)
                        }
                    })
                } else if (params.name == '内阻测试数量') {
                    name = '内阻测试'
                    checkboxs.sbzt.map(item => {
                        if (item.label == name) {
                            this.toParentPage(item.value)
                        }
                    })
                } else if (params.name == '通讯故障数量') {
                    this.toParentPage2('1')
                } else if (params.name == '核容数量') {
                    name = '放电'
                    checkboxs.sbzt.map(item => {
                        if (item.label == name) {
                            this.toParentPage(item.value)
                        }
                    })
                }
            })
        },
        organizeData(data) {
            let option = {
src/components/charts/RoseChartED.vue
@@ -7,6 +7,7 @@
<script>
import * as echarts from 'echarts';
import { WebSocketClass } from '@/assets/js/socket'
import { checkboxs } from '@/assets/js/powerInfoData'
export default {
    name: "RoseChartED",
    chart: "",
@@ -23,21 +24,32 @@
        }
    },
    methods: {
        toParentPage() {
        toParentPage(value) {
            if (typeof (value) == 'string') {
            window.parent.parent.postMessage({
                cmd: "syncPage",
                params: {
                    pageInfo: {
                        label: "电池信息统计分析",
                        name: "produceTotal",
                        src: "#/dataMager/produceTotal",
                            src: "#/dataMager/produceTotal/?xuHang=" + value,
                        closable: true
                    },
                }
            }, "*");
            }
        },
        setOption(opt) {
            this.$options.chart.setOption(opt);
            this.$options.chart.on('click', (params) => {
                console.log(params)
                let name = params.name;
                checkboxs.jfxh.map(item => {
                    if (item.label == name) {
                        this.toParentPage(item.value)
                    }
                })
            })
        },
        organizeData(data) {
            let option = {
@@ -106,7 +118,6 @@
                },
                ]
                let resData = res.data;
                console.log(resData)
                for (let key in resData) {
                    optionData.map(item => {
                        if (item.name == key) {
src/components/charts/abeamProChart.vue
@@ -1,5 +1,5 @@
<template>
    <div class="flexCon" @click="toParentPage">
    <div class="flexCon">
        <div class="con">
            <div class="echarts-wrapper">
                <div class="echarts-content" ref="chart">
@@ -17,6 +17,7 @@
    chartFontsize
} from '@/assets/js/chartFontsize'
import { WebSocketClass } from '@/assets/js/socket'
import { checkboxs } from '@/assets/js/powerInfoData'
export default {
    name: "abeamProChart",
    chart: "",
@@ -34,21 +35,33 @@
        }
    },
    methods: {
        toParentPage() {
        toParentPage(value) {
            if (typeof (value) == 'string') {
            window.parent.parent.postMessage({
                cmd: "syncPage",
                params: {
                    pageInfo: {
                        label: "设备状态查询",
                        name: "btsStatusTest",
                        src: "#/dataMager/btsStatus",
                            src: "#/dataMager/btsStatus?workStauts=" + value,
                        closable: true
                    },
                }
            }, "*");
            }
        },
        setOption(opt) {
            this.$options.chart.setOption(opt);
            this.$options.chart.on('click', (params) => {
                console.log(params)
                let name = params.name;
                checkboxs.sbzt.map(item => {
                    if (item.label == name) {
                        console.log(item.value)
                        this.toParentPage(item.value)
                    }
                })
            })
        },
        organizeData(posData) {
            let dataColor = posData.color;
@@ -121,7 +134,7 @@
                    data: yData
                }],
                series: [{
                    name: '金额',
                    name: '',
                    type: 'bar',
                    zlevel: 1,
                    itemStyle: {
@@ -135,7 +148,7 @@
                    data: data
                },
                {
                    "name": "",
                    name: '',
                    type: 'pictorialBar',
                    barCategoryGap: "0%",
                    symbolPosition: 'end',
@@ -162,7 +175,7 @@
                    data: data
                },
                {
                    name: '背景',
                    name: '',
                    type: 'bar',
                    barCategoryGap: "0%",
                    barGap: '-100%',
src/components/charts/chinaMap.vue
@@ -240,7 +240,7 @@
        startSearchMapHomeState() {
            this.timers = setInterval(() => {
                this.searchChartHomeState()
            }, 15000)
            }, 60 * 1000)
        },
        initPage() {
            // 初始化地图
@@ -331,6 +331,7 @@
                        item.value.push(item.latitude);
                        tempData.push(item)
                    })
                    this.searchChartHomeState()
                    this.startSearchMapHomeState();
                } else {
                    this.initChart([], []);
src/components/charts/dischargeCircuit.vue
@@ -9,6 +9,7 @@
<script>
import * as echarts from 'echarts';
import { WebSocketClass } from '@/assets/js/socket'
import { checkboxs } from '@/assets/js/powerInfoData'
// 放电电流 页面
export default {
    name: "dischargeCircuit",
@@ -44,21 +45,31 @@
        }
    },
    methods: {
        toParentPage() {
        toParentPage(value) {
            if (typeof (value) == 'string') {
            window.parent.parent.postMessage({
                cmd: "syncPage",
                params: {
                    pageInfo: {
                        label: "电池实时告警",
                        name: "batteryrTimequery",
                        src: "#/batteryrTimequery",
                            src: "#/batteryrTimequery/?alarmType=" + value,
                        closable: true
                    },
                }
            }, "*");
            }
        },
        setOption(opt) {
            this.$options.discharge.setOption(opt);
            this.$options.discharge.on('click', () => {
                let name = "放电电流"
                checkboxs.dcgj.map(item => {
                    if (item.label == name) {
                        this.toParentPage(item.value)
                    }
                })
            })
        },
        postData() {
            let userId = localStorage.getItem('userId');
src/components/charts/histogramAlternating.vue
@@ -1,5 +1,5 @@
<template>
    <div class="echarts-wrapper echartsAlternating" ref="echartsAlternating" @click="toParentPage">
    <div class="echarts-wrapper echartsAlternating" ref="echartsAlternating">
        <div class="echarts-content" ref="alternating">
        </div>
@@ -9,6 +9,7 @@
<script>
import * as echarts from 'echarts';
import { WebSocketClass } from '@/assets/js/socket'
import { checkboxs } from '@/assets/js/powerInfoData'
// 交流ABC 页面
export default {
    name: "histogramAlternating",
@@ -44,21 +45,31 @@
        }
    },
    methods: {
        toParentPage() {
        toParentPage(value) {
            if (typeof (value) == 'string') {
            window.parent.parent.postMessage({
                cmd: "syncPage",
                params: {
                    pageInfo: {
                        label: "电源实时告警",
                        name: "powerRealtimeInfo",
                        src: "#/powerRealtimeInfo",
                            src: '#/powerRealtimeInfo/?alarmType=' + value,
                        closable: true
                    },
                }
            }, "*");
            }
        },
        setOption(opt) {
            this.$options.chart.setOption(opt);
            this.$options.chart.on('click', (params) => {
                let name = params.name;
                checkboxs.jl.map(item => {
                    if (item.label == name) {
                        this.toParentPage(item.value)
                    }
                })
            })
        },
        postData() {
            let userId = localStorage.getItem('userId');
@@ -166,7 +177,8 @@
                        show: false,
                    },
                    axisLabel: {
                        fontSize: 12
                        fontSize: 12,
                        interval: 0
                    }
                },
                yAxis: {
src/components/charts/imgPieChart.vue
@@ -1,5 +1,5 @@
<template>
    <div class="echarts-wrapper" @click="toParentPage">
    <div class="echarts-wrapper">
        <div class="echarts-content" ref="chart">
        </div>
@@ -13,6 +13,7 @@
    chartFontsize
} from '@/assets/js/chartFontsize'
import { WebSocketClass } from '@/assets/js/socket'
import { checkboxs } from '@/assets/js/powerInfoData'
const pieImg = require('../../assets/images/rectifier-img.png');
export default {
    name: "imgPieChart",
@@ -31,21 +32,31 @@
        }
    },
    methods: {
        toParentPage() {
        toParentPage(value) {
            if (typeof (value) == 'string') {
            window.parent.parent.postMessage({
                cmd: "syncPage",
                params: {
                    pageInfo: {
                        label: "电源实时告警",
                        name: "powerRealtimeInfo",
                        src: "#/powerRealtimeInfo",
                            src: '#/powerRealtimeInfo/?alarmType=' + value,
                        closable: true
                    },
                }
            }, "*");
            }
        },
        setOption(opt) {
            this.$options.chart.setOption(opt);
            this.$options.chart.on('click', (params) => {
                let name = params.name;
                checkboxs.zlq.map(item => {
                    if (item.label == name) {
                        this.toParentPage(item.value)
                    }
                })
            })
        },
        organizeData(data) {
            let imgWidth = this.$refs.chart.clientWidth * 0.14;
src/components/charts/latticeBar.vue
@@ -1,5 +1,5 @@
<template>
    <div class="echarts-wrapper" @click="toParentPage">
    <div class="echarts-wrapper">
        <div class="echarts-content" ref="chart">
        </div>
@@ -12,6 +12,7 @@
    chartFontsize
} from '@/assets/js/chartFontsize'
import { WebSocketClass } from '@/assets/js/socket'
import { checkboxs } from '@/assets/js/powerInfoData'
export default {
    name: "latticeBar",
    chart: "",
@@ -29,21 +30,36 @@
        }
    },
    methods: {
        toParentPage() {
        toParentPage(value) {
            if (typeof (value) == 'string') {
            window.parent.parent.postMessage({
                cmd: "syncPage",
                params: {
                    pageInfo: {
                        label: "电池实时告警",
                        name: "batteryrTimequery",
                        src: "#/batteryrTimequery",
                            src: "#/batteryrTimequery/?alarmType=" + value,
                        closable: true
                    },
                }
            }, "*");
            }
        },
        setOption(opt) {
            this.$options.chart.setOption(opt);
            this.$options.chart.on('click', (params) => {
                let name;
                if (params.seriesName == '放电') {
                    name = '放电电流';
                } else if (params.seriesName == '充电') {
                    name = '充电电流';
                }
                checkboxs.dcgj.map(item => {
                    if (item.label == name) {
                        this.toParentPage(item.value)
                    }
                })
            })
        },
        organizeData(data) {
            let option = {
src/components/charts/monomerVoltage.vue
@@ -9,6 +9,7 @@
<script>
import * as echarts from 'echarts';
import { WebSocketClass } from '@/assets/js/socket'
import { checkboxs } from '@/assets/js/powerInfoData'
// 单体电压、内阻和温度 页面
export default {
    name: "monomerVoltage",
@@ -44,21 +45,40 @@
        }
    },
    methods: {
        toParentPage() {
        toParentPage(value) {
            if (typeof (value) == 'string') {
            window.parent.parent.postMessage({
                cmd: "syncPage",
                params: {
                    pageInfo: {
                        label: "电池实时告警",
                        name: "batteryrTimequery",
                        src: "#/batteryrTimequery",
                            src: "#/batteryrTimequery/?alarmType=" + value,
                        closable: true
                    },
                }
            }, "*");
            }
        },
        setOption(opt) {
            this.$options.chart.setOption(opt);
            this.$options.chart.on('click', (params) => {
                console.log(params)
                let name;
                if (params.name == '单体电压高告警' || params.name == '单体电压低告警') {
                    name = '单体电压';
                } else if (params.name == '单体内阻高告警' || params.name == '单体内阻低告警') {
                    name = '单体内阻';
                } else if (params.name == '单体温度高告警' || params.name == '单体温度低告警') {
                    name = '单体温度';
                }
                checkboxs.dcgj.map(item => {
                    if (item.label == name) {
                        console.log(name)
                        this.toParentPage(item.value)
                    }
                })
            })
        },
        postData() {
            let userId = localStorage.getItem('userId');
src/components/charts/powerChart.vue
@@ -1,5 +1,5 @@
<template>
    <div class="chartCon" @click="toParentPage">
    <div class="chartCon">
        <div class="chartItem">
            <pross-pie-chart id="prossPieChart0" ref="prossPieChart0"></pross-pie-chart>
        </div>
@@ -11,12 +11,6 @@
        </div>
        <div class="chartItem">
            <pross-pie-chart id="prossPieChart3" ref="prossPieChart3"></pross-pie-chart>
        </div>
        <div class="chartItem">
            <pross-pie-chart id="prossPieChart4" ref="prossPieChart4"></pross-pie-chart>
        </div>
        <div class="chartItem">
            <pross-pie-chart id="prossPieChart5" ref="prossPieChart5"></pross-pie-chart>
        </div>
    </div>
</template>
@@ -38,19 +32,6 @@
    },
    methods: {
        toParentPage() {
            window.parent.parent.postMessage({
                cmd: "syncPage",
                params: {
                    pageInfo: {
                        label: "电源实时告警",
                        name: "powerRealtimeInfo",
                        src: "#/powerRealtimeInfo",
                        closable: true
                    },
                }
            }, "*");
        },
        setData(data) {
            this.$nextTick(() => {
                if (data) {
@@ -73,39 +54,34 @@
            if (res.code == 1) {
                let optionData = [{
                    title: '',
                    name: '',
                    data: 0,
                    unit: '',
                    color: '#37a9b3',
                }, {
                    title: '',
                    name: '',
                    data: 0,
                    unit: '',
                    color: '#f3535f'
                }, {
                    title: '',
                    name: '',
                    data: 0,
                    unit: '',
                    color: '#ff8b00'
                }, {
                    title: '',
                    name: '',
                    data: 0,
                    unit: '',
                    color: '#757ffb'
                }, {
                    title: '',
                    data: 0,
                    unit: '',
                    color: '#4ba0d9'
                }, {
                    title: '',
                    data: 0,
                    unit: '',
                    color: '#7fc57c'
                }]
                },]
                let index = 0;
                let resData = res.data;
                for (let key in resData) {
                    optionData[index].title = key;
                    optionData[index].name = key;
                    if (typeof resData[key] == 'string') {
                        optionData[index].data = Number(resData[key].split('%')[0]);
                        optionData[index].unit = '%';
@@ -131,8 +107,6 @@
            this.$refs.prossPieChart1.resize();
            this.$refs.prossPieChart2.resize();
            this.$refs.prossPieChart3.resize();
            this.$refs.prossPieChart4.resize();
            this.$refs.prossPieChart5.resize();
        }
    }
}
@@ -147,7 +121,7 @@
.chartCon .chartItem {
    width: 50%;
    height: 31.333%;
    height: 48%;
    float: left;
    margin-bottom: 2%;
}
src/components/charts/prossPieChart.vue
@@ -12,6 +12,7 @@
  import {
    chartFontsize
  } from '@/assets/js/chartFontsize'
import { checkboxs } from '@/assets/js/powerInfoData'
  export default {
    name: "prossPieChart",
    chart: "",
@@ -29,13 +30,38 @@
      }
    },
    methods: {
        toParentPage(value) {
            if (typeof (value) == 'string') {
                window.parent.parent.postMessage({
                    cmd: "syncPage",
                    params: {
                        pageInfo: {
                            label: "电源实时告警",
                            name: "powerRealtimeInfo",
                            src: '#/powerRealtimeInfo/?alarmType=' + value,
                            closable: true
                        },
                    }
                }, "*");
            }
        },
      setOption(opt) {
        this.$options.chart.setOption(opt);
            this.$options.chart.on('click', (params) => {
                let name = params.seriesName;
                checkboxs.zt.map(item => {
                    if (item.label == name) {
                        console.log(item.value)
                        this.toParentPage(item.value)
                    }
                })
            })
      },
      setData(sendData) {
        this.$options.chartData = sendData;
        let color = sendData.color;
        let data = sendData.data;
            let name = sendData.name;
        let text;
        if (sendData.unit) {
          text = sendData.data + sendData.unit;
@@ -81,7 +107,7 @@
            },
          },
          series: [{
              name: '',
                    name: name,
              type: 'pie',
              radius: '75%',
              center: ['50%', '40%'],
@@ -100,7 +126,7 @@
              },
              zlevel: 1
            }, {
              name: '',
                    name: name,
              type: 'pie',
              radius: '61%',
              center: ['50%', '40%'],
@@ -122,7 +148,7 @@
              zlevel: 2
            },
            {
              name: '',
                    name: name,
              type: 'pie',
              radius: '61%',
              center: ['50%', '40%'],
@@ -145,7 +171,7 @@
              },
              zlevel: 3
            }, {
              name: '',
                    name: name,
              type: 'bar',
              center: ['50%', '40%'],
              roundCap: true,
@@ -181,5 +207,4 @@
</script>
<style scoped>
</style>
src/components/charts/triangleBarChart.vue
@@ -1,5 +1,5 @@
<template>
    <div class="echarts-wrapper" @click="toParentPage">
    <div class="echarts-wrapper">
        <div class="echarts-content" ref="chart">
        </div>
@@ -13,6 +13,7 @@
    chartFontsize
} from '@/assets/js/chartFontsize'
import { WebSocketClass } from '@/assets/js/socket'
import { checkboxs } from '@/assets/js/powerInfoData'
export default {
    name: "triangleBarChart",
    chart: "",
@@ -30,21 +31,31 @@
        }
    },
    methods: {
        toParentPage() {
        toParentPage(value) {
            if (typeof (value) == 'string') {
            window.parent.parent.postMessage({
                cmd: "syncPage",
                params: {
                    pageInfo: {
                        label: "电源实时告警",
                        name: "powerRealtimeInfo",
                        src: "#/powerRealtimeInfo",
                            src: '#/powerRealtimeInfo/?alarmType=' + value,
                        closable: true
                    },
                }
            }, "*");
            }
        },
        setOption(opt) {
            this.$options.chart.setOption(opt);
            this.$options.chart.on('click', (params) => {
                let name = params.name;
                checkboxs.dcz.map(item => {
                    if (item.label == name) {
                        this.toParentPage(item.value)
                    }
                })
            })
        },
        organizeData(data) {
            let inData = []
src/components/indexPanel/InfoPanel.vue
@@ -1,17 +1,17 @@
<template>
    <div class="map-panel-content">
        <div class="content-item content-item-nowrap">
            蓄电池组告警数目:{{info.nums.code}}
            电池实时告警数:{{warnText}}
            <a class="content-detail" href="javascript:;" @click="goBattWarn">详情>></a>
        </div>
        <div class="content-item content-item-nowrap">
            蓄电池组落后数目:{{info.nums.sum}}
            电池单体落后数:{{info.nums.sum}}
            <a class="content-detail" href="javascript:;" @click="goBehind">详情>></a>
        </div>
        <div class="content-item content-item-nowrap">
        <!-- <div class="content-item content-item-nowrap">
            蓄电池组延时数目:{{info.nums.newsum}}
            <a class="content-detail" href="javascript:;" @click="goTimeout">详情>></a>
        </div>
        </div> -->
        <div class="content-item">
            <el-button type="primary" size="mini" @click="goRealTime">实时数据</el-button>
            <el-button type="primary" size="mini" @click="goHistory">历史数据</el-button>
@@ -45,7 +45,8 @@
                nums: {
                    code: 0,
                    sum: 0,
                    newsum: 0
                    newsum: 0,
                    msg: '0,0'
                }
            }
        }
@@ -113,7 +114,18 @@
        },
        // 跳转到落后机房
        goBehind() {
            this.$layer.msg('该功能暂未开启');
            // this.$layer.msg('该功能暂未开启');
            window.parent.parent.postMessage({
                cmd: "syncPage",
                params: {
                    pageInfo: {
                        label: "落后单体查询",
                        name: "taskplan",
                        src: "#/reportStatistics/taskplan",
                        closable: true
                    }
                }
            }, "*");
        },
        // 跳转到延时
        goTimeout() {
@@ -156,15 +168,15 @@
            let list = this.info.StationName.split('-');
            return '?province=' + list[0] + '&city=' + list[1] + '&county=' + list[2] + '&home=' + list[3]
        },
        warnText() {
            let warns = this.info.nums.msg.split(",");
            return "未确认:" + (warns[1] || 0) + "   已确认:" + (warns[0] || 0);
        }
    },
}
</script>
<style scoped>
.map-panel-content {
    width: 300px;
}
.content-item {
    padding: 4px;
    font-size: 12px;