fix: 导出html报告打开乱码
This commit is contained in:
parent
5e14249e8f
commit
7ca416a20c
|
@ -16,7 +16,6 @@ public class ApiScenarioDTO extends ApiScenarioWithBLOBs {
|
|||
private String principalName;
|
||||
private List<String> tagNames;
|
||||
private String deleteUser;
|
||||
private Long deleteTime;
|
||||
|
||||
/**
|
||||
* 场景跨项目ID
|
||||
|
|
|
@ -12,7 +12,5 @@ public class TestPlanFailureApiDTO extends TestPlanApiCaseDTO {
|
|||
|
||||
private String projectName;
|
||||
|
||||
private String caseId;
|
||||
|
||||
private String response;
|
||||
}
|
||||
|
|
|
@ -8,10 +8,5 @@ import lombok.Setter;
|
|||
@Setter
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class TestPlanFailureScenarioDTO extends ApiScenarioDTO {
|
||||
|
||||
private String projectName;
|
||||
|
||||
private String caseId;
|
||||
|
||||
private APIScenarioReportResult response;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@ import java.util.List;
|
|||
public class TestPlanCaseDTO extends TestCaseWithBLOBs {
|
||||
private String executor;
|
||||
private String executorName;
|
||||
private String status;
|
||||
private String results;
|
||||
private String planId;
|
||||
private String planName;
|
||||
|
|
|
@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
|
|||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.google.gson.Gson;
|
||||
import io.metersphere.api.cache.TestPlanExecuteInfo;
|
||||
import io.metersphere.api.cache.TestPlanReportExecuteCatch;
|
||||
import io.metersphere.api.dto.APIReportResult;
|
||||
|
@ -1693,7 +1694,7 @@ public class TestPlanService {
|
|||
String line = null;
|
||||
while (null != (line = bufferedReader.readLine())) {
|
||||
if (line.contains("\"#report\"")) {
|
||||
line = line.replace("\"#report\"", JSONObject.toJSONString(report));
|
||||
line = line.replace("\"#report\"", new Gson().toJson(report));
|
||||
}
|
||||
line += "\n";
|
||||
byte[] lineBytes = line.getBytes(StandardCharsets.UTF_8);
|
||||
|
|
|
@ -107,6 +107,7 @@ export default {
|
|||
id: ''
|
||||
};
|
||||
},
|
||||
props: ['report', 'export', 'isShare', 'shareId', 'planReportTemplate'],
|
||||
methods: {
|
||||
initTableData() {
|
||||
this.$get("/performance/report/content/testoverview/" + this.id).then(res => {
|
||||
|
@ -492,7 +493,6 @@ export default {
|
|||
deep: true
|
||||
}
|
||||
},
|
||||
props: ['report', 'export']
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -50,10 +50,10 @@ export default {
|
|||
let startTime = 'NaN';
|
||||
let endTime = 'NaN';
|
||||
if (this.report.startTime) {
|
||||
startTime = timestampFormatDate(this.report.startTime, false).substring(0, 10);
|
||||
startTime = timestampFormatDate(this.report.startTime, false);
|
||||
}
|
||||
if (this.report.endTime) {
|
||||
endTime = timestampFormatDate(this.report.endTime, false).substring(0, 10);
|
||||
endTime = timestampFormatDate(this.report.endTime, false);
|
||||
}
|
||||
return startTime + ' ~ ' + endTime;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue