yangys
2025-11-18 698bbdfcbbe4939b0427c022eea67e45f58fd253
src/views/mdc/components/StationLiveSpeed.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-04-18 21:52:18
 * @LastEditors: 李喆(开发组) lzhe@yxqiche.com
 * @LastEditTime: 2025-03-10 13:56:39
 * @LastEditTime: 2025-11-18 14:02:28
 * @FilePath: /cps-web/src/views/mdc/components/StationLiveSpeed.vue
-->
<template>
@@ -117,18 +117,18 @@
    },
    methods: {
        query() {
            // if(this.dmpList.length == 0) return;
            // var a,b,c;
            // this.dmpList.forEach(item=> {
            //     if(item.dpName == "SpindleLoad") {
            //         a = item.codeName;
            //     }else if(item.dpName == "SpindleRate") {
            //         b = item.codeName;
            //     }else if(item.dpName == "FeedRate") {
            //         c = item.codeName;
            //     }
            // })
            // this.showCharts(a,b,c);
            if(this.dmpList.length == 0) return;
            var a,b,c;
            this.dmpList.forEach(item=> {
                if(item.dpName == "SpindleLoad") {
                    a = item.codeName;
                }else if(item.dpName == "SpindleRate") {
                    b = item.codeName;
                }else if(item.dpName == "FeedRate") {
                    c = item.codeName;
                }
            })
            this.showCharts(a,b,c);
        },
        showCharts(a, b, c) {
            var myChartA = echarts.init(this.$refs.c);
@@ -139,7 +139,7 @@
            var optionC = JSON.parse(JSON.stringify(this.option));
            optionA.graphic.style.text = ['主轴负载' + a + '%',].join('\n');
            optionB.graphic.style.text = ['主轴倍率' + b + '%',].join('\n');
            optionC.graphic.style.text = ['给进倍率' + c + '%',].join('\n');
            optionC.graphic.style.text = ['进给倍率' + c + '%',].join('\n');
            optionA.series[0].data = [{ value: a }];
            optionB.series[0].data = [{ value: b }];
            optionC.series[0].data = [{ value: c }];