Browse Source

需求新建任务带上需求

wangziqian 5 years ago
parent
commit
3b4c334c27

+ 4 - 1
src/views/projectManage/dialog_vue.vue

@@ -151,7 +151,7 @@ export default {
     this.bugDataGet()
   },
   methods: {
-    init(e, id) {
+    init(e, id, data = null) {
       this.tit_Name = '新建任务'
       switch (e) {
         case 1: // 新建任务(任务主页)
@@ -244,6 +244,9 @@ export default {
               that.$set(that.task_form, 'projectId', '')
               that.$set(that.task_form, 'bizId', Number(localStorage.getItem('bizId')))
               that.task_form.followVersion === 2 ? that.show_Client = false : ''
+              if (data.requirementId) {
+                that.task_form.requireId = data.requirementId
+              }
             }, 300)
           })
           break

+ 1 - 1
src/views/projectManage/requirement/requirementDetail.vue

@@ -413,7 +413,7 @@ export default {
     reated_task() { // 新建任务
       this.task_open = true
       this.$nextTick(() => {
-        this.$refs.task_createdUpdata.init(4, this.$route.query.id)
+        this.$refs.task_createdUpdata.init(4, this.$route.query.id, { requirementId: this.requirementId })
       })
     },
     created_bug() { // 缺陷创建