Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
1bd6b771
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,发现更多精彩内容 >>
提交
1bd6b771
编写于
2月 19, 2020
作者:
H
haifeng414
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改ajax回调的使用方式
上级
19478566
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
43 addition
and
59 deletion
+43
-59
frontend/src/performance/components/testPlan/AllTestPlan.vue
frontend/src/performance/components/testPlan/AllTestPlan.vue
+10
-18
frontend/src/performance/components/testPlan/CreateTestPlan.vue
...nd/src/performance/components/testPlan/CreateTestPlan.vue
+17
-21
frontend/src/performance/components/testPlan/components/BasicConfig.vue
...erformance/components/testPlan/components/BasicConfig.vue
+16
-20
未找到文件。
frontend/src/performance/components/testPlan/AllTestPlan.vue
浏览文件 @
1bd6b771
...
...
@@ -101,14 +101,10 @@
name
:
this
.
condition
};
this
.
$post
(
this
.
buildPagePath
(
this
.
queryPath
),
param
).
then
(
response
=>
{
if
(
response
.
data
.
success
)
{
let
data
=
response
.
data
.
data
;
this
.
total
=
data
.
itemCount
;
this
.
tableData
=
data
.
listObject
;
}
else
{
this
.
$message
.
error
(
response
.
message
);
}
this
.
$post
(
this
.
buildPagePath
(
this
.
queryPath
),
param
,
response
=>
{
let
data
=
response
.
data
;
this
.
total
=
data
.
itemCount
;
this
.
tableData
=
data
.
listObject
;
})
},
search
()
{
...
...
@@ -151,16 +147,12 @@
id
:
testPlan
.
id
};
this
.
$post
(
this
.
deletePath
,
data
).
then
(
response
=>
{
if
(
response
.
data
.
success
)
{
this
.
$message
({
message
:
'
删除成功!
'
,
type
:
'
success
'
});
this
.
initTableData
();
}
else
{
this
.
$message
.
error
(
response
.
message
);
}
this
.
$post
(
this
.
deletePath
,
data
,
()
=>
{
this
.
$message
({
message
:
'
删除成功!
'
,
type
:
'
success
'
});
this
.
initTableData
();
});
},
}
...
...
frontend/src/performance/components/testPlan/CreateTestPlan.vue
浏览文件 @
1bd6b771
...
...
@@ -77,8 +77,8 @@
},
methods
:
{
listProjects
()
{
this
.
$get
(
this
.
listProjectPath
).
then
(
response
=>
{
this
.
projects
=
response
.
data
.
data
;
this
.
$get
(
this
.
listProjectPath
,
response
=>
{
this
.
projects
=
response
.
data
;
})
},
save
()
{
...
...
@@ -88,13 +88,11 @@
let
options
=
this
.
getSaveOption
();
this
.
$request
(
options
).
then
(
response
=>
{
if
(
response
)
{
this
.
$message
({
message
:
'
保存成功!
'
,
type
:
'
success
'
});
}
this
.
$request
(
options
,
()
=>
{
this
.
$message
({
message
:
'
保存成功!
'
,
type
:
'
success
'
});
});
},
saveAndRun
()
{
...
...
@@ -104,20 +102,18 @@
let
options
=
this
.
getSaveOption
();
this
.
$request
(
options
).
then
(
response
=>
{
if
(
response
)
{
this
.
$request
(
options
,
()
=>
{
this
.
$message
({
message
:
'
保存成功!
'
,
type
:
'
success
'
});
this
.
$post
(
this
.
runPath
,
{
id
:
this
.
testPlan
.
id
}).
then
(()
=>
{
this
.
$message
({
message
:
'
保存成功
!
'
,
message
:
'
正在运行
!
'
,
type
:
'
success
'
});
this
.
$post
(
this
.
runPath
,
{
id
:
this
.
testPlan
.
id
}).
then
(()
=>
{
this
.
$message
({
message
:
'
正在运行!
'
,
type
:
'
success
'
});
})
}
})
});
},
getSaveOption
()
{
...
...
@@ -135,7 +131,7 @@
type
:
"
application/json
"
}));
return
{
return
{
method
:
'
POST
'
,
url
:
url
,
data
:
formData
,
...
...
frontend/src/performance/components/testPlan/components/BasicConfig.vue
浏览文件 @
1bd6b771
...
...
@@ -72,8 +72,8 @@
},
methods
:
{
getFileMetadata
(
testPlan
)
{
this
.
$get
(
this
.
getFileMetadataPath
+
"
/
"
+
testPlan
.
id
).
then
(
response
=>
{
let
file
=
response
.
data
.
data
;
this
.
$get
(
this
.
getFileMetadataPath
+
"
/
"
+
testPlan
.
id
,
response
=>
{
let
file
=
response
.
data
;
this
.
testPlan
.
file
=
file
;
...
...
@@ -115,25 +115,21 @@
name
:
file
.
name
};
this
.
$post
(
this
.
jmxDownloadPath
,
data
).
then
(
response
=>
{
if
(
response
)
{
const
content
=
response
.
data
;
const
blob
=
new
Blob
([
content
]);
if
(
"
download
"
in
document
.
createElement
(
"
a
"
))
{
// 非IE下载
// chrome/firefox
let
aTag
=
document
.
createElement
(
'
a
'
);
aTag
.
download
=
file
.
name
;
aTag
.
href
=
URL
.
createObjectURL
(
blob
)
aTag
.
click
();
URL
.
revokeObjectURL
(
aTag
.
href
)
}
else
{
// IE10+下载
navigator
.
msSaveBlob
(
blob
,
this
.
filename
)
}
this
.
$post
(
this
.
jmxDownloadPath
,
data
,
response
=>
{
const
content
=
response
.
data
;
const
blob
=
new
Blob
([
content
]);
if
(
"
download
"
in
document
.
createElement
(
"
a
"
))
{
// 非IE下载
// chrome/firefox
let
aTag
=
document
.
createElement
(
'
a
'
);
aTag
.
download
=
file
.
name
;
aTag
.
href
=
URL
.
createObjectURL
(
blob
)
aTag
.
click
();
URL
.
revokeObjectURL
(
aTag
.
href
)
}
else
{
// IE10+下载
navigator
.
msSaveBlob
(
blob
,
this
.
filename
)
}
}).
catch
((
response
)
=>
{
this
.
$message
.
error
(
response
.
message
);
});
},
handleDelete
(
file
,
index
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录