fix(接口测试): 修复新建接口后预览没有创建人,创建时间,更新时间信息的缺陷&断言的高度

--bug=1037739 --user=吕梦园
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001037739
This commit is contained in:
teukkk 2024-04-19 18:30:37 +08:00 committed by Craftsman
parent 1c59d17c3a
commit 53be6ac7d0
5 changed files with 24 additions and 4 deletions

View File

@ -108,7 +108,7 @@
</MsButton>
<template #content>
<div class="arco-table-filters-content">
<div class="py-[2px]] flex w-full items-center justify-start overflow-hidden px-[12px]">
<div class="flex w-full items-center justify-start overflow-hidden px-[12px] py-[2px]">
<a-checkbox-group v-model:model-value="statusFilters" direction="vertical" size="small">
<a-checkbox :key="CommonScriptStatusEnum.PASSED" :value="CommonScriptStatusEnum.PASSED">
<commonScriptStatus :status="CommonScriptStatusEnum.PASSED" />

View File

@ -1321,11 +1321,12 @@
try {
if (!props.updateApi) return;
saveLoading.value = true;
await props.updateApi({
const res = await props.updateApi({
...makeRequestParams(),
...props.otherParams,
});
Message.success(t('common.updateSuccess'));
requestVModel.value.updateTime = res.updateTime;
requestVModel.value.unSaved = false;
emit('addDone');
} catch (error) {

View File

@ -135,6 +135,7 @@
<style lang="less" scoped>
.response-container {
overflow: hidden;
margin-top: 8px;
height: calc(100% - 48px);
}

View File

@ -1,5 +1,5 @@
<template>
<a-scrollbar class="overflow-y-auto" :style="{ height: '300px' }">
<a-scrollbar class="h-full overflow-y-auto">
<MsFormTable
:data="props.requestResult?.responseResult.assertions"
:columns="columns"
@ -57,4 +57,8 @@
];
</script>
<style scoped></style>
<style lang="less" scoped>
.arco-scrollbar {
@apply h-full;
}
</style>

View File

@ -371,6 +371,20 @@
}
}
//
watch(
() => activeApiTab.value.isNew,
async (newValue, oldValue) => {
// isNewtruefalse
if (oldValue && !newValue) {
const res = await getDefinitionDetail(activeApiTab.value.id);
activeApiTab.value.createUserName = res.createUserName;
activeApiTab.value.updateTime = res.updateTime;
activeApiTab.value.createTime = res.createTime;
}
}
);
function handleAddDone() {
if (typeof refreshModuleTree === 'function') {
refreshModuleTree();