提交 6035750d 编写于 作者: C chenjianxing

测试计划状态快捷修改

上级 107abf98
......@@ -25,7 +25,24 @@
:label="$t('test_track.plan.plan_status')"
show-overflow-tooltip>
<template v-slot:default="scope">
<plan-status-table-item :value="scope.row.status"/>
<el-dropdown class="test-case-status" @command="statusChange">
<span class="el-dropdown-link">
<!--<status-table-item :value="scope.row.status"/>-->
<plan-status-table-item :value="scope.row.status"/>
</span>
<el-dropdown-menu slot="dropdown" chang>
<el-dropdown-item :command="{id: scope.row.id, status: 'Prepare'}">
{{$t('test_track.plan.plan_status_prepare')}}
</el-dropdown-item>
<el-dropdown-item :command="{id: scope.row.id, status: 'Underway'}">
{{$t('test_track.plan.plan_status_running')}}
</el-dropdown-item>
<el-dropdown-item :command="{id: scope.row.id, status: 'Completed'}">
{{$t('test_track.plan.plan_status_completed')}}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
<el-table-column
......@@ -124,6 +141,16 @@
handleEdit(testPlan) {
this.$emit('testPlanEdit', testPlan);
},
statusChange(param) {
this.$post('/test/plan/edit' , param, () => {
for (let i = 0; i < this.tableData.length; i++) {
if (this.tableData[i].id == param.id) {
this.tableData[i].status = param.status;
break;
}
}
});
},
handleDelete(testPlan) {
this.$alert(this.$t('test_track.plan.plan_delete_confirm') + testPlan.name + "", '', {
confirmButtonText: this.$t('commons.confirm'),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册