Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
xiaofang li
MeterSphere
Commits
85a19bfc
Commit
85a19bfc
authored
3 years ago
by
shiziyuan9527
Committed by
刘瑞斌
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
fix: 停止接口用例执行时同时停止用例列表加载状态
parent
21b5655c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue
+3
-3
...components/api/definition/components/case/ApiCaseItem.vue
frontend/src/business/components/api/definition/components/case/ApiCaseList.vue
+5
-4
...components/api/definition/components/case/ApiCaseList.vue
frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue
+14
-1
...ents/api/definition/components/list/ApiCaseSimpleList.vue
with
22 additions
and
8 deletions
+22
-8
frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue
+
3
-
3
View file @
85a19bfc
...
...
@@ -82,7 +82,7 @@
<ms-tip-button
@
click=
"singleRun(apiCase)"
:tip=
"$t('api_test.run')"
icon=
"el-icon-video-play"
class=
"run-button"
size=
"mini"
:disabled=
"!apiCase.id"
circle
v-if=
"!loading"
/>
<el-tooltip
:content=
"$t('report.stop_btn')"
placement=
"top"
:enterable=
"false"
v-else
>
<el-button
:disabled=
"!apiCase.id"
@
click.once=
"stop"
size=
"mini"
style=
"color:white;padding: 0;width: 28px;height: 28px;"
class=
"stop-btn"
circle
>
<el-button
:disabled=
"!apiCase.id"
@
click.once=
"stop
(apiCase)
"
size=
"mini"
style=
"color:white;padding: 0;width: 28px;height: 28px;"
class=
"stop-btn"
circle
>
<div
style=
"transform: scale(0.72)"
>
<span
style=
"margin-left: -3.5px;font-weight: bold"
>
STOP
</span>
</div>
...
...
@@ -303,8 +303,8 @@ export default {
this
.
saveTestCase
(
data
);
this
.
$emit
(
'
singleRun
'
,
data
);
},
stop
()
{
this
.
$emit
(
'
stop
'
);
stop
(
data
)
{
this
.
$emit
(
'
stop
'
,
data
.
id
);
},
copyCase
(
data
)
{
if
(
data
&&
data
.
request
)
{
...
...
This diff is collapsed.
Click to expand it.
frontend/src/business/components/api/definition/components/case/ApiCaseList.vue
+
5
-
4
View file @
85a19bfc
...
...
@@ -424,12 +424,13 @@ export default {
this
.
$emit
(
"
refreshCase
"
,
row
.
id
);
},
stop
(
callback
)
{
stop
(
id
)
{
let
url
=
"
/api/automation/stop/
"
+
this
.
reportId
;
this
.
$get
(
url
,
()
=>
{
if
(
callback
)
{
callback
();
}
// if (callback) {
// callback();
// }
this
.
$emit
(
"
stop
"
,
id
);
this
.
singleLoading
=
false
;
this
.
$success
(
this
.
$t
(
'
report.test_stop_success
'
));
});
...
...
This diff is collapsed.
Click to expand it.
frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue
+
14
-
1
View file @
85a19bfc
...
...
@@ -162,7 +162,7 @@
:total=
"total"
/>
</div>
<api-case-list
@
showExecResult=
"showExecResult"
@
refreshCase=
"initTable"
:currentApi=
"selectCase"
ref=
"caseList"
/>
<api-case-list
@
showExecResult=
"showExecResult"
@
refreshCase=
"initTable"
:currentApi=
"selectCase"
ref=
"caseList"
@
stop=
"stop"
/>
<!--批量编辑-->
<ms-batch-edit
ref=
"batchEdit"
:data-count=
"$refs.caseTable ? $refs.caseTable.selectDataCounts : 0"
@
batchEdit=
"batchEdit"
:typeArr=
"typeArr"
:value-arr=
"valueArr"
/>
<!--选择环境(当创建性能测试的时候)-->
...
...
@@ -927,6 +927,19 @@ export default {
}
return
returnObj
;
},
stop
(
id
)
{
for
(
let
item
of
this
.
tableData
)
{
if
(
id
&&
id
===
item
.
id
)
{
// 获取执行前结果
this
.
$get
(
'
/api/testcase/get/
'
+
id
,
res
=>
{
if
(
res
)
{
item
.
status
=
res
.
data
.
status
;
}
})
break
;
}
}
},
createPerformance
(
row
,
environment
)
{
/**
* 思路:调用后台创建性能测试的方法,把当前案例的hashTree在后台转化为jmx并文件创建性能测试。
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help