qinzhipeng_v@didiglobal.com преди 4 години
родител
ревизия
4ca35ff294

+ 13 - 2
src/layout/components/Navbar.vue

@@ -115,11 +115,22 @@ export default {
     //   // this.$router.push(`/login?redirect=${this.$route.fullPath}`)
     //   location.href = logoutUrl
     // },
-    sumTypeCkeck(type) { // 下拉列表的点击事件
+    sumTypeCkeck(type) { // 下拉列表的点击事件x
       this.sumType = type.name
       settingUserSetBiz({ bizId: type.code }).then(res => {
         localStorage.setItem('bizId', type.code)
-        window.location.reload()
+        const url = window.location.href
+        const urlArr = url.split('?')
+        const k = urlArr[0]
+        const appU = k.split('/')
+        const name = appU[appU.length - 1]
+        name === 'projectViewDetails' ? this.$router.push({ name: '项目', query: {}}) : ''
+        name === 'taskViewDetails' ? this.$router.push({ name: '任务', query: {}}) : ''
+        name === 'requirementDetails' ? this.$router.push({ name: '需求', query: {}}) : ''
+        name === 'iterationDetails' ? this.$router.push({ name: '迭代', query: {}}) : ''
+        if (name !== 'projectViewDetails' || name !== 'taskViewDetails' || name !== 'requirementDetails' || name !== 'iterationDetails') {
+          window.location.reload()
+        }
       })
     },
     get_bizArr() {

+ 2 - 2
src/views/projectManage/iteration/details/iterationDetails.vue

@@ -85,11 +85,11 @@ export default {
   mounted() {
     this.iteratioFilter()
     this.$store.state.data.status = true
-    this.$store.state.data.bizId = true
+    // this.$store.state.data.bizId = true
   },
   destroyed() {
     this.$store.state.data.status = false
-    this.$store.state.data.bizId = false
+    // this.$store.state.data.bizId = false
   },
   methods: {
     async iteratioFilter() { // 迭代list

+ 2 - 2
src/views/projectManage/projectList/projectViewDetails.vue

@@ -279,11 +279,11 @@ export default {
     this.get_list()
     this.initRequirementCreateDialog()
     this.$store.state.data.status = true
-    this.$store.state.data.bizId = true
+    // this.$store.state.data.bizId = true
   },
   destroyed() {
     this.$store.state.data.status = false
-    this.$store.state.data.bizId = false
+    // this.$store.state.data.bizId = false
   },
   methods: {
     async changeArea(e) { // area修改

+ 2 - 2
src/views/projectManage/requirement/requirementDetail.vue

@@ -523,11 +523,11 @@ export default {
     this.getTaskStatus()
     this.GetRequireScheduleHistory()
     this.$store.state.data.status = true
-    this.$store.state.data.bizId = true
+    // this.$store.state.data.bizId = true
   },
   destroyed() {
     this.$store.state.data.status = false
-    this.$store.state.data.bizId = false
+    // this.$store.state.data.bizId = false
   },
   methods: {
     async GetRequireScheduleHistory() {

+ 2 - 2
src/views/projectManage/taskList/taskViewDetail.vue

@@ -459,11 +459,11 @@ export default {
     this.getCommentList()
     this.getScheduleGetTaskScheduleHistory()
     this.$store.state.data.status = true
-    this.$store.state.data.bizId = true
+    // this.$store.state.data.bizId = true
   },
   destroyed() {
     this.$store.state.data.status = false
-    this.$store.state.data.bizId = false
+    // this.$store.state.data.bizId = false
   },
   methods: {
     handleClick(tab, event) {