Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
energyai_vue
Project
Project
Details
Activity
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
葛齐林
energyai_vue
Commits
804cda5d
Commit
804cda5d
authored
May 08, 2021
by
co_dengxiongwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
ebea3312
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
20 deletions
+23
-20
tableList.vue
src/pages/components/tableList.vue
+23
-20
No files found.
src/pages/components/tableList.vue
View file @
804cda5d
...
@@ -2,13 +2,12 @@
...
@@ -2,13 +2,12 @@
<div
class=
"en-table"
>
<div
class=
"en-table"
>
<el-table
<el-table
stripe
stripe
border
:data=
"tableData"
:data=
"tableData"
style=
"width: 100%"
style=
"width: 100%"
:row-class-name=
"differentStateColor"
:row-class-name=
"differentStateColor"
:header-cell-style=
"
{
:header-cell-style=
"
{
background: 'rgba(0, 151, 255, 0.08)',
background: 'rgba(0, 151, 255, 0.08)',
color: '#333333'
,
color: '#333333'
}"
}"
>
>
<el-table-column
align=
"center"
label=
"序号"
width=
"100"
>
<el-table-column
align=
"center"
label=
"序号"
width=
"100"
>
...
@@ -26,7 +25,6 @@
...
@@ -26,7 +25,6 @@
:align=
"item.align"
:align=
"item.align"
header-align=
"center"
header-align=
"center"
align=
"center"
align=
"center"
>
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<slot
:name=
"item.prop"
:scope=
"scope.row"
></slot>
<slot
:name=
"item.prop"
:scope=
"scope.row"
></slot>
...
@@ -39,14 +37,19 @@
...
@@ -39,14 +37,19 @@
:label=
"item.label"
:label=
"item.label"
:width=
"item.width"
:width=
"item.width"
:align=
"item.align"
:align=
"item.align"
header-align=
"center"
header-align=
"center"
align=
"center"
align=
"center"
>
>
</el-table-column>
</el-table-column>
</template>
</template>
<el-table-column
v-if=
'showOpr'
align=
"center"
label=
"操作"
fixed=
"right"
:width=
"opNum * 80"
>
<el-table-column
v-if=
"showOpr"
align=
"center"
label=
"操作"
fixed=
"right"
:width=
"opNum * 80"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<slot
name=
"operation"
:scope=
"scope.row"
></slot>
<slot
name=
"operation"
:scope=
"scope.row"
></slot>
</
template
>
</
template
>
...
@@ -55,7 +58,7 @@
...
@@ -55,7 +58,7 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'table-list'
,
name
:
'table-list'
,
props
:
{
props
:
{
...
@@ -76,7 +79,7 @@ export default {
...
@@ -76,7 +79,7 @@ export default {
// 展示每行状态颜色
// 展示每行状态颜色
showStateColor
:
{
showStateColor
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
},
},
// 人工模式
// 人工模式
currentMode
:
{
currentMode
:
{
...
@@ -87,28 +90,28 @@ export default {
...
@@ -87,28 +90,28 @@ export default {
data
()
{
data
()
{
return
{}
return
{}
},
},
methods
:{
methods
:
{
// 不同状态颜色
// 不同状态颜色
differentStateColor
({
row
,
rowIndex
})
{
differentStateColor
({
row
,
rowIndex
})
{
if
(
this
.
showStateColor
==
false
)
return
;
if
(
this
.
showStateColor
==
false
)
return
if
(
row
.
modeTypes
===
null
||
this
.
currentMode
===
null
)
{
if
(
row
.
modeTypes
===
null
||
this
.
currentMode
===
null
)
{
// 原有
// 原有
return
""
;
return
''
}
else
if
(
row
.
modeTypes
.
includes
(
1
)
&&
this
.
currentMode
==
"1"
)
{
}
else
if
(
row
.
modeTypes
.
includes
(
1
)
&&
this
.
currentMode
==
'1'
)
{
// 供暖模式
// 供暖模式
return
"table-row-mode"
;
return
'table-row-mode'
}
else
if
(
row
.
modeTypes
.
includes
(
2
)
&&
this
.
currentMode
==
"2"
)
{
}
else
if
(
row
.
modeTypes
.
includes
(
2
)
&&
this
.
currentMode
==
'2'
)
{
// 机械通风
// 机械通风
return
"table-row-mechanical"
;
return
'table-row-mechanical'
}
else
if
(
row
.
modeTypes
.
includes
(
3
)
&&
this
.
currentMode
==
"3"
)
{
}
else
if
(
row
.
modeTypes
.
includes
(
3
)
&&
this
.
currentMode
==
'3'
)
{
// 自然通风
// 自然通风
return
"table-row-natural"
;
return
'table-row-natural'
}
}
}
,
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.record-color
{
.record-color
{
color
:
#0097ff
;
color
:
#0097ff
;
}
}
...
...
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