Procházet zdrojové kódy

修改跳转后 刷新页面丢值问题

zangkai před 5 roky
rodič
revize
e1b997f101

+ 1 - 1
frontend_web/src/router/index.js

@@ -297,7 +297,7 @@ router.beforeEach(async (to, from, next) => {
       if (!isFetchPermissionInfo) {
         await fetchPermissionInfo()
         isFetchPermissionInfo = true
-        next(to.path, true)
+        next()
       } else {
         next()
       }

+ 2 - 2
frontend_web/src/views/duty/detail/index.vue

@@ -237,8 +237,8 @@ export default {
     this.getPeople()
     this.getDutyTime()
     let _this = this
-    _this.dutyDetail = _this.$route.query.duty
-    _this.termList = _this.$route.query.term
+    _this.dutyDetail = JSON.parse(_this.$route.query.duty)
+    _this.termList = JSON.parse(_this.$route.query.term)
     this.getTerm()
     this.getDetailData()
   },

+ 3 - 1
frontend_web/src/views/duty/index.vue

@@ -248,7 +248,9 @@ export default {
     },
     // 打开二级页面
     handleDetail (duty) {
-      this.$router.push({ path: '/duty/detail', query: { duty: duty, term: this.term } })
+      var dutyJson = JSON.stringify(duty)
+      var termJson = JSON.stringify(this.term)
+      this.$router.push({ path: '/duty/detail', query: { duty: dutyJson, term: termJson } })
     },
     // 添加 返回页面
     handleCloseAdd () {