fix(测试跟踪): 功能用例编辑复制新增TAB页添加标题

This commit is contained in:
song-cc-rock 2023-03-01 16:20:29 +08:00 committed by fit2-zhao
parent b6fcffa573
commit 376566bd0e
2 changed files with 7 additions and 0 deletions

View File

@ -143,6 +143,7 @@ export default {
let title = response.data[4].paramValue;
if (title) {
localStorage.setItem("default-document-title", title);
document.title = title;
}
if (response.data[0].paramValue) {

View File

@ -647,6 +647,10 @@ export default {
this.handleSaveCaseWithEvent
);
},
beforeRouteLeave(to, from, next) {
document.title = localStorage.getItem("default-document-title");
next();
},
mounted() {
this.getSelectOptions();
@ -970,6 +974,7 @@ export default {
this.operationType = 'add';
// add
document.title = this.$t('test_track.case.create_case');
if (this.moduleOptions.length > 0) {
this.form.module = this.moduleOptions[0].id;
}
@ -1066,6 +1071,7 @@ export default {
this.form.id = null;
testCase.casePublic = false;
}
document.title = testCase.name;
this.currentTestCaseInfo = testCase;
this.setFormData(testCase);
this.setTestCaseExtInfo(testCase);