This commit is contained in:
fit2-zhao 2021-03-31 13:00:04 +08:00
commit 1221bb8d66
3 changed files with 22 additions and 20 deletions

View File

@ -54,20 +54,23 @@
methods: {
init() {
this.projectIds.forEach(id => {
let item = {id: id, envs: [], selectEnv: ""};
this.data.push(item);
this.result = this.$get('/api/environment/list/' + id, res => {
let envs = res.data;
envs.forEach(environment => {
parseEnvironment(environment);
});
//
let temp = this.data.find(dt => dt.id === id);
temp.envs = envs;
let envId = this.envMap.get(id);
//
temp.selectEnv = envs.filter(e => e.id === envId).length === 0 ? null : envId;
})
const project = this.projectList.find(p => p.id === id);
if (project) {
let item = {id: id, envs: [], selectEnv: ""};
this.data.push(item);
this.result = this.$get('/api/environment/list/' + id, res => {
let envs = res.data;
envs.forEach(environment => {
parseEnvironment(environment);
});
//
let temp = this.data.find(dt => dt.id === id);
temp.envs = envs;
let envId = this.envMap.get(id);
//
temp.selectEnv = envs.filter(e => e.id === envId).length === 0 ? null : envId;
})
}
})
},
open() {

View File

@ -173,11 +173,12 @@ export default {
updateTime: row.lastModified,
});
}
//
rows.forEach(row => {
this.fileList.push(row);
})
if (this.loadType === 'resource') {
rows.forEach(row => {
this.fileList.push(row);
})
this.$success(this.$t('test_track.case.import.success'));
this.close();
return;
@ -197,8 +198,6 @@ export default {
tg.options = {};
this.scenarios.push(tg);
});
let file = new File([d.jmx], d.name);
this.uploadList.push(file);
});
this.$emit('fileChange', this.scenarios);

@ -1 +1 @@
Subproject commit 07951ba17aef6f29e50cfd68e40de3266f9a60cd
Subproject commit a37e6bb56ffaa7ecc4ee128640e9415304ad41b6