whycwx
2021-07-23 88e497e20a51a2a127c4bc59f036f5367ab0670e
src/pages/monitoring/js/diagramStates.js
@@ -13,17 +13,8 @@
    // diagram.del(/^line.*dot$/);
    if (type == "run1") {
        run1Charge(diagram);
        // run2Charge(diagram);
        // run3Charge(diagram);
    }
    if (type == "run2") {
        run2Charge(diagram);
    }
    if (type == "run3") {
        run3Charge(diagram);
    }
}
// 运行状态1
@@ -81,79 +72,4 @@
            points: [line5[1], line6[1]],
        });
}
// 运行状态2
function run2Charge(diagram) {
    // // 线条3
    // let line3 = diagram.getOption('line3').points;
    // // 线条4
    // let line4 = diagram.getOption('line4').points;
    // diagram.moveDot({
    //     id: 'line3_dot',
    //     fillStyle: springGreen,
    //     strokeStyle: springGreen,
    //     radius: scalcRadius,
    //     flush: true,
    //     points: [line3[0], line4[1]],
    // });
    // // 线条5
    // let line5 = diagram.getOption('line5').points;
    // // 线条6
    // let line6 = diagram.getOption('line6').points;
    // diagram.moveDot({
    //     id: 'line5_dot',
    //     fillStyle: springGreen,
    //     strokeStyle: springGreen,
    //     radius: scalcRadius,
    //     flush: true,
    //     points: [line5[0], line6[1]],
    // });
}
function run3Charge(diagram) {
    // 线条1
    let line1 = diagram.getOption('line1').points;
    // 线条2
    let line2 = diagram.getOption('line2').points;
    diagram.moveDot({
        id: 'line1_dot',
        fillStyle: springGreen,
        strokeStyle: springGreen,
        radius: scalcRadius,
        flush: true,
        points: [line1[0], line2[1]],
    });
    // 线条3
    let line3 = diagram.getOption('line3').points;
    // 线条4
    let line4 = diagram.getOption('line4').points;
    diagram.moveDot({
        id: 'line3_dot',
        fillStyle: springGreen,
        strokeStyle: springGreen,
        radius: scalcRadius,
        flush: true,
        points: [line3[0], line4[1]],
    });
    // 线条5
    let line5 = diagram.getOption('line5').points;
    // 线条6
    let line6 = diagram.getOption('line6').points;
    diagram.moveDot({
        id: 'line5_dot',
        fillStyle: springGreen,
        strokeStyle: springGreen,
        radius: scalcRadius,
        flush: true,
        points: [line5[0], line6[1]],
    });
}
export default diagramStates;