用例列表查看无引用场景信息

This commit is contained in:
chenjianxing 2021-01-26 16:36:25 +08:00
parent dbb04a64d1
commit 4554cb15e4
3 changed files with 5 additions and 21 deletions

View File

@ -227,7 +227,7 @@
}); // tab ctrl + s
let tabs = this.apiTabs;
let index = tabs.findIndex(item => item.name === tab.name); // tabindex
if (index != -1) {
if (index != -1 && this.$refs.apiConfig[index - 1]) {
this.$refs.apiConfig[index - 1].addListener(); // tab ctrl + s index-1tab
}
}

View File

@ -469,7 +469,10 @@ export default {
return ids;
},
showCaseRef(row) {
this.$refs.viewRef.open(row);
let param = {};
Object.assign(param, row);
param.moduleId = undefined;
this.$refs.viewRef.open(param);
},
showEnvironment(row) {

View File

@ -5,14 +5,9 @@
</el-link>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="ref">{{ $t('api_test.automation.view_ref') }}</el-dropdown-item>
<!-- <el-dropdown-item :disabled="isCaseEdit" command="add_plan">{{ $t('api_test.automation.batch_add_plan') }}</el-dropdown-item>-->
<el-dropdown-item :disabled="isCaseEdit" command="create_performance">{{ $t('api_test.create_performance_test') }}</el-dropdown-item>
</el-dropdown-menu>
<ms-reference-view ref="viewRef"/>
<!--测试计划-->
<el-drawer :visible.sync="planVisible" :destroy-on-close="true" direction="ltr" :withHeader="false" :title="$t('test_track.plan_view.test_result')" :modal="false" size="90%">
<ms-test-plan-list @addTestPlan="addTestPlan"/>
</el-drawer>
</el-dropdown>
</template>
@ -36,7 +31,6 @@
planVisible: false,
}
},
methods: {
handleCommand(cmd) {
if (this.row.id) {
@ -44,9 +38,6 @@
case "ref":
this.$refs.viewRef.open(this.row);
break;
case "add_plan":
this.addCaseToPlan();
break;
case "create_performance":
this.createPerformance(this.row);
break;
@ -113,16 +104,6 @@
this.$emit('runRefresh', {});
});
},
addCaseToPlan() {
this.planVisible = true;
},
addTestPlan(plans) {
let obj = {planIds: plans, apiIds: [this.row.id]};
this.planVisible = false;
this.$post("/api/automation/scenario/plan", obj, response => {
this.$success(this.$t("commons.save_success"));
});
}
}
}