Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
d511800c
M
metersphere
项目概览
MeterSphere
/
metersphere
上一次同步 3 年多
通知
25
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
metersphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d511800c
编写于
5月 06, 2020
作者:
C
chenjianxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
查看编辑测试用例报告
上级
61256ee9
变更
13
显示空白变更内容
内联
并排
Showing
13 changed file
with
418 addition
and
121 deletion
+418
-121
backend/src/main/java/io/metersphere/controller/TestCaseReportController.java
...a/io/metersphere/controller/TestCaseReportController.java
+3
-2
backend/src/main/java/io/metersphere/controller/TestCaseReportTemplateController.java
...ersphere/controller/TestCaseReportTemplateController.java
+2
-1
backend/src/main/java/io/metersphere/controller/TestPlanController.java
...in/java/io/metersphere/controller/TestPlanController.java
+1
-1
backend/src/main/java/io/metersphere/controller/request/testCaseReport/CreateReportRequest.java
...ontroller/request/testCaseReport/CreateReportRequest.java
+9
-0
backend/src/main/java/io/metersphere/controller/request/testCaseReport/QueryTemplateRequest.java
...ntroller/request/testCaseReport/QueryTemplateRequest.java
+9
-0
backend/src/main/java/io/metersphere/service/TestCaseReportService.java
...in/java/io/metersphere/service/TestCaseReportService.java
+26
-0
backend/src/main/java/io/metersphere/service/TestCaseReportTemplateService.java
...io/metersphere/service/TestCaseReportTemplateService.java
+11
-4
backend/src/main/java/io/metersphere/service/TestPlanService.java
...src/main/java/io/metersphere/service/TestPlanService.java
+2
-4
frontend/src/business/components/settings/workspace/TestCaseReportTemplate.vue
.../components/settings/workspace/TestCaseReportTemplate.vue
+3
-3
frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue
...tings/workspace/components/TestCaseReportTemplateEdit.vue
+18
-9
frontend/src/business/components/track/plan/view/comonents/TestCaseReportView.vue
...mponents/track/plan/view/comonents/TestCaseReportView.vue
+148
-0
frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue
...onents/track/plan/view/comonents/TestPlanTestCaseList.vue
+121
-97
frontend/src/business/components/track/plan/view/comonents/TestReportTemplateList.vue
...ents/track/plan/view/comonents/TestReportTemplateList.vue
+65
-0
未找到文件。
backend/src/main/java/io/metersphere/controller/TestCaseReportController.java
浏览文件 @
d511800c
package
io.metersphere.controller
;
import
io.metersphere.base.domain.TestCaseReport
;
import
io.metersphere.controller.request.testCaseReport.CreateReportRequest
;
import
io.metersphere.service.TestCaseReportService
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -25,8 +26,8 @@ public class TestCaseReportController {
}
@PostMapping
(
"/add"
)
public
void
add
(
@RequestBody
TestCaseReport
TestCaseRepor
t
){
testCaseReportService
.
addTestCaseReport
(
TestCaseRepor
t
);
public
Long
addByTemplateId
(
@RequestBody
CreateReportRequest
reques
t
){
return
testCaseReportService
.
addTestCaseReportByTemplateId
(
reques
t
);
}
@PostMapping
(
"/edit"
)
...
...
backend/src/main/java/io/metersphere/controller/TestCaseReportTemplateController.java
浏览文件 @
d511800c
package
io.metersphere.controller
;
import
io.metersphere.base.domain.TestCaseReportTemplate
;
import
io.metersphere.controller.request.testCaseReport.QueryTemplateRequest
;
import
io.metersphere.service.TestCaseReportTemplateService
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -15,7 +16,7 @@ public class TestCaseReportTemplateController {
TestCaseReportTemplateService
testCaseReportTemplateService
;
@PostMapping
(
"/list"
)
public
List
<
TestCaseReportTemplate
>
list
(
@RequestBody
TestCaseReportTemplate
request
)
{
public
List
<
TestCaseReportTemplate
>
list
(
@RequestBody
QueryTemplateRequest
request
)
{
return
testCaseReportTemplateService
.
listTestCaseReportTemplate
(
request
);
}
...
...
backend/src/main/java/io/metersphere/controller/TestPlanController.java
浏览文件 @
d511800c
...
...
@@ -49,7 +49,7 @@ public class TestPlanController {
}
@PostMapping
(
"/get/{testPlanId}"
)
public
List
<
TestPlan
>
getTestPlan
(
@PathVariable
String
testPlanId
){
public
TestPlan
getTestPlan
(
@PathVariable
String
testPlanId
){
return
testPlanService
.
getTestPlan
(
testPlanId
);
}
...
...
backend/src/main/java/io/metersphere/controller/request/testCaseReport/CreateReportRequest.java
0 → 100644
浏览文件 @
d511800c
package
io.metersphere.controller.request.testCaseReport
;
import
lombok.Data
;
@Data
public
class
CreateReportRequest
{
String
planId
;
Long
templateId
;
}
backend/src/main/java/io/metersphere/controller/request/testCaseReport/QueryTemplateRequest.java
0 → 100644
浏览文件 @
d511800c
package
io.metersphere.controller.request.testCaseReport
;
import
io.metersphere.base.domain.TestCaseReportTemplate
;
import
lombok.Data
;
@Data
public
class
QueryTemplateRequest
extends
TestCaseReportTemplate
{
Boolean
queryDefault
;
}
backend/src/main/java/io/metersphere/service/TestCaseReportService.java
浏览文件 @
d511800c
...
...
@@ -2,7 +2,13 @@ package io.metersphere.service;
import
io.metersphere.base.domain.TestCaseReport
;
import
io.metersphere.base.domain.TestCaseReportExample
;
import
io.metersphere.base.domain.TestCaseReportTemplate
;
import
io.metersphere.base.domain.TestPlan
;
import
io.metersphere.base.mapper.TestCaseReportMapper
;
import
io.metersphere.base.mapper.TestCaseReportTemplateMapper
;
import
io.metersphere.base.mapper.TestPlanMapper
;
import
io.metersphere.commons.utils.BeanUtils
;
import
io.metersphere.controller.request.testCaseReport.CreateReportRequest
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -17,6 +23,12 @@ public class TestCaseReportService {
@Resource
TestCaseReportMapper
testCaseReportMapper
;
@Resource
TestPlanMapper
testPlanMapper
;
@Resource
TestCaseReportTemplateMapper
testCaseReportTemplateMapper
;
public
List
<
TestCaseReport
>
listTestCaseReport
(
TestCaseReport
request
)
{
TestCaseReportExample
example
=
new
TestCaseReportExample
();
if
(
StringUtils
.
isNotBlank
(
request
.
getName
())
)
{
...
...
@@ -40,4 +52,18 @@ public class TestCaseReportService {
public
int
deleteTestCaseReport
(
Long
id
)
{
return
testCaseReportMapper
.
deleteByPrimaryKey
(
id
);
}
public
Long
addTestCaseReportByTemplateId
(
CreateReportRequest
request
)
{
TestCaseReportTemplate
template
=
testCaseReportTemplateMapper
.
selectByPrimaryKey
(
request
.
getTemplateId
());
TestCaseReport
report
=
new
TestCaseReport
();
BeanUtils
.
copyBean
(
report
,
template
);
TestPlan
testPlan
=
testPlanMapper
.
selectByPrimaryKey
(
request
.
getPlanId
());
report
.
setName
(
testPlan
.
getName
());
report
.
setId
(
null
);
testCaseReportMapper
.
insert
(
report
);
testPlan
.
setReportId
(
report
.
getId
());
testPlanMapper
.
updateByPrimaryKeySelective
(
testPlan
);
return
report
.
getId
();
}
}
backend/src/main/java/io/metersphere/service/TestCaseReportTemplateService.java
浏览文件 @
d511800c
...
...
@@ -4,6 +4,7 @@ import io.metersphere.base.domain.TestCaseReportTemplate;
import
io.metersphere.base.domain.TestCaseReportTemplateExample
;
import
io.metersphere.base.mapper.TestCaseReportMapper
;
import
io.metersphere.base.mapper.TestCaseReportTemplateMapper
;
import
io.metersphere.controller.request.testCaseReport.QueryTemplateRequest
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -18,15 +19,21 @@ public class TestCaseReportTemplateService {
@Resource
TestCaseReportTemplateMapper
testCaseReportTemplateMapper
;
public
List
<
TestCaseReportTemplate
>
listTestCaseReportTemplate
(
TestCaseReportTemplate
request
)
{
public
List
<
TestCaseReportTemplate
>
listTestCaseReportTemplate
(
QueryTemplateRequest
request
)
{
TestCaseReportTemplateExample
example
=
new
TestCaseReportTemplateExample
();
TestCaseReportTemplateExample
.
Criteria
criteria1
=
example
.
createCriteria
();
TestCaseReportTemplateExample
.
Criteria
criteria2
=
example
.
createCriteria
();
if
(
StringUtils
.
isNotBlank
(
request
.
getName
())
)
{
example
.
createCriteria
().
andNameEqualTo
(
request
.
getName
());
criteria1
.
andNameLike
(
"%"
+
request
.
getName
()
+
"%"
);
criteria2
.
andNameLike
(
"%"
+
request
.
getName
()
+
"%"
);
}
if
(
StringUtils
.
isNotBlank
(
request
.
getWorkspaceId
())
)
{
example
.
createCriteria
().
andWorkspaceIdEqualTo
(
request
.
getWorkspaceId
());
criteria1
.
andWorkspaceIdEqualTo
(
request
.
getWorkspaceId
());
}
if
(
request
.
getQueryDefault
()
!=
null
)
{
criteria2
.
andWorkspaceIdIsNull
();
example
.
or
(
criteria2
);
}
example
.
or
(
example
.
createCriteria
().
andWorkspaceIdIsNull
());
return
testCaseReportTemplateMapper
.
selectByExample
(
example
);
}
...
...
backend/src/main/java/io/metersphere/service/TestPlanService.java
浏览文件 @
d511800c
...
...
@@ -53,10 +53,8 @@ public class TestPlanService {
}
public
List
<
TestPlan
>
getTestPlan
(
String
testPlanId
)
{
TestPlanExample
testPlanExample
=
new
TestPlanExample
();
testPlanExample
.
createCriteria
().
andIdEqualTo
(
testPlanId
);
return
testPlanMapper
.
selectByExampleWithBLOBs
(
testPlanExample
);
public
TestPlan
getTestPlan
(
String
testPlanId
)
{
return
testPlanMapper
.
selectByPrimaryKey
(
testPlanId
);
}
public
int
editTestPlan
(
TestPlan
testPlan
)
{
...
...
frontend/src/business/components/settings/workspace/TestCaseReportTemplate.vue
浏览文件 @
d511800c
...
...
@@ -56,9 +56,6 @@
this
.
result
=
this
.
$post
(
'
/case/report/template/list
'
,
this
.
condition
,
response
=>
{
this
.
templates
=
response
.
data
;
});
},
templateCreate
()
{
},
templateEdit
(
id
)
{
this
.
$refs
.
templateEdit
.
open
(
id
);
...
...
@@ -69,5 +66,8 @@
<
style
scoped
>
.el-card
{
min-height
:
300px
;
}
</
style
>
frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue
浏览文件 @
d511800c
...
...
@@ -89,16 +89,15 @@
),
components
:
[
4
],
previews
:
[],
template
:
{}
template
:
{},
isReport
:
false
}
},
props
:
{
},
watch
:
{
},
methods
:
{
open
(
id
)
{
open
(
id
,
isReport
)
{
if
(
isReport
)
{
this
.
isReport
=
isReport
;
}
this
.
template
=
{
name
:
''
,
content
:
{
...
...
@@ -190,7 +189,11 @@
}
},
getTemplateById
(
id
)
{
this
.
$get
(
'
/case/report/template/get/
'
+
id
,
(
response
)
=>
{
let
url
=
'
/case/report/template/get/
'
;
if
(
this
.
isReport
)
{
url
=
'
/case/report/get/
'
;
}
this
.
$get
(
url
+
id
,
(
response
)
=>
{
this
.
template
=
response
.
data
;
this
.
template
.
content
=
JSON
.
parse
(
response
.
data
.
content
);
if
(
this
.
template
.
content
.
customComponent
)
{
...
...
@@ -206,7 +209,11 @@
}
let
param
=
{};
this
.
buildParam
(
param
);
this
.
$post
(
'
/case/report/template/
'
+
this
.
type
,
param
,
()
=>
{
let
url
=
'
/case/report/template/
'
;
if
(
this
.
isReport
)
{
url
=
'
/case/report/
'
;
}
this
.
$post
(
url
+
this
.
type
,
param
,
()
=>
{
this
.
$success
(
'
保存成功
'
);
this
.
showDialog
=
false
;
this
.
$emit
(
'
refresh
'
);
...
...
@@ -229,6 +236,8 @@
param
.
content
=
JSON
.
stringify
(
content
);
if
(
this
.
type
==
'
edit
'
)
{
param
.
id
=
this
.
template
.
id
;
}
else
{
param
.
workspaceId
=
localStorage
.
getItem
(
WORKSPACE_ID
);
}
if
(
this
.
template
.
workspaceId
)
{
param
.
workspaceId
=
localStorage
.
getItem
(
WORKSPACE_ID
);
...
...
frontend/src/business/components/track/plan/view/comonents/TestCaseReportView.vue
0 → 100644
浏览文件 @
d511800c
<
template
>
<div>
<el-drawer
:before-close=
"handleClose"
:visible.sync=
"showDialog"
:with-header=
"false"
size=
"100%"
ref=
"drawer"
v-loading=
"result.loading"
>
<template
v-slot:default=
"scope"
>
<el-row
type=
"flex"
class=
"head-bar"
>
<el-col
:span=
"12"
>
<div
class=
"name-edit"
>
<el-button
plain
size=
"mini"
icon=
"el-icon-back"
@
click=
"handleClose"
>
{{
$t
(
'
test_track.return
'
)
}}
</el-button>
<span>
{{
report
.
name
}}
</span>
</div>
</el-col>
<el-col
:span=
"12"
class=
"head-right"
>
<el-button
plain
size=
"mini"
@
click=
"handleEdit"
>
编辑组件
</el-button>
</el-col>
</el-row>
<div
class=
"container"
>
<el-main>
<div
class=
"preview"
v-for=
"item in previews"
:key=
"item.id"
>
<base-info-component
v-if=
"item.id == 1"
/>
<test-result-component
v-if=
"item.id == 2"
/>
<test-result-chart-component
v-if=
"item.id == 3"
/>
<rich-text-component
:preview=
"item"
v-if=
"item.type != 'system'"
/>
</div>
</el-main>
</div>
</
template
>
</el-drawer>
<test-case-report-template-edit
ref=
"templateEdit"
@
refresh=
"getReport"
/>
</div>
</template>
<
script
>
import
{
jsonToMap
}
from
"
../../../../../../common/js/utils
"
;
import
BaseInfoComponent
from
"
../../../../settings/workspace/components/TemplateComponent/BaseInfoComponent
"
;
import
TestResultChartComponent
from
"
../../../../settings/workspace/components/TemplateComponent/TestResultChartComponent
"
;
import
TestResultComponent
from
"
../../../../settings/workspace/components/TemplateComponent/TestResultComponent
"
;
import
RichTextComponent
from
"
../../../../settings/workspace/components/TemplateComponent/RichTextComponent
"
;
import
TestCaseReportTemplateEdit
from
"
../../../../settings/workspace/components/TestCaseReportTemplateEdit
"
;
export
default
{
name
:
"
TestCaseReportView
"
,
components
:
{
TestCaseReportTemplateEdit
,
RichTextComponent
,
TestResultComponent
,
TestResultChartComponent
,
BaseInfoComponent
},
data
()
{
return
{
result
:
{},
showDialog
:
false
,
previews
:
[],
report
:
{},
reportId
:
''
,
componentMap
:
new
Map
(
[
[
1
,
{
name
:
"
基础信息
"
,
id
:
1
,
type
:
'
system
'
}],
[
2
,
{
name
:
"
测试结果
"
,
id
:
2
,
type
:
'
system
'
}],
[
3
,
{
name
:
"
测试结果分布
"
,
id
:
3
,
type
:
'
system
'
}],
[
4
,
{
name
:
"
自定义模块
"
,
id
:
4
,
type
:
'
custom
'
}]
]
)
}
},
methods
:
{
open
(
id
)
{
if
(
id
)
{
this
.
reportId
=
id
;
}
this
.
getReport
();
this
.
showDialog
=
true
;
},
getReport
()
{
this
.
result
=
this
.
$get
(
'
/case/report/get/
'
+
this
.
reportId
,
response
=>
{
this
.
report
=
response
.
data
;
this
.
report
.
content
=
JSON
.
parse
(
response
.
data
.
content
);
if
(
this
.
report
.
content
.
customComponent
)
{
this
.
report
.
content
.
customComponent
=
jsonToMap
(
this
.
report
.
content
.
customComponent
);
}
this
.
initPreviews
();
});
},
initPreviews
()
{
this
.
previews
=
[];
this
.
report
.
content
.
components
.
forEach
(
item
=>
{
let
preview
=
this
.
componentMap
.
get
(
item
);
if
(
preview
&&
preview
.
type
!=
'
custom
'
)
{
this
.
previews
.
push
(
preview
);
}
else
{
if
(
this
.
report
.
content
.
customComponent
)
{
let
customComponent
=
this
.
report
.
content
.
customComponent
.
get
(
item
.
toString
());
if
(
customComponent
)
{
this
.
previews
.
push
({
id
:
item
,
title
:
customComponent
.
title
,
content
:
customComponent
.
content
});
}
}
}
});
},
handleClose
()
{
this
.
showDialog
=
false
;
},
handleEdit
()
{
this
.
$refs
.
templateEdit
.
open
(
this
.
reportId
,
true
);
}
}
}
</
script
>
<
style
scoped
>
.el-main
{
height
:
calc
(
100vh
-
70px
);
width
:
100%
;
}
.head-bar
{
background
:
white
;
height
:
45px
;
line-height
:
45px
;
padding
:
0
10px
;
border
:
1px
solid
#EBEEF5
;
box-shadow
:
0
0
2px
0
rgba
(
31
,
31
,
31
,
0.15
),
0
1px
2px
0
rgba
(
31
,
31
,
31
,
0.15
);
}
.container
{
height
:
100vh
;
background
:
#F5F5F5
;
}
.el-card
{
width
:
70%
;
margin
:
5px
auto
;
}
.head-right
{
text-align
:
right
;
}
</
style
>
frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue
浏览文件 @
d511800c
...
...
@@ -11,7 +11,8 @@
<ms-table-button
icon=
"el-icon-connection"
:content=
"$t('test_track.plan_view.relevance_test_case')"
@
click=
"$emit('openTestCaseRelevanceDialog')"
/>
<ms-table-button
icon=
"el-icon-edit-outline"
:content=
"$t('test_track.plan_view.change_execution_results')"
@
click=
"handleBatch('status')"
/>
<ms-table-button
icon=
"el-icon-user"
:content=
"$t('test_track.plan_view.change_executor')"
@
click=
"handleBatch('executor')"
/>
<ms-table-button
icon=
"el-icon-document"
:content=
"$t('测试报告')"
@
click=
"openTestReport"
/>
<ms-table-button
v-if=
"!testPlan.reportId"
icon=
"el-icon-document"
:content=
"$t('创建测试报告')"
@
click=
"openTestReport"
/>
<ms-table-button
v-if=
"testPlan.reportId"
icon=
"el-icon-document"
:content=
"$t('查看测试报告')"
@
click=
"openReport"
/>
</
template
>
</ms-table-header>
</template>
...
...
@@ -107,6 +108,9 @@
@
refresh=
"refresh"
@
refreshTable=
"search"
/>
<test-report-template-list
@
openReport=
"openReport"
:plan-id=
"planId"
ref=
"testReporTtemplateList"
/>
<test-case-report-view
ref=
"testCaseReportView"
/>
</el-card>
</template>
...
...
@@ -128,10 +132,14 @@
import
MethodTableItem
from
"
../../../common/tableItems/planview/MethodTableItem
"
;
import
MsTableOperator
from
"
../../../../common/components/MsTableOperator
"
;
import
MsTableOperatorButton
from
"
../../../../common/components/MsTableOperatorButton
"
;
import
TestReportTemplateList
from
"
./TestReportTemplateList
"
;
import
TestCaseReportView
from
"
./TestCaseReportView
"
;
export
default
{
name
:
"
TestPlanTestCaseList
"
,
components
:
{
TestCaseReportView
,
TestReportTemplateList
,
MsTableOperatorButton
,
MsTableOperator
,
MethodTableItem
,
...
...
@@ -150,6 +158,7 @@
pageSize
:
10
,
total
:
0
,
selectIds
:
new
Set
(),
testPlan
:
{},
priorityFilters
:
[
{
text
:
'
P0
'
,
value
:
'
P0
'
},
{
text
:
'
P1
'
,
value
:
'
P1
'
},
...
...
@@ -186,13 +195,15 @@
},
watch
:
{
planId
()
{
this
.
getTestPlanById
();
this
.
initTableData
();
},
selectNodeIds
()
{
this
.
search
();
}
},
created
:
function
()
{
mounted
()
{
this
.
getTestPlanById
();
this
.
initTableData
();
},
methods
:
{
...
...
@@ -281,7 +292,20 @@
return
row
[
property
]
===
value
;
},
openTestReport
()
{
this
.
$refs
.
testReporTtemplateList
.
open
();
},
getTestPlanById
()
{
if
(
this
.
planId
)
{
this
.
$post
(
'
/test/plan/get/
'
+
this
.
planId
,
{},
response
=>
{
this
.
testPlan
=
response
.
data
;
});
}
},
openReport
(
id
)
{
if
(
!
id
)
{
id
=
this
.
testPlan
.
reportId
;
}
this
.
$refs
.
testCaseReportView
.
open
(
id
);
}
}
}
...
...
frontend/src/business/components/track/plan/view/comonents/TestReportTemplateList.vue
0 → 100644
浏览文件 @
d511800c
<
template
>
<el-dialog
:title=
"'选择模版'"
:visible.sync=
"templateVisible"
width=
"50%"
>
<el-main>
<testcase-template-item
v-for=
"item in templates"
:key=
"item.id"
:template=
"item"
@
templateEdit=
"createTemplate"
@
refresh=
"initData"
/>
</el-main>
</el-dialog>
</
template
>
<
script
>
import
TestcaseTemplateItem
from
"
../../../../settings/workspace/components/TestcaseTemplateItem
"
;
import
{
WORKSPACE_ID
}
from
"
../../../../../../common/js/constants
"
;
export
default
{
name
:
"
TestReportTemplateList
"
,
components
:
{
TestcaseTemplateItem
},
data
()
{
return
{
templateVisible
:
false
,
templates
:
[]
}
},
props
:
{
planId
:
{
type
:
String
}
},
methods
:
{
initData
()
{
let
condition
=
{};
condition
.
queryDefault
=
true
;
condition
.
workspaceId
=
localStorage
.
getItem
(
WORKSPACE_ID
);
this
.
result
=
this
.
$post
(
'
/case/report/template/list
'
,
condition
,
response
=>
{
this
.
templates
=
response
.
data
;
});
},
createTemplate
(
templateId
)
{
let
param
=
{};
param
.
planId
=
this
.
planId
;
param
.
templateId
=
templateId
;
this
.
$post
(
'
/case/report/add
'
,
param
,
response
=>
{
this
.
$emit
(
'
openReport
'
,
response
.
data
);
this
.
templateVisible
=
false
;
});
},
open
()
{
this
.
templateVisible
=
true
;
this
.
initData
();
}
}
}
</
script
>
<
style
scoped
>
.el-main
>>>
.testcase-template
:hover
i
{
display
:
none
;
}
</
style
>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录