用例列表查看无引用场景信息
This commit is contained in:
parent
dbb04a64d1
commit
4554cb15e4
|
@ -227,7 +227,7 @@
|
||||||
}); // 删除所有tab的 ctrl + s 监听
|
}); // 删除所有tab的 ctrl + s 监听
|
||||||
let tabs = this.apiTabs;
|
let tabs = this.apiTabs;
|
||||||
let index = tabs.findIndex(item => item.name === tab.name); // 找到当前选中tab的index
|
let index = tabs.findIndex(item => item.name === tab.name); // 找到当前选中tab的index
|
||||||
if (index != -1) {
|
if (index != -1 && this.$refs.apiConfig[index - 1]) {
|
||||||
this.$refs.apiConfig[index - 1].addListener(); // 为选中tab添加 ctrl + s 监听(index-1的原因是要除去第一个固有tab)
|
this.$refs.apiConfig[index - 1].addListener(); // 为选中tab添加 ctrl + s 监听(index-1的原因是要除去第一个固有tab)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -469,7 +469,10 @@ export default {
|
||||||
return ids;
|
return ids;
|
||||||
},
|
},
|
||||||
showCaseRef(row) {
|
showCaseRef(row) {
|
||||||
this.$refs.viewRef.open(row);
|
let param = {};
|
||||||
|
Object.assign(param, row);
|
||||||
|
param.moduleId = undefined;
|
||||||
|
this.$refs.viewRef.open(param);
|
||||||
},
|
},
|
||||||
showEnvironment(row) {
|
showEnvironment(row) {
|
||||||
|
|
||||||
|
|
|
@ -5,14 +5,9 @@
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="ref">{{ $t('api_test.automation.view_ref') }}</el-dropdown-item>
|
<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-item :disabled="isCaseEdit" command="create_performance">{{ $t('api_test.create_performance_test') }}</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
<ms-reference-view ref="viewRef"/>
|
<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>
|
</el-dropdown>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -36,7 +31,6 @@
|
||||||
planVisible: false,
|
planVisible: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
handleCommand(cmd) {
|
handleCommand(cmd) {
|
||||||
if (this.row.id) {
|
if (this.row.id) {
|
||||||
|
@ -44,9 +38,6 @@
|
||||||
case "ref":
|
case "ref":
|
||||||
this.$refs.viewRef.open(this.row);
|
this.$refs.viewRef.open(this.row);
|
||||||
break;
|
break;
|
||||||
case "add_plan":
|
|
||||||
this.addCaseToPlan();
|
|
||||||
break;
|
|
||||||
case "create_performance":
|
case "create_performance":
|
||||||
this.createPerformance(this.row);
|
this.createPerformance(this.row);
|
||||||
break;
|
break;
|
||||||
|
@ -113,16 +104,6 @@
|
||||||
this.$emit('runRefresh', {});
|
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"));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue