export default {
    ColorObject: {
        //综合评估:优质
        highquality: '#00CC00',
        //综合评估:良好
        good: '#99CC99',
        //综合评估:合格
        qualified: '#FF9900',
        //综合评估:较差
        poor: '#996600',
        //综合评估:极差
        range: '#CC0000',
        //稳态综合评估图
        colorA: '#3399CC',
        colorA1: '#3399CC',

        colorB: '#009999',
        colorB1: '##009999',

        //稳态指标合格率图
        //合格率≥90%
        qualifiedRate1: '#339966',
        //60%≤合格率<90%
        qualifiedRate2: '#FFCC33',
        //合格率<60%
        qualifiedRate3: '#CC0000',


        //在线率≥90%
        onLienRate1: '#339966',
        //60%≤在线率<90%
        onLienRate2: '#FFCC33',
        //在线率<60%
        onLienRate3: '#CC0000',

        //完整性≥90%
        Integrity1: '#339966',
        //60%≤完整性<90%
        Integrity2: '#FFCC33',
        //完整性<60%
        Integrity3: '#CC0000',

        //稳态趋势分析图
        //A相，AB相颜色
        A: '#CC9900',
        AB: '#CC9900',
        //B相，BC相颜色
        B: '#339900',
        BC: '#339900',
        //C相，CA相颜色
        C: '#993300',
        CA: '#993300',

        //谐波频谱图
        //上部圆
        topColor: '#5BFCF4',
        //底部圆
        bottomColor: '#5BFCF4',
        //内层波浪
        borderColorN: '#5BFCF4',
        //外层波浪
        borderColorW: 'rgba(91,252,244,0.5)',
        //国际限值
        nationalLimit1: 'rgba(210,210,210,0.3)',
        nationalLimit2: '#5BFCF4',
        //电压谐波含有率/电流幅值
        voltageColor1: '#EB3B5A',
        voltageColor2: '#FE9C5A',

        currentColor1: '#EB3B5A',
        currentColor2: '#FE9C5A',

        //上部圆
        endColor1: '#EB3B5A',
        //底部圆
        endColor2: '#FE9C5A',

        //电脑质量综合评估图
        //优质
        electricEQuality: '#339966',
        //良好
        electricGood: '#99CC99',
        //合格
        electricQualified: '#FF9900',
        //较差
        electricPoor: '#996600',
        //极差
        electricRange: '#CC0000',

        //无污染
        noContaminated: '#339966',
        //轻微污染
        qwContaminated: '#3399FF',
        //轻度污染
        qdContaminated: '#FFCC33',
        //中度污染
        centerContaminated: '#FF9900',
        //重度污染
        zdContaminated: '#CC0000',

        //投运
        putInto: '#3399CC',
        //热备用
        hotInto: '#996600',
        //停运
        stopInto: '#CC0000',



    },
    //echarts公共样式
    //echarts图表的间距。
    EchartObject: {
        grid1: {
            top: "40px", // 等价于 y: '16%'
            left: "10px",
            right: "50px",
            bottom: "10px",
            containLabel: true,
        },
        grid2: {
            top: "40px", // 等价于 y: '16%'
            left: "10px",
            right: "80px",
            bottom: "20px",
            containLabel: true,
        },
        grid3: {
            top: "40px", // 等价于 y: '16%'
            left: "10px",
            right: "50px",
            bottom: "40px",
            containLabel: true,
        },
        grid4: {
            top: "40px", // 等价于 y: '16%'
            left: "10px",
            right: "40px",
            bottom: "40px",
            containLabel: true,
        },
        grid44: {
            top: "40px", // 等价于 y: '16%'
            left: "10px",
            right: "10px",
            bottom: "40px",
            containLabel: true,
        },
        grid6: {
            top: "40px", // 等价于 y: '16%'
            left: "10px",
            right: "50px",
            bottom: "40px",
            containLabel: true,
        },
        grid5: {
            left: "0px",
            top: '50px',
            right: "60px",
            bottom: "0px",
            containLabel: true,
        },
        grid7: {
            top: "50px", // 等价于 y: '16%'
            left: "10px",
            right: "50px",
            bottom: "40px",
            containLabel: true,
        },
        gridk: {
            top: "50px", // 等价于 y: '16%'
            left: "25px",
            right: "50px",
            bottom: "40px",
            containLabel: true,
        },
        grid77: {
            top: "50px", // 等价于 y: '16%'
            left: "10px",
            right: "50px",
            bottom: "50px",
            containLabel: true,
        },
        grid78: {
            top: "50px", // 等价于 y: '16%'
            left: "10px",
            right: "10px",
            bottom: "50px",
            containLabel: true,
        },
        grid8: {
            left: "10px",
            right: "50px",
            bottom: "35px",
            top: "35px",
            containLabel: true,
        },

        grid9: {
            left: "30px",
            right: "30px",
            bottom: "0px",

            containLabel: true,
        },
        grid10: {
            left: "30px",
            right: "100px",
            bottom: "40px",
            containLabel: true,
        },
        grid11: {
            left: "10px",
            right: "65px",
            bottom: "45px",
            containLabel: true,
        },
        grid111: {
            left: "10px",
            right: "65px",
            bottom: "15px",
            containLabel: true,
        },
        grid12: {
            top: "110px",
            left: "20px",
            right: "40px",
            bottom: "10px",
            containLabel: true,
        },
        grid13: {
            top: "40px", // 等价于 y: '16%'
            left: "10px",
            right: "80px",
            bottom: "40px",
            containLabel: true,
        },
        grid14: {
            top: "50px",
            left: "10px",
            right: "60px",
            bottom: "10px",
            containLabel: true,
        },
        grida: {
            top: "100px",
            left: "30px",
            right: "50px",
            bottom: "40px",
            containLabel: true,
        },
        gridb: {
            top: "40px",
            left: "10px",
            right: "10px",
            bottom: "10px",
            containLabel: true,
        },
        gridc: {
            top: "80px",
            left: "20px",
            right: "20px",
            bottom: "36px",
            containLabel: true,
        },
        gridd: {
            top: "60px",
            left: "25px",
            right: "50px",
            bottom: "40px",
            containLabel: true,
        },

        gridf: {
            left: "10px",
            top: '30px',
            right: "60px",
            bottom: "36px",
            containLabel: true,
        },
        gride: {
            left: "10px",
            top: '40px',
            right: "28px",
            bottom: "36px",
            containLabel: true,
        },
        gridp: {
            top: "40px", // 等价于 y: '16%'
            left: "10px",
            right: "30px",
            bottom: "10px",
            containLabel: true,
        },
        gridt: {
            top: "40px", // 等价于 y: '16%'
            left: "10px",
            right: "60px",
            bottom: "10px",
            containLabel: true,
        },
        gridh: {
            top: "10px", // 等价于 y: '16%'
            left: "10px",
            right: "40px",
            bottom: "20px",
            containLabel: true,
        },
        gridi: {
            top: "30px", // 等价于 y: '16%'
            left: "10px",
            right: "30px",
            bottom: "10px",
            containLabel: true,
        },
        gridj: {
            left: "10px",
            top: '30px',
            right: "75px",
            bottom: "36px",
            containLabel: true,
        },
        type: 'dashed',

        lengd: '50px',
        lengd1: '60px',
        //图表柱子最大宽度
        barMaxWidth: 30,
        hbarMaxWidth: 20,
        //单位
        nuit1: '%',
        nuit2: '个',

        kw: 'kW',
        area: '区域',
        area1: '区域\n(监测点数)',
        zhibiao: '指标',
        date: '日期',
        time: '时间',
        time1: 's',

        voltage: '电压\n等级',
        voltage1: '电压等级\n(监测点数)',
        month: '月份\n(监测点数)',

        monitoring: '监测点次数',
        monitoring1: '监测点数（个）',
        manufactor: '终端\n厂家',
        interfere: '干扰源\n类型',
        power: '电网\n拓扑',
        mw: 'MW',
        grade: '等级',
        Indicatortype: '指标\n类型',
        number: '次数',
        dwa: 'A',
        dwv: 'V',
        dwt: '台',
        dwz: '数值',
        //x坐标轴2头拉
        boundaryGap: false,
        //图表缩放件
        dataZoom: [{
                type: "inside",
                height: 13,
                start: 0,
                end: 100,
                bottom: 20,
                textStyle: false,
            },

            { height: 13, start: 0, bottom: 20, end: 100, textStyle: false, },
        ],
        //大屏柱状图使用图表弹窗
        tooltip: {
            showContent: true,
            trigger: "axis",
            backgroundColor: "rgba(8,36,68,.7)",
            color: "#00ffff",
            textStyle: {
                color: "#00ffff",
            },
            formatter: function(params) {
                tips = "";
                tips += params[0].name + "</br/>";
                for (i = 0; i < params.length; i++) {
                    if (params[i].value == 5) {
                        tips += params[i].seriesName + ":" + 0 + "<br/>";
                    } else {
                        tips += params[i].seriesName + ":" + params[i].value + "<br/>";
                    }
                }
                return tips;
            }
        },
        //图表y轴字体样式
        fontSize: '14px',
        //图表工具箱
        toolbox: {
            show: true,
            right: 50,
            feature: {
                saveAsImage: { show: true },
                // dataZoom: {
                //      yAxisIndex: 'none'
                // },
                // //restore: {},
                // mark : {show: true},
                // magicType : {show: true, type: ['line', 'bar']}
            },
        },
        toolbox1: {
            show: true,
            top: -10,
            right: 10,
            feature: {
                saveAsImage: { show: true },
                // dataZoom: {
                //      yAxisIndex: 'none'
                // },
                // //restore: {},
                // mark : {show: true},
                // magicType : {show: true, type: ['line', 'bar']}
            },
        },
        toolbox3: {
            show: true,
            top: -10,
            right: 20,
            feature: {
                saveAsImage: { show: true },
                // dataZoom: {
                //      yAxisIndex: 'none'
                // },
                // //restore: {},
                // mark : {show: true},
                // magicType : {show: true, type: ['line', 'bar']}
            },
        },
        toolbox2: {
            show: true, //是否显示工具栏组件
            orient: "horizontal", //工具栏 icon 的布局朝向'horizontal' 'vertical'
            itemSize: 15, //工具栏 icon 的大小
            itemGap: 10, //工具栏 icon 每项之间的间隔
            showTitle: true,
            feature: {
                // restore: {
                // show: true
                // },
                saveAsImage: {},
            },
        },
        //图表标题
        titleNamefontSize: 24,
        titleNamefontSize1: 20,
        //图表xz字体
        xNamefontSize: 14,
        //图表yz字体
        yNamefontSize: 14,
        //图表zz字体
        zNamefontSize: 14,
        //图表字体
        NamefontSize: 14,
        fontFamily: 'dinproRegular'

    },
    //x轴字体长度
    formatter(value) {
        if (value.length > 4) {
            return `${value.slice(0, 2)}...`;
        }
        return value;
    },
    //xy轴滚动
    dataZoombel(length) {
        if (length < 30) {
            return false
        } else if (length > 30) {
            return true
        }
    },
    //旋转角度
    rotate(length) {
        if (length > 20) {
            return 20
        } else if (length < 20) {
            return 0
        } else if (length > 30) {
            return 39
        }
    },
    fontSize(res) {
        let clientWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
        if (!clientWidth) return;
        let fontSize = 100 * (clientWidth / 1920);
        return res * fontSize;
    }
    //表格高度
}

