refactor: 缺陷列表增加用例数字段
This commit is contained in:
parent
29d5169b5e
commit
8578954c13
|
@ -10,4 +10,5 @@ public class IssuesDao extends IssuesWithBLOBs {
|
||||||
private String projectName;
|
private String projectName;
|
||||||
private String creatorName;
|
private String creatorName;
|
||||||
private String resourceName;
|
private String resourceName;
|
||||||
|
private long caseCount;
|
||||||
}
|
}
|
||||||
|
|
|
@ -341,6 +341,10 @@ public class IssuesService {
|
||||||
if (planMap.get(item.getResourceId()) != null) {
|
if (planMap.get(item.getResourceId()) != null) {
|
||||||
item.setResourceName(planMap.get(item.getResourceId()));
|
item.setResourceName(planMap.get(item.getResourceId()));
|
||||||
}
|
}
|
||||||
|
TestCaseIssuesExample example = new TestCaseIssuesExample();
|
||||||
|
example.createCriteria().andIssuesIdEqualTo(item.getId());
|
||||||
|
long caseCount = testCaseIssuesMapper.countByExample(example);
|
||||||
|
item.setCaseCount(caseCount);
|
||||||
});
|
});
|
||||||
return issues;
|
return issues;
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,9 +105,20 @@
|
||||||
</template>
|
</template>
|
||||||
</ms-table-column >
|
</ms-table-column >
|
||||||
|
|
||||||
|
|
||||||
<issue-description-table-item :fields-width="fieldsWidth" :field="item"/>
|
<issue-description-table-item :fields-width="fieldsWidth" :field="item"/>
|
||||||
|
|
||||||
|
<ms-table-column
|
||||||
|
:field="item"
|
||||||
|
:fields-width="fieldsWidth"
|
||||||
|
:label="item.label"
|
||||||
|
prop="caseCount">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<router-link :to="'/track/case/all'">
|
||||||
|
{{scope.row.caseCount}}
|
||||||
|
</router-link>
|
||||||
|
</template>
|
||||||
|
</ms-table-column>
|
||||||
|
|
||||||
<ms-table-column v-for="field in issueTemplate.customFields" :key="field.id"
|
<ms-table-column v-for="field in issueTemplate.customFields" :key="field.id"
|
||||||
:field="item"
|
:field="item"
|
||||||
:fields-width="fieldsWidth"
|
:fields-width="fieldsWidth"
|
||||||
|
|
|
@ -185,6 +185,7 @@ export const CUSTOM_TABLE_HEADER = {
|
||||||
{id: 'creatorName', key: '5', label: i18n.t('custom_field.issue_creator')},
|
{id: 'creatorName', key: '5', label: i18n.t('custom_field.issue_creator')},
|
||||||
{id: 'resourceName', key: '6', label: i18n.t('test_track.issue.issue_resource')},
|
{id: 'resourceName', key: '6', label: i18n.t('test_track.issue.issue_resource')},
|
||||||
{id: 'description', key: '7', label: i18n.t('test_track.issue.description')},
|
{id: 'description', key: '7', label: i18n.t('test_track.issue.description')},
|
||||||
|
{id: 'caseCount', key: '9', label: i18n.t('api_test.definition.api_case_number')},
|
||||||
{id: 'createTime', key: '8', label: i18n.t('commons.create_time')},
|
{id: 'createTime', key: '8', label: i18n.t('commons.create_time')},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue