whyczyk
2021-06-25 721f0f47db74d425940e0727035eefa0f72748f8
空载试验及负载试验优化
3个文件已修改
264 ■■■■ 已修改文件
src/pages/test/js/noLoadTestDiagram.js 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/test/loadTest.vue 149 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/test/noLoadTest.vue 79 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/test/js/noLoadTestDiagram.js
@@ -107,33 +107,27 @@
        ]
    })
    let line6 = diagram.line({
        id: 'line6',
        strokeStyle: '#d9001b',
        lineWidth: lineWidth,
        points: [
            [line5[1][0], line5[1][1] - 15],
            [line5[1][0], line5[1][1] + 15]
        ]
    })
    let line7 = diagram.line({
        id: 'line7',
        strokeStyle: '#d9001b',
        lineWidth: lineWidth,
        points: [
            [line5[1][0] + 30, line5[1][1] - 15],
            [line5[1][0] + 30, line5[1][1] + 15]
        ]
    })
    let onOff5 = diagram.onOff({
        id: 'km5',
        point: line5[1],
        direction: 'left',
        color: '#c0becf',
        onOffBase: {
            radius: 6,
            width: 32,
            lineWidth: 4,
        },
        state: true,
        flush: true,
    });
    let line8 = diagram.line({
        id: 'line8',
        strokeStyle: lineStrokeColor,
        lineWidth: lineWidth,
        points: [
            [line7[1][0], line5[1][1]],
            [line7[1][0] + 40, line5[1][1]]
            onOff5.arc2.right,
            [onOff5.arc2.right[0] + 40, onOff5.arc2.right[1]]
        ]
    })
src/pages/test/loadTest.vue
@@ -100,8 +100,8 @@
                        <div class="flexCon">
                            <el-button type="primary" size="mini" @click="changeSpeed('add')">加速</el-button>
                            <el-button type="primary" size="mini" @click="changeSpeed('reduce')">减速</el-button>
                            <el-input v-model="nbmspeedValue" placeholder="请输入内容" size="mini"
                                      class="speedInput"></el-input>
                            <el-input v-model="nbmspeedValue" placeholder="请输入内容" size="mini" class="speedInput">
                            </el-input>
                            <el-button type="primary" size="mini">确认调速</el-button>
                        </div>
                    </div>
@@ -133,20 +133,20 @@
                            <div class="status lineCon">
                                <div class="line">
                                    <div class="text">VF</div>
                                    <el-input v-model="VFValue" placeholder="请输入内容" size="mini"
                                              class="input"></el-input>
                                    <el-input v-model="VFValue" placeholder="请输入内容" size="mini" class="input">
                                    </el-input>
                                    <div class="text">参考值1~50</div>
                                </div>
                                <div class="line">
                                    <div class="text">SVC</div>
                                    <el-input v-model="SVCValue" placeholder="请输入内容" size="mini"
                                              class="input"></el-input>
                                    <el-input v-model="SVCValue" placeholder="请输入内容" size="mini" class="input">
                                    </el-input>
                                    <div class="text">参考值1~200</div>
                                </div>
                                <div class="line">
                                    <div class="text">FVC</div>
                                    <el-input v-model="FVCValue" placeholder="请输入内容" size="mini"
                                              class="input"></el-input>
                                    <el-input v-model="FVCValue" placeholder="请输入内容" size="mini" class="input">
                                    </el-input>
                                    <div class="text">参考值1~1000</div>
                                </div>
                            </div>
@@ -160,7 +160,7 @@
            </div>
            <div class="modelItemWarp bottom" style="width:8.5%;">
                <div class="content">
                    <div class="title">整流电压操作</div>
                    <div class="title">整流电源操作</div>
                    <div class="con">
                        <div class="couflex">
                            <el-button type="primary" size="mini" class="stopBtn">停止</el-button>
@@ -196,14 +196,14 @@
                    <div class="con" style="position:relative;overflow:auto;">
                        <div class="stepCont">
                            <step-list v-for="(item, index) in list" :key="'key'+index" :data="item"
                                       :end="(list.length-1) == index"
                                       size="mini">
                                :end="(list.length-1) == index" size="mini">
                            </step-list>
                        </div>
                        <div class="stepBtnCon">
                            <el-button type="primary" size="mini">查看结果</el-button>
                            <el-button type="primary" size="mini" @click="closeTest=true">关闭试验</el-button>
                            <el-button type="primary" size="mini" :disabled="!progressStep" @click="nextStepTest">下步试验</el-button>
                            <el-button type="primary" size="mini" :disabled="!progressStep" @click="nextStepTest">下步试验
                            </el-button>
                        </div>
                    </div>
                </div>
@@ -227,7 +227,9 @@
import StepList from '@/components/smallModule/stepList.vue';
import absPanel from '@/components/smallModule/absPanel.vue';
import LoadTestDialog from "@/pages/test/dialog/LoadTestDialog";
import {stopTestPoint} from "@/pages/test/js/api";
    import {
        stopTestPoint
    } from "@/pages/test/js/api";
