Browse Source

优化

master
陈裕财 4 years ago
parent
commit
c1b327e7e6
  1. 22
      src/views/xm/core/xmTestPlanCase/XmTestPlanCaseEdit.vue
  2. 24
      src/views/xm/core/xmTestPlanCase/XmTestPlanCaseMng.vue

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

@ -150,11 +150,8 @@
</el-tabs>
</el-form>
</el-row>
<el-row>
<el-col :span="8">
<el-checkbox v-model="next">继续下一条执行用例</el-checkbox>
</el-col>
<el-col :span="8" class="avater-box">
<el-row>
<el-col :offset="16" :span="8" class="avater-box">
<div>
<el-button size="medium " :type="getType(editForm.execStatus)" :icon="getExecStatusIcon(editForm.execStatus)" circle></el-button>
</div>
@ -162,13 +159,14 @@
<span class="title">{{formatDicts(dicts,'testStepTcode',editForm.execStatus)}} </span>
</div>
<el-select class="select" v-model="editForm.execStatus" @change="editSomeFields(editForm,'execStatus',$event)">
<el-option style="margin-top:5px;" v-for="(item,index) in dicts['testStepTcode']" :key="index" :value="item.id" :label="item.name">
<span :style="{backgroundColor:item.color,color:'aliceblue'}" class="padding">
<i :class="getExecStatusIcon(item.id)"></i>
{{item.name}}
</span>
</el-option>
</el-select>
<el-option style="margin-top:5px;" v-for="(item,index) in dicts['testStepTcode']" :key="index" :value="item.id" :label="item.name">
<span :style="{backgroundColor:item.color,color:'aliceblue'}" class="padding">
<i :class="getExecStatusIcon(item.id)"></i>
{{item.name}}
</span>
</el-option>
</el-select>
<el-button style="margin-left:10px;" @click="$emit('next')">下一条</el-button>
</el-col>
</el-row>

24
src/views/xm/core/xmTestPlanCase/XmTestPlanCaseMng.vue

@ -70,7 +70,7 @@
<el-row>
<!--编辑 XmTestPlanCase 测试计划与用例关系表界面-->
<el-dialog title="测试执行" :visible.sync="editFormVisible" width="90%" top="20px" append-to-body :close-on-click-modal="false">
<xm-test-plan-case-edit op-type="edit" :xm-test-plan-case="editForm" :visible="editFormVisible" @cancel="editFormVisible=false" @submit="afterEditSubmit" @edit-fields="onEditFields"></xm-test-plan-case-edit>
<xm-test-plan-case-edit op-type="edit" :xm-test-plan-case="editForm" :visible="editFormVisible" @cancel="editFormVisible=false" @submit="afterEditSubmit" @edit-fields="onEditFields" @next="nextEdit"></xm-test-plan-case-edit>
</el-dialog>
<!--新增 XmTestPlanCase 测试计划与用例关系表界面-->
@ -330,18 +330,18 @@ export default {
},
onEditFields(row){
Object.assign(this.editForm,row)
this.editFormBak={...this.editForm}
if(row.execStatus && row.next){
var index=this.xmTestPlanCases.findIndex(k=>k.caseId==this.editForm.caseId)
if(index==this.xmTestPlanCases.length-1){
this.editFormVisible=false;
this.$notify({position:'bottom-left',showClose:true,message:"已是最后一条数据",type:'error'})
return;
}
this.editForm=this.xmTestPlanCases[index+1]
this.$refs.xmTestPlanCaseTable.setCurrentRow(this.editForm)
this.editFormBak={...this.editForm}
this.editFormBak={...this.editForm}
},
nextEdit(){
var index=this.xmTestPlanCases.findIndex(k=>k.caseId==this.editForm.caseId)
if(index==this.xmTestPlanCases.length-1){
this.editFormVisible=false;
this.$notify({position:'bottom-left',showClose:true,message:"已是最后一条数据",type:'error'})
return;
}
this.editForm=this.xmTestPlanCases[index+1]
this.$refs.xmTestPlanCaseTable.setCurrentRow(this.editForm)
this.editFormBak={...this.editForm}
}
},//end methods
mounted() {

Loading…
Cancel
Save