其实就是 重置页面标签名称
this.$store.dispatch('tagsView/updateVisitedView', Object.assign({}, this.$route, { title: `${this.fileCode}` }))
主页面跳转,传递需要参数
<el-table-column label="文件编号" align="center" :show-overflow-tooltip="true" width="130">
<template slot-scope="scope">
<router-link :to="'/com/gym/test-card/index/' + scope.row.id + '/' + scope.row.fileCode + '/' + scope.row.status" class="link-type">
<span style="display: inline-block; width:120px">{{ scope.row.fileCode }}</span>
</router-link>
</template>
</el-table-column>
index.js 路由配置
{
path: '/com/gym/test-card',
component: Layout,
hidden: true,
children: [
{
path: 'index/:id/:fileCode/:status',
component: () => import('@/views/com/gym/testCard/detailed'),
name: 'CarftThreeCard',
meta: { title: '工艺卡详情', activeMenu: '/mes/pro/carftThree/detailed' }
}
]
},
detailed 页面的js在oncreate 的时候调用,重置标签名称
this.fileCode = this.$route.params.fileCode;
this.$store.dispatch('tagsView/updateVisitedView', Object.assign({}, this.$route, { title: `${this.fileCode}` }))