测试报告模版
This commit is contained in:
parent
845439661e
commit
90c2e0d1f5
|
@ -18,11 +18,13 @@
|
|||
<el-row type="flex" justify="space-between" class="select-time">
|
||||
<el-col :span="12">
|
||||
<span>开始时间:</span>
|
||||
<el-date-picker size="mini" type="date" placeholder="选择日期" v-model="reportInfo.startTime"/>
|
||||
<span v-if="!isReport">{{reportInfo.startTime}}</span>
|
||||
<el-date-picker v-if="isReport" size="mini" type="date" placeholder="选择日期" v-model="reportInfo.startTime"/>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>结束时间:</span>
|
||||
<el-date-picker size="mini" type="date" placeholder="选择日期" v-model="reportInfo.endTime"/>
|
||||
<span v-if="!isReport">{{reportInfo.endTime}}</span>
|
||||
<el-date-picker v-if="isReport" size="mini" type="date" placeholder="选择日期" v-model="reportInfo.endTime"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
@ -44,10 +46,6 @@
|
|||
export default {
|
||||
name: "BaseInfoComponent",
|
||||
components: {CommonComponent},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
props: {
|
||||
reportInfo: {
|
||||
type: Object,
|
||||
|
@ -60,6 +58,10 @@
|
|||
endTime: '2020-6-18'
|
||||
}
|
||||
}
|
||||
},
|
||||
isReport: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
<template>
|
||||
<div>
|
||||
|
||||
<!--模版-->
|
||||
<div v-if="!metric">
|
||||
<base-info-component v-if="preview.id == 1"/>
|
||||
<base-info-component :is-report="false" v-if="preview.id == 1"/>
|
||||
<test-result-component v-if="preview.id == 2"/>
|
||||
<test-result-chart-component v-if="preview.id == 3"/>
|
||||
<rich-text-component :preview="preview" v-if="preview.type != 'system'"/>
|
||||
</div>
|
||||
|
||||
<!--报告-->
|
||||
<div v-if="metric">
|
||||
<base-info-component :report-info="metric" v-if="preview.id == 1"/>
|
||||
<test-result-component :test-results="metric.moduleExecuteResult" v-if="preview.id == 2"/>
|
||||
|
|
|
@ -244,10 +244,10 @@
|
|||
if (this.template.workspaceId) {
|
||||
param.workspaceId = localStorage.getItem(WORKSPACE_ID);
|
||||
}
|
||||
if (this.metric.startTime) {
|
||||
if (this.metric && this.metric.startTime) {
|
||||
param.startTime = this.metric.startTime.getTime();
|
||||
}
|
||||
if (this.metric.endTime) {
|
||||
if (this.metric && this.metric.endTime) {
|
||||
param.endTime = this.metric.endTime.getTime();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue