feat(测试计划): 测试计划执行新增"保存下一条"按钮操作
--story=1012419 --user=王旭 测试计划执行增加“保存并下一条”操作 https://www.tapd.cn/55049933/s/1393169
This commit is contained in:
parent
2d933bb302
commit
6afbabcb6f
|
@ -15,6 +15,7 @@ export default {
|
|||
planning_execution: "Planning&Execution",
|
||||
project: "Project",
|
||||
save: "Save",
|
||||
save_and_next: "Save and next",
|
||||
return: "Return",
|
||||
length_less_than: "Length must be less than or equal to",
|
||||
recent_plan: "My recent plan",
|
||||
|
|
|
@ -15,6 +15,7 @@ export default {
|
|||
cancel: "取 消",
|
||||
project: "项目",
|
||||
save: "保 存",
|
||||
save_and_next: "保存并下一条",
|
||||
return: "返 回",
|
||||
length_less_than: "长度必须小于等于",
|
||||
recent_plan: "我最近的计划",
|
||||
|
|
|
@ -15,6 +15,7 @@ export default {
|
|||
cancel: "取 消",
|
||||
project: "項目",
|
||||
save: "保 存",
|
||||
save_and_next: "保存並下一條",
|
||||
return: "返 回",
|
||||
length_less_than: "長度必須小於等于",
|
||||
recent_plan: "我最近的計劃",
|
||||
|
|
|
@ -347,7 +347,7 @@ export default {
|
|||
},
|
||||
};
|
||||
},
|
||||
saveCase() {
|
||||
saveCase(command) {
|
||||
let param = {};
|
||||
param.id = this.testCase.id;
|
||||
param.caseId = this.testCase.caseId;
|
||||
|
@ -396,6 +396,9 @@ export default {
|
|||
this.testCase.comment = "";
|
||||
}
|
||||
this.originalStatus = this.testCase.status;
|
||||
if (command === 'save') {
|
||||
this.handleNext();
|
||||
}
|
||||
});
|
||||
},
|
||||
updateTestCases(param) {
|
||||
|
|
|
@ -103,9 +103,9 @@ export default {
|
|||
<style scoped>
|
||||
|
||||
.comment-form {
|
||||
padding-right: 20px;
|
||||
padding-right: 10px;
|
||||
padding-left: 30px;
|
||||
margin-top: 100px;
|
||||
margin-top: 56px;
|
||||
}
|
||||
|
||||
.inputWarning :deep(.v-note-panel) {
|
||||
|
|
|
@ -4,13 +4,22 @@
|
|||
@statusChange="statusChange"
|
||||
:is-read-only="statusReadOnly"
|
||||
:status="testCase.status"/>
|
||||
<el-button class="save-btn" type="primary" size="mini" :disabled="isReadOnly" @click="saveCase()">
|
||||
{{$t('test_track.save')}}
|
||||
</el-button>
|
||||
|
||||
<test-plan-comment-input
|
||||
:data="testCase"
|
||||
ref="comment"/>
|
||||
|
||||
<el-dropdown
|
||||
split-button
|
||||
type="primary"
|
||||
class="save-btn"
|
||||
@command="handleCommand"
|
||||
@click="saveCase"
|
||||
size="medium">
|
||||
{{ save }}
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="command">{{ saveAndNext }}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
@ -21,6 +30,13 @@ import TestPlanCommentInput from "@/business/plan/view/comonents/functional/Test
|
|||
export default {
|
||||
name: "TestPlanFunctionalExecute",
|
||||
components: {TestPlanCommentInput, TestPlanTestCaseStatusButton},
|
||||
data() {
|
||||
return {
|
||||
save: this.$t('test_track.save'),
|
||||
saveAndNext: this.$t('test_track.save_and_next'),
|
||||
command: 'save_and_next',
|
||||
}
|
||||
},
|
||||
props: {
|
||||
isReadOnly: Boolean,
|
||||
originStatus: String,
|
||||
|
@ -41,7 +57,21 @@ export default {
|
|||
this.testCase.status = status;
|
||||
},
|
||||
saveCase() {
|
||||
this.$emit('saveCase');
|
||||
this.$emit('saveCase',this.command);
|
||||
},
|
||||
handleCommand(e) {
|
||||
switch (e) {
|
||||
case 'save_and_next':
|
||||
this.save = this.$t('test_track.save_and_next');
|
||||
this.saveAndNext = this.$t('test_track.save');
|
||||
this.command = 'save';
|
||||
break;
|
||||
default:
|
||||
this.save = this.$t('test_track.save');
|
||||
this.saveAndNext = this.$t('test_track.save_and_next');
|
||||
this.command = 'save_and_next';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -59,6 +89,8 @@ export default {
|
|||
.save-btn {
|
||||
float: right;
|
||||
margin-top: 10px;
|
||||
margin-block: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue