fix: 场景报告删除后列表查看结果报错
This commit is contained in:
parent
e60dc78e94
commit
cb9bb38b3a
|
@ -288,16 +288,23 @@ export default {
|
||||||
this.buildReport();
|
this.buildReport();
|
||||||
} else if (this.isShare) {
|
} else if (this.isShare) {
|
||||||
getShareScenarioReport(this.shareId, this.reportId, (data) => {
|
getShareScenarioReport(this.shareId, this.reportId, (data) => {
|
||||||
this.report = data || {};
|
this.handleGetScenarioReport(data);
|
||||||
this.buildReport();
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
getScenarioReport(this.reportId, (data) => {
|
getScenarioReport(this.reportId, (data) => {
|
||||||
this.report = data || {};
|
this.handleGetScenarioReport(data);
|
||||||
this.buildReport();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleGetScenarioReport(data) {
|
||||||
|
if (data) {
|
||||||
|
this.report = data;
|
||||||
|
this.buildReport();
|
||||||
|
} else {
|
||||||
|
this.$emit('invisible');
|
||||||
|
this.$warning('报告已删除');
|
||||||
|
}
|
||||||
|
},
|
||||||
buildReport() {
|
buildReport() {
|
||||||
if (this.report) {
|
if (this.report) {
|
||||||
if (this.isNotRunning) {
|
if (this.isNotRunning) {
|
||||||
|
|
|
@ -220,7 +220,7 @@
|
||||||
<el-drawer :visible.sync="showReportVisible" :destroy-on-close="true" direction="ltr" :withHeader="true"
|
<el-drawer :visible.sync="showReportVisible" :destroy-on-close="true" direction="ltr" :withHeader="true"
|
||||||
:modal="false"
|
:modal="false"
|
||||||
size="90%">
|
size="90%">
|
||||||
<ms-api-report-detail @refresh="search" :infoDb="infoDb" :report-id="showReportId" :currentProjectId="projectId"/>
|
<ms-api-report-detail @invisible="showReportVisible = false" @refresh="search" :infoDb="infoDb" :report-id="showReportId" :currentProjectId="projectId"/>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
<!--测试计划-->
|
<!--测试计划-->
|
||||||
<el-drawer :visible.sync="planVisible" :destroy-on-close="true" direction="ltr" :withHeader="false"
|
<el-drawer :visible.sync="planVisible" :destroy-on-close="true" direction="ltr" :withHeader="false"
|
||||||
|
|
|
@ -157,7 +157,7 @@
|
||||||
<!-- 执行结果 -->
|
<!-- 执行结果 -->
|
||||||
<el-drawer :visible.sync="runVisible" :destroy-on-close="true" direction="ltr" :withHeader="true" :modal="false"
|
<el-drawer :visible.sync="runVisible" :destroy-on-close="true" direction="ltr" :withHeader="true" :modal="false"
|
||||||
size="90%">
|
size="90%">
|
||||||
<ms-api-report-detail @refresh="search" :infoDb="infoDb" :report-id="reportId" :currentProjectId="projectId"/>
|
<ms-api-report-detail @invisible="runVisible = false" @refresh="search" :infoDb="infoDb" :report-id="reportId" :currentProjectId="projectId"/>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
Loading…
Reference in New Issue