فهرست منبع

bizId_id跳转修改

wangziqian 4 سال پیش
والد
کامیت
872ecef467

+ 7 - 2
src/views/projectManage/components/scheduleList.vue

@@ -61,6 +61,8 @@
   </div>
 </template>
 <script>
+import { EncryptId } from '@/utils/crypto-js.js'
+import { mapGetters } from 'vuex'
 import Sortable from 'sortablejs'
 import { sortForTask } from '@/api/projectViewDetails'
 import modifySchedule from '@/views/projectManage/projectList/components/modifySchedule.vue'
@@ -116,6 +118,9 @@ export default {
       isDelete: false // 删除排期操作
     }
   },
+  computed: {
+    ...mapGetters(['bizId'])
+  },
   watch: {
     locking: {
       handler(newV, oldV) {
@@ -136,7 +141,6 @@ export default {
       immediate: true
     }
   },
-
   mounted() {
     this.rowDrop()
   },
@@ -167,7 +171,8 @@ export default {
       this.$emit('listByTask')
     },
     Task_Jump(id) {
-      const routeData = this.$router.push({ name: '任务详情', query: { id: id }})
+      const bizId_id = EncryptId(`${this.bizId}_${id}`)
+      const routeData = this.$router.push({ name: '任务详情', query: { bizId_id: bizId_id }})
       window.open(routeData.href, '_blank')
     },
     addSchedule() {

+ 2 - 1
src/views/projectManage/projectList/projectIndex.vue

@@ -476,7 +476,8 @@ export default {
           projectCreate({ projectInfo, user }).then(res => {
             this.dialogFormVisible = false
             this.get_projectList()
-            this.$router.push({ name: '项目详情', query: { id: res.data.id }})
+            const bizId_id = EncryptId(`${this.bizId}_${res.data.id}`)
+            this.$router.push({ name: '项目详情', query: { bizId_id: bizId_id }})
           })
         }
       })

+ 5 - 2
src/views/projectManage/taskList/childrenTask/childDetail.vue

@@ -142,7 +142,8 @@
   </div>
 </template>
 <script>
-import { analysisBizId_id } from '@/utils/crypto-js.js'
+import { mapGetters } from 'vuex'
+import { EncryptId, analysisBizId_id } from '@/utils/crypto-js.js'
 const _ = require('lodash')
 import { getById, subTaskUpdate, showIterationEnum, subTaskDelete } from '@/api/taskChild'
 import searchPeople from '@/components/select/searchPeople'
@@ -177,6 +178,7 @@ export default {
     }
   },
   computed: {
+    ...mapGetters(['bizId']),
     getStatus() {
       return this.allStatus.find(item => item.code === this.formData.status) || { msg: null }
     }
@@ -283,7 +285,8 @@ export default {
       }
     },
     toChild(id) { // 前往子任务
-      this.$router.push({ name: '子任务详情', query: { id: id }})
+      const bizId_id = EncryptId(`${this.bizId}_${id}`)
+      this.$router.push({ name: '子任务详情', query: { bizId_id: bizId_id }})
     }
   }
 }

+ 7 - 1
src/views/projectManage/taskList/components/scheduleList.vue

@@ -120,6 +120,8 @@
   </div>
 </template>
 <script>
+import { EncryptId } from '@/utils/crypto-js.js'
+import { mapGetters } from 'vuex'
 import Sortable from 'sortablejs'
 import moment from 'moment'
 import 'moment/locale/zh-cn'
@@ -169,6 +171,9 @@ export default {
       isDelete: false // 删除排期操作
     }
   },
