fix(项目设置): 修复环境通用配置csv上传文件的相关问题
--bug=1027648 --user=王孝刚 【项目设置】github#25453,【项目设置】-项目环境:1、创建环境通用配置类型选择CSV,删除已上传文件重新上传提示“一次只能上传一个文件”;2、没有上传文件点击下载没有提示信息。 https://www.tapd.cn/55049933/s/1391974
This commit is contained in:
parent
a08ae64fa9
commit
80f649c15c
|
@ -846,6 +846,9 @@ public class MockConfigService {
|
|||
if (project != null) {
|
||||
RequestMockParams requestMockParams = MockApiUtils.genRequestMockParamsFromHttpRequest(request, true);
|
||||
String urlSuffix = this.getUrlSuffix(project.getSystemId(), request);
|
||||
LogUtil.info("Mock urlSuffix:{}", urlSuffix);
|
||||
LogUtil.info("Mock requestHeaderMap:{}", requestHeaderMap);
|
||||
LogUtil.info("Mock requestMockParams:{}", requestMockParams);
|
||||
List<ApiDefinitionWithBLOBs> qualifiedApiList = apiDefinitionService.preparedUrl(project.getId(), method, urlSuffix, requestHeaderMap.get(MockApiHeaders.MOCK_API_RESOURCE_ID));
|
||||
for (ApiDefinitionWithBLOBs api : qualifiedApiList) {
|
||||
if (StringUtils.isEmpty(returnStr)) {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
:delete-fuc="openDelEnv" @itemSelected="environmentSelected" ref="environmentItems"/>
|
||||
<environment-edit :if-create="ifCreate" :environment="currentEnvironment"
|
||||
ref="environmentEdit" :is-read-only="isReadOnly"
|
||||
@confirm="save" :is-project="true"
|
||||
@confirm="save" :is-project="true" :key="currentEnvironment.id"
|
||||
@close="close" @refreshAfterSave="refresh">
|
||||
</environment-edit>
|
||||
</el-container>
|
||||
|
|
|
@ -58,7 +58,8 @@
|
|||
</el-upload>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-button size="small" style="margin: 3px 5px" @click="download">下载</el-button>
|
||||
<el-button size="small" style="margin: 3px 5px" @click="download" :disabled="this.parameter.files.length === 0">
|
||||
{{this.$t('project.file_download')}}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<ms-file-batch-move ref="module" @setModuleId="setModuleId"/>
|
||||
|
@ -194,12 +195,14 @@ export default {
|
|||
callback: (action) => {
|
||||
if (action === 'confirm') {
|
||||
this.$refs.upload.handleRemove(file);
|
||||
this.$refs.uploadLocal.handleRemove(file);
|
||||
for (let i = 0; i < this.parameter.files.length; i++) {
|
||||
let paramFileName = this.parameter.files[i].name ?
|
||||
this.parameter.files[i].name : this.parameter.files[i].file.name;
|
||||
if (fileName === paramFileName) {
|
||||
this.parameter.files.splice(i, 1);
|
||||
this.$refs.upload.handleRemove(file);
|
||||
this.$refs.uploadLocal.handleRemove(file);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue