소스 검색

Merge branch 'http_test' into http_mock

qinzhipeng_v@didiglobal.com 4 년 전
부모
커밋
415b9cfffc

+ 9 - 0
src/views/business/bizIdSelect.vue

@@ -87,6 +87,7 @@ export default {
       await settingUserSetBiz({ bizId: bizId })
     },
     enter(biz, type) {
+      const { fromPath } = this.$route.query
       if (biz.isSecret === 1 && type === 'all') {
         this.$message({
           message: '没有访问权限,请先联系系统管理员或业务线现有成员添加权限',
@@ -99,6 +100,14 @@ export default {
       this.$store.dispatch('global/setBizId', biz.code)
       this.$store.dispatch('global/setBizName', biz.name)
       this.settingUserSetBiz(biz.code)
+      // 如果是其他业务过来的,优先回到其他业务的主页面中
+      if (fromPath) {
+        // const url = `${location.origin}/${fromPath}/#/env?bizId=${biz.code}`
+        const url = `http://localhost:7101/#/env?bizId=${biz.code}`
+        // 如果是来自自动化的,
+        location.href = url
+        return
+      }
       if (!fromRoute || !fromRoute.name || fromRoute.name === 'notAccess' || fromRoute.name === 'notFound') {
         this.$router.push({ name: '项目', query: { bizId: EncryptId(biz.code) }})
         return

+ 1 - 0
src/views/reportManagement/components/ReleaseReport.vue

@@ -122,6 +122,7 @@ export default {
       console.log(newData, 'fjids')
       switch (index) {
         case 2: // 编辑
+          this.dailyId = newData.id
           this.customList = newData.customFields
           this.daily_taskIds = null // 关联任务
           this.fromData.radio = newData // 选择的模块

+ 1 - 0
src/views/reportManagement/components/TestingReport.vue

@@ -129,6 +129,7 @@ export default {
         case 2: // 编辑
           reportdelivertestGetReportById(newData.id).then(res => {
             if (res.code === 200) {
+              this.dailyId = newData.id
               this.fromData.radio = res.data // 选择的模块
               this.daily_taskIds = null// 关联任务
               this.reportHome = '提测报告' // 步骤条