Browse Source

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

qinzhipeng_v@didiglobal.com 4 years ago
parent
commit
69c4ccd7f1
1 changed files with 22 additions and 15 deletions
  1. 22 15
      src/views/projectManage/bugList/file/createdBug.vue

+ 22 - 15
src/views/projectManage/bugList/file/createdBug.vue

@@ -500,28 +500,35 @@ export default {
       // 创建(提交)
       this.$refs['formInline'].validate(valid => {
         if (valid) {
-          const data = e
-          data.currentHandler = e.currentHandler.join()
-          data.assigner = e.assigner.join()
+          const data = {...e};
+          // data.currentHandler = data.currentHandler.join()
+          // data.assigner = data.assigner.join()
           var user = {
             name: this.userNames,
             ename: this.userInformation,
             id: ''
           }
-          bugCreate({ bugBaseInfo: data, user }).then(res => {
+          bugCreate({ bugBaseInfo: {
+            ...data,
+            assigner: data.assigner.join(),
+            currentHandler: data.currentHandler.join()
+          }, user }).then(res => {
             this.bugListSelect()
-            this.modalShow = false
-            this.$message({
-              message: res.msg,
-              type: 'success',
-              duration: 1000,
-              offset: 150
-            })
-            this.$emit('father')
-            if (this.getBugList) {
-              this.getBugList()
+
+            if(res.code === 200){
+              this.$message({
+                message: res.msg,
+                type: 'success',
+                duration: 1000,
+                offset: 150
+              })
+              this.$emit('father')
+              if (this.getBugList) {
+                this.getBugList()
+              }
+              this.$emit('getBugList')
             }
-            this.$emit('getBugList')
+            this.modalShow = res.code !== 200
           })
         }
       })