refactor(性能测试): 项目文件管理页面重构
This commit is contained in:
parent
a72fcd71ea
commit
50c71ac1f9
|
@ -84,11 +84,13 @@ export default {
|
|||
fileList: [],
|
||||
uploadList: [],
|
||||
fileNumLimit: 10,
|
||||
condition: {}
|
||||
condition: {},
|
||||
projectId: getCurrentProjectID(),
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
open(project) {
|
||||
this.projectId = project.id;
|
||||
this.loadFileVisible = true;
|
||||
this.getProjectFiles();
|
||||
},
|
||||
|
@ -97,7 +99,7 @@ export default {
|
|||
this.selectIds.clear();
|
||||
},
|
||||
getProjectFiles() {
|
||||
this.projectLoadingResult = this.$post('/performance/project/all/' + getCurrentProjectID() + "/" + this.currentPage + "/" + this.pageSize, this.condition, res => {
|
||||
this.projectLoadingResult = this.$post('/performance/project/all/' + this.projectId + "/" + this.currentPage + "/" + this.pageSize, this.condition, res => {
|
||||
let data = res.data;
|
||||
this.total = data.itemCount;
|
||||
this.existFiles = data.listObject;
|
||||
|
@ -118,7 +120,7 @@ export default {
|
|||
handleUpload(uploadResources) {
|
||||
let file = uploadResources.file;
|
||||
let formData = new FormData();
|
||||
let url = '/project/upload/files/' + getCurrentProjectID()
|
||||
let url = '/project/upload/files/' + this.projectId
|
||||
formData.append("file", file);
|
||||
let options = {
|
||||
method: 'POST',
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
<template v-slot:button>
|
||||
<ms-table-button :is-tester-permission="true" icon="el-icon-box"
|
||||
:content="$t('api_test.jar_config.title')" @click="openJarConfig"/>
|
||||
<ms-table-button :is-tester-permission="true" icon="el-icon-files"
|
||||
:content="$t('load_test.other_resource')" @click="openFiles"/>
|
||||
</template>
|
||||
</ms-table-header>
|
||||
</template>
|
||||
|
@ -45,6 +43,8 @@
|
|||
<template v-slot:behind>
|
||||
<ms-table-operator-button :is-tester-permission="true" :tip="$t('api_test.environment.environment_config')" icon="el-icon-setting"
|
||||
type="info" @exec="openEnvironmentConfig(scope.row)"/>
|
||||
<ms-table-operator-button :is-tester-permission="true" :tip="$t('load_test.other_resource')" icon="el-icon-files"
|
||||
type="success" @exec="openFiles(scope.row)"/>
|
||||
</template>
|
||||
</ms-table-operator>
|
||||
</template>
|
||||
|
@ -228,8 +228,8 @@ export default {
|
|||
openJarConfig() {
|
||||
this.$refs.jarConfig.open();
|
||||
},
|
||||
openFiles() {
|
||||
this.$refs.resourceFiles.open();
|
||||
openFiles(project) {
|
||||
this.$refs.resourceFiles.open(project);
|
||||
},
|
||||
handleDelete(project) {
|
||||
this.$refs.deleteConfirm.open(project);
|
||||
|
|
Loading…
Reference in New Issue