mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 12:09:13 +08:00
fix(测试跟踪): 下载xmind模板失败
--bug=1018264 --user=陈建星 【测试跟踪】下载xmind模版-打开失败,提示“文件已损坏” https://www.tapd.cn/55049933/s/1265339
This commit is contained in:
parent
0556a44c4d
commit
7b5abfe4b3
@ -248,7 +248,7 @@ public class TestCaseController {
|
||||
testCaseService.testCaseTemplateExport(projectId, importType, response);
|
||||
}
|
||||
|
||||
@GetMapping("/export/xmindTemplate/{projectId}/{importType}")
|
||||
@GetMapping("/export/xmind/template/{projectId}/{importType}")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_CASE_READ_EXPORT)
|
||||
public void xmindTemplate(@PathVariable String projectId, @PathVariable String importType, HttpServletResponse response) {
|
||||
testCaseService.testCaseXmindTemplateExport(projectId, importType, response);
|
||||
|
@ -1362,7 +1362,7 @@ public class TestCaseService {
|
||||
// 发送给客户端的数据
|
||||
byte[] buff = new byte[1024];
|
||||
try (OutputStream outputStream = res.getOutputStream();
|
||||
BufferedInputStream bis = new BufferedInputStream(TestCaseService.class.getResourceAsStream("/io/metersphere/xmind/template/" + fileName));) {
|
||||
BufferedInputStream bis = new BufferedInputStream(TestCaseService.class.getClassLoader().getResourceAsStream("xmind/" + fileName));) {
|
||||
int i = bis.read(buff);
|
||||
while (i != -1) {
|
||||
outputStream.write(buff, 0, buff.length);
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
test-track/backend/src/main/resources/xmind/xmind.xml
Normal file
BIN
test-track/backend/src/main/resources/xmind/xmind.xml
Normal file
Binary file not shown.
BIN
test-track/backend/src/main/resources/xmind/xmind_custom_id.xml
Normal file
BIN
test-track/backend/src/main/resources/xmind/xmind_custom_id.xml
Normal file
Binary file not shown.
BIN
test-track/backend/src/main/resources/xmind/xmind_system_id.xml
Normal file
BIN
test-track/backend/src/main/resources/xmind/xmind_system_id.xml
Normal file
Binary file not shown.
BIN
test-track/backend/src/main/resources/xmind/xmind_update.xml
Normal file
BIN
test-track/backend/src/main/resources/xmind/xmind_update.xml
Normal file
Binary file not shown.
@ -157,7 +157,7 @@ export default {
|
||||
downloadXmindTemplate() {
|
||||
let uri = '/test/case/export/template/';
|
||||
if (this.isXmind) {
|
||||
uri = '/test/case/export/xmindTemplate/';
|
||||
uri = '/test/case/export/xmind/template/';
|
||||
}
|
||||
this.$fileDownload(uri + getCurrentProjectID() + '/' + this.importType);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user