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
56b4dc2c
Commit
56b4dc2c
authored
Feb 18, 2024
by
mzx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试矩阵央视逻辑完善
parent
5956e10e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
20 deletions
+42
-20
index.vue
src/views/setting/testMatrix/index.vue
+42
-20
No files found.
src/views/setting/testMatrix/index.vue
View file @
56b4dc2c
...
@@ -4,9 +4,11 @@
...
@@ -4,9 +4,11 @@
height=
"calc(100vh - 300px)"
height=
"calc(100vh - 300px)"
:data=
"tableData"
:data=
"tableData"
border
border
:header-cell-style=
"headerCellStyle"
@
cell-mouse-enter=
"cellMouseEnter"
@
cell-mouse-enter=
"cellMouseEnter"
@
cell-mouse-leave=
"cellMouseLeave"
@
cell-mouse-leave=
"cellMouseLeave"
@
cell-click=
"cellClick"
@
cell-click=
"cellClick"
:cell-style=
"tableCellStyle"
>
>
<template
v-for=
"(item, index) in echartsTabled"
>
<template
v-for=
"(item, index) in echartsTabled"
>
<el-table-column
<el-table-column
...
@@ -146,7 +148,21 @@ export default {
...
@@ -146,7 +148,21 @@ export default {
},
},
methods
:
{
methods
:
{
viewDetail
(
row
)
{
viewDetail
(
row
)
{
console
.
log
(
'viewDetailrow'
,
row
)
// console.log('viewDetailrow', row)
// console.log('表头信息', JSON.stringify(this.echartsTabled))
// console.log('表格内容', JSON.stringify(this.tableData))
},
headerCellStyle
(
row
,
rowIndex
)
{
if
(
row
.
columnIndex
===
0
)
{
return
{
backgroundColor
:
'#1A6FD7'
}
}
else
{
return
{
backgroundColor
:
'#F2F2F2'
}
}
},
tableCellStyle
(
row
,
column
,
rowIndex
,
columnIndex
)
{
if
(
row
.
columnIndex
===
0
)
{
return
{
backgroundColor
:
'#dde9f9'
}
}
},
},
cellClick
(
row
,
column
,
cell
,
event
)
{
cellClick
(
row
,
column
,
cell
,
event
)
{
// console.log('row', row)
// console.log('row', row)
...
@@ -156,27 +172,33 @@ export default {
...
@@ -156,27 +172,33 @@ export default {
},
},
/** 鼠标悬浮时的操作 */
/** 鼠标悬浮时的操作 */
cellMouseEnter
(
e
,
row
,
cell
,
column
)
{
cellMouseEnter
(
e
,
row
,
cell
,
column
)
{
var
selrange
=
document
.
getElementsByClassName
(
row
.
id
)
if
(
row
.
id
!==
'el-table_1_column_1'
)
{
// console.log('row', row)
var
selrange
=
document
.
getElementsByClassName
(
row
.
id
)
// console.log('cell', cell)
// console.log('row', row)
// console.log('selrange', selrange)
// console.log('cell', cell)
if
(
this
.
formConfig
.
isNoHoverColor
)
{
// console.log('selrange', selrange)
cell
.
style
.
backgroundColor
=
''
if
(
this
.
formConfig
.
isNoHoverColor
)
{
for
(
var
i
=
0
;
i
<
selrange
.
length
;
i
++
)
{
cell
.
style
.
backgroundColor
=
''
selrange
[
i
].
style
.
backgroundColor
=
''
for
(
var
i
=
0
;
i
<
selrange
.
length
;
i
++
)
{
}
selrange
[
i
].
style
.
backgroundColor
=
''
}
else
{
selrange
[
0
].
style
.
backgroundColor
=
'#F2F2F2'
cell
.
style
.
backgroundColor
=
'#fec171'
}
for
(
var
i
=
0
;
i
<
selrange
.
length
;
i
++
)
{
}
else
{
selrange
[
i
].
style
.
backgroundColor
=
'#fec171'
cell
.
style
.
backgroundColor
=
'#F3F8FD'
for
(
var
i
=
1
;
i
<
selrange
.
length
;
i
++
)
{
selrange
[
i
].
style
.
backgroundColor
=
'#F3F8FD'
}
}
}
}
}
},
},
/** 鼠标离开时的操作 */
/** 鼠标离开时的操作 */
cellMouseLeave
(
e
,
row
,
cell
)
{
cellMouseLeave
(
e
,
row
,
cell
)
{
var
selrange
=
document
.
getElementsByClassName
(
row
.
id
)
if
(
row
.
id
!==
'el-table_1_column_1'
)
{
for
(
var
i
=
0
;
i
<
selrange
.
length
;
i
++
)
{
var
selrange
=
document
.
getElementsByClassName
(
row
.
id
)
selrange
[
i
].
style
.
backgroundColor
=
'#FFFFFF'
for
(
var
i
=
0
;
i
<
selrange
.
length
;
i
++
)
{
selrange
[
i
].
style
.
backgroundColor
=
''
selrange
[
0
].
style
.
backgroundColor
=
'#F2F2F2'
}
}
}
}
}
}
}
...
@@ -184,9 +206,9 @@ export default {
...
@@ -184,9 +206,9 @@ export default {
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
::v-deep
.el-table__body
tr
:hover
>
td
{
/*::v-deep .el-table__body tr:hover > td {*/
background-color
:
#fec171
!important
;
/* background-color: #f3f8fd !important;*/
}
/*}*/
.table-span-style
{
.table-span-style
{
text-align
:
center
;
text-align
:
center
;
color
:
#1890ff
;
color
:
#1890ff
;
...
...
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