Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
8af9a73d
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,发现更多精彩内容 >>
提交
8af9a73d
编写于
6月 05, 2020
作者:
C
chenjianxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
api测试点击一行只读
上级
cb3b90a0
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
20 addition
and
10 deletion
+20
-10
frontend/src/business/components/api/test/ApiTestConfig.vue
frontend/src/business/components/api/test/ApiTestConfig.vue
+14
-9
frontend/src/business/components/api/test/ApiTestList.vue
frontend/src/business/components/api/test/ApiTestList.vue
+6
-1
未找到文件。
frontend/src/business/components/api/test/ApiTestConfig.vue
浏览文件 @
8af9a73d
...
...
@@ -5,27 +5,27 @@
<el-container
class=
"test-container"
v-loading=
"result.loading"
>
<el-header>
<el-row
type=
"flex"
align=
"middle"
>
<el-input
class=
"test-name"
v-model=
"test.name"
maxlength=
"60"
:placeholder=
"$t('api_test.input_name')"
<el-input
:disabled=
"isReadOnly"
class=
"test-name"
v-model=
"test.name"
maxlength=
"60"
:placeholder=
"$t('api_test.input_name')"
show-word-limit
>
<el-select
class=
"test-project"
v-model=
"test.projectId"
slot=
"prepend"
<el-select
:disabled=
"isReadOnly"
class=
"test-project"
v-model=
"test.projectId"
slot=
"prepend"
:placeholder=
"$t('api_test.select_project')"
>
<el-option
v-for=
"project in projects"
:key=
"project.id"
:label=
"project.name"
:value=
"project.id"
/>
</el-select>
</el-input>
<el-button
type=
"primary"
plain
:disabled=
"isDisabled"
@
click=
"saveTest"
>
<el-button
type=
"primary"
plain
:disabled=
"isDisabled
|| isReadOnly
"
@
click=
"saveTest"
>
{{
$t
(
'
commons.save
'
)
}}
</el-button>
<el-button
type=
"primary"
plain
v-if=
"!isShowRun"
:disabled=
"isDisabled"
@
click=
"saveRunTest"
>
<el-button
type=
"primary"
plain
v-if=
"!isShowRun"
:disabled=
"isDisabled
|| isReadOnly
"
@
click=
"saveRunTest"
>
{{
$t
(
'
load_test.save_and_run
'
)
}}
</el-button>
<el-button
type=
"primary"
plain
v-if=
"isShowRun"
@
click=
"runTest"
>
<el-button
:disabled=
"isReadOnly"
type=
"primary"
plain
v-if=
"isShowRun"
@
click=
"runTest"
>
{{
$t
(
'
api_test.run
'
)
}}
</el-button>
<el-button
type=
"warning"
plain
@
click=
"cancel"
>
{{
$t
(
'
commons.cancel
'
)
}}
</el-button>
<el-button
:disabled=
"isReadOnly"
type=
"warning"
plain
@
click=
"cancel"
>
{{
$t
(
'
commons.cancel
'
)
}}
</el-button>
<el-dropdown
trigger=
"click"
@
command=
"handleCommand"
>
<el-button
class=
"el-dropdown-link more"
icon=
"el-icon-more"
plain
/>
...
...
@@ -33,7 +33,7 @@
<el-dropdown-item
command=
"report"
:disabled=
"test.status !== 'Completed'"
>
{{
$t
(
'
api_report.title
'
)
}}
</el-dropdown-item>
<el-dropdown-item
command=
"performance"
:disabled=
"create"
>
<el-dropdown-item
command=
"performance"
:disabled=
"create
|| isReadOnly
"
>
{{
$t
(
'
api_test.create_performance_test
'
)
}}
</el-dropdown-item>
</el-dropdown-menu>
...
...
@@ -42,7 +42,7 @@
<ms-api-report-dialog
:test-id=
"id"
ref=
"reportDialog"
/>
</el-row>
</el-header>
<ms-api-scenario-config
:scenarios=
"test.scenarioDefinition"
ref=
"config"
/>
<ms-api-scenario-config
:
is-read-only=
"isReadOnly"
:
scenarios=
"test.scenarioDefinition"
ref=
"config"
/>
</el-container>
</el-card>
</div>
...
...
@@ -69,7 +69,8 @@
result
:
{},
projects
:
[],
change
:
false
,
test
:
new
Test
()
test
:
new
Test
(),
isReadOnly
:
false
}
},
...
...
@@ -86,6 +87,10 @@
methods
:
{
init
()
{
let
projectId
;
this
.
isReadOnly
=
false
;
if
(
this
.
$route
.
path
.
indexOf
(
'
/api/test/view
'
)
>=
0
)
{
this
.
isReadOnly
=
true
;
}
if
(
this
.
id
)
{
this
.
create
=
false
;
this
.
getTest
(
this
.
id
);
...
...
frontend/src/business/components/api/test/ApiTestList.vue
浏览文件 @
8af9a73d
...
...
@@ -7,7 +7,7 @@
:title=
"$t('commons.test')"
@
create=
"create"
:createTip=
"$t('load_test.create')"
/>
</
template
>
<el-table
:data=
"tableData"
class=
"table-content"
@
sort-change=
"sort"
@
row-click=
"handle
Edit
"
<el-table
:data=
"tableData"
class=
"table-content"
@
sort-change=
"sort"
@
row-click=
"handle
View
"
@
filter-change=
"filter"
>
<el-table-column
prop=
"name"
:label=
"$t('commons.name')"
width=
"250"
show-overflow-tooltip
>
</el-table-column>
...
...
@@ -124,6 +124,11 @@
path
:
'
/api/test/edit?id=
'
+
test
.
id
,
})
},
handleView
(
test
)
{
this
.
$router
.
push
({
path
:
'
/api/test/view?id=
'
+
test
.
id
,
})
},
handleDelete
(
test
)
{
this
.
$alert
(
this
.
$t
(
'
load_test.delete_confirm
'
)
+
test
.
name
+
"
?
"
,
''
,
{
confirmButtonText
:
this
.
$t
(
'
commons.confirm
'
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录