feat(接口管理): 用例执行历史筛选字段新增重置和确定按钮

--bug=1037682 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001037682
This commit is contained in:
guoyuqi 2024-03-26 14:15:07 +08:00 committed by 刘瑞斌
parent d83a755b72
commit c18652c809
1 changed files with 36 additions and 0 deletions

View File

@ -33,6 +33,14 @@
</a-checkbox> </a-checkbox>
</a-checkbox-group> </a-checkbox-group>
</div> </div>
<div class="filter-button">
<a-button type="primary" size="mini" class="mr-[8px]" @click="resetModeFilter">
{{ t('common.reset') }}
</a-button>
<a-button size="mini" @click="handleFilterHidden(false)">
{{ t('system.orgTemplate.confirm') }}
</a-button>
</div>
</div> </div>
</template> </template>
</a-trigger> </a-trigger>
@ -56,6 +64,14 @@
</a-checkbox> </a-checkbox>
</a-checkbox-group> </a-checkbox-group>
</div> </div>
<div class="filter-button">
<a-button type="primary" size="mini" class="mr-[8px]" @click="resetStatusFilter">
{{ t('common.reset') }}
</a-button>
<a-button size="mini" @click="handleFilterHidden(false)">
{{ t('system.orgTemplate.confirm') }}
</a-button>
</div>
</div> </div>
</template> </template>
</a-trigger> </a-trigger>
@ -228,9 +244,23 @@
function handleFilterHidden(val: boolean) { function handleFilterHidden(val: boolean) {
if (!val) { if (!val) {
loadExecuteList(); loadExecuteList();
triggerModeFilterVisible.value = false;
statusFilterVisible.value = false;
} }
} }
function resetModeFilter() {
triggerModeListFilters.value = Object.keys(TriggerModeLabel);
triggerModeFilterVisible.value = false;
loadExecuteList();
}
function resetStatusFilter() {
statusFilters.value = Object.keys(ReportStatus[ReportEnum.API_REPORT]);
statusFilterVisible.value = false;
loadExecuteList();
}
function loadedReportDetail(detail: ApiCaseReportDetail[]) { function loadedReportDetail(detail: ApiCaseReportDetail[]) {
responseContent.value = cloneDeep(defaultResponse); responseContent.value = cloneDeep(defaultResponse);
const apiCaseReportDetailElement = detail[0]; const apiCaseReportDetailElement = detail[0];
@ -280,4 +310,10 @@
flex-direction: row; flex-direction: row;
margin-bottom: 21px; margin-bottom: 21px;
} }
.filter-button {
display: flex;
justify-content: space-between;
flex-direction: row;
margin: 12px;
}
</style> </style>