style(测试计划): 调整测试计划报告统计图卡片自适应换行样式问题
This commit is contained in:
parent
6787bbc9d4
commit
8647152be3
|
@ -35,15 +35,13 @@
|
||||||
|
|
||||||
<div class="chart-legend grid flex-1 gap-y-3">
|
<div class="chart-legend grid flex-1 gap-y-3">
|
||||||
<!-- 图例开始 -->
|
<!-- 图例开始 -->
|
||||||
<div v-for="item of legendData" :key="item.value" class="chart-legend-item">
|
<div v-for="item of legendData" :key="item.value" class="grid grid-cols-3">
|
||||||
<div class="chart-flag">
|
<div class="flex flex-nowrap items-center">
|
||||||
<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="mr-2 text-[var(--color-text-4)]">{{ item.label }}</div>
|
<div class="text-[var(--color-text-4)]">{{ item.label }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="count text-center font-medium">{{ item.count || 0 }}</div>
|
<div class="text-center">{{ item.count || 0 }}</div>
|
||||||
<div class="count text-right font-medium"
|
<div class="text-right">{{ item.rote || 0 }} <span v-if="String(item.rote) !== 'Calculating'"></span></div>
|
||||||
>{{ item.rote || 0 }} <span v-if="String(item.rote) !== 'Calculating'"></span
|
|
||||||
></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -79,12 +77,14 @@
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.chart-legend {
|
.chart-legend {
|
||||||
.chart-legend-item {
|
.chart-legend-item {
|
||||||
@apply grid grid-cols-3;
|
@apply flex items-center justify-between;
|
||||||
}
|
}
|
||||||
.chart-flag {
|
.chart-flag {
|
||||||
|
width: 80px;
|
||||||
@apply flex flex-nowrap items-center;
|
@apply flex flex-nowrap items-center;
|
||||||
.count {
|
.count {
|
||||||
color: var(--color-text-1);
|
color: var(--color-text-1);
|
||||||
|
@apply flex-1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,8 +39,7 @@
|
||||||
</template>
|
</template>
|
||||||
</MsCard>
|
</MsCard>
|
||||||
<div class="analysis-wrapper">
|
<div class="analysis-wrapper">
|
||||||
<div class="analysis">
|
<div class="analysis min-w-[238px]">
|
||||||
<div>
|
|
||||||
<div class="block-title">{{ t('report.detail.api.requestAnalysis') }}</div>
|
<div class="block-title">{{ t('report.detail.api.requestAnalysis') }}</div>
|
||||||
<ul class="report-analysis">
|
<ul class="report-analysis">
|
||||||
<li class="report-analysis-item">
|
<li class="report-analysis-item">
|
||||||
|
@ -85,21 +84,17 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="analysis min-w-[410px]">
|
||||||
<div class="analysis mx-4">
|
|
||||||
<div>
|
|
||||||
<div class="block-title">{{ t('report.detail.executionAnalysis') }}</div>
|
<div class="block-title">{{ t('report.detail.executionAnalysis') }}</div>
|
||||||
<SetReportChart
|
<SetReportChart
|
||||||
size="160px"
|
size="150px"
|
||||||
offset="top-[34%] right-0 bottom-0 left-0"
|
offset="top-[34%] right-0 bottom-0 left-0"
|
||||||
:legend-data="legendData"
|
:legend-data="legendData"
|
||||||
:options="charOptions"
|
:options="charOptions"
|
||||||
:request-total="getIndicators(detail.caseTotal) || 0"
|
:request-total="getIndicators(detail.caseTotal) || 0"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="analysis min-w-[297px]">
|
||||||
<div class="analysis">
|
|
||||||
<div>
|
|
||||||
<div class="block-title">{{ t('report.detail.useCaseAnalysis') }}</div>
|
<div class="block-title">{{ t('report.detail.useCaseAnalysis') }}</div>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="w-[70%]">
|
<div class="w-[70%]">
|
||||||
|
@ -108,7 +103,7 @@
|
||||||
<SingleStatusProgress :detail="detail" status="block" />
|
<SingleStatusProgress :detail="detail" status="block" />
|
||||||
<SingleStatusProgress :detail="detail" status="error" />
|
<SingleStatusProgress :detail="detail" status="error" />
|
||||||
</div>
|
</div>
|
||||||
<div class="relative w-[30%]">
|
<div class="relative w-[30%] min-w-[120px]">
|
||||||
<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.passRate') }}</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">
|
||||||
|
@ -123,14 +118,13 @@
|
||||||
</template>
|
</template>
|
||||||
</a-popover>
|
</a-popover>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex h-full w-full items-center justify-center">
|
<div class="flex h-full w-full min-w-[120px] items-center justify-center">
|
||||||
<MsChart width="120px" height="120px" :options="functionCaseOptions"
|
<MsChart width="120px" height="120px" :options="functionCaseOptions"
|
||||||
/></div>
|
/></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<MsCard class="mb-[16px]" simple auto-height>
|
<MsCard class="mb-[16px]" simple auto-height>
|
||||||
<div class="font-medium">{{ t('report.detail.reportSummary') }}</div>
|
<div class="font-medium">{{ t('report.detail.reportSummary') }}</div>
|
||||||
<div
|
<div
|
||||||
|
@ -482,12 +476,12 @@
|
||||||
@apply mb-4 font-medium;
|
@apply mb-4 font-medium;
|
||||||
}
|
}
|
||||||
.analysis-wrapper {
|
.analysis-wrapper {
|
||||||
height: 250px;
|
@apply mb-4 flex flex-wrap items-center gap-4;
|
||||||
@apply mb-4 flex items-center;
|
|
||||||
.analysis {
|
.analysis {
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
|
height: 250px;
|
||||||
box-shadow: 0 0 10px rgba(120 56 135/ 5%);
|
box-shadow: 0 0 10px rgba(120 56 135/ 5%);
|
||||||
@apply h-full flex-1 rounded-xl bg-white;
|
@apply flex-1 rounded-xl bg-white;
|
||||||
.report-analysis {
|
.report-analysis {
|
||||||
.report-analysis-item {
|
.report-analysis-item {
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
|
@ -507,7 +501,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.charts {
|
.charts {
|
||||||
top: 34%;
|
top: 36%;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
Loading…
Reference in New Issue