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",
|
planning_execution: "Planning&Execution",
|
||||||
project: "Project",
|
project: "Project",
|
||||||
save: "Save",
|
save: "Save",
|
||||||
|
save_and_next: "Save and next",
|
||||||
return: "Return",
|
return: "Return",
|
||||||
length_less_than: "Length must be less than or equal to",
|
length_less_than: "Length must be less than or equal to",
|
||||||
recent_plan: "My recent plan",
|
recent_plan: "My recent plan",
|
||||||
|
|
|
@ -15,6 +15,7 @@ export default {
|
||||||
cancel: "取 消",
|
cancel: "取 消",
|
||||||
project: "项目",
|
project: "项目",
|
||||||
save: "保 存",
|
save: "保 存",
|
||||||
|
save_and_next: "保存并下一条",
|
||||||
return: "返 回",
|
return: "返 回",
|
||||||
length_less_than: "长度必须小于等于",
|
length_less_than: "长度必须小于等于",
|
||||||
recent_plan: "我最近的计划",
|
recent_plan: "我最近的计划",
|
||||||
|
|
|
@ -15,6 +15,7 @@ export default {
|
||||||
cancel: "取 消",
|
cancel: "取 消",
|
||||||
project: "項目",
|
project: "項目",
|
||||||
save: "保 存",
|
save: "保 存",
|
||||||
|
save_and_next: "保存並下一條",
|
||||||
return: "返 回",
|
return: "返 回",
|
||||||
length_less_than: "長度必須小於等于",
|
length_less_than: "長度必須小於等于",
|
||||||
recent_plan: "我最近的計劃",
|
recent_plan: "我最近的計劃",
|
||||||
|
|
|
@ -347,7 +347,7 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
saveCase() {
|
saveCase(command) {
|
||||||
let param = {};
|
let param = {};
|
||||||
param.id = this.testCase.id;
|
param.id = this.testCase.id;
|
||||||
param.caseId = this.testCase.caseId;
|
param.caseId = this.testCase.caseId;
|
||||||
|
@ -396,6 +396,9 @@ export default {
|
||||||
this.testCase.comment = "";
|
this.testCase.comment = "";
|
||||||
}
|
}
|
||||||
this.originalStatus = this.testCase.status;
|
this.originalStatus = this.testCase.status;
|
||||||
|
if (command === 'save') {
|
||||||
|
this.handleNext();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
updateTestCases(param) {
|
updateTestCases(param) {
|
||||||
|
|
|
@ -103,9 +103,9 @@ export default {
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
.comment-form {
|
.comment-form {
|
||||||
padding-right: 20px;
|
padding-right: 10px;
|
||||||
padding-left: 30px;
|
padding-left: 30px;
|
||||||
margin-top: 100px;
|
margin-top: 56px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inputWarning :deep(.v-note-panel) {
|
.inputWarning :deep(.v-note-panel) {
|
||||||
|
|
|
@ -4,13 +4,22 @@
|
||||||
@statusChange="statusChange"
|
@statusChange="statusChange"
|
||||||
:is-read-only="statusReadOnly"
|
:is-read-only="statusReadOnly"
|
||||||
:status="testCase.status"/>
|
: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
|
<test-plan-comment-input
|
||||||
:data="testCase"
|
:data="testCase"
|
||||||
ref="comment"/>
|
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>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -21,6 +30,13 @@ import TestPlanCommentInput from "@/business/plan/view/comonents/functional/Test
|
||||||
export default {
|
export default {
|
||||||
name: "TestPlanFunctionalExecute",
|
name: "TestPlanFunctionalExecute",
|
||||||
components: {TestPlanCommentInput, TestPlanTestCaseStatusButton},
|
components: {TestPlanCommentInput, TestPlanTestCaseStatusButton},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
save: this.$t('test_track.save'),
|
||||||
|
saveAndNext: this.$t('test_track.save_and_next'),
|
||||||
|
command: 'save_and_next',
|
||||||
|
}
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
isReadOnly: Boolean,
|
isReadOnly: Boolean,
|
||||||
originStatus: String,
|
originStatus: String,
|
||||||
|
@ -41,7 +57,21 @@ export default {
|
||||||
this.testCase.status = status;
|
this.testCase.status = status;
|
||||||
},
|
},
|
||||||
saveCase() {
|
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 {
|
.save-btn {
|
||||||
float: right;
|
float: right;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
margin-block: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue