This commit is contained in:
liqiang-fit2cloud 2022-12-19 17:53:05 +08:00
commit 7349a4fc5a
3 changed files with 11 additions and 7 deletions

View File

@ -137,7 +137,8 @@ public class MockConfigService {
}
if (request.getApiId() != null) {
criteria.andApiIdEqualTo(request.getApiId());
} else {
} else if (StringUtils.isEmpty(request.getId())) {
//todo 刚子有时间把这里优化下 如果不满足什么条件需要直接返回的话增加一个check提前返回 尽可能不要在逻辑中途返回会很难维护
return new MockConfigResponse(null, new ArrayList<>());
}
if (request.getProjectId() != null) {

View File

@ -254,9 +254,8 @@ export default {
if (this.isTcp && this.$refs.tcpParam) {
this.$refs.tcpParam.saveData();
}
let mockConfigId = this.mockConfigId;
this.mockExpectConfig.mockConfigId = mockConfigId;
let formCheckResult = this.checkMockExpectForm('mockExpectForm', true);
this.mockExpectConfig.mockConfigId = this.mockConfigId;
this.checkMockExpectForm('mockExpectForm', true);
},
cleanMockExpectConfig() {
this.showHeadTable = false;
@ -290,7 +289,6 @@ export default {
updateMockExpectConfig(param, null, bodyFiles).then((response) => {
let returnData = response.data;
this.mockExpectConfig.id = returnData.id;
this.$emit('refreshMockInfo', param.mockConfigId);
if (clearForm) {
this.cleanMockExpectConfig();
}
@ -298,7 +296,11 @@ export default {
type: 'success',
message: this.$t('commons.save_success'),
});
this.close();
this.$nextTick(() => {
this.$emit('refreshMockInfo', param.mockConfigId);
this.close();
});
});
},
getBodyUploadFiles(data) {

View File

@ -90,7 +90,7 @@ export let CUSTOM_TABLE_HEADER = {
// {id: 'versionId', key: 'f', label: 'project.version.name', xpack: true},
{id: 'creatorName', key: 'd', label: 'api_test.automation.creator'},
{id: 'principalName', key: '6', label: 'api_test.definition.api_principal'},
// {id: 'environmentMap', key: 'e', label: 'commons.environment'},
{id: 'environmentMap', key: 'e', label: 'commons.environment'},
{id: 'updateTime', key: '7', label: 'api_test.definition.api_last_time'},
{id: 'stepTotal', key: '8', label: 'api_test.automation.step'},
{id: 'lastResult', key: 'a', label: 'api_test.automation.last_result'},
@ -104,6 +104,7 @@ export let CUSTOM_TABLE_HEADER = {
{id: 'tags', key: '5', label: 'commons.tag'},
{id: 'creatorName', key: 'd', label: 'api_test.automation.creator'},
{id: 'principalName', key: '6', label: 'api_test.definition.api_principal'},
{id: 'environmentMap', key: '8', label: 'commons.environment'},
{id: 'updateTime', key: '7', label: 'api_test.definition.api_last_time'},
{id: 'lastResult', key: 'a', label: 'ui.debug_result_label'},
{id: 'createTime', key: 'c', label: 'commons.create_time'},