import MwDrawer from "@/components/smallModule/mwDrawer";
import PreOptionList from "@/components/smallModule/preOptionList";
import CloseTest from "@/pages/test/dialog/closeTest";
@@ -261,8 +263,7 @@
            value2: true,
            value3: true,
            closeTest: false,
            statusList1: [
                {
                statusList1: [{
                    text: '运行中',
                    color: '#82e866',
                    status: false
@@ -273,8 +274,7 @@
                    status: true
                }
            ],
            statusList2: [
                {
                statusList2: [{
                    text: '运行中',
                    color: '#82e866',
                    status: true
@@ -285,8 +285,7 @@
                    status: false
                }
            ],
            statusList3: [
                {
                statusList3: [{
                    text: '速度',
                    color: '#82e866',
                    status: false
@@ -297,8 +296,7 @@
                    status: true
                }
            ],
            diagramStatus: [
                {
                diagramStatus: [{
                    text: '运行',
                    color: '#82e866',
                    status: true
@@ -321,8 +319,7 @@
            ],
            experimentId: 0,
            list: [],
            gearBox: [
                {
                gearBox: [{
                    label: '当前转距:',
                    value: 0,
                    unit: "kN·m",
@@ -338,8 +335,7 @@
                    unit: "r/min",
                }
            ],
            underTestMotor: [
                {
                underTestMotor: [{
                    label: '转速:',
                    value: 0,
                    unit: "r/min",
@@ -355,8 +351,7 @@
                    unit: "dB",
                },
            ],
            dcBox: [
                {
                dcBox: [{
                    label: '电压:',
                    value: 0,
                    unit: "V",
@@ -367,8 +362,7 @@
                    unit: "A",
                },
            ],
            underServiceMotor: [
                {
                underServiceMotor: [{
                    label: '电压:',
                    value: 0,
                    unit: "V",
@@ -389,8 +383,7 @@
                    unit: "%",
                },
            ],
            afeBox: [
                {
                afeBox: [{
                    label: '当前电压:',
                    value: 0,
                    unit: "V",
@@ -419,6 +412,96 @@
        },
    },
    methods: {
            loadDialogData() {
                this.gearBox = [{
                        label: '当前转距:',
                        value: this.randomNum(100, 999),
                        unit: "kN·m",
                    },
                    {
                        label: '受试电机转速:',
                        value: this.randomNum(100, 999),
                        unit: "r/min",
                    },
                    {
                        label: '测功电机转速:',
                        value: this.randomNum(100, 999),
                        unit: "r/min",
                    }
                ]
                this.underTestMotor = [{
                        label: '转速:',
                        value: this.randomNum(100, 999),
                        unit: "r/min",
                    },
                    {
                        label: '功率:',
                        value: this.randomNum(100, 999),
                        unit: "kW",
                    },
                    {
                        label: '噪声:',
                        value: this.randomNum(100, 999),
                        unit: "dB",
                    },
                ]
                this.dcBox = [{
                        label: '电压:',
                        value: this.randomNum(100, 999),
                        unit: "V",
                    },
                    {
                        label: '电流:',
                        value: this.randomNum(100, 999),
                        unit: "A",
                    },
                ]
                this.underServiceMotor = [{
                        label: '电压:',
                        value: this.randomNum(100, 999),
                        unit: "V",
                    },
                    {
                        label: '频率:',
                        value: this.randomNum(100, 999),
                        unit: "HZ",
                    },
                    {
                        label: '转速:',
                        value: this.randomNum(100, 999),
                        unit: "r/min",
                    },
                    {
                        label: '效率:',
                        value: this.randomNum(0, 100),
                        unit: "%",
                    },
                ]
                this.afeBox = [{
                        label: '当前电压:',
                        value: this.randomNum(100, 999),
                        unit: "V",
                    },
                    {
                        label: '额定电压:',
                        value: this.randomNum(100, 999),
                        unit: "V",
                    },
                ]
            },
            randomNum(minNum, maxNum) {
                switch (arguments.length) {
                    case 1:
                        return parseInt(Math.random() * minNum + 1, 10);
                        break;
                    case 2:
                        return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10);
                        break;
                    default:
                        return 0;
                        break;
                }
            },
        changeSpeed(type) {
            if (type == 'add') {
                this.speedValue += 1
@@ -533,6 +616,10 @@
    mounted() {
        this.initChart();
        diagram = gridCircuitDiagram(this.$refs.static, this.$refs.flush);
            setInterval(() => {
                this.loadDialogData();
            }, 2000);
    }
}
</script>
src/pages/test/noLoadTest.vue
@@ -80,8 +80,8 @@
                        </div>
                        <div class="chartTitle">受试电机电流</div>
                        <div class="chartTitle mw-process-warp">
                            <mw-section-process title="当前电压 2200mA" leftText="-20mA"
                                                rightText="+20mA"></mw-section-process>
                            <mw-section-process title="当前电压 2200mA" leftText="-20mA" rightText="+20mA">
                            </mw-section-process>
                        </div>
                    </div>
                </div>
@@ -96,8 +96,8 @@
                        <div class="flexCon">
                            <el-button type="primary" size="mini" @click="changeSpeed('add')">加速</el-button>
                            <el-button type="primary" size="mini" @click="changeSpeed('reduce')">减速</el-button>
                            <el-input v-model="nbmspeedValue" placeholder="请输入内容" size="mini"
                                      class="speedInput"></el-input>
                            <el-input v-model="nbmspeedValue" placeholder="请输入内容" size="mini" class="speedInput">
                            </el-input>
                            <el-button type="primary" size="mini">确认调速</el-button>
                        </div>
                    </div>
@@ -129,20 +129,20 @@
                            <div class="status lineCon">
                                <div class="line">
                                    <div class="text">VF</div>
                                    <el-input v-model="VFValue" placeholder="请输入内容" size="mini"
                                              class="input"></el-input>
                                    <el-input v-model="VFValue" placeholder="请输入内容" size="mini" class="input">
                                    </el-input>
                                    <div class="text">参考值1~50</div>
                                </div>
                                <div class="line">
                                    <div class="text">SVC</div>
                                    <el-input v-model="SVCValue" placeholder="请输入内容" size="mini"
                                              class="input"></el-input>
                                    <el-input v-model="SVCValue" placeholder="请输入内容" size="mini" class="input">
                                    </el-input>
                                    <div class="text">参考值1~200</div>
                                </div>
                                <div class="line">
                                    <div class="text">FVC</div>
                                    <el-input v-model="FVCValue" placeholder="请输入内容" size="mini"
                                              class="input"></el-input>
                                    <el-input v-model="FVCValue" placeholder="请输入内容" size="mini" class="input">
                                    </el-input>
                                    <div class="text">参考值1~1000</div>
                                </div>
                            </div>
@@ -156,7 +156,7 @@
            </div>
            <div class="modelItemWarp bottom" style="width:8.5%;">
                <div class="content">
                    <div class="title">整流电压操作</div>
                    <div class="title">整流电源操作</div>
                    <div class="con">
                        <div class="couflex">
                            <el-button type="primary" size="mini" class="stopBtn">停止</el-button>
@@ -192,14 +192,14 @@
                    <div class="con" style="position:relative;overflow:auto;">
                        <div class="stepCont">
                            <step-list v-for="(item, index) in list" :key="'key'+index" :data="item"
                                       :end="(list.length-1) == index"
                                       size="mini">
                                :end="(list.length-1) == index" size="mini">
                            </step-list>
                        </div>
                        <div class="stepBtnCon">
                            <el-button type="primary" size="mini">查看结果</el-button>
                            <el-button type="primary" size="mini" @click="closeTest=true">关闭试验</el-button>
                            <el-button type="primary" size="mini" :disabled="!progressStep" @click="nextStepTest">下步试验</el-button>
                            <el-button type="primary" size="mini" :disabled="!progressStep" @click="nextStepTest">下步试验
                            </el-button>
                        </div>
                    </div>
                </div>
@@ -225,7 +225,9 @@
import MwSectionProcess from '@/components/smallModule/mwSectionProcess.vue';
import MwThermometer from '@/components/smallModule/mwThermometer.vue';
import LoadTestDialog from "@/pages/test/dialog/LoadTestDialog";
import {stopTestPoint} from "@/pages/test/js/api";
    import {
        stopTestPoint
    } from "@/pages/test/js/api";
import MwDrawer from "@/components/smallModule/mwDrawer";
import PreOptionList from "@/components/smallModule/preOptionList";
import CloseTest from "@/pages/test/dialog/closeTest";
@@ -354,8 +356,55 @@
    mounted() {
        this.initChart();
        diagram = gridCircuitDiagram(this.$refs.static, this.$refs.flush);
            console.log('asdadasdad````````````````', diagram.getOption('km5'))
            diagram.getOption('km5').state = false;
            setInterval(() => {
                this.loadDialogData();
            }, 2000);
    },
    methods: {
            loadDialogData() {
                this.dcBox = [{
                        label: '电压:',
                        value: this.randomNum(100, 999),
                        unit: "V",
                    },
                    {
                        label: '电流:',
                        value: this.randomNum(100, 999),
                        unit: "A",
                    },
                ];
                this.underTestMotor = [{
                        label: '转速:',
                        value: this.randomNum(100, 999),
                        unit: "r/min",
                    },
                    {
                        label: '功率:',
                        value: this.randomNum(100, 999),
                        unit: "kW",
                    },
                    {
                        label: '噪声:',
                        value: this.randomNum(100, 999),
                        unit: "dB",
                    },
                ];
            },
            randomNum(minNum, maxNum) {
                switch (arguments.length) {
                    case 1:
                        return parseInt(Math.random() * minNum + 1, 10);
                        break;
                    case 2:
                        return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10);
                        break;
                    default:
                        return 0;
                        break;
                }
            },
        changeSpeed(type) {
            if (type == 'add') {
                this.speedValue += 1