vue 路由页面跳转

从index.vue跳转到data.vue

index.vue

      
        
      

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;
      });
    },

vue 路由页面跳转_第1张图片
这辈子坚持与不坚持都不可怕,怕的是独自走在坚持的道路上!

你可能感兴趣的:(浅谈前端,vue.js,前端,javascript)