+  computed: {
+    ...mapGetters(['bizId'])
+  },
   watch: {
     id: {
       handler(newV, oldV) {
@@ -241,7 +246,8 @@ export default {
       this.detailData = row
     },
     link(id) {
-      const newTab = this.$router.resolve({ name: '任务详情', query: { id: id }})
+      const bizId_id = EncryptId(`${this.bizId}_${id}`)
+      const newTab = this.$router.resolve({ name: '任务详情', query: { bizId_id: bizId_id }})
       window.open(newTab.href, '_blank')
     }
   }

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

@@ -379,7 +379,7 @@ import Vue from 'vue'
 import VueClipboard from 'vue-clipboard2'
 Vue.use(VueClipboard)
 import { mapGetters } from 'vuex'
-import { analysisBizId_id } from '@/utils/crypto-js.js'
+import { EncryptId, analysisBizId_id } from '@/utils/crypto-js.js'
 import {
   taskGet,
   configShowTaskEnum,
@@ -791,7 +791,8 @@ export default {
       }
     },
     jump(page, id) { // 跳转
-      this.$router.push({ name: page, query: { id: id }})
+      const bizId_id = EncryptId(`${this.bizId}_${id}`)
+      this.$router.push({ name: page, query: { bizId_id: bizId_id }})
     },
     reloadList() {
       this.taskGet()

+ 7 - 1
src/views/reportManagement/ReleaseReport/components/releaseDetails.vue

@@ -176,6 +176,8 @@
 </template>
 
 <script>
+import { EncryptId } from '@/utils/crypto-js.js'
+import { mapGetters } from 'vuex'
 import '@/styles/PublicStyle/index.scss'
 import {
   reportreleaseGetReportById,
@@ -196,6 +198,9 @@ export default {
       details: {}
     }
   },
+  computed: {
+    ...mapGetters(['bizId'])
+  },
   created() {
     this.reportreleaseGetReportById(this.reportId)
   },
@@ -217,9 +222,10 @@ export default {
     },
 
     goTaskDetails(id) {
+      const bizId_id = EncryptId(`${this.bizId}_${id}`)
       this.$router.push({
         name: '任务详情',
-        query: { id: id }
+        query: { bizId_id: bizId_id }
       })
     },
 

+ 7 - 1
src/views/reportManagement/Testing/TestingPreview.vue

@@ -98,6 +98,8 @@
 </template>
 
 <script>
+import { EncryptId } from '@/utils/crypto-js.js'
+import { mapGetters } from 'vuex'
 import '@/styles/PublicStyle/index.scss'
 import html2canvas from 'html2canvas'
 import searchTeam from '@/components/select/searchTeam'
@@ -124,6 +126,9 @@ export default {
       daily_Id: '' // daily_Id
     }
   },
+  computed: {
+    ...mapGetters(['bizId'])
+  },
   watch: {
     dailyId: {
       handler(newV) {
@@ -156,7 +161,8 @@ export default {
     },
 
     goRequired(id) {
-      this.$router.push({ name: '需求详情', query: { id: id }})
+      const bizId_id = EncryptId(`${this.bizId}_${id}`)
+      this.$router.push({ name: '需求详情', query: { bizId_id: bizId_id }})
     },
 
     sendReport() {

+ 9 - 2
src/views/reportManagement/Testing/components/deliverDetails.vue

@@ -165,6 +165,8 @@
 </template>
 
 <script>
+import { EncryptId } from '@/utils/crypto-js.js'
+import { mapGetters } from 'vuex'
 import '@/styles/PublicStyle/index.scss'
 import { reportdelivertestGetReportById, reportreleaseDelete, reportdelivertestGetRequiresByTaskIds, reportdelivertestUpdate } from '@/api/reportTemplate'
 import TestingReport from '@/views/reportManagement/components/TestingReport' // 提测
@@ -182,6 +184,9 @@ export default {
       details: {}
     }
   },
+  computed: {
+    ...mapGetters(['bizId'])
+  },
   created() {
     this.reportdelivertestGetReportById(this.reportId)
   },
@@ -236,11 +241,13 @@ export default {
       }
     },
     goRequired(id) {
-      this.$router.push({ name: '需求详情', query: { id: id }})
+      const bizId_id = EncryptId(`${this.bizId}_${id}`)
+      this.$router.push({ name: '需求详情', query: { bizId_id: bizId_id }})
     },
 
     goTaskDetails(id) {
-      this.$router.push({ name: '任务详情', query: { id: id }})
+      const bizId_id = EncryptId(`${this.bizId}_${id}`)
+      this.$router.push({ name: '任务详情', query: { bizId_id: bizId_id }})
     }
   }
 }

+ 3 - 1
src/views/reportManagement/Testing/newTestingTemplate.vue

@@ -128,6 +128,7 @@
 </template>
 
 <script>
+import { EncryptId } from '@/utils/crypto-js.js'
 import { mapGetters } from 'vuex'
 import '@/styles/PublicStyle/index.scss' // 公共css
 import searchPeople from '@/components/select/searchPeople' // 人员select
@@ -306,7 +307,8 @@ export default {
     },
 
     goRequired(id) {
-      this.$router.push({ name: '需求详情', query: { id: id }})
+      const bizId_id = EncryptId(`${this.bizId}_${id}`)
+      this.$router.push({ name: '需求详情', query: { bizId_id: bizId_id }})
     },
 
     // 创建提测报告

+ 7 - 1
src/views/reportManagement/daily/components/dailyDetails.vue

@@ -86,6 +86,8 @@
 </template>
 
 <script>
+import { EncryptId } from '@/utils/crypto-js.js'
+import { mapGetters } from 'vuex'
 import '@/styles/PublicStyle/index.scss'
 import { dailyReportGetV2, dailyReportDelete } from '@/api/reportTemplate'
 import iconDisplay from '@/views/reportManagement/daily/components/iconDisplay.vue'
@@ -103,6 +105,9 @@ export default {
       details: {}
     }
   },
+  computed: {
+    ...mapGetters(['bizId'])
+  },
   created() {
     this.getReportContent(this.reportId)
   },
@@ -123,7 +128,8 @@ export default {
     },
 
     goTaskDetails(id) {
-      this.$router.push({ name: '任务详情', query: { id: id }})
+      const bizId_id = EncryptId(`${this.bizId}_${id}`)
+      this.$router.push({ name: '任务详情', query: { bizId_id: bizId_id }})
     },
     // 删除日报‘
     async deleteDaily() {

+ 7 - 1
src/views/workbench/components/listView.vue

@@ -156,6 +156,8 @@
 </template>
 
 <script>
+import { EncryptId } from '@/utils/crypto-js.js'
+import { mapGetters } from 'vuex'
 import '@/styles/PublicStyle/index.scss'
 import calendarDialog from '@/views/workbench/person/components/calendarFormDialog'
 import searchSection from '@/views/workbench/components/searchSection'
@@ -225,6 +227,9 @@ export default {
       team_radio1: '忙碌'
     }
   },
+  computed: {
+    ...mapGetters(['bizId'])
+  },
   watch: {
     biz: {
       handler(newV) {
@@ -299,7 +304,8 @@ export default {
       }
     },
     jump(id, name) {
-      const { href } = this.$router.resolve({ name: name, query: { id: id }})
+      const bizId_id = EncryptId(`${this.bizId}_${id}`)
+      const { href } = this.$router.resolve({ name: name, query: { bizId_id: bizId_id }})
       window.open(href, '_blank')
     },
     handleUpdate(data, key) {

+ 7 - 1
src/views/workbench/person/components/calenderDetail.vue

@@ -69,6 +69,8 @@
   </article>
 </template>
 <script>
+import { EncryptId } from '@/utils/crypto-js.js'
+import { mapGetters } from 'vuex'
 export default {
   // filters: {
   //   arrToString(val) {
@@ -99,6 +101,9 @@ export default {
       topScroll: 0// 距离顶部距离
     }
   },
+  computed: {
+    ...mapGetters(['bizId'])
+  },
   watch: {
     show(newV) {
       this.showDetail = newV
@@ -144,7 +149,8 @@ export default {
       }
     },
     Jump(name, id) { // 详情页跳转
-      const newTab = this.$router.resolve({ name: name, query: { id: id }})
+      const bizId_id = EncryptId(`${this.bizId}_${id}`)
+      const newTab = this.$router.resolve({ name: name, query: { bizId_id: bizId_id }})
       window.open(newTab.href, '_blank')
     },
 

+ 9 - 3
src/views/workbench/team/components/needsList.vue

@@ -102,6 +102,8 @@
   </div>
 </template>
 <script>
+import { EncryptId } from '@/utils/crypto-js.js'
+import { mapGetters } from 'vuex'
 import { configShowRequireStatusEnum, updateRequirementStatus, getRequirement } from '@/api/requirement'
 import extraUrgent from '@/assets/extraUrgent.png'
 import rqmtStatus from '@/views/projectManage/components/requirementStatus.vue'
@@ -136,6 +138,9 @@ export default {
       total: 0
     }
   },
+  computed: {
+    ...mapGetters(['bizId'])
+  },
   watch: {
     idList: {
       handler(newV) {
@@ -166,7 +171,7 @@ export default {
       this.getNeedsList()
     },
     async getTaskStatus() { // 获取需求的所有状态
-      const res1 = await configShowRequireStatusEnum(this.$store.state.data.bizId)
+      const res1 = await configShowRequireStatusEnum(this.bizId)
       if (res1.code === 200) {
         this.allStatus = []
         this.allStatus = res1.data.requirementStatus
@@ -202,11 +207,12 @@ export default {
       this.$emit('change', '需求')// 通知父组件,让父组件去执行子组件的数据更新
     },
     needs_link(id) {
+      const bizId_id = EncryptId(`${this.bizId}_${id}`)
       if (this.newTabOpen) {
-        const newTab = this.$router.resolve({ name: '需求详情', query: { id: id }})
+        const newTab = this.$router.resolve({ name: '需求详情', query: { bizId_id: bizId_id }})
         window.open(newTab.href, '_blank')
       } else {
-        this.$router.push({ name: '需求详情', query: { id: id }})
+        this.$router.push({ name: '需求详情', query: { bizId_id: bizId_id }})
       }
     }
   }

+ 9 - 3
src/views/workbench/team/components/taskList.vue

@@ -131,6 +131,8 @@
   </div>
 </template>
 <script>
+import { EncryptId } from '@/utils/crypto-js.js'
+import { mapGetters } from 'vuex'
 import imgUrl from '@/assets/建立档案@2x.png'
 import '@/styles/PublicStyle/index.scss'
 import TestReport from '@/views/reportManagement/components/TestingReport' // 提测
@@ -191,6 +193,9 @@ export default {
       }
     }
   },
+  computed: {
+    ...mapGetters(['bizId'])
+  },
   watch: {
     idList: {
       handler(newV) {
@@ -236,7 +241,7 @@ export default {
       if (res.code === 200) {
         this.taskScheduleEvent = res.data.taskScheduleEvent || []
       }
-      const res1 = await configShowTaskStatusEnum(this.$store.state.data.bizId)
+      const res1 = await configShowTaskStatusEnum(this.bizId)
       if (res1.code === 200) {
         this.allStatus = res1.data.taskStatus
       }
@@ -349,11 +354,12 @@ export default {
       }
     },
     link_task(id) { // 跳转到任务详情页
+      const bizId_id = EncryptId(`${this.bizId}_${id}`)
       if (this.newTabOpen) {
-        const newTab = this.$router.resolve({ name: '任务详情', query: { id: id }})
+        const newTab = this.$router.resolve({ name: '任务详情', query: { bizId_id: bizId_id }})
         window.open(newTab.href, '_blank')
       } else {
-        this.$router.push({ name: '任务详情', query: { id: id }})
+        this.$router.push({ name: '任务详情', query: { bizId_id: bizId_id }})
       }
     }
   }