whyczyk
2021-10-11 eb20bb74e68c8ccc815a5fa2d556e19c8b407af3
问题修复
5个文件已修改
93 ■■■■■ 已修改文件
src/assets/js/charts/persons/wangxuan.js 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/charts/MonCap.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/charts/RoseChart.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/charts/dischargeCircuit.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/charts/monomerVoltage.vue 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/charts/persons/wangxuan.js
@@ -29,31 +29,19 @@
        y: 0.35,
        type: 'monomerVoltage',
        setData: {
            legendData: ['单体电压', '单体内阻', '单体温度'],
            yAxisData: ['单体电压高告警', '单体电压低告警', '单体内阻高告警', '单体内阻低告警', '单体温度高告警', '单体内阻低告警'],
            data: [{
                name: '单体电压',
                name: '告警数',
                type: 'bar',
                data: [24, 18, 38, 31, 24, 13],
                itemStyle: {
                    color: '#FED601'
                    normal: {
                        color: (params) => {
                            let colorList = ['#39B3FF', '#47E0E0', '#7891D9', '#83D978', '#C7A530', '#FF8439']
                            return colorList[params.dataIndex]
                }
            },
            {
                name: '单体内阻',
                type: 'bar',
                data: [19, 28, 46, 24, 14, 9],
                itemStyle: {
                    color: '#67E0E3'
                }
            },
            {
                name: '单体温度',
                type: 'bar',
                data: [15, 22, 36, 15, 21, 8],
                itemStyle: {
                    color: '#EB6F49'
                }
            }]
        }
    }
src/components/charts/MonCap.vue
@@ -90,19 +90,14 @@
            if (res.code == 1) {
                let optionData = {
                    circle: [{
                        name: '告警数',
                        value: 10,
                        name: '单体容量高告警',
                        value: 0,
                        color: '#00DFFC',
                    },
                    {
                        name: '告警总数',
                        value: 10,
                        name: '单体容量低告警',
                        value: 0,
                        color: '#ED4882',
                    },
                    {
                        name: '告警机房数',
                        value: 10,
                        color: '#2EEA9D',
                    },
                    ]
                }
src/components/charts/RoseChart.vue
@@ -58,7 +58,7 @@
                    left: "40%",
                    bottom: '1%',
                    align: 'left',
                    data: ['在线浮充', '故障数量'],
                    data: ['在线浮充', '通讯故障数量'],
                    textStyle: {
                        color: '#fff'
                    }
@@ -152,7 +152,7 @@
                },
                {
                    value: 0,
                    name: '故障数量',
                    name: '通讯故障数量',
                    color: '#8278E9'
                },
                {
src/components/charts/dischargeCircuit.vue
@@ -86,7 +86,6 @@
                    maxYAxis.push(maxInt);
                });
                self.optionSet(xAxisData, maxYAxis, xData, data);
                console.log(xAxisData, data)
            }
        },
        outClear() {
src/components/charts/monomerVoltage.vue
@@ -66,29 +66,29 @@
        },
        wsMessage(res) {
            let self = this;
            let legendData = [];
            let yAxisData = [];
            let data = [];
            let Data = [{
                name: '告警数',
                type: 'bar',
                data: [],
                itemStyle: {
                    normal: {
                        color: (params) => {
                            let colorList = ['#37a9b3', '#f3535f', '#ff8b00', '#757ffb', '#4ba0d9', '#7fc57c']
                            return colorList[params.dataIndex]
                        }
                    },
                },
            }];
            if (res.code == 1) {
                let result = res.data;
                let index = 0;
                for (const key in result) {
                    let obj = {
                        name: key,
                        type: 'bar',
                        data: []
                    }
                    legendData.push(key);
                    for (const item in result[key]) {
                        if (index === 0) {
                            yAxisData.push(item);
                        Data[0].data.push(result[key][item])
                        }
                        obj.data.push(result[key][item])
                    }
                    data.push(obj);
                    index++;
                }
                self.optionSet(legendData, yAxisData, data);
                self.optionSet(yAxisData, Data);
            }
        },
        outClear() {
@@ -103,35 +103,22 @@
            if (!dataList) {
                self.postData()
            } else {
                self.optionSet(dataList.legendData, dataList.yAxisData, dataList.data);
                self.optionSet(dataList.yAxisData, dataList.data);
            }
        },
        optionSet(legendData, yAxisData, data) {
        optionSet(yAxisData, data) {
            let option = {
                // title: {
                //     text: '世界人口总量',
                //     subtext: '数据来自网络'
                // },
                tooltip: {
                    trigger: 'axis',
                    axisPointer: {
                        type: 'shadow'
                    }
                },
                legend: {
                    right: "4%",
                    data: legendData,//['单体电压', '单体内阻','单体温度'],
                    itemStyle: {
                        right: "0",
                    },
                    textStyle: {
                        color: "#fff"
                    }
                },
                grid: {
                    top: 20,
                    right: 40,
                    bottom: 20,
                    left: '3%',
                    right: '4%',
                    bottom: '3%',
                    containLabel: true
                },
                xAxis: {