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
5e3476c3
Commit
5e3476c3
authored
May 19, 2021
by
王晓铜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新样式
parent
e9a3ab8f
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
225 additions
and
210 deletions
+225
-210
index.js
src/router/index.js
+4
-4
AddCase.vue
src/views/auto/AddCase.vue
+62
-55
AddInterface.vue
src/views/auto/AddInterface.vue
+38
-33
CaseList.vue
src/views/auto/CaseList.vue
+5
-8
EditScene.vue
src/views/auto/EditScene.vue
+53
-54
InterfaceList.vue
src/views/auto/InterfaceList.vue
+3
-4
ModelList.vue
src/views/auto/ModelList.vue
+2
-2
ProjectList.vue
src/views/auto/ProjectList.vue
+45
-37
SceneList.vue
src/views/auto/SceneList.vue
+11
-11
menu.json
src/views/layout/leftAside/menu.json
+2
-2
No files found.
src/router/index.js
View file @
5e3476c3
...
...
@@ -15,8 +15,8 @@ import kdspDecrypt from '../views/effect/KdspDecrypt'
import
JenkinsBuildInfo
from
'
../views/effect/JenkinsBuildInfo
'
import
LoginWhiteList
from
'
../views/effect/LoginWhiteList
'
// 2021-040-09新添加
import
ProjectList
from
'
../views/auto/Project
'
import
ModelList
from
'
../views/auto/Model
'
import
ProjectList
from
'
../views/auto/Project
List
'
import
ModelList
from
'
../views/auto/Model
List
'
import
InterfaceList
from
'
../views/auto/InterfaceList
'
import
JiraNotify
from
'
../views/jira/Notify
'
import
RiskControl
from
'
../views/vcc/RiskControl
'
...
...
@@ -102,12 +102,12 @@ const router = new Router({
},
// 2021-4-08新添加项目管理页面
{
path
:
'
/auto/Project
'
,
path
:
'
/auto/Project
List
'
,
name
:
ProjectList
,
component
:
ProjectList
},
{
path
:
'
/auto/Model
'
,
path
:
'
/auto/Model
List
'
,
name
:
ModelList
,
component
:
ModelList
},
...
...
src/views/auto/AddCase.vue
View file @
5e3476c3
<
template
>
<div>
<el-form
ref=
"caseForm"
:rules=
"rules"
:model=
"caseForm"
label-width=
"90px"
>
<el-form
ref=
"caseForm
Ref
"
:rules=
"rules"
:model=
"caseForm"
label-width=
"90px"
>
<el-form-item
label=
"模块名称:"
prop=
"moduleId"
>
<el-select
v-model=
"caseForm.moduleId"
placeholder=
"请选择模块"
@
change=
"selectChangeModel"
clearable
>
<el-option
v-for=
"item in modelList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
...
...
@@ -25,10 +25,10 @@
<el-col
:span=
"6"
>
<div
class=
"grid-content"
style=
"margin-left:15px"
>
参数名称
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
10
"
>
<div
class=
"grid-content"
style=
"margin-left:15px"
>
参数值
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
2
"
>
<div
class=
"grid-content"
style=
"margin-left:25px"
>
操作
</div>
</el-col>
</el-row>
...
...
@@ -38,14 +38,14 @@
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入参数名称"
></el-input>
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
10
"
>
<div>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入参数值"
></el-input>
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
2
"
>
<div>
<el-button
size=
"mini"
type=
"danger"
@
click=
"advanceDelss(index)"
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>
</div>
</el-col>
</el-row>
...
...
@@ -59,10 +59,10 @@
<el-col
:span=
"6"
>
<div
class=
"grid-content"
style=
"margin-left:15px"
>
参数名称
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
10
"
>
<div
class=
"grid-content"
style=
"margin-left:15px"
>
参数值
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
2
"
>
<div
class=
"grid-content"
style=
"margin-left:25px"
>
操作
</div>
</el-col>
</el-row>
...
...
@@ -72,14 +72,14 @@
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入参数名称"
></el-input>
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
10
"
>
<div>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入参数值"
></el-input>
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
2
"
>
<div>
<el-button
size=
"mini"
type=
"danger"
@
click=
"requestParamsDel(index)"
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>
</div>
</el-col>
</el-row>
...
...
@@ -93,10 +93,10 @@
<el-col
:span=
"6"
>
<div
class=
"grid-content"
style=
"margin-left:15px"
>
参数名称
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
10
"
>
<div
class=
"grid-content"
style=
"margin-left:15px"
>
参数值
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
2
"
>
<div
class=
"grid-content"
style=
"margin-left:25px"
>
操作
</div>
</el-col>
</el-row>
...
...
@@ -106,14 +106,14 @@
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入参数名称"
></el-input>
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
10
"
>
<div>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入参数值"
></el-input>
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
2
"
>
<div>
<el-button
size=
"mini"
type=
"danger"
@
click=
"paramsDel(index)"
style=
"height:40px;margin-left:20px"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"danger"
@
click=
"paramsDel(index)"
icon=
"el-icon-delete"
style=
"height:40px;margin-left:20px"
>
删除
</el-button>
</div>
</el-col>
</el-row>
...
...
@@ -125,29 +125,29 @@
<el-form-item>
<el-row>
<el-col
:span=
"6"
>
<div
class=
"grid-content"
style=
"margin-left:15px"
>
参数
名称
</div>
<div
class=
"grid-content"
style=
"margin-left:15px"
>
变量
名称
</div>
</el-col>
<el-col
:span=
"
6
"
>
<div
class=
"grid-content"
style=
"margin-left:15px"
>
参数值
</div>
<el-col
:span=
"
10
"
>
<div
class=
"grid-content"
style=
"margin-left:15px"
>
json路径表达式
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
2
"
>
<div
class=
"grid-content"
style=
"margin-left:25px"
>
操作
</div>
</el-col>
</el-row>
<el-row
v-for=
"(item,index) in responseList"
:key=
"index"
>
<el-col
:span=
"6"
>
<div>
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入
参数
名称"
></el-input>
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入
变量
名称"
></el-input>
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
10
"
>
<div>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入
参数值
"
></el-input>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入
表达式
"
></el-input>
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
2
"
>
<div>
<el-button
size=
"mini"
type=
"danger"
@
click=
"responeDel(index)"
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>
</div>
</el-col>
</el-row>
...
...
@@ -157,13 +157,13 @@
<el-collapse-item
name=
"5"
title=
"结果断言"
>
<el-button
type=
"success"
plain
@
click=
"AddAssertionListRow()"
class=
"el-icon-circle-plus"
>
添加行
</el-button>
<el-table
:data=
"assertionList"
border
style=
"width:100%;margin-top: 15px;"
>
<el-table-column
label=
"参数名称"
width=
"
15
0"
>
<el-table-column
label=
"参数名称"
width=
"
20
0"
>
<template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.paramsName"
>
</el-input>
</
template
>
</el-table-column>
<el-table-column
label=
"参数值"
width=
"
1
50"
>
<el-table-column
label=
"参数值"
width=
"
3
50"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.paramsValue"
>
</el-input>
...
...
@@ -174,19 +174,19 @@
<el-switch
v-model=
"scope.row.isRequired"
active-color=
"#13ce66"
inactive-color=
"#A9A9A9"
active-text=
"是"
inactive-text=
"否"
@
change=
"changeState()"
></el-switch>
</
template
>
</el-table-column>
<el-table-column
label=
"示例"
width=
"300"
>
<
!-- <
el-table-column label="示例" width="300">
<template slot-scope="scope">
<el-input v-model="scope.row.examples"></el-input>
</template>
</el-table-column>
<el-table-column
label=
"备注"
width=
"
30
0"
>
</el-table-column>
-->
<el-table-column
label=
"备注"
width=
"
25
0"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.remarks"
></el-input>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"danger"
@
click=
"AssertionDelete(scope.$index)"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"danger"
icon=
"el-icon-delete"
@
click=
"AssertionDelete(scope.$index)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -457,32 +457,39 @@ export default {
this
.
caseForm
.
extract
=
JSON
.
stringify
(
responseObj
)
// 断言
this
.
caseForm
.
validate
=
JSON
.
stringify
(
this
.
assertionList
)
if
(
this
.
caseForm
.
id
)
{
// 编辑接口
editCase
(
this
.
caseForm
).
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
$message
.
success
(
'
修改成功!
'
)
this
.
$router
.
push
(
'
CaseList
'
)
// 刷新列表页
this
.
sendResh
()
}
else
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
}
})
}
else
{
// 添加接口
addCase
(
this
.
caseForm
).
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
$message
.
success
(
'
添加成功!
'
)
// 返回列表页
this
.
$router
.
push
(
'
CaseList
'
)
// 刷新列表页
this
.
sendResh
()
// 输入框验证
this
.
$refs
.
caseFormRef
.
validate
((
valid
)
=>
{
if
(
!
valid
)
{
return
false
}
else
{
if
(
this
.
caseForm
.
id
)
{
// 编辑接口
editCase
(
this
.
caseForm
).
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
$message
.
success
(
'
修改成功!
'
)
this
.
$router
.
push
(
'
CaseList
'
)
// 刷新列表页
this
.
sendResh
()
}
else
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
}
})
}
else
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
// 添加接口
addCase
(
this
.
caseForm
).
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
$message
.
success
(
'
添加成功!
'
)
// 返回列表页
this
.
$router
.
push
(
'
CaseList
'
)
// 刷新列表页
this
.
sendResh
()
}
else
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
}
})
}
}
)
}
}
}
)
},
// 刷新列表
...
...
src/views/auto/AddInterface.vue
View file @
5e3476c3
<
template
>
<div>
<el-form
ref=
"interfaceForm"
:rules=
"rules"
:model=
"interfaceForm"
>
<el-form
ref=
"interfaceForm
Ref
"
:rules=
"rules"
:model=
"interfaceForm"
>
<el-collapse
v-model=
"activeNames"
>
<el-collapse-item
name=
"1"
title=
"基本信息"
>
<el-row>
...
...
@@ -364,40 +364,45 @@ export default {
this
.
interfaceForm
.
headers
=
JSON
.
stringify
(
this
.
headersList
)
this
.
interfaceForm
.
paramTemplate
=
JSON
.
stringify
(
this
.
paramList
)
this
.
interfaceForm
.
responseTemplate
=
JSON
.
stringify
(
this
.
responseList
)
if
(
this
.
interfaceForm
.
id
)
{
// 编辑接口
editInterface
(
this
.
interfaceForm
).
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
$message
.
success
(
'
修改成功!
'
)
this
.
$router
.
push
(
'
InterfaceList
'
)
// 刷新列表页
this
.
sendResh
()
}
else
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
}
})
}
else
{
addInterface
(
this
.
interfaceForm
).
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
$message
.
success
(
'
添加成功!
'
)
// 返回列表页
this
.
$router
.
push
(
'
InterfaceList
'
)
// 刷新列表页
this
.
sendResh
()
this
.
interfaceForm
.
name
=
''
this
.
interfaceForm
.
moduleId
=
''
this
.
interfaceForm
.
method
=
''
this
.
interfaceForm
.
url
=
''
this
.
interfaceForm
.
paramType
=
''
this
.
interfaceForm
.
headers
=
''
this
.
interfaceForm
.
paramTemplate
=
''
this
.
interfaceForm
.
responseTemplate
=
''
this
.
$refs
.
interfaceFormRef
.
validate
((
valid
)
=>
{
if
(
!
valid
)
{
return
false
}
else
{
if
(
this
.
interfaceForm
.
id
)
{
// 编辑接口
editInterface
(
this
.
interfaceForm
).
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
$message
.
success
(
'
修改成功!
'
)
this
.
$router
.
push
(
'
InterfaceList
'
)
// 刷新列表页
this
.
sendResh
()
}
else
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
}
})
}
else
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
addInterface
(
this
.
interfaceForm
).
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
$message
.
success
(
'
添加成功!
'
)
// 返回列表页
this
.
$router
.
push
(
'
InterfaceList
'
)
// 刷新列表页
this
.
sendResh
()
this
.
interfaceForm
.
name
=
''
this
.
interfaceForm
.
moduleId
=
''
this
.
interfaceForm
.
method
=
''
this
.
interfaceForm
.
url
=
''
this
.
interfaceForm
.
paramType
=
''
this
.
interfaceForm
.
headers
=
''
this
.
interfaceForm
.
paramTemplate
=
''
this
.
interfaceForm
.
responseTemplate
=
''
}
else
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
}
})
}
}
)
}
}
}
)
}
}
}
...
...
src/views/auto/CaseList.vue
View file @
5e3476c3
...
...
@@ -7,8 +7,8 @@
<el-option
v-for=
"item in modelList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
<el-input
v-model=
"queryModuleInfo.testcaseName"
clearable
placeholder=
"请输入用例名称"
style=
"width: 300px;"
></el-input>
<el-button
type=
"primary"
style=
"margin-left:20px"
@
click=
"queryData"
>
查询
</el-button>
<el-button
type=
"primary"
style=
"margin-left:20px"
@
click=
"addPage"
>
新增
</el-button>
<el-button
type=
"primary"
style=
"margin-left:20px"
icon=
"el-icon-search"
@
click=
"queryData"
>
查询
</el-button>
<el-button
type=
"primary"
style=
"margin-left:20px"
icon=
"el-icon-circle-plus"
@
click=
"addPage"
>
新增
</el-button>
</div>
<el-table
:data=
"singleCaseList"
border
style=
"width: 100%;margin-top:20px"
>
<el-table-column
type=
'index'
width=
"50px"
></el-table-column>
...
...
@@ -19,9 +19,9 @@
<!--
<el-table-column
prop=
"updateTime"
label=
"修改日期"
width=
"200px"
></el-table-column>
-->
<el-table-column
label=
"操作"
>
<slot
slot-scope=
"scope"
>
<el-button
type=
"warning"
@
click=
"executeCaseFrom(scope.row)"
>
执行
</el-button>
<el-button
type=
"success"
@
click=
"editCaseFrom(scope.row)"
>
编辑
</el-button>
<el-button
type=
"danger"
@
click=
"delCaseFrom(scope.row)"
>
删除
</el-button>
<el-button
type=
"warning"
icon=
"el-icon-link"
@
click=
"executeCaseFrom(scope.row)"
>
执行
</el-button>
<el-button
type=
"success"
icon=
"el-icon-edit"
@
click=
"editCaseFrom(scope.row)"
>
编辑
</el-button>
<el-button
type=
"danger"
icon=
"el-icon-delete"
@
click=
"delCaseFrom(scope.row)"
>
删除
</el-button>
</slot>
</el-table-column>
</el-table>
...
...
@@ -180,7 +180,4 @@ export default {
.el-select {
margin: 0 10px 0 5px;
}
// .el-select {
// margin-right: 10px;
// }
</
style
>
src/views/auto/EditScene.vue
View file @
5e3476c3
<
template
>
<div>
<el-form
ref=
"sceneForm"
:rules=
"rules"
:model=
"sceneForm"
label-width=
"90px"
>
<el-form-item
label=
"场景名称:"
prop=
"name"
style=
"width:3
0
0px"
>
<el-form
ref=
"sceneForm
Ref
"
:rules=
"rules"
:model=
"sceneForm"
label-width=
"90px"
>
<el-form-item
label=
"场景名称:"
prop=
"name"
style=
"width:3
2
0px"
>
<el-input
v-model=
"sceneForm.name"
></el-input>
</el-form-item>
<el-form-item
label=
"项目名称:"
prop=
"projectId"
>
...
...
@@ -21,8 +21,8 @@
<el-table-column
label=
"操作"
>
<slot
slot-scope=
"scope"
>
<el-button
type=
"success"
@
click=
"editeSceneFrom(scope.row)"
>
编辑
</el-button>
<el-button
type=
"danger"
@
click=
"deleSceneFrom(scope.row)"
>
删除
</el-button>
<el-button
type=
"success"
icon=
"el-icon-edit"
@
click=
"editeSceneFrom(scope.row)"
>
编辑
</el-button>
<el-button
type=
"danger"
icon=
"el-icon-delete"
@
click=
"deleSceneFrom(scope.row)"
>
删除
</el-button>
</slot>
</el-table-column>
</el-table>
...
...
@@ -35,8 +35,8 @@
</el-form>
<!-- 添加场景用例 -->
<el-dialog
title=
"新增场景用例"
:visible.sync=
"DialogVisible"
width=
"50%"
>
<el-form
:model=
"sceneCaseForm"
label-width=
"90px"
>
<el-dialog
title=
"新增场景用例"
:visible.sync=
"DialogVisible"
width=
"50%"
@
close=
"closeAddSceneDialog"
>
<el-form
:model=
"sceneCaseForm
Ref
"
label-width=
"90px"
>
<el-form-item
label=
"模块名称:"
style=
"width:300px"
>
<el-select
v-model=
"sceneCaseForm.moduleFrom"
value-key=
"id"
placeholder=
"请选择模块"
@
change=
"selectChangeModel"
clearable
>
<el-option
v-for=
"item in modelList"
:key=
"item.id"
:label=
"item.name"
:value=
"item"
></el-option>
...
...
@@ -77,10 +77,10 @@
<el-col
:span=
"6"
>
<div
class=
"grid-content"
style=
"margin-left:15px"
>
参数名称
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
10
"
>
<div
class=
"grid-content"
style=
"margin-left:15px"
>
参数值
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
2
"
>
<div
class=
"grid-content"
style=
"margin-left:25px"
>
操作
</div>
</el-col>
</el-row>
...
...
@@ -90,14 +90,14 @@
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入参数名称"
></el-input>
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
10
"
>
<div>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入参数值"
></el-input>
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
2
"
>
<div>
<el-button
size=
"mini"
type=
"danger"
@
click=
"advanceDelss(index)"
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>
</div>
</el-col>
</el-row>
...
...
@@ -111,10 +111,10 @@
<el-col
:span=
"6"
>
<div
class=
"grid-content"
style=
"margin-left:15px"
>
参数名称
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
10
"
>
<div
class=
"grid-content"
style=
"margin-left:15px"
>
参数值
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
2
"
>
<div
class=
"grid-content"
style=
"margin-left:25px"
>
操作
</div>
</el-col>
</el-row>
...
...
@@ -124,14 +124,14 @@
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入参数名称"
></el-input>
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
10
"
>
<div>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入参数值"
></el-input>
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
2
"
>
<div>
<el-button
size=
"mini"
type=
"danger"
@
click=
"requestParamsDel(index)"
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>
</div>
</el-col>
</el-row>
...
...
@@ -145,10 +145,10 @@
<el-col
:span=
"6"
>
<div
class=
"grid-content"
style=
"margin-left:15px"
>
参数名称
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
10
"
>
<div
class=
"grid-content"
style=
"margin-left:15px"
>
参数值
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
2
"
>
<div
class=
"grid-content"
style=
"margin-left:25px"
>
操作
</div>
</el-col>
</el-row>
...
...
@@ -158,14 +158,14 @@
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入参数名称"
></el-input>
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
10
"
>
<div>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入参数值"
></el-input>
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
2
"
>
<div>
<el-button
size=
"mini"
type=
"danger"
@
click=
"paramsDel(index)"
style=
"height:40px;margin-left:20px"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"danger"
@
click=
"paramsDel(index)"
icon=
"el-icon-delete"
style=
"height:40px;margin-left:20px"
>
删除
</el-button>
</div>
</el-col>
</el-row>
...
...
@@ -179,27 +179,27 @@
<el-col
:span=
"6"
>
<div
class=
"grid-content"
style=
"margin-left:15px"
>
变量名称
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
10
"
>
<div
class=
"grid-content"
style=
"margin-left:15px"
>
json路径表达式
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
4
"
>
<div
class=
"grid-content"
style=
"margin-left:25px"
>
操作
</div>
</el-col>
</el-row>
<el-row
v-for=
"(item,index) in responseList"
:key=
"index"
>
<el-col
:span=
"6"
>
<div>
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入
参数
名称"
></el-input>
<el-input
v-model.trim=
"item.paramsName"
placeholder=
"请输入
变量
名称"
></el-input>
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
10
"
>
<div>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入
参数值
"
></el-input>
<el-input
v-model.trim=
"item.paramsValue"
placeholder=
"请输入
表达式
"
></el-input>
</div>
</el-col>
<el-col
:span=
"
6
"
>
<el-col
:span=
"
4
"
>
<div>
<el-button
size=
"mini"
type=
"danger"
@
click=
"responeDel(index)"
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>
</div>
</el-col>
</el-row>
...
...
@@ -209,13 +209,13 @@
<el-collapse-item
name=
"5"
title=
"结果断言"
>
<el-button
type=
"success"
plain
@
click=
"AddAssertionListRow()"
class=
"el-icon-circle-plus"
>
添加行
</el-button>
<el-table
:data=
"assertionList"
border
style=
"width:100%;margin-top: 15px;"
>
<el-table-column
label=
"参数名称"
width=
"
15
0"
>
<el-table-column
label=
"参数名称"
width=
"
20
0"
>
<template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.paramsName"
>
</el-input>
</
template
>
</el-table-column>
<el-table-column
label=
"参数值"
width=
"
1
50"
>
<el-table-column
label=
"参数值"
width=
"
3
50"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.paramsValue"
>
</el-input>
...
...
@@ -226,26 +226,26 @@
<el-switch
v-model=
"scope.row.isRequired"
active-color=
"#13ce66"
inactive-color=
"#A9A9A9"
active-text=
"是"
inactive-text=
"否"
@
change=
"changeState()"
></el-switch>
</
template
>
</el-table-column>
<el-table-column
label=
"示例"
width=
"300"
>
<
!-- <
el-table-column label="示例" width="300">
<template slot-scope="scope">
<el-input v-model="scope.row.examples"></el-input>
</template>
</el-table-column>
<el-table-column
label=
"备注"
width=
"
30
0"
>
</el-table-column>
-->
<el-table-column
label=
"备注"
width=
"
25
0"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.remarks"
></el-input>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"danger"
@
click=
"AssertionDelete(scope.$index)"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"danger"
icon=
"el-icon-delete"
@
click=
"AssertionDelete(scope.$index)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</el-collapse-item>
</el-collapse>
<div
style=
"margin-top:20px;margin-left:400px"
>
<el-button
@
click=
"cancelCaseFrom"
>
取 消
</el-button>
<el-button
@
click=
"cancelCaseFrom"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"addCaseFrom"
>
确 定
</el-button>
</div>
</el-form>
...
...
@@ -388,8 +388,6 @@ export default {
Sortable
.
create
(
tbody
,
{
draggable
:
'
.el-table__row
'
,
onEnd
({
newIndex
,
oldIndex
})
{
// console.log('索引新', newIndex)
// console.log('索引旧', oldIndex)
const
currRow
=
_this
.
sceneTestcaseList
.
splice
(
oldIndex
,
1
)[
0
]
_this
.
sceneTestcaseList
.
splice
(
newIndex
,
0
,
currRow
)
}
...
...
@@ -453,6 +451,10 @@ export default {
this
.
sceneCaseForm
.
interfaceFrom
=
''
this
.
sceneCaseForm
.
caseList
=
[]
},
// 关闭清空内容
closeAddSceneDialog
()
{
this
.
$refs
.
sceneCaseFormRef
.
resetFields
()
},
// 编辑场景用例
editeSceneFrom
(
row
)
{
console
.
log
(
'
11
'
,
row
)
...
...
@@ -509,15 +511,21 @@ export default {
})
this
.
newSceneForm
.
sceneId
=
this
.
sceneCaseInfo
.
sceneId
this
.
newSceneForm
.
sceneTestcaseList
=
this
.
sceneTestcaseList
addSceneCase
(
this
.
newSceneForm
).
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
$message
.
success
(
'
保存成功!
'
)
// 返回列表页
this
.
$router
.
push
({
path
:
'
SceneList
'
})
// 刷新列表页
this
.
sendResh
()
this
.
$refs
.
sceneFormRef
.
validate
((
valid
)
=>
{
if
(
!
valid
)
{
return
false
}
else
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
addSceneCase
(
this
.
newSceneForm
).
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
$message
.
success
(
'
保存成功!
'
)
// 返回列表页
this
.
$router
.
push
({
path
:
'
SceneList
'
})
// 刷新列表页
this
.
sendResh
()
}
else
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
}
})
}
})
},
...
...
@@ -625,15 +633,6 @@ export default {
// 断言
this
.
sceneCaseForm
.
validate
=
JSON
.
stringify
(
this
.
assertionList
)
// 循环数组并删除对应的数组下标的整条数据信息
// for (var i = 0; i
<
this
.
sceneTestcaseList
.
length
;
i
++
)
{
// if (
// this.sceneTestcaseList[i].sequence === this.sceneCaseForm.sequence
// ) {
// var moduleName = this.sceneTestcaseList[i].moduleName
// var interfaceName = this.sceneTestcaseList[i].interfaceName
// this.sceneTestcaseList.splice(i, 1)
// }
// }
for
(
var
i
=
0
;
i
<
this
.
sceneTestcaseList
.
length
;
i
++
)
{
if
(
this
.
sceneTestcaseList
[
i
].
sequence
===
this
.
sceneCaseForm
.
sequence
...
...
src/views/auto/InterfaceList.vue
View file @
5e3476c3
...
...
@@ -26,8 +26,8 @@
<!--
<el-table-column
prop=
"updateTime"
label=
"修改时间"
width=
"200px"
></el-table-column>
-->
<el-table-column
label=
"操作"
>
<slot
slot-scope=
"scope"
>
<el-button
type=
"success"
@
click=
"editInterfaceFrom(scope.row)"
>
编辑
</el-button>
<el-button
type=
"danger"
@
click=
"delInterfaceFrom(scope.row)"
>
删除
</el-button>
<el-button
type=
"success"
icon=
"el-icon-edit"
@
click=
"editInterfaceFrom(scope.row)"
>
编辑
</el-button>
<el-button
type=
"danger"
icon=
"el-icon-delete"
@
click=
"delInterfaceFrom(scope.row)"
>
删除
</el-button>
</slot>
</el-table-column>
</el-table>
...
...
@@ -174,7 +174,6 @@ export default {
<
style
lang=
"less"
scoped
>
.el-select {
margin-right: 10px;
margin-left: 5px;
margin: 0 10px 0 5px;
}
</
style
>
src/views/auto/Model.vue
→
src/views/auto/Model
List
.vue
View file @
5e3476c3
...
...
@@ -15,8 +15,8 @@
<!--
<el-table-column
prop=
"updateTime"
label=
"修改时间"
width=
"200px"
></el-table-column>
-->
<el-table-column
label=
"操作"
>
<slot
slot-scope=
"scope"
>
<el-button
type=
"success"
@
click=
"openEditDialog(scope.row)"
>
编辑
</el-button>
<el-button
type=
"danger"
@
click=
"delModelFrom(scope.row)"
>
删除
</el-button>
<el-button
type=
"success"
icon=
"el-icon-edit"
@
click=
"openEditDialog(scope.row)"
>
编辑
</el-button>
<el-button
type=
"danger"
icon=
"el-icon-delete"
@
click=
"delModelFrom(scope.row)"
>
删除
</el-button>
</slot>
</el-table-column>
</el-table>
...
...
src/views/auto/Project.vue
→
src/views/auto/Project
List
.vue
View file @
5e3476c3
...
...
@@ -25,8 +25,8 @@
</el-pagination>
</el-card>
<!-- 新增页面 /编辑页面-->
<el-dialog
title=
"新增项目"
:visible.sync=
"DialogVisible"
width=
"30%"
>
<el-form
ref=
"projectForm"
:rules=
"rules"
:model=
"projectForm"
label-width=
"90px"
>
<el-dialog
title=
"新增项目"
:visible.sync=
"DialogVisible"
@
close=
"closeAddDialog"
width=
"30%"
>
<el-form
ref=
"projectForm
Ref
"
:rules=
"rules"
:model=
"projectForm"
label-width=
"90px"
>
<el-form-item
label=
"项目名称:"
prop=
"name"
style=
"width:400px"
>
<el-input
v-model=
"projectForm.name"
></el-input>
</el-form-item>
...
...
@@ -99,41 +99,49 @@ export default {
searchMockList
()
{},
// 新增确定按钮
addPojectFrom
()
{
if
(
this
.
projectForm
.
id
)
{
// 编辑接口
editProject
(
this
.
projectForm
)
.
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
DialogVisible
=
false
this
.
$message
.
success
(
'
修改成功!
'
)
this
.
getProjectList
()
}
else
if
(
resp
.
data
.
data
===
false
)
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
}
})
.
catch
((
error
)
=>
{
this
.
$message
({
type
:
'
error
'
,
message
:
error
})
})
}
else
{
// 添加接口
addProject
(
this
.
projectForm
)
.
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
DialogVisible
=
false
this
.
$message
.
success
(
'
新增成功!
'
)
this
.
projectForm
.
name
=
''
this
.
projectForm
.
description
=
''
this
.
getProjectList
()
}
else
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
this
.
projectForm
.
name
=
''
this
.
projectForm
.
description
=
''
}
})
.
catch
((
error
)
=>
{
this
.
$message
({
type
:
'
error
'
,
message
:
error
})
})
}
this
.
$refs
.
projectFormRef
.
validate
((
valid
)
=>
{
if
(
!
valid
)
{
return
false
}
else
{
if
(
this
.
projectForm
.
id
)
{
// 编辑接口
editProject
(
this
.
projectForm
)
.
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
DialogVisible
=
false
this
.
$message
.
success
(
'
修改成功!
'
)
this
.
getProjectList
()
}
else
if
(
resp
.
data
.
data
===
false
)
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
}
})
.
catch
((
error
)
=>
{
this
.
$message
({
type
:
'
error
'
,
message
:
error
})
})
}
else
{
// 添加接口
addProject
(
this
.
projectForm
)
.
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
DialogVisible
=
false
this
.
$message
.
success
(
'
新增成功!
'
)
this
.
projectForm
.
name
=
''
this
.
projectForm
.
description
=
''
this
.
getProjectList
()
}
else
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
}
})
.
catch
((
error
)
=>
{
this
.
$message
({
type
:
'
error
'
,
message
:
error
})
})
}
}
})
},
// 对话框关闭后清空文本框数据
closeAddDialog
()
{
this
.
$refs
.
projectFormRef
.
resetFields
()
},
// 编辑信息回显
openEditDialog
(
row
)
{
...
...
src/views/auto/SceneList.vue
View file @
5e3476c3
...
...
@@ -4,8 +4,8 @@
<div>
场景名称:
<el-input
v-model=
"queryModuleInfo.sceneName"
clearable
placeholder=
"请输入场景名称"
style=
"width: 300px;"
></el-input>
<el-button
type=
"primary"
style=
"margin-left:20px"
@
click=
"queryData"
>
查询
</el-button>
<el-button
type=
"primary"
style=
"margin-left:20px"
@
click=
"DialogVisible = true"
>
新增
</el-button>
<el-button
type=
"primary"
style=
"margin-left:20px"
icon=
"el-icon-search"
@
click=
"queryData"
>
查询
</el-button>
<el-button
type=
"primary"
style=
"margin-left:20px"
icon=
"el-icon-circle-plus"
@
click=
"DialogVisible = true"
>
新增
</el-button>
</div>
<el-table
:data=
"sceneList"
border
style=
"width: 100%;margin-top:20px"
>
<el-table-column
type=
'index'
width=
"50px"
></el-table-column>
...
...
@@ -15,9 +15,9 @@
<!--
<el-table-column
prop=
"updateTime"
label=
"修改时间"
width=
"200px"
></el-table-column>
-->
<el-table-column
label=
"操作"
>
<slot
slot-scope=
"scope"
>
<el-button
type=
"warning"
@
click=
"executeSceneFrom(scope.row)"
>
执行
</el-button>
<el-button
type=
"success"
@
click=
"editeSceneFrom(scope.row)"
>
编辑
</el-button>
<el-button
type=
"danger"
@
click=
"deleSceneFrom(scope.row)"
>
删除
</el-button>
<el-button
type=
"warning"
icon=
"el-icon-link"
@
click=
"executeSceneFrom(scope.row)"
>
执行
</el-button>
<el-button
type=
"success"
icon=
"el-icon-edit"
@
click=
"editeSceneFrom(scope.row)"
>
编辑
</el-button>
<el-button
type=
"danger"
icon=
"el-icon-delete"
@
click=
"deleSceneFrom(scope.row)"
>
删除
</el-button>
</slot>
</el-table-column>
</el-table>
...
...
@@ -36,8 +36,8 @@
</div>
</el-card>
<!-- 新增页面 /编辑页面-->
<el-dialog
title=
"新增场景"
:visible.sync=
"DialogVisible"
width=
"50%"
>
<el-form
ref=
"sceneForm"
:rules=
"rules"
:model=
"sceneForm"
label-width=
"90px"
>
<el-dialog
title=
"新增场景"
:visible.sync=
"DialogVisible"
width=
"50%"
@
close=
"closeAddDialog"
>
<el-form
ref=
"sceneForm
AddRef
"
:rules=
"rules"
:model=
"sceneForm"
label-width=
"90px"
>
<el-form-item
label=
"场景名称:"
prop=
"name"
style=
"width:400px"
>
<el-input
v-model=
"sceneForm.name"
></el-input>
</el-form-item>
...
...
@@ -141,7 +141,6 @@ export default {
this
.
executeScene
.
namespace
=
window
.
sessionStorage
.
getItem
(
'
env
'
)
this
.
isShow
=
true
executeScene
(
this
.
executeScene
).
then
((
resp
)
=>
{
console
.
log
(
'
接口返回结果
'
,
resp
)
this
.
requestData
=
resp
.
data
.
data
})
},
...
...
@@ -149,7 +148,6 @@ export default {
editeSceneFrom
(
row
)
{
window
.
sessionStorage
.
setItem
(
'
curScene
'
,
JSON
.
stringify
(
row
))
this
.
$router
.
push
({
path
:
'
EditScene
'
})
// this.$router.push({ path: 'tese' })
// bus使用
this
.
$nextTick
(
function
()
{
// DOM 现在更新了
...
...
@@ -202,13 +200,15 @@ export default {
if
(
resp
.
data
.
data
===
true
)
{
this
.
DialogVisible
=
false
this
.
$message
.
success
(
'
新增成功!
'
)
this
.
sceneForm
.
name
=
''
this
.
sceneForm
.
projectId
=
''
this
.
getSecneList
()
}
else
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
}
})
},
// 关闭清空数据
closeAddDialog
()
{
this
.
$refs
.
sceneFormAddRef
.
resetFields
()
}
}
}
...
...
src/views/layout/leftAside/menu.json
View file @
5e3476c3
...
...
@@ -109,13 +109,13 @@
"id"
:
1
,
"title"
:
"项目管理"
,
"icon"
:
"el-icon-bicycle"
,
"path"
:
"/auto/Project"
"path"
:
"/auto/Project
List
"
},
{
"id"
:
2
,
"title"
:
"模块管理"
,
"icon"
:
"el-icon-wallet"
,
"path"
:
"/auto/Model"
"path"
:
"/auto/Model
List
"
},
{
"id"
:
3
,
...
...
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