From 1313a6c5dfa30a4d241863fb16ee50466463beab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Fri, 20 Jan 2023 21:11:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/xm/core/xmQuestion/XmQuestionEdit.vue | 9 +++++++-- src/views/xm/core/xmQuestion/XmQuestionMng.vue | 2 +- .../xm/core/xmTestPlanCase/XmTestPlanCaseEdit.vue | 9 ++------- src/views/xm/core/xmWorkload/XmWorkloadRecord.vue | 15 +++++++++------ 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/views/xm/core/xmQuestion/XmQuestionEdit.vue b/src/views/xm/core/xmQuestion/XmQuestionEdit.vue index d1989b7c..d7027f96 100644 --- a/src/views/xm/core/xmQuestion/XmQuestionEdit.vue +++ b/src/views/xm/core/xmQuestion/XmQuestionEdit.vue @@ -532,8 +532,9 @@ params={...params,...$event} }else if(fieldName==='projectId'){ params.projectId=$event.id + params.projectName=$event.name }else if(fieldName==='productId'){ - params.productId=$event.id + params.productId=$event.id }else if(fieldName==='menuId'){ params.productId=$event.productId params.menuId=$event.menuId @@ -579,6 +580,7 @@ } }, initData(){ + if(this.$refs['xmProductSelect1'])this.$refs['xmProductSelect1'].selectedProduct(null) this.editForm=Object.assign(this.editForm,this.editFormInit) this.editForm=Object.assign(this.editForm, this.xmQuestion); if(this.opType==='add'){ @@ -603,7 +605,7 @@ if(this.xmTestCase && this.xmTestCase.id){ this.editForm.productId=this.xmTestCase.productId this.editForm.productName=this.xmTestCase.productName - this.editForm.caseId=this.xmTestCase.caseId + this.editForm.caseId=this.xmTestCase.id this.editForm.caseName=this.xmTestCase.caseName this.editForm.casedbId=this.xmTestCase.casedbId this.editForm.funcId=this.xmTestCase.funcId @@ -667,6 +669,9 @@ onProductSelected(product){ this.editForm.productId=product.id this.editForm.productName=product.productName + if(this.opType!='add'){ + this.editXmQuestionSomeFields(this.editForm,'productId',product); + } }, onProductClearSelect(){ this.editForm.productId="" diff --git a/src/views/xm/core/xmQuestion/XmQuestionMng.vue b/src/views/xm/core/xmQuestion/XmQuestionMng.vue index 4d51397d..b2b4cec6 100644 --- a/src/views/xm/core/xmQuestion/XmQuestionMng.vue +++ b/src/views/xm/core/xmQuestion/XmQuestionMng.vue @@ -624,7 +624,7 @@ type: 'warning' }).then(() => { this.load.del=true; - batchDelXmQuestion(this.sels).then((res) => { + batchDelXmQuestion(this.sels.map(k=>{return {id:k.id}})).then((res) => { this.load.del=false; var tips=res.data.tips; if( tips.isOk ){ diff --git a/src/views/xm/core/xmTestPlanCase/XmTestPlanCaseEdit.vue b/src/views/xm/core/xmTestPlanCase/XmTestPlanCaseEdit.vue index 14e2dc33..48ce305e 100644 --- a/src/views/xm/core/xmTestPlanCase/XmTestPlanCaseEdit.vue +++ b/src/views/xm/core/xmTestPlanCase/XmTestPlanCaseEdit.vue @@ -147,13 +147,8 @@ - - - - - - 下一条 - + + 下一条 取消 diff --git a/src/views/xm/core/xmWorkload/XmWorkloadRecord.vue b/src/views/xm/core/xmWorkload/XmWorkloadRecord.vue index 9d90a6db..e5771192 100644 --- a/src/views/xm/core/xmWorkload/XmWorkloadRecord.vue +++ b/src/views/xm/core/xmWorkload/XmWorkloadRecord.vue @@ -66,7 +66,8 @@ }, computed: { ...mapGetters([ 'userInfo' ]), - val(){ + initVal(){ + debugger; var params={} if( this.xmTask && this.xmTask.id){ params.id=this.xmTask.id @@ -85,9 +86,9 @@ } if( this.xmQuestion && this.xmQuestion.id){ params.id=this.xmQuestion.id - params.initWorkload=this.xmMenu.initWorkload - params.budgetWorkload=this.xmMenu.budgetWorkload - params.actWorkload=this.xmMenu.actWorkload + params.initWorkload=this.xmQuestion.initWorkload + params.budgetWorkload=this.xmQuestion.budgetWorkload + params.actWorkload=this.xmQuestion.actWorkload } if( this.xmTestCase && this.xmTestCase.id){ params.id=this.xmTestCase.id @@ -121,7 +122,7 @@ this.initData() } }, - val:{ + initVal:{ handler(){ this.initData(); }, @@ -156,13 +157,15 @@ saveSubmit: function () { }, initData: function(){ - this.editForm=Object.assign({},this.val) + debugger; + this.editForm=Object.assign({},this.initVal) this.editFormBak=Object.assign({},this.editForm) }, editSomeFields(row,fieldName,$event){ + debugger; var func=null; var emit="edit-some-fields" var params={ids:[row.id]};