whychdw
2021-05-26 0449db2d4d4d25a49a855d199695788c7d1ca3d2
路由跳转修改
2个文件已修改
18 ■■■■■ 已修改文件
src/pages/test/js/const.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/test/testManager/testing.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/test/js/const.js
@@ -2,19 +2,19 @@
    {
        label: '空载试验',
        value: 'kz',
        route: '/index/windingTest',
        route: '/index/noLoadTest',
        step: true, // 是否有试验步骤
    },
    {
        label: '负载试验',
        value: 'fz',
        route: '/index/noLoadTest',
        route: '/index/loadTest',
        step: true,     // 是否有试验步骤
    },
    {
        label: '绕阻试验',
        value: 'rz',
        route: '/index/loadTest',
        route: '/index/windingTest',
        step: false,
    }
];
src/pages/test/testManager/testing.vue
@@ -75,6 +75,7 @@
                info: {},
                list: [],
                stepShow: false,
                route: "",
            }
        },
        methods: {
@@ -109,6 +110,7 @@
                        if (testInfo != -1) {
                            this.info.typeName = testInfo.label;
                            this.stepShow = testInfo.step;
                            this.route = testInfo.route;
                            // 显示测试步骤
                            if(this.stepShow) {
                                this.experimentPoint(rs.data.id);
@@ -116,6 +118,7 @@
                        }else {
                            this.info.typeName = "未知试验类型";
                            this.route = "";
                        }
@@ -127,11 +130,12 @@
                });
            },
            goTest() {
                if (this.info.type == "fz") {
                    this.$router.push('/index/loadTest');
                } else if (this.info.type == "kz") {
                    this.$router.push('/index/noLoadTest');
                if(this.route) {
                    this.$router.push(this.route);
                }else {
                    this.$layer.msg('未知试验类型!');
                }
            }
        },
        computed: {},