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
c07ccc21
Commit
c07ccc21
authored
Mar 04, 2024
by
mzx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(信息库): 页面数据维护
parent
e1adc8d1
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
870 additions
and
85 deletions
+870
-85
index.vue
src/views/informationBase/viewCompany/index.vue
+12
-0
index.vue
src/views/informationBase/viewStandard/index.vue
+0
-73
documentReviewDialog.vue
...ase/viewStandardTerms/components/documentReviewDialog.vue
+97
-0
vehicleModelDialog.vue
...nBase/viewStandardTerms/components/vehicleModelDialog.vue
+101
-0
index.vue
src/views/informationBase/viewStandardTerms/index.vue
+263
-4
index.vue
src/views/informationBase/viewTemplate/index.vue
+1
-1
index.vue
src/views/informationBase/viewTestMatrix/index.vue
+238
-3
index.vue
src/views/informationBase/viewUseCaseLibrary/index.vue
+158
-4
No files found.
src/views/informationBase/viewCompany/index.vue
0 → 100644
View file @
c07ccc21
<!-- 查看车企数据 -->
<
template
>
<page-standard>
{{
'查看车企数据'
}}
</page-standard>
</
template
>
<
script
>
export
default
{
name
:
'Index'
}
</
script
>
<
style
scoped
></
style
>
src/views/informationBase/viewStandard/index.vue
View file @
c07ccc21
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
v-loading=
"loading"
v-loading=
"loading"
style=
"width: 100%; min-height: 88px"
style=
"width: 100%; min-height: 88px"
border
border
:span-method=
"objectSpanMethod"
:scroll-x=
"'1500px'"
:scroll-x=
"'1500px'"
:default-sort=
"
{ prop: 'createTime', order: 'descending' }"
:default-sort=
"
{ prop: 'createTime', order: 'descending' }"
:data="tableData"
:data="tableData"
...
@@ -90,24 +89,6 @@
...
@@ -90,24 +89,6 @@
<span>
{{
parseTime
(
scope
.
row
.
implementationDate
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
implementationDate
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"left"
min-width=
"160"
fixed=
"right"
class-name=
"fixed-width"
>
<
template
slot-scope=
"scope"
>
<div
class=
"button-bar"
>
<page-button
v-hasPermi=
"['setting:standard:update']"
icon=
"edit"
title=
"修改"
@
click
.
native=
"handleUpdate(scope.row)"
></page-button>
</div>
</
template
>
</el-table-column>
</el-table>
</el-table>
<pagination
<pagination
v-show=
"total > 0"
v-show=
"total > 0"
...
@@ -118,45 +99,21 @@
...
@@ -118,45 +99,21 @@
@
pagination=
"loadData"
@
pagination=
"loadData"
>
>
</pagination>
</pagination>
<tixi-dialog
ref=
"TixiDialog"
:dialog-manger=
"TixiDialogManger"
@
close=
"TixiDialogManger.dialogVisible = false"
@
refresh=
"TixiDialogManger.refreshList = true"
></tixi-dialog>
</page-standard>
</page-standard>
</template>
</template>
<
script
>
<
script
>
import
page
from
'@/mixins/page'
import
page
from
'@/mixins/page'
import
request
from
'@/utils/request'
import
{
geSpanList
}
from
'@/utils/table'
export
default
{
export
default
{
mixins
:
[
page
],
mixins
:
[
page
],
dicts
:
[
'sys_detailed_classification'
],
dicts
:
[
'sys_detailed_classification'
],
data
()
{
data
()
{
return
{
return
{
listUrl
:
'/standard/findStandardList'
,
listUrl
:
'/standard/findStandardList'
,
showSearch
:
true
,
list
:
[],
tableData
:
[],
tableData
:
[],
TixiDialogManger
:
{
dialogVisible
:
false
,
refreshList
:
false
,
dialogEditId
:
null
},
classFicationList
:
[],
classFicationList
:
[],
standardFicationList
:
[]
standardFicationList
:
[]
}
}
},
},
watch
:
{
'TixiDialogManger.refreshList'
(
val
)
{
if
(
val
)
{
this
.
loadData
()
this
.
TixiDialogManger
.
refreshList
=
false
}
}
},
mounted
()
{
mounted
()
{
this
.
getDicts
(
'sys_detailed_classification'
).
then
(
response
=>
{
this
.
getDicts
(
'sys_detailed_classification'
).
then
(
response
=>
{
this
.
classFicationList
=
response
.
data
this
.
classFicationList
=
response
.
data
...
@@ -169,36 +126,6 @@ export default {
...
@@ -169,36 +126,6 @@ export default {
downPdf
(
row
)
{
downPdf
(
row
)
{
console
.
log
(
'row'
,
row
)
console
.
log
(
'row'
,
row
)
window
.
open
(
process
.
env
.
VUE_APP_IMAGE_API
+
row
.
file
)
window
.
open
(
process
.
env
.
VUE_APP_IMAGE_API
+
row
.
file
)
},
viewTemplate
()
{
// this.$router.push({
// path: '/processing/reviewReport'
// })
window
.
open
(
'http://storage.xuetangx.com/public_assets/xuetangx/PDF/PlayerAPI_v1.0.6.pdf'
)
},
objectSpanMethod
()
{},
handleAdd
()
{
this
.
TixiDialogManger
.
dialogVisible
=
true
this
.
TixiDialogManger
.
source
=
{}
},
handleDelete
(
row
)
{
this
.
$modal
.
confirm
(
'是否确定删除该条数据?'
,
'操作确认'
)
.
then
(()
=>
{
// return delNotice(noticeIds)
})
.
then
(()
=>
{
this
.
loadData
()
this
.
$modal
.
msgSuccess
(
'删除成功'
)
})
.
catch
(()
=>
{})
},
handleUpdate
(
row
)
{
console
.
log
(
'row'
,
row
)
this
.
TixiDialogManger
.
dialogVisible
=
true
this
.
TixiDialogManger
.
dialogEditId
=
row
.
id
}
}
}
}
}
}
...
...
src/views/informationBase/viewStandardTerms/components/documentReviewDialog.vue
0 → 100644
View file @
c07ccc21
<
template
>
<el-drawer
title=
"检验内容"
:visible
.
sync=
"dialogManger.dialogVisible"
direction=
"rtl"
size=
"40%"
:before-close=
"handleClose"
>
<el-table
v-loading=
"loading"
class=
"el-table"
style=
"min-height: 88px; margin: 20px"
border
:scroll-x=
"'1500px'"
:default-sort=
"
{ prop: 'createTime', order: 'descending' }"
:data="tableData"
>
<el-table-column
type=
"index"
width=
"55"
label=
"序号"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
$index
+
1
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"测试场景"
align=
"left"
sortable
prop=
"testScenario"
>
</el-table-column>
<el-table-column
label=
"测试类型"
align=
"left"
sortable
prop=
"testType"
>
</el-table-column>
<el-table-column
label=
"用例编号"
align=
"left"
sortable
prop=
"useCaseNumber"
>
</el-table-column>
<el-table-column
label=
"用例名称"
align=
"left"
sortable
prop=
"useCaseName"
>
</el-table-column>
</el-table>
</el-drawer>
</template>
<
script
>
import
{
listDocumentReview
}
from
'../../../../api/setting/standardTerms'
import
{
getRows
,
getRows2
}
from
'../../../../utils/reviewDetailsTable'
export
default
{
props
:
{
dialogManger
:
{
type
:
Object
,
default
:
()
=>
{
return
{
dialogVisible
:
false
,
refreshList
:
false
,
source
:
{},
dialogEditId
:
undefined
}
}
}
},
data
()
{
return
{
loading
:
true
,
tableData
:
[]
}
},
methods
:
{
getRows
,
getRows2
,
/** 获取文档审查检验内容 */
init
()
{
this
.
loading
=
true
listDocumentReview
({
id
:
this
.
dialogManger
.
dialogEditId
}).
then
(
res
=>
{
this
.
tableData
=
res
.
data
this
.
loading
=
false
})
},
/** 关闭抽屉 */
handleClose
()
{
this
.
dialogManger
.
dialogVisible
=
false
}
}
}
</
script
>
<
style
scoped
>
.el-table
{
width
:
auto
;
}
</
style
>
src/views/informationBase/viewStandardTerms/components/vehicleModelDialog.vue
0 → 100644
View file @
c07ccc21
<
template
>
<el-drawer
title=
"检验内容"
:visible
.
sync=
"dialogManger.dialogVisible"
direction=
"rtl"
size=
"40%"
:before-close=
"handleClose"
>
<table
class=
"table"
style=
"margin: 20px"
>
<thead>
<tr>
<th>
标准章节
</th>
<th>
标准要求
</th>
<th>
关联场景
</th>
</tr>
</thead>
<tbody>
<!-- 循环遍历 keyPointList -->
<template
v-for=
"(i, PointIndex) in tableData.keyPointList"
>
<tr
:key=
"'PointIndex' + PointIndex"
>
<td
align=
"center"
:rowspan=
"getRows(i)"
>
{{
i
.
text
}}
</td>
</tr>
<!-- 循环遍历 reviewDetailsList -->
<template
v-for=
"(v, reviewDetailIndex) in i.reviewDetailsList"
>
<tr
:key=
"'reviewDetailIndex' + PointIndex + reviewDetailIndex"
>
<td
align=
"center"
>
{{
v
.
text
}}
</td>
<td
align=
"center"
>
<template
v-for=
"(a, reviewSceneIndex) in v.reviewSceneList"
>
<div
:key=
"
'reviewSceneIndex' +
PointIndex +
reviewDetailIndex +
reviewSceneIndex
"
>
<span>
{{
a
.
text
}}
</span>
<br
/>
</div>
</
template
>
</td>
</tr>
</template>
</template>
</tbody>
</table>
</el-drawer>
</template>
<
script
>
import
{
listInspection
}
from
'../../../../api/setting/standardTerms'
import
{
getRows
,
getRows2
}
from
'../../../../utils/reviewDetailsTable'
export
default
{
props
:
{
dialogManger
:
{
type
:
Object
,
default
:
()
=>
{
return
{
dialogVisible
:
false
,
refreshList
:
false
,
source
:
{},
dialogEditId
:
undefined
}
}
}
},
data
()
{
return
{
loading
:
true
,
tableData
:
[]
}
},
methods
:
{
getRows
,
getRows2
,
/** 获取体系审查、车型审查检验内容 */
init
()
{
this
.
loading
=
true
listInspection
({
id
:
this
.
dialogManger
.
dialogEditId
}).
then
(
res
=>
{
this
.
tableData
=
res
.
data
this
.
loading
=
false
})
},
/** 关闭抽屉 */
handleClose
()
{
this
.
dialogManger
.
dialogVisible
=
false
}
}
}
</
script
>
<
style
scoped
>
.table
{
width
:
auto
;
}
</
style
>
src/views/informationBase/viewStandardTerms/index.vue
View file @
c07ccc21
<!-- 查看检验内容 -->
<!-- 查看检验内容 -->
<
template
>
<
template
>
<page-standard>
</page-standard>
<page-standard-option>
<div
slot=
"tab"
>
<el-tabs
v-model=
"queryParams.type"
@
tab-click=
"loadData"
>
<el-tab-pane
v-for=
"(dict, key) in reviewTypeList"
:key=
"key"
:label=
"dict.label"
:name=
"dict.value"
>
</el-tab-pane>
</el-tabs>
</div>
<div
class=
"container"
>
<div>
<el-form
v-show=
"showSearch"
ref=
"queryForm"
:model=
"queryParams"
size=
"small"
:inline=
"true"
>
<el-form-item
prop=
"status"
>
<el-input
v-model=
"queryParams.chapter"
placeholder=
"请输入标准章节"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
prop=
"status"
>
<el-input
v-model=
"queryParams.text"
placeholder=
"请输入标准要求"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button
>
<el-button
type=
"default"
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"reset"
>
重置
</el-button
>
</el-form-item>
</el-form>
</div>
<!--
<div>
-->
<!--
<right-toolbar-->
<!-- :show-search.sync="showSearch"-->
<!-- @queryTable="loadData"-->
<!-- >
</right-toolbar>
-->
<!--
</div>
-->
</div>
<el-table
v-loading=
"loading"
style=
"width: 100%; min-height: 88px"
border
:scroll-x=
"'1500px'"
:default-sort=
"
{ prop: 'createTime', order: 'descending' }"
:data="tableData"
>
<el-table-column
type=
"index"
width=
"55"
label=
"序号"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
$index
+
1
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"chapter"
label=
"标准章节"
align=
"center"
>
</el-table-column>
<el-table-column
prop=
"text"
label=
"标准要求"
align=
"center"
>
</el-table-column>
<el-table-column
v-if=
"refreshTable && queryParams.type === 'test'"
prop=
"testMethod"
label=
"标准测试方法"
align=
"center"
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"left"
class-name=
"fixed-width"
>
<
template
slot-scope=
"scope"
>
<div
class=
"button-bar"
>
<page-button
v-hasPermi=
"['setting:standard:update']"
icon=
"doc-search"
title=
"检验内容"
@
click
.
native=
"handleUpdate(scope.row)"
></page-button>
</div>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:background=
"false"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"loadData"
>
</pagination>
<vehiclemodel-dialog
ref=
"vehicleModelDialog"
:dialog-manger=
"vehicleModelDialogManger"
@
close=
"vehicleModelDialogManger.dialogVisible = false"
>
</vehiclemodel-dialog>
<document-review-dialog
ref=
"documentReviewDialog"
:dialog-manger=
"documentReviewDialogManger"
@
close=
"documentReviewDialogManger.dialogVisible = false"
>
</document-review-dialog>
</page-standard-option>
</template>
</template>
<
script
>
<
script
>
import
page
from
'@/mixins/page'
import
{
mapGetters
}
from
'vuex'
import
vehicleModelDialog
from
'./components/vehicleModelDialog'
import
documentReviewDialog
from
'./components/documentReviewDialog'
import
request
from
'../../../utils/request'
export
default
{
export
default
{
name
:
'Index'
components
:
{
'vehiclemodel-dialog'
:
vehicleModelDialog
,
'document-review-dialog'
:
documentReviewDialog
},
dicts
:
[
'sys_scene_type'
],
mixins
:
[
page
],
data
()
{
return
{
listUrl
:
'/review/standard/list'
,
reviewTypeList
:
[
{
label
:
'体系审查'
,
value
:
'system'
},
{
label
:
'车型审查'
,
value
:
'car'
},
{
label
:
'文档审查'
,
value
:
'test'
}
],
showSearch
:
true
,
tableData
:
[],
queryParams
:
{
chapter
:
''
,
text
:
''
,
standardId
:
this
.
$store
.
getters
.
standard
,
type
:
'system'
},
vehicleModelDialogManger
:
{
dialogVisible
:
false
,
refreshList
:
false
,
source
:
{},
dialogEditId
:
''
},
documentReviewDialogManger
:
{
dialogVisible
:
false
,
refreshList
:
false
,
source
:
{},
dialogEditId
:
''
},
refreshList
:
false
}
},
watch
:
{
// 公共组件左侧标准全局变量选中
'$store.getters.standard'
:
{
handler
(
newVal
,
oldVal
)
{
this
.
queryParams
.
standardId
=
newVal
this
.
loadData
()
}
},
refreshList
(
val
)
{
if
(
val
)
{
this
.
loadData
()
this
.
refreshList
=
false
}
},
'vehicleModelDialogManger.refreshList'
(
val
)
{
if
(
val
)
{
this
.
loadData
()
this
.
vehicleModelDialogManger
.
refreshList
=
false
}
}
},
methods
:
{
loadData
()
{
if
(
this
.
queryParams
.
standardId
!==
''
)
{
this
.
loading
=
true
request
({
url
:
this
.
listUrl
,
method
:
'post'
,
data
:
this
.
queryParams
})
.
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
console
.
log
(
res
.
rows
)
// res.rows[0].carReviewStatus = 'FINISH'
// res.rows[0].reviewStatus = 'SIGNED'
// res.rows[0].carReviewStatus = 'FINISH'
this
.
tableData
=
res
.
rows
this
.
total
=
res
.
total
}
this
.
loading
=
false
})
.
catch
(
error
=>
{
if
(
error
.
msg
)
{
this
.
$message
.
error
(
error
.
msg
)
}
this
.
loading
=
false
})
}
},
reset
()
{
this
.
queryParams
.
chapter
=
''
this
.
queryParams
.
text
=
''
},
handleUpdate
(
row
)
{
if
(
this
.
queryParams
.
type
===
'test'
)
{
this
.
documentReviewDialogManger
.
dialogVisible
=
true
this
.
documentReviewDialogManger
.
dialogEditId
=
row
.
id
this
.
$refs
.
documentReviewDialog
.
init
()
}
else
{
this
.
vehicleModelDialogManger
.
dialogVisible
=
true
this
.
vehicleModelDialogManger
.
dialogEditId
=
row
.
id
this
.
$refs
.
vehicleModelDialog
.
init
()
}
// console.log('dialogEditId', this.vehicleModelDialogManger.dialogEditId)
}
}
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
.item-box
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
14px
;
padding-right
:
8px
;
.title-item
{
width
:
500px
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
<
style
scoped
></
style
>
.buttons-list
{
margin-left
:
20px
;
}
}
.container
{
display
:
flex
;
justify-content
:
space-between
;
height
:
50px
;
}
</
style
>
src/views/informationBase/viewTemplate/index.vue
View file @
c07ccc21
<!-- 查看模板库 -->
<!-- 查看模板库 -->
<
template
>
<
template
>
<page-standard>
</page-standard>
<page-standard>
{{
'模板管理还没有接口呢'
}}
</page-standard>
</
template
>
</
template
>
<
script
>
<
script
>
...
...
src/views/informationBase/viewTestMatrix/index.vue
View file @
c07ccc21
<!-- 查看矩阵 -->
<!-- 查看矩阵 -->
<
template
>
<
template
>
<page-standard>
</page-standard>
<page-standard>
<el-table
v-loading=
"loading"
height=
"calc(100vh - 135px)"
:data=
"tableData"
border
:header-cell-style=
"headerCellStyle"
:cell-style=
"tableCellStyle"
@
cell-mouse-enter=
"cellMouseEnter"
@
cell-mouse-leave=
"cellMouseLeave"
>
<el-table-column
label=
"测试场景\测试类型"
align=
"center"
width=
"160px"
prop=
"name"
></el-table-column>
<template
v-for=
"(item, index) in echartsTabled"
>
<el-table-column
:key=
"index"
:width=
"item.width ? item.width : ''"
:fixed=
"item.width ? true : false"
:label=
"item.title"
align=
"center"
>
<template
slot-scope=
"scope"
height=
"calc(100vh - 350px)"
>
<div
v-if=
"scope.row[item.id].id !== ''"
class=
"table-span-style"
@
click=
"viewDetail(scope.row[item.id].id)"
>
<svg-icon
icon-class=
"checkMark"
/>
</div>
</
template
>
</el-table-column>
</template>
</el-table>
</page-standard>
</template>
</template>
<
script
>
<
script
>
import
{
listMatrix
}
from
'../../../api/setting/testMatrix'
export
default
{
export
default
{
name
:
'Index'
name
:
'Index'
,
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 表头信息
echartsTabled
:
[
// {
// tableNmae: '测试场景\\测试类型',
// tableCode: 'test'
// },
// {
// tableNmae: '文件审核',
// tableCode: 'file'
// },
// {
// tableNmae: '系统服务漏扫',
// tableCode: 'missedScan'
// },
// {
// tableNmae: '固件代码漏扫',
// tableCode: 'codeScan'
// },
// {
// tableNmae: '端口扫描',
// tableCode: 'portScanning'
// }
],
// 表格内容
tableData
:
[
// {
// test: 'TBOX-蜂窝以太网接口',
// file: {
// id: 0,
// status: '1'
// },
// missedScan: {
// id: 0,
// status: '1'
// },
// codeScan: {
// id: 0,
// status: '1'
// },
// portScanning: {
// id: 0,
// status: '1'
// }
// },
// {
// test: 'WiFi AP接口',
// file: {
// id: 1,
// status: '1'
// },
// missedScan: {
// id: 1,
// status: '1'
// },
// codeScan: {
// id: 1,
// status: '1'
// },
// portScanning: {
// id: 1,
// status: '1'
// }
// },
// {
// test: 'WiFi Client接口',
// file: {
// id: 2,
// status: ''
// },
// missedScan: {
// id: 2,
// status: ''
// },
// codeScan: {
// id: 2,
// status: ''
// },
// portScanning: {
// id: 2,
// status: ''
// }
// },
// {
// test: '充电以太网接口',
// file: {
// id: 3,
// status: '1'
// },
// missedScan: {
// id: 3,
// status: '1'
// },
// codeScan: {
// id: 3,
// status: '1'
// },
// portScanning: {
// id: 3,
// status: '1'
// }
// }
],
formConfig
:
{
isNoHoverColor
:
''
}
}
},
mounted
()
{
this
.
getMatrix
()
},
methods
:
{
/** 获取列表数据 */
getMatrix
()
{
listMatrix
().
then
(
res
=>
{
this
.
loading
=
true
this
.
echartsTabled
=
res
.
data
.
header
this
.
tableData
=
res
.
data
.
rows
this
.
tableData
.
forEach
((
item
,
index
)
=>
{
const
innerArray
=
this
.
tableData
[
index
]
for
(
const
key
in
innerArray
)
{
if
(
key
!==
'name'
)
{
if
(
innerArray
[
key
]
===
''
)
{
innerArray
[
key
]
=
{
id
:
''
}
}
else
{
innerArray
[
key
]
=
{
id
:
innerArray
[
key
]
}
}
}
}
})
this
.
loading
=
false
})
},
/** 点击跳转详情 */
viewDetail
(
row
)
{
// this.$message(row)
// this.$router.push({
// path: '/setting/useCaseDetails',
// query: { id: row }
// })
},
// 表头样式
headerCellStyle
(
row
,
rowIndex
)
{
if
(
row
.
columnIndex
===
0
)
{
return
{
backgroundColor
:
'#1A6FD7'
,
color
:
'#FFFFFF'
}
}
else
{
return
{
backgroundColor
:
'#F2F2F2'
}
}
},
// 列样式
tableCellStyle
(
row
,
column
,
rowIndex
,
columnIndex
)
{
if
(
row
.
columnIndex
===
0
)
{
return
{
backgroundColor
:
'#dde9f9'
}
}
},
/** 鼠标悬浮时的操作 */
cellMouseEnter
(
e
,
row
,
cell
,
column
)
{
if
(
!
row
.
width
)
{
var
selrange
=
document
.
getElementsByClassName
(
row
.
id
)
if
(
this
.
formConfig
.
isNoHoverColor
)
{
cell
.
style
.
backgroundColor
=
''
for
(
var
i
=
0
;
i
<
selrange
.
length
;
i
++
)
{
selrange
[
i
].
style
.
backgroundColor
=
''
selrange
[
0
].
style
.
backgroundColor
=
'#F2F2F2'
}
}
else
{
cell
.
style
.
backgroundColor
=
'#F3F8FD'
for
(
var
a
=
1
;
a
<
selrange
.
length
;
a
++
)
{
selrange
[
a
].
style
.
backgroundColor
=
'#F3F8FD'
}
}
}
},
/** 鼠标离开时的操作 */
cellMouseLeave
(
e
,
row
,
cell
)
{
if
(
!
row
.
width
)
{
var
selrange
=
document
.
getElementsByClassName
(
row
.
id
)
for
(
var
i
=
0
;
i
<
selrange
.
length
;
i
++
)
{
selrange
[
i
].
style
.
backgroundColor
=
''
selrange
[
0
].
style
.
backgroundColor
=
'#F2F2F2'
}
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
></
style
>
<
style
scoped
>
/*::v-deep .el-table__body tr:hover > td {*/
/* background-color: #f3f8fd !important;*/
/*}*/
.table-span-style
{
text-align
:
center
;
color
:
#1890ff
;
cursor
:
pointer
;
}
</
style
>
src/views/informationBase/viewUseCaseLibrary/index.vue
View file @
c07ccc21
<!-- 查看测试用例库 -->
<!-- 查看测试用例库 -->
<
template
>
<
template
>
<page-standard>
</page-standard>
<page-standard>
<el-form
v-show=
"showSearch"
ref=
"queryForm"
:model=
"queryParams"
size=
"small"
:inline=
"true"
label-width=
"68px"
>
<el-form-item
prop=
"status"
>
<el-select
v-model=
"queryParams.testScenarioId"
placeholder=
"请选择测试场景"
clearable
>
<el-option
v-for=
"item in testScenarList"
:key=
"item.id"
:label=
"item.testScenario"
:value=
"item.id"
>
{{
item
.
testScenario
}}
</el-option
>
</el-select>
</el-form-item>
<el-form-item
prop=
"status"
>
<el-select
v-model=
"queryParams.testTypeId"
placeholder=
"请选择测试类型"
clearable
>
<el-option
v-for=
"item of testTypeList"
:key=
"item.id"
:label=
"item.testType"
:value=
"item.id"
>
{{
item
.
testType
}}
</el-option
>
</el-select>
</el-form-item>
<el-form-item
prop=
"postCode"
>
<el-input
v-model=
"queryParams.searchKeywords"
placeholder=
"用例编号或名称关键字"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button
>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button
>
</el-form-item>
</el-form>
<!--
<el-row
:gutter=
"10"
class=
"mb8"
>
-->
<!--
<right-toolbar-->
<!-- :show-search.sync="showSearch"-->
<!-- @queryTable="getList"-->
<!-- >
</right-toolbar>
-->
<!--
</el-row>
-->
<el-table
v-loading=
"loading"
style=
"width: 100%; min-height: 88px"
border
:scroll-x=
"'1500px'"
:data=
"tableData"
>
<el-table-column
type=
"index"
width=
"55"
label=
"序号"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
$index
+
1
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"测试场景"
align=
"center"
prop=
"testScenario"
/>
<el-table-column
label=
"测试类型"
align=
"center"
prop=
"testType"
/>
<el-table-column
label=
"用例编号"
align=
"center"
prop=
"usecaseNo"
/>
<el-table-column
label=
"用例名称"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"工具"
align=
"center"
prop=
"tools"
/>
<el-table-column
label=
"对应输入"
align=
"center"
prop=
"input"
/>
<el-table-column
label=
"用例描述"
align=
"center"
prop=
"description"
/>
<el-table-column
label=
"更新人员"
align=
"center"
prop=
"updateBy"
/>
<el-table-column
label=
"更新时间"
align=
"center"
prop=
"updateTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
updateTime
)
}}
</span>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:background=
"false"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"loadData"
/>
</page-standard>
</template>
</template>
<
script
>
<
script
>
import
page
from
'@/mixins/page'
import
{
listTestScenar
,
listTestType
}
from
'../../../api/setting/useCaseLibrary'
export
default
{
export
default
{
name
:
'Index'
mixins
:
[
page
],
data
()
{
return
{
listUrl
:
'/system/testCase/getList'
,
// 显示搜索条件
showSearch
:
true
,
// 表格数据
tableData
:
[],
testScenarList
:
[],
testTypeList
:
[],
// 表单校验
rules
:
{
postName
:
[
{
required
:
true
,
message
:
'岗位名称不能为空'
,
trigger
:
'blur'
}
],
postCode
:
[
{
required
:
true
,
message
:
'岗位编码不能为空'
,
trigger
:
'blur'
}
],
postSort
:
[
{
required
:
true
,
message
:
'岗位顺序不能为空'
,
trigger
:
'blur'
}
]
}
}
},
mounted
()
{
this
.
getTestScenar
()
this
.
getTestType
()
},
methods
:
{
getTestScenar
()
{
listTestScenar
({
pageNum
:
1
,
pageSize
:
999
}).
then
(
res
=>
{
this
.
testScenarList
=
res
.
rows
})
},
getTestType
()
{
listTestType
({
pageNum
:
1
,
pageSize
:
999
}).
then
(
res
=>
{
this
.
testTypeList
=
res
.
rows
})
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
></
style
>
.select-width
{
width
:
100%
;
}
</
style
>
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