wangziqian 4 жил өмнө
parent
commit
a93fc03662

+ 11 - 7
src/views/projectManage/dialog_vue.vue

@@ -99,6 +99,7 @@
 </template>
 
 <script>
+import { mapGetters } from 'vuex'
 const _ = require('lodash')
 import { taskCreate, memberQueryMemberInfoByIDAPorName, configShowTaskEnum, configShowRequirementVersionEnum, taskGet, taskUpdate, projectListProject } from '@/api/taskIndex' // ajax
 import { projectList, settingGetBizList } from '@/api/projectIndex'
@@ -152,6 +153,9 @@ export default {
       }
     }
   },
+  computed: {
+    ...mapGetters(['bizId'])
+  },
   created() {
     this.get_taskSelect()
   },
@@ -172,7 +176,7 @@ export default {
           this.$set(this.task_form, 'notest', 0)
           this.$set(this.task_form, 'followVersion', 2)
           this.$set(this.task_form, 'source', 1)
-          this.$set(this.task_form, 'bizId', Number(localStorage.getItem('bizId')))
+          this.$set(this.task_form, 'bizId', this.bizId)
           this.show_Client = false
           this.$nextTick(() => {
             this.$refs['task_form'].clearValidate()
@@ -189,7 +193,7 @@ export default {
               that.task_form = {}
               that.ascription_demand = false
               that.ascription_project = true
-              that.$set(that.task_form, 'bizId', Number(localStorage.getItem('bizId')))
+              that.$set(that.task_form, 'bizId', this.bizId)
               that.$set(that.task_form, 'source', 3)
               that.$set(that.task_form, 'notest', 0)
               that.$set(that.task_form, 'followVersion', 2)
@@ -235,7 +239,7 @@ export default {
           var url1 = window.location.href // 获取url中"?"符后的字串
           this.requireId = url1.split('/')
           var ss = {}
-          configShowRequirementVersionEnum({ bizId: Number(localStorage.getItem('bizId')) }).then(res => {
+          configShowRequirementVersionEnum({ bizId: this.bizId }).then(res => {
             res.data.map(item => {
               item.id === Number(this.requireId[7]) ? ss = item : ''
             })
@@ -250,7 +254,7 @@ export default {
               that.$set(that.task_form, 'followVersion', 2)
               that.$set(that.task_form, 'requireId', ss.id)
               that.$set(that.task_form, 'projectId', '')
-              that.$set(that.task_form, 'bizId', Number(localStorage.getItem('bizId')))
+              that.$set(that.task_form, 'bizId', this.bizId)
               that.task_form.followVersion === 2 ? that.show_Client = false : ''
               if (data) {
                 that.$set(that.task_form, 'requireId', data.requirementId)
@@ -261,10 +265,10 @@ export default {
           })
           break
       }
-      projectListProject({ bizId: Number(localStorage.getItem('bizId')) }).then(res => { // 获取项目(查询)
+      projectListProject({ bizId: this.bizId }).then(res => { // 获取项目(查询)
         this.projectList = res.data.filter(item => item.id !== -1)
       })
-      configShowRequirementVersionEnum({ bizId: Number(localStorage.getItem('bizId')) }).then(res => {
+      configShowRequirementVersionEnum({ bizId: this.bizId }).then(res => {
         // 获取需求(查询)
         this.demandList = res.data.filter(item => item.id !== -1)
       })
@@ -410,7 +414,7 @@ export default {
       e === 2 ? this.show_Client = false : ''
     },
     bugDataGet() { // 所属模块
-      settingQueryBizModuleList(Number(localStorage.getItem('bizId'))).then(res => {
+      settingQueryBizModuleList(this.bizId).then(res => {
         this.business_platform_Modular = res.data.map(item => ({
           ...item,
           value: item.id,