Browse Source

优化

master
陈裕财 4 years ago
parent
commit
bf11c60d86
  1. 7
      src/views/xm/core/xmTestCase/XmTestCaseEdit.vue
  2. 5
      src/views/xm/core/xmTestCase/XmTestCaseMng.vue
  3. 6
      src/views/xm/core/xmTestCasedb/XmTestCasedbInfo.vue

7
src/views/xm/core/xmTestCase/XmTestCaseEdit.vue

@ -65,7 +65,7 @@ TestStepConfig,
...mapGetters([ 'userInfo' ]), ...mapGetters([ 'userInfo' ]),
}, },
props:['xmTestCase','visible','opType'],
props:['xmTestCase','visible','opType','xmTestCasedb'],
watch: { watch: {
'xmTestCase':function( xmTestCase ) { 'xmTestCase':function( xmTestCase ) {
@ -173,7 +173,6 @@ TestStepConfig,
}else{ }else{
params[fieldName]=$event params[fieldName]=$event
} }
params[fieldName]=$event
var func = editSomeFieldsXmTestCase var func = editSomeFieldsXmTestCase
func(params).then(res=>{ func(params).then(res=>{
let tips = res.data.tips; let tips = res.data.tips;
@ -191,7 +190,7 @@ TestStepConfig,
this.editForm.menuName=row.menuName this.editForm.menuName=row.menuName
this.menuVisible=false; this.menuVisible=false;
if(this.opType!=='add'){ if(this.opType!=='add'){
this.editSomeFieldsXmTestCase(this.editForm,'menuId',row)
this.editSomeFields(this.editForm,'menuId',row)
} }
}, },
onFuncSelected(row){ onFuncSelected(row){
@ -199,7 +198,7 @@ TestStepConfig,
this.editForm.funcName=row.name this.editForm.funcName=row.name
this.funcVisible=false; this.funcVisible=false;
if(this.opType!=='add'){ if(this.opType!=='add'){
this.editSomeFieldsXmTestCase(this.editForm,'funcId',row)
this.editSomeFields(this.editForm,'funcId',row)
} }
} }
},//end method },//end method

5
src/views/xm/core/xmTestCase/XmTestCaseMng.vue

@ -2,7 +2,7 @@
<section> <section>
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<xm-func-select class="padding-right padding-left" :xm-product="{id:'xxxxx',name:'xxxxxxx'}" @row-click="onXmFuncRowClick">
<xm-func-select v-if="xmTestCasedb && xmTestCasedb.productId" class="padding-right padding-left" :xm-product="{id:xmTestCasedb.productId,productName:xmTestCasedb.productName}" @row-click="onXmFuncRowClick">
</xm-func-select> </xm-func-select>
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
@ -185,6 +185,9 @@ export default {
if(this.filters.xmFunc && this.filters.xmFunc.id){ if(this.filters.xmFunc && this.filters.xmFunc.id){
params.funcPidPathsLike=this.filters.xmFunc.pidPaths params.funcPidPathsLike=this.filters.xmFunc.pidPaths
} }
if(this.xmTestCasedb && this.xmTestCasedb.id){
params.casedbId=this.xmTestCasedb.id
}
this.load.list = true; this.load.list = true;
listXmTestCase(params).then((res) => { listXmTestCase(params).then((res) => {

6
src/views/xm/core/xmTestCasedb/XmTestCasedbInfo.vue

@ -9,8 +9,8 @@
</el-menu> </el-menu>
</el-row> </el-row>
<el-row ref="xmTestCasedbTable"> <el-row ref="xmTestCasedbTable">
<xm-test-case-mng v-if="activeIndex=='testCase'"></xm-test-case-mng>
<xm-test-plan-info v-else-if="activeIndex=='testPlan'"> </xm-test-plan-info>
<xm-test-case-mng v-if="activeIndex=='testCase'" :xm-test-casedb="xmTestCasedb"></xm-test-case-mng>
<xm-test-plan-info v-else-if="activeIndex=='testPlan'" :xm-test-casedb="xmTestCasedb"> </xm-test-plan-info>
</el-row> </el-row>
</section> </section>
</template> </template>
@ -31,7 +31,7 @@ export default {
components: { components: {
XmTestCasedbEdit,XmProductSelect,XmTestCaseMng,XmTestPlanInfo, XmTestCasedbEdit,XmProductSelect,XmTestCaseMng,XmTestPlanInfo,
}, },
props:['visible','xmProduct','selProject'],
props:['visible','xmTestCasedb'],
computed: { computed: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),

Loading…
Cancel
Save