从index.vue跳转到data.vue
index.vue
<el-table-column label="客户数" align="center" :show-overflow-tooltip="true"><template slot-scope="scope"><router-link :to="'/system/enterprise-data/index/' + scope.row.id" class="link-type"><span>{{ scope.row.enterpriseNum }}</span></router-link></template></el-table-column>
index.js
{path: '/system/enterprise-data',component: Layout,hidden: true,permissions: ['sep:SepEnterprise:list'],children: [{path: 'index/:id(\\d+)',component: () => import('@/views/sep/manager/data.vue'),// component: () => import('@/views/sep/SepEnterprise/enterPrise'),// component:(resolve) => require(['@/views/sep/manager/data'], resolve),name: 'Data',meta: { title: '查看客户', activeMenu: '' }}]},
data.vue
created() {if (typeof (this.$route.params.id) != "undefined") {this.queryParams.salesManagerId = this.$route.params.id;}this.getList();},methods: {//获取 客户管理页面带过来的参数/** 查询业务客户签约列表 */getList() {this.loading = true;listSepEnterprise(this.queryParams).then(response => {this.SepEnterpriseList = response.rows;this.total = response.total;this.loading = false;});},
这辈子坚持与不坚持都不可怕,怕的是独自走在坚持的道路上!