Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
泰斯特Test
Taisite-Platform
提交
3090f109
T
Taisite-Platform
项目概览
泰斯特Test
/
Taisite-Platform
8 个月 前同步成功
通知
121
Star
28
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Taisite-Platform
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
3090f109
编写于
2月 21, 2021
作者:
泰斯特Test
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: add testData entry
上级
edf07bc5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
62 addition
and
0 deletion
+62
-0
frontend/src/views/interfaceTestProject/api/automation/CronList.vue
...rc/views/interfaceTestProject/api/automation/CronList.vue
+62
-0
未找到文件。
frontend/src/views/interfaceTestProject/api/automation/CronList.vue
浏览文件 @
3090f109
...
...
@@ -90,6 +90,15 @@
<el-option
v-for=
"(item,index) in Host"
:key=
"index"
:label=
"item.name"
:value=
"item.host"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"测试数据"
prop=
"globalVarsId"
>
<el-select
v-model=
"editForm.globalVarsId"
@
visible-change=
"checkActiveStorage"
clearable
auto-complete=
"off"
>
<el-option
v-for=
"(item,index) in TestDataStorage"
:key=
"index"
:label=
"item.name"
:value=
"item._id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"触发类型"
prop=
"triggerType"
>
<el-select
clearable
v-model.trim=
"editForm.triggerType"
@
change=
"editFormTriggerTypeChange"
auto-complete=
"off"
>
<el-option
v-for=
"(item,index) in TriggerTypes"
:key=
"index+''"
:label=
"item.name"
:value=
"item.value"
></el-option>
...
...
@@ -232,6 +241,15 @@
<el-option
v-for=
"(item,index) in Host"
:key=
"index"
:label=
"item.name"
:value=
"item.host"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"测试数据"
prop=
"globalVarsId"
>
<el-select
v-model=
"addForm.globalVarsId"
@
visible-change=
"checkActiveStorage"
clearable
auto-complete=
"off"
>
<el-option
v-for=
"(item,index) in TestDataStorage"
:key=
"index"
:label=
"item.name"
:value=
"item._id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"触发类型"
prop=
"triggerType"
>
<el-select
clearable
v-model.trim=
"addForm.triggerType"
auto-complete=
"off"
@
change=
"addFormTriggerTypeChange"
>
<el-option
v-for=
"(item,index) in TriggerTypes"
:key=
"index+''"
:label=
"item.name"
:value=
"item.value"
></el-option>
...
...
@@ -370,6 +388,7 @@
import
{
getCaseSuiteList
}
from
'
../../../../api/caseSuite
'
;
import
{
getHosts
}
from
"
../../../../api/host
"
;
import
{
getMails
}
from
'
../../../../api/mail
'
;
import
{
getTestDataStorageList
}
from
'
../../../../api/testDataStorage
'
;
import
{
getCrons
,
addCron
,
updateCron
,
pauseCron
,
resumeCron
,
delCron
}
from
"
../../../../api/cron
"
;
import
{
getCookie
}
from
"
@/utils/cookie
"
;
export
default
{
...
...
@@ -400,6 +419,7 @@
order
:
'
descending
'
,
pageNum
:
1
,
totalNum
:
0
,
TestDataStorage
:[],
sels
:
[],
//列表选中列
delLoading
:
false
,
disDel
:
true
,
...
...
@@ -421,6 +441,9 @@
testDomain
:
[
{
required
:
true
,
message
:
'
请选择测试环境
'
,
trigger
:
'
blur
'
}
],
globalVarsId
:
[
{
required
:
false
,
message
:
'
请选择测试数据
'
,
trigger
:
'
blur
'
}
],
alarmMailList
:
[
{
required
:
false
,
message
:
'
请选择告警邮箱
'
,
trigger
:
'
blur
'
}
],
...
...
@@ -451,6 +474,7 @@
testCaseSuiteIdList
:
[],
isExecuteForbiddenedCase
:
false
,
testDomain
:
''
,
globalVarsId
:
''
,
alarmMailList
:
[],
isDingDingNotify
:
false
,
dingdingNotifyStrategy
:
{
success
:
false
,
fail
:
true
},
...
...
@@ -476,6 +500,9 @@
testDomain
:
[
{
required
:
true
,
message
:
'
请选择测试环境
'
,
trigger
:
'
blur
'
}
],
globalVarsId
:
[
{
required
:
false
,
message
:
'
请选择测试数据
'
,
trigger
:
'
blur
'
}
],
alarmMailList
:
[
{
required
:
false
,
message
:
'
请选择告警邮箱
'
,
trigger
:
'
blur
'
}
],
...
...
@@ -506,6 +533,7 @@
testCaseSuiteIdList
:
[],
isExecuteForbiddenedCase
:
false
,
testDomain
:
''
,
globalVarsId
:
''
,
alarmMailList
:
[],
isDingDingNotify
:
false
,
dingdingNotifyStrategy
:
{
success
:
false
,
fail
:
true
},
...
...
@@ -529,6 +557,28 @@
}
},
methods
:
{
getTestDataStorage
(){
let
self
=
this
;
let
header
=
{};
let
params
=
{
status
:
true
,
projectId
:
self
.
$route
.
params
.
project_id
};
getTestDataStorageList
(
self
.
$route
.
params
.
project_id
,
params
,
header
).
then
((
res
)
=>
{
let
{
status
,
data
}
=
res
if
(
status
===
'
ok
'
){
self
.
TestDataStorage
=
data
.
rows
}
else
{
self
.
$message
.
error
({
message
:
data
,
center
:
true
,
})
}
}).
catch
((
error
)
=>
{
self
.
$message
.
error
({
message
:
'
暂时无法获取 TestDataStorage,请稍后刷新重试~
'
,
center
:
true
,
});
})
},
getHost
()
{
let
self
=
this
;
let
header
=
{};
...
...
@@ -718,6 +768,7 @@
name
:
self
.
addForm
.
name
,
testCaseSuiteIdList
:
self
.
addForm
.
testCaseSuiteIdList
,
testDomain
:
self
.
addForm
.
testDomain
,
globalVarsId
:
self
.
addForm
.
globalVarsId
,
isExecuteForbiddenedCase
:
self
.
addForm
.
isExecuteForbiddenedCase
,
triggerType
:
self
.
addForm
.
triggerType
,
description
:
self
.
addForm
.
description
,
...
...
@@ -798,6 +849,7 @@
testCaseSuiteIdList
:
self
.
editForm
.
testCaseSuiteIdList
,
isExecuteForbiddenedCase
:
self
.
editForm
.
isExecuteForbiddenedCase
,
testDomain
:
self
.
editForm
.
testDomain
,
globalVarsId
:
self
.
editForm
.
globalVarsId
,
triggerType
:
self
.
editForm
.
triggerType
,
next_run_time
:
self
.
editForm
.
next_run_time
,
// 用于判断是否要resume定时任务
description
:
self
.
editForm
.
description
,
...
...
@@ -1072,6 +1124,15 @@
})
}
},
checkActiveStorage
:
function
(){
let
self
=
this
;
if
(
self
.
TestDataStorage
.
length
<
1
){
self
.
$message
.
warning
({
message
:
'
未找到「启用的数据字典」哦, 请前往「数据仓库」进行设置
'
,
center
:
true
,
})
}
},
// 修改table tr行的背景色
reportRowStyle
({
row
,
rowIndex
}){
if
(
row
.
status
===
'
PAUSED
'
)
...
...
@@ -1087,6 +1148,7 @@
mounted
()
{
this
.
getCaseSuites
();
this
.
getHost
();
this
.
getTestDataStorage
();
this
.
getMail
();
this
.
getTask
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录