Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
中汽测评-信息安全测评系统
web
Commits
135403d7
Commit
135403d7
authored
Apr 28, 2024
by
mengzixuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(测试用例库): 逻辑修改
parent
fbbe2d45
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
25 deletions
+71
-25
index.vue
src/views/informationBase/viewUseCaseLibrary/index.vue
+68
-23
index.vue
src/views/setting/useCaseLibrary/index.vue
+3
-2
No files found.
src/views/informationBase/viewUseCaseLibrary/index.vue
View file @
135403d7
<!-- 查看测试用例库 -->
<
template
>
<
template
>
<page-standard>
<page-standard>
<el-form
<el-form
...
@@ -17,11 +16,11 @@
...
@@ -17,11 +16,11 @@
>
>
<el-option
<el-option
v-for=
"item in testScenarList"
v-for=
"item in testScenarList"
:key=
"item
.id
"
:key=
"item"
:label=
"item
.testScenario
"
:label=
"item"
:value=
"item
.id
"
:value=
"item"
>
>
{{
item
.
testScenario
}}
</el-option
{{
item
}}
</el-option
>
>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -33,11 +32,11 @@
...
@@ -33,11 +32,11 @@
>
>
<el-option
<el-option
v-for=
"item of testTypeList"
v-for=
"item of testTypeList"
:key=
"item
.id
"
:key=
"item"
:label=
"item
.testType
"
:label=
"item"
:value=
"item
.id
"
:value=
"item"
>
>
{{
item
.
testType
}}
</el-option
{{
item
}}
</el-option
>
>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -76,17 +75,17 @@
...
@@ -76,17 +75,17 @@
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"测试场景"
label=
"测试场景"
align=
"left"
sortable
sortable
align=
"left"
prop=
"testScenario"
prop=
"testScenario"
/>
/>
<el-table-column
label=
"测试方法"
align=
"left"
sortable
prop=
"testType"
/>
<el-table-column
label=
"测试方法"
sortable
align=
"left"
prop=
"testType"
/>
<el-table-column
label=
"用例编号"
align=
"left"
prop=
"
usecaseNo
"
/>
<el-table-column
label=
"用例编号"
align=
"left"
prop=
"
displayID
"
/>
<el-table-column
label=
"用例名称"
align=
"left"
prop=
"name"
/>
<el-table-column
label=
"用例名称"
align=
"left"
prop=
"name"
/>
<!-- <el-table-column label="工具" align="left" prop="tools" /> -->
<!-- <el-table-column label="工具" align="left" prop="tools" /> -->
<el-table-column
label=
"对应输入"
align=
"left"
prop=
"
input
"
>
<el-table-column
label=
"对应输入"
align=
"left"
prop=
"
requirements
"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
input
||
'--'
}}
</span>
<span>
{{
scope
.
row
.
requirements
||
'--'
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"用例描述"
align=
"left"
prop=
"description"
>
<el-table-column
label=
"用例描述"
align=
"left"
prop=
"description"
>
...
@@ -94,27 +93,46 @@
...
@@ -94,27 +93,46 @@
<span>
{{
scope
.
row
.
description
||
'--'
}}
</span>
<span>
{{
scope
.
row
.
description
||
'--'
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<!-- <el-table-column label="更新人员" align="left" prop="updateBy" />-->
<!-- <el-table-column-->
<!-- label="更新时间"-->
<!-- sortable-->
<!-- align="left"-->
<!-- prop="updateTime"-->
<!-- width="180"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</el-table>
<pagination
<pagination
v-show=
"total > 0"
v-show=
"total > 0"
:total=
"total"
:total=
"total"
:background=
"false"
:background=
"false"
:page
.
sync=
"queryParams.
pageNum
"
:page
.
sync=
"queryParams.
offset
"
:limit
.
sync=
"queryParams.
pageSize
"
:limit
.
sync=
"queryParams.
limit
"
@
pagination=
"
loadData
"
@
pagination=
"
getList
"
/>
/>
</page-standard>
</page-standard>
</template>
</template>
<
script
>
<
script
>
import
page
from
'@/mixins/page'
//
import page from '@/mixins/page'
import
{
import
{
listTestCase
,
listTestScenar
,
listTestScenar
,
list
TestType
list
Method
}
from
'../../../api/setting/useCaseLibrary'
}
from
'../../../api/setting/useCaseLibrary'
export
default
{
export
default
{
mixins
:
[
page
],
//
mixins: [page],
data
()
{
data
()
{
return
{
return
{
queryParams
:
{
offset
:
0
,
limit
:
10
},
total
:
0
,
loading
:
false
,
listUrl
:
'/system/testCase/getList'
,
listUrl
:
'/system/testCase/getList'
,
// 显示搜索条件
// 显示搜索条件
showSearch
:
true
,
showSearch
:
true
,
...
@@ -139,16 +157,43 @@ export default {
...
@@ -139,16 +157,43 @@ export default {
mounted
()
{
mounted
()
{
this
.
getTestScenar
()
this
.
getTestScenar
()
this
.
getTestType
()
this
.
getTestType
()
this
.
getList
()
},
},
methods
:
{
methods
:
{
handleQuery
()
{
this
.
queryParams
.
offset
=
1
this
.
getList
()
},
resetQuery
()
{
this
.
queryParams
.
offset
=
1
this
.
queryParams
.
limit
=
10
this
.
handleQuery
()
},
/** 获取测试场景 */
getTestScenar
()
{
getTestScenar
()
{
listTestScenar
().
then
(
res
=>
{
listTestScenar
().
then
(
res
=>
{
this
.
testScenarList
=
res
.
rows
this
.
testScenarList
=
res
.
data
})
})
},
},
/** 获取测试方法 */
getTestType
()
{
getTestType
()
{
listTestType
({
pageNum
:
1
,
pageSize
:
999
}).
then
(
res
=>
{
listMethod
().
then
(
res
=>
{
this
.
testTypeList
=
res
.
rows
this
.
testTypeList
=
res
.
data
})
},
/** 获取测试用例列表 */
getList
()
{
console
.
log
(
this
.
queryParams
.
limit
)
const
pageNum
=
(
this
.
queryParams
.
offset
-
1
)
*
this
.
queryParams
.
limit
const
data
=
{
offset
:
{
offset
:
pageNum
,
limit
:
this
.
queryParams
.
limit
}
}
listTestCase
(
data
).
then
(
res
=>
{
this
.
tableData
=
res
.
data
.
useCases
this
.
total
=
res
.
data
.
totalCount
})
})
}
}
}
}
...
...
src/views/setting/useCaseLibrary/index.vue
View file @
135403d7
...
@@ -131,7 +131,7 @@ export default {
...
@@ -131,7 +131,7 @@ export default {
offset
:
0
,
offset
:
0
,
limit
:
10
limit
:
10
},
},
total
:
1
,
total
:
0
,
loading
:
false
,
loading
:
false
,
listUrl
:
'/system/testCase/getList'
,
listUrl
:
'/system/testCase/getList'
,
// 显示搜索条件
// 显示搜索条件
...
@@ -183,7 +183,8 @@ export default {
...
@@ -183,7 +183,8 @@ export default {
},
},
/** 获取测试用例列表 */
/** 获取测试用例列表 */
getList
()
{
getList
()
{
const
pageNum
=
(
this
.
queryParams
.
offset
-
1
)
*
10
console
.
log
(
this
.
queryParams
.
limit
)
const
pageNum
=
(
this
.
queryParams
.
offset
-
1
)
*
this
.
queryParams
.
limit
const
data
=
{
const
data
=
{
offset
:
{
offset
:
{
offset
:
pageNum
,
offset
:
pageNum
,
...
...
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