refactor: 补充TS解决部分TODO
This commit is contained in:
parent
a8765a2ef6
commit
67cdb0ddc3
|
@ -135,6 +135,7 @@ import type {
|
|||
RunFeatureCaseParams,
|
||||
SortApiCaseParams,
|
||||
TestPlanBaseParams,
|
||||
TestPlanCaseDetail,
|
||||
TestPlanDetail,
|
||||
TestPlanItem,
|
||||
TestPlanWithoutPageItem,
|
||||
|
@ -298,7 +299,7 @@ export function runFeatureCase(data: RunFeatureCaseParams) {
|
|||
}
|
||||
// 计划详情-功能用例-详情
|
||||
export function getCaseDetail(id: string) {
|
||||
return MSR.get({ url: `${TestPlanCaseDetailUrl}/${id}` });
|
||||
return MSR.get<TestPlanCaseDetail>({ url: `${TestPlanCaseDetailUrl}/${id}` });
|
||||
}
|
||||
// 测试计划-用例详情-缺陷列表
|
||||
export function associatedBugPage(data: TableQueryParams) {
|
||||
|
|
|
@ -142,12 +142,12 @@
|
|||
</MsTag>
|
||||
</div>
|
||||
</div>
|
||||
<!-- TODO lmy 高级搜索全部覆盖后将此代码删除:?? ViewTypeEnum.FUNCTIONAL_CASE -->
|
||||
<FilterDrawer
|
||||
v-if="props.viewType"
|
||||
ref="filterDrawerRef"
|
||||
v-model:visible="visible"
|
||||
:current-view="currentView"
|
||||
:view-type="props.viewType ?? ViewTypeEnum.FUNCTIONAL_CASE"
|
||||
:view-type="props.viewType"
|
||||
:internal-views="internalViews"
|
||||
:all-view-names="allViewNames"
|
||||
:config-list="props.filterConfigList"
|
||||
|
|
|
@ -67,7 +67,6 @@ export interface FilterResult {
|
|||
searchMode?: AccordBelowType;
|
||||
// 高级搜索
|
||||
conditions?: ConditionsItem[];
|
||||
combine?: any; // TODO lmy 此为防报错占位 所有高级筛选都完成后 删除这一行
|
||||
}
|
||||
|
||||
export interface ViewItem {
|
||||
|
|
|
@ -7,7 +7,6 @@ import type { countDetail, PlanReportDetail, StatusListType } from '@/models/tes
|
|||
import { LastExecuteResults } from '@/enums/caseEnum';
|
||||
|
||||
import type { TooltipOption } from 'echarts/types/dist/shared';
|
||||
// TODO: 对照后端字段
|
||||
// 测试计划详情
|
||||
export const testPlanDefaultDetail: TestPlanDetail = {
|
||||
id: '',
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { MinderJsonNode, MinderJsonNodeData } from '@/components/pure/ms-mi
|
|||
import type { BatchActionQueryParams } from '@/components/pure/ms-table/type';
|
||||
import type { saveParams } from '@/components/business/ms-associate-case/types';
|
||||
|
||||
import type { customFieldsItem } from '@/models/caseManagement/featureCase';
|
||||
import type { customFieldsItem, DetailCase } from '@/models/caseManagement/featureCase';
|
||||
import type { TableQueryParams } from '@/models/common';
|
||||
import { BatchApiParams, DragSortParams } from '@/models/common';
|
||||
import { CaseLinkEnum, LastExecuteResults } from '@/enums/caseEnum';
|
||||
|
@ -482,3 +482,11 @@ export interface PlanExecuteResult extends TaskReportDetail {
|
|||
apiCaseTotal: number;
|
||||
apiScenarioTotal: number;
|
||||
}
|
||||
|
||||
export interface TestPlanCaseDetail extends DetailCase {
|
||||
createUserName: string;
|
||||
createTime: number;
|
||||
lastExecuteResult: string;
|
||||
bugListCount: number;
|
||||
customFields: Record<string, any>[];
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
>
|
||||
<template v-if="batchForm.attr === 'method'" #extra>{{ t('apiTestManagement.requestTypeTip') }}</template>
|
||||
<a-select v-model="batchForm.attr" :placeholder="t('common.pleaseSelect')">
|
||||
<a-option v-for="item of attrOptions" :key="item.value" :value="item.value">
|
||||
<a-option v-for="item of fullAttrs" :key="item.value" :value="item.value">
|
||||
{{ t(item.name) }}
|
||||
</a-option>
|
||||
</a-select>
|
||||
|
@ -936,13 +936,6 @@
|
|||
value: 'tags',
|
||||
},
|
||||
];
|
||||
const attrOptions = computed(() => {
|
||||
// TODO 协议 选择的数据不包含HTTP协议,则选择属性中不展示“请求类型“
|
||||
// if (props.protocol === 'HTTP') {
|
||||
return fullAttrs;
|
||||
// }
|
||||
// return fullAttrs.filter((e) => e.value !== 'method');
|
||||
});
|
||||
const valueOptions = computed(() => {
|
||||
switch (batchForm.value.attr) {
|
||||
case 'status':
|
||||
|
|
Loading…
Reference in New Issue