feat: 创建评审加执行按钮

This commit is contained in:
wenyann 2021-03-02 12:52:21 +08:00
parent 5114672358
commit 8690b9afd8
4 changed files with 34 additions and 0 deletions

View File

@ -85,6 +85,9 @@
<el-button type="primary" @click="saveReview"> <el-button type="primary" @click="saveReview">
{{ $t('test_track.confirm') }} {{ $t('test_track.confirm') }}
</el-button> </el-button>
<el-button type="primary" @click="reviewInfo('form')">
{{ $t('test_track.planning_execution') }}
</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
@ -134,6 +137,34 @@ export default {
}; };
}, },
methods: { methods: {
reviewInfo(form) {
this.$refs['reviewForm'].validate((valid) => {
if (valid) {
let param = {};
Object.assign(param, this.form);
param.name = param.name.trim();
if (this.form.tags instanceof Array) {
this.form.tags = JSON.stringify(this.form.tags);
}
param.tags = this.form.tags;
if (param.name === '') {
this.$warning(this.$t('test_track.plan.input_plan_name'));
return;
}
if (!this.compareTime(new Date().getTime(), this.form.endTime)) {
return false;
}
this.result = this.$post('/test/case/review/' + this.operationType, param, response => {
this.dialogFormVisible = false;
this.$router.push('/track/review/view/' + response.data);
});
} else {
return false;
}
});
},
openCaseReviewEditDialog(caseReview) { openCaseReviewEditDialog(caseReview) {
this.resetForm(); this.resetForm();
this.setReviewerOptions(); this.setReviewerOptions();

View File

@ -1039,6 +1039,7 @@ export default {
test_track: "Track", test_track: "Track",
confirm: "Confirm", confirm: "Confirm",
cancel: "Cancel", cancel: "Cancel",
planning_execution: "Planning&Execution",
project: "Project", project: "Project",
save: "Save", save: "Save",
return: "Return", return: "Return",

View File

@ -1041,6 +1041,7 @@ export default {
}, },
test_track: { test_track: {
test_track: "测试跟踪", test_track: "测试跟踪",
planning_execution: "规划&执行",
confirm: "确 定", confirm: "确 定",
cancel: "取 消", cancel: "取 消",
project: "项目", project: "项目",

View File

@ -1041,6 +1041,7 @@ export default {
test_track: "測試跟蹤", test_track: "測試跟蹤",
confirm: "確 定", confirm: "確 定",
cancel: "取 消", cancel: "取 消",
planning_execution: "規劃&執行",
project: "項目", project: "項目",
save: "保 存", save: "保 存",
return: "返 回", return: "返 回",