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
4fbd265d
Commit
4fbd265d
authored
Apr 12, 2021
by
王晓铜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交项目管理模块
parent
8f5c55f4
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
318 additions
and
17 deletions
+318
-17
dev.env.js
config/dev.env.js
+4
-2
getAotoInterface.js
src/api/getAotoInterface.js
+38
-0
index.js
src/router/index.js
+37
-15
Model.vue
src/views/auto/Model.vue
+17
-0
Project.vue
src/views/auto/Project.vue
+203
-0
menu.json
src/views/layout/leftAside/menu.json
+19
-0
No files found.
config/dev.env.js
View file @
4fbd265d
...
...
@@ -5,7 +5,9 @@ const prodEnv = require('./prod.env')
module
.
exports
=
merge
(
prodEnv
,
{
NODE_ENV
:
'
"development"
'
,
ENV_CONFIG
:
'
"dev"
'
,
QA_PLATFORM
:
'
"//localhost:8082"
'
,
//
QA_PLATFORM: '"//localhost:8082"',
TESTDATA_API
:
'
"//testdata.liangkebang.com"
'
,
HOLMES
:
'
"//localhost:8084"
'
,
// HOLMES: '"//localhost:8084"',
QA_PLATFORM
:
'
"//qa-platform-fe.liangkebang.net/"
'
,
HOLMES
:
'
"//holmes-yxm.liangkebang.net/"
'
,
})
src/api/getAotoInterface.js
0 → 100644
View file @
4fbd265d
import
request
from
'
@/utils/holmesRequest
'
export
function
getProjectList
(
queryInfo
)
{
return
request
({
url
:
'
/auto/project/list
'
,
method
:
'
get
'
,
params
:
queryInfo
})
}
export
function
addProject
(
data
)
{
return
request
({
url
:
'
/auto/project/add
'
,
method
:
'
post
'
,
data
})
}
export
function
editProject
(
data
)
{
return
request
({
url
:
'
/auto/project/modify
'
,
method
:
'
post
'
,
data
})
}
export
function
delProject
(
queryInfo
)
{
return
request
({
url
:
'
/auto/project/delete
'
,
method
:
'
get
'
,
params
:
queryInfo
})
}
// 模块列表
export
function
modulList
(
queryInfo
)
{
return
request
({
url
:
'
/auto/module/list
'
,
method
:
'
get
'
,
params
:
queryInfo
})
}
src/router/index.js
View file @
4fbd265d
...
...
@@ -14,18 +14,20 @@ import Mock from '../views/mock/Mock'
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
'
Vue
.
use
(
Router
)
const
router
=
new
Router
({
mode
:
'
history
'
,
routes
:
[
{
'
path
'
:
'
/
'
,
path
:
'
/
'
,
redirect
:
'
/index
'
},
{
'
path
'
:
'
/index
'
,
path
:
'
/index
'
,
name
:
'
登录页
'
,
component
:
Index
},
// {
...
...
@@ -38,48 +40,68 @@ const router = new Router({
component
:
Home
,
children
:
[
{
'
path
'
:
'
/main
'
,
path
:
'
/main
'
,
name
:
'
主页
'
,
component
:
Main
},
{
'
path
'
:
'
/xyqb/genLoanData
'
,
path
:
'
/xyqb/genLoanData
'
,
name
:
'
捞数据
'
,
component
:
XyqbGenLoanData
},
{
'
path
'
:
'
/xyqb/getLoanData
'
,
path
:
'
/xyqb/getLoanData
'
,
name
:
'
造数据
'
,
component
:
XyqbGetLoanData
},
{
'
path
'
:
'
/vcc/getData
'
,
path
:
'
/vcc/getData
'
,
name
:
'
查数据
'
,
component
:
VccGetData
},
{
'
path
'
:
'
/vcc/genData
'
,
path
:
'
/vcc/genData
'
,
name
:
'
VCC捞数据
'
,
component
:
VccGenData
},
{
'
path
'
:
'
/vcc/checkData
'
,
path
:
'
/vcc/checkData
'
,
name
:
'
造数据
'
,
component
:
VccCheckData
},
{
'
path
'
:
'
/mock/list
'
,
path
:
'
/mock/list
'
,
name
:
'
工具
'
,
component
:
Mock
},
{
'
path
'
:
'
/effect/kdsp/decrypt
'
,
path
:
'
/effect/kdsp/decrypt
'
,
name
:
'
kdsp解密
'
,
component
:
kdspDecrypt
},
{
'
path
'
:
'
/effect/jenkins/build
'
,
path
:
'
/effect/jenkins/build
'
,
name
:
'
构建记录
'
,
component
:
JenkinsBuildInfo
},
{
'
path
'
:
'
/effect/whitelist
'
,
path
:
'
/effect/whitelist
'
,
name
:
'
登录白名单
'
,
component
:
LoginWhiteList
},
// 2021-4-08新添加项目管理页面
{
path
:
'
/auto/Project
'
,
name
:
'
项目管理
'
,
component
:
ProjectList
},
{
path
:
'
/auto/Model
'
,
name
:
'
模块管理
'
,
component
:
ModelList
}
]
}
]
})
export
default
router
src/views/auto/Model.vue
0 → 100644
View file @
4fbd265d
<
template
>
<div>
<!-- 头部导航栏 -->
<el-breadcrumb
separator-class=
"el-icon-arrow-right"
>
<el-breadcrumb-item>
接口自动化
</el-breadcrumb-item>
<el-breadcrumb-item>
模块管理列表
</el-breadcrumb-item>
</el-breadcrumb>
<el-card>
<div
class=
"filter"
>
<el-button
type=
"primary"
@
click=
"DialogVisible = true"
>
新增
</el-button>
</div>
<el-table
:data=
"modelList"
border
style=
"width: 100%"
>
</el-table>
</el-card>
</div>
</
template
>
src/views/auto/Project.vue
0 → 100644
View file @
4fbd265d
<
template
>
<div>
<!-- 头部导航栏 -->
<el-breadcrumb
separator-class=
"el-icon-arrow-right"
>
<el-breadcrumb-item>
接口自动化
</el-breadcrumb-item>
<el-breadcrumb-item>
项目管理列表
</el-breadcrumb-item>
</el-breadcrumb>
<el-card>
<div
class=
"filter"
>
<!--
<el-input
placeholder=
"请输入项目名称"
style=
"width:15%"
></el-input>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"searchMockList"
>
查询
</el-button>
-->
<el-button
type=
"primary"
@
click=
"DialogVisible = true"
>
新增
</el-button>
</div>
<el-table
:data=
"projectList"
border
style=
"width: 100%"
>
<el-table-column
prop=
"id"
label=
"序号"
width=
"80px"
></el-table-column>
<el-table-column
prop=
"name"
label=
"名称"
width=
"200px"
></el-table-column>
<el-table-column
prop=
"description"
label=
"描述"
width=
"300px"
></el-table-column>
<el-table-column
prop=
"createTime"
label=
"创建时间"
width=
"200px"
></el-table-column>
<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=
"delProjectFrom(scope.row)"
>
删除
</el-button>
</slot>
</el-table-column>
</el-table>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page.sync=
"queryModuleList.pageNum"
:page-size=
"queryModuleList.pageSize"
layout=
"total, prev, pager, next"
:total=
"totalNum"
>
</el-pagination>
</el-card>
<!-- 新增页面 /编辑页面-->
<el-dialog
title=
"新增项目"
:visible.sync=
"DialogVisible"
width=
"30%"
@
close=
"closeEditDialog"
>
<el-form
ref=
"projectForm"
: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>
<el-form-item
label=
"项目描述:"
prop=
"description"
style=
"width:400px"
>
<el-input
v-model=
"projectForm.description"
></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=
"addPojectFrom"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
import
{
getProjectList
,
addProject
,
editProject
,
delProject
}
from
'
@/api/getAotoInterface
'
export
default
{
data
()
{
return
{
queryModuleInfo
:
{
pageNum
:
1
,
pageSize
:
20
},
queryModuleList
:
{
pageNo
:
1
,
pageSize
:
10
,
modlue
:
''
},
projectList
:
[],
totalNum
:
0
,
DialogVisible
:
false
,
projectForm
:
{
name
:
''
,
description
:
''
},
delProjectParam
:
{
projectId
:
''
},
rules
:
{
name
:
[
{
required
:
true
,
message
:
'
项目名称不能为空!
'
,
trigger
:
'
blur
'
}
],
description
:
[
{
required
:
true
,
message
:
'
项目描述不能为空!
'
,
trigger
:
'
blur
'
}
]
}
}
},
created
()
{
this
.
getProjectList
()
},
methods
:
{
// 获取项目列表
getProjectList
()
{
getProjectList
(
this
.
queryModuleInfo
).
then
((
resp
)
=>
{
this
.
projectList
=
resp
.
data
.
data
.
list
this
.
totalNum
=
resp
.
data
.
data
.
total
})
},
// 查询按钮
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
if
(
resp
.
data
.
data
===
false
)
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
}
})
.
catch
((
error
)
=>
{
this
.
$message
({
type
:
'
error
'
,
message
:
error
})
})
}
},
// 编辑信息回显
openEditDialog
(
row
)
{
this
.
DialogVisible
=
true
this
.
projectForm
=
row
},
// 对话框方法
openMessage
(
message
,
confirmText
,
doit
)
{
this
.
$messageBox
.
confirm
(
message
,
'
确定
'
,
{
cancelButtonText
:
'
取消
'
,
confirmButtonText
:
confirmText
,
type
:
'
warning
'
})
.
then
(()
=>
{
doit
()
})
.
catch
(()
=>
{})
},
// 删除项目
delProjectFrom
(
row
)
{
this
.
delProjectParam
.
projectId
=
row
.
id
this
.
openMessage
(
'
您确定要删除吗?
'
,
'
删除
'
,
()
=>
{
delProject
(
this
.
delProjectParam
)
.
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
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
})
})
})
},
// 分页展示
handleSizeChange
(
newSize
)
{
this
.
queryModuleList
.
pageSize
=
newSize
this
.
getProjectList
()
},
// 分页展示
handleCurrentChange
(
newPage
)
{
this
.
queryModuleList
.
pageNum
=
newPage
this
.
getProjectList
()
},
closeEditDialog
()
{}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.el-table {
margin-top: 20px;
}
.el-select {
margin-right: 20px;
}
</
style
>
src/views/layout/leftAside/menu.json
View file @
4fbd265d
...
...
@@ -81,6 +81,25 @@
"path"
:
"/effect/whitelist"
}
]
},
{
"id"
:
5
,
"title"
:
"接口自动化"
,
"icon"
:
"el-icon-s-opportunity"
,
"child"
:
[
{
"id"
:
1
,
"title"
:
"项目管理"
,
"icon"
:
"el-icon-bicycle"
,
"path"
:
"/auto/Project"
},
{
"id"
:
2
,
"title"
:
"模块管理"
,
"icon"
:
"el-icon-wallet"
,
"path"
:
"/auto/Model"
}
]
}
]
}
\ No newline at end of file
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