fix: 测试计划列表的报告每次都重新获取
This commit is contained in:
parent
93f0502c06
commit
0675e591e3
|
@ -262,9 +262,10 @@
|
||||||
api_test_case c
|
api_test_case c
|
||||||
on t.api_case_id = c.id
|
on t.api_case_id = c.id
|
||||||
and t.test_plan_id = #{planId}
|
and t.test_plan_id = #{planId}
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
and t.status = 'error'
|
and t.status = 'error'
|
||||||
</if>
|
</if>
|
||||||
|
and c.status != 'Trash'
|
||||||
where t.test_plan_id = #{planId};
|
where t.test_plan_id = #{planId};
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -477,6 +477,7 @@
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
and tptc.status = 'Failure'
|
and tptc.status = 'Failure'
|
||||||
</if>
|
</if>
|
||||||
|
and tc.status != 'Trash'
|
||||||
where tptc.plan_id = #{planId} order by tptc.update_time desc
|
where tptc.plan_id = #{planId} order by tptc.update_time desc
|
||||||
</select>
|
</select>
|
||||||
<update id="updateTestCaseStates" parameterType="java.lang.String">
|
<update id="updateTestCaseStates" parameterType="java.lang.String">
|
||||||
|
|
|
@ -239,6 +239,10 @@ public class TestPlanService {
|
||||||
} // 非已结束->已结束,更新结束时间
|
} // 非已结束->已结束,更新结束时间
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(testPlan.getStatus()) && testPlan.getStatus().equals(TestPlanStatus.Prepare.name())) {
|
||||||
|
testPlan.setActualStartTime(null);
|
||||||
|
testPlan.setActualEndTime(null);
|
||||||
|
}
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
if (testPlan.getName() == null) {// 若是点击该测试计划,则仅更新了updateTime,其它字段全为null,使用updateByPrimaryKeySelective
|
if (testPlan.getName() == null) {// 若是点击该测试计划,则仅更新了updateTime,其它字段全为null,使用updateByPrimaryKeySelective
|
||||||
|
|
|
@ -470,7 +470,9 @@ export default {
|
||||||
this.$set(this.tableData[i], "issuesContent", JSON.parse(this.tableData[i].issues));
|
this.$set(this.tableData[i], "issuesContent", JSON.parse(this.tableData[i].issues));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$refs.table.clear();
|
if (this.$refs.table) {
|
||||||
|
this.$refs.table.clear();
|
||||||
|
}
|
||||||
checkTableRowIsSelected(this, this.$refs.table);
|
checkTableRowIsSelected(this, this.$refs.table);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<el-main>
|
<el-main>
|
||||||
<el-card v-loading="result ? result.loading : false">
|
<el-card v-loading="result ? result.loading : false">
|
||||||
<test-plan-report-buttons :is-db="isDb" :plan-id="planId" :is-share="isShare" :report="report"
|
<test-plan-report-buttons :is-db="isDb" :plan-id="planId" :is-share="isShare" :report="report"
|
||||||
v-if="!isTemplate"/>
|
v-if="!isTemplate && !isShare"/>
|
||||||
<test-plan-overview-report v-if="overviewEnable" :report="report"/>
|
<test-plan-overview-report v-if="overviewEnable" :report="report"/>
|
||||||
<test-plan-summary-report v-if="summaryEnable" :is-db="isDb" :is-template="isTemplate" :is-share="isShare" :report="report" :plan-id="planId"/>
|
<test-plan-summary-report v-if="summaryEnable" :is-db="isDb" :is-template="isTemplate" :is-share="isShare" :report="report" :plan-id="planId"/>
|
||||||
<test-plan-functional-report v-if="functionalEnable" :is-db="isDb" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :plan-id="planId" :report="report"/>
|
<test-plan-functional-report v-if="functionalEnable" :is-db="isDb" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :plan-id="planId" :report="report"/>
|
||||||
|
|
|
@ -61,7 +61,11 @@ export default {
|
||||||
// this.handleClose();
|
// this.handleClose();
|
||||||
// },
|
// },
|
||||||
open(plan) {
|
open(plan) {
|
||||||
this.plan = plan;
|
// 每次都重新获取
|
||||||
|
this.plan = {id: null}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.plan = plan;
|
||||||
|
});
|
||||||
this.showDialog = true;
|
this.showDialog = true;
|
||||||
// this.listenGoBack();
|
// this.listenGoBack();
|
||||||
},
|
},
|
||||||
|
|
|
@ -136,7 +136,6 @@ export let CUSTOM_TABLE_HEADER = {
|
||||||
{id: 'priority', key: '3', label: 'test_track.case.priority'},
|
{id: 'priority', key: '3', label: 'test_track.case.priority'},
|
||||||
{id: 'path', key: '4', label: 'api_test.definition.api_path'},
|
{id: 'path', key: '4', label: 'api_test.definition.api_path'},
|
||||||
{id: 'createUser', key: '5', label: 'api_test.creator'},
|
{id: 'createUser', key: '5', label: 'api_test.creator'},
|
||||||
{id: 'custom', key: '6', label: 'api_test.definition.api_last_time'},
|
|
||||||
{id: 'tags', key: '7', label: 'commons.tag'},
|
{id: 'tags', key: '7', label: 'commons.tag'},
|
||||||
{id: 'execResult', key: '8', label: 'test_track.plan.execute_result'},
|
{id: 'execResult', key: '8', label: 'test_track.plan.execute_result'},
|
||||||
{id: 'maintainer', key: '9', label: 'api_test.definition.request.responsible'},
|
{id: 'maintainer', key: '9', label: 'api_test.definition.request.responsible'},
|
||||||
|
|
|
@ -71,10 +71,10 @@ export function getSharePerformanceReportResponseCodeChart(shareId, reportId, ca
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPerformanceReportDetailContent(reportKey, reportId, callback) {
|
export function getPerformanceReportDetailContent(reportKey, reportId, callback) {
|
||||||
return reportId ? baseGet('/performance/report/content/' + reportKey + '/' + reportId, callback) : {};
|
return reportId ? baseGet('/performance/report/content/' + reportKey + '/' + reportId, callback) : new Promise(()=>{});
|
||||||
}
|
}
|
||||||
export function getSharePerformanceReportDetailContent(shareId, reportKey, reportId, callback) {
|
export function getSharePerformanceReportDetailContent(shareId, reportKey, reportId, callback) {
|
||||||
return reportId ? baseGet('/share/performance/report/content/' + shareId + '/' + reportKey + '/' + reportId, callback) : {};
|
return reportId ? baseGet('/share/performance/report/content/' + shareId + '/' + reportKey + '/' + reportId, callback) : new Promise(()=>{});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPerformanceReportContent(reportId, callback) {
|
export function getPerformanceReportContent(reportId, callback) {
|
||||||
|
@ -113,15 +113,15 @@ export function getSharePerformanceReportLogResourceDetail(shareId, reportId, re
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPerformanceMetricQueryResource(resourceId, callback) {
|
export function getPerformanceMetricQueryResource(resourceId, callback) {
|
||||||
return resourceId ? baseGet('/metric/query/resource/' + resourceId, callback) : {};
|
return resourceId ? baseGet('/metric/query/resource/' + resourceId, callback) : new Promise(()=>{});
|
||||||
}
|
}
|
||||||
export function getSharePerformanceMetricQueryResource(shareId, resourceId, callback) {
|
export function getSharePerformanceMetricQueryResource(shareId, resourceId, callback) {
|
||||||
return resourceId ? baseGet('/share/metric/query/resource/' + shareId + '/' + resourceId, callback) : {};
|
return resourceId ? baseGet('/share/metric/query/resource/' + shareId + '/' + resourceId, callback) : new Promise(()=>{});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPerformanceMetricQuery(resourceId, callback) {
|
export function getPerformanceMetricQuery(resourceId, callback) {
|
||||||
return resourceId ? baseGet('/metric/query/' + resourceId, callback) : {};
|
return resourceId ? baseGet('/metric/query/' + resourceId, callback) : {};
|
||||||
}
|
}
|
||||||
export function getSharePerformanceMetricQuery(shareId, resourceId, callback) {
|
export function getSharePerformanceMetricQuery(shareId, resourceId, callback) {
|
||||||
return resourceId ? baseGet('/share/metric/query/' + shareId + '/' + resourceId, callback) : {};
|
return resourceId ? baseGet('/share/metric/query/' + shareId + '/' + resourceId, callback) : new Promise(()=>{});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue