浏览代码

name 的bug

panxiandiao_i 5 年之前
父节点
当前提交
7511e9bf9f
共有 1 个文件被更改,包括 9 次插入4 次删除
  1. 9 4
      src/views/Platform/bugManage/bugCreate.vue

+ 9 - 4
src/views/Platform/bugManage/bugCreate.vue

@@ -223,6 +223,7 @@ export default {
   created() {
     this.bugListSelect()
     this.forkDown()
+    this.taskListGet()
   },
   methods: {
     handleChange(file, fileList) {
@@ -252,10 +253,9 @@ export default {
             this.businessTypeStr = this.platformTypeStr.filter(value => value.name === res.data.typeString)[0].child
           }
         })
+        this.taskListGet()
       } else {
-        taskListCreate({ statusList: [6, 7] }).then(res => { // 获取任务数据 (后期用this.taskStatus)
-          this.taskIdStr = res.data
-        })
+        this.taskListGet()
       }
     },
     forkDown() {
@@ -267,6 +267,11 @@ export default {
         }
       })
     },
+    taskListGet() {
+      taskListCreate({ statusList: [6, 7] }).then(res => { // 获取任务数据 (后期用this.taskStatus)
+        this.taskIdStr = res.data
+      })
+    },
     // 业务线取子数据
     clickChangePlatform(e) {
       this.platformTypeStr = this.bizOptions.filter(value => value.code === e)[0].child
@@ -287,7 +292,7 @@ export default {
           if (this.$route.query.id && typeof this.form.bizId === 'string') {
             form.bizId = this.bizOptions.filter(value => value.name === form.bizId)[0].code
           }
-          if (this.taskIdStr.filter(value => value.name === form.taskId)[0].name === form.taskId) {
+          if (this.$route.query.id) {
             form.taskId = this.taskIdStr.filter(value => value.name === form.taskId)[0].id
           }
           // form.bizId = this.bizJson