Browse Source

优化bug

master
陈裕财 3 years ago
parent
commit
1313a6c5df
  1. 7
      src/views/xm/core/xmQuestion/XmQuestionEdit.vue
  2. 2
      src/views/xm/core/xmQuestion/XmQuestionMng.vue
  3. 7
      src/views/xm/core/xmTestPlanCase/XmTestPlanCaseEdit.vue
  4. 15
      src/views/xm/core/xmWorkload/XmWorkloadRecord.vue

7
src/views/xm/core/xmQuestion/XmQuestionEdit.vue

@ -532,6 +532,7 @@
params={...params,...$event} params={...params,...$event}
}else if(fieldName==='projectId'){ }else if(fieldName==='projectId'){
params.projectId=$event.id params.projectId=$event.id
params.projectName=$event.name
}else if(fieldName==='productId'){ }else if(fieldName==='productId'){
params.productId=$event.id params.productId=$event.id
}else if(fieldName==='menuId'){ }else if(fieldName==='menuId'){
@ -579,6 +580,7 @@
} }
}, },
initData(){ 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.editFormInit)
this.editForm=Object.assign(this.editForm, this.xmQuestion); this.editForm=Object.assign(this.editForm, this.xmQuestion);
if(this.opType==='add'){ if(this.opType==='add'){
@ -603,7 +605,7 @@
if(this.xmTestCase && this.xmTestCase.id){ if(this.xmTestCase && this.xmTestCase.id){
this.editForm.productId=this.xmTestCase.productId this.editForm.productId=this.xmTestCase.productId
this.editForm.productName=this.xmTestCase.productName 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.caseName=this.xmTestCase.caseName
this.editForm.casedbId=this.xmTestCase.casedbId this.editForm.casedbId=this.xmTestCase.casedbId
this.editForm.funcId=this.xmTestCase.funcId this.editForm.funcId=this.xmTestCase.funcId
@ -667,6 +669,9 @@
onProductSelected(product){ onProductSelected(product){
this.editForm.productId=product.id this.editForm.productId=product.id
this.editForm.productName=product.productName this.editForm.productName=product.productName
if(this.opType!='add'){
this.editXmQuestionSomeFields(this.editForm,'productId',product);
}
}, },
onProductClearSelect(){ onProductClearSelect(){
this.editForm.productId="" this.editForm.productId=""

2
src/views/xm/core/xmQuestion/XmQuestionMng.vue

@ -624,7 +624,7 @@
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.load.del=true; this.load.del=true;
batchDelXmQuestion(this.sels).then((res) => {
batchDelXmQuestion(this.sels.map(k=>{return {id:k.id}})).then((res) => {
this.load.del=false; this.load.del=false;
var tips=res.data.tips; var tips=res.data.tips;
if( tips.isOk ){ if( tips.isOk ){

7
src/views/xm/core/xmTestPlanCase/XmTestPlanCaseEdit.vue

@ -148,12 +148,7 @@
</el-form> </el-form>
</el-row> </el-row>
<el-row> <el-row>
<el-col :offset="12" :span="12" style="display: flex;">
<mdp-select-dict-x label="执行结果" :dict="dicts['testStepTcode']" v-model="editForm.execStatus" :get-icon="getExecStatusIcon" @change="editSomeFields(editForm,'execStatus',$event)">
<span slot="label"></span>
</mdp-select-dict-x>
<el-button @click="$emit('next')" type="primary">下一条</el-button>
</el-col>
<el-button style="margin-top:12px;float:right;" @click="$emit('next')" type="primary">下一条</el-button>
</el-row> </el-row>
<el-row v-if="opType=='add'"> <el-row v-if="opType=='add'">
<el-button @click.native="handleCancel">取消</el-button> <el-button @click.native="handleCancel">取消</el-button>

15
src/views/xm/core/xmWorkload/XmWorkloadRecord.vue

@ -66,7 +66,8 @@
}, },
computed: { computed: {
...mapGetters([ 'userInfo' ]), ...mapGetters([ 'userInfo' ]),
val(){
initVal(){
debugger;
var params={} var params={}
if( this.xmTask && this.xmTask.id){ if( this.xmTask && this.xmTask.id){
params.id=this.xmTask.id params.id=this.xmTask.id
@ -85,9 +86,9 @@
} }
if( this.xmQuestion && this.xmQuestion.id){ if( this.xmQuestion && this.xmQuestion.id){
params.id=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){ if( this.xmTestCase && this.xmTestCase.id){
params.id=this.xmTestCase.id params.id=this.xmTestCase.id
@ -121,7 +122,7 @@
this.initData() this.initData()
} }
}, },
val:{
initVal:{
handler(){ handler(){
this.initData(); this.initData();
}, },
@ -156,13 +157,15 @@
saveSubmit: function () { saveSubmit: function () {
}, },
initData: function(){ initData: function(){
this.editForm=Object.assign({},this.val)
debugger;
this.editForm=Object.assign({},this.initVal)
this.editFormBak=Object.assign({},this.editForm) this.editFormBak=Object.assign({},this.editForm)
}, },
editSomeFields(row,fieldName,$event){ editSomeFields(row,fieldName,$event){
debugger;
var func=null; var func=null;
var emit="edit-some-fields" var emit="edit-some-fields"
var params={ids:[row.id]}; var params={ids:[row.id]};

Loading…
Cancel
Save