Ver código fonte

multiple-way init and code completed

hare8999@163.com 1 ano atrás
pai
commit
f73b29af47

+ 1 - 0
src/store/modules/mx-permission.js

@@ -224,6 +224,7 @@ function handleAsyncRouterComponent(route) {
 function handleAsyncRouterLocalReference(route, parent, level) {
   // 属性挂在meta上可以不受匹配方法等因素的影响,最大限度保留设置
   route.meta = route.meta || {}
+  route.name = route.meta.routeName || route.name // overwrite route name by server meta config
   // 挂parent可逆向追溯, 不能挂反向引用vuex内部会深拷贝!
   // route.parent = parent
   route.meta.parentPath = parent?.path || ''

+ 5 - 1
src/views/career/MultipleWay/report.vue

@@ -3,7 +3,7 @@
     <index-card class="index-block" title="多元升学路径报告" :sub-title="nickName">
       <div slot="more">
         <el-button v-loading="loading" size="mini" type="primary" round @click="handleDownload">下载</el-button>
-        <el-button v-has-history size="mini" round @click="$router.push('/sygh/multiple-way/index')">返回</el-button>
+        <el-button v-has-history size="mini" round @click="backToMultiwayIndex">返回</el-button>
       </div>
       <div class="fx-column">
         <div class="f-666 report-content">
@@ -238,6 +238,10 @@ export default {
     await this.getReport()
   },
   methods: {
+    backToMultiwayIndex() {
+      const indexPath = this.$router.resolve({name: 'MultiwayIndex'})
+      if (indexPath?.route) this.$router.push(indexPath.route)
+    },
     async loadDirections() {
       const res = await this.getConfigKey('multiple-way-directions')
       this.directions = JSON.parse(res.msg)