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