// export {
//     electricEQuality,
//     electricGood,
//     electricQualified,
//     electricPoor,
//     electricRange,


//     highquality,
//     good,
//     qualified,
//     poor,
//     range,
//     colorA,
//     colorA1,
//     colorB,
//     colorB1,


//     qualifiedRate1,
//     qualifiedRate2,
//     qualifiedRate3,
//     onLienRate1,
//     onLienRate2,
//     onLienRate3,
//     Integrity1,
//     Integrity2,
//     Integrity3,

//     noContaminated,
//     qwContaminated,
//     qdContaminated,
//     centerContaminated,
//     zdContaminated,

//     A,
//     B,
//     C,
//     AB,
//     BC,
//     CA,

//     topColor,
//     bottomColor,
//     borderColorN,
//     borderColorW,
//     nationalLimit1,
//     nationalLimit2,
//     voltageColor1,
//     voltageColor2,
//     currentColor1,
//     currentColor2,
//     endColor1,
//     endColor2,

//     putInto,
//     hotInto,
//     stopInto,

//     grid1,
//     grid2,
//     grid3,
//     grid4,
//     grid5,
//     barMaxWidth,
//     nuit1,
//     nuit2,
//     nuit3,
//     nuitx,
//     nuitx1,
//     nuitx2,
//     nuit5,
//     nuit6,
//     nuit7,
//     nuit8,
//     nuit9,
//     dataZoom,
//     tooltip,
//     fontSize,
//     toolbox,
//     titleNamefontSize,
//     xNamefontSize,
//     yNamefontSize,
//     zNamefontSize,
//     NamefontSize,
//     formatter,
//     dataZoombel,
//     rotate


// }