Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-platform-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qa-platform-ui
Commits
b633c278
Commit
b633c278
authored
Jun 21, 2021
by
晓彤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交添加导入参数功能
parent
9be79da3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
137 additions
and
92 deletions
+137
-92
main.js
src/main.js
+1
-0
AddCase.vue
src/views/auto/AddCase.vue
+25
-25
AddInterface.vue
src/views/auto/AddInterface.vue
+61
-27
EditScene.vue
src/views/auto/EditScene.vue
+48
-38
Notify.vue
src/views/jira/Notify.vue
+2
-2
No files found.
src/main.js
View file @
b633c278
...
@@ -95,6 +95,7 @@ Vue.use(Radio)
...
@@ -95,6 +95,7 @@ Vue.use(Radio)
Vue
.
use
(
Row
)
Vue
.
use
(
Row
)
Vue
.
use
(
Col
)
Vue
.
use
(
Col
)
Vue
.
use
(
JsonViewer
)
Vue
.
use
(
JsonViewer
)
// Vue.use(Sortable)
// Vue.use(Sortable)
/* eslint-disable no-new */
/* eslint-disable no-new */
new
Vue
({
new
Vue
({
...
...
src/views/auto/AddCase.vue
View file @
b633c278
...
@@ -21,21 +21,21 @@
...
@@ -21,21 +21,21 @@
<el-collapse-item
name=
"1"
title=
"请求头"
>
<el-collapse-item
name=
"1"
title=
"请求头"
>
<el-form-item>
<el-form-item>
<el-row>
<el-row>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
5
"
>
<div
class=
"grid-content"
style=
"margin-left:1
5
px"
>
参数名称
</div>
<div
class=
"grid-content"
style=
"margin-left:1
00
px"
>
参数名称
</div>
</el-col>
</el-col>
<el-col
:span=
"
10
"
>
<el-col
:span=
"
8
"
>
<div
class=
"grid-content"
style=
"margin-left:1
5
px"
>
参数值
</div>
<div
class=
"grid-content"
style=
"margin-left:1
80
px"
>
参数值
</div>
</el-col>
</el-col>
<el-col
:span=
"2"
>
<el-col
:span=
"2"
>
<div
class=
"grid-content"
style=
"margin-left:
25
px"
>
操作
</div>
<div
class=
"grid-content"
style=
"margin-left:
40
px"
>
操作
</div>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
v-for=
"(item,index) in headersList"
:key=
"index"
>
<el-row
v-for=
"(item,index) in headersList"
:key=
"index"
>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
5
"
>
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入参数名称"
></el-input>
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入参数名称"
></el-input>
</el-col>
</el-col>
<el-col
:span=
"
10
"
>
<el-col
:span=
"
8
"
>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入参数值"
type=
"textarea"
autosize
></el-input>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入参数值"
type=
"textarea"
autosize
></el-input>
</el-col>
</el-col>
<el-col
:span=
"2"
>
<el-col
:span=
"2"
>
...
@@ -49,21 +49,21 @@
...
@@ -49,21 +49,21 @@
<el-collapse-item
name=
"2"
title=
"请求参数"
>
<el-collapse-item
name=
"2"
title=
"请求参数"
>
<el-form-item>
<el-form-item>
<el-row>
<el-row>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
5
"
>
<div
class=
"grid-content"
style=
"margin-left:1
5
px"
>
参数名称
</div>
<div
class=
"grid-content"
style=
"margin-left:1
00
px"
>
参数名称
</div>
</el-col>
</el-col>
<el-col
:span=
"
10
"
>
<el-col
:span=
"
8
"
>
<div
class=
"grid-content"
style=
"margin-left:1
5
px"
>
参数值
</div>
<div
class=
"grid-content"
style=
"margin-left:1
80
px"
>
参数值
</div>
</el-col>
</el-col>
<el-col
:span=
"2"
>
<el-col
:span=
"2"
>
<div
class=
"grid-content"
style=
"margin-left:
25
px"
>
操作
</div>
<div
class=
"grid-content"
style=
"margin-left:
40
px"
>
操作
</div>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
v-for=
"(item,index) in requestParamsList"
:key=
"index"
>
<el-row
v-for=
"(item,index) in requestParamsList"
:key=
"index"
>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
5
"
>
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入参数名称"
></el-input>
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入参数名称"
></el-input>
</el-col>
</el-col>
<el-col
:span=
"
10
"
>
<el-col
:span=
"
8
"
>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入参数值"
type=
"textarea"
autosize
></el-input>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入参数值"
type=
"textarea"
autosize
></el-input>
</el-col>
</el-col>
<el-col
:span=
"2"
>
<el-col
:span=
"2"
>
...
@@ -77,21 +77,21 @@
...
@@ -77,21 +77,21 @@
<el-collapse-item
name=
"3"
title=
"响应提取"
>
<el-collapse-item
name=
"3"
title=
"响应提取"
>
<el-form-item>
<el-form-item>
<el-row>
<el-row>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
5
"
>
<div
class=
"grid-content"
style=
"margin-left:1
5
px"
>
变量名称
</div>
<div
class=
"grid-content"
style=
"margin-left:1
00
px"
>
变量名称
</div>
</el-col>
</el-col>
<el-col
:span=
"
10
"
>
<el-col
:span=
"
8
"
>
<div
class=
"grid-content"
style=
"margin-left:1
5
px"
>
json表达式/正则表达式
</div>
<div
class=
"grid-content"
style=
"margin-left:1
60
px"
>
json表达式/正则表达式
</div>
</el-col>
</el-col>
<el-col
:span=
"2"
>
<el-col
:span=
"2"
>
<div
class=
"grid-content"
style=
"margin-left:
25
px"
>
操作
</div>
<div
class=
"grid-content"
style=
"margin-left:
40
px"
>
操作
</div>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
v-for=
"(item,index) in responseList"
:key=
"index"
>
<el-row
v-for=
"(item,index) in responseList"
:key=
"index"
>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
5
"
>
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入变量名称"
></el-input>
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入变量名称"
></el-input>
</el-col>
</el-col>
<el-col
:span=
"
10
"
>
<el-col
:span=
"
8
"
>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入表达式"
type=
"textarea"
autosize
></el-input>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入表达式"
type=
"textarea"
autosize
></el-input>
</el-col>
</el-col>
<el-col
:span=
"2"
>
<el-col
:span=
"2"
>
...
@@ -104,26 +104,26 @@
...
@@ -104,26 +104,26 @@
<!-- 断言 -->
<!-- 断言 -->
<el-collapse-item
name=
"4"
title=
"结果断言"
>
<el-collapse-item
name=
"4"
title=
"结果断言"
>
<el-table
:data=
"assertionList"
border
style=
"width:100%;margin-top: 15px;"
>
<el-table
:data=
"assertionList"
border
style=
"width:100%;margin-top: 15px;"
>
<el-table-column
label=
"Json表达式"
width=
"350"
>
<el-table-column
label=
"Json表达式"
width=
"350"
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.check"
>
<el-input
v-model=
"scope.row.check"
>
</el-input>
</el-input>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"比较符"
width=
"250"
>
<el-table-column
label=
"比较符"
width=
"250"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-select
v-model=
"scope.row.comparator"
placeholder=
"请选择"
>
<el-select
v-model=
"scope.row.comparator"
placeholder=
"请选择"
>
<el-option
v-for=
"item in selectAssertionList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
<el-option
v-for=
"item in selectAssertionList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-select>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"预期结果"
width=
"350"
>
<el-table-column
label=
"预期结果"
width=
"350"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.expect"
>
<el-input
v-model=
"scope.row.expect"
>
</el-input>
</el-input>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
>
<el-table-column
label=
"操作"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"danger"
icon=
"el-icon-delete"
@
click=
"AssertionDelete(scope.$index)"
style=
"height:40px"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"danger"
icon=
"el-icon-delete"
@
click=
"AssertionDelete(scope.$index)"
style=
"height:40px"
>
删除
</el-button>
</
template
>
</
template
>
...
...
src/views/auto/AddInterface.vue
View file @
b633c278
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
</el-collapse-item>
</el-collapse-item>
<!-- Headers添加 -->
<!-- Headers添加 -->
<el-collapse-item
title=
"请求头"
name=
"2"
>
<el-collapse-item
title=
"请求头"
name=
"2"
>
<el-button
type=
"primary"
@
click=
"DialogVisible=true"
style=
"margin-top:10px"
>
导 入
</el-button>
<!-- Header参数添加 -->
<!-- Header参数添加 -->
<el-table
:data=
"headersList"
border
style=
"width:100%;margin-top:15px;"
>
<el-table
:data=
"headersList"
border
style=
"width:100%;margin-top:15px;"
>
<el-table-column
label=
"参数名称"
width=
"200"
>
<el-table-column
label=
"参数名称"
width=
"200"
>
...
@@ -57,7 +58,7 @@
...
@@ -57,7 +58,7 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"是否必填"
width=
"150"
style=
"text-align:center"
>
<el-table-column
label=
"是否必填"
width=
"150"
style=
"text-align:center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.row.isRequired"
active-color=
"#13ce66"
inactive-color=
"#A9A9A9"
active-text=
"是"
inactive-text=
"否"
@
change=
"changeState($event,'1')
"
></el-switch>
<el-switch
v-model=
"scope.row.isRequired"
active-color=
"#13ce66"
inactive-color=
"#A9A9A9"
active-text=
"是"
inactive-text=
"否"
:active-value=
"true"
:inactive-value=
"false
"
></el-switch>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"备注"
width=
"250"
>
<el-table-column
label=
"备注"
width=
"250"
>
...
@@ -67,7 +68,7 @@
...
@@ -67,7 +68,7 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"danger"
size=
"mini"
icon=
"el-icon-delete"
@
click=
"headerDelete(scope.$index)"
>
删除
</el-button>
<el-button
type=
"danger"
size=
"mini"
icon=
"el-icon-delete"
@
click=
"headerDelete(scope.$index)"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -90,7 +91,7 @@
...
@@ -90,7 +91,7 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"是否必填"
width=
"150"
style=
"text-align:center"
>
<el-table-column
label=
"是否必填"
width=
"150"
style=
"text-align:center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.row.isRequired"
active-color=
"#13ce66"
inactive-color=
"#A9A9A9"
active-text=
"是"
inactive-text=
"否"
@
change=
"changeState($event,'2')
"
></el-switch>
<el-switch
v-model=
"scope.row.isRequired"
active-color=
"#13ce66"
inactive-color=
"#A9A9A9"
active-text=
"是"
inactive-text=
"否"
:active-value=
"true"
:inactive-value=
"false
"
></el-switch>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"备注"
width=
"250"
>
<el-table-column
label=
"备注"
width=
"250"
>
...
@@ -123,7 +124,7 @@
...
@@ -123,7 +124,7 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"是否必填"
width=
"150"
style=
"text-align:center"
>
<el-table-column
label=
"是否必填"
width=
"150"
style=
"text-align:center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.row.isRequired"
active-color=
"#13ce66"
inactive-color=
"#A9A9A9"
active-text=
"是"
inactive-text=
"否"
@
change=
"changeState($event,'3')
"
></el-switch>
<el-switch
v-model=
"scope.row.isRequired"
active-color=
"#13ce66"
inactive-color=
"#A9A9A9"
active-text=
"是"
inactive-text=
"否"
:active-value=
"true"
:inactive-value=
"false
"
></el-switch>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"备注"
width=
"250"
>
<el-table-column
label=
"备注"
width=
"250"
>
...
@@ -146,6 +147,18 @@
...
@@ -146,6 +147,18 @@
<el-button
type=
"primary"
@
click=
"addInterfaceFrom"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"addInterfaceFrom"
>
确 定
</el-button>
</div>
</div>
<el-dialog
title=
"解析CURL"
:visible.sync=
"DialogVisible"
width=
"40%"
>
<el-form>
<el-form-item
label=
"接口路径:"
>
<el-input
v-model=
"interfaceUrl"
style=
"width:500px"
type=
"textarea"
:rows=
"8"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"DialogVisible=false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"importMsg"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -153,7 +166,8 @@
...
@@ -153,7 +166,8 @@
import
{
import
{
getModulList
,
getModulList
,
addInterface
,
addInterface
,
editInterface
editInterface
,
getInterfaceUrl
}
from
'
@/api/getAotoInterface
'
}
from
'
@/api/getAotoInterface
'
export
default
{
export
default
{
data
()
{
data
()
{
...
@@ -242,7 +256,9 @@ export default {
...
@@ -242,7 +256,9 @@ export default {
moduleInfo
:
{
moduleInfo
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
100
pageSize
:
100
}
},
DialogVisible
:
false
,
interfaceUrl
:
''
}
}
},
},
created
()
{
created
()
{
...
@@ -288,7 +304,7 @@ export default {
...
@@ -288,7 +304,7 @@ export default {
paramsName
:
''
,
paramsName
:
''
,
paramsValue
:
''
,
paramsValue
:
''
,
isRequired
:
true
,
isRequired
:
true
,
examples
:
''
,
//
examples: '',
remarks
:
''
remarks
:
''
})
})
},
},
...
@@ -297,7 +313,7 @@ export default {
...
@@ -297,7 +313,7 @@ export default {
paramsName
:
''
,
paramsName
:
''
,
paramsValue
:
''
,
paramsValue
:
''
,
isRequired
:
true
,
isRequired
:
true
,
examples
:
''
,
//
examples: '',
remarks
:
''
remarks
:
''
})
})
},
},
...
@@ -306,7 +322,7 @@ export default {
...
@@ -306,7 +322,7 @@ export default {
paramsName
:
''
,
paramsName
:
''
,
paramsValue
:
''
,
paramsValue
:
''
,
isRequired
:
true
,
isRequired
:
true
,
examples
:
''
,
//
examples: '',
remarks
:
''
remarks
:
''
})
})
},
},
...
@@ -322,24 +338,6 @@ export default {
...
@@ -322,24 +338,6 @@ export default {
responseDelete
(
index
)
{
responseDelete
(
index
)
{
this
.
responseList
.
splice
(
index
,
1
)
this
.
responseList
.
splice
(
index
,
1
)
},
},
// 状态按钮
changeState
(
e
,
str
)
{
if
(
e
===
true
&&
str
===
'
1
'
)
{
this
.
headersList
.
isRequired
=
e
}
else
{
this
.
headersList
.
isRequired
=
e
}
if
(
e
===
true
&&
str
===
'
2
'
)
{
this
.
paramList
.
isRequired
=
e
}
else
{
this
.
paramList
.
isRequired
=
e
}
if
(
e
===
true
&&
str
===
'
3
'
)
{
this
.
responseList
.
isRequired
=
e
}
else
{
this
.
responseList
.
isRequired
=
e
}
},
// 刷新列表
// 刷新列表
sendResh
()
{
sendResh
()
{
// bus使用
// bus使用
...
@@ -398,6 +396,42 @@ export default {
...
@@ -398,6 +396,42 @@ export default {
cancelInterfaceFrom
()
{
cancelInterfaceFrom
()
{
// 返回列表页
// 返回列表页
this
.
$router
.
push
(
'
InterfaceList
'
)
this
.
$router
.
push
(
'
InterfaceList
'
)
},
// 导入heads和请求参数
importMsg
()
{
getInterfaceUrl
({
code
:
this
.
interfaceUrl
}).
then
((
resp
)
=>
{
// console.log('iiii', resp)
var
newHeaderList
=
resp
.
data
.
data
.
headersList
newHeaderList
.
map
((
item
)
=>
{
this
.
headersList
.
push
(
Object
.
assign
(
{},
{
paramsName
:
item
.
paramsName
,
paramsValue
:
item
.
paramsValue
,
isRequired
:
true
,
remarks
:
item
.
remarks
}
)
)
})
var
newParamList
=
resp
.
data
.
data
.
parametersList
newParamList
.
map
((
item
)
=>
{
this
.
paramList
.
push
(
Object
.
assign
(
{},
{
paramsName
:
item
.
paramsName
,
paramsValue
:
item
.
paramsValue
,
isRequired
:
true
,
remarks
:
item
.
remarks
}
)
)
})
this
.
DialogVisible
=
false
})
}
}
}
}
}
}
...
...
src/views/auto/EditScene.vue
View file @
b633c278
...
@@ -110,25 +110,25 @@
...
@@ -110,25 +110,25 @@
<el-collapse-item
name=
"1"
title=
"前置条件"
>
<el-collapse-item
name=
"1"
title=
"前置条件"
>
<el-form-item>
<el-form-item>
<el-table
:data=
"preActionList"
border
style=
"width:100%;margin-top: 15px;"
>
<el-table
:data=
"preActionList"
border
style=
"width:100%;margin-top: 15px;"
>
<el-table-column
label=
"数据库"
width=
"150"
>
<el-table-column
label=
"数据库"
width=
"150"
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.db"
>
<el-input
v-model=
"scope.row.db"
>
</el-input>
</el-input>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"sql语句"
width=
"600"
>
<el-table-column
label=
"sql语句"
width=
"600"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.sql"
>
<el-input
v-model=
"scope.row.sql"
>
</el-input>
</el-input>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"Key值"
width=
"100"
>
<el-table-column
label=
"Key值"
width=
"100"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.key"
>
<el-input
v-model=
"scope.row.key"
>
</el-input>
</el-input>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
>
<el-table-column
label=
"操作"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"danger"
icon=
"el-icon-delete"
@
click=
"PreActionDelete(scope.$index)"
style=
"height:40px"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"danger"
icon=
"el-icon-delete"
@
click=
"PreActionDelete(scope.$index)"
style=
"height:40px"
>
删除
</el-button>
</
template
>
</
template
>
...
@@ -141,24 +141,24 @@
...
@@ -141,24 +141,24 @@
<el-collapse-item
name=
"2"
title=
"请求头"
>
<el-collapse-item
name=
"2"
title=
"请求头"
>
<el-form-item>
<el-form-item>
<el-row>
<el-row>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
8
"
>
<div
class=
"grid-content"
style=
"margin-left:1
5
px"
>
参数名称
</div>
<div
class=
"grid-content"
style=
"margin-left:1
00
px"
>
参数名称
</div>
</el-col>
</el-col>
<el-col
:span=
"1
0
"
>
<el-col
:span=
"1
2
"
>
<div
class=
"grid-content"
style=
"margin-left:1
5
px"
>
参数值
</div>
<div
class=
"grid-content"
style=
"margin-left:1
80
px"
>
参数值
</div>
</el-col>
</el-col>
<el-col
:span=
"
2
"
>
<el-col
:span=
"
4
"
>
<div
class=
"grid-content"
style=
"margin-left:
25
px"
>
操作
</div>
<div
class=
"grid-content"
style=
"margin-left:
40
px"
>
操作
</div>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
v-for=
"(item,index) in headersList"
:key=
"index"
>
<el-row
v-for=
"(item,index) in headersList"
:key=
"index"
>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
8
"
>
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入参数名称"
></el-input>
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入参数名称"
></el-input>
</el-col>
</el-col>
<el-col
:span=
"1
0
"
>
<el-col
:span=
"1
2
"
>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入参数值"
type=
"textarea"
autosize
></el-input>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入参数值"
type=
"textarea"
autosize
></el-input>
</el-col>
</el-col>
<el-col
:span=
"
2
"
>
<el-col
:span=
"
4
"
>
<el-button
size=
"mini"
type=
"danger"
@
click=
"advanceDelss(index)"
icon=
"el-icon-delete"
style=
"height:40px;margin-left:20px"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"danger"
@
click=
"advanceDelss(index)"
icon=
"el-icon-delete"
style=
"height:40px;margin-left:20px"
>
删除
</el-button>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -169,24 +169,24 @@
...
@@ -169,24 +169,24 @@
<el-collapse-item
name=
"3"
title=
"请求参数"
>
<el-collapse-item
name=
"3"
title=
"请求参数"
>
<el-form-item>
<el-form-item>
<el-row>
<el-row>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
8
"
>
<div
class=
"grid-content"
style=
"margin-left:1
5
px"
>
参数名称
</div>
<div
class=
"grid-content"
style=
"margin-left:1
00
px"
>
参数名称
</div>
</el-col>
</el-col>
<el-col
:span=
"1
0
"
>
<el-col
:span=
"1
2
"
>
<div
class=
"grid-content"
style=
"margin-left:1
5
px"
>
参数值
</div>
<div
class=
"grid-content"
style=
"margin-left:1
80
px"
>
参数值
</div>
</el-col>
</el-col>
<el-col
:span=
"
2
"
>
<el-col
:span=
"
4
"
>
<div
class=
"grid-content"
style=
"margin-left:
25
px"
>
操作
</div>
<div
class=
"grid-content"
style=
"margin-left:
40
px"
>
操作
</div>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
v-for=
"(item,index) in requestParamsList"
:key=
"index"
>
<el-row
v-for=
"(item,index) in requestParamsList"
:key=
"index"
>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
8
"
>
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入参数名称"
></el-input>
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入参数名称"
></el-input>
</el-col>
</el-col>
<el-col
:span=
"1
0
"
>
<el-col
:span=
"1
2
"
>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入参数值"
type=
"textarea"
autosize
></el-input>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入参数值"
type=
"textarea"
autosize
></el-input>
</el-col>
</el-col>
<el-col
:span=
"
2
"
>
<el-col
:span=
"
4
"
>
<el-button
size=
"mini"
type=
"danger"
@
click=
"requestParamsDel(index)"
icon=
"el-icon-delete"
style=
"height:40px;margin-left:20px"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"danger"
@
click=
"requestParamsDel(index)"
icon=
"el-icon-delete"
style=
"height:40px;margin-left:20px"
>
删除
</el-button>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -197,24 +197,24 @@
...
@@ -197,24 +197,24 @@
<el-collapse-item
name=
"4"
title=
"响应提取"
>
<el-collapse-item
name=
"4"
title=
"响应提取"
>
<el-form-item>
<el-form-item>
<el-row>
<el-row>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
8
"
>
<div
class=
"grid-content"
style=
"margin-left:1
5
px"
>
变量名称
</div>
<div
class=
"grid-content"
style=
"margin-left:1
00
px"
>
变量名称
</div>
</el-col>
</el-col>
<el-col
:span=
"1
0
"
>
<el-col
:span=
"1
2
"
>
<div
class=
"grid-content"
style=
"margin-left:1
5
px"
>
json路径表达式
</div>
<div
class=
"grid-content"
style=
"margin-left:1
80
px"
>
json路径表达式
</div>
</el-col>
</el-col>
<el-col
:span=
"
2
"
>
<el-col
:span=
"
4
"
>
<div
class=
"grid-content"
style=
"margin-left:
25
px"
>
操作
</div>
<div
class=
"grid-content"
style=
"margin-left:
40
px"
>
操作
</div>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
v-for=
"(item,index) in responseList"
:key=
"index"
>
<el-row
v-for=
"(item,index) in responseList"
:key=
"index"
>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
8
"
>
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入变量名称"
></el-input>
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入变量名称"
></el-input>
</el-col>
</el-col>
<el-col
:span=
"1
0
"
>
<el-col
:span=
"1
2
"
>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入表达式"
type=
"textarea"
autosize
></el-input>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入表达式"
type=
"textarea"
autosize
></el-input>
</el-col>
</el-col>
<el-col
:span=
"
2
"
>
<el-col
:span=
"
4
"
>
<el-button
size=
"mini"
type=
"danger"
@
click=
"responeDel(index)"
icon=
"el-icon-delete"
style=
"height:40px;margin-left:20px"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"danger"
@
click=
"responeDel(index)"
icon=
"el-icon-delete"
style=
"height:40px;margin-left:20px"
>
删除
</el-button>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -224,20 +224,20 @@
...
@@ -224,20 +224,20 @@
<!-- 断言 -->
<!-- 断言 -->
<el-collapse-item
name=
"5"
title=
"结果断言"
>
<el-collapse-item
name=
"5"
title=
"结果断言"
>
<el-table
:data=
"assertionList"
border
style=
"width:100%;margin-top: 15px;"
>
<el-table
:data=
"assertionList"
border
style=
"width:100%;margin-top: 15px;"
>
<el-table-column
label=
"Json表达式"
width=
"300"
>
<el-table-column
label=
"Json表达式"
width=
"300"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.check"
>
<el-input
v-model=
"scope.row.check"
>
</el-input>
</el-input>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"比较符"
width=
"250"
>
<el-table-column
label=
"比较符"
width=
"250"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-select
v-model=
"scope.row.comparator"
placeholder=
"请选择"
>
<el-select
v-model=
"scope.row.comparator"
placeholder=
"请选择"
>
<el-option
v-for=
"item in selectAssertionList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
<el-option
v-for=
"item in selectAssertionList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-select>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"预期结果"
width=
"300"
>
<el-table-column
label=
"预期结果"
width=
"300"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.expect"
>
<el-input
v-model=
"scope.row.expect"
>
</el-input>
</el-input>
...
@@ -254,7 +254,7 @@
...
@@ -254,7 +254,7 @@
</el-collapse>
</el-collapse>
<div
style=
"margin-top:20px;margin-left:600px"
>
<div
style=
"margin-top:20px;margin-left:600px"
>
<el-button
@
click=
"cancelCaseFrom"
>
取 消
</el-button>
<el-button
@
click=
"cancelCaseFrom"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"addCaseFrom"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"addCaseFrom"
>
确 定
</el-button>
</div>
</div>
</el-form>
</el-form>
</el-dialog>
</el-dialog>
...
@@ -400,7 +400,13 @@ export default {
...
@@ -400,7 +400,13 @@ export default {
}
}
],
],
globalParamList
:
[],
globalParamList
:
[],
preActionList
:
[]
preActionList
:
[],
loadingOptions
:
{
text
:
'
数据保存中...
'
,
lock
:
true
,
spinner
:
'
el-icon-loading
'
,
background
:
'
rgba(0,0,0,0.7)
'
}
}
}
},
},
created
()
{
created
()
{
...
@@ -519,7 +525,7 @@ export default {
...
@@ -519,7 +525,7 @@ export default {
// 编辑场景用例
// 编辑场景用例
editeSceneFrom
(
row
)
{
editeSceneFrom
(
row
)
{
console
.
log
(
'
6666
'
,
row
)
//
console.log('6666', row)
this
.
editDialogVisible
=
true
this
.
editDialogVisible
=
true
this
.
sceneCaseForm
.
sequence
=
row
.
sequence
this
.
sceneCaseForm
.
sequence
=
row
.
sequence
this
.
sceneCaseForm
.
interfaceId
=
row
.
interfaceId
this
.
sceneCaseForm
.
interfaceId
=
row
.
interfaceId
...
@@ -564,6 +570,7 @@ export default {
...
@@ -564,6 +570,7 @@ export default {
},
},
// 保存场景用例方法
// 保存场景用例方法
addSceneCaseFrom
()
{
addSceneCaseFrom
()
{
const
tLoading
=
this
.
$loading
.
service
(
this
.
loadingOptions
)
var
index
=
1
var
index
=
1
this
.
sceneTestcaseList
.
forEach
((
item
)
=>
{
this
.
sceneTestcaseList
.
forEach
((
item
)
=>
{
item
.
sequence
=
index
item
.
sequence
=
index
...
@@ -576,7 +583,6 @@ export default {
...
@@ -576,7 +583,6 @@ export default {
})
})
// 将对象转化为json
// 将对象转化为json
this
.
newSceneForm
.
globalParameters
=
JSON
.
stringify
(
globalObj
)
this
.
newSceneForm
.
globalParameters
=
JSON
.
stringify
(
globalObj
)
this
.
newSceneForm
.
sceneId
=
this
.
sceneCaseInfo
.
sceneId
this
.
newSceneForm
.
sceneId
=
this
.
sceneCaseInfo
.
sceneId
this
.
newSceneForm
.
sceneTestcaseList
=
this
.
sceneTestcaseList
this
.
newSceneForm
.
sceneTestcaseList
=
this
.
sceneTestcaseList
// console.log('保存传递的参数值', this.newSceneForm)
// console.log('保存传递的参数值', this.newSceneForm)
...
@@ -585,6 +591,9 @@ export default {
...
@@ -585,6 +591,9 @@ export default {
return
false
return
false
}
else
{
}
else
{
addSceneCase
(
this
.
newSceneForm
).
then
((
resp
)
=>
{
addSceneCase
(
this
.
newSceneForm
).
then
((
resp
)
=>
{
if
(
resp
!==
null
)
{
tLoading
.
close
()
}
if
(
resp
.
data
.
data
===
true
)
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
$message
.
success
(
'
保存成功!
'
)
this
.
$message
.
success
(
'
保存成功!
'
)
// 返回列表页
// 返回列表页
...
@@ -592,6 +601,7 @@ export default {
...
@@ -592,6 +601,7 @@ export default {
// 刷新列表页
// 刷新列表页
this
.
sendResh
()
this
.
sendResh
()
}
else
{
}
else
{
tLoading
.
close
()
this
.
$message
.
error
(
resp
.
data
.
msg
)
this
.
$message
.
error
(
resp
.
data
.
msg
)
}
}
})
})
...
...
src/views/jira/Notify.vue
View file @
b633c278
...
@@ -169,14 +169,14 @@
...
@@ -169,14 +169,14 @@
<el-row
v-for=
"(item, index) in editPipelineForm.pipelineList"
:key=
"index"
>
<el-row
v-for=
"(item, index) in editPipelineForm.pipelineList"
:key=
"index"
>
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
<div
style=
"text-align: center;margin-top:5px"
>
<div
style=
"text-align: center;margin-top:5px"
>
<el-select
v-model=
"item.serviceName"
placeholder=
"请选择服务"
@
change=
"selectServiceModel(item.serviceName)"
clearable
>
<el-select
v-model=
"item.serviceName"
filterable
placeholder=
"请选择服务"
@
change=
"selectServiceModel(item.serviceName)"
clearable
>
<el-option
v-for=
"item2 in serviceList"
:key=
"item2.name"
:label=
"item2.name"
:value=
"item2.name"
></el-option>
<el-option
v-for=
"item2 in serviceList"
:key=
"item2.name"
:label=
"item2.name"
:value=
"item2.name"
></el-option>
</el-select>
</el-select>
</div>
</div>
</el-col>
</el-col>
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
<div
style=
"text-align: center;margin-top:5px"
>
<div
style=
"text-align: center;margin-top:5px"
>
<el-select
v-model=
"item.serviceBranch"
placeholder=
"请选择分支"
clearable
@
focus=
"focusevent(item.serviceName)"
>
<el-select
v-model=
"item.serviceBranch"
filterable
placeholder=
"请选择分支"
clearable
@
focus=
"focusevent(item.serviceName)"
>
<el-option
v-for=
"item2 in serviceBranchList"
:key=
"item2.name"
:label=
"item2.name"
:value=
"item2.name"
></el-option>
<el-option
v-for=
"item2 in serviceBranchList"
:key=
"item2.name"
:label=
"item2.name"
:value=
"item2.name"
></el-option>
</el-select>
</el-select>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
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