parent
7a036915d7
commit
de84e312a6
|
@ -217,6 +217,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
projectName:"",
|
||||||
type: TEST_CASE_LIST,
|
type: TEST_CASE_LIST,
|
||||||
tableHeaderKey:"TRACK_TEST_CASE",
|
tableHeaderKey:"TRACK_TEST_CASE",
|
||||||
screenHeight: 'calc(100vh - 250px)',
|
screenHeight: 'calc(100vh - 250px)',
|
||||||
|
@ -326,6 +327,9 @@ export default {
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
let redirectParam = this.$route.query.dataSelectRange;
|
let redirectParam = this.$route.query.dataSelectRange;
|
||||||
this.checkRedirectEditPage(redirectParam);
|
this.checkRedirectEditPage(redirectParam);
|
||||||
|
if(!this.projectName || this.projectName === ""){
|
||||||
|
this.getProjectName();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
activated() {
|
activated() {
|
||||||
this.getTemplateField();
|
this.getTemplateField();
|
||||||
|
@ -385,6 +389,14 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getProjectName (){
|
||||||
|
this.$get('project/get/' + this.projectId, response => {
|
||||||
|
let project = response.data;
|
||||||
|
if(project){
|
||||||
|
this.projectName = project.name;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
customHeader() {
|
customHeader() {
|
||||||
const list = deepClone(this.tableLabel);
|
const list = deepClone(this.tableLabel);
|
||||||
this.$refs.headerCustom.open(list);
|
this.$refs.headerCustom.open(list);
|
||||||
|
@ -552,7 +564,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.page.result = this.$request(config).then(response => {
|
this.page.result = this.$request(config).then(response => {
|
||||||
const filename = "Metersphere_case_" + localStorage.getItem(PROJECT_NAME) + ".xlsx";
|
const filename = "Metersphere_case_" + this.projectName+ ".xlsx";
|
||||||
const blob = new Blob([response.data]);
|
const blob = new Blob([response.data]);
|
||||||
if ("download" in document.createElement("a")) {
|
if ("download" in document.createElement("a")) {
|
||||||
let aTag = document.createElement('a');
|
let aTag = document.createElement('a');
|
||||||
|
|
Loading…
Reference in New Issue