Bladeren bron

Merge branch 'http_mock' of git.xiaojukeji.com:jacklijiajia/thoth-frontend into http_mock

qinzhipeng_v@didiglobal.com 4 jaren geleden
bovenliggende
commit
bb004d602b

+ 2 - 2
src/apiConfig/api.js

@@ -3,10 +3,10 @@ import { requestIp } from './requestIP'
 /*eslint-disable*/   //规避eslint的检查,如没有eslint可不写
 export const mockUrl = 'http://10.179.24.123:8980' // 线上
 
-export const qualityUrl = 'http://10.179.181.103:8898' // 质量度量
+export const qualityUrl = 'http://10.190.6.249:8898' // 质量度量
 
 //虚拟硬件线下环境
-export const vehicleUrl_stable = 'http://10.179.181.103:9999' // 虚拟硬件 zhihui
+export const vehicleUrl_stable = 'http://10.190.3.48:9999' // 虚拟硬件 zhihui
   //虚拟硬件预发环境
 export const vehicleUrl_preonline = 'http://10.179.53.173:9999' // 虚拟硬件 zhihui
   //虚拟硬件线上环境

+ 1 - 1
src/apiConfig/virtualDevices.js

@@ -1,3 +1,3 @@
 /*eslint-disable*/ //规避eslint的检查,如没有eslint可不写
-export const mockUrl = 'http://10.179.181.103:9999/virtual-devices' // 线上
+export const mockUrl = 'http://10.190.3.48:9999/virtual-devices' // 线上
 // export const mockUrl = 'http://10.96.113.197:9999/virtual-devices' // 线下

+ 6 - 3
src/layout/components/Navbar.vue

@@ -75,12 +75,14 @@ export default {
           window.location.href = redirect[redirectUrl]
           window.location.reload()
         }
+        // 如果业务线列表不存在,请求获取路由业务线列表
+        if (this.sumTypeArray.length < 1) await this.settingGetBizList()
+        // 如果没有业务线,但是页面又是工作台
+        if (this.bizId === -1 && (to.name === '个人工作台' || to.name === '团队工作台')) this.settingUserGetBiz(true)
         // 如果是业务线选择页面,不作处理
         if (to.name === '业务线选择' || to.name === '个人工作台' || to.name === '团队工作台') return
         // 如果与原路由相同,不作处理
         if (from && to.path === from.path) return
-        // 如果业务线列表不存在,请求获取路由业务线列表
-        if (this.sumTypeArray.length < 1) await this.settingGetBizList()
         // 如果已存在业务线ID
         if (this.bizId !== -1) {
           const existBizId_id = needIdList.find(item => item === this.$route.name)
@@ -132,12 +134,13 @@ export default {
       const res = await settingGetBizList({})
       this.sumTypeArray = res.data || []
     },
-    async settingUserGetBiz() { // 获取人员默认业务线
+    async settingUserGetBiz(noQuery = false) { // 获取人员默认业务线
       const res = await settingUserGetBiz()
       const nowBiz = this.sumTypeArray.find(item => res.data.bizId === item.code)
       if (nowBiz) {
         this.$store.dispatch('data/setBizId', nowBiz.code)
         localStorage.setItem('bizId', nowBiz.code)
+        if (noQuery) return // 如果是不需要url参数的,直接返回
         const existBizId_id = needIdList.find(item => item === this.$route.name)
         // 如果不是在需要bizId_id的详情页,就去给路由添加bizId
         existBizId_id

+ 3 - 5
src/views/projectManage/bugList/details/index.vue

@@ -743,13 +743,13 @@ export default {
     const id = this.id === -1 ? this.bugId : this.id
     this.bugGet(id, false).then(res => {
       this.changeWidthOnBlur()
+      this.getCommentList()
       releaseList().then(res => {
         this.appClientList = res.data.appClient // 客户端
         this.getVersionList(this.bug.appId)
       })
       this.RichText()
     })
-    this.getCommentList()
   },
   methods: {
     analysisBizId_id() { // 解析路由中的bizId_id
@@ -955,8 +955,7 @@ export default {
       a.click()
     },
     getCommentList() {
-      const bizId_id = analysisBizId_id(this.$route.query.bizId_id)
-      getCommentList({ type: 2, joinId: bizId_id[1] }).then(res => {
+      getCommentList({ type: 2, joinId: this.bug.id }).then(res => {
         this.comments = res.data
         this.commentContent = ''
       })
@@ -966,8 +965,7 @@ export default {
         this.$message.warning('评论不能为空')
         return
       }
-      const bizId_id = analysisBizId_id(this.$route.query.bizId_id)
-      addComment({ commentInfo: { joinId: bizId_id[1], type: 2, content: this.commentContent }, user: { ename: this.userInformation }}).then(res => {
+      addComment({ commentInfo: { joinId: this.bug.id, type: 2, content: this.commentContent }, user: { ename: this.userInformation }}).then(res => {
         if (res.code === 200) {
           this.getCommentList()
         }

+ 4 - 2
src/views/quality/components/developmentCycle.vue

@@ -20,6 +20,7 @@
   </section>
 </template>
 <script>
+import { EncryptId } from '@/utils/crypto-js.js'
 import normalEchart from '@/components/chart/normalEchart'
 import echarts from 'echarts'
 export default {
@@ -145,11 +146,12 @@ export default {
     },
     toLink(params) {
       if (!params.data[2]) return
+      const bizId_id = EncryptId(`${this.bizId}_${params.data[2]}`)
       if (this.type === 'require') {
-        const newTab = this.$router.resolve({ name: '需求详情', query: { id: params.data[2] }})
+        const newTab = this.$router.resolve({ name: '需求详情', query: { bizId_id: bizId_id }})
         window.open(newTab.href, '_blank')
       } else if (this.type === 'task') {
-        const newTab = this.$router.resolve({ name: '任务详情', query: { id: params.data[2] }})
+        const newTab = this.$router.resolve({ name: '任务详情', query: { bizId_id: bizId_id }})
         window.open(newTab.href, '_blank')
       }
     }