fix: 测试计划列表的报告每次都重新获取

This commit is contained in:
chenjianxing 2021-08-26 16:48:15 +08:00 committed by jianxing
parent 93f0502c06
commit 0675e591e3
8 changed files with 23 additions and 12 deletions

View File

@ -265,6 +265,7 @@
<if test="status != null">
and t.status = 'error'
</if>
and c.status != 'Trash'
where t.test_plan_id = #{planId};
</select>

View File

@ -477,6 +477,7 @@
<if test="status != null">
and tptc.status = 'Failure'
</if>
and tc.status != 'Trash'
where tptc.plan_id = #{planId} order by tptc.update_time desc
</select>
<update id="updateTestCaseStates" parameterType="java.lang.String">

View File

@ -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;
if (testPlan.getName() == null) {// 若是点击该测试计划则仅更新了updateTime其它字段全为null使用updateByPrimaryKeySelective

View File

@ -470,7 +470,9 @@ export default {
this.$set(this.tableData[i], "issuesContent", JSON.parse(this.tableData[i].issues));
}
}
if (this.$refs.table) {
this.$refs.table.clear();
}
checkTableRowIsSelected(this, this.$refs.table);
});
}

View File

@ -3,7 +3,7 @@
<el-main>
<el-card v-loading="result ? result.loading : false">
<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-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"/>

View File

@ -61,7 +61,11 @@ export default {
// this.handleClose();
// },
open(plan) {
//
this.plan = {id: null}
this.$nextTick(() => {
this.plan = plan;
});
this.showDialog = true;
// this.listenGoBack();
},

View File

@ -136,7 +136,6 @@ export let CUSTOM_TABLE_HEADER = {
{id: 'priority', key: '3', label: 'test_track.case.priority'},
{id: 'path', key: '4', label: 'api_test.definition.api_path'},
{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: 'execResult', key: '8', label: 'test_track.plan.execute_result'},
{id: 'maintainer', key: '9', label: 'api_test.definition.request.responsible'},

View File

@ -71,10 +71,10 @@ export function getSharePerformanceReportResponseCodeChart(shareId, reportId, ca
}
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) {
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) {
@ -113,15 +113,15 @@ export function getSharePerformanceReportLogResourceDetail(shareId, reportId, re
}
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) {
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) {
return resourceId ? baseGet('/metric/query/' + 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(()=>{});
}