fix(接口测试): 修复增加mock期望时列表不刷新的问题
--bug=1020971 --user=宋天阳 【接口测试】mock期望添加后,需要刷新才能看到 https://www.tapd.cn/55049933/s/1316934
This commit is contained in:
parent
177e5f9675
commit
4ca06b9d82
|
@ -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) {
|
||||
|
|
|
@ -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,8 +296,12 @@ export default {
|
|||
type: 'success',
|
||||
message: this.$t('commons.save_success'),
|
||||
});
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$emit('refreshMockInfo', param.mockConfigId);
|
||||
this.close();
|
||||
});
|
||||
});
|
||||
},
|
||||
getBodyUploadFiles(data) {
|
||||
let bodyUploadFiles = [];
|
||||
|
|
Loading…
Reference in New Issue