Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
f64d7a21
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,发现更多精彩内容 >>
提交
f64d7a21
编写于
10月 23, 2020
作者:
W
wenyann
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master'
上级
056ea0ae
1485bb06
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
39 addition
and
5 deletion
+39
-5
backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewMapper.xml
...o/metersphere/base/mapper/ext/ExtTestCaseReviewMapper.xml
+1
-1
frontend/src/business/components/api/test/components/ApiScenarioConfig.vue
...ness/components/api/test/components/ApiScenarioConfig.vue
+1
-1
frontend/src/business/components/api/test/components/ApiScenarioSelect.vue
...ness/components/api/test/components/ApiScenarioSelect.vue
+36
-2
frontend/src/business/components/xpack
frontend/src/business/components/xpack
+1
-1
未找到文件。
backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewMapper.xml
浏览文件 @
f64d7a21
...
...
@@ -70,6 +70,6 @@
from project, test_case_review_project
where project.id = test_case_review_project.project_id
and project.workspace_id = #{workspaceId}
and test_case_review_project.review_id = #{reviewId}
;
and test_case_review_project.review_id = #{reviewId}
</select>
</mapper>
\ No newline at end of file
frontend/src/business/components/api/test/components/ApiScenarioConfig.vue
浏览文件 @
f64d7a21
...
...
@@ -61,7 +61,7 @@
:request=
"selected"
:scenario=
"currentScenario"
v-if=
"isRequest"
/>
</div>
</el-main>
<ms-api-scenario-select
:exclude-id=
"test.id"
@
select=
"selectScenario"
ref=
"selectDialog"
/>
<ms-api-scenario-select
:exclude-id=
"test.id"
:project-id=
"test.projectId"
@
select=
"selectScenario"
ref=
"selectDialog"
/>
</el-container>
</template>
...
...
frontend/src/business/components/api/test/components/ApiScenarioSelect.vue
浏览文件 @
f64d7a21
...
...
@@ -43,6 +43,7 @@ import MsTableSearchBar from "@/business/components/common/components/MsTableSea
import
MsTableAdvSearchBar
from
"
@/business/components/common/components/search/MsTableAdvSearchBar
"
;
import
MsApiScenarioSelectSubTable
from
"
@/business/components/api/test/components/ApiScenarioSelectSubTable
"
;
import
{
Scenario
}
from
"
@/business/components/api/test/model/ScenarioModel
"
;
import
{
parseEnvironment
}
from
"
../model/EnvironmentModel
"
;
export
default
{
name
:
"
MsApiScenarioSelect
"
,
...
...
@@ -51,7 +52,8 @@ export default {
MsTableAdvSearchBar
,
MsTableSearchBar
,
MsTablePagination
,
MsTableHeader
},
props
:
{
excludeId
:
String
excludeId
:
String
,
projectId
:
String
},
data
()
{
return
{
...
...
@@ -64,6 +66,7 @@ export default {
pageSize
:
5
,
total
:
0
,
selection
:
false
,
environmentMap
:
new
Map
()
}
},
methods
:
{
...
...
@@ -94,19 +97,50 @@ export default {
}
scenarios
.
push
(
scenario
);
}
this
.
initScenarioEnvironment
(
scenarios
);
this
.
$emit
(
'
select
'
,
scenarios
);
},
getEnvironment
()
{
if
(
this
.
projectId
)
{
this
.
result
=
this
.
$get
(
'
/api/environment/list/
'
+
this
.
projectId
,
response
=>
{
let
environments
=
response
.
data
;
this
.
environmentMap
=
new
Map
();
environments
.
forEach
(
environment
=>
{
parseEnvironment
(
environment
);
this
.
environmentMap
.
set
(
environment
.
id
,
environment
);
});
});
}
},
initScenarioEnvironment
(
scenarios
)
{
scenarios
.
forEach
(
scenario
=>
{
if
(
scenario
.
environmentId
)
{
let
env
=
this
.
environmentMap
.
get
(
scenario
.
environmentId
);
if
(
!
env
)
{
scenario
.
environmentId
=
undefined
;
scenario
.
environment
=
undefined
;
}
else
{
scenario
.
environment
=
env
;
}
}
else
{
scenario
.
environmentId
=
undefined
;
scenario
.
environment
=
undefined
;
}
});
},
clone
(
row
)
{
let
scenarios
=
[];
row
.
selected
.
forEach
(
options
=>
{
// 去掉ID,创建新的ID
options
.
id
=
undefined
;
scenarios
.
push
(
new
Scenario
(
options
));
})
});
this
.
initScenarioEnvironment
(
scenarios
);
this
.
$emit
(
'
select
'
,
scenarios
);
},
open
()
{
this
.
search
();
this
.
getEnvironment
();
this
.
visible
=
true
;
},
close
()
{
...
...
xpack
@
cc38137a
比较
06d935cd
...
cc38137a
Subproject commit
06d935cd1d22ab36f09763745c2aff8ad3fb08c1
Subproject commit
cc38137a69a0f20fadece9c0f9f50a9468c4ace9
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录