fix(测试计划): 修改一系列调整的问题和部分bug
This commit is contained in:
parent
6980ca0b53
commit
829ec6f298
|
@ -490,29 +490,30 @@
|
||||||
getCaseLevelColumn();
|
getCaseLevelColumn();
|
||||||
});
|
});
|
||||||
|
|
||||||
const { propsRes, propsEvent, loadList, setLoadListParams, resetSelector, setTableSelected } = useTable(
|
const { propsRes, propsEvent, loadList, setLoadListParams, resetSelector, setTableSelected, resetFilterParams } =
|
||||||
props.getTableFunc,
|
useTable(
|
||||||
{
|
props.getTableFunc,
|
||||||
columns,
|
{
|
||||||
scroll: { x: '100%' },
|
columns,
|
||||||
showSetting: false,
|
scroll: { x: '100%' },
|
||||||
selectable: true,
|
showSetting: false,
|
||||||
showSelectAll: true,
|
selectable: true,
|
||||||
heightUsed: 310,
|
showSelectAll: true,
|
||||||
showSelectorAll: !props.selectorAll,
|
heightUsed: 310,
|
||||||
},
|
showSelectorAll: !props.selectorAll,
|
||||||
(record) => {
|
},
|
||||||
return {
|
(record) => {
|
||||||
...record,
|
return {
|
||||||
tags: (record.tags || []).map((item: string, i: number) => {
|
...record,
|
||||||
return {
|
tags: (record.tags || []).map((item: string, i: number) => {
|
||||||
id: `${record.id}-${i}`,
|
return {
|
||||||
name: item,
|
id: `${record.id}-${i}`,
|
||||||
};
|
name: item,
|
||||||
}),
|
};
|
||||||
};
|
}),
|
||||||
}
|
};
|
||||||
);
|
}
|
||||||
|
);
|
||||||
|
|
||||||
// 用例等级
|
// 用例等级
|
||||||
// TODO: 这个版本用例和接口以及场景不存在用例等级 不展示等级内容
|
// TODO: 这个版本用例和接口以及场景不存在用例等级 不展示等级内容
|
||||||
|
@ -740,6 +741,7 @@
|
||||||
() => props.visible,
|
() => props.visible,
|
||||||
(val) => {
|
(val) => {
|
||||||
if (val) {
|
if (val) {
|
||||||
|
resetFilterParams();
|
||||||
if (!props.hideProjectSelect) {
|
if (!props.hideProjectSelect) {
|
||||||
initProjectList(true);
|
initProjectList(true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -761,6 +763,7 @@
|
||||||
if (!props.hideProjectSelect) {
|
if (!props.hideProjectSelect) {
|
||||||
initProjectList(true);
|
initProjectList(true);
|
||||||
}
|
}
|
||||||
|
resetFilterParams();
|
||||||
initModules(true);
|
initModules(true);
|
||||||
searchCase();
|
searchCase();
|
||||||
initFilter();
|
initFilter();
|
||||||
|
@ -771,6 +774,7 @@
|
||||||
(val) => {
|
(val) => {
|
||||||
if (val) {
|
if (val) {
|
||||||
resetSelector();
|
resetSelector();
|
||||||
|
resetFilterParams();
|
||||||
initModules(true);
|
initModules(true);
|
||||||
searchCase();
|
searchCase();
|
||||||
initFilter();
|
initFilter();
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<a-input-password
|
<a-input-password
|
||||||
v-model="inputValue"
|
v-model="inputValue"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
:default-visibility="false"
|
:default-visibility="true"
|
||||||
allow-clear
|
allow-clear
|
||||||
@clear="clearHandler"
|
@clear="clearHandler"
|
||||||
@input="inputHandler"
|
@input="inputHandler"
|
||||||
|
|
|
@ -76,6 +76,14 @@ export const defaultReportDetail: PlanReportDetail = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const statusConfig: StatusListType[] = [
|
export const statusConfig: StatusListType[] = [
|
||||||
|
{
|
||||||
|
label: 'common.unExecute',
|
||||||
|
value: 'pending',
|
||||||
|
color: '#D4D4D8',
|
||||||
|
class: 'bg-[var(--color-text-input-border)]',
|
||||||
|
rateKey: 'requestPendingRate',
|
||||||
|
key: 'PENDING',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: 'common.success',
|
label: 'common.success',
|
||||||
value: 'success',
|
value: 'success',
|
||||||
|
@ -93,22 +101,7 @@ export const statusConfig: StatusListType[] = [
|
||||||
// rateKey: 'requestFakeErrorRate',
|
// rateKey: 'requestFakeErrorRate',
|
||||||
// key: 'FAKE_ERROR',
|
// key: 'FAKE_ERROR',
|
||||||
// },
|
// },
|
||||||
{
|
|
||||||
label: 'common.fail',
|
|
||||||
value: 'error',
|
|
||||||
color: '#ED0303',
|
|
||||||
class: 'bg-[rgb(var(--danger-6))]',
|
|
||||||
rateKey: 'requestErrorRate',
|
|
||||||
key: 'ERROR',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'common.unExecute',
|
|
||||||
value: 'pending',
|
|
||||||
color: '#D4D4D8',
|
|
||||||
class: 'bg-[var(--color-text-input-border)]',
|
|
||||||
rateKey: 'requestPendingRate',
|
|
||||||
key: 'PENDING',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: 'common.block',
|
label: 'common.block',
|
||||||
value: 'block',
|
value: 'block',
|
||||||
|
@ -117,6 +110,14 @@ export const statusConfig: StatusListType[] = [
|
||||||
rateKey: 'requestPendingRate',
|
rateKey: 'requestPendingRate',
|
||||||
key: 'BLOCK',
|
key: 'BLOCK',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'common.fail',
|
||||||
|
value: 'error',
|
||||||
|
color: '#ED0303',
|
||||||
|
class: 'bg-[rgb(var(--danger-6))]',
|
||||||
|
rateKey: 'requestErrorRate',
|
||||||
|
key: 'ERROR',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export default {};
|
export default {};
|
||||||
|
|
|
@ -40,8 +40,10 @@
|
||||||
<div class="mb-[2px] mr-[4px] h-[6px] w-[6px] rounded-full" :class="item.class"></div>
|
<div class="mb-[2px] mr-[4px] h-[6px] w-[6px] rounded-full" :class="item.class"></div>
|
||||||
<div class="text-[var(--color-text-4)]">{{ item.label }}</div>
|
<div class="text-[var(--color-text-4)]">{{ item.label }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center">{{ item.count || 0 }}</div>
|
<div class="text-center font-medium text-[var(--color-text-1)]">{{ item.count || 0 }}</div>
|
||||||
<div class="text-right">{{ item.rote || 0 }} <span v-if="String(item.rote) !== 'Calculating'"></span></div>
|
<div class="text-right font-medium text-[var(--color-text-1)]"
|
||||||
|
>{{ item.rote || 0 }} <span v-if="String(item.rote) !== 'Calculating'"></span
|
||||||
|
></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -258,12 +258,24 @@
|
||||||
series: {
|
series: {
|
||||||
name: '',
|
name: '',
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
radius: ['65%', '80%'],
|
radius: ['62%', '80%'],
|
||||||
avoidLabelOverlap: false,
|
avoidLabelOverlap: false,
|
||||||
label: {
|
label: {
|
||||||
show: false,
|
show: false,
|
||||||
position: 'center',
|
position: 'center',
|
||||||
},
|
},
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
borderWidth: 2,
|
||||||
|
borderColor: '#ffffff',
|
||||||
|
},
|
||||||
|
emphasis: {
|
||||||
|
borderWidth: 0,
|
||||||
|
shadowBlur: 0,
|
||||||
|
shadowOffsetX: 0,
|
||||||
|
shadowColor: 'rgba(0, 0, 0, 0.5)',
|
||||||
|
},
|
||||||
|
},
|
||||||
emphasis: {
|
emphasis: {
|
||||||
label: {
|
label: {
|
||||||
show: false,
|
show: false,
|
||||||
|
|
|
@ -264,12 +264,24 @@
|
||||||
series: {
|
series: {
|
||||||
name: '',
|
name: '',
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
radius: ['65%', '80%'],
|
radius: ['62%', '80%'],
|
||||||
avoidLabelOverlap: false,
|
avoidLabelOverlap: false,
|
||||||
label: {
|
label: {
|
||||||
show: false,
|
show: false,
|
||||||
position: 'center',
|
position: 'center',
|
||||||
},
|
},
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
borderWidth: 2,
|
||||||
|
borderColor: '#ffffff',
|
||||||
|
},
|
||||||
|
emphasis: {
|
||||||
|
borderWidth: 0,
|
||||||
|
shadowBlur: 0,
|
||||||
|
shadowOffsetX: 0,
|
||||||
|
shadowColor: 'rgba(0, 0, 0, 0.5)',
|
||||||
|
},
|
||||||
|
},
|
||||||
emphasis: {
|
emphasis: {
|
||||||
label: {
|
label: {
|
||||||
show: false,
|
show: false,
|
||||||
|
|
|
@ -850,10 +850,12 @@
|
||||||
currentSelectCount: 0,
|
currentSelectCount: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
const conditionParams = ref({
|
const conditionParams = computed(() => {
|
||||||
keyword: '',
|
return {
|
||||||
filter: {},
|
keyword: keyword.value,
|
||||||
combine: {},
|
filter: propsRes.value.filter,
|
||||||
|
combine: batchParams.value.condition,
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
async function initTableParams() {
|
async function initTableParams() {
|
||||||
|
@ -865,11 +867,6 @@
|
||||||
moduleIds = [...featureCaseStore.moduleId, ...props.offspringIds];
|
moduleIds = [...featureCaseStore.moduleId, ...props.offspringIds];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
conditionParams.value = {
|
|
||||||
keyword: keyword.value,
|
|
||||||
filter: propsRes.value.filter,
|
|
||||||
combine: batchParams.value.condition,
|
|
||||||
};
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
moduleIds,
|
moduleIds,
|
||||||
|
|
|
@ -222,6 +222,15 @@
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
showDrag: false,
|
showDrag: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'common.creator',
|
||||||
|
slotName: 'createUserName',
|
||||||
|
dataIndex: 'createUserName',
|
||||||
|
showInTable: true,
|
||||||
|
showTooltip: true,
|
||||||
|
width: 200,
|
||||||
|
ellipsis: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'caseManagement.featureCase.updateUser',
|
title: 'caseManagement.featureCase.updateUser',
|
||||||
slotName: 'handleUserName',
|
slotName: 'handleUserName',
|
||||||
|
|
|
@ -18,8 +18,16 @@
|
||||||
<a-switch v-model="isEnable" :disabled="isDisabled" size="small" type="line" />
|
<a-switch v-model="isEnable" :disabled="isDisabled" size="small" type="line" />
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="text-sm">{{ t('organization.service.statusEnableTip') }}</div>
|
<div class="text-sm">{{
|
||||||
<div class="text-sm">{{ t('organization.service.statusDisableTip') }}</div>
|
pluginId === 'jira'
|
||||||
|
? t('organization.service.statusJiraEnableTip')
|
||||||
|
: t('organization.service.statusEnableTip')
|
||||||
|
}}</div>
|
||||||
|
<div class="text-sm">{{
|
||||||
|
pluginId === 'jira'
|
||||||
|
? t('organization.service.statusJiraDisableTip')
|
||||||
|
: t('organization.service.statusDisableTip')
|
||||||
|
}}</div>
|
||||||
</template>
|
</template>
|
||||||
<icon-question-circle class="ml-2 text-[--color-text-4]" />
|
<icon-question-circle class="ml-2 text-[--color-text-4]" />
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
|
@ -203,4 +211,4 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
export default {
|
export default {
|
||||||
'organization.service.searchPlugin': 'Search by plug-in name',
|
'organization.service.searchPlugin': 'Search by plug-in name',
|
||||||
'system.service.statusEnableTip': 'Open: Projects can be integrated with the platform',
|
'system.service.statusEnableTip': 'Open: Projects can be integrated with the platform',
|
||||||
'system.service.statusDisableTip': 'Shutdown: Projects cannot integrate with the platform',
|
'organization.service.statusJiraEnableTip':
|
||||||
|
'Open: can integrate with the platform and generate default templates for the platform',
|
||||||
|
'system.service.statusDisableTip': 'Off: Projects cannot integrate with the platform',
|
||||||
|
'organization.service.statusJiraDisableTip':
|
||||||
|
'Off: The project cannot be integrated with the platform and the platform default template is not available',
|
||||||
'organization.service.headerTip': 'Service integration usage guidelines',
|
'organization.service.headerTip': 'Service integration usage guidelines',
|
||||||
'organization.service.integrationList': 'Integration of List',
|
'organization.service.integrationList': 'Integration of List',
|
||||||
'organization.service.packUp': 'Pack Up',
|
'organization.service.packUp': 'Pack Up',
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
export default {
|
export default {
|
||||||
'organization.service.searchPlugin': '通过插件名称搜索',
|
'organization.service.searchPlugin': '通过插件名称搜索',
|
||||||
'organization.service.statusEnableTip': '开启:项目可以与该平台集成',
|
'organization.service.statusEnableTip': '开启:项目可以与该平台集成',
|
||||||
|
'organization.service.statusJiraEnableTip': '开启:项目可以与该平台集成并生成该平台的默认模板',
|
||||||
'organization.service.statusDisableTip': '关闭:项目无法与该平台集成',
|
'organization.service.statusDisableTip': '关闭:项目无法与该平台集成',
|
||||||
|
'organization.service.statusJiraDisableTip': '关闭:项目无法与该平台集成且该平台默认模板不可用',
|
||||||
'organization.service.headerTip': '服务集成 使用指引',
|
'organization.service.headerTip': '服务集成 使用指引',
|
||||||
'organization.service.integrationList': '集成列表',
|
'organization.service.integrationList': '集成列表',
|
||||||
'organization.service.packUp': '收起',
|
'organization.service.packUp': '收起',
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
|
@ -126,6 +126,7 @@
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const keyword = ref<string>('');
|
const keyword = ref<string>('');
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
type ReportShowType = 'All' | 'INDEPENDENT' | 'INTEGRATED';
|
type ReportShowType = 'All' | 'INDEPENDENT' | 'INTEGRATED';
|
||||||
const showType = ref<ReportShowType>('All');
|
const showType = ref<ReportShowType>('All');
|
||||||
|
@ -402,10 +403,6 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onBeforeMount(() => {
|
|
||||||
initData();
|
|
||||||
});
|
|
||||||
|
|
||||||
function changeShowType(val: string | number | boolean) {
|
function changeShowType(val: string | number | boolean) {
|
||||||
showType.value = val as ReportShowType;
|
showType.value = val as ReportShowType;
|
||||||
resetFilterParams();
|
resetFilterParams();
|
||||||
|
@ -431,6 +428,13 @@
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onBeforeMount(() => {
|
||||||
|
if (route.query.id) {
|
||||||
|
showReportDetail(route.query.id as string);
|
||||||
|
}
|
||||||
|
initData();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
{{ props.detail.caseTotal || 0 }}
|
{{ props.detail.caseTotal || 0 }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="popover-tr">
|
<tr v-if="props.status === 'pending'" class="popover-tr">
|
||||||
<td class="popover-label-td">
|
<td class="popover-label-td">
|
||||||
<div class="mb-[2px] mr-[4px] h-[6px] w-[6px] rounded-full bg-[var(--color-text-input-border)]"></div>
|
<div class="mb-[2px] mr-[4px] h-[6px] w-[6px] rounded-full bg-[var(--color-text-input-border)]"></div>
|
||||||
<div>{{ t('common.unExecute') }}</div>
|
<div>{{ t('common.unExecute') }}</div>
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
{{ statusExecuteRate.pendingRateResult }}
|
{{ statusExecuteRate.pendingRateResult }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="popover-tr">
|
<tr v-if="props.status === 'success'" class="popover-tr">
|
||||||
<td class="popover-label-td">
|
<td class="popover-label-td">
|
||||||
<div class="mb-[2px] mr-[4px] h-[6px] w-[6px] rounded-full bg-[rgb(var(--success-6))]"></div>
|
<div class="mb-[2px] mr-[4px] h-[6px] w-[6px] rounded-full bg-[rgb(var(--success-6))]"></div>
|
||||||
<div>{{ t('common.success') }}</div>
|
<div>{{ t('common.success') }}</div>
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
{{ detailCount.fakeErrorCount }}
|
{{ detailCount.fakeErrorCount }}
|
||||||
</td>
|
</td>
|
||||||
</tr> -->
|
</tr> -->
|
||||||
<tr class="popover-tr">
|
<tr v-if="props.status === 'block'" class="popover-tr">
|
||||||
<td class="popover-label-td">
|
<td class="popover-label-td">
|
||||||
<div class="mb-[2px] mr-[4px] h-[6px] w-[6px] rounded-full bg-[var(--color-fill-p-3)]"></div>
|
<div class="mb-[2px] mr-[4px] h-[6px] w-[6px] rounded-full bg-[var(--color-fill-p-3)]"></div>
|
||||||
<div>{{ t('common.block') }}</div>
|
<div>{{ t('common.block') }}</div>
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
{{ statusExecuteRate.blockRateResult }}
|
{{ statusExecuteRate.blockRateResult }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="popover-tr">
|
<tr v-if="props.status === 'error'" class="popover-tr">
|
||||||
<td class="popover-label-td">
|
<td class="popover-label-td">
|
||||||
<div class="mb-[2px] mr-[4px] h-[6px] w-[6px] rounded-full bg-[rgb(var(--danger-6))]"></div>
|
<div class="mb-[2px] mr-[4px] h-[6px] w-[6px] rounded-full bg-[rgb(var(--danger-6))]"></div>
|
||||||
<div>{{ t('common.fail') }}</div>
|
<div>{{ t('common.fail') }}</div>
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<MsCard class="mb-[16px]" hide-back hide-footer auto-height no-content-padding hide-divider>
|
<MsCard class="mb-[16px]" hide-back hide-footer auto-height no-content-padding hide-divider>
|
||||||
<template #headerLeft>
|
<template #headerLeft>
|
||||||
<div class="flex items-center font-medium"
|
<div class="flex items-center font-medium">
|
||||||
>{{ t('report.name') }}
|
|
||||||
<a-tooltip :content="detail.name" :mouse-enter-delay="300"
|
<a-tooltip :content="detail.name" :mouse-enter-delay="300"
|
||||||
><div class="one-line-text max-w-[300px]">{{ detail.name }}</div>
|
><div class="one-line-text max-w-[300px]">{{ detail.name }}</div>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
|
@ -87,7 +86,7 @@
|
||||||
<div class="analysis min-w-[410px]">
|
<div class="analysis min-w-[410px]">
|
||||||
<div class="block-title">{{ t('report.detail.executionAnalysis') }}</div>
|
<div class="block-title">{{ t('report.detail.executionAnalysis') }}</div>
|
||||||
<SetReportChart
|
<SetReportChart
|
||||||
size="150px"
|
size="160px"
|
||||||
:legend-data="legendData"
|
:legend-data="legendData"
|
||||||
:options="charOptions"
|
:options="charOptions"
|
||||||
:request-total="getIndicators(detail.caseTotal) || 0"
|
:request-total="getIndicators(detail.caseTotal) || 0"
|
||||||
|
@ -104,17 +103,15 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="relative w-[30%] min-w-[150px]">
|
<div class="relative w-[30%] min-w-[150px]">
|
||||||
<div class="charts absolute w-full text-center">
|
<div class="charts absolute w-full text-center">
|
||||||
<div class="text-[12px] !text-[var(--color-text-4)]">{{ t('report.detail.api.total') }}</div>
|
<div class="text-[12px] !text-[var(--color-text-4)]">{{ t('report.passRate') }}</div>
|
||||||
<a-popover position="bottom" content-class="response-popover-content">
|
<a-popover position="bottom" content-class="response-popover-content">
|
||||||
<div class="flex justify-center text-[18px] font-medium">
|
<div class="flex justify-center text-[18px] font-medium">
|
||||||
<div class="one-line-text max-w-[80px] text-[var(--color-text-1)]">{{ functionCaseTotal }} </div>
|
<div class="one-line-text max-w-[80px] text-[var(--color-text-1)]">{{ functionCasePassRate }} </div>
|
||||||
</div>
|
</div>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="min-w-[95px] max-w-[400px] p-4 text-[14px]">
|
<div class="min-w-[95px] max-w-[400px] p-4 text-[14px]">
|
||||||
<div class="text-[12px] font-medium text-[var(--color-text-4)]">{{
|
<div class="text-[12px] font-medium text-[var(--color-text-4)]">{{ t('report.passRate') }}</div>
|
||||||
t('report.detail.api.total')
|
<div class="mt-2 text-[18px] font-medium text-[var(--color-text-1)]">{{ functionCasePassRate }}</div>
|
||||||
}}</div>
|
|
||||||
<div class="mt-2 text-[18px] font-medium text-[var(--color-text-1)]">{{ functionCaseTotal }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</a-popover>
|
</a-popover>
|
||||||
|
@ -273,8 +270,9 @@
|
||||||
series: {
|
series: {
|
||||||
name: '',
|
name: '',
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
radius: ['65%', '80%'],
|
radius: ['62%', '80%'],
|
||||||
avoidLabelOverlap: false,
|
avoidLabelOverlap: false,
|
||||||
|
padAngle: 10,
|
||||||
label: {
|
label: {
|
||||||
show: false,
|
show: false,
|
||||||
position: 'center',
|
position: 'center',
|
||||||
|
@ -289,6 +287,18 @@
|
||||||
labelLine: {
|
labelLine: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
borderWidth: 2,
|
||||||
|
borderColor: '#ffffff',
|
||||||
|
},
|
||||||
|
emphasis: {
|
||||||
|
borderWidth: 0,
|
||||||
|
shadowBlur: 0,
|
||||||
|
shadowOffsetX: 0,
|
||||||
|
shadowColor: 'rgba(0, 0, 0, 0.5)',
|
||||||
|
},
|
||||||
|
},
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
value: 0,
|
value: 0,
|
||||||
|
@ -340,7 +350,7 @@
|
||||||
series: {
|
series: {
|
||||||
name: '',
|
name: '',
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
radius: ['65%', '80%'],
|
radius: ['62%', '80%'],
|
||||||
avoidLabelOverlap: false,
|
avoidLabelOverlap: false,
|
||||||
label: {
|
label: {
|
||||||
show: false,
|
show: false,
|
||||||
|
@ -356,6 +366,18 @@
|
||||||
labelLine: {
|
labelLine: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
borderWidth: 2,
|
||||||
|
borderColor: '#ffffff',
|
||||||
|
},
|
||||||
|
emphasis: {
|
||||||
|
borderWidth: 0,
|
||||||
|
shadowBlur: 0,
|
||||||
|
shadowOffsetX: 0,
|
||||||
|
shadowColor: 'rgba(0, 0, 0, 0.5)',
|
||||||
|
},
|
||||||
|
},
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
value: 0,
|
value: 0,
|
||||||
|
@ -389,12 +411,17 @@
|
||||||
};
|
};
|
||||||
}) as unknown as LegendData[];
|
}) as unknown as LegendData[];
|
||||||
|
|
||||||
functionCaseOptions.value.series.data = statusConfig.map((item: StatusListType) => {
|
const passRateData = statusConfig.filter((item) => ['success'].includes(item.value));
|
||||||
|
const { functionalCount } = detail.value;
|
||||||
|
const { success } = functionalCount;
|
||||||
|
const valueList = success ? statusConfig : passRateData;
|
||||||
|
|
||||||
|
functionCaseOptions.value.series.data = valueList.map((item: StatusListType) => {
|
||||||
return {
|
return {
|
||||||
value: detail.value.functionalCount[item.value] || 0,
|
value: detail.value.functionalCount[item.value] || 0,
|
||||||
name: t(item.label),
|
name: t(item.label),
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: item.color,
|
color: success ? item.color : '#D4D4D8',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -452,10 +479,11 @@
|
||||||
showButton.value = false;
|
showButton.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const functionCaseTotal = computed(() => {
|
const functionCasePassRate = computed(() => {
|
||||||
const { functionalCount } = detail.value;
|
const { functionalCount } = detail.value;
|
||||||
const { success, error, pending, block } = functionalCount;
|
const { success, error, pending, block } = functionalCount;
|
||||||
return success + error + pending + block;
|
const successRate = (success / (success + error + pending + block)) * 100;
|
||||||
|
return `${Number.isNaN(successRate) ? 0 : successRate.toFixed(2)}%`;
|
||||||
});
|
});
|
||||||
|
|
||||||
const activeTab = ref('bug');
|
const activeTab = ref('bug');
|
||||||
|
@ -508,11 +536,13 @@
|
||||||
@apply flex items-center;
|
@apply flex items-center;
|
||||||
}
|
}
|
||||||
.report-analysis-item-number {
|
.report-analysis-item-number {
|
||||||
|
font-size: 16px;
|
||||||
@apply font-medium;
|
@apply font-medium;
|
||||||
}
|
}
|
||||||
.report-analysis-item-unit {
|
.report-analysis-item-unit {
|
||||||
|
font-size: 12px;
|
||||||
color: var(--color-text-4);
|
color: var(--color-text-4);
|
||||||
@apply ml-1;
|
@apply ml-1 font-medium;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,9 +140,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'common.creator',
|
title: 'common.creator',
|
||||||
slotName: 'createUser',
|
slotName: 'createUserName',
|
||||||
dataIndex: 'createUser',
|
dataIndex: 'createUserName',
|
||||||
showInTable: true,
|
showInTable: true,
|
||||||
|
showTooltip: true,
|
||||||
width: 200,
|
width: 200,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
|
|
|
@ -489,12 +489,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTotal(key: string) {
|
function getTotal(key: string) {
|
||||||
const { bugListCount, historyCount } = caseDetail.value;
|
const { bugListCount, runListCount } = caseDetail.value;
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'defectList':
|
case 'defectList':
|
||||||
return bugListCount > 99 ? `99+` : `${bugListCount}`;
|
return bugListCount > 99 ? `99+` : `${bugListCount || 0}`;
|
||||||
case 'executionHistory':
|
case 'executionHistory':
|
||||||
return historyCount > 99 ? `99+` : `${historyCount}`;
|
return runListCount > 99 ? `99+` : `${runListCount || 0}`;
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
@ -554,9 +554,6 @@
|
||||||
moduleIds,
|
moduleIds,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// if (activeTab.value === 'detail') {
|
|
||||||
// getBugTotal();
|
|
||||||
// }
|
|
||||||
getPlanDetail();
|
getPlanDetail();
|
||||||
initBugList();
|
initBugList();
|
||||||
await loadCase();
|
await loadCase();
|
||||||
|
|
Loading…
Reference in New Issue