idea页面路由跳转

html:
<el-button
size="mini"
type="text"
icon="el-icon-setting"
@click="handleSetting(scope.row)"
v-hasPermi="['mixing:mixingPlan:edit']"
>配置
js:
/** 配置按钮操作 */
handleSetting(row) {
const mixingPlanId = row.uuid || this.ids;
this.$router.push({ path: "/mixingPlan/child", query: { mixingPlanId: mixingPlanId } });
},

router:
// 公共路由
export const constantRoutes = [
{
path: '/mixingPlan',
component: Layout,
hidden: true,
children: [
{
path: 'child',
component: (resolve) => require(['@/views/app/mixing/mixingPlan/child'], resolve),
name: 'MixingChildPlan',
meta: { title: '修改混匀计划子表' }
}
]
}
]
目的跳转页面:
created() {
this.queryMaterialList();
const{ mixingPlanId } = this.$route.query;
if (mixingPlanId) {
// 获取子计划表详细信息
this.queryParams.mixingPlanId = mixingPlanId;
listMixingChildPlan(this.queryParams).then(response => {
this.mixingChildPlanList = response.rows;
this.total = response.total;
this.loading = false;
});
}
},

posted @ 2020-11-05 15:45  sophial  阅读(668)  评论(0)    收藏  举报